@json-to-office/shared-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/chunk-5533WPL6.js +1895 -0
- package/dist/chunk-5533WPL6.js.map +1 -0
- package/dist/chunk-AA4HIXRG.js +34 -0
- package/dist/chunk-AA4HIXRG.js.map +1 -0
- package/dist/chunk-BEPLK76M.js +454 -0
- package/dist/chunk-BEPLK76M.js.map +1 -0
- package/dist/chunk-BOUURUYX.js +364 -0
- package/dist/chunk-BOUURUYX.js.map +1 -0
- package/dist/chunk-EKWM2CWA.js +97 -0
- package/dist/chunk-EKWM2CWA.js.map +1 -0
- package/dist/chunk-ET6YMNMF.js +35 -0
- package/dist/chunk-ET6YMNMF.js.map +1 -0
- package/dist/chunk-F5LVWDTY.js +57 -0
- package/dist/chunk-F5LVWDTY.js.map +1 -0
- package/dist/chunk-HHMK2RWF.js +274 -0
- package/dist/chunk-HHMK2RWF.js.map +1 -0
- package/dist/chunk-LOE6BZQG.js +750 -0
- package/dist/chunk-LOE6BZQG.js.map +1 -0
- package/dist/chunk-LWR4TFZ5.js +121 -0
- package/dist/chunk-LWR4TFZ5.js.map +1 -0
- package/dist/chunk-VP3X6DBP.js +44 -0
- package/dist/chunk-VP3X6DBP.js.map +1 -0
- package/dist/document-validator-CiaGiy1v.d.ts +119 -0
- package/dist/index.d.ts +938 -0
- package/dist/index.js +1129 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/api.d.ts +46 -0
- package/dist/schemas/api.js +16 -0
- package/dist/schemas/api.js.map +1 -0
- package/dist/schemas/component-registry.d.ts +90 -0
- package/dist/schemas/component-registry.js +24 -0
- package/dist/schemas/component-registry.js.map +1 -0
- package/dist/schemas/components.d.ts +755 -0
- package/dist/schemas/components.js +94 -0
- package/dist/schemas/components.js.map +1 -0
- package/dist/schemas/custom-components.d.ts +59 -0
- package/dist/schemas/custom-components.js +11 -0
- package/dist/schemas/custom-components.js.map +1 -0
- package/dist/schemas/document.d.ts +43 -0
- package/dist/schemas/document.js +19 -0
- package/dist/schemas/document.js.map +1 -0
- package/dist/schemas/export.d.ts +67 -0
- package/dist/schemas/export.js +19 -0
- package/dist/schemas/export.js.map +1 -0
- package/dist/schemas/font.d.ts +57 -0
- package/dist/schemas/font.js +11 -0
- package/dist/schemas/font.js.map +1 -0
- package/dist/schemas/generator.d.ts +80 -0
- package/dist/schemas/generator.js +9 -0
- package/dist/schemas/generator.js.map +1 -0
- package/dist/schemas/theme.d.ts +3354 -0
- package/dist/schemas/theme.js +42 -0
- package/dist/schemas/theme.js.map +1 -0
- package/dist/validation/unified/index.d.ts +720 -0
- package/dist/validation/unified/index.js +154 -0
- package/dist/validation/unified/index.js.map +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_ERROR_CONFIG,
|
|
3
|
+
DOC_LINKS,
|
|
4
|
+
ERROR_EMOJIS,
|
|
5
|
+
ERROR_TEMPLATES,
|
|
6
|
+
calculatePosition,
|
|
7
|
+
clearComponentNamesCache,
|
|
8
|
+
componentValidator,
|
|
9
|
+
createComponentValidator,
|
|
10
|
+
createErrorConfig,
|
|
11
|
+
createJsonParseError,
|
|
12
|
+
createThemeValidator,
|
|
13
|
+
extractStandardComponentNames,
|
|
14
|
+
formatErrorMessage,
|
|
15
|
+
formatErrorSummary,
|
|
16
|
+
getLiteralValue,
|
|
17
|
+
getObjectSchemaPropertyNames,
|
|
18
|
+
getSchemaMetadata,
|
|
19
|
+
getThemeName,
|
|
20
|
+
groupErrorsByPath,
|
|
21
|
+
isColumnsProps,
|
|
22
|
+
isCustomComponentProps,
|
|
23
|
+
isFooterProps,
|
|
24
|
+
isHeaderProps,
|
|
25
|
+
isHeadingProps,
|
|
26
|
+
isImageProps,
|
|
27
|
+
isListProps,
|
|
28
|
+
isLiteralSchema,
|
|
29
|
+
isObjectSchema,
|
|
30
|
+
isParagraphProps,
|
|
31
|
+
isReportProps,
|
|
32
|
+
isSectionProps,
|
|
33
|
+
isStandardComponentName,
|
|
34
|
+
isStatisticProps,
|
|
35
|
+
isTableProps,
|
|
36
|
+
isThemeConfig,
|
|
37
|
+
isUnionSchema,
|
|
38
|
+
isValidTheme,
|
|
39
|
+
strictComponentValidator,
|
|
40
|
+
strictThemeValidator,
|
|
41
|
+
themeValidator,
|
|
42
|
+
transformValueError as transformValueError2,
|
|
43
|
+
transformValueErrors as transformValueErrors2,
|
|
44
|
+
validate,
|
|
45
|
+
validateComponent,
|
|
46
|
+
validateComponentDefinition,
|
|
47
|
+
validateComponents,
|
|
48
|
+
validateCustomComponentProps,
|
|
49
|
+
validateStrict,
|
|
50
|
+
validateTheme,
|
|
51
|
+
validateThemeJson,
|
|
52
|
+
validateThemeWithEnhancement
|
|
53
|
+
} from "../../chunk-BEPLK76M.js";
|
|
54
|
+
import "../../chunk-BOUURUYX.js";
|
|
55
|
+
import {
|
|
56
|
+
comprehensiveValidateDocument,
|
|
57
|
+
createDocumentValidator,
|
|
58
|
+
createJsonValidator,
|
|
59
|
+
createValidator,
|
|
60
|
+
deepValidateDocument,
|
|
61
|
+
documentValidator,
|
|
62
|
+
getValidationSummary,
|
|
63
|
+
isValidDocument,
|
|
64
|
+
isValidationSuccess,
|
|
65
|
+
strictDocumentValidator,
|
|
66
|
+
transformValueError,
|
|
67
|
+
transformValueErrors,
|
|
68
|
+
validateAgainstSchema,
|
|
69
|
+
validateBatch,
|
|
70
|
+
validateDocument,
|
|
71
|
+
validateDocumentWithSchema,
|
|
72
|
+
validateJson,
|
|
73
|
+
validateJsonComponent,
|
|
74
|
+
validateJsonDocument,
|
|
75
|
+
validateWithEnhancement
|
|
76
|
+
} from "../../chunk-LOE6BZQG.js";
|
|
77
|
+
import "../../chunk-ET6YMNMF.js";
|
|
78
|
+
import "../../chunk-5533WPL6.js";
|
|
79
|
+
import "../../chunk-VP3X6DBP.js";
|
|
80
|
+
import "../../chunk-F5LVWDTY.js";
|
|
81
|
+
export {
|
|
82
|
+
DEFAULT_ERROR_CONFIG,
|
|
83
|
+
DOC_LINKS,
|
|
84
|
+
ERROR_EMOJIS,
|
|
85
|
+
ERROR_TEMPLATES,
|
|
86
|
+
calculatePosition,
|
|
87
|
+
clearComponentNamesCache,
|
|
88
|
+
componentValidator,
|
|
89
|
+
comprehensiveValidateDocument,
|
|
90
|
+
createComponentValidator,
|
|
91
|
+
createDocumentValidator,
|
|
92
|
+
createErrorConfig,
|
|
93
|
+
createJsonParseError,
|
|
94
|
+
createJsonValidator,
|
|
95
|
+
createThemeValidator,
|
|
96
|
+
createValidator,
|
|
97
|
+
deepValidateDocument,
|
|
98
|
+
documentValidator,
|
|
99
|
+
extractStandardComponentNames,
|
|
100
|
+
formatErrorMessage,
|
|
101
|
+
formatErrorSummary,
|
|
102
|
+
getLiteralValue,
|
|
103
|
+
getObjectSchemaPropertyNames,
|
|
104
|
+
getSchemaMetadata,
|
|
105
|
+
getThemeName,
|
|
106
|
+
getValidationSummary,
|
|
107
|
+
groupErrorsByPath,
|
|
108
|
+
isColumnsProps,
|
|
109
|
+
isCustomComponentProps,
|
|
110
|
+
isFooterProps,
|
|
111
|
+
isHeaderProps,
|
|
112
|
+
isHeadingProps,
|
|
113
|
+
isImageProps,
|
|
114
|
+
isListProps,
|
|
115
|
+
isLiteralSchema,
|
|
116
|
+
isObjectSchema,
|
|
117
|
+
isParagraphProps,
|
|
118
|
+
isReportProps,
|
|
119
|
+
isSectionProps,
|
|
120
|
+
isStandardComponentName,
|
|
121
|
+
isStatisticProps,
|
|
122
|
+
isTableProps,
|
|
123
|
+
isThemeConfig,
|
|
124
|
+
isUnionSchema,
|
|
125
|
+
isValidDocument,
|
|
126
|
+
isValidTheme,
|
|
127
|
+
isValidationSuccess,
|
|
128
|
+
strictComponentValidator,
|
|
129
|
+
strictDocumentValidator,
|
|
130
|
+
strictThemeValidator,
|
|
131
|
+
themeValidator,
|
|
132
|
+
transformValueError as transformDocxValueError,
|
|
133
|
+
transformValueErrors as transformDocxValueErrors,
|
|
134
|
+
transformValueError2 as transformValueError,
|
|
135
|
+
transformValueErrors2 as transformValueErrors,
|
|
136
|
+
validate,
|
|
137
|
+
validateAgainstSchema,
|
|
138
|
+
validateBatch,
|
|
139
|
+
validateComponent,
|
|
140
|
+
validateComponentDefinition,
|
|
141
|
+
validateComponents,
|
|
142
|
+
validateCustomComponentProps,
|
|
143
|
+
validateDocument,
|
|
144
|
+
validateDocumentWithSchema,
|
|
145
|
+
validateJson,
|
|
146
|
+
validateJsonComponent,
|
|
147
|
+
validateJsonDocument,
|
|
148
|
+
validateStrict,
|
|
149
|
+
validateTheme,
|
|
150
|
+
validateThemeJson,
|
|
151
|
+
validateThemeWithEnhancement,
|
|
152
|
+
validateWithEnhancement
|
|
153
|
+
};
|
|
154
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@json-to-office/shared-docx",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "DOCX-specific schemas, component registry and validation",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./schemas/*": {
|
|
15
|
+
"types": "./dist/schemas/*.d.ts",
|
|
16
|
+
"import": "./dist/schemas/*.js",
|
|
17
|
+
"default": "./dist/schemas/*.js"
|
|
18
|
+
},
|
|
19
|
+
"./validation/unified": {
|
|
20
|
+
"types": "./dist/validation/unified/index.d.ts",
|
|
21
|
+
"import": "./dist/validation/unified/index.js",
|
|
22
|
+
"default": "./dist/validation/unified/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./*": {
|
|
25
|
+
"types": "./dist/*.d.ts",
|
|
26
|
+
"import": "./dist/*.js",
|
|
27
|
+
"default": "./dist/*.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@sinclair/typebox": "0.34.38",
|
|
32
|
+
"docx": "9.0.4",
|
|
33
|
+
"@json-to-office/shared": "^0.1.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "20.11.0",
|
|
37
|
+
"tsup": "8.5.0",
|
|
38
|
+
"typescript": "5.3.3"
|
|
39
|
+
},
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"author": "Paolo Barbato",
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "https://github.com/Wiseair-srl/json-to-office.git",
|
|
45
|
+
"directory": "packages/shared-docx"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/Wiseair-srl/json-to-office/tree/main/packages/shared-docx",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/Wiseair-srl/json-to-office/issues"
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"files": [
|
|
55
|
+
"dist",
|
|
56
|
+
"LICENSE"
|
|
57
|
+
],
|
|
58
|
+
"keywords": [
|
|
59
|
+
"json-to-office",
|
|
60
|
+
"typescript",
|
|
61
|
+
"docx",
|
|
62
|
+
"document",
|
|
63
|
+
"word"
|
|
64
|
+
],
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=20.0.0"
|
|
67
|
+
},
|
|
68
|
+
"scripts": {
|
|
69
|
+
"build": "tsup",
|
|
70
|
+
"dev": "tsup --watch",
|
|
71
|
+
"clean": "rm -rf dist",
|
|
72
|
+
"lint": "eslint src/**/*.ts",
|
|
73
|
+
"lint:fix": "eslint src/**/*.ts --fix",
|
|
74
|
+
"format": "prettier --write src/**/*.ts",
|
|
75
|
+
"typecheck": "tsc --noEmit",
|
|
76
|
+
"test": "vitest run --passWithNoTests",
|
|
77
|
+
"test:watch": "vitest",
|
|
78
|
+
"test:coverage": "vitest run --coverage --passWithNoTests"
|
|
79
|
+
}
|
|
80
|
+
}
|