@syncfusion/ej2-office-common 35.1.37
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/.eslintrc.json +263 -0
- package/.prettierrc.json +5 -0
- package/README.md +167 -0
- package/api-extractor.json +35 -0
- package/core.js +4 -0
- package/dist/ej2-office-common.umd.min.js +11 -0
- package/dist/ej2-office-common.umd.min.js.map +1 -0
- package/dist/es6/ej2-office-common.es2015.js +6585 -0
- package/dist/es6/ej2-office-common.es2015.js.map +1 -0
- package/dist/es6/ej2-office-common.es5.js +7955 -0
- package/dist/es6/ej2-office-common.es5.js.map +1 -0
- package/dist/global/ej2-office-common.min.js +11 -0
- package/dist/global/ej2-office-common.min.js.map +1 -0
- package/dist/global/index.d.ts +14 -0
- package/encryption.js +4 -0
- package/features.js +4 -0
- package/global.json +6 -0
- package/index.js +4 -0
- package/license +10 -0
- package/nuget.config +7 -0
- package/package.json +23 -0
- package/src/all.d.ts +41 -0
- package/src/all.js +38 -0
- package/src/core/index.d.ts +6 -0
- package/src/core/index.js +6 -0
- package/src/core/xml/index.d.ts +7 -0
- package/src/core/xml/index.js +6 -0
- package/src/core/xml/model.d.ts +71 -0
- package/src/core/xml/model.js +20 -0
- package/src/encryption/agile-constants.d.ts +61 -0
- package/src/encryption/agile-constants.js +71 -0
- package/src/encryption/agile-encryption-info.d.ts +46 -0
- package/src/encryption/agile-encryption-info.js +333 -0
- package/src/encryption/agile-password.d.ts +8 -0
- package/src/encryption/agile-password.js +58 -0
- package/src/encryption/cfb-reader.d.ts +11 -0
- package/src/encryption/cfb-reader.js +345 -0
- package/src/encryption/crypto-primitives.d.ts +74 -0
- package/src/encryption/crypto-primitives.js +302 -0
- package/src/encryption/decrypt-encrypted-package.d.ts +16 -0
- package/src/encryption/decrypt-encrypted-package.js +138 -0
- package/src/encryption/encryption-info-xml.d.ts +21 -0
- package/src/encryption/encryption-info-xml.js +282 -0
- package/src/encryption/errors.d.ts +66 -0
- package/src/encryption/errors.js +124 -0
- package/src/encryption/index.d.ts +35 -0
- package/src/encryption/index.js +100 -0
- package/src/features/diagrams/constants.d.ts +83 -0
- package/src/features/diagrams/constants.js +101 -0
- package/src/features/diagrams/diagram-data-model.d.ts +148 -0
- package/src/features/diagrams/diagram-data-model.js +446 -0
- package/src/features/diagrams/diagram-parsers.d.ts +28 -0
- package/src/features/diagrams/diagram-parsers.js +182 -0
- package/src/features/diagrams/diagram-serializers.d.ts +20 -0
- package/src/features/diagrams/diagram-serializers.js +110 -0
- package/src/features/diagrams/diagram-views.d.ts +60 -0
- package/src/features/diagrams/diagram-views.js +213 -0
- package/src/features/diagrams/element-tree.d.ts +55 -0
- package/src/features/diagrams/element-tree.js +197 -0
- package/src/features/diagrams/errors.d.ts +17 -0
- package/src/features/diagrams/errors.js +59 -0
- package/src/features/diagrams/index.d.ts +17 -0
- package/src/features/diagrams/index.js +17 -0
- package/src/features/diagrams/smart-art-catalog.d.ts +107 -0
- package/src/features/diagrams/smart-art-catalog.js +422 -0
- package/src/features/diagrams/smart-art-diagram.d.ts +96 -0
- package/src/features/diagrams/smart-art-diagram.js +258 -0
- package/src/features/index.d.ts +11 -0
- package/src/features/index.js +11 -0
- package/src/features/ink/constants.d.ts +54 -0
- package/src/features/ink/constants.js +54 -0
- package/src/features/ink/index.d.ts +18 -0
- package/src/features/ink/index.js +15 -0
- package/src/features/ink/ink-effects.d.ts +35 -0
- package/src/features/ink/ink-effects.js +45 -0
- package/src/features/ink/ink-model.d.ts +237 -0
- package/src/features/ink/ink-model.js +406 -0
- package/src/features/ink/ink-parser.d.ts +59 -0
- package/src/features/ink/ink-parser.js +671 -0
- package/src/features/ink/ink-serializer.d.ts +16 -0
- package/src/features/ink/ink-serializer.js +281 -0
- package/src/features/ink/ink-units.d.ts +33 -0
- package/src/features/ink/ink-units.js +92 -0
- package/src/features/ink/ink-xml.d.ts +26 -0
- package/src/features/ink/ink-xml.js +165 -0
- package/src/features/ink/trace-codec.d.ts +127 -0
- package/src/features/ink/trace-codec.js +266 -0
- package/src/features/mathml/constants.d.ts +47 -0
- package/src/features/mathml/constants.js +47 -0
- package/src/features/mathml/errors.d.ts +50 -0
- package/src/features/mathml/errors.js +69 -0
- package/src/features/mathml/index.d.ts +30 -0
- package/src/features/mathml/index.js +22 -0
- package/src/features/mathml/math-factory.d.ts +26 -0
- package/src/features/mathml/math-factory.js +568 -0
- package/src/features/mathml/model/controls.d.ts +896 -0
- package/src/features/mathml/model/controls.js +1541 -0
- package/src/features/mathml/model/enums.d.ts +153 -0
- package/src/features/mathml/model/enums.js +133 -0
- package/src/features/mathml/model/math-element.d.ts +173 -0
- package/src/features/mathml/model/math-element.js +315 -0
- package/src/features/mathml/model/roots.d.ts +82 -0
- package/src/features/mathml/model/roots.js +177 -0
- package/src/features/mathml/openxml.d.ts +56 -0
- package/src/features/mathml/openxml.js +87 -0
- package/src/features/mathml/parse/math-parser.d.ts +43 -0
- package/src/features/mathml/parse/math-parser.js +636 -0
- package/src/features/mathml/serialize/math-serializer.d.ts +34 -0
- package/src/features/mathml/serialize/math-serializer.js +749 -0
- package/src/features/smart-art/diagram-xml.d.ts +63 -0
- package/src/features/smart-art/diagram-xml.js +459 -0
- package/src/features/smart-art/errors.d.ts +24 -0
- package/src/features/smart-art/errors.js +47 -0
- package/src/features/smart-art/index.d.ts +26 -0
- package/src/features/smart-art/index.js +26 -0
- package/src/features/smart-art/minimal-samples.d.ts +18 -0
- package/src/features/smart-art/minimal-samples.js +40 -0
- package/src/features/smart-art/mutators.d.ts +60 -0
- package/src/features/smart-art/mutators.js +566 -0
- package/src/features/smart-art/namespaces.d.ts +153 -0
- package/src/features/smart-art/namespaces.js +163 -0
- package/src/features/smart-art/package-graph.d.ts +61 -0
- package/src/features/smart-art/package-graph.js +413 -0
- package/src/features/smart-art/parse-colors.d.ts +19 -0
- package/src/features/smart-art/parse-colors.js +39 -0
- package/src/features/smart-art/parse-data.d.ts +21 -0
- package/src/features/smart-art/parse-data.js +121 -0
- package/src/features/smart-art/parse-layout.d.ts +20 -0
- package/src/features/smart-art/parse-layout.js +40 -0
- package/src/features/smart-art/parse-rel-ids.d.ts +71 -0
- package/src/features/smart-art/parse-rel-ids.js +233 -0
- package/src/features/smart-art/parse-style.d.ts +19 -0
- package/src/features/smart-art/parse-style.js +39 -0
- package/src/features/smart-art/point-text.d.ts +80 -0
- package/src/features/smart-art/point-text.js +424 -0
- package/src/features/smart-art/register.d.ts +33 -0
- package/src/features/smart-art/register.js +95 -0
- package/src/features/smart-art/serialize.d.ts +40 -0
- package/src/features/smart-art/serialize.js +48 -0
- package/src/features/smart-art/types.d.ts +403 -0
- package/src/features/smart-art/types.js +28 -0
- package/src/global.js +1 -0
- package/src/index.d.ts +21 -0
- package/src/index.js +22 -0
- package/tsconfig.build.json +13 -0
- package/tsconfig.harness.json +32 -0
- package/tslint.json +111 -0
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true,
|
|
4
|
+
"es2021": true
|
|
5
|
+
},
|
|
6
|
+
"extends": [
|
|
7
|
+
"eslint:recommended",
|
|
8
|
+
"plugin:@typescript-eslint/recommended",
|
|
9
|
+
"plugin:jsdoc/recommended",
|
|
10
|
+
"plugin:security/recommended"
|
|
11
|
+
],
|
|
12
|
+
"parser": "@typescript-eslint/parser",
|
|
13
|
+
"parserOptions": {
|
|
14
|
+
"ecmaFeatures": { "js": true },
|
|
15
|
+
"ecmaVersion": 2018,
|
|
16
|
+
"project": "./tsconfig.json",
|
|
17
|
+
"sourceType": "module"
|
|
18
|
+
},
|
|
19
|
+
"ignorePatterns": ["*.d.ts", "*.js"],
|
|
20
|
+
"plugins": [
|
|
21
|
+
"@typescript-eslint",
|
|
22
|
+
"@typescript-eslint/tslint",
|
|
23
|
+
"eslint-plugin-security",
|
|
24
|
+
"jsdoc"
|
|
25
|
+
],
|
|
26
|
+
"rules": {
|
|
27
|
+
"use-isnan": "error",
|
|
28
|
+
"security/detect-unsafe-regex":"error",
|
|
29
|
+
"security/detect-buffer-noassert":"error",
|
|
30
|
+
"security/detect-child-process":"error",
|
|
31
|
+
"security/detect-disable-mustache-escape":"error",
|
|
32
|
+
"security/detect-eval-with-expression":"error",
|
|
33
|
+
"security/detect-no-csrf-before-method-override":"error",
|
|
34
|
+
"security/detect-non-literal-fs-filename":"error",
|
|
35
|
+
"security/detect-non-literal-regexp":"error",
|
|
36
|
+
"security/detect-non-literal-require":"error",
|
|
37
|
+
"security/detect-object-injection":"error",
|
|
38
|
+
"security/detect-possible-timing-attacks":"error",
|
|
39
|
+
"security/detect-pseudoRandomBytes":"error",
|
|
40
|
+
"security/detect-new-buffer":"error",
|
|
41
|
+
"security/detect-bidi-characters":"error",
|
|
42
|
+
"no-prototype-builtins": "warn",
|
|
43
|
+
"no-extend-native": ["warn"],
|
|
44
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
45
|
+
"@typescript-eslint/ban-types": ["warn", {
|
|
46
|
+
"types": {
|
|
47
|
+
"Object": false,
|
|
48
|
+
"object": false,
|
|
49
|
+
"{}": false,
|
|
50
|
+
"Function": false
|
|
51
|
+
}
|
|
52
|
+
}],
|
|
53
|
+
"jsdoc/check-tag-names": 0,
|
|
54
|
+
"@typescript-eslint/tslint/config": [
|
|
55
|
+
"error",
|
|
56
|
+
{
|
|
57
|
+
"rules": {
|
|
58
|
+
"ban": true,
|
|
59
|
+
"chai-vague-errors": true,
|
|
60
|
+
"max-func-body-length": [
|
|
61
|
+
true,
|
|
62
|
+
120,
|
|
63
|
+
{
|
|
64
|
+
"ignore-parameters-to-function-regex": "describe"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"missing-jsdoc": true,
|
|
68
|
+
"no-backbone-get-set-outside-model": false,
|
|
69
|
+
"no-cookies": false,
|
|
70
|
+
"no-delete-expression": false,
|
|
71
|
+
"no-disable-auto-sanitization": true,
|
|
72
|
+
"no-duplicate-case": true,
|
|
73
|
+
"no-duplicate-parameter-names": true,
|
|
74
|
+
"no-empty-interfaces": false,
|
|
75
|
+
"no-exec-script": true,
|
|
76
|
+
"no-function-expression": false,
|
|
77
|
+
"no-multiple-var-decl": false,
|
|
78
|
+
"no-string-based-set-immediate": false,
|
|
79
|
+
"no-string-based-set-interval": false,
|
|
80
|
+
"no-unnecessary-bind": false,
|
|
81
|
+
"no-unused-imports": true,
|
|
82
|
+
"no-with-statement": false,
|
|
83
|
+
"prefer-array-literal": false,
|
|
84
|
+
"typedef": [
|
|
85
|
+
true,
|
|
86
|
+
"call-signature",
|
|
87
|
+
"parameter",
|
|
88
|
+
"property-declaration",
|
|
89
|
+
"variable-declaration",
|
|
90
|
+
"arrow-parameter",
|
|
91
|
+
"member-variable-declaration"
|
|
92
|
+
],
|
|
93
|
+
"use-named-parameter": false,
|
|
94
|
+
"valid-typeof": true,
|
|
95
|
+
"whitespace": [
|
|
96
|
+
true,
|
|
97
|
+
"check-branch",
|
|
98
|
+
"check-decl",
|
|
99
|
+
"check-operator",
|
|
100
|
+
"check-separator",
|
|
101
|
+
"check-type"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"no-control-regex": "error",
|
|
107
|
+
"no-constant-condition": "error",
|
|
108
|
+
"no-invalid-regexp": "error",
|
|
109
|
+
"curly": "error",
|
|
110
|
+
"eol-last": [
|
|
111
|
+
"error",
|
|
112
|
+
"always"
|
|
113
|
+
],
|
|
114
|
+
"guard-for-in": "error",
|
|
115
|
+
"no-labels": "error",
|
|
116
|
+
"max-len": [
|
|
117
|
+
"error",
|
|
118
|
+
{
|
|
119
|
+
"code": 140,
|
|
120
|
+
"tabWidth": 4,
|
|
121
|
+
"ignoreComments": true,
|
|
122
|
+
"ignoreStrings": true,
|
|
123
|
+
"ignoreTemplateLiterals": true,
|
|
124
|
+
"ignoreRegExpLiterals": true
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"no-console": [
|
|
128
|
+
"error",
|
|
129
|
+
{
|
|
130
|
+
"allow": [
|
|
131
|
+
"warn",
|
|
132
|
+
"dir",
|
|
133
|
+
"timeLog",
|
|
134
|
+
"assert",
|
|
135
|
+
"clear",
|
|
136
|
+
"count",
|
|
137
|
+
"countReset",
|
|
138
|
+
"group",
|
|
139
|
+
"groupEnd",
|
|
140
|
+
"table",
|
|
141
|
+
"dirxml",
|
|
142
|
+
"error",
|
|
143
|
+
"groupCollapsed",
|
|
144
|
+
"Console",
|
|
145
|
+
"profile",
|
|
146
|
+
"profileEnd",
|
|
147
|
+
"timeStamp",
|
|
148
|
+
"context"
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"no-redeclare": [
|
|
153
|
+
"error",
|
|
154
|
+
{
|
|
155
|
+
"builtinGlobals": true
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"@typescript-eslint/no-parameter-properties": "error",
|
|
159
|
+
"@typescript-eslint/indent": [
|
|
160
|
+
"error",
|
|
161
|
+
4,
|
|
162
|
+
{
|
|
163
|
+
"CallExpression": {
|
|
164
|
+
"arguments": "first"
|
|
165
|
+
},
|
|
166
|
+
"FunctionDeclaration": {
|
|
167
|
+
"parameters": "first"
|
|
168
|
+
},
|
|
169
|
+
"FunctionExpression": {
|
|
170
|
+
"parameters": "first"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"no-debugger": "error",
|
|
175
|
+
"no-eval": "error",
|
|
176
|
+
"no-extra-semi": "error",
|
|
177
|
+
"no-throw-literal": "error",
|
|
178
|
+
"no-fallthrough": "error",
|
|
179
|
+
"comma-dangle": [
|
|
180
|
+
"error",
|
|
181
|
+
"never"
|
|
182
|
+
],
|
|
183
|
+
"no-trailing-spaces": "error",
|
|
184
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
185
|
+
"@typescript-eslint/no-var-requires": "error",
|
|
186
|
+
"one-var": [
|
|
187
|
+
"error",
|
|
188
|
+
"never"
|
|
189
|
+
],
|
|
190
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
191
|
+
"no-cond-assign": [
|
|
192
|
+
"error",
|
|
193
|
+
"always"
|
|
194
|
+
],
|
|
195
|
+
"@typescript-eslint/consistent-type-assertions": "off",
|
|
196
|
+
"jsdoc/check-alignment": "error",
|
|
197
|
+
"no-empty": "error",
|
|
198
|
+
"quotes": [
|
|
199
|
+
"error",
|
|
200
|
+
"single"
|
|
201
|
+
],
|
|
202
|
+
"semi": [
|
|
203
|
+
"error",
|
|
204
|
+
"always"
|
|
205
|
+
],
|
|
206
|
+
"eqeqeq": [
|
|
207
|
+
"error",
|
|
208
|
+
"smart"
|
|
209
|
+
],
|
|
210
|
+
"valid-typeof": [
|
|
211
|
+
"error",
|
|
212
|
+
{
|
|
213
|
+
"requireStringLiterals": true
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"camelcase": [
|
|
217
|
+
"error",
|
|
218
|
+
{
|
|
219
|
+
"properties": "always",
|
|
220
|
+
"ignoreDestructuring": true,
|
|
221
|
+
"ignoreImports": true
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"no-irregular-whitespace": [
|
|
225
|
+
"error",
|
|
226
|
+
{
|
|
227
|
+
"skipStrings": true,
|
|
228
|
+
"skipComments": true,
|
|
229
|
+
"skipRegExps": true,
|
|
230
|
+
"skipTemplates": true
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"valid-jsdoc": [
|
|
234
|
+
"error",
|
|
235
|
+
{
|
|
236
|
+
"prefer": {
|
|
237
|
+
"arg": "param",
|
|
238
|
+
"argument": "param",
|
|
239
|
+
"class": "constructor",
|
|
240
|
+
"return": "returns",
|
|
241
|
+
"virtual": "abstract"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"no-var": "error",
|
|
246
|
+
"radix": "error"
|
|
247
|
+
},
|
|
248
|
+
"reportUnusedDisableDirectives": true,
|
|
249
|
+
"overrides": [
|
|
250
|
+
{
|
|
251
|
+
"files": [
|
|
252
|
+
"node_modules",
|
|
253
|
+
"dist",
|
|
254
|
+
"public",
|
|
255
|
+
"coverage",
|
|
256
|
+
"test-report"
|
|
257
|
+
],
|
|
258
|
+
"rules": {
|
|
259
|
+
"no-unused-expressions": "off"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
}
|
package/.prettierrc.json
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# @syncfusion/ej2-office-common
|
|
2
|
+
|
|
3
|
+
A programmatic DOCX/OOXML class library for JavaScript and TypeScript — read, create,
|
|
4
|
+
and modify Word documents in Node and the browser, without Word and without losing
|
|
5
|
+
anything the library does not yet understand.
|
|
6
|
+
|
|
7
|
+
> **Status: milestone-review.** Phase 1 tasks TASK-1001–1012 are done. Report:
|
|
8
|
+
> `docs/milestones/2026-08-29-phase-1.md`. Consume this package from git; it is not
|
|
9
|
+
> published to npm.
|
|
10
|
+
|
|
11
|
+
## Why this repository looks like this
|
|
12
|
+
|
|
13
|
+
The library is built by coding agents running autonomously. That only works if the rules
|
|
14
|
+
are written down, so most of what you see here is the control plane: policies agents must
|
|
15
|
+
follow, workflows they execute, skills they invoke, and gates that stop them shipping
|
|
16
|
+
something broken.
|
|
17
|
+
|
|
18
|
+
`.agent/` is the single source of truth. `CLAUDE.md`, `.github/copilot-instructions.md`
|
|
19
|
+
and `.cursor/rules/` are thin adapters that all point back to it, so Claude Code, OpenAI
|
|
20
|
+
Codex, Cursor, GitHub Copilot and other repository-aware agents get the same rules.
|
|
21
|
+
|
|
22
|
+
## Guiding principle
|
|
23
|
+
|
|
24
|
+
> Parse what you understand. Preserve what you do not understand.
|
|
25
|
+
|
|
26
|
+
A consumer must be able to open a document from any conforming producer, change one
|
|
27
|
+
thing, save, and lose nothing — including the charts, revisions, macros and vendor
|
|
28
|
+
extensions this library has no semantic model for. That constraint shapes the whole
|
|
29
|
+
architecture, and it is why preservation and round-trip tests outrank feature count.
|
|
30
|
+
|
|
31
|
+
## Prerequisites
|
|
32
|
+
|
|
33
|
+
| Requirement | For | Needed when |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| Node.js ≥ 20.11 | the library and harness CLI | always |
|
|
36
|
+
| Python 3.9+ | `scripts/verify_harness.py` | always |
|
|
37
|
+
| .NET 10 SDK | Open XML SDK validation, DocIO fixtures | before release |
|
|
38
|
+
| Syncfusion DocIO licence | fixture generation and read-back | before release |
|
|
39
|
+
| Playwright + Chromium | browser performance benchmarks | before release |
|
|
40
|
+
|
|
41
|
+
The last three are optional during early development. When one is missing its gate
|
|
42
|
+
reports `NOT RUN` with a reason — never `PASS` — and is recorded as a standing exception
|
|
43
|
+
in `PROJECT-STATE.md`, which blocks release. See `.agent/policies/toolchain.md`.
|
|
44
|
+
|
|
45
|
+
Everything else works offline. No test, build, or format decision may depend on network
|
|
46
|
+
access (`.agent/policies/offline.md`).
|
|
47
|
+
|
|
48
|
+
## Getting started
|
|
49
|
+
|
|
50
|
+
Install from git (the package is `"private": true` and is not published to npm):
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm install git+https://github.com/vijays-git/@syncfusion/ej2-office-common.git
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { Document } from '@syncfusion/ej2-office-common';
|
|
58
|
+
|
|
59
|
+
const doc = Document.create();
|
|
60
|
+
const paragraph = doc.body.paragraphs[0];
|
|
61
|
+
if (paragraph !== undefined) {
|
|
62
|
+
paragraph.appendRun().text = 'Hello';
|
|
63
|
+
}
|
|
64
|
+
const bytes = await doc.save();
|
|
65
|
+
const again = await Document.load(bytes);
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`load` / `save` and `loadSync` / `saveSync` take and return `Uint8Array`. There is no
|
|
69
|
+
streaming API and no filesystem helper in this version.
|
|
70
|
+
|
|
71
|
+
Inspect where the project stands:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
node tools/harness.mjs state
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The phase is `phase-1`. Inspect the board and continue the task loop:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
node tools/harness.mjs tasks
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
After the roadmap is approved, every session runs the same loop
|
|
84
|
+
(`.agent/workflows/task-loop.md`): pick the next ready task, run the workflow for its
|
|
85
|
+
type, satisfy the Definition of Done, commit, update state, repeat.
|
|
86
|
+
|
|
87
|
+
Useful during that loop:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
node tools/harness.mjs tasks # the task board, grouped by state
|
|
91
|
+
node tools/harness.mjs spec-search "w:tblPr" # bounded search of the OOXML corpus
|
|
92
|
+
node tools/harness.mjs quality # gates, explicit PASS/FAIL/N-A each
|
|
93
|
+
node tools/harness.mjs verify # harness structural verification
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## What the harness provides
|
|
97
|
+
|
|
98
|
+
- an autonomous task loop with a durable file-based task board and run state, so work
|
|
99
|
+
survives context resets
|
|
100
|
+
- decision authority, bounded retry, and blocked-task handling, so one stuck task never
|
|
101
|
+
stalls the project
|
|
102
|
+
- requirements discovery from the local OOXML corpus, then requirements, technical
|
|
103
|
+
specifications, tasks, and ADRs
|
|
104
|
+
- TypeScript language standards — strict compiler settings, branded measurement units,
|
|
105
|
+
discriminated unions with exhaustiveness checks, a typed error hierarchy
|
|
106
|
+
- public API standards, a committed API baseline, and SemVer gates
|
|
107
|
+
- test-first development: unit, parser, writer, document-mutation, round-trip,
|
|
108
|
+
preservation, malformed, and regression suites
|
|
109
|
+
- Syncfusion DocIO on-demand fixtures and independent Microsoft Open XML SDK validation
|
|
110
|
+
- StrykerJS source mutation testing, focused on changed modules during development
|
|
111
|
+
- ESM, tree shaking, lazy-loaded feature modules, and bundle-size gates
|
|
112
|
+
- security policy with concrete limits for ZIP, XML, external and active content
|
|
113
|
+
- performance, memory-retention, heap and browser benchmark lifecycle
|
|
114
|
+
- milestone and release checkpoints, with honest gate reporting
|
|
115
|
+
- harness self-verification and a content lock, so the rules cannot drift unnoticed
|
|
116
|
+
- CI running both (`.github/workflows/quality.yml`)
|
|
117
|
+
|
|
118
|
+
## Validation hierarchy
|
|
119
|
+
|
|
120
|
+
When sources disagree about the format, higher wins:
|
|
121
|
+
|
|
122
|
+
1. ECMA-376 / ISO/IEC 29500 and Microsoft Open Specifications
|
|
123
|
+
2. Microsoft Open XML SDK validation and reference behavior
|
|
124
|
+
3. Syncfusion DocIO fixture generation and read-back
|
|
125
|
+
4. the JavaScript/TypeScript library under test
|
|
126
|
+
|
|
127
|
+
DocIO is a fixture and interoperability oracle, not the normative specification. When
|
|
128
|
+
producers disagree with the standards, the standards win and the case is escalated
|
|
129
|
+
rather than resolved by whichever tool is convenient.
|
|
130
|
+
|
|
131
|
+
## Repository map
|
|
132
|
+
|
|
133
|
+
| Path | What it is |
|
|
134
|
+
|---|---|
|
|
135
|
+
| `AGENTS.md` | entry point every coding agent reads first |
|
|
136
|
+
| `PROJECT-STATE.md` | current phase, active task, blockers, standing exceptions |
|
|
137
|
+
| `.agent/` | canonical policies, agents, skills, workflows, checklists, templates |
|
|
138
|
+
| `specs/` | offline OOXML specification corpus — normative, read-only |
|
|
139
|
+
| `src/`, `types/`, `tests/` | the library, its ambient declarations, and its tests |
|
|
140
|
+
| `docs/` | requirements, specs, tasks, roadmap, ADRs, OOXML mapping, journal |
|
|
141
|
+
| `corpus/`, `benchmarks/` | test documents and accepted performance baselines |
|
|
142
|
+
| `tools/`, `scripts/` | deterministic harness tooling and gates |
|
|
143
|
+
| `.generated/` | ephemeral fixture and tool output — git-ignored, never committed |
|
|
144
|
+
|
|
145
|
+
`.agent/policies/repository-layout.md` is the full map and the rule for where new
|
|
146
|
+
artifacts belong.
|
|
147
|
+
|
|
148
|
+
## Contributing
|
|
149
|
+
|
|
150
|
+
Read `AGENTS.md` first — it applies to humans as well as agents. In short: work one task
|
|
151
|
+
at a time from `docs/tasks/`, search `specs/` and cite it before implementing any format
|
|
152
|
+
behavior, never invent OOXML, and satisfy `.agent/checklists/definition-of-done.md`
|
|
153
|
+
before marking anything done.
|
|
154
|
+
|
|
155
|
+
Changing the harness itself means updating its catalog and `manifest.json` in the same
|
|
156
|
+
change, then re-locking:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
python3 scripts/verify_harness.py --lock
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Licence
|
|
163
|
+
|
|
164
|
+
The library licence will be documented to align with Syncfusion; there is no `LICENSE`
|
|
165
|
+
file yet. Runtime open-source dependencies, if any, must be MIT or Apache-2.0. Syncfusion
|
|
166
|
+
DocIO is first-party fixture tooling. See
|
|
167
|
+
`docs/requirements/PRODUCT-DECISIONS-REQUIRED.md`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
|
|
4
|
+
"bundledPackages": [],
|
|
5
|
+
"compiler": {
|
|
6
|
+
"tsconfigFilePath": "<projectFolder>/tsconfig.build.json"
|
|
7
|
+
},
|
|
8
|
+
"apiReport": {
|
|
9
|
+
"enabled": true,
|
|
10
|
+
"reportFolder": "<projectFolder>/docs/api",
|
|
11
|
+
"reportFileName": "@syncfusion/ej2-office-common.api.md"
|
|
12
|
+
},
|
|
13
|
+
"docModel": {
|
|
14
|
+
"enabled": false
|
|
15
|
+
},
|
|
16
|
+
"dtsRollup": {
|
|
17
|
+
"enabled": true,
|
|
18
|
+
"publicTrimmedFilePath": "<projectFolder>/dist/@syncfusion/ej2-office-common.d.ts"
|
|
19
|
+
},
|
|
20
|
+
"tsdocMetadata": {
|
|
21
|
+
"enabled": false
|
|
22
|
+
},
|
|
23
|
+
"messages": {
|
|
24
|
+
"extractorMessageReporting": {
|
|
25
|
+
"default": {
|
|
26
|
+
"logLevel": "warning"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"compilerMessageReporting": {
|
|
30
|
+
"default": {
|
|
31
|
+
"logLevel": "warning"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
package/core.js
ADDED