slate-angular 14.1.2 → 14.1.3

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.
@@ -4,7 +4,6 @@ import * as i0 from '@angular/core';
4
4
  import { TemplateRef, Component, ChangeDetectionStrategy, ViewChild, Directive, Input, HostBinding, ViewChildren, InjectionToken, Inject, forwardRef, ElementRef, NgModule } from '@angular/core';
5
5
  import getDirection from 'direction';
6
6
  import { Subject } from 'rxjs';
7
- import Debug from 'debug';
8
7
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
9
8
  import { HistoryEditor } from 'slate-history';
10
9
  import * as i1 from '@angular/common';
@@ -261,7 +260,7 @@ const IS_SAFARI = typeof navigator !== 'undefined' &&
261
260
  /Version\/[\d\.]+.*Safari/.test(navigator.userAgent);
262
261
  // "modern" Edge was released at 79.x
263
262
  const IS_EDGE_LEGACY = typeof navigator !== 'undefined' &&
264
- /Edge?\/(?:[0-6][0-9]|[0-7][0-8])/i.test(navigator.userAgent);
263
+ /Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent);
265
264
  const IS_CHROME = typeof navigator !== 'undefined' && /Chrome/i.test(navigator.userAgent);
266
265
  // Native beforeInput events don't work well with react on Chrome 75 and older, Chrome 76+ can use beforeInput
267
266
  const IS_CHROME_LEGACY = typeof navigator !== 'undefined' &&
@@ -270,7 +269,7 @@ const IS_CHROME_LEGACY = typeof navigator !== 'undefined' &&
270
269
  !/Chrome?\/(?:\d{3,})/i.test(navigator.userAgent);
271
270
  // Firefox did not support `beforeInput` until `v87`.
272
271
  const IS_FIREFOX_LEGACY = typeof navigator !== 'undefined' &&
273
- /^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])).*/i.test(navigator.userAgent);
272
+ /^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent);
274
273
  // qq browser
275
274
  const IS_QQBROWSER = typeof navigator !== 'undefined' && /.*QQBrowser/.test(navigator.userAgent);
276
275
  // UC mobile browser
@@ -2530,7 +2529,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
2530
2529
  args: [SlateDescendantComponent, { read: SlateDescendantComponent }]
2531
2530
  }] } });
2532
2531
 
2533
- const timeDebug = Debug('slate-angular-time');
2534
2532
  // not correctly clipboardData on beforeinput
2535
2533
  const forceOnDOMPaste = IS_SAFARI;
2536
2534
  class SlateEditableComponent {
@@ -2735,13 +2733,10 @@ class SlateEditableComponent {
2735
2733
  this.onChangeCallback(this.editor.children);
2736
2734
  }
2737
2735
  ngAfterViewChecked() {
2738
- timeDebug('editable ngAfterViewChecked');
2739
2736
  }
2740
2737
  ngDoCheck() {
2741
- timeDebug('editable ngDoCheck');
2742
2738
  }
2743
2739
  forceFlush() {
2744
- timeDebug('start data sync');
2745
2740
  this.detectContext();
2746
2741
  this.cdr.detectChanges();
2747
2742
  // repair collaborative editing when Chinese input is interrupted by other users' cursors
@@ -2778,7 +2773,6 @@ class SlateEditableComponent {
2778
2773
  }, 0);
2779
2774
  }
2780
2775
  this.toNativeSelection();
2781
- timeDebug('end data sync');
2782
2776
  }
2783
2777
  initializeContext() {
2784
2778
  this.context = {