magic-editor-x 2.4.0 → 2.5.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/CHANGELOG.md +51 -0
- package/README.md +129 -6
- package/bin/magic-editor-x.mjs +55 -8
- package/dist/admin/{AuditPage-guB0SiGS.mjs → AuditPage-Be78C7EC.mjs} +4 -3
- package/dist/admin/{AuditPage-C2u6z4aN.js → AuditPage-iQzpjH8H.js} +7 -6
- package/dist/admin/{ConfigurationPage-DiEpF1Rr.mjs → ConfigurationPage-C9CPBfWy.mjs} +186 -6
- package/dist/admin/{ConfigurationPage-D6uya-J1.js → ConfigurationPage-DefuBeYO.js} +191 -11
- package/dist/admin/Content-BttG50Mc.mjs +360 -0
- package/dist/admin/Content-V5MRBsI3.js +362 -0
- package/dist/admin/{CustomBlocksPage-Byt10-6c.mjs → CustomBlocksPage-DB5nnCsn.mjs} +5 -4
- package/dist/admin/{CustomBlocksPage-DP3h_wNd.js → CustomBlocksPage-Dg2rM3F4.js} +8 -7
- package/dist/admin/EntryWidgets-B8YA0Zxy.mjs +199 -0
- package/dist/admin/EntryWidgets-BcXAAx3F.js +201 -0
- package/dist/admin/{MentionsWidget-sMkM9mHX.mjs → MentionsWidget-CJPZDk9Z.mjs} +2 -2
- package/dist/admin/{MentionsWidget-C2OCAmqq.js → MentionsWidget-DUz6YVIG.js} +2 -2
- package/dist/admin/{useT-CLPhBmBC.mjs → SectionCard-8ZNHkvn9.mjs} +2 -12
- package/dist/admin/{useT-BXJLIPN4.js → SectionCard-Bs-xiiH1.js} +0 -10
- package/dist/admin/{TemplatesPage-Yp4OqFE2.mjs → TemplatesPage-VsZ_Mc0R.mjs} +6 -5
- package/dist/admin/{TemplatesPage-DrSJdteI.js → TemplatesPage-dx4_yd_t.js} +13 -12
- package/dist/admin/{api-bix9RLLI.js → api-4AYzwS4-.js} +9 -1
- package/dist/admin/{api-2ZRpHM3d.mjs → api-CcTYyckq.mjs} +9 -1
- package/dist/admin/{de-zcV8D7nt.js → de-B6rdcOqQ.js} +103 -1
- package/dist/admin/{de-1cFMs-4c.mjs → de-BWfR2jTg.mjs} +8 -1
- package/dist/admin/{de-DiCZrmH8.mjs → de-Bip0sBRT.mjs} +19 -1
- package/dist/admin/{de-Dn8athM8.js → de-BrPR4sUB.js} +8 -1
- package/dist/admin/{de-CKz6CG3V.mjs → de-CQA8hOpl.mjs} +103 -1
- package/dist/admin/{de-CbBDnXeT.js → de-CnnxKXj7.js} +19 -1
- package/dist/admin/{de-BhhGss1l.js → de-Dss5POqk.js} +12 -1
- package/dist/admin/{de-BNPIGqhs.mjs → de-zgHCYTLH.mjs} +12 -1
- package/dist/admin/{en-CIZ5Ggod.js → en--JjAHbpP.js} +8 -1
- package/dist/admin/{en-cYzqbASF.mjs → en-BCKaVgBM.mjs} +103 -1
- package/dist/admin/{en-B9ApE1y1.js → en-CJ17Sp_e.js} +12 -1
- package/dist/admin/{en-BMWhILnj.js → en-CbGkcq0Q.js} +103 -1
- package/dist/admin/{en-DCPMqFIa.mjs → en-Cd6Jk-J0.mjs} +19 -1
- package/dist/admin/{en-CpehF0Kv.js → en-D69Fe9ZO.js} +19 -1
- package/dist/admin/{en-Dc9y-6n9.mjs → en-Dr58wBAo.mjs} +8 -1
- package/dist/admin/{en-gFLeK9Ng.mjs → en-Uhm7OouM.mjs} +12 -1
- package/dist/admin/entry-panel-events-0msyPrAD.js +18 -0
- package/dist/admin/entry-panel-events-XRuUoLZ9.mjs +19 -0
- package/dist/admin/{es-D2Kw6E4N.mjs → es-B2Hkkbw9.mjs} +8 -1
- package/dist/admin/{es-BmwBgEgz.mjs → es-BMkmfH88.mjs} +12 -1
- package/dist/admin/{es-Chs37IBR.mjs → es-Bz8d72Fa.mjs} +19 -1
- package/dist/admin/{es-CQPh8PXw.js → es-C8UotT8O.js} +103 -1
- package/dist/admin/{es-CawpzwyC.js → es-CcEDZpVQ.js} +19 -1
- package/dist/admin/{es-C0W31rl8.js → es-DJm3HFJt.js} +12 -1
- package/dist/admin/{es-C4IRHV5d.js → es-YvaTAtqY.js} +8 -1
- package/dist/admin/{es-DCamt1ek.mjs → es-pvPfNAld.mjs} +103 -1
- package/dist/admin/{fr-BOvvfEH7.mjs → fr-BvPjRiwr.mjs} +8 -1
- package/dist/admin/{fr-Dp5-XP29.mjs → fr-CKHZ0xxU.mjs} +19 -1
- package/dist/admin/{fr-iGeIfEcU.js → fr-CRM9VuAq.js} +12 -1
- package/dist/admin/{fr-CMWBNE5D.mjs → fr-CrIHmKYX.mjs} +12 -1
- package/dist/admin/{fr-COOsqexl.js → fr-Cx29jQ_g.js} +19 -1
- package/dist/admin/{fr-oW0t8bT5.mjs → fr-D4tL6Ag2.mjs} +103 -1
- package/dist/admin/{fr-Zkb8vfjN.js → fr-Di-U-rAH.js} +8 -1
- package/dist/admin/{fr-DpC44Ol8.js → fr-DrUYv2jh.js} +103 -1
- package/dist/admin/{index-BVjf1gVC.mjs → index-C4ksUkEm.mjs} +9183 -6353
- package/dist/admin/{index-64wc26Bl.js → index-C5D3VqLq.js} +9170 -6340
- package/dist/admin/{index-D_Fv8Non.mjs → index-CMYCZWOh.mjs} +1053 -190
- package/dist/admin/{index-D6Z7i8ba.js → index-DRyctF9s.js} +961 -98
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +2 -2
- package/dist/admin/{math-vsK_06ZR.js → math-D6jmskGS.js} +1 -1
- package/dist/admin/{math-CIQ4Z_mY.mjs → math-DntdSWKX.mjs} +1 -1
- package/dist/admin/{pt-DALDvfBn.mjs → pt-B8x7v-Xw.mjs} +19 -1
- package/dist/admin/{pt-DXy7G1x7.js → pt-BYn2xx78.js} +19 -1
- package/dist/admin/{pt-Bo0Pm_Pt.js → pt-CojQcz-p.js} +103 -1
- package/dist/admin/{pt-uGpfRQLC.mjs → pt-CuoIihKx.mjs} +103 -1
- package/dist/admin/{pt-1IUyx6ae.js → pt-CzrN_3ui.js} +8 -1
- package/dist/admin/{pt-DFNgZ5_k.mjs → pt-DDlPJYtB.mjs} +12 -1
- package/dist/admin/{pt-BHmXk2d9.js → pt-DPVAycXJ.js} +12 -1
- package/dist/admin/{pt-etwsg3G4.mjs → pt-DdGagO99.mjs} +8 -1
- package/dist/admin/useT-Bpw__IXT.js +12 -0
- package/dist/admin/useT-Cb-R3kyA.mjs +13 -0
- package/dist/blocks/index.d.mts +124 -0
- package/dist/blocks/index.d.ts +124 -0
- package/dist/blocks/index.js +172 -3
- package/dist/blocks/index.mjs +172 -3
- package/dist/math/index.js +6 -2
- package/dist/math/index.mjs +6 -2
- package/dist/react/index.js +1376 -1067
- package/dist/react/index.mjs +1376 -1067
- package/dist/render/index.d.mts +22 -0
- package/dist/render/index.d.ts +22 -0
- package/dist/render/index.js +1376 -1067
- package/dist/render/index.mjs +1376 -1067
- package/dist/server/index.js +28894 -24197
- package/dist/server/index.mjs +28893 -24196
- package/dist/server/mcp-worker.js +11319 -0
- package/dist/vue/index.js +1376 -1067
- package/dist/vue/index.mjs +1376 -1067
- package/package.json +7 -7
- package/schema/magic-editor-x.schema.json +9 -1
- package/types/blocks.d.ts +124 -0
- package/types/index.d.ts +10 -1
- package/types/render.d.ts +22 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magic-editor-x",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Free, open-source block editor for Strapi 5: Editor.js custom field with Media Library uploads, custom blocks, version history, live collaboration across several servers and an optional AI assistant with your own provider.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"@editorjs/attaches": "^1.3.2",
|
|
118
118
|
"@editorjs/code": "^2.9.4",
|
|
119
119
|
"@editorjs/editorjs": "^2.31.7",
|
|
120
|
-
"@editorjs/embed": "
|
|
120
|
+
"@editorjs/embed": "~2.7.7",
|
|
121
121
|
"@editorjs/header": "^2.8.9",
|
|
122
122
|
"@editorjs/image": "^2.10.3",
|
|
123
123
|
"@editorjs/inline-code": "^1.5.2",
|
|
@@ -148,11 +148,11 @@
|
|
|
148
148
|
"@semantic-release/github": "^12.0.10",
|
|
149
149
|
"@semantic-release/npm": "^13.2.0",
|
|
150
150
|
"@semantic-release/release-notes-generator": "^14.1.1",
|
|
151
|
-
"@strapi/design-system": "2.
|
|
152
|
-
"@strapi/icons": "2.
|
|
151
|
+
"@strapi/design-system": "^2.3.1",
|
|
152
|
+
"@strapi/icons": "^2.3.1",
|
|
153
153
|
"@strapi/sdk-plugin": "^6.1.1",
|
|
154
|
-
"@strapi/strapi": "^5.
|
|
155
|
-
"@strapi/utils": "^5.
|
|
154
|
+
"@strapi/strapi": "^5.62.0",
|
|
155
|
+
"@strapi/utils": "^5.62.0",
|
|
156
156
|
"better-sqlite3": "^13.0.3",
|
|
157
157
|
"esbuild": "^0.28.2",
|
|
158
158
|
"eslint": "^10.14.0",
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
}
|
|
197
197
|
},
|
|
198
198
|
"engines": {
|
|
199
|
-
"node": ">=22.
|
|
199
|
+
"node": ">=22.12.0 <=26.x.x"
|
|
200
200
|
},
|
|
201
201
|
"strapi": {
|
|
202
202
|
"kind": "plugin",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"$defs": {
|
|
32
32
|
"inlineHtml": {
|
|
33
33
|
"type": "string",
|
|
34
|
-
"description": "Inline HTML limited to b, strong, i, em, u, s, mark, code, a, br, span, sub, sup with the attributes of the sanitising policy. Internal links carry data-mex-uid, data-mex-document-id and data-mex-locale; mentions (inline entry references) also data-mex-mention=\"true\". Inline math (2.4): <span data-mex-math=\"true\">TeX source</span> (text only). Footnote markers (2.4): <sup data-mex-footnote=\"id\" data-mex-note=\"inline HTML of the note\">n</sup> (the note follows the same rules without footnotes and entry references; the marker text is a placeholder)."
|
|
34
|
+
"description": "Inline HTML limited to b, strong, i, em, u, s, mark, code, a, br, span, sub, sup with the attributes of the sanitising policy. Internal links carry data-mex-uid, data-mex-document-id and data-mex-locale; mentions (inline entry references) also data-mex-mention=\"true\". Inline math (2.4): <span data-mex-math=\"true\">TeX source</span> (text only). Footnote markers (2.4): <sup data-mex-footnote=\"id\" data-mex-note=\"inline HTML of the note\">n</sup> (the note follows the same rules without footnotes and entry references; the marker text is a placeholder). Since 2.5: text colour <span data-mex-color=\"token\"> and highlight <mark data-mex-highlight=\"token\"> (token /^[a-z][a-z0-9-]{0,31}$/ from the configured palette, never a style), inline annotations <span data-mex-annotation=\"name\" data-mex-a-<key>=\"value\"> (name /^[a-z][a-z0-9-]{1,39}$/, at most 8 values of at most 1000 characters; the attribute schema of a registered annotation is annotationJsonSchema(definition) from magic-editor-x/blocks), and plain <sup>/<sub>."
|
|
35
35
|
},
|
|
36
36
|
"url": {
|
|
37
37
|
"type": "string",
|
|
@@ -1449,6 +1449,14 @@
|
|
|
1449
1449
|
"url": {
|
|
1450
1450
|
"$ref": "#/$defs/url"
|
|
1451
1451
|
},
|
|
1452
|
+
"id": {
|
|
1453
|
+
"type": ["integer", "string"],
|
|
1454
|
+
"description": "Media Library file id (2.5)."
|
|
1455
|
+
},
|
|
1456
|
+
"documentId": {
|
|
1457
|
+
"type": "string",
|
|
1458
|
+
"maxLength": 64
|
|
1459
|
+
},
|
|
1452
1460
|
"name": {
|
|
1453
1461
|
"type": "string",
|
|
1454
1462
|
"maxLength": 255
|
package/types/blocks.d.ts
CHANGED
|
@@ -167,3 +167,127 @@ export const BLOCK_LIMITS: Readonly<{
|
|
|
167
167
|
maxValues: number;
|
|
168
168
|
maxUrl: number;
|
|
169
169
|
}>;
|
|
170
|
+
|
|
171
|
+
/* ------------------------------------------------------------------ 2.5 */
|
|
172
|
+
|
|
173
|
+
/** Attribute types of an inline annotation. */
|
|
174
|
+
export type InlineAnnotationFieldType = 'text' | 'enum' | 'url';
|
|
175
|
+
|
|
176
|
+
export interface InlineAnnotationAttributeInput {
|
|
177
|
+
type: InlineAnnotationFieldType;
|
|
178
|
+
label?: string;
|
|
179
|
+
/** Without a required value the annotation is unwrapped on save (its text stays). */
|
|
180
|
+
required?: boolean;
|
|
181
|
+
/** `text`: 1-1000 characters (default 200). */
|
|
182
|
+
max?: number;
|
|
183
|
+
/** `enum`: 1-50 distinct strings. */
|
|
184
|
+
values?: readonly string[];
|
|
185
|
+
/** `url`: subset of http, https, mailto, tel (default http + https). */
|
|
186
|
+
schemes?: ReadonlyArray<'http' | 'https' | 'mailto' | 'tel'>;
|
|
187
|
+
/** `url`: allow site-relative URLs (default true). */
|
|
188
|
+
relative?: boolean;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** What `render` and `resolve` see of one annotation (clean values). */
|
|
192
|
+
export interface InlineAnnotationUse {
|
|
193
|
+
name: string;
|
|
194
|
+
attrs: Record<string, string>;
|
|
195
|
+
text: string;
|
|
196
|
+
/** Value from `resolve` (server output) or the `resolveAnnotation` render option. */
|
|
197
|
+
resolved?: string | Record<string, unknown>;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/** The one element that wraps the annotated text (validated: allowed tags and attributes only). */
|
|
201
|
+
export interface InlineAnnotationWrapper {
|
|
202
|
+
tag:
|
|
203
|
+
| 'abbr'
|
|
204
|
+
| 'dfn'
|
|
205
|
+
| 'span'
|
|
206
|
+
| 'a'
|
|
207
|
+
| 'mark'
|
|
208
|
+
| 'cite'
|
|
209
|
+
| 'q'
|
|
210
|
+
| 'small'
|
|
211
|
+
| 'em'
|
|
212
|
+
| 'strong'
|
|
213
|
+
| 'b'
|
|
214
|
+
| 'i'
|
|
215
|
+
| 'u'
|
|
216
|
+
| 's'
|
|
217
|
+
| 'time'
|
|
218
|
+
| 'data'
|
|
219
|
+
| 'bdi'
|
|
220
|
+
| 'kbd'
|
|
221
|
+
| 'var'
|
|
222
|
+
| 'ins'
|
|
223
|
+
| 'del';
|
|
224
|
+
/** `title`, `class`, `lang`, `dir`, `href` (only on `a`), `datetime`, `value`, `cite`, `aria-label`, `data-*` (not `data-mex-*`). */
|
|
225
|
+
attrs?: Record<string, string | number | null | undefined | false>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/** Context of a server-side `resolve` call (Content API `?mex=`, GraphQL `…Rendered`). */
|
|
229
|
+
export interface InlineAnnotationResolveContext {
|
|
230
|
+
status: 'draft' | 'published';
|
|
231
|
+
/**
|
|
232
|
+
* Permission-aware lookup: only `api::` types the caller may `find`, the
|
|
233
|
+
* query sanitised with the caller's auth, the request's publication status,
|
|
234
|
+
* at most 100 rows, every row sanitised for output.
|
|
235
|
+
*/
|
|
236
|
+
find(
|
|
237
|
+
uid: string,
|
|
238
|
+
query?: { filters?: Record<string, unknown>; fields?: string[]; locale?: string | null; limit?: number }
|
|
239
|
+
): Promise<Array<Record<string, unknown>>>;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface InlineAnnotationDefinitionInput {
|
|
243
|
+
/** `/^[a-z][a-z0-9-]{1,39}$/`; `abbreviation` is built in. */
|
|
244
|
+
name: string;
|
|
245
|
+
label?: string;
|
|
246
|
+
description?: string;
|
|
247
|
+
/** 0-8 attributes, keys `/^[a-z][a-z0-9]{0,23}$/`, stored as `data-mex-a-<key>`. */
|
|
248
|
+
attributes: Record<string, InlineAnnotationAttributeInput>;
|
|
249
|
+
/** Presets that offer the annotation without the field option `inlineAnnotations`. */
|
|
250
|
+
presets?: ReadonlyArray<'full' | 'article' | 'basic' | 'minimal'>;
|
|
251
|
+
/** Keyboard shortcut of the editor tool: one of `ANNOTATION_SHORTCUTS` (Ctrl on Windows/Linux). */
|
|
252
|
+
shortcut?: 'CMD+SHIFT+0' | 'CMD+SHIFT+1' | 'CMD+SHIFT+8';
|
|
253
|
+
/**
|
|
254
|
+
* Server only: one call per response with every distinct use (at most 200);
|
|
255
|
+
* return the values in the same order (string up to 2000 characters or a plain object).
|
|
256
|
+
*/
|
|
257
|
+
resolve?: (
|
|
258
|
+
items: ReadonlyArray<{ attrs: Record<string, string>; locale: string | null }>,
|
|
259
|
+
context: InlineAnnotationResolveContext
|
|
260
|
+
) => Promise<ReadonlyArray<unknown>> | ReadonlyArray<unknown>;
|
|
261
|
+
/** Wrapper of the annotated text; `false` renders the text only; null/undefined/throw = default span. */
|
|
262
|
+
render?: (annotation: InlineAnnotationUse) => InlineAnnotationWrapper | false | null | undefined;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export type InlineAnnotationDefinition = Readonly<
|
|
266
|
+
Required<Pick<InlineAnnotationDefinitionInput, 'name' | 'label'>> &
|
|
267
|
+
Omit<InlineAnnotationDefinitionInput, 'name' | 'label' | 'attributes' | 'presets'> & {
|
|
268
|
+
attributes: Readonly<Record<string, Readonly<InlineAnnotationAttributeInput & { required: boolean }>>>;
|
|
269
|
+
presets: readonly string[];
|
|
270
|
+
}
|
|
271
|
+
>;
|
|
272
|
+
|
|
273
|
+
export function defineInlineAnnotation(
|
|
274
|
+
definition: InlineAnnotationDefinitionInput
|
|
275
|
+
): InlineAnnotationDefinition;
|
|
276
|
+
export function annotationJsonSchema(definition: InlineAnnotationDefinition): Record<string, unknown>;
|
|
277
|
+
/** The built-in abbreviation (`title`, required): renders `<abbr title>`. */
|
|
278
|
+
export const abbreviationAnnotation: InlineAnnotationDefinition;
|
|
279
|
+
export const ANNOTATION_ATTRIBUTE: 'data-mex-annotation';
|
|
280
|
+
export const ANNOTATION_VALUE_PREFIX: 'data-mex-a-';
|
|
281
|
+
export const ANNOTATION_FIELD_TYPES: readonly InlineAnnotationFieldType[];
|
|
282
|
+
export const ANNOTATION_PRESETS: readonly ['full', 'article', 'basic', 'minimal'];
|
|
283
|
+
export const ANNOTATION_SHORTCUTS: readonly ['CMD+SHIFT+0', 'CMD+SHIFT+1', 'CMD+SHIFT+8'];
|
|
284
|
+
export const ANNOTATION_RENDER_TAGS: readonly InlineAnnotationWrapper['tag'][];
|
|
285
|
+
export const ANNOTATION_LIMITS: Readonly<{
|
|
286
|
+
attributes: number;
|
|
287
|
+
text: number;
|
|
288
|
+
textDefault: number;
|
|
289
|
+
values: number;
|
|
290
|
+
registered: number;
|
|
291
|
+
label: number;
|
|
292
|
+
resolveItems: number;
|
|
293
|
+
}>;
|
package/types/index.d.ts
CHANGED
|
@@ -230,7 +230,16 @@ export interface LinkToolData {
|
|
|
230
230
|
meta: { title: string; description: string; site_name?: string; image?: { url: Url } };
|
|
231
231
|
}
|
|
232
232
|
export interface AttachesData {
|
|
233
|
-
file: {
|
|
233
|
+
file: {
|
|
234
|
+
url: Url;
|
|
235
|
+
/** Media Library file id (2.5). */
|
|
236
|
+
id?: number | string;
|
|
237
|
+
documentId?: string;
|
|
238
|
+
name?: string;
|
|
239
|
+
extension?: string;
|
|
240
|
+
size?: number;
|
|
241
|
+
title?: string;
|
|
242
|
+
};
|
|
234
243
|
title: string;
|
|
235
244
|
}
|
|
236
245
|
export interface EmbedData {
|
package/types/render.d.ts
CHANGED
|
@@ -186,6 +186,28 @@ export interface RenderOptions {
|
|
|
186
186
|
* Text output: `[n]` and a list; Markdown: GFM `[^n]` footnotes.
|
|
187
187
|
*/
|
|
188
188
|
footnotes?: { label?: string; backLabel?: string; prefix?: string };
|
|
189
|
+
/**
|
|
190
|
+
* Inline annotations (2.5, `defineInlineAnnotation` from `magic-editor-x/blocks`):
|
|
191
|
+
* `<span data-mex-annotation="name">` is rendered with the definition's
|
|
192
|
+
* `render` (one validated wrapper element around the text). These
|
|
193
|
+
* definitions replace the bundle's registry for that call; the built-in
|
|
194
|
+
* `abbreviation` (`<abbr title>`) is always known. Unknown annotations get
|
|
195
|
+
* `<span class="mex-annotation mex-annotation-<name>" data-mex-annotation …>`.
|
|
196
|
+
* Pass a stable array. Text and Markdown output keep the text only.
|
|
197
|
+
*/
|
|
198
|
+
annotations?: ReadonlyArray<import('./blocks.js').InlineAnnotationDefinition>;
|
|
199
|
+
/**
|
|
200
|
+
* Value of an annotation for its `render` (`resolved`), e.g. a glossary
|
|
201
|
+
* definition looked up by the caller. A string (max 2000 characters) or a
|
|
202
|
+
* plain object; anything else, or a throw, is ignored. Content API output
|
|
203
|
+
* (`?mex=`) and GraphQL `…Rendered` pass the results of the definitions'
|
|
204
|
+
* server-side `resolve`.
|
|
205
|
+
*/
|
|
206
|
+
resolveAnnotation?: (annotation: {
|
|
207
|
+
name: string;
|
|
208
|
+
attrs: Record<string, string>;
|
|
209
|
+
text: string;
|
|
210
|
+
}) => string | Record<string, unknown> | null | undefined;
|
|
189
211
|
}
|
|
190
212
|
|
|
191
213
|
/** Renders TeX: MathML markup or render nodes; null/undefined for the fallback. */
|