@trycourier/courier-ui-inbox 2.2.0 → 2.3.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.
@@ -37,6 +37,11 @@ export type CourierInboxPopupTheme = {
37
37
  divider?: string;
38
38
  };
39
39
  };
40
+ export type CourierInboxSubtitleLinkTheme = {
41
+ color?: string;
42
+ textDecoration?: string;
43
+ hoverColor?: string;
44
+ };
40
45
  export type CourierInboxListItemTheme = {
41
46
  unreadIndicatorColor?: string;
42
47
  backgroundColor?: string;
@@ -45,6 +50,8 @@ export type CourierInboxListItemTheme = {
45
50
  transition?: string;
46
51
  title?: CourierInboxFontTheme;
47
52
  subtitle?: CourierInboxFontTheme;
53
+ /** Styles for inline links inside the subtitle/body text */
54
+ subtitleLink?: CourierInboxSubtitleLinkTheme;
48
55
  time?: CourierInboxFontTheme;
49
56
  archiveIcon?: CourierInboxIconTheme;
50
57
  divider?: string;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Returns true if the string looks like it contains HTML (e.g. from markdown link conversion).
3
+ */
4
+ export declare function looksLikeHtml(str: string): boolean;
5
+ /**
6
+ * Converts plain text into HTML by making links clickable:
7
+ * - Markdown links [link text](https://url) become <a> tags
8
+ * - Bare http(s) URLs become <a> tags
9
+ * Non-link text is escaped. Use with sanitizeHtmlForInbox for safe display.
10
+ */
11
+ export declare function linkifyPlainText(text: string): string;
12
+ /**
13
+ * Sanitizes HTML for safe display in the inbox. Only allows <a> tags with http(s) href.
14
+ * Normalizes malformed preview HTML first (e.g. markdown in href, target="+blank").
15
+ * All other tags are stripped; their content is preserved as escaped text.
16
+ */
17
+ export declare function sanitizeHtmlForInbox(html: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/courier-ui-inbox",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Inbox components for the Courier web UI",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -31,7 +31,7 @@
31
31
  "dist"
32
32
  ],
33
33
  "dependencies": {
34
- "@trycourier/courier-js": "3.0.0",
34
+ "@trycourier/courier-js": "3.1.0",
35
35
  "@trycourier/courier-ui-core": "2.0.0"
36
36
  },
37
37
  "devDependencies": {