ngwr 15.6.0 → 15.7.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.
Files changed (328) hide show
  1. package/animations/aurora/styles/_index.scss +44 -0
  2. package/animations/blur-reveal/styles/_index.scss +70 -0
  3. package/animations/click-sparks/styles/_index.scss +88 -0
  4. package/animations/confetti/styles/_index.scss +35 -0
  5. package/animations/core/styles/_mixins.scss +21 -0
  6. package/animations/decode/styles/_index.scss +68 -0
  7. package/animations/destruct/styles/_index.scss +31 -0
  8. package/animations/dot-grid/styles/_index.scss +41 -0
  9. package/animations/falling-letters/styles/_index.scss +72 -0
  10. package/animations/flow-lines/styles/_index.scss +39 -0
  11. package/animations/fluid-cursor/styles/_index.scss +44 -0
  12. package/animations/glitch/styles/_index.scss +189 -0
  13. package/animations/glow-border/styles/_index.scss +89 -0
  14. package/animations/gradient-flow/styles/_index.scss +101 -0
  15. package/animations/marquee/styles/_index.scss +179 -0
  16. package/animations/orbit/styles/_index.scss +77 -0
  17. package/animations/reveal/styles/_index.scss +96 -0
  18. package/animations/ripple-grid/styles/_index.scss +42 -0
  19. package/animations/rotate-reveal/styles/_index.scss +132 -0
  20. package/animations/shimmer/styles/_index.scss +102 -0
  21. package/animations/spotlight/styles/_index.scss +119 -0
  22. package/animations/thread-lines/styles/_index.scss +41 -0
  23. package/animations/typewriter/styles/_index.scss +94 -0
  24. package/date-picker/styles/_index.scss +28 -13
  25. package/fesm2022/ngwr-affix.mjs +3 -3
  26. package/fesm2022/ngwr-alert.mjs +3 -3
  27. package/fesm2022/ngwr-anchor.mjs +3 -3
  28. package/fesm2022/ngwr-animations-aurora.mjs +1000 -0
  29. package/fesm2022/ngwr-animations-aurora.mjs.map +1 -0
  30. package/fesm2022/ngwr-animations-blur-reveal.mjs +227 -0
  31. package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -0
  32. package/fesm2022/ngwr-animations-click-sparks.mjs +145 -0
  33. package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -0
  34. package/fesm2022/ngwr-animations-confetti.mjs +233 -0
  35. package/fesm2022/ngwr-animations-confetti.mjs.map +1 -0
  36. package/fesm2022/ngwr-animations-core.mjs +343 -0
  37. package/fesm2022/ngwr-animations-core.mjs.map +1 -0
  38. package/fesm2022/ngwr-animations-decode.mjs +301 -0
  39. package/fesm2022/ngwr-animations-decode.mjs.map +1 -0
  40. package/fesm2022/ngwr-animations-destruct.mjs +232 -0
  41. package/fesm2022/ngwr-animations-destruct.mjs.map +1 -0
  42. package/fesm2022/ngwr-animations-dot-grid.mjs +330 -0
  43. package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -0
  44. package/fesm2022/ngwr-animations-falling-letters.mjs +526 -0
  45. package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -0
  46. package/fesm2022/ngwr-animations-flow-lines.mjs +1102 -0
  47. package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -0
  48. package/fesm2022/ngwr-animations-fluid-cursor.mjs +1187 -0
  49. package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -0
  50. package/fesm2022/ngwr-animations-glitch.mjs +164 -0
  51. package/fesm2022/ngwr-animations-glitch.mjs.map +1 -0
  52. package/fesm2022/ngwr-animations-glow-border.mjs +81 -0
  53. package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -0
  54. package/fesm2022/ngwr-animations-gradient-flow.mjs +81 -0
  55. package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -0
  56. package/fesm2022/ngwr-animations-marquee.mjs +321 -0
  57. package/fesm2022/ngwr-animations-marquee.mjs.map +1 -0
  58. package/fesm2022/ngwr-animations-orbit.mjs +264 -0
  59. package/fesm2022/ngwr-animations-orbit.mjs.map +1 -0
  60. package/fesm2022/ngwr-animations-reveal.mjs +279 -0
  61. package/fesm2022/ngwr-animations-reveal.mjs.map +1 -0
  62. package/fesm2022/ngwr-animations-ripple-grid.mjs +320 -0
  63. package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -0
  64. package/fesm2022/ngwr-animations-rotate-reveal.mjs +285 -0
  65. package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -0
  66. package/fesm2022/ngwr-animations-shimmer.mjs +121 -0
  67. package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -0
  68. package/fesm2022/ngwr-animations-spotlight.mjs +90 -0
  69. package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -0
  70. package/fesm2022/ngwr-animations-thread-lines.mjs +926 -0
  71. package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -0
  72. package/fesm2022/ngwr-animations-tilt.mjs +134 -0
  73. package/fesm2022/ngwr-animations-tilt.mjs.map +1 -0
  74. package/fesm2022/ngwr-animations-typewriter.mjs +335 -0
  75. package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -0
  76. package/fesm2022/ngwr-avatar.mjs +3 -3
  77. package/fesm2022/ngwr-back-top.mjs +3 -3
  78. package/fesm2022/ngwr-badge.mjs +6 -6
  79. package/fesm2022/ngwr-breadcrumbs.mjs +6 -6
  80. package/fesm2022/ngwr-burger.mjs +3 -3
  81. package/fesm2022/ngwr-button.mjs +6 -6
  82. package/fesm2022/ngwr-calendar.mjs +3 -3
  83. package/fesm2022/ngwr-card.mjs +9 -9
  84. package/fesm2022/ngwr-carousel.mjs +6 -6
  85. package/fesm2022/ngwr-cascader.mjs +3 -3
  86. package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
  87. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  88. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  89. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  90. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  91. package/fesm2022/ngwr-charts-chart-legend.mjs +6 -6
  92. package/fesm2022/ngwr-charts-core.mjs +3 -3
  93. package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
  94. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  95. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  96. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  97. package/fesm2022/ngwr-charts-line-chart.mjs +3 -3
  98. package/fesm2022/ngwr-charts-meter-group.mjs +3 -3
  99. package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
  100. package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
  101. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  102. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  103. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  104. package/fesm2022/ngwr-checkbox.mjs +6 -6
  105. package/fesm2022/ngwr-clipboard.mjs +7 -4
  106. package/fesm2022/ngwr-clipboard.mjs.map +1 -1
  107. package/fesm2022/ngwr-collapse.mjs +9 -9
  108. package/fesm2022/ngwr-color-picker.mjs +11 -9
  109. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  110. package/fesm2022/ngwr-command-palette.mjs +7 -6
  111. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  112. package/fesm2022/ngwr-comment.mjs +6 -6
  113. package/fesm2022/ngwr-compare.mjs +3 -3
  114. package/fesm2022/ngwr-context-menu.mjs +17 -15
  115. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  116. package/fesm2022/ngwr-cookie.mjs +3 -3
  117. package/fesm2022/ngwr-counter.mjs +6 -6
  118. package/fesm2022/ngwr-date-picker.mjs +34 -26
  119. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  120. package/fesm2022/ngwr-date.mjs +6 -6
  121. package/fesm2022/ngwr-density.mjs +6 -6
  122. package/fesm2022/ngwr-descriptions.mjs +6 -6
  123. package/fesm2022/ngwr-dialog.mjs +24 -22
  124. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  125. package/fesm2022/ngwr-directives.mjs +16 -13
  126. package/fesm2022/ngwr-directives.mjs.map +1 -1
  127. package/fesm2022/ngwr-divider.mjs +3 -3
  128. package/fesm2022/ngwr-drawer.mjs +27 -24
  129. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  130. package/fesm2022/ngwr-dropdown.mjs +15 -13
  131. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  132. package/fesm2022/ngwr-editor.mjs +4 -4
  133. package/fesm2022/ngwr-empty.mjs +3 -3
  134. package/fesm2022/ngwr-event-calendar.mjs +7 -7
  135. package/fesm2022/ngwr-file-upload.mjs +3 -3
  136. package/fesm2022/ngwr-form.mjs +9 -9
  137. package/fesm2022/ngwr-graph.mjs +6 -6
  138. package/fesm2022/ngwr-hotkey.mjs +6 -6
  139. package/fesm2022/ngwr-i18n-ar.mjs +6 -1
  140. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  141. package/fesm2022/ngwr-i18n-cs.mjs +6 -1
  142. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  143. package/fesm2022/ngwr-i18n-de.mjs +6 -1
  144. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  145. package/fesm2022/ngwr-i18n-en.mjs +6 -1
  146. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  147. package/fesm2022/ngwr-i18n-es.mjs +6 -1
  148. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  149. package/fesm2022/ngwr-i18n-fr.mjs +6 -1
  150. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  151. package/fesm2022/ngwr-i18n-he.mjs +6 -1
  152. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  153. package/fesm2022/ngwr-i18n-hi.mjs +6 -1
  154. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  155. package/fesm2022/ngwr-i18n-id.mjs +6 -1
  156. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  157. package/fesm2022/ngwr-i18n-it.mjs +6 -1
  158. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  159. package/fesm2022/ngwr-i18n-ja.mjs +6 -1
  160. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  161. package/fesm2022/ngwr-i18n-ko.mjs +6 -1
  162. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  163. package/fesm2022/ngwr-i18n-nl.mjs +6 -1
  164. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  165. package/fesm2022/ngwr-i18n-pl.mjs +6 -1
  166. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  167. package/fesm2022/ngwr-i18n-pt.mjs +6 -1
  168. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  169. package/fesm2022/ngwr-i18n-ru.mjs +6 -1
  170. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  171. package/fesm2022/ngwr-i18n-sv.mjs +6 -1
  172. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  173. package/fesm2022/ngwr-i18n-tr.mjs +6 -1
  174. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  175. package/fesm2022/ngwr-i18n-uk.mjs +6 -1
  176. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  177. package/fesm2022/ngwr-i18n-vi.mjs +6 -1
  178. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  179. package/fesm2022/ngwr-i18n-zh-tw.mjs +6 -1
  180. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  181. package/fesm2022/ngwr-i18n-zh.mjs +6 -1
  182. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  183. package/fesm2022/ngwr-i18n.mjs +9 -9
  184. package/fesm2022/ngwr-icon.mjs +6 -6
  185. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  186. package/fesm2022/ngwr-input-number.mjs +3 -3
  187. package/fesm2022/ngwr-input-otp.mjs +3 -3
  188. package/fesm2022/ngwr-input.mjs +15 -15
  189. package/fesm2022/ngwr-keyboard.mjs +3 -3
  190. package/fesm2022/ngwr-knob.mjs +3 -3
  191. package/fesm2022/ngwr-layout.mjs +15 -15
  192. package/fesm2022/ngwr-lightbox.mjs +7 -6
  193. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  194. package/fesm2022/ngwr-list.mjs +6 -6
  195. package/fesm2022/ngwr-load-state.mjs +15 -15
  196. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  197. package/fesm2022/ngwr-mention.mjs +6 -6
  198. package/fesm2022/ngwr-meta.mjs +6 -6
  199. package/fesm2022/ngwr-overlay.mjs +27 -7
  200. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  201. package/fesm2022/ngwr-page-header.mjs +3 -3
  202. package/fesm2022/ngwr-pagination.mjs +3 -3
  203. package/fesm2022/ngwr-pipes.mjs +27 -27
  204. package/fesm2022/ngwr-platform.mjs +9 -9
  205. package/fesm2022/ngwr-popconfirm.mjs +12 -10
  206. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  207. package/fesm2022/ngwr-popover.mjs +15 -15
  208. package/fesm2022/ngwr-popover.mjs.map +1 -1
  209. package/fesm2022/ngwr-progress.mjs +3 -3
  210. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  211. package/fesm2022/ngwr-qr.mjs +3 -3
  212. package/fesm2022/ngwr-radio.mjs +6 -6
  213. package/fesm2022/ngwr-rating.mjs +3 -3
  214. package/fesm2022/ngwr-result.mjs +12 -12
  215. package/fesm2022/ngwr-schema-form.mjs +3 -3
  216. package/fesm2022/ngwr-scroll.mjs +3 -3
  217. package/fesm2022/ngwr-segmented.mjs +3 -3
  218. package/fesm2022/ngwr-select.mjs +16 -16
  219. package/fesm2022/ngwr-sidebar.mjs +3 -3
  220. package/fesm2022/ngwr-skeleton.mjs +3 -3
  221. package/fesm2022/ngwr-slider.mjs +3 -3
  222. package/fesm2022/ngwr-sortable-list.mjs +9 -9
  223. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  224. package/fesm2022/ngwr-spinner.mjs +3 -3
  225. package/fesm2022/ngwr-splitter.mjs +3 -3
  226. package/fesm2022/ngwr-statistic.mjs +9 -9
  227. package/fesm2022/ngwr-stepper.mjs +6 -6
  228. package/fesm2022/ngwr-storage.mjs +3 -3
  229. package/fesm2022/ngwr-switch.mjs +3 -3
  230. package/fesm2022/ngwr-table.mjs +19 -19
  231. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  232. package/fesm2022/ngwr-tabs.mjs +6 -6
  233. package/fesm2022/ngwr-textarea.mjs +3 -3
  234. package/fesm2022/ngwr-theme.mjs +3 -3
  235. package/fesm2022/ngwr-timeline.mjs +6 -6
  236. package/fesm2022/ngwr-toast.mjs +17 -15
  237. package/fesm2022/ngwr-toast.mjs.map +1 -1
  238. package/fesm2022/ngwr-toolbar.mjs +3 -3
  239. package/fesm2022/ngwr-tour.mjs +7 -7
  240. package/fesm2022/ngwr-transfer.mjs +4 -4
  241. package/fesm2022/ngwr-tree.mjs +3 -3
  242. package/fesm2022/ngwr-typography.mjs +3 -3
  243. package/fesm2022/ngwr-utils-router.mjs +3 -3
  244. package/fesm2022/ngwr-utils.mjs +5 -1
  245. package/fesm2022/ngwr-utils.mjs.map +1 -1
  246. package/fesm2022/ngwr-version.mjs +1 -1
  247. package/fesm2022/ngwr-version.mjs.map +1 -1
  248. package/fesm2022/ngwr-virtual-scroll.mjs +5 -5
  249. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  250. package/fesm2022/ngwr-window.mjs +17 -16
  251. package/fesm2022/ngwr-window.mjs.map +1 -1
  252. package/i18n/ar.json +7 -0
  253. package/i18n/cs.json +7 -0
  254. package/i18n/de.json +7 -0
  255. package/i18n/en.json +7 -0
  256. package/i18n/es.json +7 -0
  257. package/i18n/fr.json +7 -0
  258. package/i18n/he.json +7 -0
  259. package/i18n/hi.json +7 -0
  260. package/i18n/id.json +7 -0
  261. package/i18n/it.json +7 -0
  262. package/i18n/ja.json +7 -0
  263. package/i18n/ko.json +7 -0
  264. package/i18n/nl.json +7 -0
  265. package/i18n/pl.json +7 -0
  266. package/i18n/pt.json +7 -0
  267. package/i18n/ru.json +7 -0
  268. package/i18n/sv.json +7 -0
  269. package/i18n/tr.json +7 -0
  270. package/i18n/uk.json +7 -0
  271. package/i18n/vi.json +7 -0
  272. package/i18n/zh-TW.json +7 -0
  273. package/i18n/zh.json +7 -0
  274. package/llms-full.txt +162 -2
  275. package/llms.txt +1 -0
  276. package/package.json +119 -1
  277. package/schematics/use/rule.js +1 -0
  278. package/schematics/use/symbol-map.json +23 -0
  279. package/skills/ngwr/SKILL.md +3 -2
  280. package/skills/ngwr/references/catalog.md +23 -0
  281. package/theme/_index.scss +7 -1
  282. package/theme/styles/_index.scss +1 -0
  283. package/theme/styles/_scrollbar.scss +69 -0
  284. package/theme/styles/_variables.scss +8 -0
  285. package/types/ngwr-animations-aurora.d.ts +186 -0
  286. package/types/ngwr-animations-blur-reveal.d.ts +84 -0
  287. package/types/ngwr-animations-click-sparks.d.ts +67 -0
  288. package/types/ngwr-animations-confetti.d.ts +93 -0
  289. package/types/ngwr-animations-core.d.ts +294 -0
  290. package/types/ngwr-animations-decode.d.ts +104 -0
  291. package/types/ngwr-animations-destruct.d.ts +96 -0
  292. package/types/ngwr-animations-dot-grid.d.ts +87 -0
  293. package/types/ngwr-animations-falling-letters.d.ts +165 -0
  294. package/types/ngwr-animations-flow-lines.d.ts +208 -0
  295. package/types/ngwr-animations-fluid-cursor.d.ts +183 -0
  296. package/types/ngwr-animations-glitch.d.ts +86 -0
  297. package/types/ngwr-animations-glow-border.d.ts +29 -0
  298. package/types/ngwr-animations-gradient-flow.d.ts +38 -0
  299. package/types/ngwr-animations-marquee.d.ts +148 -0
  300. package/types/ngwr-animations-orbit.d.ts +112 -0
  301. package/types/ngwr-animations-reveal.d.ts +134 -0
  302. package/types/ngwr-animations-ripple-grid.d.ts +74 -0
  303. package/types/ngwr-animations-rotate-reveal.d.ts +134 -0
  304. package/types/ngwr-animations-shimmer.d.ts +68 -0
  305. package/types/ngwr-animations-spotlight.d.ts +36 -0
  306. package/types/ngwr-animations-thread-lines.d.ts +155 -0
  307. package/types/ngwr-animations-tilt.d.ts +49 -0
  308. package/types/ngwr-animations-typewriter.d.ts +144 -0
  309. package/types/ngwr-clipboard.d.ts +1 -0
  310. package/types/ngwr-color-picker.d.ts +1 -0
  311. package/types/ngwr-command-palette.d.ts +1 -0
  312. package/types/ngwr-compare.d.ts +1 -1
  313. package/types/ngwr-context-menu.d.ts +1 -0
  314. package/types/ngwr-dialog.d.ts +1 -0
  315. package/types/ngwr-directives.d.ts +1 -0
  316. package/types/ngwr-drawer.d.ts +9 -2
  317. package/types/ngwr-dropdown.d.ts +1 -0
  318. package/types/ngwr-lightbox.d.ts +1 -0
  319. package/types/ngwr-overlay.d.ts +19 -0
  320. package/types/ngwr-popconfirm.d.ts +1 -0
  321. package/types/ngwr-sortable-list.d.ts +1 -1
  322. package/types/ngwr-splitter.d.ts +1 -1
  323. package/types/ngwr-stepper.d.ts +1 -1
  324. package/types/ngwr-timeline.d.ts +1 -1
  325. package/types/ngwr-utils.d.ts +11 -6
  326. package/types/ngwr-version.d.ts +1 -1
  327. package/types/ngwr-window.d.ts +1 -0
  328. package/virtual-scroll/styles/_rules.scss +5 -9
@@ -0,0 +1,96 @@
1
+ @use '../../../theme/styles' as theme;
2
+ @use '../../core/styles/mixins' as core;
3
+ @include theme.loaded('animations/reveal');
4
+
5
+ // `<wr-reveal>`: a text run whose pieces rise into place one after
6
+ // another from first paint, with no script. The host is inline, the pieces
7
+ // are in the server HTML, and `--play` is on from the start in `load` mode, so
8
+ // the animation begins the moment the page paints and runs on through
9
+ // hydration. The hooks live on the host and on `__item`, the class an inline
10
+ // element outside a host takes to join the sequence at the index its own
11
+ // `--wr-reveal-i` says.
12
+ .wr-reveal,
13
+ .wr-reveal__item {
14
+ // In `em`, so a 48px headline and a 16px line rise by the same share of
15
+ // their size: a third of a line reads as a lift, a whole line as a climb.
16
+ --wr-reveal-offset: 0.35em;
17
+ --wr-reveal-duration: 0.6s;
18
+ // Eases out with no overshoot, so a piece settles rather than bounces.
19
+ --wr-reveal-ease: var(--wr-ease-out);
20
+ // Written by the component on its host: the pause before the first piece
21
+ // and the gap from one piece to the next. An `__item` outside a host reads
22
+ // these defaults, or what its ancestor sets.
23
+ --wr-reveal-delay: 0ms;
24
+ --wr-reveal-gap: 28ms;
25
+ }
26
+
27
+ .wr-reveal {
28
+ // Masked: a piece starts a whole line down, under the word's clip box, and
29
+ // climbs out of it.
30
+ &--masked {
31
+ --wr-reveal-offset: 1em;
32
+ }
33
+
34
+ // The pieces of one word: a word never parts across lines. `inline-block`,
35
+ // because a translate does nothing on an inline box; the spaces between
36
+ // words stay real text in `__gap`, so the lines break where they did.
37
+ &__word {
38
+ display: inline-block;
39
+ white-space: nowrap;
40
+ }
41
+
42
+ // The clip box, padded out and pulled back by the same amount, so the
43
+ // margin box and the baseline are what they were and a descender or an
44
+ // accent at rest is inside it. `clip-path`, not `overflow`: a clipped
45
+ // `overflow` moves an inline-block's baseline to its bottom edge.
46
+ &--masked &__word {
47
+ padding: 0.25em 0.1em;
48
+ margin: -0.25em -0.1em;
49
+ clip-path: inset(0);
50
+ }
51
+
52
+ &__piece {
53
+ display: inline-block;
54
+ }
55
+
56
+ // `backwards`, not `both`: the end state is the piece's own, so a finished
57
+ // piece holds no `translate` or `opacity` that would make it a stacking
58
+ // context, and `background-clip: text` on an ancestor still paints through
59
+ // it. With no script the pieces simply end as plain text does.
60
+ &--play &__piece,
61
+ &__item {
62
+ animation: wr-reveal-in var(--wr-reveal-duration) var(--wr-reveal-ease) backwards;
63
+ animation-delay: calc(var(--wr-reveal-delay) + var(--wr-reveal-i, 0) * var(--wr-reveal-gap));
64
+ }
65
+
66
+ &__item {
67
+ display: inline-block;
68
+ }
69
+
70
+ // The sentence for a screen reader, once, while the pieces are `aria-hidden`.
71
+ // Out of the selection, so a copy of the headline gives the pieces' text once.
72
+ &__sr {
73
+ @include core.sr-only;
74
+
75
+ user-select: none;
76
+ }
77
+
78
+ @media (prefers-reduced-motion: reduce) {
79
+ &--play &__piece,
80
+ &__item {
81
+ animation: none;
82
+ }
83
+ }
84
+ }
85
+
86
+ @keyframes wr-reveal-in {
87
+ from {
88
+ opacity: 0;
89
+ translate: 0 var(--wr-reveal-offset);
90
+ }
91
+
92
+ to {
93
+ opacity: 1;
94
+ translate: 0 0;
95
+ }
96
+ }
@@ -0,0 +1,42 @@
1
+ @use '../../../theme/styles' as theme;
2
+ @include theme.loaded('animations/ripple-grid');
3
+
4
+ // `<wr-ripple-grid />`: a faint square grid of thin lines behind a page's
5
+ // content, that ripples out from a click. The component paints one canvas and
6
+ // reads its two colours back from the hooks below through
7
+ // `resolveCssColorChannels`, so a retheme and a scheme switch both reach the
8
+ // pixels. The strengths (how much of each colour a line shows at rest and lit)
9
+ // and the line width live in `ripple-grid.ts`: they are the canvas's numbers,
10
+ // not the sheet's.
11
+ .wr-ripple-grid {
12
+ // A line at rest: the muted role, the bare intent, since a line is a graphic
13
+ // and not text. The canvas shows it at a fifth, so the text over the grid
14
+ // reads as it does on the plain surface.
15
+ --wr-ripple-grid-ink: var(--wr-color-on-surface-muted);
16
+ // A line under the wave: the primary intent, never at full strength, so the
17
+ // lit ring stays under the content's own accents.
18
+ --wr-ripple-grid-glow: var(--wr-color-primary);
19
+
20
+ position: absolute;
21
+ inset: 0;
22
+ // Under the content, over the page: the parent is positioned and isolated,
23
+ // so this is the floor of its stacking context.
24
+ z-index: -1;
25
+ display: block;
26
+ overflow: hidden;
27
+ pointer-events: none;
28
+ user-select: none;
29
+ // Gone at the edges, so there is no rectangle where the parent ends.
30
+ mask-image: radial-gradient(ellipse 70% 72% at 50% 50%, #000 35%, transparent 100%);
31
+
32
+ &__canvas {
33
+ display: block;
34
+ inline-size: 100%;
35
+ block-size: 100%;
36
+ }
37
+
38
+ // Nothing drawn: a grid under system colours is noise, not decoration.
39
+ @media (forced-colors: active) {
40
+ display: none;
41
+ }
42
+ }
@@ -0,0 +1,132 @@
1
+ @use '../../../theme/styles' as theme;
2
+ @use '../../core/styles/mixins' as core;
3
+ @include theme.loaded('animations/rotate-reveal');
4
+
5
+ // `<wr-rotate-reveal>`: one word of a sentence that gives way to the next in
6
+ // place. At rest the slot is an inline-block holding the plain word, so the
7
+ // line reads, breaks, selects and copies as if the word were typed there.
8
+ // While `--swap` is on the host, the slot holds two words split into letters:
9
+ // the one leaving, out of flow over the slot, and the one arriving, in flow,
10
+ // and its explicit width eases from the one word's to the other's.
11
+ .wr-rotate-reveal {
12
+ // In `em`, so a letter leaves a 17px line and a 48px heading by the same
13
+ // share of its size: a whole line, so it is out of the clip when it fades.
14
+ --wr-rotate-reveal-offset: 1.1em;
15
+ // One letter leaving, one arriving, and how long after the first letter
16
+ // leaves the first one arrives.
17
+ --wr-rotate-reveal-out: 0.32s;
18
+ --wr-rotate-reveal-in: 0.38s;
19
+ --wr-rotate-reveal-lead: 50ms;
20
+ // The gap from one letter to the next, in both words.
21
+ --wr-rotate-reveal-gap: 24ms;
22
+ // The slot. `inline-block`, so a width can be set on it and its baseline is
23
+ // the word's; `relative`, so the word leaving can sit over it. The width is
24
+ // the component's measured one once it has measured, and the word's own
25
+ // until then, which is the same number.
26
+ &__slot {
27
+ // How long the whole swap takes: the last letter of the longer word
28
+ // arrives this long after the first one leaves. Declared here, on the
29
+ // slot, because the component writes `--wr-rotate-reveal-count` on the
30
+ // slot and a `calc()` reads the custom properties of the element it is
31
+ // declared on, not of the one that inherits it.
32
+ --wr-rotate-reveal-swap: calc(
33
+ var(--wr-rotate-reveal-lead) + (var(--wr-rotate-reveal-count, 1) - 1) * var(--wr-rotate-reveal-gap) +
34
+ var(--wr-rotate-reveal-in)
35
+ );
36
+
37
+ display: inline-block;
38
+ position: relative;
39
+ vertical-align: baseline;
40
+ white-space: nowrap;
41
+ }
42
+
43
+ // While swapping, the slot clips to its line box in the block direction
44
+ // and leaves half an em of air at either end, so a letter rising at the far
45
+ // end of a word wider than the slot is at that moment is not cut off while
46
+ // the width catches up. The width eases out: fast at first, so the letters
47
+ // that rise late find the slot already near its new size. `clip-path`, not
48
+ // `overflow`: a clipped `overflow` moves an inline-block's baseline to its
49
+ // bottom edge.
50
+ &--swap &__slot {
51
+ clip-path: inset(0 -0.5em);
52
+ transition: width var(--wr-rotate-reveal-swap) var(--wr-ease-out);
53
+ }
54
+
55
+ &__word {
56
+ white-space: nowrap;
57
+ }
58
+
59
+ // The word leaving: over the slot, anchored where the word arriving starts,
60
+ // so each letter rises from where its counterpart will land.
61
+ &__word--out {
62
+ position: absolute;
63
+ inset-block-start: 0;
64
+ inset-inline-start: 0;
65
+ }
66
+
67
+ // `inline-block`, because a translate does nothing on an inline box; `pre`,
68
+ // so a space inside a word keeps its width.
69
+ &__letter {
70
+ display: inline-block;
71
+ white-space: pre;
72
+ }
73
+
74
+ // Leaving: `forwards`, so a letter that is gone stays gone until the swap
75
+ // ends and the word leaves the DOM. Eases in: a departure accelerates.
76
+ &__letter--out {
77
+ animation: wr-rotate-reveal-out var(--wr-rotate-reveal-out) var(--wr-ease-in) forwards;
78
+ animation-delay: calc(var(--wr-rotate-reveal-i, 0) * var(--wr-rotate-reveal-gap));
79
+ }
80
+
81
+ // Arriving: `backwards`, so a letter is under the line until its turn, and
82
+ // the end state is the letter's own, the same as the plain word that
83
+ // replaces it when the swap ends.
84
+ &__letter--in {
85
+ animation: wr-rotate-reveal-in var(--wr-rotate-reveal-in) var(--wr-ease-out) backwards;
86
+ animation-delay: calc(var(--wr-rotate-reveal-lead) + var(--wr-rotate-reveal-i, 0) * var(--wr-rotate-reveal-gap));
87
+ }
88
+
89
+ // The component's measuring span: in the slot, in its font, out of flow and
90
+ // out of sight, there for one layout read per word and then gone.
91
+ &__probe {
92
+ position: absolute;
93
+ inset-block-start: 0;
94
+ inset-inline-start: 0;
95
+ visibility: hidden;
96
+ white-space: pre;
97
+ pointer-events: none;
98
+ }
99
+
100
+ // Every word once, for a screen reader, while the slot is `aria-hidden`.
101
+ // Out of the selection, so a copy of the sentence gives the word on show.
102
+ &__sr {
103
+ @include core.sr-only;
104
+
105
+ user-select: none;
106
+ }
107
+
108
+ @media (prefers-reduced-motion: reduce) {
109
+ &--swap &__slot {
110
+ transition: none;
111
+ }
112
+
113
+ &__letter--out,
114
+ &__letter--in {
115
+ animation: none;
116
+ }
117
+ }
118
+ }
119
+
120
+ @keyframes wr-rotate-reveal-out {
121
+ to {
122
+ opacity: 0;
123
+ translate: 0 calc(-1 * var(--wr-rotate-reveal-offset));
124
+ }
125
+ }
126
+
127
+ @keyframes wr-rotate-reveal-in {
128
+ from {
129
+ opacity: 0;
130
+ translate: 0 var(--wr-rotate-reveal-offset);
131
+ }
132
+ }
@@ -0,0 +1,102 @@
1
+ @use '../../../theme/styles' as theme;
2
+ @include theme.loaded('animations/shimmer');
3
+
4
+ // `[wrShimmer]`: a soft band of light crosses the glyphs of a short label,
5
+ // waits, and crosses again while the label is on screen. At rest the block
6
+ // declares only its hooks, so the host looks the way its own rules say. The
7
+ // directive puts one of three modifiers on the host and each is one animation:
8
+ // `--first` and `--rest` run the silent wait for the delay and the pause,
9
+ // `--pass` runs the band. The directive flips to the next on `animationend`,
10
+ // so every duration here is a real one.
11
+ .wr-shimmer {
12
+ // The lit core of the band, in `em`: a chip at 10px gets a 15px band, a
13
+ // heading a proportionally wider one. The gradient fades over the same width
14
+ // again on both sides, so the band has no edge.
15
+ --wr-shimmer-band: 1.5em;
16
+ // A pass crosses the text plus one band width on either side: long enough
17
+ // to read as a glide and not a flash, short enough that a label is never
18
+ // half lit when a reader looks at it.
19
+ --wr-shimmer-pass: 1.2s;
20
+ // Between two passes. With the pass, one glint every 6.2 s: seen on a page
21
+ // read for a minute, not a metronome at the edge of the eye.
22
+ --wr-shimmer-pause: 5s;
23
+ // Before the first pass after the host comes into view: a route change or a
24
+ // scroll settles first, and the glint is not the thing that lands with it.
25
+ --wr-shimmer-delay: 0.4s;
26
+ // Where the band pulls the text's colour toward: the ink of the surface, the
27
+ // readable side in either scheme (darker in light, lighter in dark), and a
28
+ // `light-dark()` pair already, so one declaration serves both. A label on a
29
+ // coloured fill sets this to its own `-contrast`.
30
+ --wr-shimmer-peak: var(--wr-color-on-surface);
31
+ // How far the centre of the band gets toward the peak. The rest is the
32
+ // text's own colour, so a muted chip never lights to full ink and the text
33
+ // reads as itself throughout. Mixed from `currentColor`, never from a step.
34
+ --wr-shimmer-strength: 60%;
35
+ --wr-shimmer-light: color-mix(in srgb, var(--wr-shimmer-peak) var(--wr-shimmer-strength), currentColor);
36
+ // Slow at both ends, where the band is still outside the text, fastest in
37
+ // the middle, so the visible part is a glide with no lingering.
38
+ --wr-shimmer-ease: var(--wr-ease-in-out);
39
+
40
+ @media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
41
+ // The wait: keyframes that paint nothing, run for the delay or the pause,
42
+ // so the directive gets an `animationend` without a timer of its own.
43
+ &--first {
44
+ animation: wr-shimmer-rest var(--wr-shimmer-delay) linear;
45
+ }
46
+
47
+ &--rest {
48
+ animation: wr-shimmer-rest var(--wr-shimmer-pause) linear;
49
+ }
50
+
51
+ // The band is a background clipped to the glyphs. The glyph paint goes
52
+ // transparent through `-webkit-text-fill-color`, not `color`, so
53
+ // `currentColor` keeps the text's own colour: it fills the glyphs under the
54
+ // band, and the band is mixed from it.
55
+ &--pass {
56
+ background-color: currentColor;
57
+ // The band sits in the middle half of an image two bands wide, with
58
+ // length stops, so its edges are fades and the image's corners stay
59
+ // transparent under the slant.
60
+ background-image: linear-gradient(100deg, transparent 25%, var(--wr-shimmer-light) 50%, transparent 75%);
61
+ background-size: calc(var(--wr-shimmer-band) * 2) 100%;
62
+ background-repeat: no-repeat;
63
+ -webkit-background-clip: text;
64
+ background-clip: text;
65
+ -webkit-text-fill-color: transparent;
66
+ animation: wr-shimmer-pass var(--wr-shimmer-pass) var(--wr-shimmer-ease);
67
+
68
+ // The band travels the reading direction; the keyframes are physical, so
69
+ // RTL plays them backwards.
70
+ &:dir(rtl) {
71
+ animation-direction: reverse;
72
+ }
73
+ }
74
+ }
75
+ }
76
+
77
+ // From the band flush against the start edge of the text, outside it, to
78
+ // flush against the end edge, outside it: the image is two bands wide and the
79
+ // band is its middle half, so one and a half bands of offset puts the band
80
+ // edge exactly at the text edge.
81
+ // rtl-ok: background-position-x is physical by nature; `:dir(rtl)` above reverses the run
82
+ @keyframes wr-shimmer-pass {
83
+ from {
84
+ background-position-x: calc(0% - var(--wr-shimmer-band) * 1.5);
85
+ }
86
+
87
+ to {
88
+ background-position-x: calc(100% + var(--wr-shimmer-band) * 1.5);
89
+ }
90
+ }
91
+
92
+ // Changes nothing visible: an unregistered custom property, stepped once, is
93
+ // enough for the browser to run the animation and fire `animationend`.
94
+ @keyframes wr-shimmer-rest {
95
+ from {
96
+ --wr-shimmer-wait: 0;
97
+ }
98
+
99
+ to {
100
+ --wr-shimmer-wait: 1;
101
+ }
102
+ }
@@ -0,0 +1,119 @@
1
+ @use '../../../theme/styles' as theme;
2
+ @include theme.loaded('animations/spotlight');
3
+
4
+ // `[wrSpotlight]`: a soft circle of light under the pointer on a card's
5
+ // surface, and a brighter stretch of border near it. The directive writes the
6
+ // pointer as `--wr-spotlight-x` / `-y` (px from the host's border box) and
7
+ // puts `--on` on the host while a pointer is inside; this sheet owns the paint.
8
+ // Two pseudo-elements, both free on `wr-card`: `::before` is the light,
9
+ // `::after` the ring. Both cover the border box, sit at `z-index: -1` inside
10
+ // the host's own stacking context (`isolation: isolate`), so they paint over
11
+ // the card's background and border and under everything the card holds, and
12
+ // take no pointer, so links and text selection in the card are untouched. The
13
+ // gradients sit directly at the point: only opacity ever transitions, so the
14
+ // light follows the pointer with no lag and fades out where it was.
15
+ .wr-spotlight {
16
+ // Written by the directive on the host. The rest values put a light that
17
+ // has no pointer yet (the `:focus-within` hint below) at the centre.
18
+ --wr-spotlight-x: 50%;
19
+ --wr-spotlight-y: 50%;
20
+ // The light's colour: a role, never a step. A card that is not primary sets
21
+ // another role here.
22
+ --wr-spotlight-color: var(--wr-color-primary);
23
+ // How wide the light and the ring reach, from the point to full transparency.
24
+ --wr-spotlight-radius: 240px;
25
+ --wr-spotlight-ring-radius: 180px;
26
+ // How much of the colour the centre of the light carries over the surface:
27
+ // enough to read as light, not enough to move the text's contrast. The ring
28
+ // is a 1px line and takes more before it shows.
29
+ --wr-spotlight-strength: 12%;
30
+ --wr-spotlight-ring-strength: 60%;
31
+ // The host's border width: the ring is exactly as thick as the line it
32
+ // brightens, and both layers reach out this far to cover it.
33
+ --wr-spotlight-edge: 1px;
34
+ // The fade in and out, opacity only.
35
+ --wr-spotlight-fade: var(--wr-transition-long);
36
+ // The point in each layer's own box, which starts one edge outside the host.
37
+ --_x: calc(var(--wr-spotlight-x) + var(--wr-spotlight-edge));
38
+ --_y: calc(var(--wr-spotlight-y) + var(--wr-spotlight-edge));
39
+ --_opacity: 0;
40
+
41
+ // A stacking context of its own, so the layers at `z-index: -1` paint above
42
+ // the host's background rather than behind the whole card.
43
+ isolation: isolate;
44
+
45
+ &::before,
46
+ &::after {
47
+ content: '';
48
+ position: absolute;
49
+ inset: calc(-1 * var(--wr-spotlight-edge));
50
+ border-radius: inherit;
51
+ z-index: -1;
52
+ opacity: var(--_opacity);
53
+ pointer-events: none;
54
+ }
55
+
56
+ // The light: the colour at the point, mixed down to the strength, gone at the radius.
57
+ &::before {
58
+ background: radial-gradient(
59
+ circle var(--wr-spotlight-radius) at var(--_x) var(--_y),
60
+ color-mix(in srgb, var(--wr-spotlight-color) var(--wr-spotlight-strength), transparent),
61
+ transparent
62
+ );
63
+ }
64
+
65
+ // The ring: the same gradient, stronger, masked down to a line one edge wide
66
+ // round the box, so it reads as the card's own border brightening.
67
+ &::after {
68
+ padding: var(--wr-spotlight-edge);
69
+ background: radial-gradient(
70
+ circle var(--wr-spotlight-ring-radius) at var(--_x) var(--_y),
71
+ color-mix(in srgb, var(--wr-spotlight-color) var(--wr-spotlight-ring-strength), transparent),
72
+ transparent
73
+ );
74
+ mask:
75
+ linear-gradient(#000 0 0) content-box,
76
+ linear-gradient(#000 0 0);
77
+ mask-composite: exclude;
78
+ }
79
+
80
+ &--on {
81
+ --_opacity: 1;
82
+ }
83
+
84
+ // Keyboard focus inside the card, with no pointer over it: the same light
85
+ // at the centre, at half strength, so a keyboard user gets the same hint
86
+ // without a point to follow. A pointer inside wins: it has a real point.
87
+ &:focus-within:not(&--on) {
88
+ --_x: calc(50% + var(--wr-spotlight-edge));
89
+ --_y: calc(50% + var(--wr-spotlight-edge));
90
+ --_opacity: 0.5;
91
+ }
92
+
93
+ // The fade is the only motion here. The light following the pointer is a
94
+ // pointer response, not an animation, so it stays under reduced motion and
95
+ // only the fade goes: the light appears and leaves at once.
96
+ @media (prefers-reduced-motion: no-preference) {
97
+ &::before,
98
+ &::after {
99
+ transition: opacity var(--wr-spotlight-fade);
100
+ }
101
+ }
102
+
103
+ // A forced palette has no soft tint: the card is its own two colours.
104
+ @media (forced-colors: active) {
105
+ &::before,
106
+ &::after {
107
+ display: none;
108
+ }
109
+ }
110
+
111
+ // `wr-card` rounds its corners as a squircle where the browser can; the
112
+ // layers follow the same curve, since `corner-shape` is not inherited.
113
+ @supports (corner-shape: squircle) {
114
+ &::before,
115
+ &::after {
116
+ corner-shape: inherit;
117
+ }
118
+ }
119
+ }
@@ -0,0 +1,41 @@
1
+ @use '../../../theme/styles' as theme;
2
+ @include theme.loaded('animations/thread-lines');
3
+
4
+ // `<wr-thread-lines />`: a ribbon of fine threads behind a section's content,
5
+ // a cord at one end and frayed apart at the other, riding slow waves and
6
+ // parting round the pointer. The component paints one WebGL canvas and reads
7
+ // its two colours and the surface back from the hooks below through
8
+ // `resolveCssColorChannels`, so a retheme and a scheme switch both reach the
9
+ // pixels. How much of a colour a strand lays, its glow and its thickness live
10
+ // in the component and its shader: they are the canvas's numbers, not the
11
+ // sheet's.
12
+ .wr-thread-lines {
13
+ // A strand: the ink the body reads in, since a hairline needs the whole
14
+ // contrast of text to show at all, and a graphic, so the bare role. The
15
+ // canvas lays it as ink on a light surface and lights it on a dark one.
16
+ --wr-thread-lines-color: var(--wr-color-on-surface);
17
+ // The outer strands: the primary intent, never at full strength, so they
18
+ // stay under the content's own accents.
19
+ --wr-thread-lines-accent: var(--wr-color-primary);
20
+
21
+ position: absolute;
22
+ inset: 0;
23
+ // Under the content, over the page: the parent is positioned and isolated,
24
+ // so this is the floor of its stacking context.
25
+ z-index: -1;
26
+ display: block;
27
+ overflow: hidden;
28
+ pointer-events: none;
29
+ user-select: none;
30
+
31
+ &__canvas {
32
+ display: block;
33
+ inline-size: 100%;
34
+ block-size: 100%;
35
+ }
36
+
37
+ // Nothing drawn: hairlines under system colours are noise, not decoration.
38
+ @media (forced-colors: active) {
39
+ display: none;
40
+ }
41
+ }
@@ -0,0 +1,94 @@
1
+ @use '../../../theme/styles' as theme;
2
+ @use '../../core/styles/mixins' as core;
3
+ @include theme.loaded('animations/typewriter');
4
+
5
+ // `<wr-typewriter>`: a line typed character by character behind a caret.
6
+ // The host stays inline, so it sits in a paragraph like text. The box is an
7
+ // inline grid with every line in its one cell: the lines not on show are laid
8
+ // out and invisible, the line on show is laid out whole with its untyped tail
9
+ // invisible, so the box is the longest line's box at the current width from
10
+ // the first paint and nothing around it moves while the text appears.
11
+ .wr-typewriter {
12
+ --wr-typewriter-caret: 2px;
13
+ // One blink, on and off, and the fade after the last one.
14
+ --wr-typewriter-blink: 1s;
15
+ --wr-typewriter-fade: 0.4s;
16
+
17
+ &__box {
18
+ display: inline-grid;
19
+ max-width: 100%;
20
+ vertical-align: baseline;
21
+ }
22
+
23
+ // Every line in the same cell. `min-width: 0`, so a long line wraps in the
24
+ // cell instead of widening it past the paragraph.
25
+ &__ghost,
26
+ &__line {
27
+ grid-area: 1 / 1;
28
+ min-width: 0;
29
+ }
30
+
31
+ // Laid out, never seen, never copied.
32
+ &__ghost {
33
+ visibility: hidden;
34
+ user-select: none;
35
+ pointer-events: none;
36
+ }
37
+
38
+ // The untyped tail: in the line, so the typed run keeps the place it will
39
+ // have when the line is whole, and out of sight. `visibility`, not a
40
+ // transparent colour, so a copy of the line gives the typed text alone.
41
+ &__rest {
42
+ visibility: hidden;
43
+ }
44
+
45
+ // The caret: a bar on the trailing edge of the typed run, so it stands after
46
+ // the last typed character and wraps with it. A border on an empty inline
47
+ // box, pulled back by its own width, so it takes no room in the line and
48
+ // the untyped tail does not move when it comes and goes. Gone at rest.
49
+ &__typed::after {
50
+ content: '';
51
+ display: none;
52
+ margin-inline: 0.06em calc(-0.06em - var(--wr-typewriter-caret));
53
+ border-inline-start: var(--wr-typewriter-caret) solid currentColor;
54
+ }
55
+
56
+ // Blinking while a line holds and while the last one stands.
57
+ &--caret &__typed::after {
58
+ display: inline;
59
+ animation: wr-typewriter-blink var(--wr-typewriter-blink) step-end infinite;
60
+ }
61
+
62
+ // Solid while a character is on its way.
63
+ &--busy &__typed::after {
64
+ animation: none;
65
+ }
66
+
67
+ // After the last blink: from solid to nothing, then the component drops it.
68
+ &--out &__typed::after {
69
+ animation: none;
70
+ opacity: 0;
71
+ transition: opacity var(--wr-typewriter-fade) var(--wr-ease-out);
72
+ }
73
+
74
+ // Every line once, for a screen reader, while the box is `aria-hidden`. Out
75
+ // of the selection, so a copy of the paragraph gives the typed text once.
76
+ &__sr {
77
+ @include core.sr-only;
78
+
79
+ user-select: none;
80
+ }
81
+
82
+ @media (prefers-reduced-motion: reduce) {
83
+ &__typed::after {
84
+ animation: none;
85
+ transition: none;
86
+ }
87
+ }
88
+ }
89
+
90
+ @keyframes wr-typewriter-blink {
91
+ 50% {
92
+ opacity: 0;
93
+ }
94
+ }