slate-angular 20.0.0-next.2 → 20.1.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 (54) hide show
  1. package/fesm2022/slate-angular.mjs +99 -94
  2. package/fesm2022/slate-angular.mjs.map +1 -1
  3. package/index.d.ts +763 -3
  4. package/package.json +1 -1
  5. package/components/block-card/block-card.component.d.ts +0 -15
  6. package/components/children/children-outlet.component.d.ts +0 -9
  7. package/components/editable/editable.component.d.ts +0 -104
  8. package/components/element.flavour.d.ts +0 -7
  9. package/components/leaf/leaf.flavour.d.ts +0 -8
  10. package/components/string/string-render.d.ts +0 -39
  11. package/components/string/string.component.d.ts +0 -9
  12. package/components/text/default-text.flavour.d.ts +0 -12
  13. package/custom-event/BeforeInputEventPlugin.d.ts +0 -38
  14. package/custom-event/DOMTopLevelEventTypes.d.ts +0 -12
  15. package/custom-event/FallbackCompositionState.d.ts +0 -10
  16. package/custom-event/before-input-polyfill.d.ts +0 -5
  17. package/module.d.ts +0 -11
  18. package/plugins/angular-editor.d.ts +0 -103
  19. package/plugins/with-angular.d.ts +0 -3
  20. package/plugins/with-dom.d.ts +0 -68
  21. package/public-api.d.ts +0 -14
  22. package/types/clipboard.d.ts +0 -8
  23. package/types/error.d.ts +0 -17
  24. package/types/feature.d.ts +0 -4
  25. package/types/index.d.ts +0 -5
  26. package/types/view.d.ts +0 -6
  27. package/utils/block-card.d.ts +0 -10
  28. package/utils/clipboard/clipboard.d.ts +0 -13
  29. package/utils/clipboard/common.d.ts +0 -8
  30. package/utils/clipboard/data-transfer.d.ts +0 -5
  31. package/utils/clipboard/index.d.ts +0 -4
  32. package/utils/clipboard/navigator-clipboard.d.ts +0 -4
  33. package/utils/dom.d.ts +0 -19
  34. package/utils/environment.d.ts +0 -13
  35. package/utils/global-normalize.d.ts +0 -5
  36. package/utils/hotkeys.d.ts +0 -32
  37. package/utils/index.d.ts +0 -10
  38. package/utils/range-list.d.ts +0 -10
  39. package/utils/restore-dom.d.ts +0 -2
  40. package/utils/throttle.d.ts +0 -2
  41. package/utils/view.d.ts +0 -5
  42. package/utils/weak-maps.d.ts +0 -12
  43. package/view/base.d.ts +0 -95
  44. package/view/context-change.d.ts +0 -8
  45. package/view/context.d.ts +0 -53
  46. package/view/flavour/base.d.ts +0 -19
  47. package/view/flavour/element.d.ts +0 -27
  48. package/view/flavour/index.d.ts +0 -5
  49. package/view/flavour/leaf.d.ts +0 -17
  50. package/view/flavour/ref.d.ts +0 -5
  51. package/view/flavour/text.d.ts +0 -16
  52. package/view/render/leaves-render.d.ts +0 -21
  53. package/view/render/list-render.d.ts +0 -38
  54. package/view/render/utils.d.ts +0 -11
@@ -2,7 +2,7 @@ import { Editor, Range, Element, Transforms, Text as Text$1, Node, Path } from '
2
2
  import { EDITOR_TO_ELEMENT, NODE_TO_ELEMENT, DOMEditor, normalizeDOMPoint, isDOMSelection, IS_CHROME as IS_CHROME$1, hasShadowRoot, isDOMElement, NODE_TO_PARENT, NODE_TO_INDEX, IS_FOCUSED, isDOMNode, withDOM, NODE_TO_KEY, ELEMENT_TO_NODE, getDefaultView, EDITOR_TO_WINDOW, IS_READ_ONLY, EDITOR_TO_ON_CHANGE, TRIPLE_CLICK, isPlainTextOnlyPaste } from 'slate-dom';
3
3
  import { isKeyHotkey } from 'is-hotkey';
4
4
  import * as i0 from '@angular/core';
5
- import { TemplateRef, ViewChild, Component, ComponentRef, IterableDiffers, inject, ViewContainerRef, forwardRef, HostBinding, Input, ChangeDetectionStrategy, NgModule, ElementRef, ChangeDetectorRef, Directive } from '@angular/core';
5
+ import { TemplateRef, ComponentRef, IterableDiffers, inject, ViewContainerRef, forwardRef, HostBinding, Input, ChangeDetectionStrategy, Component, NgModule, ElementRef, ChangeDetectorRef, Directive, ViewChild } from '@angular/core';
6
6
  import { direction } from 'direction';
7
7
  import scrollIntoView from 'scroll-into-view-if-needed';
8
8
  import { Subject } from 'rxjs';
@@ -839,6 +839,9 @@ const getContentHeight = (element) => {
839
839
  }
840
840
  return Math.max(contentHeight, 0);
841
841
  };
842
+ const getZeroTextNode = () => {
843
+ return document.createTextNode('\uFEFF');
844
+ };
842
845
 
843
846
  const buildHTMLText = (wrapper, attach, data) => {
844
847
  const stringObj = JSON.stringify(data);
@@ -1512,38 +1515,12 @@ function restoreDom(editor, execute) {
1512
1515
  }, 0);
1513
1516
  }
1514
1517
 
1515
- class SlateBlockCard {
1516
- get nativeElement() {
1517
- return this.elementRef.nativeElement;
1518
- }
1519
- get centerContainerElement() {
1520
- return this.centerContianer.nativeElement;
1521
- }
1522
- constructor(elementRef) {
1523
- this.elementRef = elementRef;
1524
- }
1525
- ngOnInit() {
1526
- this.nativeElement.classList.add(`slate-block-card`);
1527
- }
1528
- append() {
1529
- this.centerRootNodes.forEach(rootNode => !this.centerContainerElement.contains(rootNode) && this.centerContainerElement.appendChild(rootNode));
1530
- }
1531
- initializeCenter(rootNodes) {
1532
- this.centerRootNodes = rootNodes;
1533
- this.append();
1518
+ class FlavourRef {
1519
+ destroy() {
1520
+ this.instance.onDestroy();
1534
1521
  }
1535
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SlateBlockCard, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
1536
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SlateBlockCard, isStandalone: true, selector: "slate-block-card, [slateBlockCard]", viewQueries: [{ propertyName: "centerContianer", first: true, predicate: ["centerContianer"], descendants: true, static: true }], ngImport: i0, template: "<span card-target=\"card-left\" class=\"card-left\">{{ '\\uFEFF' }}</span>\n<div card-target=\"card-center\" #centerContianer></div>\n<span card-target=\"card-right\" class=\"card-right\">{{ '\\uFEFF' }}</span>\n" }); }
1537
1522
  }
1538
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SlateBlockCard, decorators: [{
1539
- type: Component,
1540
- args: [{ selector: 'slate-block-card, [slateBlockCard]', standalone: true, template: "<span card-target=\"card-left\" class=\"card-left\">{{ '\\uFEFF' }}</span>\n<div card-target=\"card-center\" #centerContianer></div>\n<span card-target=\"card-right\" class=\"card-right\">{{ '\\uFEFF' }}</span>\n" }]
1541
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { centerContianer: [{
1542
- type: ViewChild,
1543
- args: ['centerContianer', { static: true }]
1544
- }] } });
1545
-
1546
- class FlavourRef {
1523
+ class BlockCardRef {
1547
1524
  destroy() {
1548
1525
  this.instance.onDestroy();
1549
1526
  }
@@ -1995,7 +1972,7 @@ const createEmptyOrVoidStringNode = () => {
1995
1972
  stringNode.setAttribute('data-slate-string', 'true');
1996
1973
  stringNode.setAttribute('data-slate-zero-width', 'z');
1997
1974
  stringNode.setAttribute('data-slate-length', '0');
1998
- const zeroWidthSpace = document.createTextNode('\uFEFF');
1975
+ const zeroWidthSpace = getZeroTextNode();
1999
1976
  stringNode.appendChild(zeroWidthSpace);
2000
1977
  stringNode.setAttribute('editable-text', '');
2001
1978
  return stringNode;
@@ -2006,7 +1983,7 @@ const createCompatibleStringNode = (text) => {
2006
1983
  stringNode.textContent = text;
2007
1984
  stringNode.setAttribute('editable-text', '');
2008
1985
  const zeroWidthSpan = document.createElement('span');
2009
- const zeroWidthSpace = document.createTextNode('\uFEFF');
1986
+ const zeroWidthSpace = getZeroTextNode();
2010
1987
  zeroWidthSpan.setAttribute('data-slate-zero-width', '');
2011
1988
  zeroWidthSpan.appendChild(zeroWidthSpace);
2012
1989
  stringNode.appendChild(zeroWidthSpan);
@@ -2016,7 +1993,7 @@ const createLineBreakEmptyStringDOM = (elementStringLength) => {
2016
1993
  const stringNode = document.createElement('span');
2017
1994
  stringNode.setAttribute('data-slate-zero-width', 'n');
2018
1995
  stringNode.setAttribute('data-slate-length', `${elementStringLength}`);
2019
- const zeroWidthSpace = document.createTextNode(`\uFEFF`);
1996
+ const zeroWidthSpace = getZeroTextNode();
2020
1997
  stringNode.appendChild(zeroWidthSpace);
2021
1998
  const brNode = document.createElement('br');
2022
1999
  stringNode.appendChild(brNode);
@@ -2226,6 +2203,49 @@ const createText = (text) => {
2226
2203
  return { nativeElement };
2227
2204
  };
2228
2205
 
2206
+ const SLATE_BLOCK_CARD_CLASS_NAME = 'slate-block-card';
2207
+ class SlateBlockCard {
2208
+ onInit() {
2209
+ const nativeElement = document.createElement('div');
2210
+ nativeElement.classList.add(SLATE_BLOCK_CARD_CLASS_NAME);
2211
+ this.nativeElement = nativeElement;
2212
+ this.createContent();
2213
+ }
2214
+ createContent() {
2215
+ const leftCaret = document.createElement('span');
2216
+ leftCaret.setAttribute(`card-target`, 'card-left');
2217
+ leftCaret.classList.add('card-left');
2218
+ leftCaret.appendChild(getZeroTextNode());
2219
+ const rightCaret = document.createElement('span');
2220
+ rightCaret.setAttribute(`card-target`, 'card-right');
2221
+ rightCaret.classList.add('card-right');
2222
+ rightCaret.appendChild(getZeroTextNode());
2223
+ const center = document.createElement('div');
2224
+ center.setAttribute(`card-target`, 'card-center');
2225
+ this.nativeElement.appendChild(leftCaret);
2226
+ this.nativeElement.appendChild(center);
2227
+ this.nativeElement.appendChild(rightCaret);
2228
+ this.centerContainer = center;
2229
+ }
2230
+ append() {
2231
+ this.centerRootNodes.forEach(rootNode => !this.centerContainer.contains(rootNode) && this.centerContainer.appendChild(rootNode));
2232
+ }
2233
+ initializeCenter(rootNodes) {
2234
+ this.centerRootNodes = rootNodes;
2235
+ this.append();
2236
+ }
2237
+ onDestroy() {
2238
+ this.nativeElement.remove();
2239
+ }
2240
+ }
2241
+ const getBlockCardByNativeElement = (nativeElement) => {
2242
+ const blockCardElement = nativeElement?.parentElement?.parentElement;
2243
+ if (blockCardElement && blockCardElement.classList.contains(SLATE_BLOCK_CARD_CLASS_NAME)) {
2244
+ return blockCardElement;
2245
+ }
2246
+ return null;
2247
+ };
2248
+
2229
2249
  class ListRender {
2230
2250
  constructor(viewContext, viewContainerRef, getOutletParent, getOutletElement) {
2231
2251
  this.viewContext = viewContext;
@@ -2249,7 +2269,7 @@ class ListRender {
2249
2269
  const context = getContext(index, descendant, parentPath, childrenContext, this.viewContext);
2250
2270
  const viewType = getViewType(descendant, parent, this.viewContext);
2251
2271
  const view = createEmbeddedViewOrComponentOrFlavour(viewType, context, this.viewContext, this.viewContainerRef);
2252
- const blockCard = createBlockCard(descendant, view, this.viewContainerRef, this.viewContext);
2272
+ const blockCard = createBlockCard(descendant, view, this.viewContext);
2253
2273
  this.views.push(view);
2254
2274
  this.contexts.push(context);
2255
2275
  this.viewTypes.push(viewType);
@@ -2290,7 +2310,7 @@ class ListRender {
2290
2310
  let blockCard;
2291
2311
  if (record.previousIndex === null) {
2292
2312
  view = createEmbeddedViewOrComponentOrFlavour(viewType, context, this.viewContext, this.viewContainerRef);
2293
- blockCard = createBlockCard(record.item, view, this.viewContainerRef, this.viewContext);
2313
+ blockCard = createBlockCard(record.item, view, this.viewContext);
2294
2314
  newContexts.push(context);
2295
2315
  newViews.push(view);
2296
2316
  newBlockCards.push(blockCard);
@@ -2303,7 +2323,7 @@ class ListRender {
2303
2323
  const previousBlockCard = this.blockCards[record.previousIndex];
2304
2324
  if (previousViewType !== viewType) {
2305
2325
  view = createEmbeddedViewOrComponentOrFlavour(viewType, context, this.viewContext, this.viewContainerRef);
2306
- blockCard = createBlockCard(record.item, view, this.viewContainerRef, this.viewContext);
2326
+ blockCard = createBlockCard(record.item, view, this.viewContext);
2307
2327
  const firstRootNode = getRootNodes(previousView, previousBlockCard)[0];
2308
2328
  const newRootNodes = getRootNodes(view, blockCard);
2309
2329
  firstRootNode.replaceWith(...newRootNodes);
@@ -2461,16 +2481,15 @@ function getViewType(item, parent, viewContext) {
2461
2481
  return isVoid ? VoidTextFlavour : (viewContext.renderText && viewContext.renderText(item)) || DefaultTextFlavour;
2462
2482
  }
2463
2483
  }
2464
- function createBlockCard(item, view, viewContainerRef, viewContext) {
2484
+ function createBlockCard(item, view, viewContext) {
2465
2485
  const isBlockCard = viewContext.editor.isBlockCard(item);
2466
2486
  if (isBlockCard) {
2467
2487
  const rootNodes = getRootNodes(view);
2468
- const blockCardComponentRef = viewContainerRef.createComponent(SlateBlockCard, {
2469
- injector: viewContainerRef.injector
2470
- });
2471
- blockCardComponentRef.instance.initializeCenter(rootNodes);
2472
- blockCardComponentRef.changeDetectorRef.detectChanges();
2473
- return blockCardComponentRef;
2488
+ const blockCardRef = new BlockCardRef();
2489
+ blockCardRef.instance = new SlateBlockCard();
2490
+ blockCardRef.instance.onInit();
2491
+ blockCardRef.instance.initializeCenter(rootNodes);
2492
+ return blockCardRef;
2474
2493
  }
2475
2494
  else {
2476
2495
  return null;
@@ -2612,9 +2631,7 @@ class SlateEditable {
2612
2631
  this.editor.children = value;
2613
2632
  this.initializeContext();
2614
2633
  if (!this.listRender.initialized) {
2615
- console.time('initialize list render');
2616
2634
  this.listRender.initialize(this.editor.children, this.editor, this.context);
2617
- console.timeEnd('initialize list render');
2618
2635
  }
2619
2636
  else {
2620
2637
  this.listRender.update(this.editor.children, this.editor, this.context);
@@ -3539,31 +3556,38 @@ class SlateEditable {
3539
3556
  this.destroy$.complete();
3540
3557
  EDITOR_TO_ON_CHANGE.delete(this.editor);
3541
3558
  }
3542
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SlateEditable, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
3543
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SlateEditable, isStandalone: true, selector: "slate-editable", inputs: { editor: "editor", renderElement: "renderElement", renderLeaf: "renderLeaf", renderText: "renderText", decorate: "decorate", placeholderDecorate: "placeholderDecorate", scrollSelectionIntoView: "scrollSelectionIntoView", isStrictDecorate: "isStrictDecorate", trackBy: "trackBy", readonly: "readonly", placeholder: "placeholder", beforeInput: "beforeInput", blur: "blur", click: "click", compositionEnd: "compositionEnd", compositionUpdate: "compositionUpdate", compositionStart: "compositionStart", copy: "copy", cut: "cut", dragOver: "dragOver", dragStart: "dragStart", dragEnd: "dragEnd", drop: "drop", focus: "focus", keydown: "keydown", paste: "paste", spellCheck: "spellCheck", autoCorrect: "autoCorrect", autoCapitalize: "autoCapitalize" }, host: { properties: { "attr.contenteditable": "readonly ? undefined : true", "attr.role": "readonly ? undefined : 'textbox'", "attr.spellCheck": "!hasBeforeInputSupport ? false : spellCheck", "attr.autoCorrect": "!hasBeforeInputSupport ? 'false' : autoCorrect", "attr.autoCapitalize": "!hasBeforeInputSupport ? 'false' : autoCapitalize", "attr.data-slate-editor": "this.dataSlateEditor", "attr.data-slate-node": "this.dataSlateNode", "attr.data-gramm": "this.dataGramm" }, classAttribute: "slate-editable-container" }, providers: [
3559
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateEditable, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
3560
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: SlateEditable, isStandalone: true, selector: "slate-editable", inputs: { editor: "editor", renderElement: "renderElement", renderLeaf: "renderLeaf", renderText: "renderText", decorate: "decorate", placeholderDecorate: "placeholderDecorate", scrollSelectionIntoView: "scrollSelectionIntoView", isStrictDecorate: "isStrictDecorate", trackBy: "trackBy", readonly: "readonly", placeholder: "placeholder", beforeInput: "beforeInput", blur: "blur", click: "click", compositionEnd: "compositionEnd", compositionUpdate: "compositionUpdate", compositionStart: "compositionStart", copy: "copy", cut: "cut", dragOver: "dragOver", dragStart: "dragStart", dragEnd: "dragEnd", drop: "drop", focus: "focus", keydown: "keydown", paste: "paste", spellCheck: "spellCheck", autoCorrect: "autoCorrect", autoCapitalize: "autoCapitalize" }, host: { properties: { "attr.contenteditable": "readonly ? undefined : true", "attr.role": "readonly ? undefined : 'textbox'", "attr.spellCheck": "!hasBeforeInputSupport ? false : spellCheck", "attr.autoCorrect": "!hasBeforeInputSupport ? 'false' : autoCorrect", "attr.autoCapitalize": "!hasBeforeInputSupport ? 'false' : autoCapitalize", "attr.data-slate-editor": "this.dataSlateEditor", "attr.data-slate-node": "this.dataSlateNode", "attr.data-gramm": "this.dataGramm" }, classAttribute: "slate-editable-container" }, providers: [
3544
3561
  {
3545
3562
  provide: NG_VALUE_ACCESSOR,
3546
3563
  useExisting: forwardRef(() => SlateEditable),
3547
3564
  multi: true
3548
3565
  }
3549
- ], usesOnChanges: true, ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3566
+ ], usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3550
3567
  }
3551
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SlateEditable, decorators: [{
3568
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateEditable, decorators: [{
3552
3569
  type: Component,
3553
- args: [{ selector: 'slate-editable', host: {
3570
+ args: [{
3571
+ selector: 'slate-editable',
3572
+ host: {
3554
3573
  class: 'slate-editable-container',
3555
3574
  '[attr.contenteditable]': 'readonly ? undefined : true',
3556
3575
  '[attr.role]': `readonly ? undefined : 'textbox'`,
3557
3576
  '[attr.spellCheck]': `!hasBeforeInputSupport ? false : spellCheck`,
3558
3577
  '[attr.autoCorrect]': `!hasBeforeInputSupport ? 'false' : autoCorrect`,
3559
3578
  '[attr.autoCapitalize]': `!hasBeforeInputSupport ? 'false' : autoCapitalize`
3560
- }, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
3579
+ },
3580
+ template: '',
3581
+ changeDetection: ChangeDetectionStrategy.OnPush,
3582
+ providers: [
3561
3583
  {
3562
3584
  provide: NG_VALUE_ACCESSOR,
3563
3585
  useExisting: forwardRef(() => SlateEditable),
3564
3586
  multi: true
3565
3587
  }
3566
- ], imports: [], template: "" }]
3588
+ ],
3589
+ imports: []
3590
+ }]
3567
3591
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Injector }], propDecorators: { editor: [{
3568
3592
  type: Input
3569
3593
  }], renderElement: [{
@@ -3698,10 +3722,10 @@ class SlateChildrenOutlet {
3698
3722
  getNativeElement() {
3699
3723
  return this.elementRef.nativeElement;
3700
3724
  }
3701
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SlateChildrenOutlet, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
3702
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SlateChildrenOutlet, isStandalone: true, selector: "slate-children-outlet", ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3725
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateChildrenOutlet, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
3726
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: SlateChildrenOutlet, isStandalone: true, selector: "slate-children-outlet", ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3703
3727
  }
3704
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SlateChildrenOutlet, decorators: [{
3728
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateChildrenOutlet, decorators: [{
3705
3729
  type: Component,
3706
3730
  args: [{
3707
3731
  selector: 'slate-children-outlet',
@@ -3711,35 +3735,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
3711
3735
  }]
3712
3736
  }], ctorParameters: () => [{ type: i0.ElementRef }] });
3713
3737
 
3714
- class SlateString {
3715
- ngOnInit() { }
3716
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SlateString, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3717
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SlateString, isStandalone: true, selector: "span[slateString]", inputs: { context: "context", viewContext: "viewContext" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3718
- }
3719
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SlateString, decorators: [{
3720
- type: Component,
3721
- args: [{
3722
- selector: 'span[slateString]',
3723
- template: '',
3724
- changeDetection: ChangeDetectionStrategy.OnPush,
3725
- standalone: true
3726
- }]
3727
- }], propDecorators: { context: [{
3728
- type: Input
3729
- }], viewContext: [{
3730
- type: Input
3731
- }] } });
3732
-
3733
3738
  class SlateModule {
3734
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SlateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3735
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: SlateModule, imports: [CommonModule, SlateEditable, SlateBlockCard, SlateChildrenOutlet, SlateString], exports: [SlateEditable, SlateChildrenOutlet, SlateString] }); }
3736
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SlateModule, imports: [CommonModule] }); }
3739
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3740
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: SlateModule, imports: [CommonModule, SlateEditable, SlateChildrenOutlet], exports: [SlateEditable, SlateChildrenOutlet] }); }
3741
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateModule, imports: [CommonModule] }); }
3737
3742
  }
3738
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SlateModule, decorators: [{
3743
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateModule, decorators: [{
3739
3744
  type: NgModule,
3740
3745
  args: [{
3741
- imports: [CommonModule, SlateEditable, SlateBlockCard, SlateChildrenOutlet, SlateString],
3742
- exports: [SlateEditable, SlateChildrenOutlet, SlateString],
3746
+ imports: [CommonModule, SlateEditable, SlateChildrenOutlet],
3747
+ exports: [SlateEditable, SlateChildrenOutlet],
3743
3748
  providers: []
3744
3749
  }]
3745
3750
  }] });
@@ -3775,10 +3780,10 @@ class BaseComponent {
3775
3780
  get nativeElement() {
3776
3781
  return this.elementRef.nativeElement;
3777
3782
  }
3778
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3779
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: BaseComponent, isStandalone: true, inputs: { context: "context", viewContext: "viewContext" }, ngImport: i0 }); }
3783
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3784
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: BaseComponent, isStandalone: true, inputs: { context: "context", viewContext: "viewContext" }, ngImport: i0 }); }
3780
3785
  }
3781
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseComponent, decorators: [{
3786
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: BaseComponent, decorators: [{
3782
3787
  type: Directive
3783
3788
  }], propDecorators: { context: [{
3784
3789
  type: Input
@@ -3882,10 +3887,10 @@ class BaseElementComponent extends BaseComponent {
3882
3887
  readonly: this._context.readonly
3883
3888
  };
3884
3889
  }
3885
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
3886
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: BaseElementComponent, isStandalone: true, viewQueries: [{ propertyName: "childrenOutletInstance", first: true, predicate: SlateChildrenOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0 }); }
3890
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: BaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
3891
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: BaseElementComponent, isStandalone: true, viewQueries: [{ propertyName: "childrenOutletInstance", first: true, predicate: SlateChildrenOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0 }); }
3887
3892
  }
3888
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseElementComponent, decorators: [{
3893
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: BaseElementComponent, decorators: [{
3889
3894
  type: Directive
3890
3895
  }], propDecorators: { childrenOutletInstance: [{
3891
3896
  type: ViewChild,
@@ -3933,10 +3938,10 @@ class BaseTextComponent extends BaseComponent {
3933
3938
  }
3934
3939
  this.leavesRender.update(this.context);
3935
3940
  }
3936
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
3937
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: BaseTextComponent, isStandalone: true, viewQueries: [{ propertyName: "childrenOutletInstance", first: true, predicate: SlateChildrenOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0 }); }
3941
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: BaseTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
3942
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: BaseTextComponent, isStandalone: true, viewQueries: [{ propertyName: "childrenOutletInstance", first: true, predicate: SlateChildrenOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0 }); }
3938
3943
  }
3939
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseTextComponent, decorators: [{
3944
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: BaseTextComponent, decorators: [{
3940
3945
  type: Directive
3941
3946
  }], propDecorators: { childrenOutletInstance: [{
3942
3947
  type: ViewChild,
@@ -4018,10 +4023,10 @@ class BaseLeafComponent extends BaseComponent {
4018
4023
  this.nativeElement.classList.remove('leaf-with-placeholder');
4019
4024
  }
4020
4025
  }
4021
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseLeafComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
4022
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: BaseLeafComponent, isStandalone: true, host: { properties: { "attr.data-slate-leaf": "this.isSlateLeaf" } }, usesInheritance: true, ngImport: i0 }); }
4026
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: BaseLeafComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
4027
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: BaseLeafComponent, isStandalone: true, host: { properties: { "attr.data-slate-leaf": "this.isSlateLeaf" } }, usesInheritance: true, ngImport: i0 }); }
4023
4028
  }
4024
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseLeafComponent, decorators: [{
4029
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: BaseLeafComponent, decorators: [{
4025
4030
  type: Directive
4026
4031
  }], propDecorators: { isSlateLeaf: [{
4027
4032
  type: HostBinding,
@@ -4036,5 +4041,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
4036
4041
  * Generated bundle index. Do not edit.
4037
4042
  */
4038
4043
 
4039
- export { AngularEditor, BaseComponent, BaseElementComponent, BaseElementFlavour, BaseFlavour, BaseLeafComponent, BaseLeafFlavour, BaseTextComponent, BaseTextFlavour, DefaultTextFlavour, EDITOR_TO_AFTER_VIEW_INIT_QUEUE, ELEMENT_TO_COMPONENT, FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET, FlavourRef, HAS_BEFORE_INPUT_SUPPORT, IS_ANDROID, IS_APPLE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_FIREFOX_LEGACY, IS_IOS, IS_QQBROWSER, IS_SAFARI, IS_UC_MOBILE, IS_WECHATBROWSER, PLACEHOLDER_SYMBOL, SlateChildrenOutlet, SlateEditable, SlateErrorCode, SlateFragmentAttributeKey, SlateModule, SlateString, VoidTextFlavour, blobAsString, buildHTMLText, check, completeTable, createClipboardData, createText, createThrottleRAF, defaultScrollSelectionIntoView, fallbackCopyText, getCardTargetAttribute, getClipboardData, getClipboardFromHTMLText, getContentHeight, getDataTransferClipboard, getDataTransferClipboardText, getNavigatorClipboard, getPlainText, getSelection, getSlateFragmentAttribute, hasAfterContextChange, hasBeforeContextChange, hasBlockCard, hasBlockCardWithNode, hotkeys, isCardCenterByTargetAttr, isCardLeft, isCardLeftByTargetAttr, isCardRightByTargetAttr, isClipboardFile, isClipboardReadSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isComponentType, isDOMText, isDecoratorRangeListEqual, isFlavourType, isInvalidTable, isTemplateRef, isValid, normalize, setClipboardData, setDataTransferClipboard, setDataTransferClipboardText, setNavigatorClipboard, shallowCompare, stripHtml, withAngular };
4044
+ export { AngularEditor, BaseComponent, BaseElementComponent, BaseElementFlavour, BaseFlavour, BaseLeafComponent, BaseLeafFlavour, BaseTextComponent, BaseTextFlavour, BlockCardRef, DefaultTextFlavour, EDITOR_TO_AFTER_VIEW_INIT_QUEUE, ELEMENT_TO_COMPONENT, FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET, FlavourRef, HAS_BEFORE_INPUT_SUPPORT, IS_ANDROID, IS_APPLE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_FIREFOX_LEGACY, IS_IOS, IS_QQBROWSER, IS_SAFARI, IS_UC_MOBILE, IS_WECHATBROWSER, PLACEHOLDER_SYMBOL, SLATE_BLOCK_CARD_CLASS_NAME, SlateBlockCard, SlateChildrenOutlet, SlateEditable, SlateErrorCode, SlateFragmentAttributeKey, SlateModule, VoidTextFlavour, blobAsString, buildHTMLText, check, completeTable, createClipboardData, createText, createThrottleRAF, defaultScrollSelectionIntoView, fallbackCopyText, getBlockCardByNativeElement, getCardTargetAttribute, getClipboardData, getClipboardFromHTMLText, getContentHeight, getDataTransferClipboard, getDataTransferClipboardText, getNavigatorClipboard, getPlainText, getSelection, getSlateFragmentAttribute, getZeroTextNode, hasAfterContextChange, hasBeforeContextChange, hasBlockCard, hasBlockCardWithNode, hotkeys, isCardCenterByTargetAttr, isCardLeft, isCardLeftByTargetAttr, isCardRightByTargetAttr, isClipboardFile, isClipboardReadSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isComponentType, isDOMText, isDecoratorRangeListEqual, isFlavourType, isInvalidTable, isTemplateRef, isValid, normalize, setClipboardData, setDataTransferClipboard, setDataTransferClipboardText, setNavigatorClipboard, shallowCompare, stripHtml, withAngular };
4040
4045
  //# sourceMappingURL=slate-angular.mjs.map