@ctrl-ui/react 0.8.7 → 0.8.9

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 (341) hide show
  1. package/dist/action-bar.d.ts +15 -7
  2. package/dist/action-bar.js +39 -19
  3. package/dist/activity.js +7 -15
  4. package/dist/audio-recorder.d.ts +14 -4
  5. package/dist/audio-recorder.js +82 -29
  6. package/dist/audio-visualizer.js +1 -1
  7. package/dist/blocks/coding-agent.js +39 -39
  8. package/dist/blocks/design-canvas.d.ts +5 -1
  9. package/dist/blocks/design-canvas.js +198 -92
  10. package/dist/blocks/discussion.d.ts +28 -0
  11. package/dist/blocks/discussion.js +67 -0
  12. package/dist/blocks/file-explorer-data.d.ts +1 -0
  13. package/dist/blocks/file-explorer-data.js +4 -1
  14. package/dist/blocks/file-explorer.d.ts +9 -1
  15. package/dist/blocks/file-explorer.js +461 -192
  16. package/dist/blocks/settings.d.ts +2 -1
  17. package/dist/blocks/settings.js +101 -79
  18. package/dist/blocks/team-chat.d.ts +12 -0
  19. package/dist/blocks/team-chat.js +26 -0
  20. package/dist/blocks/theme-toggle.js +23 -31
  21. package/dist/chat-composer-attachment.d.ts +4 -1
  22. package/dist/chat-composer-attachment.js +35 -10
  23. package/dist/chat-composer-editor/extensions/mention.d.ts +5 -1
  24. package/dist/chat-composer-editor/extensions/mention.js +59 -28
  25. package/dist/chat-composer-editor/ghost.js +2 -4
  26. package/dist/chat-composer-editor/types.d.ts +5 -0
  27. package/dist/chat-composer-editor.d.ts +1 -1
  28. package/dist/chat-composer-editor.js +57 -30
  29. package/dist/chat-composer.d.ts +13 -32
  30. package/dist/chat-composer.js +52 -12
  31. package/dist/chat-layout.d.ts +19 -0
  32. package/dist/chat-layout.js +91 -40
  33. package/dist/chat-message/social.d.ts +26 -0
  34. package/dist/chat-message/social.js +122 -0
  35. package/dist/chat-message.d.ts +28 -29
  36. package/dist/chat-message.js +106 -25
  37. package/dist/context.d.ts +2 -2
  38. package/dist/context.js +38 -23
  39. package/dist/dynamic-notification-canvas-loop.d.ts +24 -0
  40. package/dist/dynamic-notification-canvas-loop.js +113 -0
  41. package/dist/dynamic-notification-glass.js +23 -114
  42. package/dist/dynamic-notification-liquid.js +14 -118
  43. package/dist/dynamic-notification.d.ts +16 -8
  44. package/dist/dynamic-notification.js +85 -22
  45. package/dist/email/email-brand.d.ts +7 -4
  46. package/dist/email/email-brand.js +9 -6
  47. package/dist/email/email-code.d.ts +3 -2
  48. package/dist/email/email-code.js +11 -9
  49. package/dist/email/email-footer.d.ts +5 -3
  50. package/dist/email/email-footer.js +11 -5
  51. package/dist/email/email.d.ts +31 -9
  52. package/dist/email/email.js +50 -26
  53. package/dist/email/templates.d.ts +10 -9
  54. package/dist/email/templates.js +102 -38
  55. package/dist/email/theme.js +1 -1
  56. package/dist/environment-variables.d.ts +4 -2
  57. package/dist/environment-variables.js +52 -32
  58. package/dist/filter-bar/editor.js +20 -8
  59. package/dist/filter-bar/model.d.ts +1 -0
  60. package/dist/filter-bar/model.js +10 -1
  61. package/dist/filter-bar/motion.js +4 -4
  62. package/dist/filter-bar/parts.js +19 -8
  63. package/dist/filter-bar/types.d.ts +1 -0
  64. package/dist/filter-bar.js +19 -13
  65. package/dist/hooks/use-audio-recorder.js +12 -6
  66. package/dist/hooks/use-chat-composer.d.ts +19 -7
  67. package/dist/hooks/use-chat-composer.js +32 -5
  68. package/dist/hooks/use-chat-message.d.ts +28 -2
  69. package/dist/hooks/use-chat-message.js +41 -10
  70. package/dist/hooks/use-chat-thread-scroll.js +43 -7
  71. package/dist/hooks/use-color-area.d.ts +3 -3
  72. package/dist/hooks/use-color-area.js +13 -12
  73. package/dist/hooks/use-copy-to-clipboard.d.ts +2 -1
  74. package/dist/hooks/use-copy-to-clipboard.js +20 -20
  75. package/dist/hooks/use-dynamic-notification.d.ts +6 -2
  76. package/dist/hooks/use-dynamic-notification.js +26 -10
  77. package/dist/hooks/use-mobile.d.ts +3 -2
  78. package/dist/hooks/use-mobile.js +8 -4
  79. package/dist/hooks/use-textarea-trigger-menu.js +2 -1
  80. package/dist/hooks/use-trigger-menu.d.ts +54 -0
  81. package/dist/hooks/use-trigger-menu.js +102 -47
  82. package/dist/hooks/use-user-ask.d.ts +2 -0
  83. package/dist/hooks/use-user-ask.js +35 -41
  84. package/dist/inline-attachment.d.ts +6 -2
  85. package/dist/inline-attachment.js +36 -15
  86. package/dist/inline-citation.d.ts +12 -5
  87. package/dist/inline-citation.js +25 -16
  88. package/dist/knob-contracts/audio-recorder-knobs.d.ts +1 -1
  89. package/dist/knob-contracts/audio-recorder-knobs.js +2 -1
  90. package/dist/knob-contracts/audio-visualizer-knobs.d.ts +1 -1
  91. package/dist/knob-contracts/audio-visualizer-knobs.js +2 -1
  92. package/dist/knob-contracts/avatar-knobs.d.ts +1 -1
  93. package/dist/knob-contracts/avatar-knobs.js +6 -1
  94. package/dist/knob-contracts/badge-knobs.d.ts +1 -1
  95. package/dist/knob-contracts/badge-knobs.js +2 -1
  96. package/dist/knob-contracts/breadcrumb-knobs.d.ts +4 -0
  97. package/dist/knob-contracts/breadcrumb-knobs.js +8 -0
  98. package/dist/knob-contracts/button-knobs.d.ts +1 -1
  99. package/dist/knob-contracts/button-knobs.js +1 -0
  100. package/dist/knob-contracts/chat-message-knobs.d.ts +1 -1
  101. package/dist/knob-contracts/chat-message-knobs.js +8 -1
  102. package/dist/knob-contracts/code-diff-knobs.d.ts +1 -1
  103. package/dist/knob-contracts/code-diff-knobs.js +2 -0
  104. package/dist/knob-contracts/code-knobs.d.ts +1 -1
  105. package/dist/knob-contracts/code-knobs.js +2 -1
  106. package/dist/knob-contracts/dynamic-notification-knobs.d.ts +1 -1
  107. package/dist/knob-contracts/dynamic-notification-knobs.js +2 -0
  108. package/dist/knob-contracts/emoji-picker-knobs.d.ts +4 -0
  109. package/dist/knob-contracts/emoji-picker-knobs.js +10 -0
  110. package/dist/knob-contracts/field-knobs.d.ts +1 -1
  111. package/dist/knob-contracts/field-knobs.js +5 -1
  112. package/dist/knob-contracts/filter-bar-knobs.d.ts +1 -1
  113. package/dist/knob-contracts/filter-bar-knobs.js +1 -2
  114. package/dist/knob-contracts/markdown-knobs.d.ts +1 -1
  115. package/dist/knob-contracts/markdown-knobs.js +3 -1
  116. package/dist/knob-contracts/page-layout-knobs.d.ts +1 -1
  117. package/dist/knob-contracts/page-layout-knobs.js +2 -1
  118. package/dist/knob-contracts/popup-knobs.d.ts +1 -1
  119. package/dist/knob-contracts/popup-knobs.js +27 -0
  120. package/dist/knob-contracts/range-knobs.d.ts +1 -1
  121. package/dist/knob-contracts/range-knobs.js +1 -0
  122. package/dist/knob-contracts/rich-tooltip-knobs.d.ts +1 -1
  123. package/dist/knob-contracts/rich-tooltip-knobs.js +2 -1
  124. package/dist/knob-contracts/sidebar-knobs.d.ts +1 -1
  125. package/dist/knob-contracts/sidebar-knobs.js +27 -2
  126. package/dist/knob-contracts/spinner-knobs.d.ts +1 -1
  127. package/dist/knob-contracts/spinner-knobs.js +1 -1
  128. package/dist/knob-contracts/stepper-knobs.d.ts +1 -1
  129. package/dist/knob-contracts/stepper-knobs.js +4 -1
  130. package/dist/knob-contracts/switch-knobs.d.ts +1 -1
  131. package/dist/knob-contracts/switch-knobs.js +5 -0
  132. package/dist/knob-contracts/table-of-contents-knobs.d.ts +1 -1
  133. package/dist/knob-contracts/table-of-contents-knobs.js +2 -1
  134. package/dist/knob-contracts/tabs-knobs.d.ts +1 -1
  135. package/dist/knob-contracts/tabs-knobs.js +1 -0
  136. package/dist/knob-contracts/tree-knobs.d.ts +1 -1
  137. package/dist/knob-contracts/tree-knobs.js +2 -1
  138. package/dist/lib/cn.js +0 -4
  139. package/dist/lib/contrast.d.ts +1 -0
  140. package/dist/lib/contrast.js +17 -5
  141. package/dist/lib/dropzone-validation.js +41 -28
  142. package/dist/lib/env-file.d.ts +1 -1
  143. package/dist/lib/env-file.js +5 -5
  144. package/dist/lib/motion.d.ts +4 -0
  145. package/dist/lib/motion.js +15 -0
  146. package/dist/lib/trigger-detect.js +6 -8
  147. package/dist/markdown-block.js +2 -1
  148. package/dist/popup-parts.d.ts +8 -0
  149. package/dist/popup-parts.js +43 -0
  150. package/dist/source-badge.js +3 -1
  151. package/dist/styles/code.css +0 -2
  152. package/dist/styles/effects.css +6 -32
  153. package/dist/styles/index.css +10 -5
  154. package/dist/styles/recipes/accordion.css +9 -6
  155. package/dist/styles/recipes/action-bar.css +0 -15
  156. package/dist/styles/recipes/activity.css +5 -11
  157. package/dist/styles/recipes/alert.css +4 -4
  158. package/dist/styles/recipes/audio-recorder.css +15 -3
  159. package/dist/styles/recipes/audio-visualizer.css +13 -2
  160. package/dist/styles/recipes/avatar.css +78 -1
  161. package/dist/styles/recipes/badge.css +14 -4
  162. package/dist/styles/recipes/breadcrumb.css +77 -0
  163. package/dist/styles/recipes/button-group.css +5 -7
  164. package/dist/styles/recipes/button-states.css +66 -0
  165. package/dist/styles/recipes/button.css +24 -83
  166. package/dist/styles/recipes/calendar.css +17 -23
  167. package/dist/styles/recipes/card.css +2 -2
  168. package/dist/styles/recipes/chat-composer-attachment.css +9 -3
  169. package/dist/styles/recipes/chat-composer.css +7 -10
  170. package/dist/styles/recipes/chat-layout.css +35 -0
  171. package/dist/styles/recipes/chat-message-social.css +123 -0
  172. package/dist/styles/recipes/chat-message.css +157 -37
  173. package/dist/styles/recipes/choice.css +18 -21
  174. package/dist/styles/recipes/code-diff.css +46 -33
  175. package/dist/styles/recipes/code.css +36 -16
  176. package/dist/styles/recipes/collapsible.css +7 -2
  177. package/dist/styles/recipes/color-picker-details.css +3 -4
  178. package/dist/styles/recipes/color-picker-values.css +9 -8
  179. package/dist/styles/recipes/color-picker.css +11 -2
  180. package/dist/styles/recipes/context.css +3 -3
  181. package/dist/styles/recipes/dockable-panel.css +7 -4
  182. package/dist/styles/recipes/dropzone.css +7 -8
  183. package/dist/styles/recipes/dynamic-notification-input.css +8 -5
  184. package/dist/styles/recipes/dynamic-notification-motion.css +12 -21
  185. package/dist/styles/recipes/dynamic-notification.css +40 -26
  186. package/dist/styles/recipes/emoji-picker.css +132 -0
  187. package/dist/styles/recipes/empty.css +5 -4
  188. package/dist/styles/recipes/environment-variables.css +4 -15
  189. package/dist/styles/recipes/field-parts.css +30 -24
  190. package/dist/styles/recipes/field.css +61 -26
  191. package/dist/styles/recipes/filter-bar.css +18 -31
  192. package/dist/styles/recipes/gradient-editor.css +18 -7
  193. package/dist/styles/recipes/infinite-canvas.css +0 -1
  194. package/dist/styles/recipes/inline-attachment.css +3 -3
  195. package/dist/styles/recipes/inline-citation.css +10 -4
  196. package/dist/styles/recipes/item.css +23 -9
  197. package/dist/styles/recipes/markdown-block.css +5 -4
  198. package/dist/styles/recipes/markdown.css +68 -26
  199. package/dist/styles/recipes/morphing-panel.css +8 -8
  200. package/dist/styles/recipes/page-layout.css +20 -12
  201. package/dist/styles/recipes/pagination.css +4 -5
  202. package/dist/styles/recipes/phone-input.css +12 -8
  203. package/dist/styles/recipes/popup-controls.css +166 -33
  204. package/dist/styles/recipes/popup-drawer.css +3 -14
  205. package/dist/styles/recipes/popup-lists.css +128 -27
  206. package/dist/styles/recipes/popup-motion.css +4 -45
  207. package/dist/styles/recipes/popup-toast.css +55 -26
  208. package/dist/styles/recipes/popup.css +139 -141
  209. package/dist/styles/recipes/range.css +54 -18
  210. package/dist/styles/recipes/resizable.css +2 -7
  211. package/dist/styles/recipes/rich-tooltip.css +24 -34
  212. package/dist/styles/recipes/scroll-area.css +8 -1
  213. package/dist/styles/recipes/sidebar-menu.css +166 -34
  214. package/dist/styles/recipes/sidebar-parts.css +192 -0
  215. package/dist/styles/recipes/sidebar.css +188 -128
  216. package/dist/styles/recipes/source-badge.css +1 -1
  217. package/dist/styles/recipes/spinner.css +8 -1
  218. package/dist/styles/recipes/stepper.css +31 -13
  219. package/dist/styles/recipes/switch.css +68 -23
  220. package/dist/styles/recipes/table-of-contents.css +9 -1
  221. package/dist/styles/recipes/table.css +14 -10
  222. package/dist/styles/recipes/tabs.css +17 -12
  223. package/dist/styles/recipes/task-list.css +7 -14
  224. package/dist/styles/recipes/thread-rail.css +42 -19
  225. package/dist/styles/recipes/timeline.css +2 -0
  226. package/dist/styles/recipes/toolbar.css +27 -25
  227. package/dist/styles/recipes/track-highlight.css +10 -7
  228. package/dist/styles/recipes/tree.css +31 -4
  229. package/dist/styles/recipes/user-ask-details.css +0 -1
  230. package/dist/styles/recipes/user-ask.css +4 -4
  231. package/dist/styles/theme.css +37 -16
  232. package/dist/task-list.d.ts +4 -1
  233. package/dist/task-list.js +24 -8
  234. package/dist/thread-rail.d.ts +1 -1
  235. package/dist/thread-rail.js +61 -19
  236. package/dist/transcript-divider.js +2 -1
  237. package/dist/ui/alert.d.ts +3 -1
  238. package/dist/ui/alert.js +14 -8
  239. package/dist/ui/autocomplete.js +3 -1
  240. package/dist/ui/avatar.d.ts +8 -0
  241. package/dist/ui/avatar.js +23 -3
  242. package/dist/ui/badge.js +1 -1
  243. package/dist/ui/breadcrumb.d.ts +27 -0
  244. package/dist/ui/breadcrumb.js +88 -0
  245. package/dist/ui/button.d.ts +2 -1
  246. package/dist/ui/button.js +1 -1
  247. package/dist/ui/calendar.js +2 -2
  248. package/dist/ui/card.d.ts +3 -1
  249. package/dist/ui/card.js +12 -7
  250. package/dist/ui/checkbox.d.ts +2 -0
  251. package/dist/ui/code-diff.d.ts +1 -1
  252. package/dist/ui/code-diff.js +71 -27
  253. package/dist/ui/code.d.ts +5 -3
  254. package/dist/ui/code.js +26 -27
  255. package/dist/ui/color-picker.d.ts +5 -2
  256. package/dist/ui/color-picker.js +84 -36
  257. package/dist/ui/combobox-disabled-selection.d.ts +1 -2
  258. package/dist/ui/combobox-disabled-selection.js +7 -9
  259. package/dist/ui/combobox.js +13 -5
  260. package/dist/ui/command.d.ts +8 -2
  261. package/dist/ui/command.js +30 -14
  262. package/dist/ui/context-menu.js +3 -0
  263. package/dist/ui/dialog.d.ts +2 -1
  264. package/dist/ui/dialog.js +3 -22
  265. package/dist/ui/dockable-panel-geometry.d.ts +1 -0
  266. package/dist/ui/dockable-panel-geometry.js +7 -1
  267. package/dist/ui/dockable-panel.d.ts +9 -6
  268. package/dist/ui/dockable-panel.js +63 -23
  269. package/dist/ui/dropdown-menu.js +4 -3
  270. package/dist/ui/dropzone.d.ts +2 -2
  271. package/dist/ui/dropzone.js +75 -16
  272. package/dist/ui/emoji-picker.d.ts +18 -0
  273. package/dist/ui/emoji-picker.js +136 -0
  274. package/dist/ui/empty.d.ts +3 -1
  275. package/dist/ui/empty.js +12 -7
  276. package/dist/ui/gradient-editor.d.ts +1 -1
  277. package/dist/ui/gradient-editor.js +37 -21
  278. package/dist/ui/infinite-canvas.d.ts +3 -2
  279. package/dist/ui/infinite-canvas.js +63 -19
  280. package/dist/ui/input-group.d.ts +0 -3
  281. package/dist/ui/input-group.js +3 -13
  282. package/dist/ui/input-otp.d.ts +1 -1
  283. package/dist/ui/input-otp.js +32 -15
  284. package/dist/ui/input.js +4 -4
  285. package/dist/ui/item.d.ts +2 -1
  286. package/dist/ui/item.js +11 -7
  287. package/dist/ui/live-status.d.ts +7 -0
  288. package/dist/ui/live-status.js +17 -0
  289. package/dist/ui/markdown-elements.d.ts +6 -0
  290. package/dist/ui/markdown-elements.js +31 -1
  291. package/dist/ui/menubar.js +2 -2
  292. package/dist/ui/morphing-panel.js +2 -1
  293. package/dist/ui/native-select.d.ts +1 -1
  294. package/dist/ui/native-select.js +24 -11
  295. package/dist/ui/page-layout.d.ts +2 -2
  296. package/dist/ui/page-layout.js +2 -4
  297. package/dist/ui/pagination.d.ts +7 -5
  298. package/dist/ui/pagination.js +19 -13
  299. package/dist/ui/phone-input.d.ts +1 -0
  300. package/dist/ui/phone-input.js +56 -58
  301. package/dist/ui/radio-group.d.ts +2 -0
  302. package/dist/ui/resizable.d.ts +3 -2
  303. package/dist/ui/resizable.js +5 -3
  304. package/dist/ui/responsive-dialog.d.ts +1 -1
  305. package/dist/ui/responsive-dialog.js +4 -21
  306. package/dist/ui/rich-tooltip.d.ts +10 -4
  307. package/dist/ui/rich-tooltip.js +81 -33
  308. package/dist/ui/scroll-area.d.ts +1 -1
  309. package/dist/ui/scroll-area.js +43 -28
  310. package/dist/ui/sidebar-menu.d.ts +5 -1
  311. package/dist/ui/sidebar-menu.js +34 -34
  312. package/dist/ui/sidebar-provider.d.ts +10 -1
  313. package/dist/ui/sidebar-provider.js +38 -13
  314. package/dist/ui/sidebar-resize-rail.js +7 -3
  315. package/dist/ui/sidebar.d.ts +11 -6
  316. package/dist/ui/sidebar.js +48 -24
  317. package/dist/ui/slider.js +31 -22
  318. package/dist/ui/spinner.d.ts +3 -2
  319. package/dist/ui/spinner.js +3 -2
  320. package/dist/ui/stepper.d.ts +8 -1
  321. package/dist/ui/stepper.js +74 -25
  322. package/dist/ui/switch.d.ts +1 -0
  323. package/dist/ui/table-of-contents.d.ts +2 -2
  324. package/dist/ui/table-of-contents.js +20 -8
  325. package/dist/ui/table.js +4 -2
  326. package/dist/ui/textarea.d.ts +1 -1
  327. package/dist/ui/textarea.js +20 -9
  328. package/dist/ui/timeline.d.ts +3 -1
  329. package/dist/ui/timeline.js +17 -9
  330. package/dist/ui/toast.d.ts +11 -5
  331. package/dist/ui/toast.js +100 -54
  332. package/dist/ui/toolbar.d.ts +2 -1
  333. package/dist/ui/toolbar.js +3 -1
  334. package/dist/ui/tooltip.js +3 -20
  335. package/dist/ui/tree.js +120 -80
  336. package/dist/ui/trigger-menu.js +1 -0
  337. package/dist/user-ask.d.ts +10 -5
  338. package/dist/user-ask.js +31 -11
  339. package/package.json +5 -1
  340. package/dist/hooks/use-keyboard-navigation.d.ts +0 -3
  341. package/dist/hooks/use-keyboard-navigation.js +0 -22
@@ -1,6 +1,19 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Body, Button, Column, Container, Head, Heading, Hr, Html, Link, Preview, Row, Section, Tailwind, Text, pixelBasedPreset } from "react-email";
3
3
  //#region src/email/email.tsx
4
+ const physicalSides = {
5
+ ltr: {
6
+ start: "left",
7
+ end: "right"
8
+ },
9
+ rtl: {
10
+ start: "right",
11
+ end: "left"
12
+ }
13
+ };
14
+ function emailSides(dir = "ltr") {
15
+ return physicalSides[dir];
16
+ }
4
17
  function surfaceColors(theme, variant) {
5
18
  if (variant === "contained") return theme.colors;
6
19
  return {
@@ -73,8 +86,9 @@ const alignClasses = {
73
86
  center: "text-center",
74
87
  right: "text-right"
75
88
  };
76
- function alignClass(align) {
77
- return align ? alignClasses[align] : "";
89
+ function emailAlignClass(align, dir = "ltr") {
90
+ if (!align) return "";
91
+ return alignClasses[align === "center" ? "center" : emailSides(dir)[align]];
78
92
  }
79
93
  const headingSizeClasses = {
80
94
  display: "text-display",
@@ -89,21 +103,21 @@ const headingSizeForTag = {
89
103
  h3: "heading-3",
90
104
  h4: "heading-4"
91
105
  };
92
- function EmailHeading({ as = "h1", size, align, className = "", ...props }) {
106
+ function EmailHeading({ as = "h1", size, align, dir, className = "", ...props }) {
93
107
  const sizeClass = headingSizeClasses[size ?? headingSizeForTag[as]];
94
108
  return /* @__PURE__ */ jsx(Heading, {
95
109
  ...props,
96
110
  as,
97
- className: `mb-4 mt-0 font-display text-card-foreground ${sizeClass} ${alignClass(align)} ${className}`
111
+ className: `mb-4 mt-0 font-display text-card-foreground ${sizeClass} ${emailAlignClass(align, dir)} ${className}`
98
112
  });
99
113
  }
100
- function EmailSection({ align, className = "", ...props }) {
114
+ function EmailSection({ align, dir, className = "", ...props }) {
101
115
  return /* @__PURE__ */ jsx(Section, {
102
116
  ...props,
103
- className: `${alignClass(align)} ${className}`
117
+ className: `${emailAlignClass(align, dir)} ${className}`
104
118
  });
105
119
  }
106
- function EmailText({ tone = "default", align, className = "", style, ...props }) {
120
+ function EmailText({ tone = "default", align, dir, className = "", style, ...props }) {
107
121
  const textColor = tone === "muted" ? "text-muted-foreground" : "text-card-foreground";
108
122
  return /* @__PURE__ */ jsx(Text, {
109
123
  ...props,
@@ -111,7 +125,7 @@ function EmailText({ tone = "default", align, className = "", style, ...props })
111
125
  overflowWrap: "break-word",
112
126
  ...style
113
127
  },
114
- className: `mb-4 mt-0 font-body text-body ${textColor} ${alignClass(align)} ${className}`
128
+ className: `mb-4 mt-0 font-body text-body ${textColor} ${emailAlignClass(align, dir)} ${className}`
115
129
  });
116
130
  }
117
131
  function EmailButton({ width = "auto", className = "", ...props }) {
@@ -127,11 +141,11 @@ function EmailLink({ className = "", ...props }) {
127
141
  className: `font-body text-primary-text underline ${className}`
128
142
  });
129
143
  }
130
- function EmailCaption({ className = "", ...props }) {
144
+ function EmailCaption({ eyebrow = false, className = "", ...props }) {
131
145
  return /* @__PURE__ */ jsx(EmailText, {
132
146
  tone: "muted",
133
147
  ...props,
134
- className: `text-caption ${className}`
148
+ className: `text-caption ${eyebrow ? "uppercase tracking-[0.08em]" : ""} ${className}`
135
149
  });
136
150
  }
137
151
  function EmailMutedLink({ className = "", ...props }) {
@@ -161,33 +175,43 @@ function EmailOneTimeCode({ children, className = "" }) {
161
175
  })
162
176
  });
163
177
  }
164
- function EmailBulletList({ items, className = "" }) {
178
+ const listIndentClasses = {
179
+ left: "pl-5",
180
+ right: "pr-5"
181
+ };
182
+ function EmailBulletList({ items, dir, className = "" }) {
165
183
  if (items.length === 0) return null;
166
184
  return /* @__PURE__ */ jsx("ul", {
167
- className: `mb-4 mt-0 list-disc pl-5 font-body text-body text-card-foreground ${className}`,
185
+ className: `mb-4 mt-0 list-disc ${listIndentClasses[emailSides(dir).start]} font-body text-body text-card-foreground ${className}`,
168
186
  children: items.map((item, index) => /* @__PURE__ */ jsx("li", {
169
187
  className: "mb-1 font-body text-body text-card-foreground",
170
188
  children: item
171
189
  }, index))
172
190
  });
173
191
  }
174
- function EmailColumns({ children, widths, gap = 20, verticalAlign = "top", className = "" }) {
192
+ function EmailColumns({ children, widths, gap = 20, verticalAlign = "top", dir, className = "" }) {
193
+ const sides = emailSides(dir);
175
194
  if (children.length === 0) return null;
176
195
  const evenWidth = `${(100 / children.length).toFixed(4)}%`;
177
196
  return /* @__PURE__ */ jsx(Row, {
178
197
  className: `mb-6 table-fixed ${className}`,
179
- children: children.map((child, index) => /* @__PURE__ */ jsx(Column, {
180
- width: widths?.[index] ?? evenWidth,
181
- className: `max-[480px]:block max-[480px]:w-full max-[480px]:pl-0 ${index === 0 ? "" : `max-[480px]:pt-[${gap}px]`}`,
182
- style: {
183
- verticalAlign,
184
- paddingLeft: index === 0 ? 0 : gap
185
- },
186
- children: child
187
- }, index))
198
+ children: children.map((child, index) => {
199
+ const inset = index === 0 ? 0 : gap;
200
+ return /* @__PURE__ */ jsx(Column, {
201
+ width: widths?.[index] ?? evenWidth,
202
+ className: `max-[480px]:block max-[480px]:w-full max-[480px]:px-0 ${index === 0 ? "" : `max-[480px]:pt-[${gap}px]`}`,
203
+ style: {
204
+ verticalAlign,
205
+ ...sides.start === "left" ? { paddingLeft: inset } : { paddingRight: inset }
206
+ },
207
+ children: child
208
+ }, index);
209
+ })
188
210
  });
189
211
  }
190
- function EmailDetailRow({ label, value, emphasis = false }) {
212
+ function EmailDetailRow({ label, value, emphasis = false, dir }) {
213
+ const sides = emailSides(dir);
214
+ const valueWeight = emphasis ? "font-semibold" : "";
191
215
  return /* @__PURE__ */ jsxs(Row, {
192
216
  className: "table-fixed",
193
217
  children: [/* @__PURE__ */ jsx(Column, {
@@ -197,14 +221,14 @@ function EmailDetailRow({ label, value, emphasis = false }) {
197
221
  children: label
198
222
  })
199
223
  }), /* @__PURE__ */ jsx(Column, {
200
- align: "right",
224
+ align: sides.end,
201
225
  className: "align-top",
202
226
  children: /* @__PURE__ */ jsx(EmailText, {
203
- className: `mb-2 ${emphasis ? "font-semibold" : ""}`,
227
+ className: `mb-2 ${valueWeight}`,
204
228
  children: value
205
229
  })
206
230
  })]
207
231
  });
208
232
  }
209
233
  //#endregion
210
- export { EmailBulletList, EmailButton, EmailCaption, EmailColumns, EmailDetailRow, EmailDivider, EmailHeading, EmailLayout, EmailLink, EmailMutedLink, EmailOneTimeCode, EmailPanel, EmailSection, EmailText, surfaceColors };
234
+ export { EmailBulletList, EmailButton, EmailCaption, EmailColumns, EmailDetailRow, EmailDivider, EmailHeading, EmailLayout, EmailLink, EmailMutedLink, EmailOneTimeCode, EmailPanel, EmailSection, EmailText, emailAlignClass, emailSides, surfaceColors };
@@ -1,5 +1,5 @@
1
1
  import { EmailTheme } from "./theme.js";
2
- import { EmailVariant } from "./email.js";
2
+ import { EmailDirection, EmailVariant } from "./email.js";
3
3
  import { EmailBrand, EmailFooterContent } from "./email-brand.js";
4
4
  import { ReactNode } from "react";
5
5
  import { PrismLanguage } from "react-email";
@@ -10,6 +10,7 @@ type EmailMessageProps = {
10
10
  footer: EmailFooterContent;
11
11
  variant?: EmailVariant;
12
12
  head?: ReactNode;
13
+ dir?: EmailDirection;
13
14
  };
14
15
  type EmailBrandProps = EmailMessageProps & {
15
16
  browserUrl?: string;
@@ -18,12 +19,12 @@ export type EmailHighlight = {
18
19
  title: string;
19
20
  description: string;
20
21
  };
21
- export declare function InvitationEmail({ theme, variant, head, brand, browserUrl, footer, inviter, workspace, inviteUrl }: EmailBrandProps & {
22
+ export declare function InvitationEmail({ theme, variant, head, dir, brand, browserUrl, footer, inviter, workspace, inviteUrl }: EmailBrandProps & {
22
23
  inviter: string;
23
24
  workspace: string;
24
25
  inviteUrl: string;
25
26
  }): import("react").JSX.Element;
26
- export declare function ProductEmail({ theme, variant, head, brand, browserUrl, footer, title, description, imageUrl, imageAlt, highlights, actionUrl }: EmailBrandProps & {
27
+ export declare function ProductEmail({ theme, variant, head, dir, brand, browserUrl, footer, title, description, imageUrl, imageAlt, highlights, actionUrl }: EmailBrandProps & {
27
28
  title: string;
28
29
  description: string;
29
30
  imageUrl: string;
@@ -31,7 +32,7 @@ export declare function ProductEmail({ theme, variant, head, brand, browserUrl,
31
32
  highlights?: EmailHighlight[];
32
33
  actionUrl: string;
33
34
  }): import("react").JSX.Element;
34
- export declare function EditorialEmail({ theme, variant, head, brand, browserUrl, footer, title, description, imageUrl, imageAlt, articleUrl }: EmailBrandProps & {
35
+ export declare function EditorialEmail({ theme, variant, head, dir, brand, browserUrl, footer, title, description, imageUrl, imageAlt, articleUrl }: EmailBrandProps & {
35
36
  title: string;
36
37
  description: string;
37
38
  imageUrl: string;
@@ -45,10 +46,10 @@ export type EmailArticle = {
45
46
  imageUrl: string;
46
47
  imageAlt: string;
47
48
  };
48
- export declare function NewsletterEmail({ theme, variant, head, brand, browserUrl, footer, articles }: EmailBrandProps & {
49
+ export declare function NewsletterEmail({ theme, variant, head, dir, brand, browserUrl, footer, articles }: EmailBrandProps & {
49
50
  articles: EmailArticle[];
50
51
  }): import("react").JSX.Element;
51
- export declare function SummaryEmail({ theme, variant, head, brand, browserUrl, footer, period, metrics, details, dashboardUrl }: EmailBrandProps & {
52
+ export declare function SummaryEmail({ theme, variant, head, dir, brand, browserUrl, footer, period, metrics, details, dashboardUrl }: EmailBrandProps & {
52
53
  period: string;
53
54
  metrics: {
54
55
  label: string;
@@ -60,7 +61,7 @@ export declare function SummaryEmail({ theme, variant, head, brand, browserUrl,
60
61
  }[];
61
62
  dashboardUrl: string;
62
63
  }): import("react").JSX.Element;
63
- export declare function VerificationEmail({ theme, variant, head, brand, footer, code, expiresInMinutes, supportUrl }: EmailMessageProps & {
64
+ export declare function VerificationEmail({ theme, variant, head, dir, brand, footer, code, expiresInMinutes, supportUrl }: EmailMessageProps & {
64
65
  code: string;
65
66
  expiresInMinutes: number;
66
67
  supportUrl: string;
@@ -69,7 +70,7 @@ export type EmailReceiptLine = {
69
70
  label: string;
70
71
  value: string;
71
72
  };
72
- export declare function ReceiptEmail({ theme, variant, head, brand, footer, orderNumber, orderDate, lines, total, paymentMethod, invoiceUrl }: EmailMessageProps & {
73
+ export declare function ReceiptEmail({ theme, variant, head, dir, brand, footer, orderNumber, orderDate, lines, total, paymentMethod, invoiceUrl }: EmailMessageProps & {
73
74
  orderNumber: string;
74
75
  orderDate: string;
75
76
  lines: EmailReceiptLine[];
@@ -81,7 +82,7 @@ export type EmailReleaseSection = {
81
82
  title: string;
82
83
  changes: string[];
83
84
  };
84
- export declare function ReleaseNotesEmail({ theme, variant, head, brand, browserUrl, footer, version, summary, sections, migration, changelogUrl }: EmailBrandProps & {
85
+ export declare function ReleaseNotesEmail({ theme, variant, head, dir, brand, browserUrl, footer, version, summary, sections, migration, changelogUrl }: EmailBrandProps & {
85
86
  version: string;
86
87
  summary: string;
87
88
  sections: EmailReleaseSection[];
@@ -4,12 +4,16 @@ import { EmailCodeBlock, EmailInlineCode, EmailMarkdown } from "./email-code.js"
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { Column, Img, Row } from "react-email";
6
6
  //#region src/email/templates.tsx
7
- function InvitationEmail({ theme, variant, head, brand, browserUrl, footer, inviter, workspace, inviteUrl }) {
7
+ function InvitationEmail({ theme, variant, head, dir, brand, browserUrl, footer, inviter, workspace, inviteUrl }) {
8
8
  const layout = {
9
9
  theme,
10
10
  variant,
11
11
  head,
12
- footer: /* @__PURE__ */ jsx(EmailBrandFooter, { footer }),
12
+ dir,
13
+ footer: /* @__PURE__ */ jsx(EmailBrandFooter, {
14
+ footer,
15
+ dir
16
+ }),
13
17
  footerPlacement: footer.placement
14
18
  };
15
19
  return /* @__PURE__ */ jsxs(EmailLayout, {
@@ -17,6 +21,7 @@ function InvitationEmail({ theme, variant, head, brand, browserUrl, footer, invi
17
21
  preview: `${inviter} invited you to ${workspace}`,
18
22
  children: [
19
23
  /* @__PURE__ */ jsx(EmailBrandHeader, {
24
+ dir,
20
25
  brand,
21
26
  browserUrl,
22
27
  colorScheme: theme.colorScheme
@@ -43,12 +48,16 @@ function InvitationEmail({ theme, variant, head, brand, browserUrl, footer, invi
43
48
  ]
44
49
  });
45
50
  }
46
- function ProductEmail({ theme, variant, head, brand, browserUrl, footer, title, description, imageUrl, imageAlt, highlights = [], actionUrl }) {
51
+ function ProductEmail({ theme, variant, head, dir, brand, browserUrl, footer, title, description, imageUrl, imageAlt, highlights = [], actionUrl }) {
47
52
  const layout = {
48
53
  theme,
49
54
  variant,
50
55
  head,
51
- footer: /* @__PURE__ */ jsx(EmailBrandFooter, { footer }),
56
+ dir,
57
+ footer: /* @__PURE__ */ jsx(EmailBrandFooter, {
58
+ footer,
59
+ dir
60
+ }),
52
61
  footerPlacement: footer.placement
53
62
  };
54
63
  return /* @__PURE__ */ jsxs(EmailLayout, {
@@ -56,15 +65,17 @@ function ProductEmail({ theme, variant, head, brand, browserUrl, footer, title,
56
65
  preview: title,
57
66
  children: [
58
67
  /* @__PURE__ */ jsx(EmailBrandHeader, {
68
+ dir,
59
69
  brand,
60
70
  browserUrl,
61
71
  colorScheme: theme.colorScheme,
62
72
  align: "center"
63
73
  }),
64
74
  /* @__PURE__ */ jsx(EmailCaption, {
75
+ eyebrow: true,
65
76
  align: "center",
66
77
  className: "mb-6",
67
- children: "ANNOUNCEMENT"
78
+ children: "Announcement"
68
79
  }),
69
80
  /* @__PURE__ */ jsx(Img, {
70
81
  src: imageUrl,
@@ -81,19 +92,22 @@ function ProductEmail({ theme, variant, head, brand, browserUrl, footer, title,
81
92
  align: "center",
82
93
  children: description
83
94
  }),
84
- /* @__PURE__ */ jsx(EmailColumns, { children: highlights.map((highlight) => /* @__PURE__ */ jsxs(EmailSection, {
85
- align: "center",
86
- children: [/* @__PURE__ */ jsx(EmailHeading, {
87
- as: "h4",
95
+ /* @__PURE__ */ jsx(EmailColumns, {
96
+ dir,
97
+ children: highlights.map((highlight) => /* @__PURE__ */ jsxs(EmailSection, {
88
98
  align: "center",
89
- className: "mb-1",
90
- children: highlight.title
91
- }), /* @__PURE__ */ jsx(EmailCaption, {
92
- align: "center",
93
- className: "mb-0",
94
- children: highlight.description
95
- })]
96
- }, highlight.title)) }),
99
+ children: [/* @__PURE__ */ jsx(EmailHeading, {
100
+ as: "h4",
101
+ align: "center",
102
+ className: "mb-1",
103
+ children: highlight.title
104
+ }), /* @__PURE__ */ jsx(EmailCaption, {
105
+ align: "center",
106
+ className: "mb-0",
107
+ children: highlight.description
108
+ })]
109
+ }, highlight.title))
110
+ }),
97
111
  /* @__PURE__ */ jsx(EmailSection, {
98
112
  align: "center",
99
113
  children: /* @__PURE__ */ jsx(EmailButton, {
@@ -104,12 +118,16 @@ function ProductEmail({ theme, variant, head, brand, browserUrl, footer, title,
104
118
  ]
105
119
  });
106
120
  }
107
- function EditorialEmail({ theme, variant, head, brand, browserUrl, footer, title, description, imageUrl, imageAlt, articleUrl }) {
121
+ function EditorialEmail({ theme, variant, head, dir, brand, browserUrl, footer, title, description, imageUrl, imageAlt, articleUrl }) {
108
122
  const layout = {
109
123
  theme,
110
124
  variant,
111
125
  head,
112
- footer: /* @__PURE__ */ jsx(EmailBrandFooter, { footer }),
126
+ dir,
127
+ footer: /* @__PURE__ */ jsx(EmailBrandFooter, {
128
+ footer,
129
+ dir
130
+ }),
113
131
  footerPlacement: footer.placement
114
132
  };
115
133
  return /* @__PURE__ */ jsxs(EmailLayout, {
@@ -117,19 +135,22 @@ function EditorialEmail({ theme, variant, head, brand, browserUrl, footer, title
117
135
  preview: title,
118
136
  children: [
119
137
  /* @__PURE__ */ jsx(EmailBrandHeader, {
138
+ dir,
120
139
  brand,
121
140
  browserUrl,
122
141
  colorScheme: theme.colorScheme
123
142
  }),
124
143
  /* @__PURE__ */ jsx(EmailCaption, {
144
+ eyebrow: true,
125
145
  className: "mb-6",
126
- children: "IN GOOD COMPANY"
146
+ children: "In good company"
127
147
  }),
128
148
  /* @__PURE__ */ jsx(EmailHeading, {
129
149
  size: "heading-2",
130
150
  children: "Fresh perspectives."
131
151
  }),
132
152
  /* @__PURE__ */ jsxs(EmailColumns, {
153
+ dir,
133
154
  widths: ["36%", "64%"],
134
155
  children: [/* @__PURE__ */ jsx(Img, {
135
156
  src: imageUrl,
@@ -143,21 +164,29 @@ function EditorialEmail({ theme, variant, head, brand, browserUrl, footer, title
143
164
  children: title
144
165
  }),
145
166
  /* @__PURE__ */ jsx(EmailText, { children: description }),
146
- /* @__PURE__ */ jsx(EmailLink, {
167
+ /* @__PURE__ */ jsxs(EmailLink, {
147
168
  href: articleUrl,
148
- children: "Read the story"
169
+ children: [
170
+ "Read “",
171
+ title,
172
+ "”"
173
+ ]
149
174
  })
150
175
  ] })]
151
176
  })
152
177
  ]
153
178
  });
154
179
  }
155
- function NewsletterEmail({ theme, variant, head, brand, browserUrl, footer, articles }) {
180
+ function NewsletterEmail({ theme, variant, head, dir, brand, browserUrl, footer, articles }) {
156
181
  const layout = {
157
182
  theme,
158
183
  variant,
159
184
  head,
160
- footer: /* @__PURE__ */ jsx(EmailBrandFooter, { footer }),
185
+ dir,
186
+ footer: /* @__PURE__ */ jsx(EmailBrandFooter, {
187
+ footer,
188
+ dir
189
+ }),
161
190
  footerPlacement: footer.placement
162
191
  };
163
192
  return /* @__PURE__ */ jsxs(EmailLayout, {
@@ -165,15 +194,17 @@ function NewsletterEmail({ theme, variant, head, brand, browserUrl, footer, arti
165
194
  preview: "A few things worth making time for.",
166
195
  children: [
167
196
  /* @__PURE__ */ jsx(EmailBrandHeader, {
197
+ dir,
168
198
  brand,
169
199
  browserUrl,
170
200
  colorScheme: theme.colorScheme,
171
201
  align: "center"
172
202
  }),
173
203
  /* @__PURE__ */ jsx(EmailCaption, {
204
+ eyebrow: true,
174
205
  align: "center",
175
206
  className: "mb-6",
176
- children: "THE WEEKLY EDIT"
207
+ children: "The weekly edit"
177
208
  }),
178
209
  /* @__PURE__ */ jsx(EmailHeading, {
179
210
  align: "center",
@@ -199,21 +230,29 @@ function NewsletterEmail({ theme, variant, head, brand, browserUrl, footer, arti
199
230
  children: article.title
200
231
  }),
201
232
  /* @__PURE__ */ jsx(EmailText, { children: article.description }),
202
- /* @__PURE__ */ jsx(EmailLink, {
233
+ /* @__PURE__ */ jsxs(EmailLink, {
203
234
  href: article.href,
204
- children: "Read the story"
235
+ children: [
236
+ "Read “",
237
+ article.title,
238
+ "”"
239
+ ]
205
240
  })
206
241
  ]
207
242
  }, article.href))
208
243
  ]
209
244
  });
210
245
  }
211
- function SummaryEmail({ theme, variant, head, brand, browserUrl, footer, period, metrics, details, dashboardUrl }) {
246
+ function SummaryEmail({ theme, variant, head, dir, brand, browserUrl, footer, period, metrics, details, dashboardUrl }) {
212
247
  const layout = {
213
248
  theme,
214
249
  variant,
215
250
  head,
216
- footer: /* @__PURE__ */ jsx(EmailBrandFooter, { footer }),
251
+ dir,
252
+ footer: /* @__PURE__ */ jsx(EmailBrandFooter, {
253
+ footer,
254
+ dir
255
+ }),
217
256
  footerPlacement: footer.placement
218
257
  };
219
258
  return /* @__PURE__ */ jsxs(EmailLayout, {
@@ -221,6 +260,7 @@ function SummaryEmail({ theme, variant, head, brand, browserUrl, footer, period,
221
260
  preview: `Your team’s progress · ${period}`,
222
261
  children: [
223
262
  /* @__PURE__ */ jsx(EmailBrandHeader, {
263
+ dir,
224
264
  brand,
225
265
  browserUrl,
226
266
  colorScheme: theme.colorScheme
@@ -253,6 +293,7 @@ function SummaryEmail({ theme, variant, head, brand, browserUrl, footer, period,
253
293
  })
254
294
  }),
255
295
  details.map((detail) => /* @__PURE__ */ jsx(EmailDetailRow, {
296
+ dir,
256
297
  label: detail.label,
257
298
  value: detail.value
258
299
  }, detail.label)),
@@ -264,12 +305,16 @@ function SummaryEmail({ theme, variant, head, brand, browserUrl, footer, period,
264
305
  ]
265
306
  });
266
307
  }
267
- function VerificationEmail({ theme, variant, head, brand, footer, code, expiresInMinutes, supportUrl }) {
308
+ function VerificationEmail({ theme, variant, head, dir, brand, footer, code, expiresInMinutes, supportUrl }) {
268
309
  const layout = {
269
310
  theme,
270
311
  variant,
271
312
  head,
272
- footer: /* @__PURE__ */ jsx(EmailBrandFooter, { footer }),
313
+ dir,
314
+ footer: /* @__PURE__ */ jsx(EmailBrandFooter, {
315
+ footer,
316
+ dir
317
+ }),
273
318
  footerPlacement: footer.placement
274
319
  };
275
320
  return /* @__PURE__ */ jsxs(EmailLayout, {
@@ -277,6 +322,7 @@ function VerificationEmail({ theme, variant, head, brand, footer, code, expiresI
277
322
  preview: `${code} is your verification code`,
278
323
  children: [
279
324
  /* @__PURE__ */ jsx(EmailBrandHeader, {
325
+ dir,
280
326
  brand,
281
327
  colorScheme: theme.colorScheme,
282
328
  align: "center"
@@ -315,12 +361,16 @@ function VerificationEmail({ theme, variant, head, brand, footer, code, expiresI
315
361
  ]
316
362
  });
317
363
  }
318
- function ReceiptEmail({ theme, variant, head, brand, footer, orderNumber, orderDate, lines, total, paymentMethod, invoiceUrl }) {
364
+ function ReceiptEmail({ theme, variant, head, dir, brand, footer, orderNumber, orderDate, lines, total, paymentMethod, invoiceUrl }) {
319
365
  const layout = {
320
366
  theme,
321
367
  variant,
322
368
  head,
323
- footer: /* @__PURE__ */ jsx(EmailBrandFooter, { footer }),
369
+ dir,
370
+ footer: /* @__PURE__ */ jsx(EmailBrandFooter, {
371
+ footer,
372
+ dir
373
+ }),
324
374
  footerPlacement: footer.placement
325
375
  };
326
376
  return /* @__PURE__ */ jsxs(EmailLayout, {
@@ -328,12 +378,14 @@ function ReceiptEmail({ theme, variant, head, brand, footer, orderNumber, orderD
328
378
  preview: `Receipt ${orderNumber} · ${total}`,
329
379
  children: [
330
380
  /* @__PURE__ */ jsx(EmailBrandHeader, {
381
+ dir,
331
382
  brand,
332
383
  colorScheme: theme.colorScheme
333
384
  }),
334
385
  /* @__PURE__ */ jsx(EmailCaption, {
386
+ eyebrow: true,
335
387
  className: "mb-6",
336
- children: "RECEIPT"
388
+ children: "Receipt"
337
389
  }),
338
390
  /* @__PURE__ */ jsx(EmailHeading, {
339
391
  size: "heading-3",
@@ -348,11 +400,13 @@ function ReceiptEmail({ theme, variant, head, brand, footer, orderNumber, orderD
348
400
  ] }),
349
401
  /* @__PURE__ */ jsxs(EmailPanel, { children: [
350
402
  lines.map((line) => /* @__PURE__ */ jsx(EmailDetailRow, {
403
+ dir,
351
404
  label: line.label,
352
405
  value: line.value
353
406
  }, line.label)),
354
407
  /* @__PURE__ */ jsx(EmailDivider, { className: "my-3" }),
355
408
  /* @__PURE__ */ jsx(EmailDetailRow, {
409
+ dir,
356
410
  label: "Total",
357
411
  value: total,
358
412
  emphasis: true
@@ -373,12 +427,16 @@ function ReceiptEmail({ theme, variant, head, brand, footer, orderNumber, orderD
373
427
  ]
374
428
  });
375
429
  }
376
- function ReleaseNotesEmail({ theme, variant, head, brand, browserUrl, footer, version, summary, sections, migration, changelogUrl }) {
430
+ function ReleaseNotesEmail({ theme, variant, head, dir, brand, browserUrl, footer, version, summary, sections, migration, changelogUrl }) {
377
431
  const layout = {
378
432
  theme,
379
433
  variant,
380
434
  head,
381
- footer: /* @__PURE__ */ jsx(EmailBrandFooter, { footer }),
435
+ dir,
436
+ footer: /* @__PURE__ */ jsx(EmailBrandFooter, {
437
+ footer,
438
+ dir
439
+ }),
382
440
  footerPlacement: footer.placement
383
441
  };
384
442
  return /* @__PURE__ */ jsxs(EmailLayout, {
@@ -386,13 +444,15 @@ function ReleaseNotesEmail({ theme, variant, head, brand, browserUrl, footer, ve
386
444
  preview: `What shipped in ${version}`,
387
445
  children: [
388
446
  /* @__PURE__ */ jsx(EmailBrandHeader, {
447
+ dir,
389
448
  brand,
390
449
  browserUrl,
391
450
  colorScheme: theme.colorScheme
392
451
  }),
393
452
  /* @__PURE__ */ jsxs(EmailCaption, {
453
+ eyebrow: true,
394
454
  className: "mb-6",
395
- children: ["RELEASE ", version]
455
+ children: ["Release ", version]
396
456
  }),
397
457
  /* @__PURE__ */ jsx(EmailHeading, {
398
458
  size: "heading-2",
@@ -404,11 +464,15 @@ function ReleaseNotesEmail({ theme, variant, head, brand, browserUrl, footer, ve
404
464
  children: [/* @__PURE__ */ jsx(EmailHeading, {
405
465
  as: "h3",
406
466
  children: section.title
407
- }), /* @__PURE__ */ jsx(EmailBulletList, { items: section.changes })]
467
+ }), /* @__PURE__ */ jsx(EmailBulletList, {
468
+ dir,
469
+ items: section.changes
470
+ })]
408
471
  }, section.title)),
409
472
  migration ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(EmailMarkdown, {
410
473
  theme,
411
474
  variant,
475
+ dir,
412
476
  children: migration.notes
413
477
  }), /* @__PURE__ */ jsx(EmailCodeBlock, {
414
478
  theme,
@@ -1,5 +1,5 @@
1
- import { emailLengthPixels } from "./length.js";
2
1
  import { composite, resolveColor, tokenMaps } from "../scripts/contrast-eval.js";
2
+ import { emailLengthPixels } from "./length.js";
3
3
  //#region src/email/theme.ts
4
4
  function resolveVariables(value, tokens, chain = []) {
5
5
  if (chain.length > 16) throw new Error(`Email theme: token chain exceeds 16 references (${chain.join(" → ")}).`);
@@ -23,11 +23,12 @@ export type EnvironmentVariablesRootProps<TRow extends EnvironmentVariableRow =
23
23
  keyPlaceholder?: string;
24
24
  valuePlaceholder?: string;
25
25
  duplicateKeyMessage?: ReactNode;
26
+ revealValueLabel?: (key: string) => string;
26
27
  onSubmit?: (payload: EnvironmentVariablesSubmitPayload<TRow>) => void | Promise<void>;
27
28
  } & {
28
29
  style?: CSSProperties & EnvironmentVariablesKnobStyle;
29
30
  };
30
- export declare function EnvironmentVariablesRoot<TRow extends EnvironmentVariableRow = EnvironmentVariableRow>({ editor, disabled, readOnly, rowErrors, keyLabel, valueLabel, keyPlaceholder, valuePlaceholder, duplicateKeyMessage, onSubmit, className, children, ...props }: EnvironmentVariablesRootProps<TRow>): import("react").JSX.Element;
31
+ export declare function EnvironmentVariablesRoot<TRow extends EnvironmentVariableRow = EnvironmentVariableRow>({ editor, disabled, readOnly, rowErrors, keyLabel, valueLabel, keyPlaceholder, valuePlaceholder, duplicateKeyMessage, revealValueLabel, onSubmit, className, children, ...props }: EnvironmentVariablesRootProps<TRow>): import("react").JSX.Element;
31
32
  export type EnvironmentVariablesProps<TRow extends EnvironmentVariableRow = EnvironmentVariableRow> = Omit<EnvironmentVariablesRootProps<TRow>, "editor"> & UseEnvironmentVariablesOptions<TRow> & {
32
33
  editor?: EnvironmentVariablesController<TRow>;
33
34
  title?: ReactNode;
@@ -100,9 +101,10 @@ export type EnvironmentVariablesReadOnlyItemProps = Omit<ComponentProps<"div">,
100
101
  name: ReactNode;
101
102
  value?: ReactNode;
102
103
  revealed?: boolean;
104
+ hiddenValueLabel?: string;
103
105
  style?: CSSProperties & EnvironmentVariablesKnobStyle;
104
106
  };
105
- export declare function EnvironmentVariablesReadOnlyItem({ name, value, revealed, className, ...props }: EnvironmentVariablesReadOnlyItemProps): import("react").JSX.Element;
107
+ export declare function EnvironmentVariablesReadOnlyItem({ name, value, revealed, hiddenValueLabel, className, ...props }: EnvironmentVariablesReadOnlyItemProps): import("react").JSX.Element;
106
108
  export declare const EnvironmentVariables: typeof EnvironmentVariablesComponent & {
107
109
  Root: typeof EnvironmentVariablesRoot;
108
110
  Header: typeof EnvironmentVariablesHeader;