@stll/folio-core 0.8.0 → 0.10.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.
Files changed (168) hide show
  1. package/README.md +39 -0
  2. package/dist/ai-edits/apply.js +18 -4
  3. package/dist/ai-edits/headless.d.ts +73 -6
  4. package/dist/ai-edits/headless.js +299 -60
  5. package/dist/ai-edits/index.d.ts +3 -3
  6. package/dist/ai-edits/index.js +2 -1
  7. package/dist/ai-edits/snapshot.js +40 -3
  8. package/dist/ai-edits/types.d.ts +2 -1
  9. package/dist/compat/eigenpal.d.ts +6 -4
  10. package/dist/compat/eigenpal.js +5 -3
  11. package/dist/controller/latestRequestGate.d.ts +13 -0
  12. package/dist/controller/latestRequestGate.js +16 -0
  13. package/dist/controller/layoutPipeline.js +13 -1
  14. package/dist/document-operations.d.ts +20 -4
  15. package/dist/document-operations.js +36 -15
  16. package/dist/document-stories.d.ts +10 -0
  17. package/dist/document-stories.js +27 -0
  18. package/dist/docx/blockContentParser.js +2 -2
  19. package/dist/docx/commentParser.js +1 -1
  20. package/dist/docx/compatibility.d.ts +3 -7
  21. package/dist/docx/compatibility.js +0 -11
  22. package/dist/docx/corePropertiesParser.d.ts +8 -0
  23. package/dist/docx/corePropertiesParser.js +53 -0
  24. package/dist/docx/encryption/agileDecryption.js +1 -1
  25. package/dist/docx/encryption/encryptionInfo.js +1 -1
  26. package/dist/docx/encryption/openEncryptedDocx.js +1 -1
  27. package/dist/docx/fontTableParser.d.ts +6 -0
  28. package/dist/docx/fontTableParser.js +72 -0
  29. package/dist/docx/groupDrawingParser.js +7 -2
  30. package/dist/docx/headerFooterParser.js +1 -1
  31. package/dist/docx/index.d.ts +2 -1
  32. package/dist/docx/index.js +2 -1
  33. package/dist/docx/metadataPrivacy.d.ts +40 -0
  34. package/dist/docx/metadataPrivacy.js +131 -0
  35. package/dist/docx/normalizeBaseDirection.js +1 -1
  36. package/dist/docx/numberingParser.js +1 -0
  37. package/dist/docx/paragraphParser.js +12 -1
  38. package/dist/docx/parser.d.ts +1 -1
  39. package/dist/docx/parser.js +16 -10
  40. package/dist/docx/rezip.d.ts +5 -4
  41. package/dist/docx/rezip.js +76 -13
  42. package/dist/docx/runConsolidator.js +4 -0
  43. package/dist/docx/runParser.js +19 -1
  44. package/dist/docx/selectiveSave.js +3 -3
  45. package/dist/docx/serializer/fontTableSerializer.d.ts +6 -0
  46. package/dist/docx/serializer/fontTableSerializer.js +26 -0
  47. package/dist/docx/serializer/headerFooterSerializer.js +1 -1
  48. package/dist/docx/serializer/paragraphSerializer.js +4 -0
  49. package/dist/docx/serializer/runSerializer.js +7 -0
  50. package/dist/docx/serializer/settingsSerializer.d.ts +6 -0
  51. package/dist/docx/serializer/settingsSerializer.js +16 -0
  52. package/dist/docx/serializer/stylesSerializer.d.ts +6 -0
  53. package/dist/docx/serializer/stylesSerializer.js +56 -0
  54. package/dist/docx/serializer/tableSerializer.js +25 -26
  55. package/dist/docx/serializer/themeSerializer.d.ts +6 -0
  56. package/dist/docx/serializer/themeSerializer.js +36 -0
  57. package/dist/docx/settingsParser.js +46 -0
  58. package/dist/docx/styleParser.js +26 -1
  59. package/dist/docx/tableParser.js +11 -1
  60. package/dist/docx/vmlImageParser.js +1 -0
  61. package/dist/i18n/messages/catalogs.gen.d.ts +5916 -5916
  62. package/dist/i18n/messages/catalogs.gen.js +5910 -5910
  63. package/dist/index.d.ts +6 -4
  64. package/dist/index.js +5 -3
  65. package/dist/layout-bridge/convert/footnoteLayout.d.ts +3 -0
  66. package/dist/layout-bridge/convert/footnoteLayout.js +3 -1
  67. package/dist/layout-bridge/convert/headerFooterLayout.d.ts +3 -0
  68. package/dist/layout-bridge/convert/headerFooterLayout.js +6 -1
  69. package/dist/layout-bridge/convert/toFlowBlocks.d.ts +14 -2
  70. package/dist/layout-bridge/convert/toFlowBlocks.js +52 -14
  71. package/dist/layout-bridge/engine/measuring/index.d.ts +2 -1
  72. package/dist/layout-bridge/engine/measuring/index.js +2 -1
  73. package/dist/layout-engine/index.js +36 -28
  74. package/dist/layout-engine/measure/cache.js +6 -3
  75. package/dist/layout-engine/measure/effectiveLineBreakPolicy.d.ts +29 -0
  76. package/dist/layout-engine/measure/effectiveLineBreakPolicy.js +60 -0
  77. package/dist/layout-engine/measure/font-metrics.worker.js +1 -0
  78. package/dist/layout-engine/measure/index.d.ts +2 -1
  79. package/dist/layout-engine/measure/index.js +2 -1
  80. package/dist/layout-engine/measure/lineBreakProvider.d.ts +33 -0
  81. package/dist/layout-engine/measure/lineBreakProvider.js +252 -0
  82. package/dist/layout-engine/measure/lineBreaks.d.ts +7 -2
  83. package/dist/layout-engine/measure/lineBreaks.js +11 -18
  84. package/dist/layout-engine/measure/listMarkerWidth.d.ts +1 -0
  85. package/dist/layout-engine/measure/listMarkerWidth.js +12 -6
  86. package/dist/layout-engine/measure/measureBlocks.d.ts +1 -2
  87. package/dist/layout-engine/measure/measureBlocks.js +6 -36
  88. package/dist/layout-engine/measure/measureContainer.js +32 -9
  89. package/dist/layout-engine/measure/measureHelpers.js +5 -2
  90. package/dist/layout-engine/measure/measureParagraph.js +332 -73
  91. package/dist/layout-engine/measure/measureTypes.d.ts +2 -1
  92. package/dist/layout-engine/measure/measureWorker.d.ts +2 -2
  93. package/dist/layout-engine/measure/measureWorker.js +8 -19
  94. package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +3 -14
  95. package/dist/layout-engine/measure/tableCellFloating.d.ts +10 -3
  96. package/dist/layout-engine/measure/tableCellFloating.js +51 -37
  97. package/dist/layout-engine/measure/tableCellFlow.d.ts +27 -0
  98. package/dist/layout-engine/measure/tableCellFlow.js +73 -0
  99. package/dist/layout-engine/measure/tableCellGrid.js +1 -1
  100. package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +18 -0
  101. package/dist/layout-engine/measure/textMeasurementPolicy.js +24 -0
  102. package/dist/layout-engine/renderedBreakReconciliation.d.ts +6 -1
  103. package/dist/layout-engine/renderedBreakReconciliation.js +34 -11
  104. package/dist/layout-engine/tableRowBreak.d.ts +5 -2
  105. package/dist/layout-engine/tableRowBreak.js +62 -29
  106. package/dist/layout-engine/types.d.ts +43 -8
  107. package/dist/layout-painter/anchoredImagePosition.d.ts +23 -0
  108. package/dist/layout-painter/anchoredImagePosition.js +95 -0
  109. package/dist/layout-painter/borderStroke.d.ts +23 -0
  110. package/dist/layout-painter/borderStroke.js +39 -0
  111. package/dist/layout-painter/renderImage.d.ts +5 -4
  112. package/dist/layout-painter/renderImage.js +18 -4
  113. package/dist/layout-painter/renderPage.d.ts +2 -27
  114. package/dist/layout-painter/renderPage.js +13 -99
  115. package/dist/layout-painter/renderParagraph.js +41 -23
  116. package/dist/layout-painter/renderTable.d.ts +2 -0
  117. package/dist/layout-painter/renderTable.js +223 -43
  118. package/dist/managers/DocumentLoaderManager.d.ts +1 -1
  119. package/dist/managers/DocumentLoaderManager.js +2 -2
  120. package/dist/prosemirror/attrs/index.d.ts +4 -2
  121. package/dist/prosemirror/attrs/index.js +22 -2
  122. package/dist/prosemirror/commands/propertyChangeScope.js +1 -1
  123. package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +62 -0
  124. package/dist/prosemirror/conversion/effectiveTableCellFormatting.js +131 -0
  125. package/dist/prosemirror/conversion/fromProseDoc.js +34 -18
  126. package/dist/prosemirror/conversion/toProseDoc.js +81 -77
  127. package/dist/prosemirror/extensions/StarterKit.js +2 -0
  128. package/dist/prosemirror/extensions/core/ParagraphExtension.js +7 -2
  129. package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.js +1 -1
  130. package/dist/prosemirror/extensions/features/ListExtension.js +1 -0
  131. package/dist/prosemirror/extensions/marks/FootnoteRefExtension.js +1 -0
  132. package/dist/prosemirror/extensions/marks/HighlightExtension.js +1 -1
  133. package/dist/prosemirror/extensions/marks/LanguageExtension.d.ts +7 -0
  134. package/dist/prosemirror/extensions/marks/LanguageExtension.js +30 -0
  135. package/dist/prosemirror/extensions/marks/RunShadingExtension.js +1 -1
  136. package/dist/prosemirror/extensions/marks/TextColorExtension.js +1 -1
  137. package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.js +1 -1
  138. package/dist/prosemirror/extensions/marks/markUtils.js +12 -0
  139. package/dist/prosemirror/extensions/nodes/ImageExtension.js +3 -1
  140. package/dist/prosemirror/extensions/nodes/TableExtension.js +4 -2
  141. package/dist/prosemirror/schema/index.d.ts +2 -2
  142. package/dist/prosemirror/schema/marks.d.ts +6 -1
  143. package/dist/prosemirror/schema/nodes.d.ts +15 -12
  144. package/dist/prosemirror/styles/resolvedStyleAttrs.js +1 -0
  145. package/dist/prosemirror/utils/tabCalculator.d.ts +3 -1
  146. package/dist/prosemirror/utils/tabCalculator.js +12 -10
  147. package/dist/prosemirror/validation.js +4 -1
  148. package/dist/redline.d.ts +26 -11
  149. package/dist/redline.js +107 -64
  150. package/dist/server.d.ts +9 -5
  151. package/dist/server.js +8 -4
  152. package/dist/style-sets/extract.d.ts +35 -0
  153. package/dist/style-sets/extract.js +123 -0
  154. package/dist/style-sets/stellaStyle.d.ts +13 -0
  155. package/dist/style-sets/stellaStyle.js +516 -0
  156. package/dist/style-sets/types.d.ts +31 -0
  157. package/dist/style-sets/types.js +5 -0
  158. package/dist/utils/createDocument.d.ts +12 -2
  159. package/dist/utils/createDocument.js +42 -31
  160. package/dist/utils/fontResolver.js +6 -6
  161. package/dist/utils/formatToStyle.js +1 -1
  162. package/dist/utils/paragraphFormattingMerge.d.ts +14 -3
  163. package/dist/utils/paragraphFormattingMerge.js +14 -4
  164. package/dist/version-comparison.d.ts +65 -11
  165. package/dist/version-comparison.js +187 -29
  166. package/package.json +5 -1
  167. package/dist/docx/capabilities.d.ts +0 -41
  168. package/dist/docx/capabilities.js +0 -322
@@ -1,322 +0,0 @@
1
- import { TaggedError } from "better-result";
2
- //#region src/docx/capabilities.ts
3
- const FOLIO_DOCX_CAPABILITY_MANIFEST_VERSION = 1;
4
- const FOLIO_DOCX_CAPABILITY_HOSTS = Object.freeze(["browser", "server"]);
5
- const FOLIO_DOCX_COMPATIBILITY_HOSTS = Object.freeze([...FOLIO_DOCX_CAPABILITY_HOSTS, "unknown"]);
6
- const FOLIO_DOCX_PROFILES = Object.freeze(["strict", "transitional"]);
7
- const FOLIO_DOCX_COMPATIBILITY_PROFILES = Object.freeze([...FOLIO_DOCX_PROFILES, "unknown"]);
8
- const FOLIO_DOCX_CAPABILITY_OPERATIONS = Object.freeze([
9
- "create",
10
- "edit",
11
- "preserve",
12
- "read",
13
- "render"
14
- ]);
15
- const FOLIO_DOCX_SUPPORT_STATES = Object.freeze([
16
- "supported",
17
- "partial",
18
- "unsupported"
19
- ]);
20
- const FOLIO_DOCX_CAPABILITY_IDS = Object.freeze([
21
- "comments",
22
- "contentControls",
23
- "fields",
24
- "headersFooters",
25
- "hyperlinks",
26
- "images",
27
- "math",
28
- "notes",
29
- "numbering",
30
- "opaqueDrawing",
31
- "paragraphs",
32
- "sections",
33
- "styles",
34
- "tables",
35
- "trackedChanges"
36
- ]);
37
- const TRANSITIONAL_PROFILE_COVERAGE = Object.freeze(["transitional"]);
38
- const STRUCTURED_FEATURE_SUPPORT = Object.freeze({
39
- create: "supported",
40
- edit: "supported",
41
- preserve: "supported",
42
- read: "supported",
43
- render: "partial"
44
- });
45
- const PARTIAL_AUTHORING_FEATURE_SUPPORT = Object.freeze({
46
- create: "partial",
47
- edit: "partial",
48
- preserve: "supported",
49
- read: "supported",
50
- render: "partial"
51
- });
52
- const COMMENTS_CAPABILITY = Object.freeze({
53
- id: "comments",
54
- feature: "comments",
55
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
56
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
57
- support: STRUCTURED_FEATURE_SUPPORT,
58
- evidence: Object.freeze([{
59
- type: "test",
60
- path: "packages/core/src/docx/commentReplyThreads.test.ts"
61
- }, {
62
- type: "test",
63
- path: "packages/core/src/prosemirror/commands/comments.test.ts"
64
- }])
65
- });
66
- const CONTENT_CONTROLS_CAPABILITY = Object.freeze({
67
- id: "contentControls",
68
- feature: "contentControls",
69
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
70
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
71
- support: Object.freeze({
72
- ...PARTIAL_AUTHORING_FEATURE_SUPPORT,
73
- edit: "supported"
74
- }),
75
- evidence: Object.freeze([{
76
- type: "test",
77
- path: "packages/core/src/content-controls/contentControls.test.ts"
78
- }, {
79
- type: "test",
80
- path: "packages/core/src/docx/sdtRoundtrip.property.test.ts"
81
- }])
82
- });
83
- const FIELDS_CAPABILITY = Object.freeze({
84
- id: "fields",
85
- feature: "fields",
86
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
87
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
88
- support: PARTIAL_AUTHORING_FEATURE_SUPPORT,
89
- evidence: Object.freeze([{
90
- type: "test",
91
- path: "packages/core/src/fields/evaluateField.test.ts"
92
- }, {
93
- type: "test",
94
- path: "packages/core/src/prosemirror/extensions/nodes/FieldExtension.test.ts"
95
- }])
96
- });
97
- const HEADERS_FOOTERS_CAPABILITY = Object.freeze({
98
- id: "headersFooters",
99
- feature: "headersFooters",
100
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
101
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
102
- support: STRUCTURED_FEATURE_SUPPORT,
103
- evidence: Object.freeze([{
104
- type: "test",
105
- path: "packages/core/src/docx/headerFooterParser.test.ts"
106
- }, {
107
- type: "test",
108
- path: "packages/core/src/docx/headerFooterMaterialize.test.ts"
109
- }])
110
- });
111
- const HYPERLINKS_CAPABILITY = Object.freeze({
112
- id: "hyperlinks",
113
- feature: "hyperlinks",
114
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
115
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
116
- support: PARTIAL_AUTHORING_FEATURE_SUPPORT,
117
- evidence: Object.freeze([{
118
- type: "test",
119
- path: "packages/core/src/docx/hyperlinkParser.test.ts"
120
- }, {
121
- type: "test",
122
- path: "packages/core/src/prosemirror/conversion/toProseDoc-hyperlink-content.test.ts"
123
- }])
124
- });
125
- const IMAGES_CAPABILITY = Object.freeze({
126
- id: "images",
127
- feature: "images",
128
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
129
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
130
- support: Object.freeze({
131
- ...PARTIAL_AUTHORING_FEATURE_SUPPORT,
132
- edit: "supported"
133
- }),
134
- evidence: Object.freeze([{
135
- type: "test",
136
- path: "packages/core/src/docx/__tests__/image-crop-roundtrip.test.ts"
137
- }, {
138
- type: "test",
139
- path: "packages/core/src/prosemirror/commands/image.test.ts"
140
- }])
141
- });
142
- const MATH_CAPABILITY = Object.freeze({
143
- id: "math",
144
- feature: "math",
145
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
146
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
147
- support: PARTIAL_AUTHORING_FEATURE_SUPPORT,
148
- evidence: Object.freeze([{
149
- type: "test",
150
- path: "packages/core/src/docx/mathToMathml.test.ts"
151
- }, {
152
- type: "test",
153
- path: "packages/core/src/docx/serializer/math-roundtrip.test.ts"
154
- }])
155
- });
156
- const NOTES_CAPABILITY = Object.freeze({
157
- id: "notes",
158
- feature: "notes",
159
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
160
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
161
- support: Object.freeze({
162
- create: "partial",
163
- edit: "supported",
164
- preserve: "supported",
165
- read: "supported",
166
- render: "partial"
167
- }),
168
- evidence: Object.freeze([{
169
- type: "test",
170
- path: "packages/core/src/docx/noteSave.test.ts"
171
- }, {
172
- type: "test",
173
- path: "packages/core/src/layout-bridge/convert/footnoteLayout-collect.test.ts"
174
- }])
175
- });
176
- const NUMBERING_CAPABILITY = Object.freeze({
177
- id: "numbering",
178
- feature: "numbering",
179
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
180
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
181
- support: Object.freeze({
182
- create: "partial",
183
- edit: "supported",
184
- preserve: "supported",
185
- read: "supported",
186
- render: "partial"
187
- }),
188
- evidence: Object.freeze([{
189
- type: "test",
190
- path: "packages/core/src/docx/numberingParser-custom-format.test.ts"
191
- }, {
192
- type: "test",
193
- path: "packages/core/src/docx/numberingSave.test.ts"
194
- }])
195
- });
196
- const OPAQUE_DRAWING_CAPABILITY = Object.freeze({
197
- id: "opaqueDrawing",
198
- feature: "drawings",
199
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
200
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
201
- support: Object.freeze({
202
- create: "unsupported",
203
- edit: "unsupported",
204
- preserve: "supported",
205
- read: "supported",
206
- render: "partial"
207
- }),
208
- evidence: Object.freeze([{
209
- type: "test",
210
- path: "packages/core/src/docx/compatibility.test.ts"
211
- }, {
212
- type: "test",
213
- path: "packages/core/src/docx/rezip.test.ts"
214
- }])
215
- });
216
- const PARAGRAPHS_CAPABILITY = Object.freeze({
217
- id: "paragraphs",
218
- feature: "paragraphs",
219
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
220
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
221
- support: STRUCTURED_FEATURE_SUPPORT,
222
- evidence: Object.freeze([{
223
- type: "test",
224
- path: "packages/core/src/docx/paragraphParser.test.ts"
225
- }, {
226
- type: "test",
227
- path: "packages/core/src/docx/serializer/paragraphSerializer.test.ts"
228
- }])
229
- });
230
- const SECTIONS_CAPABILITY = Object.freeze({
231
- id: "sections",
232
- feature: "sections",
233
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
234
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
235
- support: STRUCTURED_FEATURE_SUPPORT,
236
- evidence: Object.freeze([{
237
- type: "test",
238
- path: "packages/core/src/docx/serializer/sectionPropertiesSerializer.test.ts"
239
- }, {
240
- type: "test",
241
- path: "packages/core/src/prosemirror/commands/sectionBreak.test.ts"
242
- }])
243
- });
244
- const STYLES_CAPABILITY = Object.freeze({
245
- id: "styles",
246
- feature: "styles",
247
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
248
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
249
- support: Object.freeze({
250
- create: "partial",
251
- edit: "partial",
252
- preserve: "supported",
253
- read: "supported",
254
- render: "partial"
255
- }),
256
- evidence: Object.freeze([{
257
- type: "test",
258
- path: "packages/core/src/docx/styleParser.test.ts"
259
- }, {
260
- type: "test",
261
- path: "packages/core/src/prosemirror/conversion/characterStyleRoundtrip.test.ts"
262
- }])
263
- });
264
- const TABLES_CAPABILITY = Object.freeze({
265
- id: "tables",
266
- feature: "tables",
267
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
268
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
269
- support: STRUCTURED_FEATURE_SUPPORT,
270
- evidence: Object.freeze([{
271
- type: "test",
272
- path: "packages/core/src/docx/tableParser.test.ts"
273
- }, {
274
- type: "test",
275
- path: "packages/core/src/prosemirror/conversion/tableBordersRoundtrip.test.ts"
276
- }])
277
- });
278
- const TRACKED_CHANGES_CAPABILITY = Object.freeze({
279
- id: "trackedChanges",
280
- feature: "revisions",
281
- hosts: FOLIO_DOCX_CAPABILITY_HOSTS,
282
- profiles: TRANSITIONAL_PROFILE_COVERAGE,
283
- support: STRUCTURED_FEATURE_SUPPORT,
284
- evidence: Object.freeze([{
285
- type: "test",
286
- path: "packages/core/src/redline.test.ts"
287
- }, {
288
- type: "test",
289
- path: "packages/core/src/prosemirror/plugins/suggestionMode.test.ts"
290
- }])
291
- });
292
- const FOLIO_DOCX_CAPABILITY_MANIFEST = Object.freeze({
293
- version: 1,
294
- capabilities: Object.freeze({
295
- comments: COMMENTS_CAPABILITY,
296
- contentControls: CONTENT_CONTROLS_CAPABILITY,
297
- fields: FIELDS_CAPABILITY,
298
- headersFooters: HEADERS_FOOTERS_CAPABILITY,
299
- hyperlinks: HYPERLINKS_CAPABILITY,
300
- images: IMAGES_CAPABILITY,
301
- math: MATH_CAPABILITY,
302
- notes: NOTES_CAPABILITY,
303
- numbering: NUMBERING_CAPABILITY,
304
- opaqueDrawing: OPAQUE_DRAWING_CAPABILITY,
305
- paragraphs: PARAGRAPHS_CAPABILITY,
306
- sections: SECTIONS_CAPABILITY,
307
- styles: STYLES_CAPABILITY,
308
- tables: TABLES_CAPABILITY,
309
- trackedChanges: TRACKED_CHANGES_CAPABILITY
310
- })
311
- });
312
- var InvalidFolioDocxCapabilityIdError = class extends TaggedError("InvalidFolioDocxCapabilityIdError")() {};
313
- const isFolioDocxCapabilityId = (value) => FOLIO_DOCX_CAPABILITY_IDS.some((id) => id === value);
314
- const getFolioDocxCapability = (id) => {
315
- if (!isFolioDocxCapabilityId(id)) throw new InvalidFolioDocxCapabilityIdError({
316
- message: "Invalid DOCX capability id.",
317
- receivedId: id
318
- });
319
- return FOLIO_DOCX_CAPABILITY_MANIFEST.capabilities[id];
320
- };
321
- //#endregion
322
- export { FOLIO_DOCX_CAPABILITY_HOSTS, FOLIO_DOCX_CAPABILITY_IDS, FOLIO_DOCX_CAPABILITY_MANIFEST, FOLIO_DOCX_CAPABILITY_MANIFEST_VERSION, FOLIO_DOCX_CAPABILITY_OPERATIONS, FOLIO_DOCX_COMPATIBILITY_HOSTS, FOLIO_DOCX_COMPATIBILITY_PROFILES, FOLIO_DOCX_PROFILES, FOLIO_DOCX_SUPPORT_STATES, InvalidFolioDocxCapabilityIdError, getFolioDocxCapability, isFolioDocxCapabilityId };