@myrmidon/cadmus-core 13.0.1 → 20.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,3 +5,9 @@
5
5
  This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.0.0.
6
6
 
7
7
  This library contains only shared Cadmus frontend models, generic services, pipes, and guards.
8
+
9
+ ## Text Layers
10
+
11
+ Token-based text layers use locations (`TokenLocation`, made of one or two `TokenPoint`'s) in the form `Y.X@AxR`, where `Y` is the line ordinal, `X` the token ordinal in the line, and optionally `A` the first character in the token and `R` the count of characters (see the documentation of `DecoratedTokenTextComponent` in `@myrmidon/cadmus-ui` for the details).
12
+
13
+ `TextLayerService` contains the legacy implementation of this coordinates system. Its `getLines` and `getTextFragment` methods are still used to extract the text of a location; while its DOM-based rendition and selection methods (`render`, `getSelectedLocationForNew`, `getSelectedLocationForEdit`, `getSelectedRange`) are deprecated, as the same logic is now implemented by `TokenTextSegmenter` in `@myrmidon/cadmus-ui`. They are kept for backwards compatibility, and as the reference which `TokenTextSegmenter` tests check their parity with.