@wiris/mathtype-ckeditor5 8.10.0 → 8.11.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.
@@ -1,7 +1,7 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('ckeditor5')) :
3
3
  typeof define === 'function' && define.amd ? define(['ckeditor5'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global["@wiris/mathtype-ckeditor5"] = factory(global.ckeditor5));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global["@wiris/mathtype-ckeditor5"] = factory(global.CKEDITOR));
5
5
  })(this, (function (ckeditor5) { 'use strict';
6
6
 
7
7
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
@@ -889,7 +889,7 @@
889
889
  /**
890
890
  * Version label, exposed for easier checks
891
891
  * if DOMPurify is up to date or not
892
- */ DOMPurify.version = '3.1.5';
892
+ */ DOMPurify.version = '3.1.6';
893
893
  /**
894
894
  * Array of elements that DOMPurify removed during sanitation.
895
895
  * Empty if nothing was removed.
@@ -906,6 +906,7 @@
906
906
  const { DocumentFragment, HTMLTemplateElement, Node, Element, NodeFilter, NamedNodeMap = window1.NamedNodeMap || window1.MozNamedAttrMap, HTMLFormElement, DOMParser, trustedTypes } = window1;
907
907
  const ElementPrototype = Element.prototype;
908
908
  const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
909
+ const remove = lookupGetter(ElementPrototype, 'remove');
909
910
  const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
910
911
  const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
911
912
  const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
@@ -1373,9 +1374,9 @@
1373
1374
  });
1374
1375
  try {
1375
1376
  // eslint-disable-next-line unicorn/prefer-dom-node-remove
1376
- node.parentNode.removeChild(node);
1377
+ getParentNode(node).removeChild(node);
1377
1378
  } catch (_) {
1378
- node.remove();
1379
+ remove(node);
1379
1380
  }
1380
1381
  };
1381
1382
  /**
@@ -1518,7 +1519,7 @@
1518
1519
  _forceRemove(currentNode);
1519
1520
  return true;
1520
1521
  }
1521
- /* Remove any ocurrence of processing instructions */ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
1522
+ /* Remove any occurrence of processing instructions */ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
1522
1523
  _forceRemove(currentNode);
1523
1524
  return true;
1524
1525
  }
@@ -1656,6 +1657,10 @@
1656
1657
  hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1657
1658
  _executeHook('uponSanitizeAttribute', currentNode, hookEvent);
1658
1659
  value = hookEvent.attrValue;
1660
+ /* Work around a security issue with comments inside attributes */ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
1661
+ _removeAttribute(name, currentNode);
1662
+ continue;
1663
+ }
1659
1664
  /* Did the hooks approve of the attribute? */ if (hookEvent.forceKeepAttr) {
1660
1665
  continue;
1661
1666
  }
@@ -1667,10 +1672,6 @@
1667
1672
  _removeAttribute(name, currentNode);
1668
1673
  continue;
1669
1674
  }
1670
- /* Work around a security issue with comments inside attributes */ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
1671
- _removeAttribute(name, currentNode);
1672
- continue;
1673
- }
1674
1675
  /* Sanitize attribute content to be template-safe */ if (SAFE_FOR_TEMPLATES) {
1675
1676
  arrayForEach([
1676
1677
  MUSTACHE_EXPR,
@@ -4352,7 +4353,8 @@
4352
4353
  "annotation",
4353
4354
  "mstack",
4354
4355
  "msline",
4355
- "msrow"
4356
+ "msrow",
4357
+ "none"
4356
4358
  ],
4357
4359
  ADD_ATTR: [
4358
4360
  "linebreak",
@@ -10533,6 +10535,8 @@
10533
10535
  openNewFormulaEditor() {
10534
10536
  // Store the editor selection as it will be lost upon opening the modal
10535
10537
  this.core.editionProperties.selection = this.editorObject.editing.view.document.selection;
10538
+ // Focus on the selected editor when multiple editor instances are present
10539
+ WirisPlugin.currentInstance = this;
10536
10540
  return super.openNewFormulaEditor();
10537
10541
  }
10538
10542
  /**
@@ -10767,7 +10771,7 @@
10767
10771
  var chemIcon = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->\n<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 40.3 49.5\" style=\"enable-background:new 0 0 40.3 49.5;\" xml:space=\"preserve\">\n<style type=\"text/css\">\n\t.st0{fill:#A4CF61;}\n</style>\n<path class=\"st0\" d=\"M39.2,12.1c0-1.9-1.1-3.6-2.7-4.4L24.5,0.9l0,0c-0.7-0.4-1.5-0.6-2.4-0.6c-0.9,0-1.7,0.2-2.4,0.6l0,0L2.3,10.8\n\tl0,0C0.9,11.7,0,13.2,0,14.9h0v19.6h0c0,1.7,0.9,3.3,2.3,4.1l0,0l17.4,9.9l0,0c0.7,0.4,1.5,0.6,2.4,0.6c0.9,0,1.7-0.2,2.4-0.6l0,0\n\tl12.2-6.9h0c1.5-0.8,2.6-2.5,2.6-4.3c0-2.7-2.2-4.9-4.9-4.9c-0.9,0-1.8,0.3-2.5,0.7l0,0l-9.7,5.6l-12.3-7V17.8l12.3-7l9.9,5.7l0,0\n\tc0.7,0.4,1.5,0.6,2.4,0.6C37,17,39.2,14.8,39.2,12.1\"/>\n</svg>\n";
10768
10772
 
10769
10773
  var name = "@wiris/mathtype-ckeditor5";
10770
- var version = "8.10.0";
10774
+ var version = "8.11.0";
10771
10775
  var description = "MathType Web for CKEditor5 editor";
10772
10776
  var keywords = [
10773
10777
  "chem",
@@ -10802,8 +10806,8 @@
10802
10806
  var type = "module";
10803
10807
  var exports$1 = {
10804
10808
  ".": "./src/plugin.js",
10805
- "./dist/*.css": "./dist/*.css",
10806
10809
  "./dist/*": "./dist/*",
10810
+ "./browser/*": null,
10807
10811
  "./src/*": "./src/*",
10808
10812
  "./theme/*": "./theme/*",
10809
10813
  "./package.json": "./package.json"
@@ -10814,14 +10818,14 @@
10814
10818
  prepare: "npm run build:dist"
10815
10819
  };
10816
10820
  var dependencies = {
10817
- "@wiris/mathtype-html-integration-devkit": "1.17.3"
10821
+ "@wiris/mathtype-html-integration-devkit": "1.17.4"
10818
10822
  };
10819
10823
  var devDependencies = {
10820
- "@ckeditor/ckeditor5-dev-build-tools": "^40.2.0",
10821
- ckeditor5: ">=42.0.0"
10824
+ "@ckeditor/ckeditor5-dev-build-tools": "^42.1.0",
10825
+ ckeditor5: ">=43.0.0"
10822
10826
  };
10823
10827
  var peerDependencies = {
10824
- ckeditor5: ">=42.0.0"
10828
+ ckeditor5: ">=43.0.0"
10825
10829
  };
10826
10830
  var packageInfo = {
10827
10831
  name: name,