@ctrl-ui/react 0.8.2 → 0.8.5

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 (417) hide show
  1. package/README.md +32 -23
  2. package/dist/action-bar.d.ts +11 -12
  3. package/dist/activity.d.ts +24 -25
  4. package/dist/audio-recorder.d.ts +16 -16
  5. package/dist/audio-visualizer.d.ts +3 -4
  6. package/dist/audio-visualizer.js +1 -1
  7. package/dist/blocks/chat.d.ts +3 -4
  8. package/dist/blocks/chat.js +6 -3
  9. package/dist/blocks/coding-agent.d.ts +11 -12
  10. package/dist/blocks/coding-agent.js +10 -9
  11. package/dist/blocks/file-explorer-data.d.ts +11 -12
  12. package/dist/blocks/file-explorer.d.ts +3 -3
  13. package/dist/blocks/settings-data.d.ts +8 -9
  14. package/dist/blocks/settings.d.ts +4 -4
  15. package/dist/blocks/theme-toggle.d.ts +11 -12
  16. package/dist/blocks/theme-toggle.js +14 -4
  17. package/dist/chat-composer-attachment.d.ts +20 -21
  18. package/dist/chat-composer-attachment.js +24 -20
  19. package/dist/chat-composer-editor/extensions/mention.d.ts +5 -6
  20. package/dist/chat-composer-editor/extensions/mention.js +4 -0
  21. package/dist/chat-composer-editor/ghost.d.ts +3 -4
  22. package/dist/chat-composer-editor/schema.d.ts +2 -3
  23. package/dist/chat-composer-editor/serialize.d.ts +3 -4
  24. package/dist/chat-composer-editor/types.d.ts +5 -6
  25. package/dist/chat-composer-editor.d.ts +2 -3
  26. package/dist/chat-composer-editor.js +18 -4
  27. package/dist/chat-composer.d.ts +17 -18
  28. package/dist/chat-composer.js +14 -8
  29. package/dist/chat-layout.d.ts +17 -21
  30. package/dist/chat-layout.js +72 -86
  31. package/dist/chat-message.d.ts +19 -15
  32. package/dist/chat-message.js +19 -2
  33. package/dist/context-model.d.ts +7 -8
  34. package/dist/context.d.ts +21 -22
  35. package/dist/context.js +0 -2
  36. package/dist/control-props.d.ts +10 -11
  37. package/dist/control-variants.d.ts +6 -7
  38. package/dist/dynamic-notification-glass.d.ts +3 -4
  39. package/dist/dynamic-notification-liquid.d.ts +3 -4
  40. package/dist/dynamic-notification-siri-wave.d.ts +2 -3
  41. package/dist/dynamic-notification.d.ts +28 -29
  42. package/dist/email/email-brand.d.ts +60 -0
  43. package/dist/email/email-brand.js +101 -0
  44. package/dist/email/email-code.d.ts +18 -0
  45. package/dist/email/email-code.js +172 -0
  46. package/dist/email/email-footer.d.ts +63 -0
  47. package/dist/email/email-footer.js +98 -0
  48. package/dist/email/email.d.ts +62 -14
  49. package/dist/email/email.js +155 -24
  50. package/dist/email/length.d.ts +2 -3
  51. package/dist/email/templates.d.ts +56 -12
  52. package/dist/email/templates.js +314 -116
  53. package/dist/email/theme.d.ts +15 -8
  54. package/dist/email/theme.js +30 -8
  55. package/dist/environment-variables.d.ts +35 -36
  56. package/dist/extensions/create-track-highlight.d.ts +3 -4
  57. package/dist/extensions/supports-anchor-transitions.d.ts +2 -3
  58. package/dist/extensions/track-highlight.d.ts +3 -4
  59. package/dist/hooks/use-audio-recorder.d.ts +14 -15
  60. package/dist/hooks/use-chat-composer.d.ts +5 -6
  61. package/dist/hooks/use-chat-message.d.ts +8 -8
  62. package/dist/hooks/use-chat-message.js +1 -0
  63. package/dist/hooks/use-chat-thread-scroll.d.ts +8 -0
  64. package/dist/hooks/use-chat-thread-scroll.js +66 -0
  65. package/dist/hooks/use-color-area.d.ts +5 -6
  66. package/dist/hooks/use-copy-to-clipboard.d.ts +7 -8
  67. package/dist/hooks/use-dropzone.d.ts +11 -12
  68. package/dist/hooks/use-dynamic-notification.d.ts +6 -7
  69. package/dist/hooks/use-environment-variables.d.ts +9 -10
  70. package/dist/hooks/use-keyboard-navigation.d.ts +3 -0
  71. package/dist/hooks/use-keyboard-navigation.js +22 -0
  72. package/dist/hooks/use-mobile.d.ts +2 -3
  73. package/dist/hooks/use-textarea-trigger-menu.d.ts +2 -3
  74. package/dist/hooks/use-trigger-menu.d.ts +7 -8
  75. package/dist/hooks/use-user-ask.d.ts +11 -10
  76. package/dist/hooks/use-user-ask.js +56 -17
  77. package/dist/inline-attachment.d.ts +16 -17
  78. package/dist/inline-attachment.js +1 -1
  79. package/dist/inline-citation.d.ts +22 -23
  80. package/dist/knob-contracts/accordion-knobs.d.ts +3 -4
  81. package/dist/knob-contracts/accordion-knobs.js +1 -0
  82. package/dist/knob-contracts/action-bar-knobs.d.ts +3 -4
  83. package/dist/knob-contracts/action-bar-knobs.js +1 -1
  84. package/dist/knob-contracts/activity-knobs.d.ts +3 -4
  85. package/dist/knob-contracts/activity-knobs.js +2 -1
  86. package/dist/knob-contracts/alert-knobs.d.ts +3 -4
  87. package/dist/knob-contracts/alert-knobs.js +12 -1
  88. package/dist/knob-contracts/audio-recorder-knobs.d.ts +3 -4
  89. package/dist/knob-contracts/audio-visualizer-knobs.d.ts +3 -4
  90. package/dist/knob-contracts/audio-visualizer-knobs.js +1 -0
  91. package/dist/knob-contracts/avatar-knobs.d.ts +3 -4
  92. package/dist/knob-contracts/avatar-knobs.js +2 -1
  93. package/dist/knob-contracts/badge-knobs.d.ts +3 -4
  94. package/dist/knob-contracts/button-group-knobs.d.ts +3 -4
  95. package/dist/knob-contracts/button-knobs.d.ts +3 -4
  96. package/dist/knob-contracts/button-knobs.js +1 -0
  97. package/dist/knob-contracts/calendar-knobs.d.ts +3 -4
  98. package/dist/knob-contracts/card-knobs.d.ts +3 -4
  99. package/dist/knob-contracts/chat-composer-attachment-knobs.d.ts +3 -4
  100. package/dist/knob-contracts/chat-composer-attachment-knobs.js +5 -1
  101. package/dist/knob-contracts/chat-composer-knobs.d.ts +3 -4
  102. package/dist/knob-contracts/chat-composer-knobs.js +2 -0
  103. package/dist/knob-contracts/chat-layout-knobs.d.ts +3 -4
  104. package/dist/knob-contracts/chat-layout-knobs.js +2 -2
  105. package/dist/knob-contracts/chat-message-knobs.d.ts +3 -4
  106. package/dist/knob-contracts/chat-message-knobs.js +3 -1
  107. package/dist/knob-contracts/choice-knobs.d.ts +3 -4
  108. package/dist/knob-contracts/choice-knobs.js +2 -1
  109. package/dist/knob-contracts/code-diff-knobs.d.ts +3 -4
  110. package/dist/knob-contracts/code-diff-knobs.js +1 -0
  111. package/dist/knob-contracts/code-knobs.d.ts +3 -4
  112. package/dist/knob-contracts/code-knobs.js +3 -1
  113. package/dist/knob-contracts/collapsible-knobs.d.ts +3 -4
  114. package/dist/knob-contracts/color-picker-knobs.d.ts +3 -4
  115. package/dist/knob-contracts/context-knobs.d.ts +3 -4
  116. package/dist/knob-contracts/context-knobs.js +3 -0
  117. package/dist/knob-contracts/dockable-panel-knobs.d.ts +3 -4
  118. package/dist/knob-contracts/dockable-panel-knobs.js +1 -0
  119. package/dist/knob-contracts/dropzone-knobs.d.ts +3 -4
  120. package/dist/knob-contracts/dropzone-knobs.js +1 -0
  121. package/dist/knob-contracts/dynamic-notification-knobs.d.ts +3 -4
  122. package/dist/knob-contracts/empty-knobs.d.ts +3 -4
  123. package/dist/knob-contracts/empty-knobs.js +14 -1
  124. package/dist/knob-contracts/environment-variables-knobs.d.ts +3 -4
  125. package/dist/knob-contracts/environment-variables-knobs.js +2 -1
  126. package/dist/knob-contracts/field-knobs.d.ts +3 -4
  127. package/dist/knob-contracts/gradient-editor-knobs.d.ts +3 -4
  128. package/dist/knob-contracts/gradient-editor-knobs.js +3 -1
  129. package/dist/knob-contracts/infinite-canvas-knobs.d.ts +3 -4
  130. package/dist/knob-contracts/inline-attachment-knobs.d.ts +3 -4
  131. package/dist/knob-contracts/inline-attachment-knobs.js +6 -1
  132. package/dist/knob-contracts/inline-citation-knobs.d.ts +3 -4
  133. package/dist/knob-contracts/inline-citation-knobs.js +4 -1
  134. package/dist/knob-contracts/item-knobs.d.ts +3 -4
  135. package/dist/knob-contracts/kbd-knobs.d.ts +3 -4
  136. package/dist/knob-contracts/markdown-block-knobs.d.ts +3 -4
  137. package/dist/knob-contracts/markdown-block-knobs.js +2 -0
  138. package/dist/knob-contracts/markdown-knobs.d.ts +3 -4
  139. package/dist/knob-contracts/markdown-knobs.js +1 -0
  140. package/dist/knob-contracts/morphing-panel-knobs.d.ts +3 -4
  141. package/dist/knob-contracts/page-layout-knobs.d.ts +4 -0
  142. package/dist/knob-contracts/page-layout-knobs.js +15 -0
  143. package/dist/knob-contracts/pagination-knobs.d.ts +3 -4
  144. package/dist/knob-contracts/phone-input-knobs.d.ts +3 -4
  145. package/dist/knob-contracts/phone-input-knobs.js +1 -0
  146. package/dist/knob-contracts/popup-knobs.d.ts +3 -4
  147. package/dist/knob-contracts/progressive-blur-knobs.d.ts +3 -4
  148. package/dist/knob-contracts/progressive-blur-knobs.js +1 -0
  149. package/dist/knob-contracts/range-knobs.d.ts +3 -4
  150. package/dist/knob-contracts/resizable-knobs.d.ts +3 -4
  151. package/dist/knob-contracts/resizable-knobs.js +1 -0
  152. package/dist/knob-contracts/rich-tooltip-knobs.d.ts +3 -4
  153. package/dist/knob-contracts/scroll-area-knobs.d.ts +3 -4
  154. package/dist/knob-contracts/separator-knobs.d.ts +3 -4
  155. package/dist/knob-contracts/sidebar-knobs.d.ts +3 -4
  156. package/dist/knob-contracts/sidebar-knobs.js +1 -0
  157. package/dist/knob-contracts/skeleton-knobs.d.ts +3 -4
  158. package/dist/knob-contracts/skeleton-knobs.js +9 -1
  159. package/dist/knob-contracts/source-badge-knobs.d.ts +3 -4
  160. package/dist/knob-contracts/spinner-knobs.d.ts +3 -4
  161. package/dist/knob-contracts/stepper-knobs.d.ts +3 -4
  162. package/dist/knob-contracts/stepper-knobs.js +1 -0
  163. package/dist/knob-contracts/switch-knobs.d.ts +3 -4
  164. package/dist/knob-contracts/switch-knobs.js +7 -1
  165. package/dist/knob-contracts/table-knobs.d.ts +3 -4
  166. package/dist/knob-contracts/table-of-contents-knobs.d.ts +3 -4
  167. package/dist/knob-contracts/table-of-contents-knobs.js +25 -0
  168. package/dist/knob-contracts/tabs-knobs.d.ts +3 -4
  169. package/dist/knob-contracts/tabs-knobs.js +2 -1
  170. package/dist/knob-contracts/task-list-knobs.d.ts +3 -4
  171. package/dist/knob-contracts/task-list-knobs.js +5 -0
  172. package/dist/knob-contracts/thread-rail-knobs.d.ts +3 -4
  173. package/dist/knob-contracts/timeline-knobs.d.ts +3 -4
  174. package/dist/knob-contracts/toolbar-knobs.d.ts +3 -4
  175. package/dist/knob-contracts/toolbar-knobs.js +1 -0
  176. package/dist/knob-contracts/track-highlight-knobs.d.ts +3 -4
  177. package/dist/knob-contracts/transcript-divider-knobs.d.ts +3 -4
  178. package/dist/knob-contracts/tree-knobs.d.ts +3 -4
  179. package/dist/knob-contracts/user-ask-knobs.d.ts +3 -4
  180. package/dist/knob-contracts/user-ask-knobs.js +5 -0
  181. package/dist/lib/cn.d.ts +2 -3
  182. package/dist/lib/code-tokens.d.ts +12 -13
  183. package/dist/lib/color.d.ts +26 -27
  184. package/dist/lib/contrast.d.ts +12 -13
  185. package/dist/lib/diff.d.ts +14 -15
  186. package/dist/lib/dropzone-validation.d.ts +25 -26
  187. package/dist/lib/env-file.d.ts +12 -13
  188. package/dist/lib/format-audio-recorder-duration.d.ts +2 -3
  189. package/dist/lib/liquid-glass-optics.d.ts +2 -3
  190. package/dist/lib/phone-input-format.d.ts +3 -4
  191. package/dist/lib/phone-number.d.ts +8 -9
  192. package/dist/lib/trigger-detect.d.ts +4 -5
  193. package/dist/markdown-block.d.ts +11 -12
  194. package/dist/markdown-block.js +1 -1
  195. package/dist/scripts/contrast-eval.d.ts +16 -17
  196. package/dist/scripts/contrast-eval.js +13 -7
  197. package/dist/skin-provider.d.ts +14 -0
  198. package/dist/skin-provider.js +21 -0
  199. package/dist/skin.d.ts +14 -33
  200. package/dist/skin.js +3 -46
  201. package/dist/source-badge.d.ts +7 -8
  202. package/dist/styles/index.css +3 -5
  203. package/dist/styles/recipes/accordion.css +8 -2
  204. package/dist/styles/recipes/action-bar.css +40 -5
  205. package/dist/styles/recipes/activity.css +36 -3
  206. package/dist/styles/recipes/alert.css +97 -16
  207. package/dist/styles/recipes/audio-visualizer.css +8 -1
  208. package/dist/styles/recipes/avatar.css +17 -1
  209. package/dist/styles/recipes/badge.css +0 -1
  210. package/dist/styles/recipes/button-group.css +8 -0
  211. package/dist/styles/recipes/button.css +49 -8
  212. package/dist/styles/recipes/calendar.css +21 -6
  213. package/dist/styles/recipes/card.css +2 -0
  214. package/dist/styles/recipes/chat-composer-attachment.css +83 -54
  215. package/dist/styles/recipes/chat-composer.css +41 -22
  216. package/dist/styles/recipes/chat-layout.css +37 -54
  217. package/dist/styles/recipes/chat-message.css +78 -5
  218. package/dist/styles/recipes/choice.css +21 -2
  219. package/dist/styles/recipes/code-diff.css +9 -1
  220. package/dist/styles/recipes/code.css +64 -17
  221. package/dist/styles/recipes/collapsible.css +0 -3
  222. package/dist/styles/recipes/color-picker-details.css +1 -2
  223. package/dist/styles/recipes/color-picker-values.css +0 -4
  224. package/dist/styles/recipes/context.css +30 -18
  225. package/dist/styles/recipes/dockable-panel.css +8 -1
  226. package/dist/styles/recipes/dropzone.css +9 -2
  227. package/dist/styles/recipes/dynamic-notification-input.css +6 -0
  228. package/dist/styles/recipes/dynamic-notification.css +1 -0
  229. package/dist/styles/recipes/empty.css +118 -17
  230. package/dist/styles/recipes/environment-variables.css +9 -1
  231. package/dist/styles/recipes/field-parts.css +3 -6
  232. package/dist/styles/recipes/field.css +15 -5
  233. package/dist/styles/recipes/gradient-editor.css +33 -5
  234. package/dist/styles/recipes/inline-attachment.css +68 -20
  235. package/dist/styles/recipes/inline-citation.css +52 -10
  236. package/dist/styles/recipes/item.css +4 -2
  237. package/dist/styles/recipes/kbd.css +8 -0
  238. package/dist/styles/recipes/markdown-block.css +17 -2
  239. package/dist/styles/recipes/markdown.css +19 -0
  240. package/dist/styles/recipes/morphing-panel.css +1 -1
  241. package/dist/styles/recipes/page-layout.css +203 -0
  242. package/dist/styles/recipes/pagination.css +16 -4
  243. package/dist/styles/recipes/phone-input.css +8 -4
  244. package/dist/styles/recipes/popup-drawer.css +3 -1
  245. package/dist/styles/recipes/popup-lists.css +11 -0
  246. package/dist/styles/recipes/popup-toast.css +3 -29
  247. package/dist/styles/recipes/popup.css +10 -14
  248. package/dist/styles/recipes/progressive-blur.css +28 -7
  249. package/dist/styles/recipes/range.css +74 -3
  250. package/dist/styles/recipes/resizable.css +8 -10
  251. package/dist/styles/recipes/rich-tooltip.css +1 -4
  252. package/dist/styles/recipes/scroll-area.css +8 -2
  253. package/dist/styles/recipes/sidebar-menu.css +0 -6
  254. package/dist/styles/recipes/sidebar.css +56 -17
  255. package/dist/styles/recipes/skeleton.css +85 -3
  256. package/dist/styles/recipes/source-badge.css +20 -3
  257. package/dist/styles/recipes/stepper.css +8 -1
  258. package/dist/styles/recipes/switch.css +89 -17
  259. package/dist/styles/recipes/table-of-contents.css +211 -45
  260. package/dist/styles/recipes/table.css +0 -1
  261. package/dist/styles/recipes/tabs.css +35 -2
  262. package/dist/styles/recipes/task-list.css +68 -9
  263. package/dist/styles/recipes/thread-rail.css +19 -17
  264. package/dist/styles/recipes/toolbar.css +39 -4
  265. package/dist/styles/recipes/track-highlight.css +63 -5
  266. package/dist/styles/recipes/transcript-divider.css +1 -0
  267. package/dist/styles/recipes/tree.css +2 -0
  268. package/dist/styles/recipes/user-ask.css +65 -18
  269. package/dist/styles/theme.css +164 -138
  270. package/dist/surface-variants.d.ts +4 -5
  271. package/dist/task-list.d.ts +16 -17
  272. package/dist/thread-rail.d.ts +21 -22
  273. package/dist/thread-rail.js +1 -1
  274. package/dist/transcript-divider.d.ts +6 -7
  275. package/dist/ui/accordion.d.ts +10 -11
  276. package/dist/ui/alert-dialog.d.ts +11 -12
  277. package/dist/ui/alert-dialog.js +9 -7
  278. package/dist/ui/alert.d.ts +9 -10
  279. package/dist/ui/alert.js +3 -3
  280. package/dist/ui/aspect-ratio.d.ts +3 -4
  281. package/dist/ui/autocomplete.d.ts +19 -20
  282. package/dist/ui/autocomplete.js +6 -4
  283. package/dist/ui/avatar.d.ts +9 -10
  284. package/dist/ui/badge.d.ts +9 -10
  285. package/dist/ui/button-group.d.ts +7 -8
  286. package/dist/ui/button-group.js +3 -2
  287. package/dist/ui/button.d.ts +17 -18
  288. package/dist/ui/button.js +20 -5
  289. package/dist/ui/calendar.d.ts +3 -4
  290. package/dist/ui/card.d.ts +16 -17
  291. package/dist/ui/checkbox-group.d.ts +4 -5
  292. package/dist/ui/checkbox-group.js +3 -2
  293. package/dist/ui/checkbox.d.ts +3 -4
  294. package/dist/ui/code-diff.d.ts +8 -9
  295. package/dist/ui/code.d.ts +32 -23
  296. package/dist/ui/code.js +41 -20
  297. package/dist/ui/collapsible.d.ts +7 -8
  298. package/dist/ui/color-picker.d.ts +40 -41
  299. package/dist/ui/color-picker.js +8 -6
  300. package/dist/ui/combobox-disabled-selection.d.ts +3 -4
  301. package/dist/ui/combobox.d.ts +19 -20
  302. package/dist/ui/combobox.js +6 -4
  303. package/dist/ui/command.d.ts +22 -19
  304. package/dist/ui/command.js +63 -13
  305. package/dist/ui/context-menu.d.ts +30 -31
  306. package/dist/ui/context-menu.js +10 -7
  307. package/dist/ui/dialog.d.ts +13 -13
  308. package/dist/ui/dialog.js +11 -9
  309. package/dist/ui/dockable-panel-geometry.d.ts +7 -8
  310. package/dist/ui/dockable-panel.d.ts +21 -22
  311. package/dist/ui/drawer.d.ts +17 -18
  312. package/dist/ui/drawer.js +9 -8
  313. package/dist/ui/dropdown-menu.d.ts +32 -33
  314. package/dist/ui/dropdown-menu.js +6 -4
  315. package/dist/ui/dropzone.d.ts +24 -24
  316. package/dist/ui/dropzone.js +4 -1
  317. package/dist/ui/empty.d.ts +14 -14
  318. package/dist/ui/empty.js +3 -3
  319. package/dist/ui/field.d.ts +26 -27
  320. package/dist/ui/form.d.ts +4 -5
  321. package/dist/ui/gradient-editor.d.ts +16 -17
  322. package/dist/ui/gradient-editor.js +2 -2
  323. package/dist/ui/hover-card.d.ts +6 -7
  324. package/dist/ui/hover-card.js +6 -4
  325. package/dist/ui/infinite-canvas.d.ts +11 -12
  326. package/dist/ui/infinite-canvas.js +1 -0
  327. package/dist/ui/input-group.d.ts +6 -7
  328. package/dist/ui/input-otp.d.ts +7 -8
  329. package/dist/ui/input.d.ts +3 -4
  330. package/dist/ui/item.d.ts +20 -21
  331. package/dist/ui/kbd.d.ts +7 -5
  332. package/dist/ui/kbd.js +4 -2
  333. package/dist/ui/markdown-elements.d.ts +20 -21
  334. package/dist/ui/markdown.d.ts +5 -6
  335. package/dist/ui/menubar.d.ts +25 -26
  336. package/dist/ui/menubar.js +10 -7
  337. package/dist/ui/meter.d.ts +11 -12
  338. package/dist/ui/morphing-panel.d.ts +8 -9
  339. package/dist/ui/native-select.d.ts +3 -4
  340. package/dist/ui/native-select.js +1 -1
  341. package/dist/ui/navigation-menu.d.ts +17 -18
  342. package/dist/ui/navigation-menu.js +6 -4
  343. package/dist/ui/number-field.d.ts +15 -16
  344. package/dist/ui/number-field.js +1 -1
  345. package/dist/ui/page-layout.d.ts +44 -0
  346. package/dist/ui/page-layout.js +108 -0
  347. package/dist/ui/pagination.d.ts +10 -11
  348. package/dist/ui/phone-input.d.ts +5 -6
  349. package/dist/ui/phone-input.js +39 -36
  350. package/dist/ui/popover.d.ts +11 -12
  351. package/dist/ui/popover.js +6 -4
  352. package/dist/ui/progress.d.ts +11 -12
  353. package/dist/ui/progressive-blur.d.ts +4 -5
  354. package/dist/ui/radio-group.d.ts +5 -6
  355. package/dist/ui/resizable.d.ts +12 -13
  356. package/dist/ui/resizable.js +1 -1
  357. package/dist/ui/responsive-dialog.d.ts +11 -12
  358. package/dist/ui/rich-tooltip-tour.d.ts +5 -6
  359. package/dist/ui/rich-tooltip.d.ts +21 -23
  360. package/dist/ui/rich-tooltip.js +6 -6
  361. package/dist/ui/scroll-area.d.ts +7 -8
  362. package/dist/ui/scroll-area.js +9 -6
  363. package/dist/ui/select.d.ts +21 -14
  364. package/dist/ui/select.js +8 -5
  365. package/dist/ui/separator.d.ts +2 -3
  366. package/dist/ui/sheet.d.ts +8 -9
  367. package/dist/ui/sheet.js +9 -7
  368. package/dist/ui/sidebar-menu.d.ts +18 -19
  369. package/dist/ui/sidebar-menu.js +4 -3
  370. package/dist/ui/sidebar-provider.d.ts +32 -7
  371. package/dist/ui/sidebar-provider.js +82 -22
  372. package/dist/ui/sidebar-resize-rail.d.ts +8 -0
  373. package/dist/ui/sidebar-resize-rail.js +192 -0
  374. package/dist/ui/sidebar.d.ts +19 -13
  375. package/dist/ui/sidebar.js +120 -55
  376. package/dist/ui/skeleton.d.ts +7 -4
  377. package/dist/ui/skeleton.js +9 -2
  378. package/dist/ui/slider.d.ts +6 -5
  379. package/dist/ui/slider.js +16 -13
  380. package/dist/ui/spinner.d.ts +3 -4
  381. package/dist/ui/stepper.d.ts +22 -23
  382. package/dist/ui/switch.d.ts +3 -4
  383. package/dist/ui/switch.js +12 -1
  384. package/dist/ui/table-of-contents.d.ts +7 -8
  385. package/dist/ui/table-of-contents.js +4 -2
  386. package/dist/ui/table.d.ts +17 -18
  387. package/dist/ui/tabs.d.ts +14 -11
  388. package/dist/ui/textarea.d.ts +3 -4
  389. package/dist/ui/timeline.d.ts +18 -19
  390. package/dist/ui/toast.d.ts +9 -9
  391. package/dist/ui/toast.js +23 -16
  392. package/dist/ui/toggle.d.ts +5 -6
  393. package/dist/ui/toggle.js +3 -2
  394. package/dist/ui/toolbar.d.ts +15 -16
  395. package/dist/ui/toolbar.js +15 -4
  396. package/dist/ui/tooltip.d.ts +6 -13
  397. package/dist/ui/tooltip.js +8 -9
  398. package/dist/ui/tree.d.ts +18 -19
  399. package/dist/ui/tree.js +3 -2
  400. package/dist/ui/trigger-menu.d.ts +15 -16
  401. package/dist/ui/trigger-menu.js +6 -4
  402. package/dist/ui/use-switch-drag.d.ts +7 -0
  403. package/dist/ui/use-switch-drag.js +104 -0
  404. package/dist/user-ask.d.ts +28 -27
  405. package/dist/user-ask.js +38 -13
  406. package/package.json +17 -16
  407. package/dist/code-block-editor.d.ts +0 -59
  408. package/dist/code-block-editor.js +0 -250
  409. package/dist/knob-contracts/code-block-editor-knobs.d.ts +0 -5
  410. package/dist/knob-contracts/code-block-editor-knobs.js +0 -11
  411. package/dist/lib/code-block-shiki.d.ts +0 -9
  412. package/dist/lib/code-block-shiki.js +0 -6
  413. package/dist/skin.config.d.ts +0 -5
  414. package/dist/skin.config.js +0 -12
  415. package/dist/styles/recipes/code-block-editor.css +0 -136
  416. package/dist/styles/skin-theme.css +0 -137
  417. package/dist/styles/skin.css +0 -143
@@ -0,0 +1,60 @@
1
+ import { EmailColorScheme } from "./theme.js";
2
+ import { EmailFooterPlacement } from "./email.js";
3
+ import { EmailFooterAlign, EmailNavLink, EmailSocialLink } from "./email-footer.js";
4
+ import { ReactNode } from "react";
5
+ //#region src/email/email-brand.d.ts
6
+ export type EmailBrand = {
7
+ name: string;
8
+ homeUrl: string;
9
+ logoUrl?: string;
10
+ logoDarkUrl?: string;
11
+ logoWidth?: number;
12
+ logoHeight?: number;
13
+ };
14
+ export type EmailFooterContent = {
15
+ tagline: string;
16
+ socialLinks: EmailSocialLink[];
17
+ socialIconBaseUrl?: string;
18
+ helpLinks: EmailNavLink[];
19
+ sender: {
20
+ company: string;
21
+ addressLines: string[];
22
+ };
23
+ reason: string;
24
+ legal: string;
25
+ align?: EmailFooterAlign;
26
+ placement?: EmailFooterPlacement;
27
+ } & ({
28
+ mailing: "transactional";
29
+ } | {
30
+ mailing: "marketing";
31
+ unsubscribeUrl: string;
32
+ preferencesUrl?: string;
33
+ });
34
+ export declare function EmailLogo({ name, src, width, height, href }: {
35
+ name: string;
36
+ src?: string;
37
+ width?: number;
38
+ height?: number;
39
+ href?: string;
40
+ }): import("react").JSX.Element;
41
+ export declare function EmailBrowserLink({ href, children }: {
42
+ href: string;
43
+ children?: ReactNode;
44
+ }): import("react").JSX.Element;
45
+ export type EmailHeaderAlign = "split" | "center";
46
+ export declare function EmailHeader({ children, aside, align }: {
47
+ children: ReactNode;
48
+ aside?: ReactNode;
49
+ align?: EmailHeaderAlign;
50
+ }): import("react").JSX.Element;
51
+ export declare function EmailBrandHeader({ brand, browserUrl, colorScheme, align }: {
52
+ brand: EmailBrand;
53
+ browserUrl?: string;
54
+ colorScheme?: EmailColorScheme;
55
+ align?: EmailHeaderAlign;
56
+ }): import("react").JSX.Element;
57
+ export declare function EmailBrandFooter({ footer }: {
58
+ footer: EmailFooterContent;
59
+ }): import("react").JSX.Element;
60
+ //#endregion
@@ -0,0 +1,101 @@
1
+ import { EmailCaption, EmailMutedLink, EmailSection } from "./email.js";
2
+ import { EmailAddress, EmailFooter, EmailFooterLegal, EmailFooterLinks, EmailSocialLinks, EmailUnsubscribe } from "./email-footer.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Column, Img, Link, Row } from "react-email";
5
+ //#region src/email/email-brand.tsx
6
+ function EmailLogo({ name, src, width = 120, height = 32, href }) {
7
+ const mark = src ? /* @__PURE__ */ jsx(Img, {
8
+ src,
9
+ alt: name,
10
+ width,
11
+ height,
12
+ className: "inline-block"
13
+ }) : /* @__PURE__ */ jsx("span", {
14
+ className: "font-display text-heading-4 font-semibold text-card-foreground",
15
+ children: name
16
+ });
17
+ return href ? /* @__PURE__ */ jsx(Link, {
18
+ href,
19
+ className: "text-card-foreground no-underline",
20
+ children: mark
21
+ }) : mark;
22
+ }
23
+ function EmailBrowserLink({ href, children = "View in browser" }) {
24
+ return /* @__PURE__ */ jsx(EmailMutedLink, {
25
+ href,
26
+ children
27
+ });
28
+ }
29
+ function EmailHeader({ children, aside, align = "split" }) {
30
+ if (align === "center") return /* @__PURE__ */ jsxs(EmailSection, {
31
+ align: "center",
32
+ className: "mb-8",
33
+ children: [children, aside ? /* @__PURE__ */ jsx(EmailSection, {
34
+ align: "center",
35
+ className: "mt-3",
36
+ children: aside
37
+ }) : null]
38
+ });
39
+ return /* @__PURE__ */ jsxs(Row, {
40
+ className: "mb-8",
41
+ children: [/* @__PURE__ */ jsx(Column, {
42
+ className: "align-middle",
43
+ children
44
+ }), aside ? /* @__PURE__ */ jsx(Column, {
45
+ align: "right",
46
+ className: "align-middle",
47
+ children: aside
48
+ }) : null]
49
+ });
50
+ }
51
+ function EmailBrandHeader({ brand, browserUrl, colorScheme = "light", align = "split" }) {
52
+ const logoUrl = colorScheme === "dark" ? brand.logoDarkUrl ?? brand.logoUrl : brand.logoUrl;
53
+ return /* @__PURE__ */ jsx(EmailHeader, {
54
+ align,
55
+ aside: browserUrl ? /* @__PURE__ */ jsx(EmailBrowserLink, { href: browserUrl }) : null,
56
+ children: /* @__PURE__ */ jsx(EmailLogo, {
57
+ name: brand.name,
58
+ src: logoUrl,
59
+ width: brand.logoWidth,
60
+ height: brand.logoHeight,
61
+ href: brand.homeUrl
62
+ })
63
+ });
64
+ }
65
+ function EmailBrandFooter({ footer }) {
66
+ return /* @__PURE__ */ jsxs(EmailFooter, {
67
+ align: footer.align,
68
+ placement: footer.placement,
69
+ children: [
70
+ /* @__PURE__ */ jsx(EmailSocialLinks, {
71
+ links: footer.socialLinks,
72
+ iconBaseUrl: footer.socialIconBaseUrl
73
+ }),
74
+ /* @__PURE__ */ jsx(EmailFooterLinks, { links: footer.helpLinks }),
75
+ /* @__PURE__ */ jsx(EmailCaption, {
76
+ className: "mb-0",
77
+ children: footer.tagline
78
+ }),
79
+ /* @__PURE__ */ jsxs(EmailFooterLegal, { children: [
80
+ /* @__PURE__ */ jsx(EmailAddress, {
81
+ company: footer.sender.company,
82
+ lines: footer.sender.addressLines
83
+ }),
84
+ /* @__PURE__ */ jsx(EmailCaption, {
85
+ className: "mb-2",
86
+ children: footer.reason
87
+ }),
88
+ footer.mailing === "marketing" ? /* @__PURE__ */ jsx(EmailUnsubscribe, {
89
+ unsubscribeUrl: footer.unsubscribeUrl,
90
+ preferencesUrl: footer.preferencesUrl
91
+ }) : null,
92
+ /* @__PURE__ */ jsx(EmailCaption, {
93
+ className: "mb-0",
94
+ children: footer.legal
95
+ })
96
+ ] })
97
+ ]
98
+ });
99
+ }
100
+ //#endregion
101
+ export { EmailBrandFooter, EmailBrandHeader, EmailBrowserLink, EmailHeader, EmailLogo };
@@ -0,0 +1,18 @@
1
+ import { EmailTheme } from "./theme.js";
2
+ import { EmailVariant } from "./email.js";
3
+ import { CodeInlineProps, PrismLanguage } from "react-email";
4
+ //#region src/email/email-code.d.ts
5
+ export declare function EmailInlineCode({ className, ...props }: CodeInlineProps): import("react").JSX.Element;
6
+ export declare function EmailCodeBlock({ theme, code, language, lineNumbers, className }: {
7
+ theme: EmailTheme;
8
+ code: string;
9
+ language: PrismLanguage;
10
+ lineNumbers?: boolean;
11
+ className?: string;
12
+ }): import("react").JSX.Element;
13
+ export declare function EmailMarkdown({ theme, variant, children }: {
14
+ theme: EmailTheme;
15
+ variant?: EmailVariant;
16
+ children: string;
17
+ }): import("react").JSX.Element;
18
+ //#endregion
@@ -0,0 +1,172 @@
1
+ import { surfaceColors } from "./email.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { CodeBlock, CodeInline, Markdown, Section } from "react-email";
4
+ //#region src/email/email-code.tsx
5
+ function EmailInlineCode({ className = "", ...props }) {
6
+ return /* @__PURE__ */ jsx(CodeInline, {
7
+ ...props,
8
+ className: `rounded-control bg-muted px-1 font-mono text-card-foreground ${className}`
9
+ });
10
+ }
11
+ function prismTheme(theme) {
12
+ const { code } = theme;
13
+ return {
14
+ base: {
15
+ margin: "0",
16
+ padding: "16px",
17
+ background: theme.colors.muted,
18
+ color: code.foreground,
19
+ borderRadius: theme.radii.panel,
20
+ fontFamily: theme.fonts.mono,
21
+ fontSize: theme.text.caption.fontSize,
22
+ lineHeight: "1.6",
23
+ whiteSpace: "pre-wrap",
24
+ wordBreak: "break-word"
25
+ },
26
+ comment: { color: code.comment },
27
+ prolog: { color: code.comment },
28
+ doctype: { color: code.comment },
29
+ cdata: { color: code.comment },
30
+ punctuation: { color: code.punctuation },
31
+ operator: { color: code.punctuation },
32
+ keyword: { color: code.keyword },
33
+ atrule: { color: code.keyword },
34
+ "attr-value": { color: code.string },
35
+ string: { color: code.string },
36
+ char: { color: code.string },
37
+ inserted: { color: code.string },
38
+ regex: { color: code.string },
39
+ "attr-name": { color: code.parameter },
40
+ property: { color: code.parameter },
41
+ variable: { color: code.parameter },
42
+ function: { color: code.function },
43
+ "class-name": { color: code.function },
44
+ tag: { color: code.function },
45
+ boolean: { color: code.constant },
46
+ number: { color: code.constant },
47
+ constant: { color: code.constant },
48
+ symbol: { color: code.constant },
49
+ deleted: { color: code.constant },
50
+ builtin: { color: code.constant }
51
+ };
52
+ }
53
+ function EmailCodeBlock({ theme, code, language, lineNumbers = false, className = "" }) {
54
+ return /* @__PURE__ */ jsx(Section, {
55
+ className: `mb-6 ${className}`,
56
+ children: /* @__PURE__ */ jsx(CodeBlock, {
57
+ code,
58
+ language,
59
+ lineNumbers,
60
+ fontFamily: theme.fonts.mono,
61
+ theme: prismTheme(theme)
62
+ })
63
+ });
64
+ }
65
+ function markdownStyles(theme, variant) {
66
+ const colors = surfaceColors(theme, variant);
67
+ const body = {
68
+ margin: "0 0 16px",
69
+ fontFamily: theme.fonts.body,
70
+ fontSize: theme.text.body.fontSize,
71
+ lineHeight: theme.text.body.lineHeight,
72
+ color: colors["card-foreground"]
73
+ };
74
+ function headingStyle(size) {
75
+ const style = theme.text[size];
76
+ return {
77
+ margin: "0 0 16px",
78
+ fontFamily: theme.fonts.display,
79
+ fontSize: style.fontSize,
80
+ lineHeight: style.lineHeight,
81
+ fontWeight: style.fontWeight,
82
+ letterSpacing: style.letterSpacing,
83
+ color: colors["card-foreground"]
84
+ };
85
+ }
86
+ const monospace = {
87
+ fontFamily: theme.fonts.mono,
88
+ fontSize: theme.text.caption.fontSize,
89
+ background: theme.colors.muted,
90
+ color: theme.code.foreground,
91
+ borderRadius: theme.radii.control
92
+ };
93
+ return {
94
+ p: body,
95
+ li: {
96
+ ...body,
97
+ margin: "0 0 4px"
98
+ },
99
+ ul: {
100
+ ...body,
101
+ paddingLeft: "20px"
102
+ },
103
+ ol: {
104
+ ...body,
105
+ paddingLeft: "20px"
106
+ },
107
+ h1: headingStyle("heading-1"),
108
+ h2: headingStyle("heading-2"),
109
+ h3: headingStyle("heading-3"),
110
+ h4: headingStyle("heading-4"),
111
+ h5: headingStyle("heading-4"),
112
+ h6: headingStyle("heading-4"),
113
+ bold: { fontWeight: 600 },
114
+ italic: { fontStyle: "italic" },
115
+ link: {
116
+ color: colors["primary-text"],
117
+ textDecoration: "underline"
118
+ },
119
+ codeInline: {
120
+ ...monospace,
121
+ padding: "2px 4px"
122
+ },
123
+ codeBlock: {
124
+ ...monospace,
125
+ display: "block",
126
+ padding: "16px",
127
+ borderRadius: theme.radii.panel,
128
+ whiteSpace: "pre-wrap"
129
+ },
130
+ blockQuote: {
131
+ ...body,
132
+ borderLeft: `3px solid ${theme.colors.border}`,
133
+ paddingLeft: "16px",
134
+ color: colors["muted-foreground"]
135
+ },
136
+ hr: {
137
+ border: "none",
138
+ borderTop: `1px solid ${theme.colors.border}`,
139
+ margin: "24px 0"
140
+ },
141
+ image: {
142
+ maxWidth: "100%",
143
+ borderRadius: theme.radii.scene
144
+ },
145
+ table: {
146
+ width: "100%",
147
+ borderCollapse: "collapse",
148
+ marginBottom: "16px"
149
+ },
150
+ th: {
151
+ ...body,
152
+ margin: "0",
153
+ textAlign: "left",
154
+ padding: "8px 0",
155
+ borderBottom: `1px solid ${theme.colors.border}`
156
+ },
157
+ td: {
158
+ ...body,
159
+ margin: "0",
160
+ padding: "8px 0",
161
+ borderBottom: `1px solid ${theme.colors.border}`
162
+ }
163
+ };
164
+ }
165
+ function EmailMarkdown({ theme, variant = "contained", children }) {
166
+ return /* @__PURE__ */ jsx(Markdown, {
167
+ markdownCustomStyles: markdownStyles(theme, variant),
168
+ children
169
+ });
170
+ }
171
+ //#endregion
172
+ export { EmailCodeBlock, EmailInlineCode, EmailMarkdown };
@@ -0,0 +1,63 @@
1
+ import { EmailFooterPlacement } from "./email.js";
2
+ import { ReactNode } from "react";
3
+ //#region src/email/email-footer.d.ts
4
+ export type EmailNavLink = {
5
+ label: string;
6
+ href: string;
7
+ };
8
+ export declare const emailSocialPlatformNames: {
9
+ readonly x: "X";
10
+ readonly bluesky: "Bluesky";
11
+ readonly threads: "Threads";
12
+ readonly instagram: "Instagram";
13
+ readonly facebook: "Facebook";
14
+ readonly linkedin: "LinkedIn";
15
+ readonly youtube: "YouTube";
16
+ readonly tiktok: "TikTok";
17
+ readonly github: "GitHub";
18
+ readonly discord: "Discord";
19
+ readonly slack: "Slack";
20
+ readonly mastodon: "Mastodon";
21
+ };
22
+ export type EmailSocialPlatform = keyof typeof emailSocialPlatformNames;
23
+ export type EmailSocialLink = {
24
+ href: string;
25
+ iconAlt?: string;
26
+ } & ({
27
+ platform: EmailSocialPlatform;
28
+ label?: string;
29
+ iconUrl?: string;
30
+ } | {
31
+ platform?: undefined;
32
+ label: string;
33
+ iconUrl?: string;
34
+ });
35
+ export type EmailFooterAlign = "start" | "center";
36
+ export declare function EmailFooter({ children, align, placement }: {
37
+ children: ReactNode;
38
+ align?: EmailFooterAlign;
39
+ placement?: EmailFooterPlacement;
40
+ }): import("react").JSX.Element;
41
+ export declare function EmailFooterLegal({ children, className }: {
42
+ children: ReactNode;
43
+ className?: string;
44
+ }): import("react").JSX.Element;
45
+ export declare function EmailSocialLinks({ links, iconBaseUrl, iconSize }: {
46
+ links: EmailSocialLink[];
47
+ iconBaseUrl?: string;
48
+ iconSize?: number;
49
+ }): import("react").JSX.Element | null;
50
+ export declare function EmailFooterLinks({ links }: {
51
+ links: EmailNavLink[];
52
+ }): import("react").JSX.Element | null;
53
+ export declare function EmailAddress({ company, lines }: {
54
+ company: string;
55
+ lines: string[];
56
+ }): import("react").JSX.Element;
57
+ export declare function EmailUnsubscribe({ unsubscribeUrl, preferencesUrl, unsubscribeLabel, preferencesLabel }: {
58
+ unsubscribeUrl: string;
59
+ preferencesUrl?: string;
60
+ unsubscribeLabel?: string;
61
+ preferencesLabel?: string;
62
+ }): import("react").JSX.Element;
63
+ //#endregion
@@ -0,0 +1,98 @@
1
+ import { EmailCaption, EmailDivider, EmailMutedLink } from "./email.js";
2
+ import { Fragment } from "react";
3
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
4
+ import { Img, Section } from "react-email";
5
+ //#region src/email/email-footer.tsx
6
+ const emailSocialPlatformNames = {
7
+ x: "X",
8
+ bluesky: "Bluesky",
9
+ threads: "Threads",
10
+ instagram: "Instagram",
11
+ facebook: "Facebook",
12
+ linkedin: "LinkedIn",
13
+ youtube: "YouTube",
14
+ tiktok: "TikTok",
15
+ github: "GitHub",
16
+ discord: "Discord",
17
+ slack: "Slack",
18
+ mastodon: "Mastodon"
19
+ };
20
+ function separatedLinks(links) {
21
+ return links.map((link, index) => /* @__PURE__ */ jsxs(Fragment, { children: [index > 0 ? " · " : null, /* @__PURE__ */ jsx(EmailMutedLink, {
22
+ href: link.href,
23
+ children: link.label
24
+ })] }, link.href));
25
+ }
26
+ function EmailFooter({ children, align = "start", placement = "inside" }) {
27
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [placement === "inside" ? /* @__PURE__ */ jsx(EmailDivider, {}) : null, /* @__PURE__ */ jsx(Section, {
28
+ className: `${placement === "inside" ? "" : "pt-6"} ${align === "center" ? "text-center" : "text-left"}`,
29
+ children
30
+ })] });
31
+ }
32
+ function EmailFooterLegal({ children, className = "" }) {
33
+ return /* @__PURE__ */ jsx(Section, {
34
+ className: `mt-6 ${className}`,
35
+ children
36
+ });
37
+ }
38
+ function resolveSocialLink(link, iconBaseUrl) {
39
+ const label = link.platform ? link.label ?? emailSocialPlatformNames[link.platform] : link.label;
40
+ const base = iconBaseUrl?.replace(/\/$/, "");
41
+ return {
42
+ label,
43
+ iconUrl: link.iconUrl ?? (link.platform && base ? `${base}/${link.platform}.png` : void 0),
44
+ alt: link.iconAlt ?? label
45
+ };
46
+ }
47
+ function EmailSocialLinks({ links, iconBaseUrl, iconSize = 24 }) {
48
+ if (links.length === 0) return null;
49
+ return /* @__PURE__ */ jsx(Section, {
50
+ className: "mb-4",
51
+ children: links.map((link, index) => {
52
+ const { label, iconUrl, alt } = resolveSocialLink(link, iconBaseUrl);
53
+ const spacing = index < links.length - 1 ? "mr-3" : "";
54
+ return /* @__PURE__ */ jsxs(Fragment, { children: [index > 0 ? " " : null, /* @__PURE__ */ jsx(EmailMutedLink, {
55
+ href: link.href,
56
+ className: `${iconUrl ? "no-underline" : "underline"} ${spacing}`,
57
+ children: iconUrl ? /* @__PURE__ */ jsx(Img, {
58
+ src: iconUrl,
59
+ alt,
60
+ width: iconSize,
61
+ height: iconSize,
62
+ className: "inline-block align-middle"
63
+ }) : label
64
+ })] }, link.href);
65
+ })
66
+ });
67
+ }
68
+ function EmailFooterLinks({ links }) {
69
+ if (links.length === 0) return null;
70
+ return /* @__PURE__ */ jsx(EmailCaption, {
71
+ className: "mb-2",
72
+ children: separatedLinks(links)
73
+ });
74
+ }
75
+ function EmailAddress({ company, lines }) {
76
+ return /* @__PURE__ */ jsxs(EmailCaption, {
77
+ className: "mb-2",
78
+ children: [/* @__PURE__ */ jsx("strong", {
79
+ className: "font-semibold",
80
+ children: company
81
+ }), lines.map((line) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("br", {}), line] }, line))]
82
+ });
83
+ }
84
+ function EmailUnsubscribe({ unsubscribeUrl, preferencesUrl, unsubscribeLabel = "Unsubscribe", preferencesLabel = "Manage preferences" }) {
85
+ const unsubscribe = {
86
+ label: unsubscribeLabel,
87
+ href: unsubscribeUrl
88
+ };
89
+ return /* @__PURE__ */ jsx(EmailCaption, {
90
+ className: "mb-2",
91
+ children: separatedLinks(preferencesUrl ? [unsubscribe, {
92
+ label: preferencesLabel,
93
+ href: preferencesUrl
94
+ }] : [unsubscribe])
95
+ });
96
+ }
97
+ //#endregion
98
+ export { EmailAddress, EmailFooter, EmailFooterLegal, EmailFooterLinks, EmailSocialLinks, EmailUnsubscribe, emailSocialPlatformNames };
@@ -1,28 +1,76 @@
1
1
  import { EmailTheme } from "./theme.js";
2
2
  import { ReactNode } from "react";
3
- import { ButtonProps, HeadingProps, LinkProps, TextProps } from "react-email";
3
+ import { ButtonProps, HeadingProps, HrProps, LinkProps, SectionProps, TextProps } from "react-email";
4
4
  //#region src/email/email.d.ts
5
- declare function EmailLayout({ theme, preview, children, head, lang, dir }: {
5
+ export type EmailVariant = "contained" | "plain";
6
+ export type EmailFooterPlacement = "inside" | "outside";
7
+ export declare function surfaceColors(theme: EmailTheme, variant: EmailVariant): Record<"background" | "border" | "card" | "card-foreground" | "foreground" | "muted" | "muted-foreground" | "primary" | "primary-foreground" | "primary-text", string>;
8
+ export declare function EmailLayout({ theme, preview, children, footer, footerPlacement, head, lang, dir, variant }: {
6
9
  theme: EmailTheme;
7
10
  preview: string;
8
11
  children: ReactNode;
12
+ footer?: ReactNode;
13
+ footerPlacement?: EmailFooterPlacement;
9
14
  head?: ReactNode;
10
15
  lang?: string;
11
16
  dir?: "ltr" | "rtl";
17
+ variant?: EmailVariant;
12
18
  }): import("react").JSX.Element;
13
- declare const headingClasses: {
14
- h1: string;
15
- h2: string;
16
- h3: string;
17
- h4: string;
19
+ export type EmailAlign = "left" | "center" | "right";
20
+ declare const headingSizeClasses: {
21
+ display: string;
22
+ "heading-1": string;
23
+ "heading-2": string;
24
+ "heading-3": string;
25
+ "heading-4": string;
18
26
  };
19
- declare function EmailHeading({ as, className, ...props }: Omit<HeadingProps, "as"> & {
20
- as?: keyof typeof headingClasses;
27
+ type EmailHeadingSize = keyof typeof headingSizeClasses;
28
+ declare const headingSizeForTag: {
29
+ readonly h1: "heading-1";
30
+ readonly h2: "heading-2";
31
+ readonly h3: "heading-3";
32
+ readonly h4: "heading-4";
33
+ };
34
+ export declare function EmailHeading({ as, size, align, className, ...props }: Omit<HeadingProps, "as"> & {
35
+ as?: keyof typeof headingSizeForTag;
36
+ size?: EmailHeadingSize;
37
+ align?: EmailAlign;
38
+ }): import("react").JSX.Element;
39
+ export declare function EmailSection({ align, className, ...props }: SectionProps & {
40
+ align?: EmailAlign;
21
41
  }): import("react").JSX.Element;
22
- declare function EmailText({ tone, className, style, ...props }: TextProps & {
42
+ export declare function EmailText({ tone, align, className, style, ...props }: TextProps & {
23
43
  tone?: "default" | "muted";
44
+ align?: EmailAlign;
45
+ }): import("react").JSX.Element;
46
+ export declare function EmailButton({ width, className, ...props }: ButtonProps & {
47
+ width?: "auto" | "full";
48
+ }): import("react").JSX.Element;
49
+ export declare function EmailLink({ className, ...props }: LinkProps): import("react").JSX.Element;
50
+ export declare function EmailCaption({ className, ...props }: TextProps & {
51
+ align?: EmailAlign;
52
+ }): import("react").JSX.Element;
53
+ export declare function EmailMutedLink({ className, ...props }: LinkProps): import("react").JSX.Element;
54
+ export declare function EmailDivider({ className, ...props }: HrProps): import("react").JSX.Element;
55
+ export declare function EmailPanel({ className, ...props }: SectionProps): import("react").JSX.Element;
56
+ export declare function EmailOneTimeCode({ children, className }: {
57
+ children: ReactNode;
58
+ className?: string;
59
+ }): import("react").JSX.Element;
60
+ export declare function EmailBulletList({ items, className }: {
61
+ items: ReactNode[];
62
+ className?: string;
63
+ }): import("react").JSX.Element | null;
64
+ export declare function EmailColumns({ children, widths, gap, verticalAlign, className }: {
65
+ children: ReactNode[];
66
+ widths?: string[];
67
+ gap?: number;
68
+ verticalAlign?: "top" | "middle" | "bottom";
69
+ className?: string;
70
+ }): import("react").JSX.Element | null;
71
+ export declare function EmailDetailRow({ label, value, emphasis }: {
72
+ label: ReactNode;
73
+ value: ReactNode;
74
+ emphasis?: boolean;
24
75
  }): import("react").JSX.Element;
25
- declare function EmailButton({ className, ...props }: ButtonProps): import("react").JSX.Element;
26
- declare function EmailLink({ className, ...props }: LinkProps): import("react").JSX.Element;
27
- //#endregion
28
- export { EmailButton, EmailHeading, EmailLayout, EmailLink, EmailText };
76
+ //#endregion