@sharadox/form-web-library 0.5.0 → 0.5.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.
Files changed (3) hide show
  1. package/README.md +2 -1
  2. package/llms.txt +1 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -29,7 +29,7 @@ export const sendContact = createContactAction({
29
29
  site: "example.com",
30
30
  choices: { website: "Website", logo: "Logo", other: "Others" },
31
31
  logo: async () => ({ content: await readFile(LOGO), contentType: "image/png", filename: "logo.png" }),
32
- design: { background: "#000000", foreground: "#ffffff", accent: "#ffffff" },
32
+ design: EXAMPLE_EMAIL, // the brand's EmailDesign (email-web-library): colors, type, rules, header, signature
33
33
  acknowledgement: {
34
34
  en: {
35
35
  subject: "Example · We received your message",
@@ -37,6 +37,7 @@ export const sendContact = createContactAction({
37
37
  heading: (name) => `Thank you, ${name}.`,
38
38
  paragraphs: ["We'll get back to you shortly."],
39
39
  messageLabel: "Your message",
40
+ button: { label: "Visit example.com", href: "https://example.com" }, // optional
40
41
  },
41
42
  },
42
43
  });
package/llms.txt CHANGED
@@ -8,3 +8,4 @@
8
8
  - /contact-check isEmail(text), isPhone(text) (browser-safe, same rules as the server); /bot-check isLikelyBot; /rate-limit createRateLimiter({ window, maximum }); /field readField(form, name, max)
9
9
  - Env: EMAIL_SERVER_HOST/PORT/USERNAME/PASSWORD, EMAIL_SENDER_ADDRESS. License: Sharadox Open Source License 0.1.0
10
10
  - 0.5.0: createContactAction takes `design` (email-web-library ^0.4.0 EmailDesign; plainDesign(company) by default) instead of `theme`, and lays out both emails with emailLayout; the notice has a button to answer the visitor (labels.reply "Reply to" + first name, or labels.call "Call" when only a phone was left); an acknowledgement may carry a `button`; with a design signature, the reply leaves out its line to the site; contact-email (brandedEmailHtml) is removed: use email-web-library's emailLayout
11
+ - 0.5.1: README's example passes a real EmailDesign
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sharadox/form-web-library",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Forms on the server: field reading, honeypot and fill-time bot checks, rate limiting and a contact form action that emails messages with the visitor as reply-to.",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENCA.md",