@myrmidon/cadmus-layer-demo 1.1.0 → 5.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.
@@ -0,0 +1,82 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
4
+ import { RouterModule } from '@angular/router';
5
+ import { MatButtonModule } from '@angular/material/button';
6
+ import { MatCardModule } from '@angular/material/card';
7
+ import { MatFormFieldModule } from '@angular/material/form-field';
8
+ import { MatIconModule } from '@angular/material/icon';
9
+ import { MatInputModule } from '@angular/material/input';
10
+ import { MatToolbarModule } from '@angular/material/toolbar';
11
+ import { MatTooltipModule } from '@angular/material/tooltip';
12
+ import { CadmusCoreModule } from '@myrmidon/cadmus-core';
13
+ import { CadmusUiModule } from '@myrmidon/cadmus-ui';
14
+ import { LayerDemoComponent } from './layer-demo/layer-demo.component';
15
+ import { NgToolsModule } from '@myrmidon/ng-tools';
16
+ import * as i0 from "@angular/core";
17
+ import * as i1 from "@angular/router";
18
+ // https://github.com/ng-packagr/ng-packagr/issues/778
19
+ export const RouterModuleForChild = RouterModule.forChild([
20
+ { path: '', pathMatch: 'full', component: LayerDemoComponent },
21
+ ]);
22
+ class CadmusLayerDemoModule {
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CadmusLayerDemoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
24
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: CadmusLayerDemoModule, declarations: [LayerDemoComponent], imports: [CommonModule,
25
+ FormsModule,
26
+ ReactiveFormsModule, i1.RouterModule,
27
+ // material
28
+ MatButtonModule,
29
+ MatCardModule,
30
+ MatFormFieldModule,
31
+ MatIconModule,
32
+ MatInputModule,
33
+ MatToolbarModule,
34
+ MatTooltipModule,
35
+ // cadmus
36
+ NgToolsModule,
37
+ CadmusCoreModule,
38
+ CadmusUiModule], exports: [LayerDemoComponent] }); }
39
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CadmusLayerDemoModule, imports: [CommonModule,
40
+ FormsModule,
41
+ ReactiveFormsModule,
42
+ RouterModuleForChild,
43
+ // material
44
+ MatButtonModule,
45
+ MatCardModule,
46
+ MatFormFieldModule,
47
+ MatIconModule,
48
+ MatInputModule,
49
+ MatToolbarModule,
50
+ MatTooltipModule,
51
+ // cadmus
52
+ NgToolsModule,
53
+ CadmusCoreModule,
54
+ CadmusUiModule] }); }
55
+ }
56
+ export { CadmusLayerDemoModule };
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CadmusLayerDemoModule, decorators: [{
58
+ type: NgModule,
59
+ args: [{
60
+ imports: [
61
+ CommonModule,
62
+ FormsModule,
63
+ ReactiveFormsModule,
64
+ RouterModuleForChild,
65
+ // material
66
+ MatButtonModule,
67
+ MatCardModule,
68
+ MatFormFieldModule,
69
+ MatIconModule,
70
+ MatInputModule,
71
+ MatToolbarModule,
72
+ MatTooltipModule,
73
+ // cadmus
74
+ NgToolsModule,
75
+ CadmusCoreModule,
76
+ CadmusUiModule,
77
+ ],
78
+ declarations: [LayerDemoComponent],
79
+ exports: [LayerDemoComponent],
80
+ }]
81
+ }] });
82
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FkbXVzLWxheWVyLWRlbW8ubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbXlybWlkb24vY2FkbXVzLWxheWVyLWRlbW8vc3JjL2xpYi9jYWRtdXMtbGF5ZXItZGVtby5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0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bnM6IFtMYXllckRlbW9Db21wb25lbnRdLFxyXG4gIGV4cG9ydHM6IFtMYXllckRlbW9Db21wb25lbnRdLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgQ2FkbXVzTGF5ZXJEZW1vTW9kdWxlIHt9XHJcbiJdfQ==
@@ -0,0 +1,117 @@
1
+ import { Component, ViewChild } from '@angular/core';
2
+ import { TokenLocation } from '@myrmidon/cadmus-core';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "@angular/forms";
5
+ import * as i2 from "@myrmidon/cadmus-core";
6
+ import * as i3 from "@angular/common";
7
+ import * as i4 from "@angular/material/button";
8
+ import * as i5 from "@angular/material/card";
9
+ import * as i6 from "@angular/material/form-field";
10
+ import * as i7 from "@angular/material/icon";
11
+ import * as i8 from "@angular/material/input";
12
+ import * as i9 from "@angular/material/toolbar";
13
+ import * as i10 from "@angular/material/tooltip";
14
+ import * as i11 from "@myrmidon/ng-tools";
15
+ class LayerDemoComponent {
16
+ constructor(formBuilder, _textLayerService) {
17
+ this._textLayerService = _textLayerService;
18
+ this.textSize = 14;
19
+ this.locations = [];
20
+ this.text = formBuilder.control('alpha beta\ngamma\ndelta epsilon waw\nzeta');
21
+ this.location = formBuilder.control('1.2@2x2');
22
+ this.rendition = formBuilder.group({
23
+ text: this.text,
24
+ location: this.location,
25
+ });
26
+ this.result = '';
27
+ }
28
+ makeLarger() {
29
+ const size = this.textSize + 2;
30
+ if (size > 24) {
31
+ return;
32
+ }
33
+ this.textSize = size;
34
+ }
35
+ makeSmaller() {
36
+ const size = this.textSize - 2;
37
+ if (size < 12) {
38
+ return;
39
+ }
40
+ this.textSize = size;
41
+ }
42
+ removeOverlaps(loc) {
43
+ for (let i = this.locations.length - 1; i > -1; i--) {
44
+ if (loc === this.locations[i]) {
45
+ continue;
46
+ }
47
+ if (loc.overlaps(this.locations[i])) {
48
+ this.locations.splice(i, 1);
49
+ }
50
+ }
51
+ }
52
+ addLocation() {
53
+ if (!this.location.value) {
54
+ return;
55
+ }
56
+ const loc = TokenLocation.parse(this.location.value);
57
+ if (!loc) {
58
+ return;
59
+ }
60
+ let done = false;
61
+ for (let i = 0; i < this.locations.length && !done; i++) {
62
+ const n = loc.compareTo(this.locations[i]);
63
+ // nothing to do if equal
64
+ if (n === 0) {
65
+ return;
66
+ }
67
+ // insert before nearest bigger sort value
68
+ if (n < 0) {
69
+ this.locations.splice(i, 0, loc);
70
+ done = true;
71
+ }
72
+ }
73
+ // append if not yet inserted
74
+ if (!done) {
75
+ this.locations.push(loc);
76
+ }
77
+ // remove all the overlapping locations
78
+ this.removeOverlaps(loc);
79
+ }
80
+ removeLocation(loc) {
81
+ const i = this.locations.indexOf(loc);
82
+ if (i > -1) {
83
+ this.locations.splice(i, 1);
84
+ }
85
+ }
86
+ clearLocations() {
87
+ this.locations.length = 0;
88
+ }
89
+ render() {
90
+ if (!this.text.value) {
91
+ return;
92
+ }
93
+ this.result = this._textLayerService.render(this.text.value, this.locations);
94
+ }
95
+ getLocationForNew() {
96
+ if (!this.text.value) {
97
+ return;
98
+ }
99
+ this.userLocation =
100
+ this._textLayerService.getSelectedLocationForNew(this._textLayerService.getSelectedRange(), this.text.value) || undefined;
101
+ }
102
+ getLocationForEdit() {
103
+ this.userLocation =
104
+ this._textLayerService.getSelectedLocationForEdit(this._textLayerService.getSelectedRange()) || undefined;
105
+ }
106
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: LayerDemoComponent, deps: [{ token: i1.FormBuilder }, { token: i2.TextLayerService }], target: i0.ɵɵFactoryTarget.Component }); }
107
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: LayerDemoComponent, selector: "cadmus-layer-demo", viewQueries: [{ propertyName: "_resultElement", first: true, predicate: ["resultElem"], descendants: true }], ngImport: i0, template: "<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <h2>Layered Text Demo</h2>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <article>\r\n <p>\r\n Enter some base text and zero or more layer fragments locations, then\r\n click the render button. This renders the base text with all its ranges.\r\n </p>\r\n <p>\r\n Once the text has been decorated, select any portion of it, either\r\n including a decorated part, or not. Then, if you selected a part\r\n including decorations, click the location button with the checkmark\r\n (=get the location of the fragment to edit); else, click the location\r\n button with the plus (=get the location of a new fragment).\r\n </p>\r\n <p>\r\n This will show you the token-based coordinates corresponding to your\r\n selection, provided that if you include any portion of a decorated text\r\n you will get the full coordinates of the decoration; otherwise, you will\r\n just get the coordinates of the selected character(s).\r\n </p>\r\n <p>\r\n This behavior is used to allow users edit existing part fragments by\r\n just selecting any part of it, even partially; while they must be\r\n precise when they are creating a new fragment.\r\n </p>\r\n </article>\r\n <hr />\r\n\r\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\r\n <div>\r\n <mat-form-field>\r\n <mat-label>base text</mat-label>\r\n <textarea\r\n matInput\r\n type=\"text\"\r\n id=\"text\"\r\n maxlength=\"1000\"\r\n spellcheck=\"false\"\r\n formControlName=\"text\"\r\n ></textarea>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div>\r\n <mat-form-field>\r\n <mat-label>location</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n id=\"location\"\r\n required\r\n spellcheck=\"false\"\r\n formControlName=\"location\"\r\n />\r\n <mat-hint>Y.X@AxR</mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div>\r\n <mat-toolbar>\r\n <span>\r\n <button\r\n mat-icon-button\r\n (click)=\"addLocation()\"\r\n type=\"button\"\r\n matTooltip=\"Add the specified location\"\r\n >\r\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"clearLocations()\"\r\n type=\"button\"\r\n matTooltip=\"Remove all the locations\"\r\n >\r\n <mat-icon>delete_sweep</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"primary\"\r\n type=\"submit\"\r\n matTooltip=\"Render the decorated base text\"\r\n >\r\n <mat-icon>play_circle_outline</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"getLocationForNew()\"\r\n type=\"button\"\r\n matTooltip=\"Get location for new item\"\r\n >\r\n <mat-icon>playlist_add</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"getLocationForEdit()\"\r\n type=\"button\"\r\n matTooltip=\"Get location for selected item\"\r\n >\r\n <mat-icon>playlist_add_check</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Larger text\"\r\n (click)=\"makeLarger()\"\r\n [disabled]=\"textSize >= 24\"\r\n >\r\n <mat-icon>format_size</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Smaller text\"\r\n (click)=\"makeSmaller()\"\r\n [disabled]=\"textSize <= 12\"\r\n >\r\n <mat-icon>text_fields</mat-icon>\r\n </button>\r\n </span>\r\n <span class=\"tb-fill-remaining-space\"></span>\r\n <span>{{ userLocation }}</span>\r\n </mat-toolbar>\r\n </div>\r\n\r\n <table>\r\n <tbody>\r\n <tr *ngFor=\"let loc of locations\">\r\n <td>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"removeLocation(loc)\"\r\n >\r\n <mat-icon>remove_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>{{ loc.toString() }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </form>\r\n </mat-card-content>\r\n</mat-card>\r\n\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <h3>Rendition</h3>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <div\r\n [style.font-size]=\"textSize + 'px'\"\r\n [innerHtml]=\"result | safeHtml: 'html'\"\r\n id=\"result\"\r\n #resultElem\r\n ></div>\r\n <hr />\r\n <div>\r\n <code>{{ result }}</code>\r\n </div>\r\n </mat-card-content>\r\n</mat-card>\r\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: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i5.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatCardHeader, selector: "mat-card-header" }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i11.SafeHtmlPipe, name: "safeHtml" }] }); }
108
+ }
109
+ export { LayerDemoComponent };
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: LayerDemoComponent, decorators: [{
111
+ type: Component,
112
+ args: [{ selector: 'cadmus-layer-demo', template: "<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <h2>Layered Text Demo</h2>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <article>\r\n <p>\r\n Enter some base text and zero or more layer fragments locations, then\r\n click the render button. This renders the base text with all its ranges.\r\n </p>\r\n <p>\r\n Once the text has been decorated, select any portion of it, either\r\n including a decorated part, or not. Then, if you selected a part\r\n including decorations, click the location button with the checkmark\r\n (=get the location of the fragment to edit); else, click the location\r\n button with the plus (=get the location of a new fragment).\r\n </p>\r\n <p>\r\n This will show you the token-based coordinates corresponding to your\r\n selection, provided that if you include any portion of a decorated text\r\n you will get the full coordinates of the decoration; otherwise, you will\r\n just get the coordinates of the selected character(s).\r\n </p>\r\n <p>\r\n This behavior is used to allow users edit existing part fragments by\r\n just selecting any part of it, even partially; while they must be\r\n precise when they are creating a new fragment.\r\n </p>\r\n </article>\r\n <hr />\r\n\r\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\r\n <div>\r\n <mat-form-field>\r\n <mat-label>base text</mat-label>\r\n <textarea\r\n matInput\r\n type=\"text\"\r\n id=\"text\"\r\n maxlength=\"1000\"\r\n spellcheck=\"false\"\r\n formControlName=\"text\"\r\n ></textarea>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div>\r\n <mat-form-field>\r\n <mat-label>location</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n id=\"location\"\r\n required\r\n spellcheck=\"false\"\r\n formControlName=\"location\"\r\n />\r\n <mat-hint>Y.X@AxR</mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div>\r\n <mat-toolbar>\r\n <span>\r\n <button\r\n mat-icon-button\r\n (click)=\"addLocation()\"\r\n type=\"button\"\r\n matTooltip=\"Add the specified location\"\r\n >\r\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"clearLocations()\"\r\n type=\"button\"\r\n matTooltip=\"Remove all the locations\"\r\n >\r\n <mat-icon>delete_sweep</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"primary\"\r\n type=\"submit\"\r\n matTooltip=\"Render the decorated base text\"\r\n >\r\n <mat-icon>play_circle_outline</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"getLocationForNew()\"\r\n type=\"button\"\r\n matTooltip=\"Get location for new item\"\r\n >\r\n <mat-icon>playlist_add</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"getLocationForEdit()\"\r\n type=\"button\"\r\n matTooltip=\"Get location for selected item\"\r\n >\r\n <mat-icon>playlist_add_check</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Larger text\"\r\n (click)=\"makeLarger()\"\r\n [disabled]=\"textSize >= 24\"\r\n >\r\n <mat-icon>format_size</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Smaller text\"\r\n (click)=\"makeSmaller()\"\r\n [disabled]=\"textSize <= 12\"\r\n >\r\n <mat-icon>text_fields</mat-icon>\r\n </button>\r\n </span>\r\n <span class=\"tb-fill-remaining-space\"></span>\r\n <span>{{ userLocation }}</span>\r\n </mat-toolbar>\r\n </div>\r\n\r\n <table>\r\n <tbody>\r\n <tr *ngFor=\"let loc of locations\">\r\n <td>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"removeLocation(loc)\"\r\n >\r\n <mat-icon>remove_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>{{ loc.toString() }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </form>\r\n </mat-card-content>\r\n</mat-card>\r\n\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <h3>Rendition</h3>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <div\r\n [style.font-size]=\"textSize + 'px'\"\r\n [innerHtml]=\"result | safeHtml: 'html'\"\r\n id=\"result\"\r\n #resultElem\r\n ></div>\r\n <hr />\r\n <div>\r\n <code>{{ result }}</code>\r\n </div>\r\n </mat-card-content>\r\n</mat-card>\r\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"] }]
113
+ }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i2.TextLayerService }]; }, propDecorators: { _resultElement: [{
114
+ type: ViewChild,
115
+ args: ['resultElem']
116
+ }] } });
117
+ //# sourceMappingURL=data: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HR5cGU9XCJ0ZXh0XCJcclxuICAgICAgICAgICAgaWQ9XCJsb2NhdGlvblwiXHJcbiAgICAgICAgICAgIHJlcXVpcmVkXHJcbiAgICAgICAgICAgIHNwZWxsY2hlY2s9XCJmYWxzZVwiXHJcbiAgICAgICAgICAgIGZvcm1Db250cm9sTmFtZT1cImxvY2F0aW9uXCJcclxuICAgICAgICAgIC8+XHJcbiAgICAgICAgICA8bWF0LWhpbnQ+WS5YQEF4UjwvbWF0LWhpbnQ+XHJcbiAgICAgICAgPC9tYXQtZm9ybS1maWVsZD5cclxuICAgICAgPC9kaXY+XHJcblxyXG4gICAgICA8ZGl2PlxyXG4gICAgICAgIDxtYXQtdG9vbGJhcj5cclxuICAgICAgICAgIDxzcGFuPlxyXG4gICAgICAgICAgICA8YnV0dG9uXHJcbiAgICAgICAgICAgICAgbWF0LWljb24tYnV0dG9uXHJcbiAgICAgICAgICAgICAgKGNsaWNrKT1cImFkZExvY2F0aW9uKClcIlxyXG4gICAgICAgICAgICAgIHR5cGU9XCJidXR0b25cIlxyXG4gICAgICAgICAgICAgIG1hdFRvb2x0aXA9XCJBZGQgdGhlIHNwZWNpZmllZCBsb2NhdGlvblwiXHJcbiAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICA8bWF0LWljb24gc3R5bGU9XCJjb2xvcjogIzY2Y2M3NVwiPmFkZF9jaXJjbGU8L21hdC1pY29uPlxyXG4gICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICAgICAgPGJ1dHRvblxyXG4gICAgICAgICAgICAgIG1hdC1pY29uLWJ1dHRvblxyXG4gICAgICAgICAgICAgIGNvbG9yPVwid2FyblwiXHJcbiAgICAgICAgICAgICAgKGNsaWNrKT1cImNsZWFyTG9jYXRpb25zKClcIlxyXG4gICAgICAgICAgICAgIHR5cGU9XCJidXR0b25cIlxyXG4gICAgICAgICAgICAgIG1hdFRvb2x0aXA9XCJSZW1vdmUgYWxsIHRoZSBsb2NhdGlvbnNcIlxyXG4gICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgPG1hdC1pY29uPmRlbGV0ZV9zd2VlcDwvbWF0LWljb24+XHJcbiAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgICAgICA8YnV0dG9uXHJcbiAgICAgICAgICAgICAgbWF0LWljb24tYnV0dG9uXHJcbiAgICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcclxuICAgICAgICAgICAgICB0eXBlPVwic3VibWl0XCJcclxuICAgICAgICAgICAgICBtYXRUb29sdGlwPVwiUmVuZGVyIHRoZSBkZWNvcmF0ZWQgYmFzZSB0ZXh0XCJcclxuICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgIDxtYXQtaWNvbj5wbGF5X2NpcmNsZV9vdXRsaW5lPC9tYXQtaWNvbj5cclxuICAgICAgICAgICAgPC9idXR0b24+XHJcbiAgICAgICAgICAgIDxidXR0b25cclxuICAgICAgICAgICAgICBtYXQtaWNvbi1idXR0b25cclxuICAgICAgICAgICAgICAoY2xpY2spPVwiZ2V0TG9jYXRpb25Gb3JOZXcoKVwiXHJcbiAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiXHJcbiAgICAgICAgICAgICAgbWF0VG9vbHRpcD1cIkdldCBsb2NhdGlvbiBmb3IgbmV3IGl0ZW1cIlxyXG4gICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgPG1hdC1pY29uPnBsYXlsaXN0X2FkZDwvbWF0LWljb24+XHJcbiAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgICAgICA8YnV0dG9uXHJcbiAgICAgICAgICAgICAgbWF0LWljb24tYnV0dG9uXHJcbiAgICAgICAgICAgICAgKGNsaWNrKT1cImdldExvY2F0aW9uRm9yRWRpdCgpXCJcclxuICAgICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcclxuICAgICAgICAgICAgICBtYXRUb29sdGlwPVwiR2V0IGxvY2F0aW9uIGZvciBzZWxlY3RlZCBpdGVtXCJcclxuICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgIDxtYXQtaWNvbj5wbGF5bGlzdF9hZGRfY2hlY2s8L21hdC1pY29uPlxyXG4gICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICAgICAgPGJ1dHRvblxyXG4gICAgICAgICAgICAgIG1hdC1pY29uLWJ1dHRvblxyXG4gICAgICAgICAgICAgIHR5cGU9XCJidXR0b25cIlxyXG4gICAgICAgICAgICAgIG1hdFRvb2x0aXA9XCJMYXJnZXIgdGV4dFwiXHJcbiAgICAgICAgICAgICAgKGNsaWNrKT1cIm1ha2VMYXJnZXIoKVwiXHJcbiAgICAgICAgICAgICAgW2Rpc2FibGVkXT1cInRleHRTaXplID49IDI0XCJcclxuICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgIDxtYXQtaWNvbj5mb3JtYXRfc2l6ZTwvbWF0LWljb24+XHJcbiAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgICAgICA8YnV0dG9uXHJcbiAgICAgICAgICAgICAgbWF0LWljb24tYnV0dG9uXHJcbiAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiXHJcbiAgICAgICAgICAgICAgbWF0VG9vbHRpcD1cIlNtYWxsZXIgdGV4dFwiXHJcbiAgICAgICAgICAgICAgKGNsaWNrKT1cIm1ha2VTbWFsbGVyKClcIlxyXG4gICAgICAgICAgICAgIFtkaXNhYmxlZF09XCJ0ZXh0U2l6ZSA8PSAxMlwiXHJcbiAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICA8bWF0LWljb24+dGV4dF9maWVsZHM8L21hdC1pY29uPlxyXG4gICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICAgIDwvc3Bhbj5cclxuICAgICAgICAgIDxzcGFuIGNsYXNzPVwidGItZmlsbC1yZW1haW5pbmctc3BhY2VcIj48L3NwYW4+XHJcbiAgICAgICAgICA8c3Bhbj57eyB1c2VyTG9jYXRpb24gfX08L3NwYW4+XHJcbiAgICAgICAgPC9tYXQtdG9vbGJhcj5cclxuICAgICAgPC9kaXY+XHJcblxyXG4gICAgICA8dGFibGU+XHJcbiAgICAgICAgPHRib2R5PlxyXG4gICAgICAgICAgPHRyICpuZ0Zvcj1cImxldCBsb2Mgb2YgbG9jYXRpb25zXCI+XHJcbiAgICAgICAgICAgIDx0ZD5cclxuICAgICAgICAgICAgICA8YnV0dG9uXHJcbiAgICAgICAgICAgICAgICBtYXQtaWNvbi1idXR0b25cclxuICAgICAgICAgICAgICAgIGNvbG9yPVwid2FyblwiXHJcbiAgICAgICAgICAgICAgICAoY2xpY2spPVwicmVtb3ZlTG9jYXRpb24obG9jKVwiXHJcbiAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgPG1hdC1pY29uPnJlbW92ZV9jaXJjbGU8L21hdC1pY29uPlxyXG4gICAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgICAgICA8L3RkPlxyXG4gICAgICAgICAgICA8dGQ+e3sgbG9jLnRvU3RyaW5nKCkgfX08L3RkPlxyXG4gICAgICAgICAgPC90cj5cclxuICAgICAgICA8L3Rib2R5PlxyXG4gICAgICA8L3RhYmxlPlxyXG4gICAgPC9mb3JtPlxyXG4gIDwvbWF0LWNhcmQtY29udGVudD5cclxuPC9tYXQtY2FyZD5cclxuXHJcbjxtYXQtY2FyZCBhcHBlYXJhbmNlPVwib3V0bGluZWRcIj5cclxuICA8bWF0LWNhcmQtaGVhZGVyPlxyXG4gICAgPGgzPlJlbmRpdGlvbjwvaDM+XHJcbiAgPC9tYXQtY2FyZC1oZWFkZXI+XHJcbiAgPG1hdC1jYXJkLWNvbnRlbnQ+XHJcbiAgICA8ZGl2XHJcbiAgICAgIFtzdHlsZS5mb250LXNpemVdPVwidGV4dFNpemUgKyAncHgnXCJcclxuICAgICAgW2lubmVySHRtbF09XCJyZXN1bHQgfCBzYWZlSHRtbDogJ2h0bWwnXCJcclxuICAgICAgaWQ9XCJyZXN1bHRcIlxyXG4gICAgICAjcmVzdWx0RWxlbVxyXG4gICAgPjwvZGl2PlxyXG4gICAgPGhyIC8+XHJcbiAgICA8ZGl2PlxyXG4gICAgICA8Y29kZT57eyByZXN1bHQgfX08L2NvZGU+XHJcbiAgICA8L2Rpdj5cclxuICA8L21hdC1jYXJkLWNvbnRlbnQ+XHJcbjwvbWF0LWNhcmQ+XHJcbiJdfQ==
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
5
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXlybWlkb24tY2FkbXVzLWxheWVyLWRlbW8uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9teXJtaWRvbi9jYWRtdXMtbGF5ZXItZGVtby9zcmMvbXlybWlkb24tY2FkbXVzLWxheWVyLWRlbW8udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
@@ -1,6 +1,6 @@
1
- /*
2
- * Public API Surface of cadmus-layer-demo
3
- */
4
- export * from './lib/layer-demo/layer-demo.component';
5
- export * from './lib/cadmus-layer-demo.module';
1
+ /*
2
+ * Public API Surface of cadmus-layer-demo
3
+ */
4
+ export * from './lib/layer-demo/layer-demo.component';
5
+ export * from './lib/cadmus-layer-demo.module';
6
6
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL215cm1pZG9uL2NhZG11cy1sYXllci1kZW1vL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyx1Q0FBdUMsQ0FBQztBQUN0RCxjQUFjLGdDQUFnQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcclxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIGNhZG11cy1sYXllci1kZW1vXHJcbiAqL1xyXG5cclxuZXhwb3J0ICogZnJvbSAnLi9saWIvbGF5ZXItZGVtby9sYXllci1kZW1vLmNvbXBvbmVudCc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NhZG11cy1sYXllci1kZW1vLm1vZHVsZSc7XHJcbiJdfQ==
@@ -0,0 +1,204 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ViewChild, NgModule } from '@angular/core';
3
+ import * as i2 from '@myrmidon/cadmus-core';
4
+ import { TokenLocation, CadmusCoreModule } from '@myrmidon/cadmus-core';
5
+ import * as i1 from '@angular/forms';
6
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
7
+ import * as i3 from '@angular/common';
8
+ import { CommonModule } from '@angular/common';
9
+ import * as i4 from '@angular/material/button';
10
+ import { MatButtonModule } from '@angular/material/button';
11
+ import * as i5 from '@angular/material/card';
12
+ import { MatCardModule } from '@angular/material/card';
13
+ import * as i6 from '@angular/material/form-field';
14
+ import { MatFormFieldModule } from '@angular/material/form-field';
15
+ import * as i7 from '@angular/material/icon';
16
+ import { MatIconModule } from '@angular/material/icon';
17
+ import * as i8 from '@angular/material/input';
18
+ import { MatInputModule } from '@angular/material/input';
19
+ import * as i9 from '@angular/material/toolbar';
20
+ import { MatToolbarModule } from '@angular/material/toolbar';
21
+ import * as i10 from '@angular/material/tooltip';
22
+ import { MatTooltipModule } from '@angular/material/tooltip';
23
+ import * as i11 from '@myrmidon/ng-tools';
24
+ import { NgToolsModule } from '@myrmidon/ng-tools';
25
+ import * as i1$1 from '@angular/router';
26
+ import { RouterModule } from '@angular/router';
27
+ import { CadmusUiModule } from '@myrmidon/cadmus-ui';
28
+
29
+ class LayerDemoComponent {
30
+ constructor(formBuilder, _textLayerService) {
31
+ this._textLayerService = _textLayerService;
32
+ this.textSize = 14;
33
+ this.locations = [];
34
+ this.text = formBuilder.control('alpha beta\ngamma\ndelta epsilon waw\nzeta');
35
+ this.location = formBuilder.control('1.2@2x2');
36
+ this.rendition = formBuilder.group({
37
+ text: this.text,
38
+ location: this.location,
39
+ });
40
+ this.result = '';
41
+ }
42
+ makeLarger() {
43
+ const size = this.textSize + 2;
44
+ if (size > 24) {
45
+ return;
46
+ }
47
+ this.textSize = size;
48
+ }
49
+ makeSmaller() {
50
+ const size = this.textSize - 2;
51
+ if (size < 12) {
52
+ return;
53
+ }
54
+ this.textSize = size;
55
+ }
56
+ removeOverlaps(loc) {
57
+ for (let i = this.locations.length - 1; i > -1; i--) {
58
+ if (loc === this.locations[i]) {
59
+ continue;
60
+ }
61
+ if (loc.overlaps(this.locations[i])) {
62
+ this.locations.splice(i, 1);
63
+ }
64
+ }
65
+ }
66
+ addLocation() {
67
+ if (!this.location.value) {
68
+ return;
69
+ }
70
+ const loc = TokenLocation.parse(this.location.value);
71
+ if (!loc) {
72
+ return;
73
+ }
74
+ let done = false;
75
+ for (let i = 0; i < this.locations.length && !done; i++) {
76
+ const n = loc.compareTo(this.locations[i]);
77
+ // nothing to do if equal
78
+ if (n === 0) {
79
+ return;
80
+ }
81
+ // insert before nearest bigger sort value
82
+ if (n < 0) {
83
+ this.locations.splice(i, 0, loc);
84
+ done = true;
85
+ }
86
+ }
87
+ // append if not yet inserted
88
+ if (!done) {
89
+ this.locations.push(loc);
90
+ }
91
+ // remove all the overlapping locations
92
+ this.removeOverlaps(loc);
93
+ }
94
+ removeLocation(loc) {
95
+ const i = this.locations.indexOf(loc);
96
+ if (i > -1) {
97
+ this.locations.splice(i, 1);
98
+ }
99
+ }
100
+ clearLocations() {
101
+ this.locations.length = 0;
102
+ }
103
+ render() {
104
+ if (!this.text.value) {
105
+ return;
106
+ }
107
+ this.result = this._textLayerService.render(this.text.value, this.locations);
108
+ }
109
+ getLocationForNew() {
110
+ if (!this.text.value) {
111
+ return;
112
+ }
113
+ this.userLocation =
114
+ this._textLayerService.getSelectedLocationForNew(this._textLayerService.getSelectedRange(), this.text.value) || undefined;
115
+ }
116
+ getLocationForEdit() {
117
+ this.userLocation =
118
+ this._textLayerService.getSelectedLocationForEdit(this._textLayerService.getSelectedRange()) || undefined;
119
+ }
120
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: LayerDemoComponent, deps: [{ token: i1.FormBuilder }, { token: i2.TextLayerService }], target: i0.ɵɵFactoryTarget.Component }); }
121
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: LayerDemoComponent, selector: "cadmus-layer-demo", viewQueries: [{ propertyName: "_resultElement", first: true, predicate: ["resultElem"], descendants: true }], ngImport: i0, template: "<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <h2>Layered Text Demo</h2>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <article>\r\n <p>\r\n Enter some base text and zero or more layer fragments locations, then\r\n click the render button. This renders the base text with all its ranges.\r\n </p>\r\n <p>\r\n Once the text has been decorated, select any portion of it, either\r\n including a decorated part, or not. Then, if you selected a part\r\n including decorations, click the location button with the checkmark\r\n (=get the location of the fragment to edit); else, click the location\r\n button with the plus (=get the location of a new fragment).\r\n </p>\r\n <p>\r\n This will show you the token-based coordinates corresponding to your\r\n selection, provided that if you include any portion of a decorated text\r\n you will get the full coordinates of the decoration; otherwise, you will\r\n just get the coordinates of the selected character(s).\r\n </p>\r\n <p>\r\n This behavior is used to allow users edit existing part fragments by\r\n just selecting any part of it, even partially; while they must be\r\n precise when they are creating a new fragment.\r\n </p>\r\n </article>\r\n <hr />\r\n\r\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\r\n <div>\r\n <mat-form-field>\r\n <mat-label>base text</mat-label>\r\n <textarea\r\n matInput\r\n type=\"text\"\r\n id=\"text\"\r\n maxlength=\"1000\"\r\n spellcheck=\"false\"\r\n formControlName=\"text\"\r\n ></textarea>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div>\r\n <mat-form-field>\r\n <mat-label>location</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n id=\"location\"\r\n required\r\n spellcheck=\"false\"\r\n formControlName=\"location\"\r\n />\r\n <mat-hint>Y.X@AxR</mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div>\r\n <mat-toolbar>\r\n <span>\r\n <button\r\n mat-icon-button\r\n (click)=\"addLocation()\"\r\n type=\"button\"\r\n matTooltip=\"Add the specified location\"\r\n >\r\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"clearLocations()\"\r\n type=\"button\"\r\n matTooltip=\"Remove all the locations\"\r\n >\r\n <mat-icon>delete_sweep</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"primary\"\r\n type=\"submit\"\r\n matTooltip=\"Render the decorated base text\"\r\n >\r\n <mat-icon>play_circle_outline</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"getLocationForNew()\"\r\n type=\"button\"\r\n matTooltip=\"Get location for new item\"\r\n >\r\n <mat-icon>playlist_add</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"getLocationForEdit()\"\r\n type=\"button\"\r\n matTooltip=\"Get location for selected item\"\r\n >\r\n <mat-icon>playlist_add_check</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Larger text\"\r\n (click)=\"makeLarger()\"\r\n [disabled]=\"textSize >= 24\"\r\n >\r\n <mat-icon>format_size</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Smaller text\"\r\n (click)=\"makeSmaller()\"\r\n [disabled]=\"textSize <= 12\"\r\n >\r\n <mat-icon>text_fields</mat-icon>\r\n </button>\r\n </span>\r\n <span class=\"tb-fill-remaining-space\"></span>\r\n <span>{{ userLocation }}</span>\r\n </mat-toolbar>\r\n </div>\r\n\r\n <table>\r\n <tbody>\r\n <tr *ngFor=\"let loc of locations\">\r\n <td>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"removeLocation(loc)\"\r\n >\r\n <mat-icon>remove_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>{{ loc.toString() }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </form>\r\n </mat-card-content>\r\n</mat-card>\r\n\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <h3>Rendition</h3>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <div\r\n [style.font-size]=\"textSize + 'px'\"\r\n [innerHtml]=\"result | safeHtml: 'html'\"\r\n id=\"result\"\r\n #resultElem\r\n ></div>\r\n <hr />\r\n <div>\r\n <code>{{ result }}</code>\r\n </div>\r\n </mat-card-content>\r\n</mat-card>\r\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: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i5.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatCardHeader, selector: "mat-card-header" }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i11.SafeHtmlPipe, name: "safeHtml" }] }); }
122
+ }
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: LayerDemoComponent, decorators: [{
124
+ type: Component,
125
+ args: [{ selector: 'cadmus-layer-demo', template: "<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <h2>Layered Text Demo</h2>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <article>\r\n <p>\r\n Enter some base text and zero or more layer fragments locations, then\r\n click the render button. This renders the base text with all its ranges.\r\n </p>\r\n <p>\r\n Once the text has been decorated, select any portion of it, either\r\n including a decorated part, or not. Then, if you selected a part\r\n including decorations, click the location button with the checkmark\r\n (=get the location of the fragment to edit); else, click the location\r\n button with the plus (=get the location of a new fragment).\r\n </p>\r\n <p>\r\n This will show you the token-based coordinates corresponding to your\r\n selection, provided that if you include any portion of a decorated text\r\n you will get the full coordinates of the decoration; otherwise, you will\r\n just get the coordinates of the selected character(s).\r\n </p>\r\n <p>\r\n This behavior is used to allow users edit existing part fragments by\r\n just selecting any part of it, even partially; while they must be\r\n precise when they are creating a new fragment.\r\n </p>\r\n </article>\r\n <hr />\r\n\r\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\r\n <div>\r\n <mat-form-field>\r\n <mat-label>base text</mat-label>\r\n <textarea\r\n matInput\r\n type=\"text\"\r\n id=\"text\"\r\n maxlength=\"1000\"\r\n spellcheck=\"false\"\r\n formControlName=\"text\"\r\n ></textarea>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div>\r\n <mat-form-field>\r\n <mat-label>location</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n id=\"location\"\r\n required\r\n spellcheck=\"false\"\r\n formControlName=\"location\"\r\n />\r\n <mat-hint>Y.X@AxR</mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div>\r\n <mat-toolbar>\r\n <span>\r\n <button\r\n mat-icon-button\r\n (click)=\"addLocation()\"\r\n type=\"button\"\r\n matTooltip=\"Add the specified location\"\r\n >\r\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"clearLocations()\"\r\n type=\"button\"\r\n matTooltip=\"Remove all the locations\"\r\n >\r\n <mat-icon>delete_sweep</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"primary\"\r\n type=\"submit\"\r\n matTooltip=\"Render the decorated base text\"\r\n >\r\n <mat-icon>play_circle_outline</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"getLocationForNew()\"\r\n type=\"button\"\r\n matTooltip=\"Get location for new item\"\r\n >\r\n <mat-icon>playlist_add</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"getLocationForEdit()\"\r\n type=\"button\"\r\n matTooltip=\"Get location for selected item\"\r\n >\r\n <mat-icon>playlist_add_check</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Larger text\"\r\n (click)=\"makeLarger()\"\r\n [disabled]=\"textSize >= 24\"\r\n >\r\n <mat-icon>format_size</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Smaller text\"\r\n (click)=\"makeSmaller()\"\r\n [disabled]=\"textSize <= 12\"\r\n >\r\n <mat-icon>text_fields</mat-icon>\r\n </button>\r\n </span>\r\n <span class=\"tb-fill-remaining-space\"></span>\r\n <span>{{ userLocation }}</span>\r\n </mat-toolbar>\r\n </div>\r\n\r\n <table>\r\n <tbody>\r\n <tr *ngFor=\"let loc of locations\">\r\n <td>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"removeLocation(loc)\"\r\n >\r\n <mat-icon>remove_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>{{ loc.toString() }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </form>\r\n </mat-card-content>\r\n</mat-card>\r\n\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <h3>Rendition</h3>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <div\r\n [style.font-size]=\"textSize + 'px'\"\r\n [innerHtml]=\"result | safeHtml: 'html'\"\r\n id=\"result\"\r\n #resultElem\r\n ></div>\r\n <hr />\r\n <div>\r\n <code>{{ result }}</code>\r\n </div>\r\n </mat-card-content>\r\n</mat-card>\r\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"] }]
126
+ }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i2.TextLayerService }]; }, propDecorators: { _resultElement: [{
127
+ type: ViewChild,
128
+ args: ['resultElem']
129
+ }] } });
130
+
131
+ // https://github.com/ng-packagr/ng-packagr/issues/778
132
+ const RouterModuleForChild = RouterModule.forChild([
133
+ { path: '', pathMatch: 'full', component: LayerDemoComponent },
134
+ ]);
135
+ class CadmusLayerDemoModule {
136
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CadmusLayerDemoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
137
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: CadmusLayerDemoModule, declarations: [LayerDemoComponent], imports: [CommonModule,
138
+ FormsModule,
139
+ ReactiveFormsModule, i1$1.RouterModule,
140
+ // material
141
+ MatButtonModule,
142
+ MatCardModule,
143
+ MatFormFieldModule,
144
+ MatIconModule,
145
+ MatInputModule,
146
+ MatToolbarModule,
147
+ MatTooltipModule,
148
+ // cadmus
149
+ NgToolsModule,
150
+ CadmusCoreModule,
151
+ CadmusUiModule], exports: [LayerDemoComponent] }); }
152
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CadmusLayerDemoModule, imports: [CommonModule,
153
+ FormsModule,
154
+ ReactiveFormsModule,
155
+ RouterModuleForChild,
156
+ // material
157
+ MatButtonModule,
158
+ MatCardModule,
159
+ MatFormFieldModule,
160
+ MatIconModule,
161
+ MatInputModule,
162
+ MatToolbarModule,
163
+ MatTooltipModule,
164
+ // cadmus
165
+ NgToolsModule,
166
+ CadmusCoreModule,
167
+ CadmusUiModule] }); }
168
+ }
169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CadmusLayerDemoModule, decorators: [{
170
+ type: NgModule,
171
+ args: [{
172
+ imports: [
173
+ CommonModule,
174
+ FormsModule,
175
+ ReactiveFormsModule,
176
+ RouterModuleForChild,
177
+ // material
178
+ MatButtonModule,
179
+ MatCardModule,
180
+ MatFormFieldModule,
181
+ MatIconModule,
182
+ MatInputModule,
183
+ MatToolbarModule,
184
+ MatTooltipModule,
185
+ // cadmus
186
+ NgToolsModule,
187
+ CadmusCoreModule,
188
+ CadmusUiModule,
189
+ ],
190
+ declarations: [LayerDemoComponent],
191
+ exports: [LayerDemoComponent],
192
+ }]
193
+ }] });
194
+
195
+ /*
196
+ * Public API Surface of cadmus-layer-demo
197
+ */
198
+
199
+ /**
200
+ * Generated bundle index. Do not edit.
201
+ */
202
+
203
+ export { CadmusLayerDemoModule, LayerDemoComponent, RouterModuleForChild };
204
+ //# sourceMappingURL=myrmidon-cadmus-layer-demo.mjs.map
@@ -0,0 +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})\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\">\r\n <mat-card-header>\r\n <h2>Layered Text Demo</h2>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <article>\r\n <p>\r\n Enter some base text and zero or more layer fragments locations, then\r\n click the render button. This renders the base text with all its ranges.\r\n </p>\r\n <p>\r\n Once the text has been decorated, select any portion of it, either\r\n including a decorated part, or not. Then, if you selected a part\r\n including decorations, click the location button with the checkmark\r\n (=get the location of the fragment to edit); else, click the location\r\n button with the plus (=get the location of a new fragment).\r\n </p>\r\n <p>\r\n This will show you the token-based coordinates corresponding to your\r\n selection, provided that if you include any portion of a decorated text\r\n you will get the full coordinates of the decoration; otherwise, you will\r\n just get the coordinates of the selected character(s).\r\n </p>\r\n <p>\r\n This behavior is used to allow users edit existing part fragments by\r\n just selecting any part of it, even partially; while they must be\r\n precise when they are creating a new fragment.\r\n </p>\r\n </article>\r\n <hr />\r\n\r\n <form [formGroup]=\"rendition\" (ngSubmit)=\"render()\">\r\n <div>\r\n <mat-form-field>\r\n <mat-label>base text</mat-label>\r\n <textarea\r\n matInput\r\n type=\"text\"\r\n id=\"text\"\r\n maxlength=\"1000\"\r\n spellcheck=\"false\"\r\n formControlName=\"text\"\r\n ></textarea>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div>\r\n <mat-form-field>\r\n <mat-label>location</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n id=\"location\"\r\n required\r\n spellcheck=\"false\"\r\n formControlName=\"location\"\r\n />\r\n <mat-hint>Y.X@AxR</mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div>\r\n <mat-toolbar>\r\n <span>\r\n <button\r\n mat-icon-button\r\n (click)=\"addLocation()\"\r\n type=\"button\"\r\n matTooltip=\"Add the specified location\"\r\n >\r\n <mat-icon style=\"color: #66cc75\">add_circle</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"clearLocations()\"\r\n type=\"button\"\r\n matTooltip=\"Remove all the locations\"\r\n >\r\n <mat-icon>delete_sweep</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"primary\"\r\n type=\"submit\"\r\n matTooltip=\"Render the decorated base text\"\r\n >\r\n <mat-icon>play_circle_outline</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"getLocationForNew()\"\r\n type=\"button\"\r\n matTooltip=\"Get location for new item\"\r\n >\r\n <mat-icon>playlist_add</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"getLocationForEdit()\"\r\n type=\"button\"\r\n matTooltip=\"Get location for selected item\"\r\n >\r\n <mat-icon>playlist_add_check</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Larger text\"\r\n (click)=\"makeLarger()\"\r\n [disabled]=\"textSize >= 24\"\r\n >\r\n <mat-icon>format_size</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Smaller text\"\r\n (click)=\"makeSmaller()\"\r\n [disabled]=\"textSize <= 12\"\r\n >\r\n <mat-icon>text_fields</mat-icon>\r\n </button>\r\n </span>\r\n <span class=\"tb-fill-remaining-space\"></span>\r\n <span>{{ userLocation }}</span>\r\n </mat-toolbar>\r\n </div>\r\n\r\n <table>\r\n <tbody>\r\n <tr *ngFor=\"let loc of locations\">\r\n <td>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"removeLocation(loc)\"\r\n >\r\n <mat-icon>remove_circle</mat-icon>\r\n </button>\r\n </td>\r\n <td>{{ loc.toString() }}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </form>\r\n </mat-card-content>\r\n</mat-card>\r\n\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <h3>Rendition</h3>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <div\r\n [style.font-size]=\"textSize + 'px'\"\r\n [innerHtml]=\"result | safeHtml: 'html'\"\r\n id=\"result\"\r\n #resultElem\r\n ></div>\r\n <hr />\r\n <div>\r\n <code>{{ result }}</code>\r\n </div>\r\n </mat-card-content>\r\n</mat-card>\r\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 { CadmusCoreModule } from '@myrmidon/cadmus-core';\r\nimport { CadmusUiModule } from '@myrmidon/cadmus-ui';\r\n\r\nimport { LayerDemoComponent } from './layer-demo/layer-demo.component';\r\nimport { NgToolsModule } from '@myrmidon/ng-tools';\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAKa,kBAAkB,CAAA;IAa7B,WACE,CAAA,WAAwB,EAChB,iBAAmC,EAAA;QAAnC,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;AAE3C,QAAA,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;AACnB,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,IAAI,GA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YAAA;;YAGnB,eAAe;YACf,aAAa;YACb,kBAAkB;YAClB,aAAa;YACb,cAAc;YACd,gBAAgB;YAChB,gBAAgB;;YAEhB,aAAa;YACb,gBAAgB;AAChB,YAAA,cAAc,aAGN,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;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,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,EAAA;;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,CAAA;;;AC7CD;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@myrmidon/cadmus-layer-demo" />
5
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@myrmidon/cadmus-layer-demo" />
5
+ export * from './public-api';