@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.
Files changed (147) hide show
  1. package/.eslintrc.json +263 -0
  2. package/.prettierrc.json +5 -0
  3. package/README.md +167 -0
  4. package/api-extractor.json +35 -0
  5. package/core.js +4 -0
  6. package/dist/ej2-office-common.umd.min.js +11 -0
  7. package/dist/ej2-office-common.umd.min.js.map +1 -0
  8. package/dist/es6/ej2-office-common.es2015.js +6585 -0
  9. package/dist/es6/ej2-office-common.es2015.js.map +1 -0
  10. package/dist/es6/ej2-office-common.es5.js +7955 -0
  11. package/dist/es6/ej2-office-common.es5.js.map +1 -0
  12. package/dist/global/ej2-office-common.min.js +11 -0
  13. package/dist/global/ej2-office-common.min.js.map +1 -0
  14. package/dist/global/index.d.ts +14 -0
  15. package/encryption.js +4 -0
  16. package/features.js +4 -0
  17. package/global.json +6 -0
  18. package/index.js +4 -0
  19. package/license +10 -0
  20. package/nuget.config +7 -0
  21. package/package.json +23 -0
  22. package/src/all.d.ts +41 -0
  23. package/src/all.js +38 -0
  24. package/src/core/index.d.ts +6 -0
  25. package/src/core/index.js +6 -0
  26. package/src/core/xml/index.d.ts +7 -0
  27. package/src/core/xml/index.js +6 -0
  28. package/src/core/xml/model.d.ts +71 -0
  29. package/src/core/xml/model.js +20 -0
  30. package/src/encryption/agile-constants.d.ts +61 -0
  31. package/src/encryption/agile-constants.js +71 -0
  32. package/src/encryption/agile-encryption-info.d.ts +46 -0
  33. package/src/encryption/agile-encryption-info.js +333 -0
  34. package/src/encryption/agile-password.d.ts +8 -0
  35. package/src/encryption/agile-password.js +58 -0
  36. package/src/encryption/cfb-reader.d.ts +11 -0
  37. package/src/encryption/cfb-reader.js +345 -0
  38. package/src/encryption/crypto-primitives.d.ts +74 -0
  39. package/src/encryption/crypto-primitives.js +302 -0
  40. package/src/encryption/decrypt-encrypted-package.d.ts +16 -0
  41. package/src/encryption/decrypt-encrypted-package.js +138 -0
  42. package/src/encryption/encryption-info-xml.d.ts +21 -0
  43. package/src/encryption/encryption-info-xml.js +282 -0
  44. package/src/encryption/errors.d.ts +66 -0
  45. package/src/encryption/errors.js +124 -0
  46. package/src/encryption/index.d.ts +35 -0
  47. package/src/encryption/index.js +100 -0
  48. package/src/features/diagrams/constants.d.ts +83 -0
  49. package/src/features/diagrams/constants.js +101 -0
  50. package/src/features/diagrams/diagram-data-model.d.ts +148 -0
  51. package/src/features/diagrams/diagram-data-model.js +446 -0
  52. package/src/features/diagrams/diagram-parsers.d.ts +28 -0
  53. package/src/features/diagrams/diagram-parsers.js +182 -0
  54. package/src/features/diagrams/diagram-serializers.d.ts +20 -0
  55. package/src/features/diagrams/diagram-serializers.js +110 -0
  56. package/src/features/diagrams/diagram-views.d.ts +60 -0
  57. package/src/features/diagrams/diagram-views.js +213 -0
  58. package/src/features/diagrams/element-tree.d.ts +55 -0
  59. package/src/features/diagrams/element-tree.js +197 -0
  60. package/src/features/diagrams/errors.d.ts +17 -0
  61. package/src/features/diagrams/errors.js +59 -0
  62. package/src/features/diagrams/index.d.ts +17 -0
  63. package/src/features/diagrams/index.js +17 -0
  64. package/src/features/diagrams/smart-art-catalog.d.ts +107 -0
  65. package/src/features/diagrams/smart-art-catalog.js +422 -0
  66. package/src/features/diagrams/smart-art-diagram.d.ts +96 -0
  67. package/src/features/diagrams/smart-art-diagram.js +258 -0
  68. package/src/features/index.d.ts +11 -0
  69. package/src/features/index.js +11 -0
  70. package/src/features/ink/constants.d.ts +54 -0
  71. package/src/features/ink/constants.js +54 -0
  72. package/src/features/ink/index.d.ts +18 -0
  73. package/src/features/ink/index.js +15 -0
  74. package/src/features/ink/ink-effects.d.ts +35 -0
  75. package/src/features/ink/ink-effects.js +45 -0
  76. package/src/features/ink/ink-model.d.ts +237 -0
  77. package/src/features/ink/ink-model.js +406 -0
  78. package/src/features/ink/ink-parser.d.ts +59 -0
  79. package/src/features/ink/ink-parser.js +671 -0
  80. package/src/features/ink/ink-serializer.d.ts +16 -0
  81. package/src/features/ink/ink-serializer.js +281 -0
  82. package/src/features/ink/ink-units.d.ts +33 -0
  83. package/src/features/ink/ink-units.js +92 -0
  84. package/src/features/ink/ink-xml.d.ts +26 -0
  85. package/src/features/ink/ink-xml.js +165 -0
  86. package/src/features/ink/trace-codec.d.ts +127 -0
  87. package/src/features/ink/trace-codec.js +266 -0
  88. package/src/features/mathml/constants.d.ts +47 -0
  89. package/src/features/mathml/constants.js +47 -0
  90. package/src/features/mathml/errors.d.ts +50 -0
  91. package/src/features/mathml/errors.js +69 -0
  92. package/src/features/mathml/index.d.ts +30 -0
  93. package/src/features/mathml/index.js +22 -0
  94. package/src/features/mathml/math-factory.d.ts +26 -0
  95. package/src/features/mathml/math-factory.js +568 -0
  96. package/src/features/mathml/model/controls.d.ts +896 -0
  97. package/src/features/mathml/model/controls.js +1541 -0
  98. package/src/features/mathml/model/enums.d.ts +153 -0
  99. package/src/features/mathml/model/enums.js +133 -0
  100. package/src/features/mathml/model/math-element.d.ts +173 -0
  101. package/src/features/mathml/model/math-element.js +315 -0
  102. package/src/features/mathml/model/roots.d.ts +82 -0
  103. package/src/features/mathml/model/roots.js +177 -0
  104. package/src/features/mathml/openxml.d.ts +56 -0
  105. package/src/features/mathml/openxml.js +87 -0
  106. package/src/features/mathml/parse/math-parser.d.ts +43 -0
  107. package/src/features/mathml/parse/math-parser.js +636 -0
  108. package/src/features/mathml/serialize/math-serializer.d.ts +34 -0
  109. package/src/features/mathml/serialize/math-serializer.js +749 -0
  110. package/src/features/smart-art/diagram-xml.d.ts +63 -0
  111. package/src/features/smart-art/diagram-xml.js +459 -0
  112. package/src/features/smart-art/errors.d.ts +24 -0
  113. package/src/features/smart-art/errors.js +47 -0
  114. package/src/features/smart-art/index.d.ts +26 -0
  115. package/src/features/smart-art/index.js +26 -0
  116. package/src/features/smart-art/minimal-samples.d.ts +18 -0
  117. package/src/features/smart-art/minimal-samples.js +40 -0
  118. package/src/features/smart-art/mutators.d.ts +60 -0
  119. package/src/features/smart-art/mutators.js +566 -0
  120. package/src/features/smart-art/namespaces.d.ts +153 -0
  121. package/src/features/smart-art/namespaces.js +163 -0
  122. package/src/features/smart-art/package-graph.d.ts +61 -0
  123. package/src/features/smart-art/package-graph.js +413 -0
  124. package/src/features/smart-art/parse-colors.d.ts +19 -0
  125. package/src/features/smart-art/parse-colors.js +39 -0
  126. package/src/features/smart-art/parse-data.d.ts +21 -0
  127. package/src/features/smart-art/parse-data.js +121 -0
  128. package/src/features/smart-art/parse-layout.d.ts +20 -0
  129. package/src/features/smart-art/parse-layout.js +40 -0
  130. package/src/features/smart-art/parse-rel-ids.d.ts +71 -0
  131. package/src/features/smart-art/parse-rel-ids.js +233 -0
  132. package/src/features/smart-art/parse-style.d.ts +19 -0
  133. package/src/features/smart-art/parse-style.js +39 -0
  134. package/src/features/smart-art/point-text.d.ts +80 -0
  135. package/src/features/smart-art/point-text.js +424 -0
  136. package/src/features/smart-art/register.d.ts +33 -0
  137. package/src/features/smart-art/register.js +95 -0
  138. package/src/features/smart-art/serialize.d.ts +40 -0
  139. package/src/features/smart-art/serialize.js +48 -0
  140. package/src/features/smart-art/types.d.ts +403 -0
  141. package/src/features/smart-art/types.js +28 -0
  142. package/src/global.js +1 -0
  143. package/src/index.d.ts +21 -0
  144. package/src/index.js +22 -0
  145. package/tsconfig.build.json +13 -0
  146. package/tsconfig.harness.json +32 -0
  147. package/tslint.json +111 -0
@@ -0,0 +1,96 @@
1
+ /**
2
+ * SmartArtDiagram — bound instance of data + layout + style + colors + optional drawing.
3
+ * Host detection via a:graphicData@uri + dgm:relIds (CT_RelIds).
4
+ *
5
+ * Citations:
6
+ * - dml-diagram.xsd CT_RelIds (r:dm, r:lo, r:qs, r:cs all REQUIRED)
7
+ * - Requirement §16.3 host embedding
8
+ * - [MS-ODRAWXML] optional diagramDrawing
9
+ */
10
+ import { DIAGRAM_GRAPHIC_DATA_URI } from './constants';
11
+ import { DiagramDataModel } from './diagram-data-model';
12
+ import { DiagramColors, DiagramDrawing, DiagramLayout, DiagramQuickStyle } from './diagram-views';
13
+ import { ElementNode } from './element-tree';
14
+ declare const SMART_ART_BRAND: unique symbol;
15
+ /**
16
+ * CT_RelIds relationship id quartet (all required on markup).
17
+ * Values are relationship Ids (e.g. rId1), not target URIs.
18
+ */
19
+ export interface DiagramRelIds {
20
+ readonly dm: string;
21
+ readonly lo: string;
22
+ readonly qs: string;
23
+ readonly cs: string;
24
+ }
25
+ export interface SmartArtDiagramInit {
26
+ readonly relIds: DiagramRelIds;
27
+ readonly data: DiagramDataModel;
28
+ readonly layout: DiagramLayout;
29
+ readonly quickStyle: DiagramQuickStyle;
30
+ readonly colors: DiagramColors;
31
+ readonly drawing?: DiagramDrawing | null;
32
+ /**
33
+ * Optional relationship id of the MS drawing part when present.
34
+ * Source may be dataModel/extLst dsp:dataModelExt/@relId (Word-observed)
35
+ * or another package path — preserve as found.
36
+ */
37
+ readonly drawingRelId?: string | null;
38
+ readonly drawingRelSource?: 'dataModelExt' | 'package' | 'unknown' | null;
39
+ }
40
+ /**
41
+ * Read CT_RelIds from a `dgm:relIds` element.
42
+ * Attributes are in the relationships namespace: r:dm, r:lo, r:qs, r:cs.
43
+ */
44
+ export declare function parseRelIds(el: ElementNode): DiagramRelIds;
45
+ /**
46
+ * Detect whether an a:graphicData (or subtree) hosts a diagram.
47
+ * Returns relIds element when DIAGRAM_GRAPHIC_DATA_URI matches and dgm:relIds present.
48
+ */
49
+ export declare function findDiagramRelIdsInGraphicData(graphicData: ElementNode): {
50
+ relIdsEl: ElementNode;
51
+ relIds: DiagramRelIds;
52
+ } | undefined;
53
+ /**
54
+ * Walk a host fragment (e.g. w:drawing) looking for diagram graphicData.
55
+ */
56
+ export declare function detectSmartArtInTree(tree: ElementNode): {
57
+ graphicData: ElementNode;
58
+ relIds: DiagramRelIds;
59
+ } | undefined;
60
+ export declare function isSmartArtGraphicDataUri(uri: string | null | undefined): boolean;
61
+ /**
62
+ * Bound SmartArt instance. `data()` returns DiagramDataModel (instanceof).
63
+ */
64
+ export declare class SmartArtDiagram {
65
+ readonly [SMART_ART_BRAND]: true;
66
+ private _relIds;
67
+ private _data;
68
+ private _layout;
69
+ private _quickStyle;
70
+ private _colors;
71
+ private _drawing;
72
+ private _drawingRelId;
73
+ private _drawingRelSource;
74
+ constructor(init: SmartArtDiagramInit);
75
+ readonly relIds: DiagramRelIds;
76
+ /** Requirement contract: data() instanceof DiagramDataModel. */
77
+ data(): DiagramDataModel;
78
+ layout(): DiagramLayout;
79
+ quickStyle(): DiagramQuickStyle;
80
+ colors(): DiagramColors;
81
+ drawing(): DiagramDrawing | null;
82
+ readonly drawingRelId: string | null;
83
+ readonly drawingRelSource: 'dataModelExt' | 'package' | 'unknown' | null;
84
+ setDrawing(drawing: DiagramDrawing | null, relId?: string | null): void;
85
+ /**
86
+ * True when any bound part is dirty (needs serialize on apply).
87
+ */
88
+ isDirty(): boolean;
89
+ clone(): SmartArtDiagram;
90
+ }
91
+ /**
92
+ * @private
93
+ */
94
+ export declare function isSmartArtDiagram(value: unknown): value is SmartArtDiagram;
95
+ /** Public constant re-export convenience for hosts. */
96
+ export { DIAGRAM_GRAPHIC_DATA_URI };
@@ -0,0 +1,258 @@
1
+ /**
2
+ * SmartArtDiagram — bound instance of data + layout + style + colors + optional drawing.
3
+ * Host detection via a:graphicData@uri + dgm:relIds (CT_RelIds).
4
+ *
5
+ * Citations:
6
+ * - dml-diagram.xsd CT_RelIds (r:dm, r:lo, r:qs, r:cs all REQUIRED)
7
+ * - Requirement §16.3 host embedding
8
+ * - [MS-ODRAWXML] optional diagramDrawing
9
+ */
10
+ var __assign = (this && this.__assign) || function () {
11
+ __assign = Object.assign || function(t) {
12
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
13
+ s = arguments[i];
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
15
+ t[p] = s[p];
16
+ }
17
+ return t;
18
+ };
19
+ return __assign.apply(this, arguments);
20
+ };
21
+ var __values = (this && this.__values) || function (o) {
22
+ var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
23
+ if (m) return m.call(o);
24
+ return {
25
+ next: function () {
26
+ if (o && i >= o.length) o = void 0;
27
+ return { value: o && o[i++], done: !o };
28
+ }
29
+ };
30
+ };
31
+ var _a;
32
+ import { DIAGRAM_GRAPHIC_DATA_URI, isDiagramGraphicDataUri, isDgmNamespace, isRNamespace, R_NAMESPACE } from './constants';
33
+ import { isDiagramDataModel } from './diagram-data-model';
34
+ import { isDiagramColors, isDiagramDrawing, isDiagramLayout, isDiagramQuickStyle } from './diagram-views';
35
+ import { findChild, findChildren, getAttr, getAttrNS } from './element-tree';
36
+ import { DiagramError, DiagramParseError } from './errors';
37
+ var SMART_ART_BRAND = Symbol.for('@syncfusion/ej2-office-common.SmartArtDiagram');
38
+ function requireRelId(value, name) {
39
+ if (value == null || value === '') {
40
+ throw new DiagramParseError('invalid_rel_ids', "dgm:relIds missing required r:" + name + ".");
41
+ }
42
+ return value;
43
+ }
44
+ /**
45
+ * Read CT_RelIds from a `dgm:relIds` element.
46
+ * Attributes are in the relationships namespace: r:dm, r:lo, r:qs, r:cs.
47
+ */
48
+ export function parseRelIds(el) {
49
+ if (!isDgmNamespace(el.namespaceUri) || el.localName !== 'relIds') {
50
+ throw new DiagramParseError('invalid_root', "Expected dgm:relIds, got {" + (el.namespaceUri != null ? el.namespaceUri : 'null') + "}" + el.localName + ".");
51
+ }
52
+ var read = function (local) {
53
+ // Prefer r: NS; fall back to unprefixed / any.
54
+ var nsVal = function () {
55
+ var _nc = function () {
56
+ var _nc = getAttrNS(el, local, R_NAMESPACE);
57
+ return _nc != null ? _nc : (function () {
58
+ var e_1, _a;
59
+ try {
60
+ for (var _b = __values(el.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
61
+ var a = _c.value;
62
+ if (a.name === local && isRNamespace(a.namespaceUri != null ? a.namespaceUri : null))
63
+ return a.value;
64
+ }
65
+ }
66
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
67
+ finally {
68
+ try {
69
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
70
+ }
71
+ finally { if (e_1) throw e_1.error; }
72
+ }
73
+ return undefined;
74
+ })();
75
+ }();
76
+ return _nc != null ? _nc : getAttr(el, local);
77
+ }();
78
+ return requireRelId(nsVal, local);
79
+ };
80
+ return {
81
+ dm: read('dm'),
82
+ lo: read('lo'),
83
+ qs: read('qs'),
84
+ cs: read('cs')
85
+ };
86
+ }
87
+ /**
88
+ * Detect whether an a:graphicData (or subtree) hosts a diagram.
89
+ * Returns relIds element when DIAGRAM_GRAPHIC_DATA_URI matches and dgm:relIds present.
90
+ */
91
+ export function findDiagramRelIdsInGraphicData(graphicData) {
92
+ var uri = getAttr(graphicData, 'uri');
93
+ if (!isDiagramGraphicDataUri(uri))
94
+ return undefined;
95
+ var relIdsEl = function () {
96
+ var _nc = findChild(graphicData, 'relIds', isDgmNamespace);
97
+ return _nc != null ? _nc : findChildren(graphicData, 'relIds').find(function (c) { return isDgmNamespace(c.namespaceUri); });
98
+ }();
99
+ if (!relIdsEl)
100
+ return undefined;
101
+ return {
102
+ relIdsEl: relIdsEl,
103
+ relIds: parseRelIds(relIdsEl)
104
+ };
105
+ }
106
+ /**
107
+ * Walk a host fragment (e.g. w:drawing) looking for diagram graphicData.
108
+ */
109
+ export function detectSmartArtInTree(tree) {
110
+ var e_2, _a;
111
+ var stack = [tree];
112
+ while (stack.length > 0) {
113
+ var n = stack.pop();
114
+ if (n === undefined)
115
+ break;
116
+ if (n.localName === 'graphicData') {
117
+ var hit = findDiagramRelIdsInGraphicData(n);
118
+ if (hit)
119
+ return {
120
+ graphicData: n,
121
+ relIds: hit.relIds
122
+ };
123
+ }
124
+ try {
125
+ for (var _b = __values(n.children), _c = _b.next(); !_c.done; _c = _b.next()) {
126
+ var c = _c.value;
127
+ if (c.kind === 'element')
128
+ stack.push(c);
129
+ }
130
+ }
131
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
132
+ finally {
133
+ try {
134
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
135
+ }
136
+ finally { if (e_2) throw e_2.error; }
137
+ }
138
+ }
139
+ return undefined;
140
+ }
141
+ export function isSmartArtGraphicDataUri(uri) {
142
+ return isDiagramGraphicDataUri(uri);
143
+ }
144
+ /**
145
+ * Bound SmartArt instance. `data()` returns DiagramDataModel (instanceof).
146
+ */
147
+ var SmartArtDiagram = /** @class */ (function () {
148
+ function SmartArtDiagram(init) {
149
+ this[_a] = true;
150
+ if (!isDiagramDataModel(init.data)) {
151
+ throw new DiagramError('catalog_error', 'SmartArtDiagram.data must be DiagramDataModel.');
152
+ }
153
+ if (!isDiagramLayout(init.layout)) {
154
+ throw new DiagramError('catalog_error', 'SmartArtDiagram.layout must be DiagramLayout.');
155
+ }
156
+ if (!isDiagramQuickStyle(init.quickStyle)) {
157
+ throw new DiagramError('catalog_error', 'SmartArtDiagram.quickStyle must be DiagramQuickStyle.');
158
+ }
159
+ if (!isDiagramColors(init.colors)) {
160
+ throw new DiagramError('catalog_error', 'SmartArtDiagram.colors must be DiagramColors.');
161
+ }
162
+ if (init.drawing != null && !isDiagramDrawing(init.drawing)) {
163
+ throw new DiagramError('catalog_error', 'SmartArtDiagram.drawing must be DiagramDrawing or null.');
164
+ }
165
+ this._relIds = __assign({}, init.relIds);
166
+ this._data = init.data;
167
+ this._layout = init.layout;
168
+ this._quickStyle = init.quickStyle;
169
+ this._colors = init.colors;
170
+ this._drawing = init.drawing != null ? init.drawing : null;
171
+ this._drawingRelId = init.drawingRelId != null ? init.drawingRelId : null;
172
+ this._drawingRelSource = init.drawingRelSource != null ? init.drawingRelSource : null;
173
+ }
174
+ Object.defineProperty(SmartArtDiagram.prototype, "relIds", {
175
+ get: function () {
176
+ return this._relIds;
177
+ },
178
+ enumerable: true,
179
+ configurable: true
180
+ });
181
+ /** Requirement contract: data() instanceof DiagramDataModel. */
182
+ SmartArtDiagram.prototype.data = function () {
183
+ return this._data;
184
+ };
185
+ SmartArtDiagram.prototype.layout = function () {
186
+ return this._layout;
187
+ };
188
+ SmartArtDiagram.prototype.quickStyle = function () {
189
+ return this._quickStyle;
190
+ };
191
+ SmartArtDiagram.prototype.colors = function () {
192
+ return this._colors;
193
+ };
194
+ SmartArtDiagram.prototype.drawing = function () {
195
+ return this._drawing;
196
+ };
197
+ Object.defineProperty(SmartArtDiagram.prototype, "drawingRelId", {
198
+ get: function () {
199
+ return this._drawingRelId;
200
+ },
201
+ enumerable: true,
202
+ configurable: true
203
+ });
204
+ Object.defineProperty(SmartArtDiagram.prototype, "drawingRelSource", {
205
+ get: function () {
206
+ return this._drawingRelSource;
207
+ },
208
+ enumerable: true,
209
+ configurable: true
210
+ });
211
+ SmartArtDiagram.prototype.setDrawing = function (drawing, relId) {
212
+ this._drawing = drawing;
213
+ if (relId !== undefined)
214
+ this._drawingRelId = relId;
215
+ };
216
+ /**
217
+ * True when any bound part is dirty (needs serialize on apply).
218
+ */
219
+ SmartArtDiagram.prototype.isDirty = function () {
220
+ if (this._data.dirty)
221
+ return true;
222
+ if (this._layout.dirty)
223
+ return true;
224
+ if (this._quickStyle.dirty)
225
+ return true;
226
+ if (this._colors.dirty)
227
+ return true;
228
+ if (this._drawing == null ? void 0 : this._drawing.dirty)
229
+ return true;
230
+ return false;
231
+ };
232
+ SmartArtDiagram.prototype.clone = function () {
233
+ var drawingClone = this._drawing != null ? this._drawing.clone() : null;
234
+ return new SmartArtDiagram({
235
+ relIds: __assign({}, this._relIds),
236
+ data: this._data.clone({
237
+ copyDirty: true
238
+ }),
239
+ layout: this._layout.clone(),
240
+ quickStyle: this._quickStyle.clone(),
241
+ colors: this._colors.clone(),
242
+ drawing: drawingClone,
243
+ drawingRelId: this._drawingRelId,
244
+ drawingRelSource: this._drawingRelSource
245
+ });
246
+ };
247
+ return SmartArtDiagram;
248
+ }());
249
+ export { SmartArtDiagram };
250
+ _a = SMART_ART_BRAND;
251
+ /**
252
+ * @private
253
+ */
254
+ export function isSmartArtDiagram(value) {
255
+ return value instanceof SmartArtDiagram;
256
+ }
257
+ /** Public constant re-export convenience for hosts. */
258
+ export { DIAGRAM_GRAPHIC_DATA_URI };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Optional feature modules for EJ2 Office common codecs.
3
+ *
4
+ * Root/`features` umbrella re-exports ink and mathml (same as `src/index.ts`
5
+ * feature surface). Diagrams and SmartArt stay on subpaths / `src/all.ts`
6
+ * because they share many public names and must not star-collide.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ export * from './ink/index';
11
+ export * from './mathml/index';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Optional feature modules for EJ2 Office common codecs.
3
+ *
4
+ * Root/`features` umbrella re-exports ink and mathml (same as `src/index.ts`
5
+ * feature surface). Diagrams and SmartArt stay on subpaths / `src/all.ts`
6
+ * because they share many public names and must not star-collide.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ export * from './ink/index';
11
+ export * from './mathml/index';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Cited InkML / Wordprocessing ink constants.
3
+ *
4
+ * Sources:
5
+ * - W3C InkML 1.0 §1 / namespace declaration
6
+ * - ECMA-376 Part 1 content types; [MS-ODRAWXML] §2.1.4 ink part
7
+ * - ECMA-376-1 §17.3.3.2 / [MS-ODRAWXML] §2.1.4 customXml relationship for ink source
8
+ * - [MS-ODRAWXML] §2.15 WordprocessingML 2010 namespace
9
+ * - [MS-ODRAWXML] §2.2.7.6 `wordprocessingInk` graphicData URI
10
+ */
11
+ /**
12
+ * InkML namespace URI.
13
+ *
14
+ * Source: W3C InkML 1.0 (`http://www.w3.org/2003/InkML`).
15
+ *
16
+ * @public
17
+ */
18
+ export declare const INKML_NAMESPACE = "http://www.w3.org/2003/InkML";
19
+ /**
20
+ * Content type for an InkML part.
21
+ *
22
+ * Source: [MS-ODRAWXML] §2.1.4 / Office content-type vocabulary —
23
+ * `application/inkml+xml`.
24
+ *
25
+ * @public
26
+ */
27
+ export declare const INK_CONTENT_TYPE = "application/inkml+xml";
28
+ /**
29
+ * Relationship type used by Word documents to bind the ink source part.
30
+ *
31
+ * Source: ECMA-376-1 §17.3.3.2; [MS-ODRAWXML] §2.1.4 —
32
+ * `…/relationships/customXml` (internal target mode).
33
+ *
34
+ * @public
35
+ */
36
+ export declare const INK_SOURCE_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
37
+ /**
38
+ * WordprocessingML 2010 namespace (`w14:`).
39
+ *
40
+ * Source: [MS-ODRAWXML] §2.15 —
41
+ * `http://schemas.microsoft.com/office/word/2010/wordml`.
42
+ *
43
+ * @public
44
+ */
45
+ export declare const WORDML_2010_NAMESPACE = "http://schemas.microsoft.com/office/word/2010/wordml";
46
+ /**
47
+ * DrawingML `a:graphicData/@uri` value for wordprocessing ink content.
48
+ *
49
+ * Source: [MS-ODRAWXML] §2.2.7.6 —
50
+ * `http://schemas.microsoft.com/office/word/2010/wordprocessingInk`.
51
+ *
52
+ * @public
53
+ */
54
+ export declare const WORDPROCESSING_INK_URI = "http://schemas.microsoft.com/office/word/2010/wordprocessingInk";
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Cited InkML / Wordprocessing ink constants.
3
+ *
4
+ * Sources:
5
+ * - W3C InkML 1.0 §1 / namespace declaration
6
+ * - ECMA-376 Part 1 content types; [MS-ODRAWXML] §2.1.4 ink part
7
+ * - ECMA-376-1 §17.3.3.2 / [MS-ODRAWXML] §2.1.4 customXml relationship for ink source
8
+ * - [MS-ODRAWXML] §2.15 WordprocessingML 2010 namespace
9
+ * - [MS-ODRAWXML] §2.2.7.6 `wordprocessingInk` graphicData URI
10
+ */
11
+ /**
12
+ * InkML namespace URI.
13
+ *
14
+ * Source: W3C InkML 1.0 (`http://www.w3.org/2003/InkML`).
15
+ *
16
+ * @public
17
+ */
18
+ export var INKML_NAMESPACE = 'http://www.w3.org/2003/InkML';
19
+ /**
20
+ * Content type for an InkML part.
21
+ *
22
+ * Source: [MS-ODRAWXML] §2.1.4 / Office content-type vocabulary —
23
+ * `application/inkml+xml`.
24
+ *
25
+ * @public
26
+ */
27
+ export var INK_CONTENT_TYPE = 'application/inkml+xml';
28
+ /**
29
+ * Relationship type used by Word documents to bind the ink source part.
30
+ *
31
+ * Source: ECMA-376-1 §17.3.3.2; [MS-ODRAWXML] §2.1.4 —
32
+ * `…/relationships/customXml` (internal target mode).
33
+ *
34
+ * @public
35
+ */
36
+ export var INK_SOURCE_RELATIONSHIP_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml';
37
+ /**
38
+ * WordprocessingML 2010 namespace (`w14:`).
39
+ *
40
+ * Source: [MS-ODRAWXML] §2.15 —
41
+ * `http://schemas.microsoft.com/office/word/2010/wordml`.
42
+ *
43
+ * @public
44
+ */
45
+ export var WORDML_2010_NAMESPACE = 'http://schemas.microsoft.com/office/word/2010/wordml';
46
+ /**
47
+ * DrawingML `a:graphicData/@uri` value for wordprocessing ink content.
48
+ *
49
+ * Source: [MS-ODRAWXML] §2.2.7.6 —
50
+ * `http://schemas.microsoft.com/office/word/2010/wordprocessingInk`.
51
+ *
52
+ * @public
53
+ */
54
+ export var WORDPROCESSING_INK_URI = 'http://schemas.microsoft.com/office/word/2010/wordprocessingInk';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Optional ink feature module (`@syncfusion/ej2-office-common/ink`).
3
+ *
4
+ * Provides the shared InkML DOM model, pure trace codec, authoring helpers,
5
+ * cited constants, effect→color table, and InkML parse/serialize (TASK-9003).
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ export { INKML_NAMESPACE, INK_CONTENT_TYPE, INK_SOURCE_RELATIONSHIP_TYPE, WORDML_2010_NAMESPACE, WORDPROCESSING_INK_URI, } from './constants';
10
+ export { INK_EFFECT_COLORS, inkEffectColor } from './ink-effects';
11
+ export { InkBounds, InkExtent, InkPoint, TraceDecodeResult, TraceDecodeStats, } from './trace-codec';
12
+ export { computeInkBounds, decodeTrace, encodeTrace, scalePointsStretch, scalePointsUniform, } from './trace-codec';
13
+ export { InkBrush, InkChannel, InkContext, InkEffectType, InkTrace, OfficeInk, } from './ink-model';
14
+ export { addInkTrace, cloneInk, createInk, inkPathPoints, isOfficeInk, setInkScaleMode, } from './ink-model';
15
+ export { InkParseDiagnostic, InkParseDiagnostics } from './ink-parser';
16
+ export { DIAG_INVALID_INK_TRACE, getLastInkParseDiagnostics, parseInkXml, } from './ink-parser';
17
+ export { serializeInkXml } from './ink-serializer';
18
+ export { EMUS_PER_POINT, formatUnitValue, pointsToUnit, unitValueToPoints } from './ink-units';
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Optional ink feature module (`@syncfusion/ej2-office-common/ink`).
3
+ *
4
+ * Provides the shared InkML DOM model, pure trace codec, authoring helpers,
5
+ * cited constants, effect→color table, and InkML parse/serialize (TASK-9003).
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ export { INKML_NAMESPACE, INK_CONTENT_TYPE, INK_SOURCE_RELATIONSHIP_TYPE, WORDML_2010_NAMESPACE, WORDPROCESSING_INK_URI, } from './constants';
10
+ export { INK_EFFECT_COLORS, inkEffectColor } from './ink-effects';
11
+ export { computeInkBounds, decodeTrace, encodeTrace, scalePointsStretch, scalePointsUniform, } from './trace-codec';
12
+ export { addInkTrace, cloneInk, createInk, inkPathPoints, isOfficeInk, setInkScaleMode, } from './ink-model';
13
+ export { DIAG_INVALID_INK_TRACE, getLastInkParseDiagnostics, parseInkXml, } from './ink-parser';
14
+ export { serializeInkXml } from './ink-serializer';
15
+ export { EMUS_PER_POINT, formatUnitValue, pointsToUnit, unitValueToPoints } from './ink-units';
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Effect → characteristic color mapping used when serializing ink brushes.
3
+ *
4
+ * Values are cited from the approved cross-repo ink specification
5
+ * (`ej2-docx/docs/specs/ink-dom-parse-serialize.md`, Internal semantic model —
6
+ * Effects → color), cross-checked against [MS-ODRAWXML] ink effect tokens.
7
+ *
8
+ * `'none'` and `'pencil'` do not override stroke color.
9
+ */
10
+ import { InkEffectType } from './ink-model';
11
+ /**
12
+ * Characteristic colors for non-default ink visual effects.
13
+ *
14
+ * | Effect | Color | Notes |
15
+ * |---|---|---|
16
+ * | bronze | `#BB5B18` | cited characteristic color |
17
+ * | silver | `#B4C3DA` | cited characteristic color |
18
+ * | gold | `#CC912C` | cited characteristic color |
19
+ * | roseGold | `#EEB3A6` | cited characteristic color |
20
+ * | ocean | `#0B868D` | cited characteristic color |
21
+ * | lava | `#DA0C07` | cited characteristic color |
22
+ * | rainbow | `#FF4E00` | cited characteristic color |
23
+ * | galaxy | `#AE198D` | cited characteristic color |
24
+ *
25
+ * @public
26
+ */
27
+ export declare const INK_EFFECT_COLORS: Readonly<Partial<Record<InkEffectType, string>>>;
28
+ /**
29
+ * Resolve the characteristic color for an effect, if any.
30
+ *
31
+ * Returns `undefined` for `'none'` / `'pencil'` (no color override).
32
+ *
33
+ * @public
34
+ */
35
+ export declare function inkEffectColor(effect: InkEffectType): string | undefined;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Effect → characteristic color mapping used when serializing ink brushes.
3
+ *
4
+ * Values are cited from the approved cross-repo ink specification
5
+ * (`ej2-docx/docs/specs/ink-dom-parse-serialize.md`, Internal semantic model —
6
+ * Effects → color), cross-checked against [MS-ODRAWXML] ink effect tokens.
7
+ *
8
+ * `'none'` and `'pencil'` do not override stroke color.
9
+ */
10
+ /**
11
+ * Characteristic colors for non-default ink visual effects.
12
+ *
13
+ * | Effect | Color | Notes |
14
+ * |---|---|---|
15
+ * | bronze | `#BB5B18` | cited characteristic color |
16
+ * | silver | `#B4C3DA` | cited characteristic color |
17
+ * | gold | `#CC912C` | cited characteristic color |
18
+ * | roseGold | `#EEB3A6` | cited characteristic color |
19
+ * | ocean | `#0B868D` | cited characteristic color |
20
+ * | lava | `#DA0C07` | cited characteristic color |
21
+ * | rainbow | `#FF4E00` | cited characteristic color |
22
+ * | galaxy | `#AE198D` | cited characteristic color |
23
+ *
24
+ * @public
25
+ */
26
+ export var INK_EFFECT_COLORS = Object.freeze({
27
+ bronze: '#BB5B18',
28
+ silver: '#B4C3DA',
29
+ gold: '#CC912C',
30
+ roseGold: '#EEB3A6',
31
+ ocean: '#0B868D',
32
+ lava: '#DA0C07',
33
+ rainbow: '#FF4E00',
34
+ galaxy: '#AE198D',
35
+ });
36
+ /**
37
+ * Resolve the characteristic color for an effect, if any.
38
+ *
39
+ * Returns `undefined` for `'none'` / `'pencil'` (no color override).
40
+ *
41
+ * @public
42
+ */
43
+ export function inkEffectColor(effect) {
44
+ return INK_EFFECT_COLORS[effect];
45
+ }