@coolon/angular-ui-powerups 16.1.0-alpha.350 → 16.1.0-alpha.351

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.
@@ -5,9 +5,10 @@ import { MarkdownService } from '../../../services/markdown/markdown.service';
5
5
  import { DisposableComponent } from '../../disposable-component';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
- * Renders Markdown into the page as HTML, sanitised as Angular sanitises a bound `[innerHTML]`:
9
- * plain markup and its classes are kept, scripts and event handlers are dropped, and `javascript:`
10
- * links are made inert. Text a user typed belongs in it only inside a pill, "(({name}))", whose text is escaped
8
+ * Renders Markdown into the page as HTML. HTML written into the Markdown is shown as the text it
9
+ * is, apart from `<br>` (`MarkdownService`), and the result is sanitised as Angular sanitises a
10
+ * bound `[innerHTML]`: plain markup and its classes are kept, scripts and event handlers are
11
+ * dropped, and `javascript:` links are made inert. Text a user typed belongs in it only inside a pill, "(({name}))", whose text is escaped
11
12
  * (`markdownPillExtension`). The HTML used to go in as Markdown made it, so a name holding "))"
12
13
  * could end its pill early and put `<img src=x onerror=…>` into every message that named it.
13
14
  *
@@ -1,5 +1,12 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * Renders Markdown as HTML. HTML written into the Markdown is shown as the text it is, apart from
4
+ * `<br>`, which copy uses to break a line: a name holding "))" ends its pill early, and markup
5
+ * after it, `<img src=x …>`, then reads as typed rather than drawing a broken image.
6
+ * `aup-markdown` sanitises the result as well.
7
+ */
2
8
  export declare class MarkdownService {
9
+ private readonly renderer;
3
10
  render(content: string): string;
4
11
  renderInline(content: string): string;
5
12
  /**
@@ -7,6 +14,7 @@ export declare class MarkdownService {
7
14
  * HTML-escaped, and returns the pill's HTML.
8
15
  */
9
16
  usePillExtension(renderer?: (escapedText: string) => string): void;
17
+ private static htmlAsText;
10
18
  static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownService, never>;
11
19
  static ɵprov: i0.ɵɵInjectableDeclaration<MarkdownService>;
12
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "16.1.0-alpha.350",
3
+ "version": "16.1.0-alpha.351",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.9",
6
6
  "@angular/common": "^16.2.9",