slate-angular 1.7.5 → 1.9.1

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.
@@ -550,6 +550,34 @@
550
550
  }
551
551
  return text;
552
552
  };
553
+ /**
554
+ * Get x-slate-fragment attribute from data-slate-fragment
555
+ */
556
+ var catchSlateFragment = /data-slate-fragment="(.+?)"/m;
557
+ var getSlateFragmentAttribute = function (dataTransfer) {
558
+ var htmlData = dataTransfer.getData('text/html');
559
+ var _a = __read(htmlData.match(catchSlateFragment) || [], 2), fragment = _a[1];
560
+ return fragment;
561
+ };
562
+ /**
563
+ * Get the x-slate-fragment attribute that exist in text/html data
564
+ * and append it to the DataTransfer object
565
+ */
566
+ var getClipboardData = function (dataTransfer, clipboardFormatKey) {
567
+ if (clipboardFormatKey === void 0) { clipboardFormatKey = 'x-slate-fragment'; }
568
+ if (!dataTransfer.getData("application/" + clipboardFormatKey)) {
569
+ var fragment = getSlateFragmentAttribute(dataTransfer);
570
+ if (fragment) {
571
+ var clipboardData_1 = new DataTransfer();
572
+ dataTransfer.types.forEach(function (type) {
573
+ clipboardData_1.setData(type, dataTransfer.getData(type));
574
+ });
575
+ clipboardData_1.setData("application/" + clipboardFormatKey, fragment);
576
+ return clipboardData_1;
577
+ }
578
+ }
579
+ return dataTransfer;
580
+ };
553
581
 
554
582
  /**
555
583
  * An auto-incrementing identifier for keys.
@@ -571,6 +599,7 @@
571
599
  /iPad|iPhone|iPod/.test(navigator.userAgent) &&
572
600
  !window.MSStream;
573
601
  var IS_APPLE = typeof navigator !== 'undefined' && /Mac OS X/.test(navigator.userAgent);
602
+ var IS_ANDROID = typeof navigator !== 'undefined' && /Android/.test(navigator.userAgent);
574
603
  var IS_FIREFOX = typeof navigator !== 'undefined' &&
575
604
  /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
576
605
  var IS_SAFARI = typeof navigator !== 'undefined' &&
@@ -582,6 +611,24 @@
582
611
  // Native beforeInput events don't work well with react on Chrome 75 and older, Chrome 76+ can use beforeInput
583
612
  var IS_CHROME_LEGACY = typeof navigator !== 'undefined' &&
584
613
  /Chrome?\/(?:[0-7][0-5]|[0-6][0-9])/i.test(navigator.userAgent);
614
+ // Firefox did not support `beforeInput` until `v87`.
615
+ var IS_FIREFOX_LEGACY = typeof navigator !== 'undefined' &&
616
+ /^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])).*/i.test(navigator.userAgent);
617
+ // qq browser
618
+ var IS_QQBROWSER = typeof navigator !== 'undefined' && /.*QQBrowser/.test(navigator.userAgent);
619
+ // UC mobile browser
620
+ var IS_UC_MOBILE = typeof navigator !== 'undefined' && /.*UCBrowser/.test(navigator.userAgent);
621
+ // Wechat browser
622
+ var IS_WECHATBROWSER = typeof navigator !== 'undefined' && /.*Wechat/.test(navigator.userAgent);
623
+ // COMPAT: Firefox/Edge Legacy don't support the `beforeinput` event
624
+ // Chrome Legacy doesn't support `beforeinput` correctly
625
+ var HAS_BEFORE_INPUT_SUPPORT = !IS_CHROME_LEGACY &&
626
+ !IS_EDGE_LEGACY &&
627
+ // globalThis is undefined in older browsers
628
+ typeof globalThis !== 'undefined' &&
629
+ globalThis.InputEvent &&
630
+ // @ts-ignore The `getTargetRanges` property isn't recognized.
631
+ typeof globalThis.InputEvent.prototype.getTargetRanges === 'function';
585
632
 
586
633
  var FAKE_LEFT_BLOCK_CARD_OFFSET = -1;
587
634
  var FAKE_RIGHT_BLOCK_CARD_OFFSET = -2;
@@ -664,27 +711,16 @@
664
711
  throw new Error("Unable to find the path for Slate node: " + JSON.stringify(node));
665
712
  },
666
713
  /**
667
- * Find the DOM node that implements DocumentOrShadowRoot for the editor.
668
- */
714
+ * Find the DOM node that implements DocumentOrShadowRoot for the editor.
715
+ */
669
716
  findDocumentOrShadowRoot: function (editor) {
670
717
  var el = AngularEditor.toDOMNode(editor, editor);
671
718
  var root = el.getRootNode();
672
- // The below exception will always be thrown for iframes because the document inside an iframe
673
- // does not inherit it's prototype from the parent document, therefore we return early
674
- if (el.ownerDocument !== document) {
675
- return el.ownerDocument;
676
- }
677
- if (!(root instanceof Document || root instanceof ShadowRoot)) {
678
- throw new Error("Unable to find DocumentOrShadowRoot for editor element: " + el);
679
- }
680
- // COMPAT: Only Chrome implements the DocumentOrShadowRoot mixin for
681
- // ShadowRoot; other browsers still implement it on the Document
682
- // interface. (2020/08/08)
683
- // https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot#Properties
684
- if (root.getSelection === undefined && el.ownerDocument !== null) {
685
- return el.ownerDocument;
686
- }
687
- return root;
719
+ if ((root instanceof Document || root instanceof ShadowRoot) &&
720
+ root.getSelection != null) {
721
+ return root;
722
+ }
723
+ return el.ownerDocument;
688
724
  },
689
725
  /**
690
726
  * Check if the editor is focused.
@@ -782,6 +818,18 @@
782
818
  insertData: function (editor, data) {
783
819
  editor.insertData(data);
784
820
  },
821
+ /**
822
+ * Insert fragment data from a `DataTransfer` into the editor.
823
+ */
824
+ insertFragmentData: function (editor, data) {
825
+ return editor.insertFragmentData(data);
826
+ },
827
+ /**
828
+ * Insert text data from a `DataTransfer` into the editor.
829
+ */
830
+ insertTextData: function (editor, data) {
831
+ return editor.insertTextData(data);
832
+ },
785
833
  /**
786
834
  * onKeydown hook.
787
835
  */
@@ -797,8 +845,8 @@
797
845
  /**
798
846
  * Sets data from the currently selected fragment on a `DataTransfer`.
799
847
  */
800
- setFragmentData: function (editor, data) {
801
- editor.setFragmentData(data);
848
+ setFragmentData: function (editor, data, originEvent) {
849
+ editor.setFragmentData(data, originEvent);
802
850
  },
803
851
  deleteCutData: function (editor) {
804
852
  editor.deleteCutData();
@@ -1063,7 +1111,9 @@
1063
1111
  // composition the ASCII characters will be prepended to the zero-width
1064
1112
  // space, so subtract 1 from the offset to account for the zero-width
1065
1113
  // space character.
1066
- if (domNode_1 && offset === domNode_1.textContent.length && parentNode && parentNode.hasAttribute('data-slate-zero-width')) {
1114
+ if (domNode_1 &&
1115
+ offset === domNode_1.textContent.length &&
1116
+ (parentNode && parentNode.hasAttribute('data-slate-zero-width'))) {
1067
1117
  offset--;
1068
1118
  }
1069
1119
  }
@@ -1382,15 +1432,15 @@
1382
1432
  }
1383
1433
  };
1384
1434
  e.apply = function (op) {
1385
- var e_1, _a, e_2, _b, e_3, _c, e_4, _d;
1435
+ var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e;
1386
1436
  var matches = [];
1387
1437
  switch (op.type) {
1388
1438
  case 'insert_text':
1389
1439
  case 'remove_text':
1390
1440
  case 'set_node': {
1391
1441
  try {
1392
- for (var _e = __values(slate.Editor.levels(e, { at: op.path })), _f = _e.next(); !_f.done; _f = _e.next()) {
1393
- var _g = __read(_f.value, 2), node = _g[0], path = _g[1];
1442
+ for (var _f = __values(slate.Editor.levels(e, { at: op.path })), _g = _f.next(); !_g.done; _g = _f.next()) {
1443
+ var _h = __read(_g.value, 2), node = _h[0], path = _h[1];
1394
1444
  var key = AngularEditor.findKey(e, node);
1395
1445
  matches.push([path, key]);
1396
1446
  }
@@ -1398,7 +1448,7 @@
1398
1448
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
1399
1449
  finally {
1400
1450
  try {
1401
- if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
1451
+ if (_g && !_g.done && (_a = _f.return)) _a.call(_f);
1402
1452
  }
1403
1453
  finally { if (e_1) throw e_1.error; }
1404
1454
  }
@@ -1409,10 +1459,10 @@
1409
1459
  case 'merge_node':
1410
1460
  case 'split_node': {
1411
1461
  try {
1412
- for (var _h = __values(slate.Editor.levels(e, {
1462
+ for (var _j = __values(slate.Editor.levels(e, {
1413
1463
  at: slate.Path.parent(op.path),
1414
- })), _j = _h.next(); !_j.done; _j = _h.next()) {
1415
- var _k = __read(_j.value, 2), node = _k[0], path = _k[1];
1464
+ })), _k = _j.next(); !_k.done; _k = _j.next()) {
1465
+ var _l = __read(_k.value, 2), node = _l[0], path = _l[1];
1416
1466
  var key = AngularEditor.findKey(e, node);
1417
1467
  matches.push([path, key]);
1418
1468
  }
@@ -1420,18 +1470,17 @@
1420
1470
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
1421
1471
  finally {
1422
1472
  try {
1423
- if (_j && !_j.done && (_b = _h.return)) _b.call(_h);
1473
+ if (_k && !_k.done && (_b = _j.return)) _b.call(_j);
1424
1474
  }
1425
1475
  finally { if (e_2) throw e_2.error; }
1426
1476
  }
1427
1477
  break;
1428
1478
  }
1429
1479
  case 'move_node': {
1480
+ var commonPath = slate.Path.common(slate.Path.parent(op.path), slate.Path.parent(op.newPath));
1430
1481
  try {
1431
- for (var _l = __values(slate.Editor.levels(e, {
1432
- at: slate.Path.common(slate.Path.parent(op.path), slate.Path.parent(op.newPath)),
1433
- })), _m = _l.next(); !_m.done; _m = _l.next()) {
1434
- var _o = __read(_m.value, 2), node = _o[0], path = _o[1];
1482
+ for (var _m = __values(slate.Editor.levels(e, { at: slate.Path.parent(op.path) })), _o = _m.next(); !_o.done; _o = _m.next()) {
1483
+ var _p = __read(_o.value, 2), node = _p[0], path = _p[1];
1435
1484
  var key = AngularEditor.findKey(e, node);
1436
1485
  matches.push([path, key]);
1437
1486
  }
@@ -1439,27 +1488,43 @@
1439
1488
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
1440
1489
  finally {
1441
1490
  try {
1442
- if (_m && !_m.done && (_c = _l.return)) _c.call(_l);
1491
+ if (_o && !_o.done && (_c = _m.return)) _c.call(_m);
1443
1492
  }
1444
1493
  finally { if (e_3) throw e_3.error; }
1445
1494
  }
1495
+ try {
1496
+ for (var _q = __values(slate.Editor.levels(e, { at: slate.Path.parent(op.newPath) })), _r = _q.next(); !_r.done; _r = _q.next()) {
1497
+ var _s = __read(_r.value, 2), node = _s[0], path = _s[1];
1498
+ if (path.length > commonPath.length) {
1499
+ var key = AngularEditor.findKey(e, node);
1500
+ matches.push([path, key]);
1501
+ }
1502
+ }
1503
+ }
1504
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
1505
+ finally {
1506
+ try {
1507
+ if (_r && !_r.done && (_d = _q.return)) _d.call(_q);
1508
+ }
1509
+ finally { if (e_4) throw e_4.error; }
1510
+ }
1446
1511
  break;
1447
1512
  }
1448
1513
  }
1449
1514
  apply(op);
1450
1515
  try {
1451
1516
  for (var matches_1 = __values(matches), matches_1_1 = matches_1.next(); !matches_1_1.done; matches_1_1 = matches_1.next()) {
1452
- var _p = __read(matches_1_1.value, 2), path = _p[0], key = _p[1];
1453
- var _q = __read(slate.Editor.node(e, path), 1), node = _q[0];
1517
+ var _t = __read(matches_1_1.value, 2), path = _t[0], key = _t[1];
1518
+ var _u = __read(slate.Editor.node(e, path), 1), node = _u[0];
1454
1519
  NODE_TO_KEY.set(node, key);
1455
1520
  }
1456
1521
  }
1457
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
1522
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
1458
1523
  finally {
1459
1524
  try {
1460
- if (matches_1_1 && !matches_1_1.done && (_d = matches_1.return)) _d.call(matches_1);
1525
+ if (matches_1_1 && !matches_1_1.done && (_e = matches_1.return)) _e.call(matches_1);
1461
1526
  }
1462
- finally { if (e_4) throw e_4.error; }
1527
+ finally { if (e_5) throw e_5.error; }
1463
1528
  }
1464
1529
  };
1465
1530
  e.onChange = function () {
@@ -1519,7 +1584,7 @@
1519
1584
  // in the HTML, and can be used for intra-Slate pasting. If it's a text
1520
1585
  // node, wrap it in a `<span>` so we have something to set an attribute on.
1521
1586
  if (isDOMText(attach)) {
1522
- var span = document.createElement('span');
1587
+ var span = attach.ownerDocument.createElement('span');
1523
1588
  // COMPAT: In Chrome and Safari, if we don't add the `white-space` style
1524
1589
  // then leading and trailing spaces will be ignored. (2017/09/21)
1525
1590
  span.style.whiteSpace = 'pre';
@@ -1533,13 +1598,14 @@
1533
1598
  attach.setAttribute('data-slate-fragment', encoded);
1534
1599
  data.setData("application/" + clipboardFormatKey, encoded);
1535
1600
  // Add the content to a <div> so that we can get its inner HTML.
1536
- var div = document.createElement('div');
1601
+ var div = contents.ownerDocument.createElement('div');
1537
1602
  div.appendChild(contents);
1538
1603
  div.setAttribute('hidden', 'true');
1539
- document.body.appendChild(div);
1604
+ contents.ownerDocument.body.appendChild(div);
1540
1605
  data.setData('text/html', div.innerHTML);
1541
1606
  data.setData('text/plain', getPlainText(div));
1542
- document.body.removeChild(div);
1607
+ contents.ownerDocument.body.removeChild(div);
1608
+ return data;
1543
1609
  };
1544
1610
  e.deleteCutData = function () {
1545
1611
  var selection = editor.selection;
@@ -1556,14 +1622,26 @@
1556
1622
  }
1557
1623
  };
1558
1624
  e.insertData = function (data) {
1559
- var e_5, _a;
1560
- var fragment = data.getData("application/" + clipboardFormatKey);
1625
+ if (!e.insertFragmentData(data)) {
1626
+ e.insertTextData(data);
1627
+ }
1628
+ };
1629
+ e.insertFragmentData = function (data) {
1630
+ /**
1631
+ * Checking copied fragment from application/x-slate-fragment or data-slate-fragment
1632
+ */
1633
+ var fragment = data.getData("application/" + clipboardFormatKey) ||
1634
+ getSlateFragmentAttribute(data);
1561
1635
  if (fragment) {
1562
1636
  var decoded = decodeURIComponent(window.atob(fragment));
1563
1637
  var parsed = JSON.parse(decoded);
1564
1638
  e.insertFragment(parsed);
1565
- return;
1639
+ return true;
1566
1640
  }
1641
+ return false;
1642
+ };
1643
+ e.insertTextData = function (data) {
1644
+ var e_6, _a;
1567
1645
  var text = data.getData('text/plain');
1568
1646
  if (text) {
1569
1647
  var lines = text.split(/\r\n|\r|\n/);
@@ -1578,14 +1656,16 @@
1578
1656
  split = true;
1579
1657
  }
1580
1658
  }
1581
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
1659
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
1582
1660
  finally {
1583
1661
  try {
1584
1662
  if (lines_1_1 && !lines_1_1.done && (_a = lines_1.return)) _a.call(lines_1);
1585
1663
  }
1586
- finally { if (e_5) throw e_5.error; }
1664
+ finally { if (e_6) throw e_6.error; }
1587
1665
  }
1666
+ return true;
1588
1667
  }
1668
+ return false;
1589
1669
  };
1590
1670
  e.onKeydown = function () { };
1591
1671
  e.onClick = function () { };
@@ -1963,12 +2043,21 @@
1963
2043
  enumerable: false,
1964
2044
  configurable: true
1965
2045
  });
2046
+ Object.defineProperty(SlateBlockCardComponent.prototype, "centerContainerElement", {
2047
+ get: function () {
2048
+ return this.centerContianer.nativeElement;
2049
+ },
2050
+ enumerable: false,
2051
+ configurable: true
2052
+ });
1966
2053
  SlateBlockCardComponent.prototype.ngOnInit = function () {
1967
- var fragment = document.createDocumentFragment();
1968
- fragment.append.apply(fragment, __spreadArray([], __read(this.centerRootNodes)));
1969
- this.centerContianer.nativeElement.appendChild(fragment);
2054
+ this.append();
1970
2055
  this.nativeElement.classList.add("slate-block-card");
1971
2056
  };
2057
+ SlateBlockCardComponent.prototype.append = function () {
2058
+ var _this = this;
2059
+ this.centerRootNodes.forEach(function (rootNode) { return !_this.centerContainerElement.contains(rootNode) && _this.centerContainerElement.appendChild(rootNode); });
2060
+ };
1972
2061
  SlateBlockCardComponent.prototype.initializeCenter = function (rootNodes) {
1973
2062
  this.centerRootNodes = rootNodes;
1974
2063
  };
@@ -2079,6 +2168,11 @@
2079
2168
  }
2080
2169
  }
2081
2170
  };
2171
+ ViewContainerItem.prototype.appendBlockCardElement = function () {
2172
+ if (this.blockCardComponentRef) {
2173
+ this.blockCardComponentRef.instance.append();
2174
+ }
2175
+ };
2082
2176
  return ViewContainerItem;
2083
2177
  }());
2084
2178
  ViewContainerItem.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: ViewContainerItem, deps: [{ token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Directive });
@@ -2441,6 +2535,8 @@
2441
2535
  });
2442
2536
  }
2443
2537
  }
2538
+ // Solve the block-card DOMElement loss when moving nodes
2539
+ record.item.appendBlockCardElement();
2444
2540
  };
2445
2541
  return ViewContainer;
2446
2542
  }());
@@ -2960,13 +3056,6 @@
2960
3056
  }] } });
2961
3057
 
2962
3058
  var timeDebug = Debug__default["default"]('slate-angular-time');
2963
- // COMPAT: Firefox/Edge Legacy don't support the `beforeinput` event
2964
- // Chrome Legacy doesn't support `beforeinput` correctly
2965
- var HAS_BEFORE_INPUT_SUPPORT = !IS_CHROME_LEGACY &&
2966
- !IS_EDGE_LEGACY &&
2967
- globalThis.InputEvent &&
2968
- // @ts-ignore The `getTargetRanges` property isn't recognized.
2969
- typeof globalThis.InputEvent.prototype.getTargetRanges === 'function';
2970
3059
  // not correctly clipboardData on beforeinput
2971
3060
  var forceOnDOMPaste = IS_SAFARI;
2972
3061
  var SlateEditableComponent = /** @class */ (function () {
@@ -3148,6 +3237,9 @@
3148
3237
  domSelection.setBaseAndExtent(newDomRange_1.startContainer, newDomRange_1.startOffset, newDomRange_1.endContainer, newDomRange_1.endOffset);
3149
3238
  }
3150
3239
  }
3240
+ else {
3241
+ domSelection.removeAllRanges();
3242
+ }
3151
3243
  setTimeout(function () {
3152
3244
  // COMPAT: In Firefox, it's not enough to create a range, you also need
3153
3245
  // to focus the contenteditable element too. (2016/11/16)
@@ -3407,7 +3499,10 @@
3407
3499
  case 'insertFromYank':
3408
3500
  case 'insertReplacementText':
3409
3501
  case 'insertText': {
3410
- if (data instanceof DataTransfer) {
3502
+ // use a weak comparison instead of 'instanceof' to allow
3503
+ // programmatic access of paste events coming from external windows
3504
+ // like cypress where cy.window does not work realibly
3505
+ if ((data === null || data === void 0 ? void 0 : data.constructor.name) === 'DataTransfer') {
3411
3506
  AngularEditor.insertData(editor, data);
3412
3507
  }
3413
3508
  else if (typeof data === 'string') {
@@ -3519,13 +3614,13 @@
3519
3614
  var isOutsideSlate = !hasStringTarget(window.getSelection()) && isTargetInsideVoid(this.editor, event.target);
3520
3615
  if (!isOutsideSlate && hasTarget(this.editor, event.target) && !this.readonly && !this.isDOMEventHandled(event, this.copy)) {
3521
3616
  event.preventDefault();
3522
- AngularEditor.setFragmentData(this.editor, event.clipboardData);
3617
+ AngularEditor.setFragmentData(this.editor, event.clipboardData, 'copy');
3523
3618
  }
3524
3619
  };
3525
3620
  SlateEditableComponent.prototype.onDOMCut = function (event) {
3526
3621
  if (!this.readonly && hasEditableTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.cut)) {
3527
3622
  event.preventDefault();
3528
- AngularEditor.setFragmentData(this.editor, event.clipboardData);
3623
+ AngularEditor.setFragmentData(this.editor, event.clipboardData, 'cut');
3529
3624
  var selection = this.editor.selection;
3530
3625
  if (selection) {
3531
3626
  AngularEditor.deleteCutData(this.editor);
@@ -3544,7 +3639,7 @@
3544
3639
  }
3545
3640
  };
3546
3641
  SlateEditableComponent.prototype.onDOMDragStart = function (event) {
3547
- if (hasTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.dragStart)) {
3642
+ if (!this.readonly && hasTarget(this.editor, event.target) && !this.isDOMEventHandled(event, this.dragStart)) {
3548
3643
  var node = AngularEditor.toSlateNode(this.editor, event.target);
3549
3644
  var path = AngularEditor.findPath(this.editor, node);
3550
3645
  var voidMatch = slate.Editor.isVoid(this.editor, node) ||
@@ -3556,7 +3651,7 @@
3556
3651
  slate.Transforms.select(this.editor, range);
3557
3652
  }
3558
3653
  this.isDraggingInternally = true;
3559
- AngularEditor.setFragmentData(this.editor, event.dataTransfer);
3654
+ AngularEditor.setFragmentData(this.editor, event.dataTransfer, 'drag');
3560
3655
  }
3561
3656
  };
3562
3657
  SlateEditableComponent.prototype.onDOMDrop = function (event) {
@@ -4133,6 +4228,8 @@
4133
4228
  exports.ELEMENT_TO_NODE = ELEMENT_TO_NODE;
4134
4229
  exports.FAKE_LEFT_BLOCK_CARD_OFFSET = FAKE_LEFT_BLOCK_CARD_OFFSET;
4135
4230
  exports.FAKE_RIGHT_BLOCK_CARD_OFFSET = FAKE_RIGHT_BLOCK_CARD_OFFSET;
4231
+ exports.HAS_BEFORE_INPUT_SUPPORT = HAS_BEFORE_INPUT_SUPPORT;
4232
+ exports.IS_ANDROID = IS_ANDROID;
4136
4233
  exports.IS_APPLE = IS_APPLE;
4137
4234
  exports.IS_CHROME = IS_CHROME;
4138
4235
  exports.IS_CHROME_LEGACY = IS_CHROME_LEGACY;
@@ -4140,10 +4237,14 @@
4140
4237
  exports.IS_DRAGGING = IS_DRAGGING;
4141
4238
  exports.IS_EDGE_LEGACY = IS_EDGE_LEGACY;
4142
4239
  exports.IS_FIREFOX = IS_FIREFOX;
4240
+ exports.IS_FIREFOX_LEGACY = IS_FIREFOX_LEGACY;
4143
4241
  exports.IS_FOCUSED = IS_FOCUSED;
4144
4242
  exports.IS_IOS = IS_IOS;
4243
+ exports.IS_QQBROWSER = IS_QQBROWSER;
4145
4244
  exports.IS_READONLY = IS_READONLY;
4146
4245
  exports.IS_SAFARI = IS_SAFARI;
4246
+ exports.IS_UC_MOBILE = IS_UC_MOBILE;
4247
+ exports.IS_WECHATBROWSER = IS_WECHATBROWSER;
4147
4248
  exports.KEY_TO_ELEMENT = KEY_TO_ELEMENT;
4148
4249
  exports.Key = Key;
4149
4250
  exports.NODE_TO_ELEMENT = NODE_TO_ELEMENT;
@@ -4159,10 +4260,12 @@
4159
4260
  exports.SlateStringComponent = SlateStringComponent;
4160
4261
  exports.check = check;
4161
4262
  exports.getCardTargetAttribute = getCardTargetAttribute;
4263
+ exports.getClipboardData = getClipboardData;
4162
4264
  exports.getDefaultView = getDefaultView;
4163
4265
  exports.getEditableChild = getEditableChild;
4164
4266
  exports.getEditableChildAndIndex = getEditableChildAndIndex;
4165
4267
  exports.getPlainText = getPlainText;
4268
+ exports.getSlateFragmentAttribute = getSlateFragmentAttribute;
4166
4269
  exports.hasBeforeContextChange = hasBeforeContextChange;
4167
4270
  exports.hasBlockCard = hasBlockCard;
4168
4271
  exports.hasBlockCardWithNode = hasBlockCardWithNode;