@json-to-office/core-docx 0.1.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/LICENSE +18 -0
- package/README.md +9 -0
- package/dist/cache/index.d.ts +7 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/key-generator.d.ts +34 -0
- package/dist/cache/key-generator.d.ts.map +1 -0
- package/dist/components/columns.d.ts +12 -0
- package/dist/components/columns.d.ts.map +1 -0
- package/dist/components/footer.d.ts +12 -0
- package/dist/components/footer.d.ts.map +1 -0
- package/dist/components/header.d.ts +12 -0
- package/dist/components/header.d.ts.map +1 -0
- package/dist/components/heading.d.ts +12 -0
- package/dist/components/heading.d.ts.map +1 -0
- package/dist/components/highcharts.d.ts +21 -0
- package/dist/components/highcharts.d.ts.map +1 -0
- package/dist/components/image.d.ts +12 -0
- package/dist/components/image.d.ts.map +1 -0
- package/dist/components/index.d.ts +19 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/list.d.ts +12 -0
- package/dist/components/list.d.ts.map +1 -0
- package/dist/components/paragraph.d.ts +12 -0
- package/dist/components/paragraph.d.ts.map +1 -0
- package/dist/components/section.d.ts +12 -0
- package/dist/components/section.d.ts.map +1 -0
- package/dist/components/statistic.d.ts +12 -0
- package/dist/components/statistic.d.ts.map +1 -0
- package/dist/components/table.d.ts +13 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/text-box.d.ts +9 -0
- package/dist/components/text-box.d.ts.map +1 -0
- package/dist/components/text-space-after.d.ts +35 -0
- package/dist/components/text-space-after.d.ts.map +1 -0
- package/dist/components/toc/index.d.ts +30 -0
- package/dist/components/toc/index.d.ts.map +1 -0
- package/dist/core/cached-render.d.ts +46 -0
- package/dist/core/cached-render.d.ts.map +1 -0
- package/dist/core/content.d.ts +263 -0
- package/dist/core/content.d.ts.map +1 -0
- package/dist/core/generator.d.ts +93 -0
- package/dist/core/generator.d.ts.map +1 -0
- package/dist/core/index.d.ts +14 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/layout.d.ts +107 -0
- package/dist/core/layout.d.ts.map +1 -0
- package/dist/core/render.d.ts +26 -0
- package/dist/core/render.d.ts.map +1 -0
- package/dist/core/structure.d.ts +67 -0
- package/dist/core/structure.d.ts.map +1 -0
- package/dist/examples/test-spacing-debug.d.ts +2 -0
- package/dist/examples/test-spacing-debug.d.ts.map +1 -0
- package/dist/examples/test-spacing.d.ts +6 -0
- package/dist/examples/test-spacing.d.ts.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7726 -0
- package/dist/index.js.map +1 -0
- package/dist/json/filesystem.d.ts +81 -0
- package/dist/json/filesystem.d.ts.map +1 -0
- package/dist/json/index.d.ts +6 -0
- package/dist/json/index.d.ts.map +1 -0
- package/dist/json/normalizer.d.ts +30 -0
- package/dist/json/normalizer.d.ts.map +1 -0
- package/dist/json/parser.d.ts +9 -0
- package/dist/json/parser.d.ts.map +1 -0
- package/dist/plugin/createComponent.d.ts +113 -0
- package/dist/plugin/createComponent.d.ts.map +1 -0
- package/dist/plugin/createDocumentGenerator.d.ts +18 -0
- package/dist/plugin/createDocumentGenerator.d.ts.map +1 -0
- package/dist/plugin/example/columns-layout.component.d.ts +29 -0
- package/dist/plugin/example/columns-layout.component.d.ts.map +1 -0
- package/dist/plugin/example/index.d.ts +6 -0
- package/dist/plugin/example/index.d.ts.map +1 -0
- package/dist/plugin/example/index.js +7449 -0
- package/dist/plugin/example/index.js.map +1 -0
- package/dist/plugin/example/nested-section.component.d.ts +16 -0
- package/dist/plugin/example/nested-section.component.d.ts.map +1 -0
- package/dist/plugin/example/plugin-demo.json +103 -0
- package/dist/plugin/example/text-space-after.component.d.ts +22 -0
- package/dist/plugin/example/text-space-after.component.d.ts.map +1 -0
- package/dist/plugin/example/weather.component.d.ts +29 -0
- package/dist/plugin/example/weather.component.d.ts.map +1 -0
- package/dist/plugin/index.d.ts +35 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/schema.d.ts +30 -0
- package/dist/plugin/schema.d.ts.map +1 -0
- package/dist/plugin/types.d.ts +144 -0
- package/dist/plugin/types.d.ts.map +1 -0
- package/dist/plugin/validation.d.ts +45 -0
- package/dist/plugin/validation.d.ts.map +1 -0
- package/dist/plugin/version-resolver.d.ts +10 -0
- package/dist/plugin/version-resolver.d.ts.map +1 -0
- package/dist/styles/index.d.ts +13 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/styles/theme-resolver.d.ts +6 -0
- package/dist/styles/theme-resolver.d.ts.map +1 -0
- package/dist/styles/theme-validator.d.ts +7 -0
- package/dist/styles/theme-validator.d.ts.map +1 -0
- package/dist/styles/themeToDocxAdapter.d.ts +22 -0
- package/dist/styles/themeToDocxAdapter.d.ts.map +1 -0
- package/dist/styles/utils/borderUtils.d.ts +88 -0
- package/dist/styles/utils/borderUtils.d.ts.map +1 -0
- package/dist/styles/utils/cellUtils.d.ts +55 -0
- package/dist/styles/utils/cellUtils.d.ts.map +1 -0
- package/dist/styles/utils/colorUtils.d.ts +27 -0
- package/dist/styles/utils/colorUtils.d.ts.map +1 -0
- package/dist/styles/utils/componentDefaults.d.ts +97 -0
- package/dist/styles/utils/componentDefaults.d.ts.map +1 -0
- package/dist/styles/utils/layoutUtils.d.ts +87 -0
- package/dist/styles/utils/layoutUtils.d.ts.map +1 -0
- package/dist/styles/utils/styleHelpers.d.ts +90 -0
- package/dist/styles/utils/styleHelpers.d.ts.map +1 -0
- package/dist/templates/documents/index.d.ts +34 -0
- package/dist/templates/documents/index.d.ts.map +1 -0
- package/dist/templates/documents/proposal.docx.json +171 -0
- package/dist/templates/documents/quarterly-report.docx.json +117 -0
- package/dist/templates/documents/technical-guide.docx.json +178 -0
- package/dist/templates/themes/corporate.docx.theme.json +118 -0
- package/dist/templates/themes/index.d.ts +5765 -0
- package/dist/templates/themes/index.d.ts.map +1 -0
- package/dist/templates/themes/minimal.docx.theme.json +194 -0
- package/dist/templates/themes/modern.docx.theme.json +115 -0
- package/dist/themes/defaults.d.ts +1300 -0
- package/dist/themes/defaults.d.ts.map +1 -0
- package/dist/themes/json/index.d.ts +44 -0
- package/dist/themes/json/index.d.ts.map +1 -0
- package/dist/themes/json/loader.d.ts +26 -0
- package/dist/themes/json/loader.d.ts.map +1 -0
- package/dist/themes/json/parser.d.ts +25 -0
- package/dist/themes/json/parser.d.ts.map +1 -0
- package/dist/themes/json/validator.d.ts +35 -0
- package/dist/themes/json/validator.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/index.d.ts +158 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +67 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/utils/alignmentUtils.d.ts +10 -0
- package/dist/utils/alignmentUtils.d.ts.map +1 -0
- package/dist/utils/bookmarkRegistry.d.ts +49 -0
- package/dist/utils/bookmarkRegistry.d.ts.map +1 -0
- package/dist/utils/docxImagePositioning.d.ts +18 -0
- package/dist/utils/docxImagePositioning.d.ts.map +1 -0
- package/dist/utils/environment.d.ts +14 -0
- package/dist/utils/environment.d.ts.map +1 -0
- package/dist/utils/exampleRunner.d.ts +17 -0
- package/dist/utils/exampleRunner.d.ts.map +1 -0
- package/dist/utils/fixFloatingImageIds.d.ts +18 -0
- package/dist/utils/fixFloatingImageIds.d.ts.map +1 -0
- package/dist/utils/formatters.d.ts +2 -0
- package/dist/utils/formatters.d.ts.map +1 -0
- package/dist/utils/imageUtils.d.ts +84 -0
- package/dist/utils/imageUtils.d.ts.map +1 -0
- package/dist/utils/numberingConfig.d.ts +84 -0
- package/dist/utils/numberingConfig.d.ts.map +1 -0
- package/dist/utils/placeholderImage.d.ts +31 -0
- package/dist/utils/placeholderImage.d.ts.map +1 -0
- package/dist/utils/placeholderProcessor.d.ts +58 -0
- package/dist/utils/placeholderProcessor.d.ts.map +1 -0
- package/dist/utils/textParser.d.ts +35 -0
- package/dist/utils/textParser.d.ts.map +1 -0
- package/dist/utils/unicode.d.ts +6 -0
- package/dist/utils/unicode.d.ts.map +1 -0
- package/dist/utils/warningsDocument.d.ts +17 -0
- package/dist/utils/warningsDocument.d.ts.map +1 -0
- package/dist/utils/widthUtils.d.ts +27 -0
- package/dist/utils/widthUtils.d.ts.map +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cell utilities for building table cell configurations
|
|
3
|
+
*/
|
|
4
|
+
import { Paragraph, Table } from 'docx';
|
|
5
|
+
import { ThemeConfig } from '../index';
|
|
6
|
+
import { BordersConfig } from './borderUtils';
|
|
7
|
+
/**
|
|
8
|
+
* Padding configuration for all four sides
|
|
9
|
+
*/
|
|
10
|
+
export interface PaddingConfig {
|
|
11
|
+
top?: number;
|
|
12
|
+
right?: number;
|
|
13
|
+
bottom?: number;
|
|
14
|
+
left?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Shading configuration
|
|
18
|
+
*/
|
|
19
|
+
export interface ShadingConfig {
|
|
20
|
+
fill?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Complete cell style configuration
|
|
24
|
+
*/
|
|
25
|
+
export interface CellStyleConfig {
|
|
26
|
+
padding?: PaddingConfig;
|
|
27
|
+
border?: BordersConfig;
|
|
28
|
+
shading?: ShadingConfig;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Builds cell options object for TableCell constructor
|
|
32
|
+
* Handles margins (padding), shading, and borders consistently
|
|
33
|
+
* @param children - Child elements to include in the cell
|
|
34
|
+
* @param styleCfg - Style configuration for the cell
|
|
35
|
+
* @param theme - Theme configuration for color resolution
|
|
36
|
+
* @returns Cell options object ready for TableCell constructor
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildCellOptions(children: (Paragraph | Table)[], styleCfg: CellStyleConfig | undefined, theme: ThemeConfig): {
|
|
39
|
+
children: (Paragraph | Table)[];
|
|
40
|
+
margins: {
|
|
41
|
+
top: number;
|
|
42
|
+
right: number;
|
|
43
|
+
bottom: number;
|
|
44
|
+
left: number;
|
|
45
|
+
};
|
|
46
|
+
shading?: {
|
|
47
|
+
fill: string;
|
|
48
|
+
};
|
|
49
|
+
borders?: Record<string, {
|
|
50
|
+
style: any;
|
|
51
|
+
size: number;
|
|
52
|
+
color: string;
|
|
53
|
+
}>;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=cellUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cellUtils.d.ts","sourceRoot":"","sources":["../../../src/styles/utils/cellUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAGxC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAkB,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,CAAC,SAAS,GAAG,KAAK,CAAC,EAAE,EAC/B,QAAQ,EAAE,eAAe,GAAG,SAAS,EACrC,KAAK,EAAE,WAAW,GACjB;IACD,QAAQ,EAAE,CAAC,SAAS,GAAG,KAAK,CAAC,EAAE,CAAC;IAChC,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,GAAG,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACvE,CA6BA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ThemeConfig } from '../index';
|
|
2
|
+
import { getThemeColors } from '../../themes/defaults';
|
|
3
|
+
export type ColorName = keyof ReturnType<typeof getThemeColors>;
|
|
4
|
+
export type ValidColorName = 'primary' | 'secondary' | 'accent' | 'text' | 'background' | 'textPrimary' | 'textSecondary' | 'textMuted' | 'borderPrimary' | 'borderSecondary' | 'backgroundPrimary' | 'backgroundSecondary';
|
|
5
|
+
export type ColorValue = string;
|
|
6
|
+
/**
|
|
7
|
+
* Resolves a color value, which can be either a hex color string or a color name reference
|
|
8
|
+
* @param colorValue - Either a hex color (e.g., '#000000') or a color name (e.g., 'primary')
|
|
9
|
+
* @param theme - The theme configuration containing color definitions
|
|
10
|
+
* @returns The resolved hex color value (6-character hex without #)
|
|
11
|
+
* @throws Error if the color value is invalid
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveColor(colorValue: ColorValue, theme: ThemeConfig): string;
|
|
14
|
+
/**
|
|
15
|
+
* Validates if a color name exists in the theme
|
|
16
|
+
* @param colorName - The color name to validate
|
|
17
|
+
* @param theme - The theme configuration
|
|
18
|
+
* @returns True if the color name exists in the theme
|
|
19
|
+
*/
|
|
20
|
+
export declare function isValidColorName(colorName: string, theme: ThemeConfig): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Gets all available color names from a theme
|
|
23
|
+
* @param theme - The theme configuration
|
|
24
|
+
* @returns Array of valid color names
|
|
25
|
+
*/
|
|
26
|
+
export declare function getAvailableColorNames(theme: ThemeConfig): string[];
|
|
27
|
+
//# sourceMappingURL=colorUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colorUtils.d.ts","sourceRoot":"","sources":["../../../src/styles/utils/colorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAGhE,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,WAAW,GACX,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,aAAa,GACb,eAAe,GACf,WAAW,GACX,eAAe,GACf,iBAAiB,GACjB,mBAAmB,GACnB,qBAAqB,CAAC;AAG1B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,WAAW,GACjB,MAAM,CAyBR;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,WAAW,GACjB,OAAO,CAGT;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,EAAE,CAGnE"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component Default Resolution System
|
|
3
|
+
* Provides theme-based default configurations for components
|
|
4
|
+
*/
|
|
5
|
+
import { ThemeConfig, ComponentDefaults, HeadingComponentDefaults, ParagraphComponentDefaults, ImageComponentDefaults, StatisticComponentDefaults, TableComponentDefaults, SectionComponentDefaults, ColumnsComponentDefaults, ListComponentDefaults } from '../index';
|
|
6
|
+
import { HeadingProps, ParagraphProps, ImageProps, StatisticProps, TableProps, SectionProps, ColumnsProps, ListProps } from '../../types';
|
|
7
|
+
/**
|
|
8
|
+
* Get component defaults from theme configuration
|
|
9
|
+
*/
|
|
10
|
+
export declare function getComponentDefaults(theme: ThemeConfig): ComponentDefaults;
|
|
11
|
+
/**
|
|
12
|
+
* Get default configuration for heading components
|
|
13
|
+
*/
|
|
14
|
+
export declare function getHeadingDefaults(theme: ThemeConfig): HeadingComponentDefaults;
|
|
15
|
+
/**
|
|
16
|
+
* Get level-specific heading defaults from theme styles
|
|
17
|
+
*/
|
|
18
|
+
export declare function getHeadingDefaultsForLevel(theme: ThemeConfig, level: number): Partial<HeadingComponentDefaults>;
|
|
19
|
+
/**
|
|
20
|
+
* Get default configuration for text components
|
|
21
|
+
*/
|
|
22
|
+
export declare function getTextDefaults(theme: ThemeConfig): ParagraphComponentDefaults;
|
|
23
|
+
/**
|
|
24
|
+
* Get default configuration for image components
|
|
25
|
+
*/
|
|
26
|
+
export declare function getImageDefaults(theme: ThemeConfig): ImageComponentDefaults;
|
|
27
|
+
/**
|
|
28
|
+
* Get default configuration for statistic components
|
|
29
|
+
*/
|
|
30
|
+
export declare function getStatisticDefaults(theme: ThemeConfig): StatisticComponentDefaults;
|
|
31
|
+
/**
|
|
32
|
+
* Get default configuration for table components
|
|
33
|
+
*/
|
|
34
|
+
export declare function getTableDefaults(theme: ThemeConfig): TableComponentDefaults;
|
|
35
|
+
/**
|
|
36
|
+
* Get default configuration for section components
|
|
37
|
+
*/
|
|
38
|
+
export declare function getSectionDefaults(theme: ThemeConfig): SectionComponentDefaults;
|
|
39
|
+
/**
|
|
40
|
+
* Get default configuration for columns components
|
|
41
|
+
*/
|
|
42
|
+
export declare function getColumnsDefaults(theme: ThemeConfig): ColumnsComponentDefaults;
|
|
43
|
+
/**
|
|
44
|
+
* Get default configuration for list components
|
|
45
|
+
*/
|
|
46
|
+
export declare function getListDefaults(theme: ThemeConfig): ListComponentDefaults;
|
|
47
|
+
/**
|
|
48
|
+
* Merge theme defaults with user-provided configuration
|
|
49
|
+
* User config takes precedence over theme defaults
|
|
50
|
+
* Uses deep merge to preserve nested objects like floating configuration
|
|
51
|
+
*/
|
|
52
|
+
export declare function mergeWithDefaults<T>(userConfig: T, themeDefaults: Partial<T>): T;
|
|
53
|
+
/**
|
|
54
|
+
* Resolve heading component props with theme defaults
|
|
55
|
+
*/
|
|
56
|
+
export declare function resolveHeadingProps(props: HeadingProps, theme: ThemeConfig): HeadingProps;
|
|
57
|
+
/**
|
|
58
|
+
* Resolve paragraph component props with theme defaults
|
|
59
|
+
*/
|
|
60
|
+
export declare function resolveParagraphProps(props: ParagraphProps, theme: ThemeConfig): ParagraphProps;
|
|
61
|
+
/**
|
|
62
|
+
* Resolve image component props with theme defaults
|
|
63
|
+
*/
|
|
64
|
+
export declare function resolveImageProps(props: ImageProps, theme: ThemeConfig): ImageProps;
|
|
65
|
+
/**
|
|
66
|
+
* Resolve statistic component props with theme defaults
|
|
67
|
+
*/
|
|
68
|
+
export declare function resolveStatisticProps(props: StatisticProps, theme: ThemeConfig): StatisticProps;
|
|
69
|
+
/**
|
|
70
|
+
* Resolve table component props with theme defaults
|
|
71
|
+
*/
|
|
72
|
+
export declare function resolveTableProps(props: TableProps, theme: ThemeConfig): TableProps;
|
|
73
|
+
/**
|
|
74
|
+
* Resolve section component props with theme defaults
|
|
75
|
+
*/
|
|
76
|
+
export declare function resolveSectionProps(props: SectionProps, theme: ThemeConfig): SectionProps;
|
|
77
|
+
/**
|
|
78
|
+
* Resolve columns component props with theme defaults
|
|
79
|
+
*/
|
|
80
|
+
export declare function resolveColumnsProps(props: ColumnsProps, theme: ThemeConfig): ColumnsProps;
|
|
81
|
+
/**
|
|
82
|
+
* Resolve list component props with theme defaults
|
|
83
|
+
*/
|
|
84
|
+
export declare function resolveListProps(props: ListProps, theme: ThemeConfig): ListProps;
|
|
85
|
+
/**
|
|
86
|
+
* Resolve highcharts component props with theme defaults
|
|
87
|
+
*/
|
|
88
|
+
export declare function resolveHighchartsProps(props: import('@json-to-office/shared-docx').HighchartsProps, _theme: ThemeConfig): import('@json-to-office/shared-docx').HighchartsProps;
|
|
89
|
+
/**
|
|
90
|
+
* Get default configuration for custom components
|
|
91
|
+
*/
|
|
92
|
+
export declare function getCustomComponentDefaults(theme: ThemeConfig, componentName: string): Record<string, unknown>;
|
|
93
|
+
/**
|
|
94
|
+
* Resolve custom component props with theme defaults
|
|
95
|
+
*/
|
|
96
|
+
export declare function resolveCustomComponentProps<T extends Record<string, unknown>>(props: T, theme: ThemeConfig, componentName: string): T;
|
|
97
|
+
//# sourceMappingURL=componentDefaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentDefaults.d.ts","sourceRoot":"","sources":["../../../src/styles/utils/componentDefaults.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ThemeConfig } from '../index';
|
|
2
|
+
/**
|
|
3
|
+
* Get table style configuration
|
|
4
|
+
* @param theme - Theme configuration object
|
|
5
|
+
* @param themeName - Name of the theme (for fallback to built-in themes)
|
|
6
|
+
* @returns Table style configuration object
|
|
7
|
+
*/
|
|
8
|
+
export declare const getTableStyle: (theme?: ThemeConfig, themeName?: string) => {
|
|
9
|
+
tableHeader: {
|
|
10
|
+
fill: string;
|
|
11
|
+
color: string;
|
|
12
|
+
bold: boolean;
|
|
13
|
+
size: number;
|
|
14
|
+
font: string;
|
|
15
|
+
};
|
|
16
|
+
tableCell: {
|
|
17
|
+
color: string;
|
|
18
|
+
size: number;
|
|
19
|
+
font: string;
|
|
20
|
+
};
|
|
21
|
+
alternatingRow: {
|
|
22
|
+
fill: string;
|
|
23
|
+
};
|
|
24
|
+
borders: {
|
|
25
|
+
top: {
|
|
26
|
+
style: "single";
|
|
27
|
+
size: number;
|
|
28
|
+
color: string;
|
|
29
|
+
};
|
|
30
|
+
bottom: {
|
|
31
|
+
style: "single";
|
|
32
|
+
size: number;
|
|
33
|
+
color: string;
|
|
34
|
+
};
|
|
35
|
+
left: {
|
|
36
|
+
style: "single";
|
|
37
|
+
size: number;
|
|
38
|
+
color: string;
|
|
39
|
+
};
|
|
40
|
+
right: {
|
|
41
|
+
style: "single";
|
|
42
|
+
size: number;
|
|
43
|
+
color: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Get document margins configuration
|
|
49
|
+
* @param theme - Theme configuration object
|
|
50
|
+
* @param themeName - Name of the theme (for fallback to built-in themes)
|
|
51
|
+
* @returns Document margins object
|
|
52
|
+
*/
|
|
53
|
+
export declare const getDocumentMargins: (theme?: ThemeConfig, themeName?: string) => {
|
|
54
|
+
left: number;
|
|
55
|
+
top: number;
|
|
56
|
+
bottom: number;
|
|
57
|
+
right: number;
|
|
58
|
+
header: number;
|
|
59
|
+
footer: number;
|
|
60
|
+
gutter: number;
|
|
61
|
+
} | {
|
|
62
|
+
top: number;
|
|
63
|
+
right: number;
|
|
64
|
+
bottom: number;
|
|
65
|
+
left: number;
|
|
66
|
+
header: number;
|
|
67
|
+
footer: number;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Get page setup configuration
|
|
71
|
+
* @param theme - Theme configuration object
|
|
72
|
+
* @param themeName - Name of the theme (for fallback to built-in themes)
|
|
73
|
+
* @returns Page setup object
|
|
74
|
+
*/
|
|
75
|
+
export declare const getPageSetup: (theme?: ThemeConfig, themeName?: string) => {
|
|
76
|
+
size: {
|
|
77
|
+
width: number;
|
|
78
|
+
height: number;
|
|
79
|
+
};
|
|
80
|
+
margin: {
|
|
81
|
+
top: number;
|
|
82
|
+
right: number;
|
|
83
|
+
bottom: number;
|
|
84
|
+
left: number;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=layoutUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layoutUtils.d.ts","sourceRoot":"","sources":["../../../src/styles/utils/layoutUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AA0BvC;;;;;GAKG;AACH,eAAO,MAAM,aAAa,WAAY,WAAW,cAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGpE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,WAAY,WAAW,cAAc,MAAM;;;;;;;;;;;;;;;CAgBzE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,WAAY,WAAW,cAAc,MAAM;;;;;;;;;;;CAkCnE,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ThemeConfig } from '../index';
|
|
2
|
+
import { LineSpacing } from '@json-to-office/shared-docx';
|
|
3
|
+
import { ISpacingProperties } from 'docx';
|
|
4
|
+
/**
|
|
5
|
+
* Convert points to twips for docx spacing
|
|
6
|
+
* @param points - Value in points
|
|
7
|
+
* @returns Value in twips (1/20 of a point)
|
|
8
|
+
*/
|
|
9
|
+
export declare function pointsToTwips(points: number): number;
|
|
10
|
+
/**
|
|
11
|
+
* Resolve theme configuration from either a theme object or theme name
|
|
12
|
+
* @param theme - Theme configuration object (for custom themes)
|
|
13
|
+
* @param themeName - Theme name (for built-in themes)
|
|
14
|
+
* @returns Resolved theme configuration
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveTheme(theme?: ThemeConfig, themeName?: string): ThemeConfig | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Resolve font family from font reference (e.g., 'body', 'heading') to actual font family name
|
|
19
|
+
* @param theme - Theme configuration object
|
|
20
|
+
* @param fontRef - Font reference ('body', 'heading', 'mono', 'light') or undefined
|
|
21
|
+
* @returns Actual font family name (e.g., 'Arial', 'Helvetica')
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveFontFamily(theme: ThemeConfig, fontRef?: 'heading' | 'body' | 'mono' | 'light'): string;
|
|
24
|
+
/**
|
|
25
|
+
* Resolve font size from font reference (e.g., 'body', 'heading') to actual font size in points
|
|
26
|
+
* @param theme - Theme configuration object
|
|
27
|
+
* @param fontRef - Font reference ('body', 'heading', 'mono', 'light') or undefined
|
|
28
|
+
* @returns Font size in points (callers multiply by 2 for docx) or undefined if no size found
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveFontSize(theme: ThemeConfig, fontRef?: 'heading' | 'body' | 'mono' | 'light'): number | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Font properties that can be defined in font definitions
|
|
33
|
+
*/
|
|
34
|
+
export interface FontProperties {
|
|
35
|
+
family?: string;
|
|
36
|
+
size?: number;
|
|
37
|
+
color?: string;
|
|
38
|
+
bold?: boolean;
|
|
39
|
+
italic?: boolean;
|
|
40
|
+
underline?: boolean;
|
|
41
|
+
alignment?: 'left' | 'center' | 'right' | 'justify';
|
|
42
|
+
lineSpacing?: {
|
|
43
|
+
type: 'single' | 'atLeast' | 'exactly' | 'double' | 'multiple';
|
|
44
|
+
value?: number;
|
|
45
|
+
};
|
|
46
|
+
spacing?: {
|
|
47
|
+
before?: number;
|
|
48
|
+
after?: number;
|
|
49
|
+
};
|
|
50
|
+
characterSpacing?: {
|
|
51
|
+
type: 'condensed' | 'expanded';
|
|
52
|
+
value: number;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Resolve all font properties from font reference.
|
|
57
|
+
* Returns all formatting properties defined in the font definition.
|
|
58
|
+
* @param theme - Theme configuration object
|
|
59
|
+
* @param fontRef - Font reference ('body', 'heading', 'mono', 'light') or undefined
|
|
60
|
+
* @returns Object containing all font properties
|
|
61
|
+
*/
|
|
62
|
+
export declare function resolveFontProperties(theme: ThemeConfig, fontRef?: 'heading' | 'body' | 'mono' | 'light'): FontProperties;
|
|
63
|
+
/**
|
|
64
|
+
* Merge font properties with style overrides.
|
|
65
|
+
* Style properties take precedence over font properties.
|
|
66
|
+
* Only defined (non-undefined) style properties override font properties.
|
|
67
|
+
* @param fontProps - Properties from font definition
|
|
68
|
+
* @param styleOverrides - Properties from style definition
|
|
69
|
+
* @returns Merged properties object
|
|
70
|
+
*/
|
|
71
|
+
export declare function mergeFontAndStyleProperties<T extends Partial<FontProperties>>(fontProps: FontProperties, styleOverrides: T): FontProperties & T;
|
|
72
|
+
/**
|
|
73
|
+
* Get body text style configuration
|
|
74
|
+
* @param theme - Theme configuration object
|
|
75
|
+
* @param themeName - Name of the theme (for fallback to built-in themes)
|
|
76
|
+
* @returns Style configuration object
|
|
77
|
+
*/
|
|
78
|
+
export declare const getBodyTextStyle: (theme?: ThemeConfig, themeName?: string) => {
|
|
79
|
+
size: number;
|
|
80
|
+
font: string;
|
|
81
|
+
color: string;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Converts line spacing from theme definition to DOCX spacing options.
|
|
85
|
+
* DOCX uses twips (1/20th of a point) for line spacing.
|
|
86
|
+
* @param lineSpacing The line spacing object from the theme definition.
|
|
87
|
+
* @returns IParagraphSpacingOptions for docx.
|
|
88
|
+
*/
|
|
89
|
+
export declare function convertLineSpacing(lineSpacing?: LineSpacing | number): ISpacingProperties | undefined;
|
|
90
|
+
//# sourceMappingURL=styleHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleHelpers.d.ts","sourceRoot":"","sources":["../../../src/styles/utils/styleHelpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAS1C;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,KAAK,CAAC,EAAE,WAAW,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,WAAW,GAAG,SAAS,CAazB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,WAAW,EAClB,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAC9C,MAAM,CASR;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,WAAW,EAClB,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAC9C,MAAM,GAAG,SAAS,CASpB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IACpD,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;QAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,WAAW,GAAG,UAAU,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACtE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,WAAW,EAClB,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAC9C,cAAc,CA0BhB;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,OAAO,CAAC,cAAc,CAAC,EAC3E,SAAS,EAAE,cAAc,EACzB,cAAc,EAAE,CAAC,GAChB,cAAc,GAAG,CAAC,CAgBpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,WAAY,WAAW,cAAc,MAAM;;;;CAoBvE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,CAAC,EAAE,WAAW,GAAG,MAAM,GACjC,kBAAkB,GAAG,SAAS,CA4ChC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Examples registry - JSON-based examples
|
|
3
|
+
* This file provides a unified interface to the JSON examples system
|
|
4
|
+
*/
|
|
5
|
+
import { ComponentDefinition } from '@json-to-office/shared-docx';
|
|
6
|
+
/**
|
|
7
|
+
* Load a JSON example by name
|
|
8
|
+
*/
|
|
9
|
+
export declare function loadJsonExample(name: string): ComponentDefinition;
|
|
10
|
+
/**
|
|
11
|
+
* Get list of available JSON examples
|
|
12
|
+
*/
|
|
13
|
+
export declare function getAvailableJsonExamples(): string[];
|
|
14
|
+
/**
|
|
15
|
+
* Example descriptions for documentation
|
|
16
|
+
*/
|
|
17
|
+
export declare const EXAMPLE_DESCRIPTIONS: Record<string, string>;
|
|
18
|
+
export declare const examples: Record<string, ComponentDefinition>;
|
|
19
|
+
/**
|
|
20
|
+
* Get example definition by name
|
|
21
|
+
*/
|
|
22
|
+
export declare const getExample: (exampleName: string) => ComponentDefinition | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Get all available example names
|
|
25
|
+
*/
|
|
26
|
+
export declare const getExampleNames: () => string[];
|
|
27
|
+
export declare const quarterlyReportExample: () => ComponentDefinition;
|
|
28
|
+
export declare const technicalGuideExample: () => ComponentDefinition;
|
|
29
|
+
export declare const proposalExample: () => ComponentDefinition;
|
|
30
|
+
/**
|
|
31
|
+
* Print usage information
|
|
32
|
+
*/
|
|
33
|
+
export declare function printExampleUsage(): void;
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/documents/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAiBlE;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAkBjE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,CAenD;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOvD,CAAC;AAQF,eAAO,MAAM,QAAQ,qCAmBnB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU,gBACR,MAAM,KAClB,mBAAmB,GAAG,SAExB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,QAAO,MAAM,EAExC,CAAC;AAGF,eAAO,MAAM,sBAAsB,2BAA4C,CAAC;AAChF,eAAO,MAAM,qBAAqB,2BAA2C,CAAC;AAC9E,eAAO,MAAM,eAAe,2BAAoC,CAAC;AAEjE;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAuBxC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "docx",
|
|
3
|
+
"props": {
|
|
4
|
+
"metadata": { "title": "Cloud Migration Proposal" },
|
|
5
|
+
"theme": "modern"
|
|
6
|
+
},
|
|
7
|
+
"children": [
|
|
8
|
+
{
|
|
9
|
+
"name": "header",
|
|
10
|
+
"props": {
|
|
11
|
+
"text": "Proposal — Confidential",
|
|
12
|
+
"alignment": "right"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "footer",
|
|
17
|
+
"props": {
|
|
18
|
+
"text": "Apex Consulting",
|
|
19
|
+
"alignment": "left",
|
|
20
|
+
"showPageNumbers": true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "section",
|
|
25
|
+
"props": { "level": 1 },
|
|
26
|
+
"children": [
|
|
27
|
+
{ "name": "heading", "props": { "text": "Cloud Migration Proposal", "level": 1 } },
|
|
28
|
+
{ "name": "heading", "props": { "text": "Prepared for Meridian Financial Group", "level": 2 } },
|
|
29
|
+
{ "name": "paragraph", "props": { "text": "Prepared by Apex Consulting — March 2025" } },
|
|
30
|
+
{ "name": "paragraph", "props": { "text": "This proposal outlines a phased approach to migrate Meridian Financial Group's on-premise infrastructure to a cloud-native architecture. The migration will reduce operational costs by 40%, improve system reliability to 99.99% uptime, and enable rapid scaling for future growth." } }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "section",
|
|
35
|
+
"props": { "level": 1, "pageBreak": true },
|
|
36
|
+
"children": [
|
|
37
|
+
{ "name": "heading", "props": { "text": "Current State Assessment", "level": 1 } },
|
|
38
|
+
{ "name": "paragraph", "props": { "text": "Meridian's current infrastructure presents several challenges that limit business agility and increase operational risk:" } },
|
|
39
|
+
{
|
|
40
|
+
"name": "columns",
|
|
41
|
+
"props": { "columns": 2, "gap": 0.5 },
|
|
42
|
+
"children": [
|
|
43
|
+
{
|
|
44
|
+
"name": "statistic",
|
|
45
|
+
"props": { "number": "87%", "description": "Server Utilization", "trendValue": "Critical capacity" }
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "statistic",
|
|
49
|
+
"props": { "number": "23 hrs", "description": "Monthly Downtime", "trendValue": "Below SLA target" }
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{ "name": "heading", "props": { "text": "Infrastructure Inventory", "level": 2 } },
|
|
54
|
+
{
|
|
55
|
+
"name": "table",
|
|
56
|
+
"props": {
|
|
57
|
+
"columns": [
|
|
58
|
+
{ "header": { "content": "Component" }, "cells": [{ "content": "Application Servers" }, { "content": "Database Cluster" }, { "content": "Storage" }, { "content": "Network" }, { "content": "Disaster Recovery" }] },
|
|
59
|
+
{ "header": { "content": "Current" }, "cells": [{ "content": "12 physical" }, { "content": "3-node Oracle RAC" }, { "content": "NetApp SAN, 48TB" }, { "content": "Cisco catalyst stack" }, { "content": "Tape backup, 24hr RPO" }] },
|
|
60
|
+
{ "header": { "content": "Age" }, "cells": [{ "content": "5-7 years" }, { "content": "6 years" }, { "content": "4 years" }, { "content": "8 years" }, { "content": "N/A" }] },
|
|
61
|
+
{ "header": { "content": "Risk Level" }, "cells": [{ "content": "High" }, { "content": "Critical" }, { "content": "Medium" }, { "content": "High" }, { "content": "Critical" }] }
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{ "name": "heading", "props": { "text": "Key Pain Points", "level": 2 } },
|
|
66
|
+
{
|
|
67
|
+
"name": "list",
|
|
68
|
+
"props": {
|
|
69
|
+
"format": "decimal",
|
|
70
|
+
"items": [
|
|
71
|
+
"Hardware refresh cycle requires $2.1M capital investment every 4 years",
|
|
72
|
+
"Scaling requires 6-8 week lead time for hardware procurement",
|
|
73
|
+
"Disaster recovery tested annually — last test revealed 4-hour data gap",
|
|
74
|
+
"Security patching backlog of 47 critical vulnerabilities across end-of-life systems",
|
|
75
|
+
"Development teams blocked by shared staging environment contention"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "section",
|
|
83
|
+
"props": { "level": 1, "pageBreak": true },
|
|
84
|
+
"children": [
|
|
85
|
+
{ "name": "heading", "props": { "text": "Proposed Solution", "level": 1 } },
|
|
86
|
+
{ "name": "paragraph", "props": { "text": "We propose a three-phase migration to AWS, leveraging managed services to minimize operational burden while maximizing reliability and cost efficiency." } },
|
|
87
|
+
{ "name": "heading", "props": { "text": "Phase 1: Foundation (Weeks 1-8)", "level": 2 } },
|
|
88
|
+
{ "name": "paragraph", "props": { "text": "Establish cloud landing zone with networking, identity, security baselines, and CI/CD pipelines. Migrate non-critical workloads (dev/staging environments, internal tools) using lift-and-shift." } },
|
|
89
|
+
{ "name": "heading", "props": { "text": "Phase 2: Core Migration (Weeks 9-20)", "level": 2 } },
|
|
90
|
+
{ "name": "paragraph", "props": { "text": "Migrate production databases to Aurora PostgreSQL with zero-downtime cutover. Re-platform application servers to ECS Fargate containers. Implement auto-scaling and multi-AZ redundancy." } },
|
|
91
|
+
{ "name": "heading", "props": { "text": "Phase 3: Optimization (Weeks 21-26)", "level": 2 } },
|
|
92
|
+
{ "name": "paragraph", "props": { "text": "Right-size instances based on production metrics. Enable reserved capacity purchasing for predictable workloads. Implement cloud-native monitoring, alerting, and automated remediation." } }
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "section",
|
|
97
|
+
"props": { "level": 1, "pageBreak": true },
|
|
98
|
+
"children": [
|
|
99
|
+
{ "name": "heading", "props": { "text": "Investment & ROI", "level": 1 } },
|
|
100
|
+
{
|
|
101
|
+
"name": "columns",
|
|
102
|
+
"props": { "columns": 3 },
|
|
103
|
+
"children": [
|
|
104
|
+
{ "name": "statistic", "props": { "number": "$680K", "description": "Migration Cost", "trendValue": "One-time investment" } },
|
|
105
|
+
{ "name": "statistic", "props": { "number": "$1.2M/yr", "description": "Annual Savings", "trendValue": "vs. current spend" } },
|
|
106
|
+
{ "name": "statistic", "props": { "number": "7 months", "description": "Payback Period", "trendValue": "Full ROI" } }
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
{ "name": "heading", "props": { "text": "Cost Breakdown", "level": 2 } },
|
|
110
|
+
{
|
|
111
|
+
"name": "table",
|
|
112
|
+
"props": {
|
|
113
|
+
"columns": [
|
|
114
|
+
{ "header": { "content": "Phase" }, "cells": [{ "content": "Foundation" }, { "content": "Core Migration" }, { "content": "Optimization" }] },
|
|
115
|
+
{ "header": { "content": "Duration" }, "cells": [{ "content": "8 weeks" }, { "content": "12 weeks" }, { "content": "6 weeks" }] },
|
|
116
|
+
{ "header": { "content": "Cost" }, "cells": [{ "content": "$180K" }, { "content": "$380K" }, { "content": "$120K" }] },
|
|
117
|
+
{ "header": { "content": "Description" }, "cells": [{ "content": "Landing zone, security, CI/CD, dev migration" }, { "content": "Database, application, and storage migration" }, { "content": "Right-sizing, monitoring, knowledge transfer" }] }
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{ "name": "heading", "props": { "text": "Annual Cost Comparison", "level": 2 } },
|
|
122
|
+
{
|
|
123
|
+
"name": "columns",
|
|
124
|
+
"props": { "columns": 2, "gap": 0.5 },
|
|
125
|
+
"children": [
|
|
126
|
+
{
|
|
127
|
+
"name": "table",
|
|
128
|
+
"props": {
|
|
129
|
+
"columns": [
|
|
130
|
+
{ "header": { "content": "Current (On-Premise)" }, "cells": [{ "content": "Hardware depreciation" }, { "content": "Data center lease" }, { "content": "Ops staff (3 FTE)" }, { "content": "Licensing (Oracle, VMware)" }, { "content": "Total" }] },
|
|
131
|
+
{ "header": { "content": "Annual Cost" }, "cells": [{ "content": "$525K" }, { "content": "$240K" }, { "content": "$420K" }, { "content": "$310K" }, { "content": "$1,495K" }] }
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "table",
|
|
137
|
+
"props": {
|
|
138
|
+
"columns": [
|
|
139
|
+
{ "header": { "content": "Proposed (Cloud)" }, "cells": [{ "content": "AWS compute & storage" }, { "content": "Managed services" }, { "content": "Ops staff (1 FTE)" }, { "content": "Licensing (open source)" }, { "content": "Total" }] },
|
|
140
|
+
{ "header": { "content": "Annual Cost" }, "cells": [{ "content": "$165K" }, { "content": "$48K" }, { "content": "$140K" }, { "content": "$0" }, { "content": "$353K" }] }
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "section",
|
|
150
|
+
"props": { "level": 1, "pageBreak": true },
|
|
151
|
+
"children": [
|
|
152
|
+
{ "name": "heading", "props": { "text": "Next Steps", "level": 1 } },
|
|
153
|
+
{ "name": "paragraph", "props": { "text": "We recommend scheduling a 2-week discovery sprint to validate assumptions, finalize the migration plan, and establish the project governance framework." } },
|
|
154
|
+
{
|
|
155
|
+
"name": "list",
|
|
156
|
+
"props": {
|
|
157
|
+
"format": "decimal",
|
|
158
|
+
"items": [
|
|
159
|
+
"Sign statement of work and NDA",
|
|
160
|
+
"Complete infrastructure audit and dependency mapping (Week 1-2)",
|
|
161
|
+
"Finalize migration runbook with rollback procedures (Week 2)",
|
|
162
|
+
"Establish joint project team and communication cadence",
|
|
163
|
+
"Begin Phase 1 execution"
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{ "name": "paragraph", "props": { "text": "For questions, contact: solutions@apexconsulting.io" } }
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|