markstream-angular 0.0.1-alpha.9 → 0.0.1

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.
@@ -9,6 +9,20 @@ export declare class NodeOutletComponent {
9
9
  get customNode(): AngularRenderableNode;
10
10
  get codeMode(): import('../shared/node-outlet-helpers').CodeBlockMode;
11
11
  get htmlTag(): string;
12
+ /**
13
+ * Check if this HTML tag should be escaped (rendered as text) instead of being parsed as HTML.
14
+ * This happens when:
15
+ * 1. The node is html_block or html_inline
16
+ * 2. The tag is NOT in the customHtmlTags whitelist
17
+ * 3. The tag is NOT a standard HTML tag
18
+ * 4. The tag is incomplete/malformed, so rendering it as HTML would swallow
19
+ * surrounding content.
20
+ */
21
+ get shouldEscapeHtmlTag(): boolean;
22
+ /**
23
+ * Returns a text node for incomplete non-whitelisted, non-standard HTML tags.
24
+ */
25
+ get escapedTextNode(): AngularRenderableNode;
12
26
  get htmlRenderNode(): AngularRenderableNode;
13
27
  get fallbackNode(): AngularRenderableNode;
14
28
  get resolvedComponentInputs(): Record<string, any>;
@@ -1,6 +1,7 @@
1
1
  import { Type } from '@angular/core';
2
- import { BaseNode, MarkdownIt, ParsedNode, ParseOptions } from 'stream-markdown-parser';
2
+ import { BaseNode, MarkdownIt, ParsedNode, ParseOptions, getHtmlTagFromContent, hasCompleteHtmlTagContent, normalizeCustomHtmlTags, normalizeCustomHtmlTagName as normalizeTagName, stripCustomHtmlWrapper } from 'stream-markdown-parser';
3
3
  import { CodeBlockMonacoOptions, CodeBlockMonacoTheme } from '../../types/monaco';
4
+ export { getHtmlTagFromContent, hasCompleteHtmlTagContent, normalizeCustomHtmlTags, normalizeTagName, stripCustomHtmlWrapper, };
4
5
  export type AngularRenderableNode = (ParsedNode | BaseNode) & Record<string, unknown>;
5
6
  export interface NodeRendererEvents {
6
7
  onCopy?: (code: string) => void;
@@ -84,16 +85,12 @@ export declare function isImageOnlyLinkNode(node: AngularRenderableNode | null |
84
85
  export declare function isMediaOnlyParagraphNodes(children: readonly AngularRenderableNode[]): boolean;
85
86
  export declare function normalizeMediaOnlyParagraphNodes(children: readonly AngularRenderableNode[]): AngularRenderableNode[];
86
87
  export declare function getString(value: unknown): string;
87
- export declare function normalizeCustomHtmlTags(tags?: readonly string[]): string[];
88
- export declare function normalizeTagName(value: unknown): string;
89
88
  export declare function isSafeAttrName(value: string): boolean;
90
89
  export declare function escapeHtml(value: unknown): string;
91
90
  export declare function escapeAttr(value: unknown): string;
92
91
  export declare function sanitizeClassToken(value: string): string;
93
92
  export declare function clampHeadingLevel(value: unknown): number;
94
93
  export declare function capitalize(value: string): string;
95
- export declare function getHtmlTagFromContent(html: unknown): string;
96
- export declare function stripCustomHtmlWrapper(html: unknown, tag: string): string;
97
94
  export declare function normalizeCodeLanguage(raw: unknown): string;
98
95
  export declare function resolveCodeBlockLanguage(node: AngularRenderableNode): string;
99
96
  export declare function encodeDataPayload(value: string): any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "markstream-angular",
3
3
  "type": "module",
4
- "version": "0.0.1-alpha.9",
4
+ "version": "0.0.1",
5
5
  "description": "Experimental Angular Markdown renderer for Markstream, built on stream-markdown AST and a stable HTML baseline renderer.",
6
6
  "author": "Simon He",
7
7
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  "@terrastruct/d2": ">=0.1.33",
48
48
  "katex": ">=0.16.22",
49
49
  "mermaid": ">=11",
50
- "stream-monaco": ">=0.0.20"
50
+ "stream-monaco": ">=0.0.21"
51
51
  },
52
52
  "peerDependenciesMeta": {
53
53
  "@antv/infographic": {
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@floating-ui/dom": "^1.7.6",
71
- "stream-markdown-parser": "0.0.80"
71
+ "stream-markdown-parser": "0.0.81"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/node": "^18.19.130",