@json-to-office/shared-docx 0.3.0 → 0.6.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/{chunk-YNBTESFN.js → chunk-22VYYAC2.js} +4 -8
- package/dist/chunk-22VYYAC2.js.map +1 -0
- package/dist/{chunk-S4EFGCIC.js → chunk-6SLVQATI.js} +2 -2
- package/dist/{chunk-EDYWA2KA.js → chunk-ABVYMFDA.js} +2 -2
- package/dist/{chunk-F5LVWDTY.js → chunk-JOXJOD2C.js} +6 -1
- package/dist/chunk-JOXJOD2C.js.map +1 -0
- package/dist/{chunk-DEIEJUY4.js → chunk-L5TZFC47.js} +16 -10
- package/dist/chunk-L5TZFC47.js.map +1 -0
- package/dist/{chunk-GGNGVIZO.js → chunk-OE5JFL7S.js} +5 -17
- package/dist/chunk-OE5JFL7S.js.map +1 -0
- package/dist/{chunk-3D6HY6AC.js → chunk-PN6JT3KF.js} +236 -284
- package/dist/chunk-PN6JT3KF.js.map +1 -0
- package/dist/{chunk-WJA5TGNI.js → chunk-SK6LSPFN.js} +2 -2
- package/dist/{chunk-AMVS7BRX.js → chunk-V4L4S6ZS.js} +2 -10
- package/dist/{chunk-AMVS7BRX.js.map → chunk-V4L4S6ZS.js.map} +1 -1
- package/dist/{chunk-CVI7GFWX.js → chunk-YQECZGRR.js} +2 -2
- package/dist/chunk-YQECZGRR.js.map +1 -0
- package/dist/index.d.ts +14 -62
- package/dist/index.js +10 -30
- package/dist/index.js.map +1 -1
- package/dist/schemas/api.js +4 -4
- package/dist/schemas/component-registry.js +2 -2
- package/dist/schemas/components.d.ts +21 -48
- package/dist/schemas/components.js +3 -7
- package/dist/schemas/document.js +5 -5
- package/dist/schemas/export.js +3 -3
- package/dist/schemas/font.d.ts +3 -1
- package/dist/schemas/font.js +3 -1
- package/dist/schemas/generator.js +3 -3
- package/dist/schemas/theme.d.ts +24 -24
- package/dist/schemas/theme.js +4 -4
- package/dist/validation/unified/index.d.ts +14 -35
- package/dist/validation/unified/index.js +6 -10
- package/package.json +1 -1
- package/dist/chunk-3D6HY6AC.js.map +0 -1
- package/dist/chunk-CVI7GFWX.js.map +0 -1
- package/dist/chunk-DEIEJUY4.js.map +0 -1
- package/dist/chunk-F5LVWDTY.js.map +0 -1
- package/dist/chunk-GGNGVIZO.js.map +0 -1
- package/dist/chunk-YNBTESFN.js.map +0 -1
- /package/dist/{chunk-S4EFGCIC.js.map → chunk-6SLVQATI.js.map} +0 -0
- /package/dist/{chunk-EDYWA2KA.js.map → chunk-ABVYMFDA.js.map} +0 -0
- /package/dist/{chunk-WJA5TGNI.js.map → chunk-SK6LSPFN.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ import { DocumentValidationResult, ValidationError } from './schemas/document.js
|
|
|
3
3
|
export { JSON_SCHEMA_URLS, JsonComponentDefinitionSchema } from './schemas/document.js';
|
|
4
4
|
export { ColumnsComponentDefaults, ComponentDefaults, DocumentMargins, FontDefinition, Fonts, HeadingComponentDefaults, HeadingDefinition, ImageComponentDefaults, ListComponentDefaults, Page, PageDimensions, ParagraphComponentDefaults, SectionComponentDefaults, StatisticComponentDefaults, StyleDefinitions, TableComponentDefaults, ThemeConfigJson, ThemeConfigSchema, isValidThemeConfig } from './schemas/theme.js';
|
|
5
5
|
export { GenerateDocumentRequest, GenerateDocumentRequestSchema, GenerateDocumentResponse, GenerateDocumentResponseSchema, ValidateDocumentRequest, ValidateDocumentRequestSchema, ValidateDocumentResponse, ValidateDocumentResponseSchema } from './schemas/api.js';
|
|
6
|
-
import { ComponentDefinition as ComponentDefinition$1, ComponentDefinitionSchema, ColumnsPropsSchema, ReportPropsSchema, SectionPropsSchema, HeadingPropsSchema, ParagraphPropsSchema, TextBoxPropsSchema, ImagePropsSchema, HighchartsPropsSchema, StatisticPropsSchema, TablePropsSchema,
|
|
7
|
-
export { Alignment, AlignmentSchema, BaseComponentProps, BaseComponentPropsSchema, BorderSchema, ColumnsProps,
|
|
6
|
+
import { ComponentDefinition as ComponentDefinition$1, ComponentDefinitionSchema, ColumnsPropsSchema, ReportPropsSchema, SectionPropsSchema, HeadingPropsSchema, ParagraphPropsSchema, TextBoxPropsSchema, ImagePropsSchema, HighchartsPropsSchema, StatisticPropsSchema, TablePropsSchema, ListPropsSchema, TocPropsSchema } from './schemas/components.js';
|
|
7
|
+
export { Alignment, AlignmentSchema, BaseComponentProps, BaseComponentPropsSchema, BorderSchema, ColumnsProps, HeadingLevel, HeadingLevelSchema, HeadingProps, HighchartsProps, ImageProps, Indent, IndentSchema, JustifiedAlignment, JustifiedAlignmentSchema, LineSpacing, LineSpacingSchema, ListProps, MarginsSchema, Numbering, NumberingSchema, ParagraphProps, ReportProps, SectionProps, Spacing, SpacingSchema, StandardComponentDefinitionSchema, StatisticProps, TableProps, TextBoxProps, TocProps } from './schemas/components.js';
|
|
8
8
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
9
9
|
import { Static } from '@sinclair/typebox';
|
|
10
10
|
import { ValueError } from '@sinclair/typebox/value';
|
|
11
|
-
export { DOC_LINKS, ERROR_TEMPLATES, componentValidator, comprehensiveValidateDocument, createComponentValidator, createJsonValidator, createThemeValidator, createValidator, deepValidateDocument, getThemeName, getValidationSummary, isColumnsProps, isCustomComponentProps,
|
|
11
|
+
export { DOC_LINKS, ERROR_TEMPLATES, componentValidator, comprehensiveValidateDocument, createComponentValidator, createJsonValidator, createThemeValidator, createValidator, deepValidateDocument, getThemeName, getValidationSummary, isColumnsProps, isCustomComponentProps, isHeadingProps, isImageProps, isListProps, isParagraphProps, isReportProps, isSectionProps, isStandardComponentName, isStatisticProps, isTableProps, isThemeConfig, isValidTheme, isValidTheme as isValidThemeJson, isValidationSuccess, strictComponentValidator, strictThemeValidator, themeValidator, transformDocxValueError, transformDocxValueErrors, validate, validateAgainstSchema, validateBatch, validateComponent as validateComponentProps, validateCustomComponentProps, validateJson, validateStrict, validateTheme, validateThemeJson, validateThemeWithEnhancement, validateWithEnhancement } from './validation/unified/index.js';
|
|
12
12
|
import { TextSpaceAfterPropsSchema } from './schemas/custom-components.js';
|
|
13
13
|
export { CustomComponentDefinitionSchema, TextSpaceAfterComponentSchema, TextSpaceAfterProps } from './schemas/custom-components.js';
|
|
14
14
|
export { BASE_SCHEMA_METADATA, COMPONENT_METADATA, ComponentSchemaConfig as DocxComponentSchemaConfig, THEME_SCHEMA_METADATA, convertToJsonSchema as convertDocxToJsonSchema, createComponentSchema as createDocxComponentSchema, exportSchemaToFile as exportDocxSchemaToFile, fixSchemaReferences as fixDocxSchemaReferences } from './schemas/export.js';
|
|
@@ -316,12 +316,12 @@ declare const COMPONENT_SCHEMA_MAP: {
|
|
|
316
316
|
horizontalPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
317
317
|
relative: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"margin">, _sinclair_typebox.TLiteral<"page">, _sinclair_typebox.TLiteral<"text">]>>;
|
|
318
318
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"inside">, _sinclair_typebox.TLiteral<"outside">]>>;
|
|
319
|
-
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber
|
|
319
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
320
320
|
}>>;
|
|
321
321
|
verticalPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
322
322
|
relative: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"margin">, _sinclair_typebox.TLiteral<"page">, _sinclair_typebox.TLiteral<"text">]>>;
|
|
323
323
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"bottom">, _sinclair_typebox.TLiteral<"inside">, _sinclair_typebox.TLiteral<"outside">]>>;
|
|
324
|
-
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber
|
|
324
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
325
325
|
}>>;
|
|
326
326
|
wrap: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
327
327
|
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"around">, _sinclair_typebox.TLiteral<"none">, _sinclair_typebox.TLiteral<"notBeside">, _sinclair_typebox.TLiteral<"through">, _sinclair_typebox.TLiteral<"tight">, _sinclair_typebox.TLiteral<"auto">]>;
|
|
@@ -359,24 +359,21 @@ declare const COMPONENT_SCHEMA_MAP: {
|
|
|
359
359
|
horizontalPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
360
360
|
relative: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"character">, _sinclair_typebox.TLiteral<"column">, _sinclair_typebox.TLiteral<"margin">, _sinclair_typebox.TLiteral<"page">, _sinclair_typebox.TLiteral<"text">]>>;
|
|
361
361
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"inside">, _sinclair_typebox.TLiteral<"outside">]>>;
|
|
362
|
-
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber
|
|
362
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
363
363
|
}>>;
|
|
364
364
|
verticalPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
365
365
|
relative: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"margin">, _sinclair_typebox.TLiteral<"page">, _sinclair_typebox.TLiteral<"paragraph">, _sinclair_typebox.TLiteral<"line">, _sinclair_typebox.TLiteral<"text">]>>;
|
|
366
366
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"bottom">, _sinclair_typebox.TLiteral<"inside">, _sinclair_typebox.TLiteral<"outside">]>>;
|
|
367
|
-
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber
|
|
367
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
368
368
|
}>>;
|
|
369
369
|
wrap: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
370
370
|
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"none">, _sinclair_typebox.TLiteral<"square">, _sinclair_typebox.TLiteral<"topAndBottom">, _sinclair_typebox.TLiteral<"around">, _sinclair_typebox.TLiteral<"tight">, _sinclair_typebox.TLiteral<"through">]>;
|
|
371
371
|
side: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"bothSides">, _sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"largest">]>>;
|
|
372
372
|
margins: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
373
|
-
top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
378
|
-
left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
379
|
-
right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
373
|
+
top: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
374
|
+
bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
375
|
+
left: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
376
|
+
right: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
380
377
|
}>>;
|
|
381
378
|
}>>;
|
|
382
379
|
allowOverlap: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
@@ -405,29 +402,6 @@ declare const COMPONENT_SCHEMA_MAP: {
|
|
|
405
402
|
size: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"small">, _sinclair_typebox.TLiteral<"medium">, _sinclair_typebox.TLiteral<"large">]>>;
|
|
406
403
|
}>;
|
|
407
404
|
readonly table: _sinclair_typebox.TSchema;
|
|
408
|
-
readonly header: _sinclair_typebox.TObject<{
|
|
409
|
-
text: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
410
|
-
logo: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
411
|
-
alignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
412
|
-
position: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
413
|
-
firstPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
414
|
-
oddPages: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
415
|
-
evenPages: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
416
|
-
showPageNumbers: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
417
|
-
showDate: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
418
|
-
height: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
419
|
-
}>;
|
|
420
|
-
readonly footer: _sinclair_typebox.TObject<{
|
|
421
|
-
text: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
422
|
-
alignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
423
|
-
position: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
424
|
-
firstPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
425
|
-
oddPages: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
426
|
-
evenPages: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
427
|
-
showPageNumbers: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
428
|
-
showDate: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
429
|
-
height: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
430
|
-
}>;
|
|
431
405
|
readonly list: _sinclair_typebox.TObject<{
|
|
432
406
|
items: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
|
|
433
407
|
text: _sinclair_typebox.TString;
|
|
@@ -614,26 +588,6 @@ interface HighchartsComponent {
|
|
|
614
588
|
enabled?: boolean;
|
|
615
589
|
props: Static<typeof HighchartsPropsSchema>;
|
|
616
590
|
}
|
|
617
|
-
/**
|
|
618
|
-
* Header component with literal name discriminator
|
|
619
|
-
*/
|
|
620
|
-
interface HeaderComponent {
|
|
621
|
-
name: 'header';
|
|
622
|
-
id?: string;
|
|
623
|
-
/** When false, this component is filtered out and not rendered. Defaults to true */
|
|
624
|
-
enabled?: boolean;
|
|
625
|
-
props: Static<typeof HeaderPropsSchema>;
|
|
626
|
-
}
|
|
627
|
-
/**
|
|
628
|
-
* Footer component with literal name discriminator
|
|
629
|
-
*/
|
|
630
|
-
interface FooterComponent {
|
|
631
|
-
name: 'footer';
|
|
632
|
-
id?: string;
|
|
633
|
-
/** When false, this component is filtered out and not rendered. Defaults to true */
|
|
634
|
-
enabled?: boolean;
|
|
635
|
-
props: Static<typeof FooterPropsSchema>;
|
|
636
|
-
}
|
|
637
591
|
/**
|
|
638
592
|
* Text Box component with literal name discriminator
|
|
639
593
|
* Container for child components with floating positioning
|
|
@@ -679,12 +633,12 @@ interface TextSpaceAfterComponent {
|
|
|
679
633
|
/**
|
|
680
634
|
* Union of all standard component types
|
|
681
635
|
*/
|
|
682
|
-
type StandardComponentDefinition = ReportComponent | SectionComponent | ColumnsComponent | HeadingComponent | ParagraphComponent | TextBoxComponent | ImageComponent | HighchartsComponent | StatisticComponent | TableComponent |
|
|
636
|
+
type StandardComponentDefinition = ReportComponent | SectionComponent | ColumnsComponent | HeadingComponent | ParagraphComponent | TextBoxComponent | ImageComponent | HighchartsComponent | StatisticComponent | TableComponent | ListComponent | TocComponent;
|
|
683
637
|
/**
|
|
684
638
|
* Array of all standard component names.
|
|
685
639
|
* Useful for iterating, validation, or displaying available components to users.
|
|
686
640
|
*/
|
|
687
|
-
declare const STANDARD_COMPONENTS: readonly ["columns", "
|
|
641
|
+
declare const STANDARD_COMPONENTS: readonly ["columns", "heading", "highcharts", "image", "list", "paragraph", "docx", "section", "statistic", "table", "text-box", "toc"];
|
|
688
642
|
/**
|
|
689
643
|
* Set of all standard component names for O(1) lookup.
|
|
690
644
|
*/
|
|
@@ -723,8 +677,6 @@ declare function isImageComponent(component: ComponentDefinition): component is
|
|
|
723
677
|
declare function isTextBoxComponent(component: ComponentDefinition): component is TextBoxComponent;
|
|
724
678
|
declare function isStatisticComponent(component: ComponentDefinition): component is StatisticComponent;
|
|
725
679
|
declare function isTableComponent(component: ComponentDefinition): component is TableComponent;
|
|
726
|
-
declare function isHeaderComponent(component: ComponentDefinition): component is HeaderComponent;
|
|
727
|
-
declare function isFooterComponent(component: ComponentDefinition): component is FooterComponent;
|
|
728
680
|
declare function isListComponent(component: ComponentDefinition): component is ListComponent;
|
|
729
681
|
declare function isTocComponent(component: ComponentDefinition): component is TocComponent;
|
|
730
682
|
declare function isHighchartsComponent(component: ComponentDefinition): component is HighchartsComponent;
|
|
@@ -734,4 +686,4 @@ type ThemeName = 'minimal' | 'verizon' | 'a2a' | 'hitachi';
|
|
|
734
686
|
|
|
735
687
|
declare const SHARED_DOCX_VERSION = "1.0.0";
|
|
736
688
|
|
|
737
|
-
export { type ColumnsComponent, ColumnsPropsSchema, type ComponentDefinition, ComponentDefinitionSchema, type CoreValidationResult, ValidationError as DocumentValidationError, DocumentValidationResult, type
|
|
689
|
+
export { type ColumnsComponent, ColumnsPropsSchema, type ComponentDefinition, ComponentDefinitionSchema, type CoreValidationResult, ValidationError as DocumentValidationError, DocumentValidationResult, type FormattedError, type HeadingComponent, HeadingPropsSchema, type HighchartsComponent, HighchartsPropsSchema, type ImageComponent, ImagePropsSchema, JsonDocumentParser, JsonParsingError, JsonValidationError, type ListComponent, ListPropsSchema, type ParagraphComponent, ParagraphPropsSchema, type ReportComponent, ReportPropsSchema, SHARED_DOCX_VERSION, STANDARD_COMPONENTS, STANDARD_COMPONENTS_SET, type SectionComponent, SectionPropsSchema, type StandardComponentDefinition, type StandardComponentName, type StatisticComponent, StatisticPropsSchema, type TableComponent, TablePropsSchema, type TextBoxComponent, TextBoxPropsSchema, type TextSpaceAfterComponent, TextSpaceAfterPropsSchema, type ThemeName, type TocComponent, TocPropsSchema, createValidatedComponent, formatErrorReport, formatValidationError, formatValidationErrorStrings, formatValidationErrors, getErrorSummary, getValidationContext, getValidationErrors, hasCriticalErrors, isColumnsComponent, isHeadingComponent, isHighchartsComponent, isImageComponent, isListComponent, isParagraphComponent, isReportComponent, isSectionComponent, isStatisticComponent, isTableComponent, isTextBoxComponent, isTextSpaceAfterComponent, isTocComponent, isValidComponent, parseJsonComponent, parseJsonWithLineNumbers, safeValidateComponentDefinition, safeValidateComponentProps, transformAndValidate, validateComponent, validateComponentDefinition, validateComponents };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateUnifiedDocumentSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SK6LSPFN.js";
|
|
4
4
|
import {
|
|
5
5
|
DOC_LINKS,
|
|
6
6
|
ERROR_TEMPLATES,
|
|
@@ -10,8 +10,6 @@ import {
|
|
|
10
10
|
getThemeName,
|
|
11
11
|
isColumnsProps,
|
|
12
12
|
isCustomComponentProps,
|
|
13
|
-
isFooterProps,
|
|
14
|
-
isHeaderProps,
|
|
15
13
|
isHeadingProps,
|
|
16
14
|
isImageProps,
|
|
17
15
|
isListProps,
|
|
@@ -34,21 +32,21 @@ import {
|
|
|
34
32
|
validateTheme,
|
|
35
33
|
validateThemeJson,
|
|
36
34
|
validateThemeWithEnhancement
|
|
37
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-OE5JFL7S.js";
|
|
38
36
|
import {
|
|
39
37
|
ThemeConfigSchema,
|
|
40
38
|
isValidThemeConfig
|
|
41
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-L5TZFC47.js";
|
|
42
40
|
import {
|
|
43
41
|
GenerateDocumentRequestSchema,
|
|
44
42
|
GenerateDocumentResponseSchema,
|
|
45
43
|
ValidateDocumentRequestSchema,
|
|
46
44
|
ValidateDocumentResponseSchema
|
|
47
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-ABVYMFDA.js";
|
|
48
46
|
import {
|
|
49
47
|
JSON_SCHEMA_URLS,
|
|
50
48
|
JsonComponentDefinitionSchema
|
|
51
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-6SLVQATI.js";
|
|
52
50
|
import {
|
|
53
51
|
comprehensiveValidateDocument,
|
|
54
52
|
createDocumentValidator,
|
|
@@ -70,11 +68,11 @@ import {
|
|
|
70
68
|
validateJsonComponent,
|
|
71
69
|
validateJsonDocument,
|
|
72
70
|
validateWithEnhancement
|
|
73
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-22VYYAC2.js";
|
|
74
72
|
import {
|
|
75
73
|
ComponentDefinitionSchema,
|
|
76
74
|
StandardComponentDefinitionSchema
|
|
77
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-YQECZGRR.js";
|
|
78
76
|
import {
|
|
79
77
|
CustomComponentDefinitionSchema,
|
|
80
78
|
TextSpaceAfterComponentSchema,
|
|
@@ -88,14 +86,12 @@ import {
|
|
|
88
86
|
createComponentSchema,
|
|
89
87
|
exportSchemaToFile,
|
|
90
88
|
fixSchemaReferences
|
|
91
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-V4L4S6ZS.js";
|
|
92
90
|
import {
|
|
93
91
|
AlignmentSchema,
|
|
94
92
|
BaseComponentPropsSchema,
|
|
95
93
|
BorderSchema,
|
|
96
94
|
ColumnsPropsSchema,
|
|
97
|
-
FooterPropsSchema,
|
|
98
|
-
HeaderPropsSchema,
|
|
99
95
|
HeadingLevelSchema,
|
|
100
96
|
HeadingPropsSchema,
|
|
101
97
|
HighchartsPropsSchema,
|
|
@@ -114,8 +110,8 @@ import {
|
|
|
114
110
|
TablePropsSchema,
|
|
115
111
|
TextBoxPropsSchema,
|
|
116
112
|
TocPropsSchema
|
|
117
|
-
} from "./chunk-
|
|
118
|
-
import "./chunk-
|
|
113
|
+
} from "./chunk-PN6JT3KF.js";
|
|
114
|
+
import "./chunk-JOXJOD2C.js";
|
|
119
115
|
|
|
120
116
|
// src/index.ts
|
|
121
117
|
import {
|
|
@@ -701,8 +697,6 @@ var COMPONENT_SCHEMA_MAP = {
|
|
|
701
697
|
image: ImagePropsSchema,
|
|
702
698
|
statistic: StatisticPropsSchema,
|
|
703
699
|
table: TablePropsSchema,
|
|
704
|
-
header: HeaderPropsSchema,
|
|
705
|
-
footer: FooterPropsSchema,
|
|
706
700
|
list: ListPropsSchema
|
|
707
701
|
};
|
|
708
702
|
function validateComponent2(name, props, options) {
|
|
@@ -897,8 +891,6 @@ function isValidComponent(name, props) {
|
|
|
897
891
|
// src/types/components.ts
|
|
898
892
|
var STANDARD_COMPONENTS = [
|
|
899
893
|
"columns",
|
|
900
|
-
"footer",
|
|
901
|
-
"header",
|
|
902
894
|
"heading",
|
|
903
895
|
"highcharts",
|
|
904
896
|
"image",
|
|
@@ -939,12 +931,6 @@ function isStatisticComponent(component) {
|
|
|
939
931
|
function isTableComponent(component) {
|
|
940
932
|
return component.name === "table";
|
|
941
933
|
}
|
|
942
|
-
function isHeaderComponent(component) {
|
|
943
|
-
return component.name === "header";
|
|
944
|
-
}
|
|
945
|
-
function isFooterComponent(component) {
|
|
946
|
-
return component.name === "footer";
|
|
947
|
-
}
|
|
948
934
|
function isListComponent(component) {
|
|
949
935
|
return component.name === "list";
|
|
950
936
|
}
|
|
@@ -973,10 +959,8 @@ export {
|
|
|
973
959
|
DOC_LINKS,
|
|
974
960
|
ERROR_EMOJIS,
|
|
975
961
|
ERROR_TEMPLATES,
|
|
976
|
-
FooterPropsSchema,
|
|
977
962
|
GenerateDocumentRequestSchema,
|
|
978
963
|
GenerateDocumentResponseSchema,
|
|
979
|
-
HeaderPropsSchema,
|
|
980
964
|
HeadingLevelSchema,
|
|
981
965
|
HeadingPropsSchema,
|
|
982
966
|
HighchartsPropsSchema,
|
|
@@ -1054,10 +1038,6 @@ export {
|
|
|
1054
1038
|
isColumnsComponent,
|
|
1055
1039
|
isColumnsProps,
|
|
1056
1040
|
isCustomComponentProps,
|
|
1057
|
-
isFooterComponent,
|
|
1058
|
-
isFooterProps,
|
|
1059
|
-
isHeaderComponent,
|
|
1060
|
-
isHeaderProps,
|
|
1061
1041
|
isHeadingComponent,
|
|
1062
1042
|
isHeadingProps,
|
|
1063
1043
|
isHighchartsComponent,
|