magic-editor-x 2.3.0 → 2.4.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 (84) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +299 -142
  3. package/dist/admin/AuditPage-C2u6z4aN.js +381 -0
  4. package/dist/admin/AuditPage-guB0SiGS.mjs +381 -0
  5. package/dist/admin/{ConfigurationPage-C-UktL1x.js → ConfigurationPage-D6uya-J1.js} +228 -13
  6. package/dist/admin/{ConfigurationPage-BxLHIQdo.mjs → ConfigurationPage-DiEpF1Rr.mjs} +222 -7
  7. package/dist/admin/ConfirmAction-CUhpngYU.js +71 -0
  8. package/dist/admin/ConfirmAction-CZjpduc3.mjs +72 -0
  9. package/dist/admin/{CustomBlocksPage-D8aMbVXc.mjs → CustomBlocksPage-Byt10-6c.mjs} +6 -4
  10. package/dist/admin/{CustomBlocksPage-CxcTfdOT.js → CustomBlocksPage-DP3h_wNd.js} +21 -19
  11. package/dist/admin/MentionsWidget-C2OCAmqq.js +227 -0
  12. package/dist/admin/MentionsWidget-sMkM9mHX.mjs +225 -0
  13. package/dist/admin/{TemplatesPage-Hn6gyu2l.js → TemplatesPage-DrSJdteI.js} +313 -17
  14. package/dist/admin/{TemplatesPage-jhYi6Zdf.mjs → TemplatesPage-Yp4OqFE2.mjs} +305 -9
  15. package/dist/admin/{ConfirmAction-DuQwvRYi.mjs → api-2ZRpHM3d.mjs} +19 -70
  16. package/dist/admin/{ConfirmAction-zLuIFj8t.js → api-bix9RLLI.js} +19 -70
  17. package/dist/admin/auditText-DIIYVR6k.mjs +110 -0
  18. package/dist/admin/auditText-DUhWu2Nx.js +109 -0
  19. package/dist/admin/comments-C7P41lan.js +86 -0
  20. package/dist/admin/comments-hfIbLQNO.mjs +87 -0
  21. package/dist/admin/{de-BMY2LBaa.mjs → de-BNPIGqhs.mjs} +41 -2
  22. package/dist/admin/{de-2Ie5jy7j.js → de-BhhGss1l.js} +41 -2
  23. package/dist/admin/{de-DOiGaTNX.mjs → de-CKz6CG3V.mjs} +191 -5
  24. package/dist/admin/{de-C3AsGauQ.js → de-CbBDnXeT.js} +140 -1
  25. package/dist/admin/{de-BUS1hUw0.mjs → de-DiCZrmH8.mjs} +140 -1
  26. package/dist/admin/{de-B1X46JJZ.js → de-zcV8D7nt.js} +191 -5
  27. package/dist/admin/{en-Ah-Cw0Wd.js → en-B9ApE1y1.js} +41 -2
  28. package/dist/admin/{en-CDg_18Bt.js → en-BMWhILnj.js} +191 -5
  29. package/dist/admin/{en-BkEjpC3i.js → en-CpehF0Kv.js} +140 -1
  30. package/dist/admin/{en-GCzgS9Aw.mjs → en-DCPMqFIa.mjs} +140 -1
  31. package/dist/admin/{en-CU6UzV4g.mjs → en-cYzqbASF.mjs} +191 -5
  32. package/dist/admin/{en-CvFiqti2.mjs → en-gFLeK9Ng.mjs} +41 -2
  33. package/dist/admin/{es-DbKHZz5l.mjs → es-BmwBgEgz.mjs} +41 -2
  34. package/dist/admin/{es-Cr8JH85N.js → es-C0W31rl8.js} +41 -2
  35. package/dist/admin/{es-BCpJmUEM.js → es-CQPh8PXw.js} +191 -5
  36. package/dist/admin/{es-C4pEnDRv.js → es-CawpzwyC.js} +140 -1
  37. package/dist/admin/{es-DHBBZKl2.mjs → es-Chs37IBR.mjs} +140 -1
  38. package/dist/admin/{es-BmfffNM2.mjs → es-DCamt1ek.mjs} +191 -5
  39. package/dist/admin/{fr-DQJ_7aq5.mjs → fr-CMWBNE5D.mjs} +41 -2
  40. package/dist/admin/{fr-C2aLSwEu.js → fr-COOsqexl.js} +140 -1
  41. package/dist/admin/{fr-Dvq4xk2e.mjs → fr-Dp5-XP29.mjs} +140 -1
  42. package/dist/admin/{fr-ZcN0yM_2.js → fr-DpC44Ol8.js} +191 -5
  43. package/dist/admin/{fr-OJ4VW1kh.js → fr-iGeIfEcU.js} +41 -2
  44. package/dist/admin/{fr-DZd2XJP6.mjs → fr-oW0t8bT5.mjs} +191 -5
  45. package/dist/admin/{index-Cm-fFUhE.js → index-64wc26Bl.js} +13851 -6746
  46. package/dist/admin/{index-XgfwqLfV.mjs → index-BVjf1gVC.mjs} +13788 -6682
  47. package/dist/admin/{index-BHBRr562.js → index-D6Z7i8ba.js} +1003 -53
  48. package/dist/admin/{index-CQk1XeNb.mjs → index-D_Fv8Non.mjs} +1032 -82
  49. package/dist/admin/index.js +2 -1
  50. package/dist/admin/index.mjs +3 -2
  51. package/dist/admin/math-CIQ4Z_mY.mjs +47 -0
  52. package/dist/admin/math-vsK_06ZR.js +49 -0
  53. package/dist/admin/{pt-D0I0_JYs.js → pt-BHmXk2d9.js} +41 -2
  54. package/dist/admin/{pt-CImqDnLB.js → pt-Bo0Pm_Pt.js} +191 -5
  55. package/dist/admin/{pt-CilDggGF.mjs → pt-DALDvfBn.mjs} +140 -1
  56. package/dist/admin/{pt-BSLzA17U.mjs → pt-DFNgZ5_k.mjs} +41 -2
  57. package/dist/admin/{pt-DX0OAIoL.js → pt-DXy7G1x7.js} +140 -1
  58. package/dist/admin/{pt-C3UdeIpd.mjs → pt-uGpfRQLC.mjs} +191 -5
  59. package/dist/admin/{useT-D3sM9Zf7.js → useT-BXJLIPN4.js} +1 -1
  60. package/dist/admin/{useT-CmaeZbCr.mjs → useT-CLPhBmBC.mjs} +1 -1
  61. package/dist/blocks/index.d.mts +2 -0
  62. package/dist/blocks/index.d.ts +2 -0
  63. package/dist/blocks/index.js +13 -2
  64. package/dist/blocks/index.mjs +13 -2
  65. package/dist/math/index.d.mts +27 -0
  66. package/dist/math/index.d.ts +27 -0
  67. package/dist/math/index.js +164 -0
  68. package/dist/math/index.mjs +134 -0
  69. package/dist/react/index.js +673 -91
  70. package/dist/react/index.mjs +673 -91
  71. package/dist/render/index.d.mts +26 -0
  72. package/dist/render/index.d.ts +26 -0
  73. package/dist/render/index.js +779 -106
  74. package/dist/render/index.mjs +779 -106
  75. package/dist/server/index.js +10419 -4103
  76. package/dist/server/index.mjs +10419 -4103
  77. package/dist/vue/index.js +673 -91
  78. package/dist/vue/index.mjs +673 -91
  79. package/package.json +8 -2
  80. package/schema/magic-editor-x.schema.json +127 -2
  81. package/types/blocks.d.ts +2 -0
  82. package/types/index.d.ts +42 -0
  83. package/types/math.d.ts +27 -0
  84. package/types/render.d.ts +26 -0
@@ -35,7 +35,7 @@ const pt = {
35
35
  "editor.history.loading": "Carregando versões",
36
36
  "editor.history.error": "Não foi possível carregar as versões.",
37
37
  "editor.history.retry": "Tentar novamente",
38
- "editor.history.empty": "Ainda não há versões. Salve uma para iniciar o histórico.",
38
+ "editor.history.empty": "Ainda não há versões. Escolha “Salvar a versão atual” para iniciar o histórico.",
39
39
  "editor.history.listLabel": "Versões",
40
40
  "editor.history.version": "Versão {version}",
41
41
  "editor.history.byline": "{date} por {name}",
@@ -107,6 +107,21 @@ const pt = {
107
107
  "editor.aiField.insert": "Inserir como parágrafo",
108
108
  "editor.aiField.error.off": "As ações de IA no campo inteiro estão desativadas.",
109
109
  "editor.aiField.error.format": "A resposta tinha um formato inesperado. Nada foi alterado.",
110
+ "editor.aiBlocks.menu": "Assistente de IA",
111
+ "editor.aiBlocks.open": "IA para os blocos escolhidos",
112
+ "editor.aiBlocks.title": "IA para os blocos escolhidos",
113
+ "editor.aiBlocks.action.improve": "Reescrever (melhorar o texto)",
114
+ "editor.aiBlocks.action.shorten": "Encurtar",
115
+ "editor.aiBlocks.action.translate": "Traduzir",
116
+ "editor.aiBlocks.action.tone": "Mudar o tom",
117
+ "editor.aiBlocks.disclosure": "O texto dos blocos escolhidos ({blocks, plural, one {# bloco} other {# blocos}}, {characters} caracteres) é enviado ao provedor de IA configurado pela sua administração, com a formatação e os links. Imagens, ficheiros e outros dados dos blocos não são enviados.",
118
+ "editor.aiBlocks.empty": "Os blocos escolhidos não têm texto que o assistente possa alterar.",
119
+ "editor.aiBlocks.error.tooLong": "Os blocos escolhidos excedem o limite configurado.",
120
+ "editor.aiBlocks.preview": "Alterações",
121
+ "editor.aiBlocks.applyHint": "Ao aplicar, todos os blocos mantêm o tipo, as definições, a formatação e os links. Use Anular na barra de ferramentas para voltar atrás.",
122
+ "editor.aiBlocks.apply": "Aplicar aos blocos",
123
+ "editor.aiBlocks.changed": "Estes blocos mudaram enquanto o assistente trabalhava. Nada foi substituído. Envie-os novamente.",
124
+ "editor.aiBlocks.applied": "{count, plural, one {# bloco atualizado} other {# blocos atualizados}}",
110
125
  "editor.grammar.empty": "Este campo não tem texto para verificar.",
111
126
  "editor.grammar.checking": "A verificar a gramática",
112
127
  "editor.grammar.found": "{count, plural, =0 {Nenhum problema encontrado} one {# problema encontrado} other {# problemas encontrados}}",
@@ -212,7 +227,6 @@ const pt = {
212
227
  "editor.comments.edit": "Editar",
213
228
  "editor.comments.editLabel": "Editar comentário",
214
229
  "editor.comments.edited": "editado",
215
- "editor.comments.empty": "Ainda não há comentários. Escolha um bloco e adicione o primeiro comentário.",
216
230
  "editor.comments.emptyOpen": "Não há discussões abertas. As discussões resolvidas estão ocultas.",
217
231
  "editor.comments.emptyReadOnly": "Ainda não há comentários.",
218
232
  "editor.comments.error": "Não foi possível carregar os comentários.",
@@ -241,12 +255,86 @@ const pt = {
241
255
  "editor.comments.thread.on": "Sobre: {excerpt}",
242
256
  "editor.comments.title": "Comentários",
243
257
  "editor.comments.you": "{name} (você)",
258
+ "editor.comments.thread.onText": "Sobre o texto selecionado",
259
+ "editor.comments.showText": "Mostrar texto",
260
+ "editor.comments.textChanged": "Texto alterado",
261
+ "editor.comments.textChangedHint": "O texto comentado foi alterado ou eliminado. O tópico continua no seu bloco.",
262
+ "editor.comments.wholeBlock": "Comentar o bloco inteiro em vez disso",
263
+ "editor.comments.emptyRange": "Ainda não há comentários. Selecione texto no editor e escolha Comentar, ou comente um bloco inteiro.",
264
+ "editor.comments.range.button": "Comentar",
265
+ "editor.comments.range.multiple": "Selecione texto dentro de um único parágrafo, título, item de lista ou célula de tabela para o comentar.",
266
+ "editor.comments.range.empty": "Selecione algum texto para o comentar.",
267
+ "editor.comments.noneOpen": "Não há comentários abertos.",
268
+ "editor.comments.body.hintMentions": "Texto simples, até {max} caracteres. Escreva @ para mencionar alguém. Ctrl ou Cmd + Enter publica.",
269
+ "editor.comments.mentions.list": "Pessoas a mencionar",
270
+ "editor.comments.mentions.searching": "A procurar pessoas…",
271
+ "editor.comments.mentions.failed": "Não foi possível carregar as pessoas.",
272
+ "editor.comments.mentions.none": "Ninguém encontrado que possa ler estes comentários.",
273
+ "editor.comments.mentions.dropped": "{count, plural, one {# pessoa não foi mencionada} other {# pessoas não foram mencionadas}}: não podem ler este campo.",
274
+ "editor.comments.notified.mention": "Mencionou-o",
275
+ "editor.comments.notified.reply": "Nova resposta",
276
+ "editor.comments.notified.mentioned": "Foi mencionado em {count, plural, one {# tópico} other {# tópicos}}.",
277
+ "editor.comments.notified.replies": "Novas respostas em {count, plural, one {# tópico} other {# tópicos}} em que participa.",
278
+ "editor.comments.notified.markRead": "Marcar como lido",
279
+ "editor.shortcuts.comment": "Comentar o texto selecionado",
280
+ "editor.shortcuts.nextComment": "Comentário seguinte (com Shift: comentário anterior)",
281
+ "widget.mentions.title": "Menções e respostas",
282
+ "widget.mentions.loading": "A carregar menções",
283
+ "widget.mentions.error": "Não foi possível carregar as menções.",
284
+ "widget.mentions.empty": "Ainda não há menções. Quando alguém o mencionar num comentário ou responder ao seu tópico, aparece aqui.",
285
+ "widget.mentions.unread": "{count, plural, =0 {Tudo lido} one {# por ler} other {# por ler}}",
286
+ "widget.mentions.markAll": "Marcar tudo como lido",
287
+ "widget.mentions.allRead": "Todas as notificações marcadas como lidas",
288
+ "widget.mentions.mentioned": "{name} mencionou-o",
289
+ "widget.mentions.replied": "{name} respondeu num tópico em que participa",
290
+ "widget.mentions.where": "{title} ({type})",
291
+ "widget.mentions.new": "por ler",
292
+ "widget.mentions.deletedUser": "Utilizador eliminado",
293
+ "widget.mentions.markRead": "Marcar como lido",
294
+ "widget.mentions.markUnread": "Marcar como não lido",
295
+ "widget.mentions.markedRead": "Marcado como lido",
296
+ "widget.mentions.markedUnread": "Marcado como não lido",
297
+ "widget.mentions.failed": "Não funcionou. Tente novamente.",
244
298
  "editor.toolbar.comments": "Comentários",
245
299
  "editor.toolbar.commentsCount": "Comentários ({count, plural, one {# discussão aberta} other {# discussões abertas}})",
246
300
  "editor.paste.blocksDropped": "{count, plural, one {# bloco colado não é permitido neste campo e foi omitido} other {# blocos colados não são permitidos neste campo e foram omitidos}}.",
247
301
  "editor.paste.imagesFailed": "{count, plural, one {Não foi possível adicionar # imagem. Carregue-a} other {Não foi possível adicionar # imagens. Carregue-as}} com o bloco de imagem.",
248
302
  "editor.paste.imagesNoUpload": "{count, plural, one {# imagem foi omitida} other {# imagens foram omitidas}} porque não pode carregar ficheiros.",
249
303
  "editor.paste.failed": "Não foi possível converter o conteúdo colado.",
304
+ "editor.footnotes.title": "Notas de rodapé ({count})",
305
+ "editor.footnotes.number": "Nota {number}:",
306
+ "editor.footnotes.noText": "Ainda sem texto",
307
+ "editor.footnotes.empty": "Vazia",
308
+ "editor.footnotes.goTo": "Mostrar a nota {number} no texto",
309
+ "editor.footnotes.edit": "Editar a nota {number}",
310
+ "editor.footnotes.view": "Ler a nota {number}",
311
+ "editor.footnotes.remove": "Remover a nota {number}",
312
+ "editor.footnotes.removeTitle": "Remover a nota {number}?",
313
+ "editor.footnotes.removeBody": "A chamada e a respetiva nota são removidas do texto. Pode anular esta ação.",
314
+ "editor.footnotes.removeConfirm": "Remover a nota",
315
+ "editor.footnotes.dialogTitle": "Nota {number}",
316
+ "editor.footnotes.note": "Nota",
317
+ "editor.footnotes.formatting": "Formatação",
318
+ "editor.footnotes.bold": "Negrito",
319
+ "editor.footnotes.italic": "Itálico",
320
+ "editor.footnotes.link": "Ligação",
321
+ "editor.footnotes.linkAddress": "Endereço da ligação",
322
+ "editor.footnotes.linkApply": "Aplicar ligação",
323
+ "editor.footnotes.linkRemove": "Remover ligação",
324
+ "editor.footnotes.linkInvalid": "Introduza um endereço web (https://…), um e-mail ou um caminho.",
325
+ "editor.footnotes.hint": "Enter adiciona uma quebra de linha. Ctrl+Enter ou Cmd+Enter guarda.",
326
+ "editor.footnotes.readOnly": "Pode ler esta nota, mas não alterá-la.",
327
+ "editor.footnotes.tooLong": "Esta nota é demasiado longa. Encurte-a para guardar.",
328
+ "editor.footnotes.cancel": "Cancelar",
329
+ "editor.footnotes.close": "Fechar",
330
+ "editor.footnotes.save": "Guardar nota",
331
+ "editor.footnotes.gone": "Esta nota foi removida entretanto. O texto não foi guardado.",
332
+ "editor.preview.footnotes": "Notas de rodapé",
333
+ "editor.preview.footnoteBack": "Voltar à chamada {n}",
334
+ "editor.shortcuts.inlineMath": "Fórmula no texto (a seleção passa a TeX)",
335
+ "editor.shortcuts.footnote": "Nota no cursor, ou editar a que está ao lado",
336
+ "editor.quality.rule.mathInvalid": "Fórmula que não pode ser apresentada (verifique o TeX)",
337
+ "editor.quality.rule.footnoteEmpty": "Nota de rodapé sem texto",
250
338
  "editor.quality.title": "Verificações de qualidade",
251
339
  "editor.quality.summary": "{errors, plural, one {# erro} other {# erros}} · {warnings, plural, one {# aviso} other {# avisos}}",
252
340
  "editor.quality.close": "Fechar as verificações de qualidade",
@@ -262,7 +350,7 @@ const pt = {
262
350
  "editor.quality.rule.emptyHeading": "Título vazio",
263
351
  "editor.quality.rule.emptyLink": "Link sem texto ou endereço",
264
352
  "editor.quality.rule.ambiguousLink": "O texto do link «{text}» não diz para onde o link leva",
265
- "editor.quality.rule.tableHeader": "Tabela sem linha de cabeçalho",
353
+ "editor.quality.rule.tableHeader": "Tabela sem linha nem coluna de cabeçalho",
266
354
  "editor.quality.rule.lowContrast": "O contraste de cor do texto de {ratio}:1 é inferior a 4,5:1",
267
355
  "editor.quality.rule.unknown": "Problema",
268
356
  "editor.quality.links.title": "Links e mídia",
@@ -296,6 +384,16 @@ const pt = {
296
384
  "editor.quality.schedule.published": "Versão publicada: {result}",
297
385
  "editor.quality.schedule.pending": "{count, plural, one {# link ainda não foi verificado} other {# links ainda não foram verificados}}.",
298
386
  "editor.quality.schedule.results": "Links quebrados encontrados pela verificação agendada",
387
+ "editor.activity.description": "Quem alterou este campo e quando. Só são guardadas contagens e ids de blocos, nunca o conteúdo.",
388
+ "editor.activity.error": "Não foi possível carregar a atividade.",
389
+ "editor.activity.empty": "Ainda não há atividade registada para este campo.",
390
+ "editor.activity.listLabel": "Atividade",
391
+ "editor.activity.blocks": "Blocos: {ids}",
392
+ "editor.activity.loading": "A carregar a atividade",
393
+ "editor.activity.more": "Mostrar atividade mais antiga",
394
+ "editor.activity.tabs": "Vistas do histórico",
395
+ "editor.activity.tab.versions": "Versões",
396
+ "editor.activity.tab.activity": "Atividade",
299
397
  "editor.selection.deleted": "{count, plural, one {# bloco excluído} other {# blocos excluídos}}",
300
398
  "editor.selection.duplicated": "{count, plural, one {# bloco duplicado} other {# blocos duplicados}}",
301
399
  "editor.selection.converted": "{count, plural, one {# bloco convertido} other {# blocos convertidos}}",
@@ -311,7 +409,7 @@ const pt = {
311
409
  "editor.toolbar.find": "Localizar e substituir",
312
410
  "editor.toolbar.qualityCount": "Verificações de qualidade ({count, plural, one {# problema} other {# problemas}})",
313
411
  "editor.toolbar.quality": "Verificações de qualidade",
314
- "editor.toolbar.more": "Mais ações do editor",
412
+ "editor.toolbar.more": "Mais ferramentas",
315
413
  "editor.toolbar.focusOff": "Sair do modo foco",
316
414
  "editor.toolbar.focusOn": "Modo foco",
317
415
  "editor.toolbar.shortcuts": "Atalhos de teclado",
@@ -320,6 +418,9 @@ const pt = {
320
418
  "editor.preview.empty": "Ainda não há nada para pré-visualizar.",
321
419
  "editor.preview.label": "Pré-visualização renderizada",
322
420
  "editor.preview.table": "Tabela",
421
+ "editor.quality.rule.tableEmptyHeader": "{count, plural, one {# célula de cabeçalho vazia} other {# células de cabeçalho vazias}} numa tabela",
422
+ "editor.shortcuts.tableCell": "Célula seguinte da tabela (Shift+Tab: célula anterior)",
423
+ "editor.shortcuts.tableTools": "Ferramentas da tabela (numa célula)",
323
424
  "editor.saveTemplate.count": "{count, plural, one {É guardado # bloco} other {São guardados # blocos}}. Pode alterar tudo mais tarde em Definições, Magic Editor X, Modelos.",
324
425
  "editor.saveTemplate.description": "Descrição",
325
426
  "editor.saveTemplate.empty": "Este campo está vazio. Escreva algo primeiro.",
@@ -389,9 +490,18 @@ const pt = {
389
490
  "editor.history.diff.synced": "Bloco sincronizado {name}",
390
491
  "editor.history.diff.syncedRemoved": "Bloco sincronizado (origem eliminada)",
391
492
  "editor.history.diff.syncedUnknown": "Bloco sincronizado",
493
+ "editor.identity.saveHint": "Guarde a entrada uma vez para ativar o histórico e os comentários desta secção.",
494
+ "editor.history.positional.title": "Versões anteriores guardadas por posição",
495
+ "editor.history.positional.description": "Guardadas antes de esta secção ter o seu próprio histórico. Podem pertencer a outra entrada desta lista, por isso podem ser vistas e comparadas, mas não restauradas.",
496
+ "editor.comments.positional.title": "Comentários anteriores guardados por posição",
497
+ "editor.comments.positional.badge": "Guardado por posição",
498
+ "editor.comments.positional.hint": "Escrito antes de esta secção ter os seus próprios comentários. Pode pertencer a outra entrada desta lista, por isso é só de leitura.",
392
499
  "editor.toolbar.preview": "Pré-visualização",
393
500
  "editor.toolbar.previewOff": "Voltar à edição",
394
501
  "editor.toolbar.templates": "Inserir modelo",
502
+ "editor.tools.group.review": "Revisão",
503
+ "editor.tools.group.write": "Escrita",
504
+ "editor.tools.group.view": "Visualização",
395
505
  "editor.stats.blocksLimit": "{blocks} / {max} blocos",
396
506
  "editor.stats.blocks": "{blocks, plural, one {# bloco} other {# blocos}}",
397
507
  "editor.stats.words": "{words, plural, one {# palavra} other {# palavras}}",
@@ -415,6 +525,7 @@ const pt = {
415
525
  "editor.find.truncated": "(apenas as primeiras ocorrências são mostradas)",
416
526
  "editor.find.error.invalid": "Esta expressão regular não é válida.",
417
527
  "editor.find.error.tooLong": "Pesquise no máximo {max} caracteres.",
528
+ "editor.paste.mediaFailed": "{count, plural, one {# ficheiro de vídeo ou áudio não pôde ser copiado do seu endereço e foi omitido} other {# ficheiros de vídeo ou áudio não puderam ser copiados dos seus endereços e foram omitidos}}. {count, plural, one {Adicione-o} other {Adicione-os}} com o bloco de vídeo ou áudio.",
418
529
  "editor.preset.title": "Configurações do campo",
419
530
  "editor.preset.fix": "Corrigir automaticamente",
420
531
  "editor.preset.hint": "Não será possível salvar até que este conteúdo siga as configurações do campo. A correção automática muda os níveis de título, transforma blocos não permitidos em parágrafos e remove links não permitidos.",
@@ -446,7 +557,82 @@ const pt = {
446
557
  "editor.shortcuts.markdown": "Markdown ao digitar",
447
558
  "editor.preset.fixed": "{fixed, plural, one {# bloco corrigido} other {# blocos corrigidos}}{removed, plural, =0 {} one {, # removido} other {, # removidos}}",
448
559
  "editor.preset.notice": "Este conteúdo não segue as configurações deste campo ({count, plural, one {# problema} other {# problemas}}). Não será possível salvar até que seja corrigido.",
449
- "editor.preset.show": "Mostrar problemas"
560
+ "editor.preset.show": "Mostrar problemas",
561
+ "editor.suggest.badge": "Modo sugestão",
562
+ "editor.suggest.help": "As suas alterações não são guardadas na entrada. Envie-as como sugestões para revisão.",
563
+ "editor.suggest.exit": "Sair do modo sugestão",
564
+ "editor.suggest.discard.title": "Descartar as alterações não enviadas?",
565
+ "editor.suggest.discard.body": "{count, plural, one {# alteração ainda não foi enviada e será perdida} other {# alterações ainda não foram enviadas e serão perdidas}}.",
566
+ "editor.suggest.discard.confirm": "Descartar alterações",
567
+ "editor.suggest.sendCount": "Enviar {count, plural, one {# sugestão} other {# sugestões}}",
568
+ "editor.suggest.send": "Enviar sugestões",
569
+ "editor.suggest.violations": "Alguns blocos alterados não respeitam as definições deste campo. Corrija-os antes de enviar.",
570
+ "editor.suggest.region": "Versão sugerida deste campo",
571
+ "editor.suggest.dialog.close": "Fechar",
572
+ "editor.suggest.dialog.title": "Enviar sugestões",
573
+ "editor.suggest.dialog.summary": "{changed, plural, one {# bloco alterado} other {# blocos alterados}} · {added, plural, one {# bloco novo} other {# blocos novos}} · {removed, plural, one {# bloco removido} other {# blocos removidos}}",
574
+ "editor.suggest.dialog.help": "Cada bloco torna-se uma sugestão. Quem revê esta entrada aceita-a ou rejeita-a; até lá a entrada não muda.",
575
+ "editor.suggest.dialog.moved": "Mover blocos não faz parte de uma sugestão: {count, plural, one {# bloco movido mantém o seu lugar} other {# blocos movidos mantêm o seu lugar}}.",
576
+ "editor.suggest.dialog.noteHint": "Texto simples, até {max} caracteres.",
577
+ "editor.suggest.dialog.note": "Nota para quem revê (opcional)",
578
+ "editor.suggest.dialog.cancel": "Continuar a editar",
579
+ "editor.suggestions.noDifference": "Sem diferença em relação ao bloco atual.",
580
+ "editor.suggestions.announce.new": "{count, plural, one {# nova sugestão} other {# novas sugestões}}",
581
+ "editor.suggestions.alreadyDecided": "Outra pessoa já decidiu esta sugestão.",
582
+ "editor.suggestions.failed": "Não foi possível atualizar a sugestão. Tente novamente.",
583
+ "editor.suggestions.announce.accepted": "Sugestão aceite. Guarde a entrada para a manter.",
584
+ "editor.suggestions.announce.acceptedNoChange": "Sugestão aceite. O campo não mudou.",
585
+ "editor.suggestions.announce.acceptedAll": "{count, plural, one {# sugestão aceite} other {# sugestões aceites}}. Guarde a entrada para manter as alterações.",
586
+ "editor.suggestions.announce.rejected": "Sugestão rejeitada",
587
+ "editor.suggestions.announce.withdrawn": "Sugestão retirada",
588
+ "editor.suggestions.error": "Não foi possível carregar as sugestões.",
589
+ "editor.suggestions.loading": "A carregar sugestões",
590
+ "editor.suggestions.emptyCreate": "Sem sugestões abertas. Escolha «Sugerir alterações» no menu «Mais» para propor alterações sem mudar a entrada.",
591
+ "editor.suggestions.empty": "Sem sugestões abertas.",
592
+ "editor.suggestions.list": "Sugestões abertas",
593
+ "editor.suggestions.note": "Nota: {note}",
594
+ "editor.suggestions.accept": "Aceitar",
595
+ "editor.suggestions.overwrite.title": "Substituir a versão mais recente deste bloco?",
596
+ "editor.suggestions.overwrite.body": "O bloco mudou depois de esta sugestão ter sido feita. Ao aceitar, é substituído pela versão sugerida. Até guardar, Anular recupera a versão atual.",
597
+ "editor.suggestions.overwrite.confirm": "Aceitar e substituir",
598
+ "editor.suggestions.reject": "Rejeitar",
599
+ "editor.suggestions.withdraw": "Retirar",
600
+ "editor.suggestions.withdraw.title": "Retirar esta sugestão?",
601
+ "editor.suggestions.withdraw.body": "A sugestão é eliminada. A entrada não muda.",
602
+ "editor.suggestions.withdraw.confirm": "Retirar",
603
+ "editor.suggestions.show": "Mostrar bloco",
604
+ "editor.suggestions.title": "Sugestões",
605
+ "editor.suggestions.summary": "{open, plural, one {# sugestão aberta} other {# sugestões abertas}} · {accepted} aceites · {rejected} rejeitadas",
606
+ "editor.suggestions.close": "Fechar sugestões",
607
+ "editor.suggestions.acceptAll": "Aceitar todas ({count})",
608
+ "editor.suggestions.acceptAll.title": "Aceitar {count, plural, one {# sugestão} other {# sugestões}}?",
609
+ "editor.suggestions.acceptAll.body": "As alterações sugeridas substituem os blocos atuais deste campo. As sugestões desatualizadas ficam para verificar. Até guardar, Anular reverte todas num só passo.",
610
+ "editor.suggestions.acceptAll.confirm": "Aceitar todas",
611
+ "editor.suggestions.readOnly": "Este campo está só de leitura neste momento, por isso não é possível aceitar sugestões.",
612
+ "editor.suggestions.refreshFailed": "Não foi possível carregar novas sugestões. É mostrado o último estado conhecido.",
613
+ "editor.suggestions.state.outdatedHelp": "O bloco mudou depois de esta sugestão ter sido feita. As alterações abaixo são comparadas com o bloco atual; ao aceitar, é substituído.",
614
+ "editor.suggestions.state.missingHelp": "O bloco já não está neste campo, por isso esta sugestão só pode ser rejeitada.",
615
+ "editor.suggestions.state.appliedHelp": "O campo já tem este conteúdo. Aceite ou rejeite a sugestão para a fechar.",
616
+ "editor.suggestions.op.update": "Alteração",
617
+ "editor.suggestions.op.insert": "Bloco novo",
618
+ "editor.suggestions.op.delete": "Remover bloco",
619
+ "editor.suggestions.state.outdated": "Desatualizada",
620
+ "editor.suggestions.state.missing": "Bloco removido",
621
+ "editor.suggestions.state.applied": "Já está no campo",
622
+ "editor.suggestions.marker": "Bloco {index}: {count, plural, one {# sugestão aberta} other {# sugestões abertas}}",
623
+ "editor.suggest.sent": "{count, plural, one {# sugestão enviada} other {# sugestões enviadas}} para revisão.",
624
+ "editor.suggest.failed": "Não foi possível enviar as sugestões. Tente novamente.",
625
+ "editor.suggest.rateLimited": "Demasiadas sugestões. Tente novamente dentro de um minuto.",
626
+ "editor.suggest.presetViolation": "Um bloco alterado não respeita as definições deste campo. Corrija-o e envie novamente.",
627
+ "editor.suggest.tooMany": "Este campo tem demasiadas sugestões abertas. Peça primeiro a quem revê que decida algumas.",
628
+ "editor.suggest.readOnlyHint": "Não pode editar este campo, mas pode sugerir alterações.",
629
+ "editor.suggest.start": "Sugerir alterações",
630
+ "editor.suggestions.notice": "{count, plural, one {# sugestão aberta} other {# sugestões abertas}}",
631
+ "editor.suggestions.review": "Rever sugestões",
632
+ "editor.suggestions.showAll": "Mostrar sugestões",
633
+ "editor.toolbar.suggest": "Sugerir alterações",
634
+ "editor.toolbar.suggestionsCount": "Sugestões ({count, plural, one {# aberta} other {# abertas}})",
635
+ "editor.toolbar.suggestions": "Sugestões"
450
636
  };
451
637
  export {
452
638
  pt as default
@@ -4,7 +4,7 @@ const ReactNamespace = require("react");
4
4
  const designSystem = require("@strapi/design-system");
5
5
  const admin = require("@strapi/strapi/admin");
6
6
  const reactIntl = require("react-intl");
7
- const index = require("./index-BHBRr562.js");
7
+ const index = require("./index-D6Z7i8ba.js");
8
8
  const PageShell = ({
9
9
  title,
10
10
  subtitle,
@@ -3,7 +3,7 @@ import { useId, useCallback } from "react";
3
3
  import { Flex, Box, Typography } from "@strapi/design-system";
4
4
  import { Page, Layouts } from "@strapi/strapi/admin";
5
5
  import { useIntl } from "react-intl";
6
- import { U as getTranslation } from "./index-CQk1XeNb.mjs";
6
+ import { g as getTranslation } from "./index-D_Fv8Non.mjs";
7
7
  const PageShell = ({
8
8
  title,
9
9
  subtitle,
@@ -153,6 +153,8 @@ export class BlockDefinitionError extends Error {
153
153
  export const BLOCK_FIELD_TYPES: readonly BlockFieldType[];
154
154
  export const BLOCK_PRESETS: readonly ['article', 'basic', 'minimal'];
155
155
  export const RESERVED_BLOCK_NAMES: readonly string[];
156
+ /** Built-in names that code blocks may still use (2.4: `math`, a built-in added after the SDK shipped). */
157
+ export const SDK_COMPATIBLE_NAMES: readonly string[];
156
158
  export const BLOCK_LIMITS: Readonly<{
157
159
  maxFields: number;
158
160
  maxDepth: number;
@@ -153,6 +153,8 @@ export class BlockDefinitionError extends Error {
153
153
  export const BLOCK_FIELD_TYPES: readonly BlockFieldType[];
154
154
  export const BLOCK_PRESETS: readonly ['article', 'basic', 'minimal'];
155
155
  export const RESERVED_BLOCK_NAMES: readonly string[];
156
+ /** Built-in names that code blocks may still use (2.4: `math`, a built-in added after the SDK shipped). */
157
+ export const SDK_COMPATIBLE_NAMES: readonly string[];
156
158
  export const BLOCK_LIMITS: Readonly<{
157
159
  maxFields: number;
158
160
  maxDepth: number;
@@ -24,6 +24,7 @@ __export(index_exports, {
24
24
  BLOCK_PRESETS: () => BLOCK_PRESETS,
25
25
  BlockDefinitionError: () => BlockDefinitionError,
26
26
  RESERVED_BLOCK_NAMES: () => RESERVED_BLOCK_NAMES,
27
+ SDK_COMPATIBLE_NAMES: () => SDK_COMPATIBLE_NAMES,
27
28
  blockJsonSchema: () => blockJsonSchema,
28
29
  blockNameProblem: () => blockNameProblem,
29
30
  defineBlock: () => defineBlock
@@ -45,7 +46,9 @@ var MARKED_BLOCKS = Object.freeze({
45
46
  keys: Object.freeze(["file", "title", "caption", "loop", "tracks"]),
46
47
  anchor: Object.freeze(["file", "object"])
47
48
  }),
48
- synced: Object.freeze({ keys: Object.freeze(["ref"]), anchor: Object.freeze(["ref", "string"]) })
49
+ synced: Object.freeze({ keys: Object.freeze(["ref"]), anchor: Object.freeze(["ref", "string"]) }),
50
+ // 2.4: math block. A Settings custom block named `math` could exist before 2.4.
51
+ math: Object.freeze({ keys: Object.freeze(["tex", "display"]), anchor: Object.freeze(["tex", "string"]) })
49
52
  });
50
53
 
51
54
  // shared/editor-data.mjs
@@ -57,6 +60,10 @@ var EDITOR_DATA_LIMITS = Object.freeze({
57
60
  maxTypeLength: 64
58
61
  });
59
62
 
63
+ // shared/table.mjs
64
+ var TABLE_LIMITS = Object.freeze({ rows: 500, cols: 100, merges: 1e3, caption: 4e3 });
65
+ var TABLE_ALIGNS = Object.freeze(["left", "center", "right"]);
66
+
60
67
  // shared/sanitize-policy.mjs
61
68
  var INLINE_TAGS = Object.freeze([
62
69
  "b",
@@ -86,9 +93,12 @@ var INTERNAL_LINK_RULES = Object.freeze({
86
93
  // Boolean flag: written as "true"; an empty value (`<a data-mex-mention>`) is accepted and normalised.
87
94
  "data-mex-mention": /^(?:|true)$/
88
95
  });
96
+ var MATH_ATTRIBUTE = "data-mex-math";
97
+ var FOOTNOTE_ATTRIBUTES = Object.freeze(["data-mex-footnote", "data-mex-note"]);
89
98
  var INLINE_ATTRIBUTES = Object.freeze({
90
99
  a: ["href", "target", "rel", "title", ...INTERNAL_LINK_ATTRIBUTES],
91
- span: ["class", "data-tooltip"],
100
+ span: ["class", "data-tooltip", MATH_ATTRIBUTE],
101
+ sup: [...FOOTNOTE_ATTRIBUTES],
92
102
  mark: ["class"],
93
103
  u: ["class"],
94
104
  s: ["class"],
@@ -204,6 +214,7 @@ var RESERVED_BLOCK_NAMES = Object.freeze([
204
214
  "textVariant",
205
215
  "indentTune"
206
216
  ]);
217
+ var SDK_COMPATIBLE_NAMES = Object.freeze(["math"]);
207
218
  var RESERVED = new Set(RESERVED_BLOCK_NAMES.map((name) => name.toLowerCase()));
208
219
  var BLOCK_NAME_PATTERN = /^[A-Za-z][A-Za-z0-9_-]{1,49}$/;
209
220
  var KEY_PATTERN = /^[A-Za-z][A-Za-z0-9_]{0,63}$/;
@@ -13,7 +13,9 @@ var MARKED_BLOCKS = Object.freeze({
13
13
  keys: Object.freeze(["file", "title", "caption", "loop", "tracks"]),
14
14
  anchor: Object.freeze(["file", "object"])
15
15
  }),
16
- synced: Object.freeze({ keys: Object.freeze(["ref"]), anchor: Object.freeze(["ref", "string"]) })
16
+ synced: Object.freeze({ keys: Object.freeze(["ref"]), anchor: Object.freeze(["ref", "string"]) }),
17
+ // 2.4: math block. A Settings custom block named `math` could exist before 2.4.
18
+ math: Object.freeze({ keys: Object.freeze(["tex", "display"]), anchor: Object.freeze(["tex", "string"]) })
17
19
  });
18
20
 
19
21
  // shared/editor-data.mjs
@@ -25,6 +27,10 @@ var EDITOR_DATA_LIMITS = Object.freeze({
25
27
  maxTypeLength: 64
26
28
  });
27
29
 
30
+ // shared/table.mjs
31
+ var TABLE_LIMITS = Object.freeze({ rows: 500, cols: 100, merges: 1e3, caption: 4e3 });
32
+ var TABLE_ALIGNS = Object.freeze(["left", "center", "right"]);
33
+
28
34
  // shared/sanitize-policy.mjs
29
35
  var INLINE_TAGS = Object.freeze([
30
36
  "b",
@@ -54,9 +60,12 @@ var INTERNAL_LINK_RULES = Object.freeze({
54
60
  // Boolean flag: written as "true"; an empty value (`<a data-mex-mention>`) is accepted and normalised.
55
61
  "data-mex-mention": /^(?:|true)$/
56
62
  });
63
+ var MATH_ATTRIBUTE = "data-mex-math";
64
+ var FOOTNOTE_ATTRIBUTES = Object.freeze(["data-mex-footnote", "data-mex-note"]);
57
65
  var INLINE_ATTRIBUTES = Object.freeze({
58
66
  a: ["href", "target", "rel", "title", ...INTERNAL_LINK_ATTRIBUTES],
59
- span: ["class", "data-tooltip"],
67
+ span: ["class", "data-tooltip", MATH_ATTRIBUTE],
68
+ sup: [...FOOTNOTE_ATTRIBUTES],
60
69
  mark: ["class"],
61
70
  u: ["class"],
62
71
  s: ["class"],
@@ -172,6 +181,7 @@ var RESERVED_BLOCK_NAMES = Object.freeze([
172
181
  "textVariant",
173
182
  "indentTune"
174
183
  ]);
184
+ var SDK_COMPATIBLE_NAMES = Object.freeze(["math"]);
175
185
  var RESERVED = new Set(RESERVED_BLOCK_NAMES.map((name) => name.toLowerCase()));
176
186
  var BLOCK_NAME_PATTERN = /^[A-Za-z][A-Za-z0-9_-]{1,49}$/;
177
187
  var KEY_PATTERN = /^[A-Za-z][A-Za-z0-9_]{0,63}$/;
@@ -603,6 +613,7 @@ export {
603
613
  BLOCK_PRESETS,
604
614
  BlockDefinitionError,
605
615
  RESERVED_BLOCK_NAMES,
616
+ SDK_COMPATIBLE_NAMES,
606
617
  blockJsonSchema,
607
618
  blockNameProblem,
608
619
  defineBlock
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Math helper (`magic-editor-x/math`, 2.4): TeX to MathML with Temml, for the
3
+ * `math` render option.
4
+ */
5
+
6
+ /** Temml settings used by the helper. */
7
+ export const MATH_SETTINGS: Readonly<{
8
+ trust: false;
9
+ throwOnError: true;
10
+ strict: false;
11
+ annotate: true;
12
+ xml: false;
13
+ wrap: 'none';
14
+ maxSize: readonly [number, number];
15
+ maxExpand: number;
16
+ }>;
17
+
18
+ /** MathML (`<math>…</math>`) or null when the TeX is empty, too long or does not parse. Never throws. */
19
+ export function renderMath(tex: unknown, options?: { display?: boolean }): string | null;
20
+
21
+ /** Whether the TeX parses; `message` explains the error (plain text, may quote the TeX). */
22
+ export function checkMath(
23
+ tex: unknown,
24
+ options?: { display?: boolean }
25
+ ): { ok: true } | { ok: false; message: string };
26
+
27
+ export default renderMath;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Math helper (`magic-editor-x/math`, 2.4): TeX to MathML with Temml, for the
3
+ * `math` render option.
4
+ */
5
+
6
+ /** Temml settings used by the helper. */
7
+ export const MATH_SETTINGS: Readonly<{
8
+ trust: false;
9
+ throwOnError: true;
10
+ strict: false;
11
+ annotate: true;
12
+ xml: false;
13
+ wrap: 'none';
14
+ maxSize: readonly [number, number];
15
+ maxExpand: number;
16
+ }>;
17
+
18
+ /** MathML (`<math>…</math>`) or null when the TeX is empty, too long or does not parse. Never throws. */
19
+ export function renderMath(tex: unknown, options?: { display?: boolean }): string | null;
20
+
21
+ /** Whether the TeX parses; `message` explains the error (plain text, may quote the TeX). */
22
+ export function checkMath(
23
+ tex: unknown,
24
+ options?: { display?: boolean }
25
+ ): { ok: true } | { ok: false; message: string };
26
+
27
+ export default renderMath;
@@ -0,0 +1,164 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // shared/math/index.mjs
30
+ var index_exports = {};
31
+ __export(index_exports, {
32
+ MATH_SETTINGS: () => MATH_SETTINGS,
33
+ checkMath: () => checkMath,
34
+ default: () => index_default,
35
+ renderMath: () => renderMath
36
+ });
37
+ module.exports = __toCommonJS(index_exports);
38
+ var import_temml = __toESM(require("temml"), 1);
39
+
40
+ // shared/built-in-marker.mjs
41
+ var MARKED_BLOCKS = Object.freeze({
42
+ toc: Object.freeze({ keys: Object.freeze(["title", "minLevel", "maxLevel", "style"]), anchor: null }),
43
+ gallery: Object.freeze({
44
+ keys: Object.freeze(["images", "layout", "columns", "caption"]),
45
+ anchor: Object.freeze(["images", "array"])
46
+ }),
47
+ video: Object.freeze({
48
+ keys: Object.freeze(["file", "poster", "title", "caption", "loop", "muted", "tracks"]),
49
+ anchor: Object.freeze(["file", "object"])
50
+ }),
51
+ audio: Object.freeze({
52
+ keys: Object.freeze(["file", "title", "caption", "loop", "tracks"]),
53
+ anchor: Object.freeze(["file", "object"])
54
+ }),
55
+ synced: Object.freeze({ keys: Object.freeze(["ref"]), anchor: Object.freeze(["ref", "string"]) }),
56
+ // 2.4: math block. A Settings custom block named `math` could exist before 2.4.
57
+ math: Object.freeze({ keys: Object.freeze(["tex", "display"]), anchor: Object.freeze(["tex", "string"]) })
58
+ });
59
+
60
+ // shared/editor-data.mjs
61
+ var EDITOR_DATA_LIMITS = Object.freeze({
62
+ maxBlocks: 5e3,
63
+ maxBytes: 5 * 1024 * 1024,
64
+ maxDepth: 24,
65
+ maxBlockIdLength: 64,
66
+ maxTypeLength: 64
67
+ });
68
+
69
+ // shared/table.mjs
70
+ var TABLE_LIMITS = Object.freeze({ rows: 500, cols: 100, merges: 1e3, caption: 4e3 });
71
+ var TABLE_ALIGNS = Object.freeze(["left", "center", "right"]);
72
+
73
+ // shared/sanitize-policy.mjs
74
+ var INLINE_TAGS = Object.freeze([
75
+ "b",
76
+ "strong",
77
+ "i",
78
+ "em",
79
+ "u",
80
+ "s",
81
+ "mark",
82
+ "code",
83
+ "a",
84
+ "br",
85
+ "span",
86
+ "sub",
87
+ "sup"
88
+ ]);
89
+ var INTERNAL_LINK_ATTRIBUTES = Object.freeze([
90
+ "data-mex-uid",
91
+ "data-mex-document-id",
92
+ "data-mex-locale",
93
+ "data-mex-mention"
94
+ ]);
95
+ var INTERNAL_LINK_RULES = Object.freeze({
96
+ "data-mex-uid": /^api::[a-z0-9-]{1,60}\.[a-z0-9-]{1,60}$/,
97
+ "data-mex-document-id": /^[a-z0-9]{1,64}$/,
98
+ "data-mex-locale": /^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8}){0,3}$/,
99
+ // Boolean flag: written as "true"; an empty value (`<a data-mex-mention>`) is accepted and normalised.
100
+ "data-mex-mention": /^(?:|true)$/
101
+ });
102
+ var MATH_ATTRIBUTE = "data-mex-math";
103
+ var FOOTNOTE_ATTRIBUTES = Object.freeze(["data-mex-footnote", "data-mex-note"]);
104
+ var MAX_MATH_TEX = 1e4;
105
+ var INLINE_ATTRIBUTES = Object.freeze({
106
+ a: ["href", "target", "rel", "title", ...INTERNAL_LINK_ATTRIBUTES],
107
+ span: ["class", "data-tooltip", MATH_ATTRIBUTE],
108
+ sup: [...FOOTNOTE_ATTRIBUTES],
109
+ mark: ["class"],
110
+ u: ["class"],
111
+ s: ["class"],
112
+ code: ["class"]
113
+ });
114
+ var INLINE_CLASSES = Object.freeze({
115
+ span: ["cdx-tooltip"],
116
+ mark: ["cdx-marker"],
117
+ u: ["cdx-underline"],
118
+ s: ["cdx-strikethrough", "cdx-strikethroughs"],
119
+ code: ["inline-code"]
120
+ });
121
+ var LINK_SCHEMES = Object.freeze(["http", "https", "mailto", "tel"]);
122
+ var TRACK_KINDS = Object.freeze(["captions", "subtitles", "descriptions", "chapters"]);
123
+
124
+ // shared/math/index.mjs
125
+ var MATH_SETTINGS = Object.freeze({
126
+ trust: false,
127
+ throwOnError: true,
128
+ strict: false,
129
+ annotate: true,
130
+ xml: false,
131
+ wrap: "none",
132
+ // User sizes: at most 20em (relative) and 200pt (absolute), so `\rule{1e6em}{1e6em}` stays small.
133
+ maxSize: Object.freeze([20, 200]),
134
+ // Macro expansions per formula (`\def\a{\a\a}` loops end here).
135
+ maxExpand: 500
136
+ });
137
+ var settings = (display) => ({
138
+ ...MATH_SETTINGS,
139
+ maxSize: [...MATH_SETTINGS.maxSize],
140
+ macros: {},
141
+ displayMode: display === true
142
+ });
143
+ var renderMath = (tex, options = {}) => {
144
+ if (typeof tex !== "string" || !tex.trim() || tex.length > MAX_MATH_TEX) return null;
145
+ try {
146
+ const out = import_temml.default.renderToString(tex, settings(Boolean(options && options.display)));
147
+ return typeof out === "string" && out.startsWith("<math") ? out : null;
148
+ } catch {
149
+ return null;
150
+ }
151
+ };
152
+ var checkMath = (tex, options = {}) => {
153
+ if (typeof tex !== "string" || !tex.trim()) return { ok: true };
154
+ if (tex.length > MAX_MATH_TEX) return { ok: false, message: `Longer than ${MAX_MATH_TEX} characters` };
155
+ try {
156
+ import_temml.default.renderToString(tex, settings(Boolean(options && options.display)));
157
+ return { ok: true };
158
+ } catch (error) {
159
+ const message = error && typeof error.message === "string" ? error.message : "Invalid TeX";
160
+ const plain = message.replace(/\u0332/g, "").replace(/[\u0000-\u001f]+/g, " ").trim();
161
+ return { ok: false, message: plain.slice(0, 300) };
162
+ }
163
+ };
164
+ var index_default = renderMath;