@opencxh/domain 1.198.2 → 1.210.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.
@@ -4,8 +4,17 @@
4
4
  * Without this the raw HTML + full Gmail/Outlook quote leaks the OLD message into
5
5
  * classify/extract/agent (or history views) instead of the sender's new content.
6
6
  * Pure, dependency-free (lives in domain so both server apps can share it).
7
+ *
8
+ * Two exits: `cleanMessageText` (plain, for prompts and snippet lines) and
9
+ * `cleanMessageMarkdown` (links and inline images kept, for the reading view).
7
10
  */
8
11
  /** Does this raw body look like HTML (vs plain text)? Shared by feed projection and the mail UI. */
9
12
  export declare const HTML_BODY_RE: RegExp;
10
13
  export declare function isHtmlBody(raw: string): boolean;
11
14
  export declare function cleanMessageText(raw: unknown): string;
15
+ /**
16
+ * Same cut, decode and collapse, but `<a>` and `<img>` survive as markdown.
17
+ * For the reading view (rendered with `RichText as="markdown"`), never for a
18
+ * prompt or a snippet line — `plainTextFromMarkdown` flattens it for those.
19
+ */
20
+ export declare function cleanMessageMarkdown(raw: unknown): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencxh/domain",
3
- "version": "1.198.2",
3
+ "version": "1.210.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",