@odla-ai/chapter 0.60.0 → 0.61.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.
package/README.md CHANGED
@@ -1622,8 +1622,22 @@ These bite silently — a smoke test won't catch them:
1622
1622
  | `meetUrl`, `htmlLink` | `prepEmail` | the booked meeting's Google Meet and calendar links (blank when the provider returned none) |
1623
1623
  | `meetingTime`, `meetingLink` | `prepEmail` | aliases of `startAt` and `meetUrl` (falling back to `htmlLink`) for copy written before those existed |
1624
1624
  | `adminUrl`, `membersUrl` | `adminNotification`, `submitConfirmation`, `onboardingInvite` | `<origin>/admin/` and `<origin>/members/` from the request that fired the send |
1625
+ | `namedSeat`, `namedSeatRecipientName` | `adminNotification`, `submitConfirmation`, `paymentConfirmation`, `prepEmail`, `onboardingInvite` | `paid` or `included` when the frozen checkout carries a gift seat for another person, else blank (so `{{#namedSeat}}` hides); the recipient's name as entered at checkout. A host event reads the same values through `checkoutVariables` |
1625
1626
  | `refundPolicyText`, `commitmentText`, `normsText` | all | the group row's policy copy |
1626
1627
 
1628
+ **Sections and an HTML body.** `{{#name}} … {{/name}}` keeps its contents
1629
+ only when `name` has a value, so a line such as
1630
+ `{{#namedSeat}}Your gift for {{namedSeatRecipientName}} is paid.{{/namedSeat}}`
1631
+ appears for gift buyers alone; a section on its own line disappears with
1632
+ its line. The event must supply a section's name like any variable, and an
1633
+ unclosed section blocks the send. A template may also carry an `html`
1634
+ body (Settings → Email, under the plain body) with the same placeholders
1635
+ and sections: values are escaped, a line break inside a value becomes a
1636
+ `<br>`, the text body is still sent as the plain alternative and recorded
1637
+ in the log, and an unknown placeholder in the HTML blocks the send like
1638
+ one in the text. Without an `html` body the text is rendered to HTML by
1639
+ `textToHtml`.
1640
+
1627
1641
  **From display name.** `emails.fromName` (seeded to the group row, editable
1628
1642
  in Settings → Email) turns the From header into `{ name, email }` —
1629
1643
  `Tori Horton <tori@…>` in an inbox — while the address stays the Worker's
@@ -4,7 +4,7 @@ import {
4
4
  DEFAULT_CHAPTER_COPY,
5
5
  formatChapterCopy,
6
6
  useChapterCopy
7
- } from "./chunk-QNP3UEIL.js";
7
+ } from "./chunk-PKVHXKGJ.js";
8
8
 
9
9
  // src/ui/admin.tsx
10
10
  import { useEffect as useEffect12, useMemo as useMemo3, useRef as useRef3, useState as useState27 } from "preact/hooks";
@@ -2786,6 +2786,7 @@ function EmailBody({ ctx }) {
2786
2786
  /* @__PURE__ */ jsx29(Checkbox2, { label: copy.enabled, checked: t.enabled === true, onChange: (e) => editTemplate(key, { enabled: e.target.checked }) }),
2787
2787
  /* @__PURE__ */ jsx29(Field13, { label: copy.subject, children: /* @__PURE__ */ jsx29(Input6, { value: t.subject, onInput: (e) => editTemplate(key, { subject: e.target.value }) }) }),
2788
2788
  /* @__PURE__ */ jsx29(Field13, { label: copy.body, children: /* @__PURE__ */ jsx29(Textarea5, { prose: true, rows: 5, value: t.text, onInput: (e) => editTemplate(key, { text: e.target.value }) }) }),
2789
+ /* @__PURE__ */ jsx29(Field13, { label: copy.htmlBody, hint: copy.htmlBodyHint, children: /* @__PURE__ */ jsx29(Textarea5, { rows: 6, value: t.html ?? "", onInput: (e) => editTemplate(key, { html: e.target.value }) }) }),
2789
2790
  /* @__PURE__ */ jsxs27("p", { className: "muted", children: [
2790
2791
  "Available values: ",
2791
2792
  event.variables.map((name) => `{{${name}}}`).join(", ")
@@ -3885,4 +3886,4 @@ export {
3885
3886
  MembershipDisputes,
3886
3887
  MembershipPolicyVersions
3887
3888
  };
3888
- //# sourceMappingURL=chunk-J7ES2OWN.js.map
3889
+ //# sourceMappingURL=chunk-24L7FANC.js.map