@myrmidon/cadmus-layer-demo 9.0.0 → 10.0.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.
@@ -18,8 +18,8 @@ import * as i8 from '@angular/material/toolbar';
18
18
  import { MatToolbarModule } from '@angular/material/toolbar';
19
19
  import * as i9 from '@angular/material/tooltip';
20
20
  import { MatTooltipModule } from '@angular/material/tooltip';
21
- import * as i10 from '@myrmidon/ng-tools';
22
- import { NgToolsModule } from '@myrmidon/ng-tools';
21
+ import * as i10 from '@myrmidon/ngx-tools';
22
+ import { SafeHtmlPipe } from '@myrmidon/ngx-tools';
23
23
  import { CommonModule } from '@angular/common';
24
24
  import * as i1$1 from '@angular/router';
25
25
  import { RouterModule } from '@angular/router';
@@ -116,10 +116,10 @@ class LayerDemoComponent {
116
116
  this.userLocation =
117
117
  this._textLayerService.getSelectedLocationForEdit(this._textLayerService.getSelectedRange()) || undefined;
118
118
  }
119
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: LayerDemoComponent, deps: [{ token: i1.FormBuilder }, { token: i2.TextLayerService }], target: i0.ɵɵFactoryTarget.Component }); }
120
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: LayerDemoComponent, isStandalone: false, selector: "cadmus-layer-demo", viewQueries: [{ propertyName: "_resultElement", first: true, predicate: ["resultElem"], descendants: true }], ngImport: i0, template: "<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Layered Text Demo</h3>\n </mat-card-header>\n <mat-card-content>\n <article>\n <p>\n Enter some base text and zero or more layer fragments locations, then\n click the render button. This renders the base text with all its ranges.\n </p>\n <p>\n Once the text has been decorated, select any portion of it, either\n including a decorated part, or not. Then, if you selected a part\n including decorations, click the location button with the checkmark\n (=get the location of the fragment to edit); else, click the location\n button with the plus (=get the location of a new fragment).\n </p>\n <p>\n This will show you the token-based coordinates corresponding to your\n selection, provided that if you include any portion of a decorated text\n you will get the full coordinates of the decoration; otherwise, you will\n just get the coordinates of the selected character(s).\n </p>\n <p>\n This behavior is used to allow users edit existing part fragments by\n just selecting any part of it, even partially; while they must be\n precise when they are creating a new fragment.\n </p>\n </article>\n <hr />\n\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\n <div>\n <mat-form-field>\n <mat-label>base text</mat-label>\n <textarea\n matInput\n type=\"text\"\n id=\"text\"\n maxlength=\"1000\"\n spellcheck=\"false\"\n formControlName=\"text\"\n ></textarea>\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field>\n <mat-label>location</mat-label>\n <input\n matInput\n type=\"text\"\n id=\"location\"\n required\n spellcheck=\"false\"\n formControlName=\"location\"\n />\n <mat-hint>Y.X&#64;AxR</mat-hint>\n </mat-form-field>\n </div>\n\n <div>\n <mat-toolbar>\n <span>\n <button\n mat-icon-button\n (click)=\"addLocation()\"\n type=\"button\"\n matTooltip=\"Add the specified location\"\n >\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"clearLocations()\"\n type=\"button\"\n matTooltip=\"Remove all the locations\"\n >\n <mat-icon class=\"mat-warn\">delete_sweep</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n matTooltip=\"Render the decorated base text\"\n >\n <mat-icon class=\"mat-primary\">play_circle_outline</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForNew()\"\n type=\"button\"\n matTooltip=\"Get location for new item\"\n >\n <mat-icon>playlist_add</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForEdit()\"\n type=\"button\"\n matTooltip=\"Get location for selected item\"\n >\n <mat-icon>playlist_add_check</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Larger text\"\n (click)=\"makeLarger()\"\n [disabled]=\"textSize >= 24\"\n >\n <mat-icon>format_size</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Smaller text\"\n (click)=\"makeSmaller()\"\n [disabled]=\"textSize <= 12\"\n >\n <mat-icon>text_fields</mat-icon>\n </button>\n </span>\n <span class=\"tb-fill-remaining-space\"></span>\n <span>{{ userLocation }}</span>\n </mat-toolbar>\n </div>\n\n <table>\n <tbody>\n @for (loc of locations; track loc) {\n <tr>\n <td>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"removeLocation(loc)\"\n >\n <mat-icon class=\"mat-warn\">remove_circle</mat-icon>\n </button>\n </td>\n <td>{{ loc.toString() }}</td>\n </tr>\n }\n </tbody>\n </table>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Rendition</h3>\n </mat-card-header>\n <mat-card-content>\n <div\n [style.font-size]=\"textSize + 'px'\"\n [innerHtml]=\"result | safeHtml : 'html'\"\n id=\"result\"\n #resultElem\n ></div>\n <hr />\n <div>\n <code>{{ result }}</code>\n </div>\n </mat-card-content>\n</mat-card>\n", styles: ["textarea#text{min-width:300px;min-height:100px}:host ::ng-deep div#result{counter-reset:text-y-counter}:host ::ng-deep div#result p:before{content:counter(text-y-counter);counter-increment:text-y-counter;margin-right:6px;color:#a0a0a0}:host ::ng-deep span.fr{background-color:#ff0;border:1px solid silver;border-radius:6px}article{column-width:20em}\n"], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i9.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i10.SafeHtmlPipe, name: "safeHtml" }] }); }
119
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: LayerDemoComponent, deps: [{ token: i1.FormBuilder }, { token: i2.TextLayerService }], target: i0.ɵɵFactoryTarget.Component }); }
120
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: LayerDemoComponent, isStandalone: false, selector: "cadmus-layer-demo", viewQueries: [{ propertyName: "_resultElement", first: true, predicate: ["resultElem"], descendants: true }], ngImport: i0, template: "<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Layered Text Demo</h3>\n </mat-card-header>\n <mat-card-content>\n <article>\n <p>\n Enter some base text and zero or more layer fragments locations, then\n click the render button. This renders the base text with all its ranges.\n </p>\n <p>\n Once the text has been decorated, select any portion of it, either\n including a decorated part, or not. Then, if you selected a part\n including decorations, click the location button with the checkmark\n (=get the location of the fragment to edit); else, click the location\n button with the plus (=get the location of a new fragment).\n </p>\n <p>\n This will show you the token-based coordinates corresponding to your\n selection, provided that if you include any portion of a decorated text\n you will get the full coordinates of the decoration; otherwise, you will\n just get the coordinates of the selected character(s).\n </p>\n <p>\n This behavior is used to allow users edit existing part fragments by\n just selecting any part of it, even partially; while they must be\n precise when they are creating a new fragment.\n </p>\n </article>\n <hr />\n\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\n <div>\n <mat-form-field>\n <mat-label>base text</mat-label>\n <textarea\n matInput\n type=\"text\"\n id=\"text\"\n maxlength=\"1000\"\n spellcheck=\"false\"\n formControlName=\"text\"\n ></textarea>\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field>\n <mat-label>location</mat-label>\n <input\n matInput\n type=\"text\"\n id=\"location\"\n required\n spellcheck=\"false\"\n formControlName=\"location\"\n />\n <mat-hint>Y.X&#64;AxR</mat-hint>\n </mat-form-field>\n </div>\n\n <div>\n <mat-toolbar>\n <span>\n <button\n mat-icon-button\n (click)=\"addLocation()\"\n type=\"button\"\n matTooltip=\"Add the specified location\"\n >\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"clearLocations()\"\n type=\"button\"\n matTooltip=\"Remove all the locations\"\n >\n <mat-icon class=\"mat-warn\">delete_sweep</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n matTooltip=\"Render the decorated base text\"\n >\n <mat-icon class=\"mat-primary\">play_circle_outline</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForNew()\"\n type=\"button\"\n matTooltip=\"Get location for new item\"\n >\n <mat-icon>playlist_add</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForEdit()\"\n type=\"button\"\n matTooltip=\"Get location for selected item\"\n >\n <mat-icon>playlist_add_check</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Larger text\"\n (click)=\"makeLarger()\"\n [disabled]=\"textSize >= 24\"\n >\n <mat-icon>format_size</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Smaller text\"\n (click)=\"makeSmaller()\"\n [disabled]=\"textSize <= 12\"\n >\n <mat-icon>text_fields</mat-icon>\n </button>\n </span>\n <span class=\"tb-fill-remaining-space\"></span>\n <span>{{ userLocation }}</span>\n </mat-toolbar>\n </div>\n\n <table>\n <tbody>\n @for (loc of locations; track loc) {\n <tr>\n <td>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"removeLocation(loc)\"\n >\n <mat-icon class=\"mat-warn\">remove_circle</mat-icon>\n </button>\n </td>\n <td>{{ loc.toString() }}</td>\n </tr>\n }\n </tbody>\n </table>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Rendition</h3>\n </mat-card-header>\n <mat-card-content>\n <div\n [style.font-size]=\"textSize + 'px'\"\n [innerHtml]=\"result | safeHtml : 'html'\"\n id=\"result\"\n #resultElem\n ></div>\n <hr />\n <div>\n <code>{{ result }}</code>\n </div>\n </mat-card-content>\n</mat-card>\n", styles: ["textarea#text{min-width:300px;min-height:100px}:host ::ng-deep div#result{counter-reset:text-y-counter}:host ::ng-deep div#result p:before{content:counter(text-y-counter);counter-increment:text-y-counter;margin-right:6px;color:#a0a0a0}:host ::ng-deep span.fr{background-color:#ff0;border:1px solid silver;border-radius:6px}article{column-width:20em}\n"], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i9.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i10.SafeHtmlPipe, name: "safeHtml" }] }); }
121
121
  }
122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: LayerDemoComponent, decorators: [{
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: LayerDemoComponent, decorators: [{
123
123
  type: Component,
124
124
  args: [{ selector: 'cadmus-layer-demo', standalone: false, template: "<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Layered Text Demo</h3>\n </mat-card-header>\n <mat-card-content>\n <article>\n <p>\n Enter some base text and zero or more layer fragments locations, then\n click the render button. This renders the base text with all its ranges.\n </p>\n <p>\n Once the text has been decorated, select any portion of it, either\n including a decorated part, or not. Then, if you selected a part\n including decorations, click the location button with the checkmark\n (=get the location of the fragment to edit); else, click the location\n button with the plus (=get the location of a new fragment).\n </p>\n <p>\n This will show you the token-based coordinates corresponding to your\n selection, provided that if you include any portion of a decorated text\n you will get the full coordinates of the decoration; otherwise, you will\n just get the coordinates of the selected character(s).\n </p>\n <p>\n This behavior is used to allow users edit existing part fragments by\n just selecting any part of it, even partially; while they must be\n precise when they are creating a new fragment.\n </p>\n </article>\n <hr />\n\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\n <div>\n <mat-form-field>\n <mat-label>base text</mat-label>\n <textarea\n matInput\n type=\"text\"\n id=\"text\"\n maxlength=\"1000\"\n spellcheck=\"false\"\n formControlName=\"text\"\n ></textarea>\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field>\n <mat-label>location</mat-label>\n <input\n matInput\n type=\"text\"\n id=\"location\"\n required\n spellcheck=\"false\"\n formControlName=\"location\"\n />\n <mat-hint>Y.X&#64;AxR</mat-hint>\n </mat-form-field>\n </div>\n\n <div>\n <mat-toolbar>\n <span>\n <button\n mat-icon-button\n (click)=\"addLocation()\"\n type=\"button\"\n matTooltip=\"Add the specified location\"\n >\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"clearLocations()\"\n type=\"button\"\n matTooltip=\"Remove all the locations\"\n >\n <mat-icon class=\"mat-warn\">delete_sweep</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n matTooltip=\"Render the decorated base text\"\n >\n <mat-icon class=\"mat-primary\">play_circle_outline</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForNew()\"\n type=\"button\"\n matTooltip=\"Get location for new item\"\n >\n <mat-icon>playlist_add</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForEdit()\"\n type=\"button\"\n matTooltip=\"Get location for selected item\"\n >\n <mat-icon>playlist_add_check</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Larger text\"\n (click)=\"makeLarger()\"\n [disabled]=\"textSize >= 24\"\n >\n <mat-icon>format_size</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Smaller text\"\n (click)=\"makeSmaller()\"\n [disabled]=\"textSize <= 12\"\n >\n <mat-icon>text_fields</mat-icon>\n </button>\n </span>\n <span class=\"tb-fill-remaining-space\"></span>\n <span>{{ userLocation }}</span>\n </mat-toolbar>\n </div>\n\n <table>\n <tbody>\n @for (loc of locations; track loc) {\n <tr>\n <td>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"removeLocation(loc)\"\n >\n <mat-icon class=\"mat-warn\">remove_circle</mat-icon>\n </button>\n </td>\n <td>{{ loc.toString() }}</td>\n </tr>\n }\n </tbody>\n </table>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Rendition</h3>\n </mat-card-header>\n <mat-card-content>\n <div\n [style.font-size]=\"textSize + 'px'\"\n [innerHtml]=\"result | safeHtml : 'html'\"\n id=\"result\"\n #resultElem\n ></div>\n <hr />\n <div>\n <code>{{ result }}</code>\n </div>\n </mat-card-content>\n</mat-card>\n", styles: ["textarea#text{min-width:300px;min-height:100px}:host ::ng-deep div#result{counter-reset:text-y-counter}:host ::ng-deep div#result p:before{content:counter(text-y-counter);counter-increment:text-y-counter;margin-right:6px;color:#a0a0a0}:host ::ng-deep span.fr{background-color:#ff0;border:1px solid silver;border-radius:6px}article{column-width:20em}\n"] }]
125
125
  }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.TextLayerService }], propDecorators: { _resultElement: [{
@@ -132,8 +132,8 @@ const RouterModuleForChild = RouterModule.forChild([
132
132
  { path: '', pathMatch: 'full', component: LayerDemoComponent },
133
133
  ]);
134
134
  class CadmusLayerDemoModule {
135
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: CadmusLayerDemoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
136
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: CadmusLayerDemoModule, declarations: [LayerDemoComponent], imports: [CommonModule,
135
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CadmusLayerDemoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
136
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.1", ngImport: i0, type: CadmusLayerDemoModule, declarations: [LayerDemoComponent], imports: [CommonModule,
137
137
  FormsModule,
138
138
  ReactiveFormsModule, i1$1.RouterModule,
139
139
  // material
@@ -144,11 +144,12 @@ class CadmusLayerDemoModule {
144
144
  MatInputModule,
145
145
  MatToolbarModule,
146
146
  MatTooltipModule,
147
+ // myrmidon
148
+ SafeHtmlPipe,
147
149
  // cadmus
148
- NgToolsModule,
149
150
  CadmusCoreModule,
150
151
  CadmusUiModule], exports: [LayerDemoComponent] }); }
151
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: CadmusLayerDemoModule, imports: [CommonModule,
152
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CadmusLayerDemoModule, imports: [CommonModule,
152
153
  FormsModule,
153
154
  ReactiveFormsModule,
154
155
  RouterModuleForChild,
@@ -161,11 +162,10 @@ class CadmusLayerDemoModule {
161
162
  MatToolbarModule,
162
163
  MatTooltipModule,
163
164
  // cadmus
164
- NgToolsModule,
165
165
  CadmusCoreModule,
166
166
  CadmusUiModule] }); }
167
167
  }
168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: CadmusLayerDemoModule, decorators: [{
168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CadmusLayerDemoModule, decorators: [{
169
169
  type: NgModule,
170
170
  args: [{
171
171
  imports: [
@@ -181,8 +181,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
181
181
  MatInputModule,
182
182
  MatToolbarModule,
183
183
  MatTooltipModule,
184
+ // myrmidon
185
+ SafeHtmlPipe,
184
186
  // cadmus
185
- NgToolsModule,
186
187
  CadmusCoreModule,
187
188
  CadmusUiModule,
188
189
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"myrmidon-cadmus-layer-demo.mjs","sources":["../../../../projects/myrmidon/cadmus-layer-demo/src/lib/layer-demo/layer-demo.component.ts","../../../../projects/myrmidon/cadmus-layer-demo/src/lib/layer-demo/layer-demo.component.html","../../../../projects/myrmidon/cadmus-layer-demo/src/lib/cadmus-layer-demo.module.ts","../../../../projects/myrmidon/cadmus-layer-demo/src/public-api.ts","../../../../projects/myrmidon/cadmus-layer-demo/src/myrmidon-cadmus-layer-demo.ts"],"sourcesContent":["import { Component, ViewChild, ElementRef } from '@angular/core';\r\nimport { FormGroup, FormControl, FormBuilder } from '@angular/forms';\r\nimport { TextLayerService, TokenLocation } from '@myrmidon/cadmus-core';\r\n\r\n@Component({\r\n selector: 'cadmus-layer-demo',\r\n templateUrl: './layer-demo.component.html',\r\n styleUrls: ['./layer-demo.component.css'],\r\n standalone: false,\r\n})\r\nexport class LayerDemoComponent {\r\n @ViewChild('resultElem') _resultElement?: ElementRef;\r\n\r\n public locations: TokenLocation[];\r\n public result: string;\r\n public userLocation?: TokenLocation;\r\n // form\r\n public rendition: FormGroup;\r\n public text: FormControl<string | null>;\r\n public location: FormControl<string | null>;\r\n\r\n public textSize: number;\r\n\r\n constructor(\r\n formBuilder: FormBuilder,\r\n private _textLayerService: TextLayerService\r\n ) {\r\n this.textSize = 14;\r\n this.locations = [];\r\n this.text = formBuilder.control(\r\n 'alpha beta\\ngamma\\ndelta epsilon waw\\nzeta'\r\n );\r\n this.location = formBuilder.control('1.2@2x2');\r\n this.rendition = formBuilder.group({\r\n text: this.text,\r\n location: this.location,\r\n });\r\n this.result = '';\r\n }\r\n\r\n public makeLarger(): void {\r\n const size = this.textSize + 2;\r\n if (size > 24) {\r\n return;\r\n }\r\n this.textSize = size;\r\n }\r\n\r\n public makeSmaller(): void {\r\n const size = this.textSize - 2;\r\n if (size < 12) {\r\n return;\r\n }\r\n this.textSize = size;\r\n }\r\n\r\n private removeOverlaps(loc: TokenLocation): void {\r\n for (let i = this.locations.length - 1; i > -1; i--) {\r\n if (loc === this.locations[i]) {\r\n continue;\r\n }\r\n if (loc.overlaps(this.locations[i])) {\r\n this.locations.splice(i, 1);\r\n }\r\n }\r\n }\r\n\r\n public addLocation(): void {\r\n if (!this.location.value) {\r\n return;\r\n }\r\n const loc = TokenLocation.parse(this.location.value);\r\n if (!loc) {\r\n return;\r\n }\r\n\r\n let done = false;\r\n for (let i = 0; i < this.locations.length && !done; i++) {\r\n const n = loc.compareTo(this.locations[i]);\r\n // nothing to do if equal\r\n if (n === 0) {\r\n return;\r\n }\r\n // insert before nearest bigger sort value\r\n if (n < 0) {\r\n this.locations.splice(i, 0, loc);\r\n done = true;\r\n }\r\n }\r\n // append if not yet inserted\r\n if (!done) {\r\n this.locations.push(loc);\r\n }\r\n\r\n // remove all the overlapping locations\r\n this.removeOverlaps(loc);\r\n }\r\n\r\n public removeLocation(loc: TokenLocation): void {\r\n const i = this.locations.indexOf(loc);\r\n if (i > -1) {\r\n this.locations.splice(i, 1);\r\n }\r\n }\r\n\r\n public clearLocations(): void {\r\n this.locations.length = 0;\r\n }\r\n\r\n public render(): void {\r\n if (!this.text.value) {\r\n return;\r\n }\r\n this.result = this._textLayerService.render(\r\n this.text.value,\r\n this.locations\r\n );\r\n }\r\n\r\n public getLocationForNew(): void {\r\n if (!this.text.value) {\r\n return;\r\n }\r\n this.userLocation =\r\n this._textLayerService.getSelectedLocationForNew(\r\n this._textLayerService.getSelectedRange()!,\r\n this.text.value\r\n ) || undefined;\r\n }\r\n\r\n public getLocationForEdit(): void {\r\n this.userLocation =\r\n this._textLayerService.getSelectedLocationForEdit(\r\n this._textLayerService.getSelectedRange()!\r\n ) || undefined;\r\n }\r\n}\r\n","<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Layered Text Demo</h3>\n </mat-card-header>\n <mat-card-content>\n <article>\n <p>\n Enter some base text and zero or more layer fragments locations, then\n click the render button. This renders the base text with all its ranges.\n </p>\n <p>\n Once the text has been decorated, select any portion of it, either\n including a decorated part, or not. Then, if you selected a part\n including decorations, click the location button with the checkmark\n (=get the location of the fragment to edit); else, click the location\n button with the plus (=get the location of a new fragment).\n </p>\n <p>\n This will show you the token-based coordinates corresponding to your\n selection, provided that if you include any portion of a decorated text\n you will get the full coordinates of the decoration; otherwise, you will\n just get the coordinates of the selected character(s).\n </p>\n <p>\n This behavior is used to allow users edit existing part fragments by\n just selecting any part of it, even partially; while they must be\n precise when they are creating a new fragment.\n </p>\n </article>\n <hr />\n\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\n <div>\n <mat-form-field>\n <mat-label>base text</mat-label>\n <textarea\n matInput\n type=\"text\"\n id=\"text\"\n maxlength=\"1000\"\n spellcheck=\"false\"\n formControlName=\"text\"\n ></textarea>\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field>\n <mat-label>location</mat-label>\n <input\n matInput\n type=\"text\"\n id=\"location\"\n required\n spellcheck=\"false\"\n formControlName=\"location\"\n />\n <mat-hint>Y.X&#64;AxR</mat-hint>\n </mat-form-field>\n </div>\n\n <div>\n <mat-toolbar>\n <span>\n <button\n mat-icon-button\n (click)=\"addLocation()\"\n type=\"button\"\n matTooltip=\"Add the specified location\"\n >\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"clearLocations()\"\n type=\"button\"\n matTooltip=\"Remove all the locations\"\n >\n <mat-icon class=\"mat-warn\">delete_sweep</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n matTooltip=\"Render the decorated base text\"\n >\n <mat-icon class=\"mat-primary\">play_circle_outline</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForNew()\"\n type=\"button\"\n matTooltip=\"Get location for new item\"\n >\n <mat-icon>playlist_add</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForEdit()\"\n type=\"button\"\n matTooltip=\"Get location for selected item\"\n >\n <mat-icon>playlist_add_check</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Larger text\"\n (click)=\"makeLarger()\"\n [disabled]=\"textSize >= 24\"\n >\n <mat-icon>format_size</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Smaller text\"\n (click)=\"makeSmaller()\"\n [disabled]=\"textSize <= 12\"\n >\n <mat-icon>text_fields</mat-icon>\n </button>\n </span>\n <span class=\"tb-fill-remaining-space\"></span>\n <span>{{ userLocation }}</span>\n </mat-toolbar>\n </div>\n\n <table>\n <tbody>\n @for (loc of locations; track loc) {\n <tr>\n <td>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"removeLocation(loc)\"\n >\n <mat-icon class=\"mat-warn\">remove_circle</mat-icon>\n </button>\n </td>\n <td>{{ loc.toString() }}</td>\n </tr>\n }\n </tbody>\n </table>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Rendition</h3>\n </mat-card-header>\n <mat-card-content>\n <div\n [style.font-size]=\"textSize + 'px'\"\n [innerHtml]=\"result | safeHtml : 'html'\"\n id=\"result\"\n #resultElem\n ></div>\n <hr />\n <div>\n <code>{{ result }}</code>\n </div>\n </mat-card-content>\n</mat-card>\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { RouterModule, Route } from '@angular/router';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { NgToolsModule } from '@myrmidon/ng-tools';\r\n\r\nimport { CadmusCoreModule } from '@myrmidon/cadmus-core';\r\nimport { CadmusUiModule } from '@myrmidon/cadmus-ui';\r\n\r\nimport { LayerDemoComponent } from './layer-demo/layer-demo.component';\r\n\r\n// https://github.com/ng-packagr/ng-packagr/issues/778\r\nexport const RouterModuleForChild = RouterModule.forChild([\r\n { path: '', pathMatch: 'full', component: LayerDemoComponent },\r\n]);\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n RouterModuleForChild,\r\n // material\r\n MatButtonModule,\r\n MatCardModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatToolbarModule,\r\n MatTooltipModule,\r\n // cadmus\r\n NgToolsModule,\r\n CadmusCoreModule,\r\n CadmusUiModule,\r\n ],\r\n declarations: [LayerDemoComponent],\r\n exports: [LayerDemoComponent],\r\n})\r\nexport class CadmusLayerDemoModule {}\r\n","/*\r\n * Public API Surface of cadmus-layer-demo\r\n */\r\n\r\nexport * from './lib/layer-demo/layer-demo.component';\r\nexport * from './lib/cadmus-layer-demo.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;MAUa,kBAAkB,CAAA;IAa7B,WACE,CAAA,WAAwB,EAChB,iBAAmC,EAAA;QAAnC,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB;AAEzB,QAAA,IAAI,CAAC,QAAQ,GAAG,EAAE;AAClB,QAAA,IAAI,CAAC,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AqB,YApB9B,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,oBAAoB;;YAEpB,eAAe;YACf,aAAa;YACb,kBAAkB;YAClB,aAAa;YACb,cAAc;YACd,gBAAgB;YAChB,gBAAgB;;YAEhB,aAAa;YACb,gBAAgB;YAChB,cAAc,CAAA,EAAA,CAAA,CAAA;;2FAKL,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAtBjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,oBAAoB;;wBAEpB,eAAe;wBACf,aAAa;wBACb,kBAAkB;wBAClB,aAAa;wBACb,cAAc;wBACd,gBAAgB;wBAChB,gBAAgB;;wBAEhB,aAAa;wBACb,gBAAgB;wBAChB,cAAc;AACf,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC9B,iBAAA;;;AC9CD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"myrmidon-cadmus-layer-demo.mjs","sources":["../../../../projects/myrmidon/cadmus-layer-demo/src/lib/layer-demo/layer-demo.component.ts","../../../../projects/myrmidon/cadmus-layer-demo/src/lib/layer-demo/layer-demo.component.html","../../../../projects/myrmidon/cadmus-layer-demo/src/lib/cadmus-layer-demo.module.ts","../../../../projects/myrmidon/cadmus-layer-demo/src/public-api.ts","../../../../projects/myrmidon/cadmus-layer-demo/src/myrmidon-cadmus-layer-demo.ts"],"sourcesContent":["import { Component, ViewChild, ElementRef } from '@angular/core';\r\nimport { FormGroup, FormControl, FormBuilder } from '@angular/forms';\r\nimport { TextLayerService, TokenLocation } from '@myrmidon/cadmus-core';\r\n\r\n@Component({\r\n selector: 'cadmus-layer-demo',\r\n templateUrl: './layer-demo.component.html',\r\n styleUrls: ['./layer-demo.component.css'],\r\n standalone: false,\r\n})\r\nexport class LayerDemoComponent {\r\n @ViewChild('resultElem') _resultElement?: ElementRef;\r\n\r\n public locations: TokenLocation[];\r\n public result: string;\r\n public userLocation?: TokenLocation;\r\n // form\r\n public rendition: FormGroup;\r\n public text: FormControl<string | null>;\r\n public location: FormControl<string | null>;\r\n\r\n public textSize: number;\r\n\r\n constructor(\r\n formBuilder: FormBuilder,\r\n private _textLayerService: TextLayerService\r\n ) {\r\n this.textSize = 14;\r\n this.locations = [];\r\n this.text = formBuilder.control(\r\n 'alpha beta\\ngamma\\ndelta epsilon waw\\nzeta'\r\n );\r\n this.location = formBuilder.control('1.2@2x2');\r\n this.rendition = formBuilder.group({\r\n text: this.text,\r\n location: this.location,\r\n });\r\n this.result = '';\r\n }\r\n\r\n public makeLarger(): void {\r\n const size = this.textSize + 2;\r\n if (size > 24) {\r\n return;\r\n }\r\n this.textSize = size;\r\n }\r\n\r\n public makeSmaller(): void {\r\n const size = this.textSize - 2;\r\n if (size < 12) {\r\n return;\r\n }\r\n this.textSize = size;\r\n }\r\n\r\n private removeOverlaps(loc: TokenLocation): void {\r\n for (let i = this.locations.length - 1; i > -1; i--) {\r\n if (loc === this.locations[i]) {\r\n continue;\r\n }\r\n if (loc.overlaps(this.locations[i])) {\r\n this.locations.splice(i, 1);\r\n }\r\n }\r\n }\r\n\r\n public addLocation(): void {\r\n if (!this.location.value) {\r\n return;\r\n }\r\n const loc = TokenLocation.parse(this.location.value);\r\n if (!loc) {\r\n return;\r\n }\r\n\r\n let done = false;\r\n for (let i = 0; i < this.locations.length && !done; i++) {\r\n const n = loc.compareTo(this.locations[i]);\r\n // nothing to do if equal\r\n if (n === 0) {\r\n return;\r\n }\r\n // insert before nearest bigger sort value\r\n if (n < 0) {\r\n this.locations.splice(i, 0, loc);\r\n done = true;\r\n }\r\n }\r\n // append if not yet inserted\r\n if (!done) {\r\n this.locations.push(loc);\r\n }\r\n\r\n // remove all the overlapping locations\r\n this.removeOverlaps(loc);\r\n }\r\n\r\n public removeLocation(loc: TokenLocation): void {\r\n const i = this.locations.indexOf(loc);\r\n if (i > -1) {\r\n this.locations.splice(i, 1);\r\n }\r\n }\r\n\r\n public clearLocations(): void {\r\n this.locations.length = 0;\r\n }\r\n\r\n public render(): void {\r\n if (!this.text.value) {\r\n return;\r\n }\r\n this.result = this._textLayerService.render(\r\n this.text.value,\r\n this.locations\r\n );\r\n }\r\n\r\n public getLocationForNew(): void {\r\n if (!this.text.value) {\r\n return;\r\n }\r\n this.userLocation =\r\n this._textLayerService.getSelectedLocationForNew(\r\n this._textLayerService.getSelectedRange()!,\r\n this.text.value\r\n ) || undefined;\r\n }\r\n\r\n public getLocationForEdit(): void {\r\n this.userLocation =\r\n this._textLayerService.getSelectedLocationForEdit(\r\n this._textLayerService.getSelectedRange()!\r\n ) || undefined;\r\n }\r\n}\r\n","<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Layered Text Demo</h3>\n </mat-card-header>\n <mat-card-content>\n <article>\n <p>\n Enter some base text and zero or more layer fragments locations, then\n click the render button. This renders the base text with all its ranges.\n </p>\n <p>\n Once the text has been decorated, select any portion of it, either\n including a decorated part, or not. Then, if you selected a part\n including decorations, click the location button with the checkmark\n (=get the location of the fragment to edit); else, click the location\n button with the plus (=get the location of a new fragment).\n </p>\n <p>\n This will show you the token-based coordinates corresponding to your\n selection, provided that if you include any portion of a decorated text\n you will get the full coordinates of the decoration; otherwise, you will\n just get the coordinates of the selected character(s).\n </p>\n <p>\n This behavior is used to allow users edit existing part fragments by\n just selecting any part of it, even partially; while they must be\n precise when they are creating a new fragment.\n </p>\n </article>\n <hr />\n\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\n <div>\n <mat-form-field>\n <mat-label>base text</mat-label>\n <textarea\n matInput\n type=\"text\"\n id=\"text\"\n maxlength=\"1000\"\n spellcheck=\"false\"\n formControlName=\"text\"\n ></textarea>\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field>\n <mat-label>location</mat-label>\n <input\n matInput\n type=\"text\"\n id=\"location\"\n required\n spellcheck=\"false\"\n formControlName=\"location\"\n />\n <mat-hint>Y.X&#64;AxR</mat-hint>\n </mat-form-field>\n </div>\n\n <div>\n <mat-toolbar>\n <span>\n <button\n mat-icon-button\n (click)=\"addLocation()\"\n type=\"button\"\n matTooltip=\"Add the specified location\"\n >\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"clearLocations()\"\n type=\"button\"\n matTooltip=\"Remove all the locations\"\n >\n <mat-icon class=\"mat-warn\">delete_sweep</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"submit\"\n matTooltip=\"Render the decorated base text\"\n >\n <mat-icon class=\"mat-primary\">play_circle_outline</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForNew()\"\n type=\"button\"\n matTooltip=\"Get location for new item\"\n >\n <mat-icon>playlist_add</mat-icon>\n </button>\n <button\n mat-icon-button\n (click)=\"getLocationForEdit()\"\n type=\"button\"\n matTooltip=\"Get location for selected item\"\n >\n <mat-icon>playlist_add_check</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Larger text\"\n (click)=\"makeLarger()\"\n [disabled]=\"textSize >= 24\"\n >\n <mat-icon>format_size</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n matTooltip=\"Smaller text\"\n (click)=\"makeSmaller()\"\n [disabled]=\"textSize <= 12\"\n >\n <mat-icon>text_fields</mat-icon>\n </button>\n </span>\n <span class=\"tb-fill-remaining-space\"></span>\n <span>{{ userLocation }}</span>\n </mat-toolbar>\n </div>\n\n <table>\n <tbody>\n @for (loc of locations; track loc) {\n <tr>\n <td>\n <button\n mat-icon-button\n color=\"warn\"\n (click)=\"removeLocation(loc)\"\n >\n <mat-icon class=\"mat-warn\">remove_circle</mat-icon>\n </button>\n </td>\n <td>{{ loc.toString() }}</td>\n </tr>\n }\n </tbody>\n </table>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card appearance=\"outlined\">\n <mat-card-header>\n <h3>Rendition</h3>\n </mat-card-header>\n <mat-card-content>\n <div\n [style.font-size]=\"textSize + 'px'\"\n [innerHtml]=\"result | safeHtml : 'html'\"\n id=\"result\"\n #resultElem\n ></div>\n <hr />\n <div>\n <code>{{ result }}</code>\n </div>\n </mat-card-content>\n</mat-card>\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { RouterModule, Route } from '@angular/router';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { SafeHtmlPipe } from '@myrmidon/ngx-tools';\r\nimport { CadmusCoreModule } from '@myrmidon/cadmus-core';\r\nimport { CadmusUiModule } from '@myrmidon/cadmus-ui';\r\n\r\nimport { LayerDemoComponent } from './layer-demo/layer-demo.component';\r\n\r\n// https://github.com/ng-packagr/ng-packagr/issues/778\r\nexport const RouterModuleForChild = RouterModule.forChild([\r\n { path: '', pathMatch: 'full', component: LayerDemoComponent },\r\n]);\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n RouterModuleForChild,\r\n // material\r\n MatButtonModule,\r\n MatCardModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatToolbarModule,\r\n MatTooltipModule,\r\n // myrmidon\r\n SafeHtmlPipe,\r\n // cadmus\r\n CadmusCoreModule,\r\n CadmusUiModule,\r\n ],\r\n declarations: [LayerDemoComponent],\r\n exports: [LayerDemoComponent],\r\n})\r\nexport class CadmusLayerDemoModule {}\r\n","/*\r\n * Public API Surface of cadmus-layer-demo\r\n */\r\n\r\nexport * from './lib/layer-demo/layer-demo.component';\r\nexport * from './lib/cadmus-layer-demo.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;MAUa,kBAAkB,CAAA;IAa7B,WACE,CAAA,WAAwB,EAChB,iBAAmC,EAAA;QAAnC,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB;AAEzB,QAAA,IAAI,CAAC,QAAQ,GAAG,EAAE;AAClB,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;QACnB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC,OAAO,CAC7B,4CAA4C,CAC7C;QACD,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC;AAC9C,QAAA,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;YACjC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACxB,SAAA,CAAC;AACF,QAAA,IAAI,CAAC,MAAM,GAAG,EAAE;;IAGX,UAAU,GAAA;AACf,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,GAAG,CAAC;AAC9B,QAAA,IAAI,IAAI,GAAG,EAAE,EAAE;YACb;;AAEF,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;;IAGf,WAAW,GAAA;AAChB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,GAAG,CAAC;AAC9B,QAAA,IAAI,IAAI,GAAG,EAAE,EAAE;YACb;;AAEF,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;;AAGd,IAAA,cAAc,CAAC,GAAkB,EAAA;AACvC,QAAA,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACnD,IAAI,GAAG,KA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CAAA,YAAA;;YAGnB,eAAe;YACf,aAAa;YACb,kBAAkB;YAClB,aAAa;YACb,cAAc;YACd,gBAAgB;YAChB,gBAAgB;;YAEhB,YAAY;;YAEZ,gBAAgB;AAChB,YAAA,cAAc,aAGN,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAEjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YArB9B,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,oBAAoB;;YAEpB,eAAe;YACf,aAAa;YACb,kBAAkB;YAClB,aAAa;YACb,cAAc;YACd,gBAAgB;YAChB,gBAAgB;;YAIhB,gBAAgB;YAChB,cAAc,CAAA,EAAA,CAAA,CAAA;;2FAKL,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAvBjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,oBAAoB;;wBAEpB,eAAe;wBACf,aAAa;wBACb,kBAAkB;wBAClB,aAAa;wBACb,cAAc;wBACd,gBAAgB;wBAChB,gBAAgB;;wBAEhB,YAAY;;wBAEZ,gBAAgB;wBAChB,cAAc;AACf,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC9B,iBAAA;;;AC9CD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -11,12 +11,12 @@ import * as i8 from "@angular/material/icon";
11
11
  import * as i9 from "@angular/material/input";
12
12
  import * as i10 from "@angular/material/toolbar";
13
13
  import * as i11 from "@angular/material/tooltip";
14
- import * as i12 from "@myrmidon/ng-tools";
14
+ import * as i12 from "@myrmidon/ngx-tools";
15
15
  import * as i13 from "@myrmidon/cadmus-core";
16
16
  import * as i14 from "@myrmidon/cadmus-ui";
17
17
  export declare const RouterModuleForChild: import("@angular/core").ModuleWithProviders<RouterModule>;
18
18
  export declare class CadmusLayerDemoModule {
19
19
  static ɵfac: i0.ɵɵFactoryDeclaration<CadmusLayerDemoModule, never>;
20
- static ɵmod: i0.ɵɵNgModuleDeclaration<CadmusLayerDemoModule, [typeof i1.LayerDemoComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.RouterModule, typeof i5.MatButtonModule, typeof i6.MatCardModule, typeof i7.MatFormFieldModule, typeof i8.MatIconModule, typeof i9.MatInputModule, typeof i10.MatToolbarModule, typeof i11.MatTooltipModule, typeof i12.NgToolsModule, typeof i13.CadmusCoreModule, typeof i14.CadmusUiModule], [typeof i1.LayerDemoComponent]>;
20
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CadmusLayerDemoModule, [typeof i1.LayerDemoComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.RouterModule, typeof i5.MatButtonModule, typeof i6.MatCardModule, typeof i7.MatFormFieldModule, typeof i8.MatIconModule, typeof i9.MatInputModule, typeof i10.MatToolbarModule, typeof i11.MatTooltipModule, typeof i12.SafeHtmlPipe, typeof i13.CadmusCoreModule, typeof i14.CadmusUiModule], [typeof i1.LayerDemoComponent]>;
21
21
  static ɵinj: i0.ɵɵInjectorDeclaration<CadmusLayerDemoModule>;
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myrmidon/cadmus-layer-demo",
3
- "version": "9.0.0",
3
+ "version": "10.0.0",
4
4
  "description": "Cadmus - text layer demo page.",
5
5
  "keywords": [
6
6
  "Cadmus"
@@ -16,9 +16,9 @@
16
16
  "peerDependencies": {
17
17
  "@angular/common": "^19.0.0",
18
18
  "@angular/core": "^19.0.0",
19
- "@myrmidon/ng-tools": "^4.0.0",
20
- "@myrmidon/cadmus-core": "^9.0.0",
21
- "@myrmidon/cadmus-ui": "^9.0.0"
19
+ "@myrmidon/ngx-tools": "^0.0.1",
20
+ "@myrmidon/cadmus-core": "^10.0.0",
21
+ "@myrmidon/cadmus-ui": "^10.0.0"
22
22
  },
23
23
  "dependencies": {
24
24
  "tslib": "^2.3.0"