@reflagged/shell 1.9.0 → 1.9.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.
package/README.md
CHANGED
|
@@ -178,7 +178,7 @@ await createNotifier().notify({
|
|
|
178
178
|
|---|---|---|
|
|
179
179
|
| `heading` | `text`, `level?` 1–3 | sub-headings inside the mail |
|
|
180
180
|
| `text` | `text`, `size?` sm/md/lg, `muted?`, `align?` | paragraphs; line breaks are kept |
|
|
181
|
-
| `button` | `label`, `url`, `variant?` primary/secondary, `align?` |
|
|
181
|
+
| `button` | `label`, `url`, `variant?` primary/secondary, `align?` | actions — https on the booking's or tenant's domain (like `actionUrl`), or `tel:`/`mailto:` |
|
|
182
182
|
| `image` | `src`, `alt`, `width?`, `href?`, `align?` | charts, screenshots — https on the booking's or tenant's domain |
|
|
183
183
|
| `callout` | `tone` neutral/info/success/warning/danger, `title?`, `text?` | status banners; tone colours are fixed, not branded |
|
|
184
184
|
| `facts` | `items[{ label, value }]` | label/value pairs |
|
|
@@ -196,8 +196,9 @@ emphasis and links — `[{ text: 'fett', bold: true }, { text: ' und ' },
|
|
|
196
196
|
{ text: 'Link', href: 'https://…' }]`. Markdown is **not** interpreted.
|
|
197
197
|
|
|
198
198
|
Rules the base enforces (400 with the failing path otherwise): only the
|
|
199
|
-
blocks above, no extra properties, links https/`tel:`/`mailto
|
|
200
|
-
the booking's or tenant's domains
|
|
199
|
+
blocks above, no extra properties, links https/`tel:`/`mailto:`; images and
|
|
200
|
+
button links only on the booking's or tenant's domains (inline span links may
|
|
201
|
+
point to any https page, e.g. a source), at most 200 top-level blocks, 100 kB, and
|
|
201
202
|
`section`/`row` nested three levels deep. The base also writes a plain-text
|
|
202
203
|
part from the blocks and shows the full mail in the platform inbox. Without
|
|
203
204
|
`blocks`, `body` is rendered as paragraphs as before. Types:
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Brain,
|
|
8
8
|
Contact,
|
|
9
9
|
Factory,
|
|
10
|
+
Gauge,
|
|
10
11
|
ListMusic,
|
|
11
12
|
MailPlus,
|
|
12
13
|
MessageSquareText,
|
|
@@ -41,6 +42,7 @@ const ICONS: Record<string, LucideIcon> = {
|
|
|
41
42
|
Brain,
|
|
42
43
|
Contact,
|
|
43
44
|
Factory,
|
|
45
|
+
Gauge,
|
|
44
46
|
ListMusic,
|
|
45
47
|
MailPlus,
|
|
46
48
|
MessageSquareText,
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
* an invalid block answers 400 with the path of the offending field.
|
|
12
12
|
*
|
|
13
13
|
* Limits: 200 top-level blocks, 100 kB as JSON, `section`/`row` nested at most
|
|
14
|
-
* three levels. Links: https, `tel:` or `mailto:`. Images
|
|
15
|
-
* the booking or the tenant (
|
|
14
|
+
* three levels. Links: https, `tel:` or `mailto:`. Images and button links:
|
|
15
|
+
* https on a domain of the booking or the tenant (a foreign image is a tracking
|
|
16
|
+
* pixel, a foreign button a phishing lure); inline span links may go anywhere.
|
|
16
17
|
*/
|
|
17
18
|
|
|
18
19
|
/** A run of text with optional emphasis or a link. */
|
|
@@ -43,6 +44,7 @@ export type TextBlock = {
|
|
|
43
44
|
export type ButtonBlock = {
|
|
44
45
|
type: 'button'
|
|
45
46
|
label: string
|
|
47
|
+
/** https on a domain of the booking or the tenant, or tel:/mailto:. */
|
|
46
48
|
url: string
|
|
47
49
|
variant?: 'primary' | 'secondary'
|
|
48
50
|
align?: Align
|