slate-angular 16.0.0 → 16.1.0-next

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 (37) hide show
  1. package/components/block-card/block-card.component.d.ts +3 -3
  2. package/components/children/children.component.d.ts +5 -5
  3. package/components/descendant/descendant.component.d.ts +3 -3
  4. package/components/editable/editable.component.d.ts +5 -5
  5. package/components/element/default-element.component.d.ts +3 -3
  6. package/components/element/element.component.d.ts +3 -3
  7. package/components/leaf/default-leaf.component.d.ts +3 -3
  8. package/components/leaf/leaf.component.d.ts +3 -3
  9. package/components/leaves/leaves.component.d.ts +5 -5
  10. package/components/string/default-string.component.d.ts +3 -3
  11. package/components/string/string.component.d.ts +5 -5
  12. package/components/string/template.component.d.ts +3 -3
  13. package/components/text/default-text.component.d.ts +3 -3
  14. package/components/text/void-text.component.d.ts +3 -3
  15. package/esm2022/components/block-card/block-card.component.mjs +6 -6
  16. package/esm2022/components/children/children.component.mjs +12 -11
  17. package/esm2022/components/descendant/descendant.component.mjs +13 -12
  18. package/esm2022/components/editable/editable.component.mjs +13 -13
  19. package/esm2022/components/element/default-element.component.mjs +9 -7
  20. package/esm2022/components/element/element.component.mjs +9 -7
  21. package/esm2022/components/leaf/default-leaf.component.mjs +9 -7
  22. package/esm2022/components/leaf/leaf.component.mjs +9 -8
  23. package/esm2022/components/leaves/leaves.component.mjs +12 -11
  24. package/esm2022/components/string/default-string.component.mjs +7 -6
  25. package/esm2022/components/string/string.component.mjs +10 -9
  26. package/esm2022/components/string/template.component.mjs +6 -6
  27. package/esm2022/components/text/default-text.component.mjs +9 -7
  28. package/esm2022/components/text/void-text.component.mjs +9 -7
  29. package/esm2022/module.mjs +59 -58
  30. package/esm2022/view/container-item.mjs +1 -1
  31. package/esm2022/view/context.mjs +1 -1
  32. package/fesm2022/slate-angular.mjs +162 -144
  33. package/fesm2022/slate-angular.mjs.map +1 -1
  34. package/module.d.ts +16 -16
  35. package/package.json +8 -3
  36. package/view/container-item.d.ts +2 -2
  37. package/view/context.d.ts +2 -2
@@ -2,13 +2,12 @@ import { Editor, Range, Transforms, Path, Element, Text as Text$1, Node } from '
2
2
  import { isKeyHotkey } from 'is-hotkey';
3
3
  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
- import getDirection from 'direction';
5
+ import { direction } from 'direction';
6
6
  import scrollIntoView from 'scroll-into-view-if-needed';
7
7
  import { Subject } from 'rxjs';
8
8
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
9
9
  import { HistoryEditor } from 'slate-history';
10
- import * as i1 from '@angular/common';
11
- import { CommonModule } from '@angular/common';
10
+ import { NgFor, CommonModule } from '@angular/common';
12
11
 
13
12
  /**
14
13
  * Two weak maps that allow us rebuild a path given a node. They are populated
@@ -1614,6 +1613,24 @@ var SlateErrorCode;
1614
1613
  SlateErrorCode[SlateErrorCode["InvalidValueError"] = 4100] = "InvalidValueError";
1615
1614
  })(SlateErrorCode || (SlateErrorCode = {}));
1616
1615
 
1616
+ class SlateStringTemplate {
1617
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateStringTemplate, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1618
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateStringTemplate, isStandalone: true, selector: "slate-string-template", viewQueries: [{ propertyName: "compatibleStringTemplate", first: true, predicate: ["compatibleStringTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "voidStringTemplate", first: true, predicate: ["voidStringTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "emptyTextTemplate", first: true, predicate: ["emptyTextTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #compatibleStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <!-- Compatible with Chinese input in Chrome with \\n -->\n <span editable-text data-slate-string=\"true\"\n >{{ context.text }}<span data-slate-zero-width>{{ '\\uFEFF' }}</span></span\n >\n</ng-template>\n<ng-template #voidStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #emptyTextTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" data-slate-length=\"0\">{{ '\\uFEFF' }}</span>\n</ng-template>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1619
+ }
1620
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateStringTemplate, decorators: [{
1621
+ type: Component,
1622
+ args: [{ selector: 'slate-string-template', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<ng-template #compatibleStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <!-- Compatible with Chinese input in Chrome with \\n -->\n <span editable-text data-slate-string=\"true\"\n >{{ context.text }}<span data-slate-zero-width>{{ '\\uFEFF' }}</span></span\n >\n</ng-template>\n<ng-template #voidStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #emptyTextTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" data-slate-length=\"0\">{{ '\\uFEFF' }}</span>\n</ng-template>\n" }]
1623
+ }], propDecorators: { compatibleStringTemplate: [{
1624
+ type: ViewChild,
1625
+ args: ['compatibleStringTemplate', { read: TemplateRef, static: true }]
1626
+ }], voidStringTemplate: [{
1627
+ type: ViewChild,
1628
+ args: ['voidStringTemplate', { read: TemplateRef, static: true }]
1629
+ }], emptyTextTemplate: [{
1630
+ type: ViewChild,
1631
+ args: ['emptyTextTemplate', { read: TemplateRef, static: true }]
1632
+ }] } });
1633
+
1617
1634
  function restoreDom(editor, execute) {
1618
1635
  const editable = EDITOR_TO_ELEMENT.get(editor);
1619
1636
  let observer = new MutationObserver(mutations => {
@@ -1646,25 +1663,7 @@ function restoreDom(editor, execute) {
1646
1663
  }, 0);
1647
1664
  }
1648
1665
 
1649
- class SlateStringTemplateComponent {
1650
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateStringTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1651
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateStringTemplateComponent, selector: "slate-string-template", viewQueries: [{ propertyName: "compatibleStringTemplate", first: true, predicate: ["compatibleStringTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "voidStringTemplate", first: true, predicate: ["voidStringTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "emptyTextTemplate", first: true, predicate: ["emptyTextTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #compatibleStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <!-- Compatible with Chinese input in Chrome with \\n -->\n <span editable-text data-slate-string=\"true\"\n >{{ context.text }}<span data-slate-zero-width>{{ '\\uFEFF' }}</span></span\n >\n</ng-template>\n<ng-template #voidStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #emptyTextTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" data-slate-length=\"0\">{{ '\\uFEFF' }}</span>\n</ng-template>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1652
- }
1653
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateStringTemplateComponent, decorators: [{
1654
- type: Component,
1655
- args: [{ selector: 'slate-string-template', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #compatibleStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <!-- Compatible with Chinese input in Chrome with \\n -->\n <span editable-text data-slate-string=\"true\"\n >{{ context.text }}<span data-slate-zero-width>{{ '\\uFEFF' }}</span></span\n >\n</ng-template>\n<ng-template #voidStringTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" attr.data-slate-length=\"{{ context.elementStringLength }}\">{{ '\\uFEFF' }}</span>\n</ng-template>\n<ng-template #emptyTextTemplate let-context=\"context\" let-viewContext=\"viewContext\">\n <span editable-text data-slate-zero-width=\"z\" data-slate-length=\"0\">{{ '\\uFEFF' }}</span>\n</ng-template>\n" }]
1656
- }], propDecorators: { compatibleStringTemplate: [{
1657
- type: ViewChild,
1658
- args: ['compatibleStringTemplate', { read: TemplateRef, static: true }]
1659
- }], voidStringTemplate: [{
1660
- type: ViewChild,
1661
- args: ['voidStringTemplate', { read: TemplateRef, static: true }]
1662
- }], emptyTextTemplate: [{
1663
- type: ViewChild,
1664
- args: ['emptyTextTemplate', { read: TemplateRef, static: true }]
1665
- }] } });
1666
-
1667
- class SlateBlockCardComponent {
1666
+ class SlateBlockCard {
1668
1667
  get nativeElement() {
1669
1668
  return this.elementRef.nativeElement;
1670
1669
  }
@@ -1684,12 +1683,12 @@ class SlateBlockCardComponent {
1684
1683
  initializeCenter(rootNodes) {
1685
1684
  this.centerRootNodes = rootNodes;
1686
1685
  }
1687
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateBlockCardComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
1688
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateBlockCardComponent, 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" }); }
1686
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateBlockCard, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
1687
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", 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" }); }
1689
1688
  }
1690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateBlockCardComponent, decorators: [{
1689
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateBlockCard, decorators: [{
1691
1690
  type: Component,
1692
- args: [{ selector: 'slate-block-card, [slateBlockCard]', 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" }]
1691
+ 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" }]
1693
1692
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { centerContianer: [{
1694
1693
  type: ViewChild,
1695
1694
  args: ['centerContianer', { static: true }]
@@ -2118,7 +2117,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
2118
2117
  type: Input
2119
2118
  }] } });
2120
2119
 
2121
- class SlateDefaultStringComponent extends BaseComponent {
2120
+ class SlateDefaultString extends BaseComponent {
2122
2121
  constructor(elementRef, cdr) {
2123
2122
  super(elementRef, cdr);
2124
2123
  this.elementRef = elementRef;
@@ -2182,19 +2181,20 @@ class SlateDefaultStringComponent extends BaseComponent {
2182
2181
  ngOnInit() {
2183
2182
  this.nativeElement.setAttribute('editable-text', '');
2184
2183
  }
2185
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultStringComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2186
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateDefaultStringComponent, selector: "span[slateDefaultString]", usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2184
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultString, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2185
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateDefaultString, isStandalone: true, selector: "span[slateDefaultString]", usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2187
2186
  }
2188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultStringComponent, decorators: [{
2187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultString, decorators: [{
2189
2188
  type: Component,
2190
2189
  args: [{
2191
2190
  selector: 'span[slateDefaultString]',
2192
2191
  template: '',
2193
- changeDetection: ChangeDetectionStrategy.OnPush
2192
+ changeDetection: ChangeDetectionStrategy.OnPush,
2193
+ standalone: true
2194
2194
  }]
2195
2195
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; } });
2196
2196
 
2197
- class SlateStringComponent extends ViewContainerItem {
2197
+ class SlateString extends ViewContainerItem {
2198
2198
  constructor(elementRef, viewContainerRef) {
2199
2199
  super(viewContainerRef);
2200
2200
  this.elementRef = elementRef;
@@ -2244,7 +2244,7 @@ class SlateStringComponent extends ViewContainerItem {
2244
2244
  return this.viewContext.templateComponent.voidStringTemplate;
2245
2245
  }
2246
2246
  if (this.isLineBreakEmptyString()) {
2247
- return SlateDefaultStringComponent;
2247
+ return SlateDefaultString;
2248
2248
  }
2249
2249
  if (this.isEmptyText()) {
2250
2250
  return this.viewContext.templateComponent.emptyTextTemplate;
@@ -2252,7 +2252,7 @@ class SlateStringComponent extends ViewContainerItem {
2252
2252
  if (this.isCompatibleString()) {
2253
2253
  return this.viewContext.templateComponent.compatibleStringTemplate;
2254
2254
  }
2255
- return SlateDefaultStringComponent;
2255
+ return SlateDefaultString;
2256
2256
  }
2257
2257
  getType() {
2258
2258
  if (this.isLineBreakEmptyString()) {
@@ -2271,21 +2271,22 @@ class SlateStringComponent extends ViewContainerItem {
2271
2271
  memoizedContext(prev, next) {
2272
2272
  return false;
2273
2273
  }
2274
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateStringComponent, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
2275
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateStringComponent, selector: "span[slateString]", inputs: { context: "context" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2274
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateString, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
2275
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateString, isStandalone: true, selector: "span[slateString]", inputs: { context: "context" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2276
2276
  }
2277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateStringComponent, decorators: [{
2277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateString, decorators: [{
2278
2278
  type: Component,
2279
2279
  args: [{
2280
2280
  selector: 'span[slateString]',
2281
2281
  template: '',
2282
- changeDetection: ChangeDetectionStrategy.OnPush
2282
+ changeDetection: ChangeDetectionStrategy.OnPush,
2283
+ standalone: true
2283
2284
  }]
2284
2285
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { context: [{
2285
2286
  type: Input
2286
2287
  }] } });
2287
2288
 
2288
- class SlateDefaultLeafComponent extends BaseLeafComponent {
2289
+ class SlateDefaultLeaf extends BaseLeafComponent {
2289
2290
  onContextChange() {
2290
2291
  super.onContextChange();
2291
2292
  this.renderPlaceholder();
@@ -2294,10 +2295,10 @@ class SlateDefaultLeafComponent extends BaseLeafComponent {
2294
2295
  // Because the placeholder span is not in the current component, it is destroyed along with the current component
2295
2296
  this.destroyPlaceholder();
2296
2297
  }
2297
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultLeafComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2298
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateDefaultLeafComponent, selector: "span[slateDefaultLeaf]", host: { attributes: { "data-slate-leaf": "true" } }, usesInheritance: true, ngImport: i0, template: `<span slateString [context]="context" [viewContext]="viewContext"><span></span></span>`, isInline: true, dependencies: [{ kind: "component", type: SlateStringComponent, selector: "span[slateString]", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2298
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultLeaf, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2299
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateDefaultLeaf, isStandalone: true, selector: "span[slateDefaultLeaf]", host: { attributes: { "data-slate-leaf": "true" } }, usesInheritance: true, ngImport: i0, template: `<span slateString [context]="context" [viewContext]="viewContext"><span></span></span>`, isInline: true, dependencies: [{ kind: "component", type: SlateString, selector: "span[slateString]", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2299
2300
  }
2300
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultLeafComponent, decorators: [{
2301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultLeaf, decorators: [{
2301
2302
  type: Component,
2302
2303
  args: [{
2303
2304
  selector: 'span[slateDefaultLeaf]',
@@ -2305,11 +2306,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
2305
2306
  changeDetection: ChangeDetectionStrategy.OnPush,
2306
2307
  host: {
2307
2308
  'data-slate-leaf': 'true'
2308
- }
2309
+ },
2310
+ standalone: true,
2311
+ imports: [SlateString]
2309
2312
  }]
2310
2313
  }] });
2311
2314
 
2312
- class SlateLeafComponent extends ViewContainerItem {
2315
+ class SlateLeaf extends ViewContainerItem {
2313
2316
  ngOnInit() {
2314
2317
  this.createView();
2315
2318
  }
@@ -2317,7 +2320,7 @@ class SlateLeafComponent extends ViewContainerItem {
2317
2320
  return this.context;
2318
2321
  }
2319
2322
  getViewType() {
2320
- return (this.viewContext.renderLeaf && this.viewContext.renderLeaf(this.context.leaf)) || SlateDefaultLeafComponent;
2323
+ return (this.viewContext.renderLeaf && this.viewContext.renderLeaf(this.context.leaf)) || SlateDefaultLeaf;
2321
2324
  }
2322
2325
  memoizedContext(prev, next) {
2323
2326
  return false;
@@ -2328,21 +2331,22 @@ class SlateLeafComponent extends ViewContainerItem {
2328
2331
  }
2329
2332
  this.updateView();
2330
2333
  }
2331
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateLeafComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2332
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateLeafComponent, selector: "slate-leaf", inputs: { context: "context" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2334
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateLeaf, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2335
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateLeaf, isStandalone: true, selector: "slate-leaf", inputs: { context: "context" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2333
2336
  }
2334
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateLeafComponent, decorators: [{
2337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateLeaf, decorators: [{
2335
2338
  type: Component,
2336
2339
  args: [{
2337
2340
  selector: 'slate-leaf',
2338
2341
  template: '',
2339
- changeDetection: ChangeDetectionStrategy.OnPush
2342
+ changeDetection: ChangeDetectionStrategy.OnPush,
2343
+ standalone: true
2340
2344
  }]
2341
2345
  }], propDecorators: { context: [{
2342
2346
  type: Input
2343
2347
  }] } });
2344
2348
 
2345
- class SlateLeavesComponent extends ViewContainer {
2349
+ class SlateLeaves extends ViewContainer {
2346
2350
  constructor() {
2347
2351
  super(...arguments);
2348
2352
  this.initialized = false;
@@ -2378,14 +2382,14 @@ class SlateLeavesComponent extends ViewContainer {
2378
2382
  trackBy(index, item) {
2379
2383
  return index;
2380
2384
  }
2381
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateLeavesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2382
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateLeavesComponent, selector: "slate-leaves", inputs: { context: "context" }, viewQueries: [{ propertyName: "childrenComponent", predicate: SlateLeafComponent, descendants: true, read: SlateLeafComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `<slate-leaf
2385
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateLeaves, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2386
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateLeaves, isStandalone: true, selector: "slate-leaves", inputs: { context: "context" }, viewQueries: [{ propertyName: "childrenComponent", predicate: SlateLeaf, descendants: true, read: SlateLeaf }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `<slate-leaf
2383
2387
  [context]="context"
2384
2388
  [viewContext]="viewContext"
2385
2389
  *ngFor="let context of leafContexts; trackBy: trackBy"
2386
- ></slate-leaf>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SlateLeafComponent, selector: "slate-leaf", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2390
+ ></slate-leaf>`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SlateLeaf, selector: "slate-leaf", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2387
2391
  }
2388
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateLeavesComponent, decorators: [{
2392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateLeaves, decorators: [{
2389
2393
  type: Component,
2390
2394
  args: [{
2391
2395
  selector: 'slate-leaves',
@@ -2394,20 +2398,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
2394
2398
  [viewContext]="viewContext"
2395
2399
  *ngFor="let context of leafContexts; trackBy: trackBy"
2396
2400
  ></slate-leaf>`,
2397
- changeDetection: ChangeDetectionStrategy.OnPush
2401
+ changeDetection: ChangeDetectionStrategy.OnPush,
2402
+ standalone: true,
2403
+ imports: [NgFor, SlateLeaf]
2398
2404
  }]
2399
2405
  }], propDecorators: { context: [{
2400
2406
  type: Input
2401
2407
  }], childrenComponent: [{
2402
2408
  type: ViewChildren,
2403
- args: [SlateLeafComponent, { read: SlateLeafComponent }]
2409
+ args: [SlateLeaf, { read: SlateLeaf }]
2404
2410
  }] } });
2405
2411
 
2406
- class SlateDefaultTextComponent extends BaseTextComponent {
2407
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2408
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateDefaultTextComponent, selector: "span[slateDefaultText]", host: { attributes: { "data-slate-node": "text" } }, usesInheritance: true, ngImport: i0, template: `<slate-leaves [context]="context" [viewContext]="viewContext" [viewContext]="viewContext"></slate-leaves>`, isInline: true, dependencies: [{ kind: "component", type: SlateLeavesComponent, selector: "slate-leaves", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2412
+ class SlateDefaultText extends BaseTextComponent {
2413
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultText, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2414
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateDefaultText, isStandalone: true, selector: "span[slateDefaultText]", host: { attributes: { "data-slate-node": "text" } }, usesInheritance: true, ngImport: i0, template: `<slate-leaves [context]="context" [viewContext]="viewContext" [viewContext]="viewContext"></slate-leaves>`, isInline: true, dependencies: [{ kind: "component", type: SlateLeaves, selector: "slate-leaves", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2409
2415
  }
2410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultTextComponent, decorators: [{
2416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultText, decorators: [{
2411
2417
  type: Component,
2412
2418
  args: [{
2413
2419
  selector: 'span[slateDefaultText]',
@@ -2415,11 +2421,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
2415
2421
  changeDetection: ChangeDetectionStrategy.OnPush,
2416
2422
  host: {
2417
2423
  'data-slate-node': 'text'
2418
- }
2424
+ },
2425
+ standalone: true,
2426
+ imports: [SlateLeaves]
2419
2427
  }]
2420
2428
  }] });
2421
2429
 
2422
- class SlateVoidTextComponent extends BaseTextComponent {
2430
+ class SlateVoidText extends BaseTextComponent {
2423
2431
  ngOnInit() {
2424
2432
  this.isLeafBlock = AngularEditor.isLeafBlock(this.viewContext.editor, this.context.parent);
2425
2433
  super.ngOnInit();
@@ -2430,10 +2438,10 @@ class SlateVoidTextComponent extends BaseTextComponent {
2430
2438
  }
2431
2439
  this.isLeafBlock = AngularEditor.isLeafBlock(this.viewContext.editor, this.context.parent);
2432
2440
  }
2433
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateVoidTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2434
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateVoidTextComponent, selector: "span[slateVoidText]", host: { attributes: { "data-slate-spacer": "true", "data-slate-node": "text" }, properties: { "attr.contenteditable": "isLeafBlock" }, classAttribute: "slate-spacer" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `<slate-leaves [context]="context" [viewContext]="viewContext" [viewContext]="viewContext"></slate-leaves>`, isInline: true, dependencies: [{ kind: "component", type: SlateLeavesComponent, selector: "slate-leaves", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2441
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateVoidText, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2442
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateVoidText, isStandalone: true, selector: "span[slateVoidText]", host: { attributes: { "data-slate-spacer": "true", "data-slate-node": "text" }, properties: { "attr.contenteditable": "isLeafBlock" }, classAttribute: "slate-spacer" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `<slate-leaves [context]="context" [viewContext]="viewContext" [viewContext]="viewContext"></slate-leaves>`, isInline: true, dependencies: [{ kind: "component", type: SlateLeaves, selector: "slate-leaves", inputs: ["context"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2435
2443
  }
2436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateVoidTextComponent, decorators: [{
2444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateVoidText, decorators: [{
2437
2445
  type: Component,
2438
2446
  args: [{
2439
2447
  selector: 'span[slateVoidText]',
@@ -2444,13 +2452,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
2444
2452
  'data-slate-spacer': 'true',
2445
2453
  class: 'slate-spacer',
2446
2454
  'data-slate-node': 'text'
2447
- }
2455
+ },
2456
+ standalone: true,
2457
+ imports: [SlateLeaves]
2448
2458
  }]
2449
2459
  }] });
2450
2460
 
2451
2461
  const SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN = new InjectionToken('slate-default-element-token');
2452
2462
 
2453
- class SlateDescendantComponent extends ViewContainerItem {
2463
+ class SlateDescendant extends ViewContainerItem {
2454
2464
  get rootNodes() {
2455
2465
  if (this.blockCardComponentRef) {
2456
2466
  return [this.blockCardComponentRef.instance.nativeElement];
@@ -2496,7 +2506,7 @@ class SlateDescendantComponent extends ViewContainerItem {
2496
2506
  }
2497
2507
  createBlockCard() {
2498
2508
  const rootNodes = this.rootNodes;
2499
- this.blockCardComponentRef = this.viewContainerRef.createComponent(SlateBlockCardComponent);
2509
+ this.blockCardComponentRef = this.viewContainerRef.createComponent(SlateBlockCard);
2500
2510
  this.blockCardComponentRef.instance.initializeCenter(rootNodes);
2501
2511
  }
2502
2512
  updateBlockCard() {
@@ -2575,8 +2585,8 @@ class SlateDescendantComponent extends ViewContainerItem {
2575
2585
  else {
2576
2586
  const isVoid = this.viewContext.editor.isVoid(this.context.parent);
2577
2587
  return isVoid
2578
- ? SlateVoidTextComponent
2579
- : (this.viewContext.renderText && this.viewContext.renderText(this.descendant)) || SlateDefaultTextComponent;
2588
+ ? SlateVoidText
2589
+ : (this.viewContext.renderText && this.viewContext.renderText(this.descendant)) || SlateDefaultText;
2580
2590
  }
2581
2591
  }
2582
2592
  memoizedElementContext(prev, next) {
@@ -2600,15 +2610,16 @@ class SlateDescendantComponent extends ViewContainerItem {
2600
2610
  return this.memoizedTextContext(prev, next);
2601
2611
  }
2602
2612
  }
2603
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDescendantComponent, deps: [{ token: i0.ViewContainerRef }, { token: SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN }], target: i0.ɵɵFactoryTarget.Component }); }
2604
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateDescendantComponent, selector: "slate-descendant", inputs: { descendant: "descendant", context: "context", viewContext: "viewContext", index: "index" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2613
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDescendant, deps: [{ token: i0.ViewContainerRef }, { token: SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN }], target: i0.ɵɵFactoryTarget.Component }); }
2614
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateDescendant, isStandalone: true, selector: "slate-descendant", inputs: { descendant: "descendant", context: "context", viewContext: "viewContext", index: "index" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2605
2615
  }
2606
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDescendantComponent, decorators: [{
2616
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDescendant, decorators: [{
2607
2617
  type: Component,
2608
2618
  args: [{
2609
2619
  selector: 'slate-descendant',
2610
2620
  template: '',
2611
- changeDetection: ChangeDetectionStrategy.OnPush
2621
+ changeDetection: ChangeDetectionStrategy.OnPush,
2622
+ standalone: true
2612
2623
  }]
2613
2624
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: undefined, decorators: [{
2614
2625
  type: Inject,
@@ -2623,7 +2634,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
2623
2634
  type: Input
2624
2635
  }] } });
2625
2636
 
2626
- class SlateChildrenComponent extends ViewContainer {
2637
+ class SlateChildren extends ViewContainer {
2627
2638
  constructor() {
2628
2639
  super(...arguments);
2629
2640
  this.trackBy = (index, node) => {
@@ -2631,17 +2642,17 @@ class SlateChildrenComponent extends ViewContainer {
2631
2642
  };
2632
2643
  }
2633
2644
  ngOnInit() { }
2634
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateChildrenComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2635
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateChildrenComponent, selector: "slate-children", inputs: { children: "children", context: "context", viewContext: "viewContext" }, viewQueries: [{ propertyName: "childrenComponent", predicate: SlateDescendantComponent, descendants: true, read: SlateDescendantComponent }], usesInheritance: true, ngImport: i0, template: `<slate-descendant
2645
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateChildren, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2646
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateChildren, isStandalone: true, selector: "slate-children", inputs: { children: "children", context: "context", viewContext: "viewContext" }, viewQueries: [{ propertyName: "childrenComponent", predicate: SlateDescendant, descendants: true, read: SlateDescendant }], usesInheritance: true, ngImport: i0, template: `<slate-descendant
2636
2647
  [descendant]="descendant"
2637
2648
  [context]="context"
2638
2649
  [viewContext]="viewContext"
2639
2650
  [viewContext]="viewContext"
2640
2651
  [index]="index"
2641
2652
  *ngFor="let descendant of children; let index = index; trackBy: trackBy"
2642
- ></slate-descendant>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SlateDescendantComponent, selector: "slate-descendant", inputs: ["descendant", "context", "viewContext", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2653
+ ></slate-descendant>`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SlateDescendant, selector: "slate-descendant", inputs: ["descendant", "context", "viewContext", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2643
2654
  }
2644
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateChildrenComponent, decorators: [{
2655
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateChildren, decorators: [{
2645
2656
  type: Component,
2646
2657
  args: [{
2647
2658
  selector: 'slate-children',
@@ -2653,7 +2664,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
2653
2664
  [index]="index"
2654
2665
  *ngFor="let descendant of children; let index = index; trackBy: trackBy"
2655
2666
  ></slate-descendant>`,
2656
- changeDetection: ChangeDetectionStrategy.OnPush
2667
+ changeDetection: ChangeDetectionStrategy.OnPush,
2668
+ standalone: true,
2669
+ imports: [NgFor, SlateDescendant]
2657
2670
  }]
2658
2671
  }], propDecorators: { children: [{
2659
2672
  type: Input
@@ -2663,12 +2676,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
2663
2676
  type: Input
2664
2677
  }], childrenComponent: [{
2665
2678
  type: ViewChildren,
2666
- args: [SlateDescendantComponent, { read: SlateDescendantComponent }]
2679
+ args: [SlateDescendant, { read: SlateDescendant }]
2667
2680
  }] } });
2668
2681
 
2669
2682
  // not correctly clipboardData on beforeinput
2670
2683
  const forceOnDOMPaste = IS_SAFARI;
2671
- class SlateEditableComponent {
2684
+ class SlateEditable {
2672
2685
  get hasBeforeInputSupport() {
2673
2686
  return HAS_BEFORE_INPUT_SUPPORT;
2674
2687
  }
@@ -3394,7 +3407,7 @@ class SlateEditableComponent {
3394
3407
  const nativeEvent = event;
3395
3408
  const { selection } = editor;
3396
3409
  const element = editor.children[selection !== null ? selection.focus.path[0] : 0];
3397
- const isRTL = getDirection(Node.string(element)) === 'rtl';
3410
+ const isRTL = direction(Node.string(element)) === 'rtl';
3398
3411
  try {
3399
3412
  // COMPAT: Since we prevent the default behavior on
3400
3413
  // `beforeinput` events, the browser doesn't think there's ever
@@ -3657,16 +3670,16 @@ class SlateEditableComponent {
3657
3670
  this.destroy$.complete();
3658
3671
  EDITOR_TO_ON_CHANGE.delete(this.editor);
3659
3672
  }
3660
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateEditableComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
3661
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateEditableComponent, 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: [
3673
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateEditable, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
3674
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", 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: [
3662
3675
  {
3663
3676
  provide: NG_VALUE_ACCESSOR,
3664
- useExisting: forwardRef(() => SlateEditableComponent),
3677
+ useExisting: forwardRef(() => SlateEditable),
3665
3678
  multi: true
3666
3679
  }
3667
- ], viewQueries: [{ propertyName: "templateComponent", first: true, predicate: ["templateComponent"], descendants: true, static: true }, { propertyName: "templateElementRef", first: true, predicate: ["templateComponent"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<slate-children [children]=\"editor.children\" [context]=\"context\" [viewContext]=\"viewContext\"></slate-children>\n<slate-string-template #templateComponent></slate-string-template>\n", dependencies: [{ kind: "component", type: SlateStringTemplateComponent, selector: "slate-string-template" }, { kind: "component", type: SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3680
+ ], viewQueries: [{ propertyName: "templateComponent", first: true, predicate: ["templateComponent"], descendants: true, static: true }, { propertyName: "templateElementRef", first: true, predicate: ["templateComponent"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<slate-children [children]=\"editor.children\" [context]=\"context\" [viewContext]=\"viewContext\"></slate-children>\n<slate-string-template #templateComponent></slate-string-template>\n", dependencies: [{ kind: "component", type: SlateChildren, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "component", type: SlateStringTemplate, selector: "slate-string-template" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3668
3681
  }
3669
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateEditableComponent, decorators: [{
3682
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateEditable, decorators: [{
3670
3683
  type: Component,
3671
3684
  args: [{ selector: 'slate-editable', host: {
3672
3685
  class: 'slate-editable-container',
@@ -3678,10 +3691,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
3678
3691
  }, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
3679
3692
  {
3680
3693
  provide: NG_VALUE_ACCESSOR,
3681
- useExisting: forwardRef(() => SlateEditableComponent),
3694
+ useExisting: forwardRef(() => SlateEditable),
3682
3695
  multi: true
3683
3696
  }
3684
- ], template: "<slate-children [children]=\"editor.children\" [context]=\"context\" [viewContext]=\"viewContext\"></slate-children>\n<slate-string-template #templateComponent></slate-string-template>\n" }]
3697
+ ], standalone: true, imports: [SlateChildren, SlateStringTemplate], template: "<slate-children [children]=\"editor.children\" [context]=\"context\" [viewContext]=\"viewContext\"></slate-children>\n<slate-string-template #templateComponent></slate-string-template>\n" }]
3685
3698
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Injector }]; }, propDecorators: { editor: [{
3686
3699
  type: Input
3687
3700
  }], renderElement: [{
@@ -3825,92 +3838,97 @@ const preventInsertFromComposition = (event, editor) => {
3825
3838
  }
3826
3839
  };
3827
3840
 
3828
- class SlateElementComponent extends BaseElementComponent {
3829
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3830
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateElementComponent, selector: "[slateElement]", usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children><ng-content></ng-content>', isInline: true, dependencies: [{ kind: "component", type: SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3841
+ class SlateElement extends BaseElementComponent {
3842
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateElement, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3843
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateElement, isStandalone: true, selector: "[slateElement]", usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children><ng-content></ng-content>', isInline: true, dependencies: [{ kind: "component", type: SlateChildren, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3831
3844
  }
3832
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateElementComponent, decorators: [{
3845
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateElement, decorators: [{
3833
3846
  type: Component,
3834
3847
  args: [{
3835
3848
  selector: '[slateElement]',
3836
3849
  template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children><ng-content></ng-content>',
3837
- changeDetection: ChangeDetectionStrategy.OnPush
3850
+ changeDetection: ChangeDetectionStrategy.OnPush,
3851
+ standalone: true,
3852
+ imports: [SlateChildren]
3838
3853
  }]
3839
3854
  }] });
3840
3855
 
3841
- class SlateDefaultElementComponent extends BaseElementComponent {
3842
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3843
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateDefaultElementComponent, selector: "div[slateDefaultElement]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3856
+ class SlateDefaultElement extends BaseElementComponent {
3857
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultElement, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3858
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SlateDefaultElement, isStandalone: true, selector: "div[slateDefaultElement]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: SlateChildren, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3844
3859
  }
3845
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultElementComponent, decorators: [{
3860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateDefaultElement, decorators: [{
3846
3861
  type: Component,
3847
3862
  args: [{
3848
3863
  selector: 'div[slateDefaultElement]',
3849
3864
  template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`,
3850
- changeDetection: ChangeDetectionStrategy.OnPush
3865
+ changeDetection: ChangeDetectionStrategy.OnPush,
3866
+ standalone: true,
3867
+ imports: [SlateChildren]
3851
3868
  }]
3852
3869
  }] });
3853
3870
 
3854
3871
  class SlateModule {
3855
3872
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3856
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.1", ngImport: i0, type: SlateModule, declarations: [SlateEditableComponent,
3857
- SlateDefaultElementComponent,
3858
- SlateElementComponent,
3859
- SlateVoidTextComponent,
3860
- SlateDefaultTextComponent,
3861
- SlateStringComponent,
3862
- SlateStringTemplateComponent,
3863
- SlateDescendantComponent,
3864
- SlateChildrenComponent,
3865
- SlateBlockCardComponent,
3866
- SlateLeafComponent,
3867
- SlateLeavesComponent,
3868
- SlateDefaultLeafComponent,
3869
- SlateDefaultStringComponent], imports: [CommonModule], exports: [SlateEditableComponent,
3870
- SlateChildrenComponent,
3871
- SlateElementComponent,
3872
- SlateLeavesComponent,
3873
- SlateStringComponent,
3874
- SlateDefaultStringComponent] }); }
3873
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.1", ngImport: i0, type: SlateModule, imports: [CommonModule,
3874
+ SlateEditable,
3875
+ SlateDefaultElement,
3876
+ SlateElement,
3877
+ SlateVoidText,
3878
+ SlateDefaultText,
3879
+ SlateString,
3880
+ SlateStringTemplate,
3881
+ SlateDescendant,
3882
+ SlateChildren,
3883
+ SlateBlockCard,
3884
+ SlateLeaf,
3885
+ SlateLeaves,
3886
+ SlateDefaultLeaf,
3887
+ SlateDefaultString], exports: [SlateEditable,
3888
+ SlateChildren,
3889
+ SlateElement,
3890
+ SlateLeaves,
3891
+ SlateString,
3892
+ SlateDefaultString] }); }
3875
3893
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateModule, providers: [
3876
3894
  {
3877
3895
  provide: SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN,
3878
- useValue: SlateDefaultElementComponent
3896
+ useValue: SlateDefaultElement
3879
3897
  }
3880
3898
  ], imports: [CommonModule] }); }
3881
3899
  }
3882
3900
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SlateModule, decorators: [{
3883
3901
  type: NgModule,
3884
3902
  args: [{
3885
- declarations: [
3886
- SlateEditableComponent,
3887
- SlateDefaultElementComponent,
3888
- SlateElementComponent,
3889
- SlateVoidTextComponent,
3890
- SlateDefaultTextComponent,
3891
- SlateStringComponent,
3892
- SlateStringTemplateComponent,
3893
- SlateDescendantComponent,
3894
- SlateChildrenComponent,
3895
- SlateBlockCardComponent,
3896
- SlateLeafComponent,
3897
- SlateLeavesComponent,
3898
- SlateDefaultLeafComponent,
3899
- SlateDefaultStringComponent
3903
+ imports: [
3904
+ CommonModule,
3905
+ SlateEditable,
3906
+ SlateDefaultElement,
3907
+ SlateElement,
3908
+ SlateVoidText,
3909
+ SlateDefaultText,
3910
+ SlateString,
3911
+ SlateStringTemplate,
3912
+ SlateDescendant,
3913
+ SlateChildren,
3914
+ SlateBlockCard,
3915
+ SlateLeaf,
3916
+ SlateLeaves,
3917
+ SlateDefaultLeaf,
3918
+ SlateDefaultString
3900
3919
  ],
3901
- imports: [CommonModule],
3902
3920
  exports: [
3903
- SlateEditableComponent,
3904
- SlateChildrenComponent,
3905
- SlateElementComponent,
3906
- SlateLeavesComponent,
3907
- SlateStringComponent,
3908
- SlateDefaultStringComponent
3921
+ SlateEditable,
3922
+ SlateChildren,
3923
+ SlateElement,
3924
+ SlateLeaves,
3925
+ SlateString,
3926
+ SlateDefaultString
3909
3927
  ],
3910
3928
  providers: [
3911
3929
  {
3912
3930
  provide: SLATE_DEFAULT_ELEMENT_COMPONENT_TOKEN,
3913
- useValue: SlateDefaultElementComponent
3931
+ useValue: SlateDefaultElement
3914
3932
  }
3915
3933
  ]
3916
3934
  }]
@@ -3924,5 +3942,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImpor
3924
3942
  * Generated bundle index. Do not edit.
3925
3943
  */
3926
3944
 
3927
- export { AngularEditor, BaseComponent, BaseElementComponent, BaseLeafComponent, BaseTextComponent, DOMComment, DOMElement, DOMNode, DOMRange, DOMSelection, DOMStaticRange, DOMText, EDITOR_TO_ELEMENT, EDITOR_TO_ON_CHANGE, EDITOR_TO_PLACEHOLDER, EDITOR_TO_WINDOW, ELEMENT_TO_COMPONENT, ELEMENT_TO_NODE, FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET, HAS_BEFORE_INPUT_SUPPORT, IS_ANDROID, IS_APPLE, IS_CHROME, IS_CHROME_LEGACY, IS_CLICKING, IS_DRAGGING, IS_EDGE_LEGACY, IS_FIREFOX, IS_FIREFOX_LEGACY, IS_FOCUSED, IS_IOS, IS_QQBROWSER, IS_READONLY, IS_SAFARI, IS_UC_MOBILE, IS_WECHATBROWSER, KEY_TO_ELEMENT, Key, NODE_TO_ELEMENT, NODE_TO_INDEX, NODE_TO_KEY, NODE_TO_PARENT, PLACEHOLDER_SYMBOL, SlateChildrenComponent, SlateDefaultStringComponent, SlateEditableComponent, SlateElementComponent, SlateErrorCode, SlateLeavesComponent, SlateModule, SlateStringComponent, check, defaultScrollSelectionIntoView, getCardTargetAttribute, getClipboardData, getDefaultView, getEditableChild, getEditableChildAndIndex, getPlainText, getSlateFragmentAttribute, hasBeforeContextChange, hasBlockCard, hasBlockCardWithNode, hasEditableTarget, hasShadowRoot, hotkeys, isCardCenterByTargetAttr, isCardLeft, isCardLeftByTargetAttr, isCardRightByTargetAttr, isComponentType, isDOMComment, isDOMElement, isDOMNode, isDOMSelection, isDOMText, isDecoratorRangeListEqual, isPlainTextOnlyPaste, isTemplateRef, isValid, normalize, normalizeDOMPoint, shallowCompare, withAngular };
3945
+ export { AngularEditor, BaseComponent, BaseElementComponent, BaseLeafComponent, BaseTextComponent, DOMComment, DOMElement, DOMNode, DOMRange, DOMSelection, DOMStaticRange, DOMText, EDITOR_TO_ELEMENT, EDITOR_TO_ON_CHANGE, EDITOR_TO_PLACEHOLDER, EDITOR_TO_WINDOW, ELEMENT_TO_COMPONENT, ELEMENT_TO_NODE, FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET, HAS_BEFORE_INPUT_SUPPORT, IS_ANDROID, IS_APPLE, IS_CHROME, IS_CHROME_LEGACY, IS_CLICKING, IS_DRAGGING, IS_EDGE_LEGACY, IS_FIREFOX, IS_FIREFOX_LEGACY, IS_FOCUSED, IS_IOS, IS_QQBROWSER, IS_READONLY, IS_SAFARI, IS_UC_MOBILE, IS_WECHATBROWSER, KEY_TO_ELEMENT, Key, NODE_TO_ELEMENT, NODE_TO_INDEX, NODE_TO_KEY, NODE_TO_PARENT, PLACEHOLDER_SYMBOL, SlateChildren, SlateDefaultString, SlateEditable, SlateElement, SlateErrorCode, SlateLeaves, SlateModule, SlateString, check, defaultScrollSelectionIntoView, getCardTargetAttribute, getClipboardData, getDefaultView, getEditableChild, getEditableChildAndIndex, getPlainText, getSlateFragmentAttribute, hasBeforeContextChange, hasBlockCard, hasBlockCardWithNode, hasEditableTarget, hasShadowRoot, hotkeys, isCardCenterByTargetAttr, isCardLeft, isCardLeftByTargetAttr, isCardRightByTargetAttr, isComponentType, isDOMComment, isDOMElement, isDOMNode, isDOMSelection, isDOMText, isDecoratorRangeListEqual, isPlainTextOnlyPaste, isTemplateRef, isValid, normalize, normalizeDOMPoint, shallowCompare, withAngular };
3928
3946
  //# sourceMappingURL=slate-angular.mjs.map