ngwr 14.7.0 → 14.9.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 (482) hide show
  1. package/README.md +66 -332
  2. package/alert/styles/_index.scss +10 -0
  3. package/avatar/styles/_index.scss +18 -7
  4. package/badge/styles/_index.scss +7 -0
  5. package/badge/styles/_tag.scss +7 -1
  6. package/bar-chart/styles/_index.scss +1 -0
  7. package/button/styles/_index.scss +6 -0
  8. package/calendar-heatmap/styles/_index.scss +1 -0
  9. package/cascader/styles/_rules.scss +87 -15
  10. package/checkbox/styles/_index.scss +4 -0
  11. package/command-palette/styles/_index.scss +1 -1
  12. package/date-picker/styles/_index.scss +30 -0
  13. package/density/styles/_index.scss +4 -2
  14. package/divider/styles/_index.scss +2 -0
  15. package/donut-chart/styles/_index.scss +10 -0
  16. package/dropdown/styles/_index.scss +67 -5
  17. package/editor/styles/_index.scss +441 -0
  18. package/event-calendar/styles/_index.scss +209 -35
  19. package/fesm2022/ngwr-action-sheet-testing.mjs.map +1 -1
  20. package/fesm2022/ngwr-action-sheet.mjs +3 -3
  21. package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
  22. package/fesm2022/ngwr-affix.mjs +3 -3
  23. package/fesm2022/ngwr-affix.mjs.map +1 -1
  24. package/fesm2022/ngwr-alert.mjs +3 -3
  25. package/fesm2022/ngwr-alert.mjs.map +1 -1
  26. package/fesm2022/ngwr-anchor.mjs +3 -3
  27. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  28. package/fesm2022/ngwr-aurora.mjs +3 -3
  29. package/fesm2022/ngwr-aurora.mjs.map +1 -1
  30. package/fesm2022/ngwr-avatar.mjs +3 -3
  31. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  32. package/fesm2022/ngwr-back-top.mjs +3 -3
  33. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  34. package/fesm2022/ngwr-badge.mjs +28 -13
  35. package/fesm2022/ngwr-badge.mjs.map +1 -1
  36. package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -1
  37. package/fesm2022/ngwr-bar-chart.mjs +31 -6
  38. package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
  39. package/fesm2022/ngwr-blur-text-testing.mjs.map +1 -1
  40. package/fesm2022/ngwr-blur-text.mjs +3 -3
  41. package/fesm2022/ngwr-blur-text.mjs.map +1 -1
  42. package/fesm2022/ngwr-border-glow-testing.mjs.map +1 -1
  43. package/fesm2022/ngwr-border-glow.mjs +3 -3
  44. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  45. package/fesm2022/ngwr-breadcrumbs.mjs +6 -6
  46. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  47. package/fesm2022/ngwr-burger.mjs +3 -3
  48. package/fesm2022/ngwr-burger.mjs.map +1 -1
  49. package/fesm2022/ngwr-button-testing.mjs.map +1 -1
  50. package/fesm2022/ngwr-button.mjs +6 -6
  51. package/fesm2022/ngwr-button.mjs.map +1 -1
  52. package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -1
  53. package/fesm2022/ngwr-calendar-heatmap.mjs +61 -6
  54. package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
  55. package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
  56. package/fesm2022/ngwr-calendar.mjs +3 -3
  57. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  58. package/fesm2022/ngwr-card.mjs +9 -9
  59. package/fesm2022/ngwr-card.mjs.map +1 -1
  60. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  61. package/fesm2022/ngwr-carousel.mjs +6 -6
  62. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  63. package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
  64. package/fesm2022/ngwr-cascader.mjs +4 -4
  65. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  66. package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -1
  67. package/fesm2022/ngwr-checkbox.mjs +18 -8
  68. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  69. package/fesm2022/ngwr-circular-text-testing.mjs.map +1 -1
  70. package/fesm2022/ngwr-circular-text.mjs +3 -3
  71. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  72. package/fesm2022/ngwr-click-spark.mjs +3 -3
  73. package/fesm2022/ngwr-click-spark.mjs.map +1 -1
  74. package/fesm2022/ngwr-clipboard.mjs +3 -3
  75. package/fesm2022/ngwr-clipboard.mjs.map +1 -1
  76. package/fesm2022/ngwr-collapse-testing.mjs.map +1 -1
  77. package/fesm2022/ngwr-collapse.mjs +9 -9
  78. package/fesm2022/ngwr-collapse.mjs.map +1 -1
  79. package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
  80. package/fesm2022/ngwr-color-picker.mjs +6 -6
  81. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  82. package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -1
  83. package/fesm2022/ngwr-command-palette.mjs +3 -3
  84. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  85. package/fesm2022/ngwr-compare.mjs +3 -3
  86. package/fesm2022/ngwr-compare.mjs.map +1 -1
  87. package/fesm2022/ngwr-confetti.mjs +3 -3
  88. package/fesm2022/ngwr-confetti.mjs.map +1 -1
  89. package/fesm2022/ngwr-config.mjs.map +1 -1
  90. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
  91. package/fesm2022/ngwr-context-menu.mjs +12 -12
  92. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  93. package/fesm2022/ngwr-cookie.mjs +3 -3
  94. package/fesm2022/ngwr-cookie.mjs.map +1 -1
  95. package/fesm2022/ngwr-counter.mjs +6 -6
  96. package/fesm2022/ngwr-counter.mjs.map +1 -1
  97. package/fesm2022/ngwr-date-adapters-fns.mjs +3 -3
  98. package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -1
  99. package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
  100. package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -1
  101. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  102. package/fesm2022/ngwr-date-picker.mjs +721 -62
  103. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  104. package/fesm2022/ngwr-date.mjs +3 -3
  105. package/fesm2022/ngwr-date.mjs.map +1 -1
  106. package/fesm2022/ngwr-decrypt-text-testing.mjs.map +1 -1
  107. package/fesm2022/ngwr-decrypt-text.mjs +3 -3
  108. package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
  109. package/fesm2022/ngwr-density.mjs +6 -6
  110. package/fesm2022/ngwr-density.mjs.map +1 -1
  111. package/fesm2022/ngwr-descriptions.mjs +6 -6
  112. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  113. package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
  114. package/fesm2022/ngwr-dialog.mjs +15 -15
  115. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  116. package/fesm2022/ngwr-directives.mjs +12 -12
  117. package/fesm2022/ngwr-directives.mjs.map +1 -1
  118. package/fesm2022/ngwr-divider.mjs +3 -3
  119. package/fesm2022/ngwr-divider.mjs.map +1 -1
  120. package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -1
  121. package/fesm2022/ngwr-donut-chart.mjs +48 -6
  122. package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
  123. package/fesm2022/ngwr-drag-drop.mjs +6 -6
  124. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  125. package/fesm2022/ngwr-drawer-testing.mjs.map +1 -1
  126. package/fesm2022/ngwr-drawer.mjs +18 -18
  127. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  128. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  129. package/fesm2022/ngwr-dropdown.mjs +174 -25
  130. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  131. package/fesm2022/ngwr-editor-testing.mjs +568 -0
  132. package/fesm2022/ngwr-editor-testing.mjs.map +1 -0
  133. package/fesm2022/ngwr-editor.mjs +2601 -0
  134. package/fesm2022/ngwr-editor.mjs.map +1 -0
  135. package/fesm2022/ngwr-empty.mjs +3 -3
  136. package/fesm2022/ngwr-empty.mjs.map +1 -1
  137. package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -1
  138. package/fesm2022/ngwr-event-calendar.mjs +14 -7
  139. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  140. package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -1
  141. package/fesm2022/ngwr-falling-text.mjs +3 -3
  142. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  143. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  144. package/fesm2022/ngwr-file-upload.mjs +3 -3
  145. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  146. package/fesm2022/ngwr-form-testing.mjs.map +1 -1
  147. package/fesm2022/ngwr-form.mjs +61 -10
  148. package/fesm2022/ngwr-form.mjs.map +1 -1
  149. package/fesm2022/ngwr-fuzzy-text-testing.mjs.map +1 -1
  150. package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
  151. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  152. package/fesm2022/ngwr-gauge-testing.mjs.map +1 -1
  153. package/fesm2022/ngwr-gauge.mjs +35 -6
  154. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  155. package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -1
  156. package/fesm2022/ngwr-glitch-text.mjs +3 -3
  157. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  158. package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -1
  159. package/fesm2022/ngwr-gradient-text.mjs +3 -3
  160. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  161. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  162. package/fesm2022/ngwr-graph.mjs +6 -6
  163. package/fesm2022/ngwr-graph.mjs.map +1 -1
  164. package/fesm2022/ngwr-hotkey.mjs +6 -6
  165. package/fesm2022/ngwr-hotkey.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-ar.mjs +31 -0
  167. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-cs.mjs +31 -0
  169. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-de.mjs +31 -0
  171. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-en.mjs +39 -0
  173. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  174. package/fesm2022/ngwr-i18n-es.mjs +31 -0
  175. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-fr.mjs +31 -0
  177. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n-he.mjs +31 -0
  179. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  180. package/fesm2022/ngwr-i18n-hi.mjs +31 -0
  181. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  182. package/fesm2022/ngwr-i18n-id.mjs +31 -0
  183. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  184. package/fesm2022/ngwr-i18n-it.mjs +31 -0
  185. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  186. package/fesm2022/ngwr-i18n-ja.mjs +31 -0
  187. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  188. package/fesm2022/ngwr-i18n-ko.mjs +31 -0
  189. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  190. package/fesm2022/ngwr-i18n-nl.mjs +31 -0
  191. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  192. package/fesm2022/ngwr-i18n-pl.mjs +31 -0
  193. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  194. package/fesm2022/ngwr-i18n-pt.mjs +31 -0
  195. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  196. package/fesm2022/ngwr-i18n-ru.mjs +31 -0
  197. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  198. package/fesm2022/ngwr-i18n-sv.mjs +31 -0
  199. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  200. package/fesm2022/ngwr-i18n-tr.mjs +31 -0
  201. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  202. package/fesm2022/ngwr-i18n-uk.mjs +31 -0
  203. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  204. package/fesm2022/ngwr-i18n-vi.mjs +31 -0
  205. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  206. package/fesm2022/ngwr-i18n-zh-TW.mjs +31 -0
  207. package/fesm2022/ngwr-i18n-zh-TW.mjs.map +1 -1
  208. package/fesm2022/ngwr-i18n-zh.mjs +31 -0
  209. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  210. package/fesm2022/ngwr-i18n.mjs +9 -9
  211. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  212. package/fesm2022/ngwr-icon-adapters-feather.mjs.map +1 -1
  213. package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
  214. package/fesm2022/ngwr-icon.mjs +6 -6
  215. package/fesm2022/ngwr-icon.mjs.map +1 -1
  216. package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -1
  217. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  218. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  219. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  220. package/fesm2022/ngwr-input-number.mjs +15 -3
  221. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  222. package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
  223. package/fesm2022/ngwr-input-otp.mjs +3 -3
  224. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  225. package/fesm2022/ngwr-input-testing.mjs.map +1 -1
  226. package/fesm2022/ngwr-input.mjs +15 -15
  227. package/fesm2022/ngwr-input.mjs.map +1 -1
  228. package/fesm2022/ngwr-keyboard.mjs +3 -3
  229. package/fesm2022/ngwr-keyboard.mjs.map +1 -1
  230. package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
  231. package/fesm2022/ngwr-knob.mjs +3 -3
  232. package/fesm2022/ngwr-knob.mjs.map +1 -1
  233. package/fesm2022/ngwr-layout.mjs +15 -15
  234. package/fesm2022/ngwr-layout.mjs.map +1 -1
  235. package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
  236. package/fesm2022/ngwr-lightbox.mjs +3 -3
  237. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  238. package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -1
  239. package/fesm2022/ngwr-line-chart.mjs +18 -7
  240. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  241. package/fesm2022/ngwr-list.mjs +6 -6
  242. package/fesm2022/ngwr-list.mjs.map +1 -1
  243. package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
  244. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  245. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  246. package/fesm2022/ngwr-markdown-testing.mjs.map +1 -1
  247. package/fesm2022/ngwr-markdown.mjs +798 -17
  248. package/fesm2022/ngwr-markdown.mjs.map +1 -1
  249. package/fesm2022/ngwr-marquee-testing.mjs.map +1 -1
  250. package/fesm2022/ngwr-marquee.mjs +3 -3
  251. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  252. package/fesm2022/ngwr-media.mjs +3 -3
  253. package/fesm2022/ngwr-media.mjs.map +1 -1
  254. package/fesm2022/ngwr-mention-testing.mjs.map +1 -1
  255. package/fesm2022/ngwr-mention.mjs +6 -6
  256. package/fesm2022/ngwr-mention.mjs.map +1 -1
  257. package/fesm2022/ngwr-meta.mjs +6 -6
  258. package/fesm2022/ngwr-meta.mjs.map +1 -1
  259. package/fesm2022/ngwr-meter-group-testing.mjs +7 -3
  260. package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -1
  261. package/fesm2022/ngwr-meter-group.mjs +26 -6
  262. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  263. package/fesm2022/ngwr-overlay.mjs +6 -6
  264. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  265. package/fesm2022/ngwr-page-header.mjs +13 -5
  266. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  267. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
  268. package/fesm2022/ngwr-pagination.mjs +3 -3
  269. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  270. package/fesm2022/ngwr-pipes.mjs +21 -21
  271. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  272. package/fesm2022/ngwr-platform.mjs +9 -9
  273. package/fesm2022/ngwr-platform.mjs.map +1 -1
  274. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  275. package/fesm2022/ngwr-popconfirm.mjs +6 -6
  276. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  277. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  278. package/fesm2022/ngwr-popover.mjs +578 -16
  279. package/fesm2022/ngwr-popover.mjs.map +1 -1
  280. package/fesm2022/ngwr-progress.mjs +3 -3
  281. package/fesm2022/ngwr-progress.mjs.map +1 -1
  282. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  283. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
  284. package/fesm2022/ngwr-qr.mjs +3 -3
  285. package/fesm2022/ngwr-qr.mjs.map +1 -1
  286. package/fesm2022/ngwr-radio-testing.mjs.map +1 -1
  287. package/fesm2022/ngwr-radio.mjs +6 -6
  288. package/fesm2022/ngwr-radio.mjs.map +1 -1
  289. package/fesm2022/ngwr-rating-testing.mjs.map +1 -1
  290. package/fesm2022/ngwr-rating.mjs +3 -3
  291. package/fesm2022/ngwr-rating.mjs.map +1 -1
  292. package/fesm2022/ngwr-result.mjs +12 -12
  293. package/fesm2022/ngwr-result.mjs.map +1 -1
  294. package/fesm2022/ngwr-rotating-text-testing.mjs.map +1 -1
  295. package/fesm2022/ngwr-rotating-text.mjs +3 -3
  296. package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
  297. package/fesm2022/ngwr-schema-form.mjs +3 -3
  298. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  299. package/fesm2022/ngwr-scroll.mjs +3 -3
  300. package/fesm2022/ngwr-scroll.mjs.map +1 -1
  301. package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
  302. package/fesm2022/ngwr-segmented.mjs +3 -3
  303. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  304. package/fesm2022/ngwr-select-testing.mjs.map +1 -1
  305. package/fesm2022/ngwr-select.mjs +12 -12
  306. package/fesm2022/ngwr-select.mjs.map +1 -1
  307. package/fesm2022/ngwr-shiny-text-testing.mjs.map +1 -1
  308. package/fesm2022/ngwr-shiny-text.mjs +6 -6
  309. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  310. package/fesm2022/ngwr-sidebar.mjs +10 -3
  311. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  312. package/fesm2022/ngwr-skeleton.mjs +3 -3
  313. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  314. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  315. package/fesm2022/ngwr-slider.mjs +3 -3
  316. package/fesm2022/ngwr-slider.mjs.map +1 -1
  317. package/fesm2022/ngwr-sparkline-testing.mjs.map +1 -1
  318. package/fesm2022/ngwr-sparkline.mjs +84 -10
  319. package/fesm2022/ngwr-sparkline.mjs.map +1 -1
  320. package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -1
  321. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  322. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  323. package/fesm2022/ngwr-spinner.mjs +3 -3
  324. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  325. package/fesm2022/ngwr-splash-cursor-testing.mjs.map +1 -1
  326. package/fesm2022/ngwr-splash-cursor.mjs +3 -3
  327. package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
  328. package/fesm2022/ngwr-split-text-testing.mjs.map +1 -1
  329. package/fesm2022/ngwr-split-text.mjs +3 -3
  330. package/fesm2022/ngwr-split-text.mjs.map +1 -1
  331. package/fesm2022/ngwr-splitter-testing.mjs.map +1 -1
  332. package/fesm2022/ngwr-splitter.mjs +3 -3
  333. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  334. package/fesm2022/ngwr-spotlight-card-testing.mjs.map +1 -1
  335. package/fesm2022/ngwr-spotlight-card.mjs +6 -6
  336. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  337. package/fesm2022/ngwr-squircle.mjs +6 -6
  338. package/fesm2022/ngwr-squircle.mjs.map +1 -1
  339. package/fesm2022/ngwr-star-border-testing.mjs.map +1 -1
  340. package/fesm2022/ngwr-star-border.mjs +3 -3
  341. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  342. package/fesm2022/ngwr-statistic.mjs +9 -9
  343. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  344. package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
  345. package/fesm2022/ngwr-stepper.mjs +6 -6
  346. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  347. package/fesm2022/ngwr-storage.mjs +3 -3
  348. package/fesm2022/ngwr-storage.mjs.map +1 -1
  349. package/fesm2022/ngwr-switch-testing.mjs.map +1 -1
  350. package/fesm2022/ngwr-switch.mjs +3 -3
  351. package/fesm2022/ngwr-switch.mjs.map +1 -1
  352. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  353. package/fesm2022/ngwr-table.mjs +18 -18
  354. package/fesm2022/ngwr-table.mjs.map +1 -1
  355. package/fesm2022/ngwr-tabs-router.mjs +3 -3
  356. package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
  357. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  358. package/fesm2022/ngwr-tabs.mjs +6 -6
  359. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  360. package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
  361. package/fesm2022/ngwr-textarea.mjs +3 -3
  362. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  363. package/fesm2022/ngwr-theme.mjs +3 -3
  364. package/fesm2022/ngwr-theme.mjs.map +1 -1
  365. package/fesm2022/ngwr-tilt-card-testing.mjs.map +1 -1
  366. package/fesm2022/ngwr-tilt-card.mjs +6 -6
  367. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  368. package/fesm2022/ngwr-timeline.mjs +6 -6
  369. package/fesm2022/ngwr-timeline.mjs.map +1 -1
  370. package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
  371. package/fesm2022/ngwr-toast.mjs +9 -9
  372. package/fesm2022/ngwr-toast.mjs.map +1 -1
  373. package/fesm2022/ngwr-toolbar.mjs +10 -3
  374. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  375. package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
  376. package/fesm2022/ngwr-tour.mjs +6 -6
  377. package/fesm2022/ngwr-tour.mjs.map +1 -1
  378. package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
  379. package/fesm2022/ngwr-transfer.mjs +3 -3
  380. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  381. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  382. package/fesm2022/ngwr-tree.mjs +3 -3
  383. package/fesm2022/ngwr-tree.mjs.map +1 -1
  384. package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -1
  385. package/fesm2022/ngwr-typewriter.mjs +3 -3
  386. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  387. package/fesm2022/ngwr-typography.mjs +7 -3
  388. package/fesm2022/ngwr-typography.mjs.map +1 -1
  389. package/fesm2022/ngwr-utils.mjs.map +1 -1
  390. package/fesm2022/ngwr-validators.mjs.map +1 -1
  391. package/fesm2022/ngwr-version.mjs +1 -1
  392. package/fesm2022/ngwr-version.mjs.map +1 -1
  393. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  394. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  395. package/fesm2022/ngwr-waves-testing.mjs.map +1 -1
  396. package/fesm2022/ngwr-waves.mjs +3 -3
  397. package/fesm2022/ngwr-waves.mjs.map +1 -1
  398. package/fesm2022/ngwr-window-testing.mjs.map +1 -1
  399. package/fesm2022/ngwr-window.mjs +12 -12
  400. package/fesm2022/ngwr-window.mjs.map +1 -1
  401. package/form/styles/_index.scss +16 -1
  402. package/gauge/styles/_index.scss +1 -0
  403. package/i18n/ar.json +32 -1
  404. package/i18n/cs.json +32 -1
  405. package/i18n/de.json +32 -1
  406. package/i18n/en.json +32 -1
  407. package/i18n/es.json +32 -1
  408. package/i18n/fr.json +32 -1
  409. package/i18n/he.json +32 -1
  410. package/i18n/hi.json +32 -1
  411. package/i18n/id.json +32 -1
  412. package/i18n/it.json +32 -1
  413. package/i18n/ja.json +32 -1
  414. package/i18n/ko.json +32 -1
  415. package/i18n/nl.json +32 -1
  416. package/i18n/pl.json +32 -1
  417. package/i18n/pt.json +32 -1
  418. package/i18n/ru.json +32 -1
  419. package/i18n/sv.json +32 -1
  420. package/i18n/tr.json +32 -1
  421. package/i18n/uk.json +32 -1
  422. package/i18n/vi.json +32 -1
  423. package/i18n/zh-TW.json +32 -1
  424. package/i18n/zh.json +32 -1
  425. package/input/styles/_index.scss +24 -1
  426. package/input-number/styles/_index.scss +69 -0
  427. package/input-otp/styles/_index.scss +5 -5
  428. package/line-chart/styles/_index.scss +30 -2
  429. package/llms-full.txt +14 -4
  430. package/llms.txt +188 -132
  431. package/mcp/providers.js +2 -2
  432. package/mcp/server.js +1 -1
  433. package/meter-group/styles/_index.scss +1 -0
  434. package/overlay/styles/_arrow.scss +30 -2
  435. package/package.json +43 -2
  436. package/page-header/styles/_index.scss +37 -1
  437. package/pagination/styles/_index.scss +9 -5
  438. package/popover/styles/_index.scss +73 -5
  439. package/progress/styles/_index.scss +4 -0
  440. package/radio/styles/_index.scss +4 -1
  441. package/schematics/use/symbol-map.json +1 -0
  442. package/select/styles/_index.scss +51 -12
  443. package/sidebar/styles/_index.scss +44 -2
  444. package/skeleton/styles/_index.scss +3 -0
  445. package/skills/ngwr/SKILL.md +5 -5
  446. package/skills/ngwr/references/catalog.md +2 -0
  447. package/skills/ngwr/references/setup.md +3 -3
  448. package/sparkline/styles/_index.scss +19 -0
  449. package/styles.scss +1 -0
  450. package/table/styles/_index.scss +7 -0
  451. package/textarea/styles/_index.scss +12 -3
  452. package/theme/styles/_colors.scss +39 -13
  453. package/theme/styles/_contrast.scss +9 -7
  454. package/toast/styles/_index.scss +4 -0
  455. package/toolbar/styles/_index.scss +35 -1
  456. package/tree/styles/_index.scss +46 -7
  457. package/types/ngwr-badge.d.ts +22 -7
  458. package/types/ngwr-bar-chart.d.ts +19 -1
  459. package/types/ngwr-calendar-heatmap.d.ts +29 -1
  460. package/types/ngwr-checkbox.d.ts +2 -0
  461. package/types/ngwr-config.d.ts +12 -0
  462. package/types/ngwr-date-picker.d.ts +308 -43
  463. package/types/ngwr-donut-chart.d.ts +24 -1
  464. package/types/ngwr-dropdown.d.ts +22 -2
  465. package/types/ngwr-editor-testing.d.ts +378 -0
  466. package/types/ngwr-editor.d.ts +449 -0
  467. package/types/ngwr-event-calendar.d.ts +8 -0
  468. package/types/ngwr-form.d.ts +35 -5
  469. package/types/ngwr-gauge.d.ts +20 -1
  470. package/types/ngwr-input-number.d.ts +7 -0
  471. package/types/ngwr-line-chart.d.ts +9 -1
  472. package/types/ngwr-markdown.d.ts +61 -2
  473. package/types/ngwr-meter-group-testing.d.ts +3 -2
  474. package/types/ngwr-meter-group.d.ts +14 -1
  475. package/types/ngwr-page-header.d.ts +10 -2
  476. package/types/ngwr-popover.d.ts +154 -3
  477. package/types/ngwr-sidebar.d.ts +7 -0
  478. package/types/ngwr-sparkline.d.ts +43 -1
  479. package/types/ngwr-toolbar.d.ts +7 -0
  480. package/types/ngwr-typography.d.ts +4 -0
  481. package/types/ngwr-version.d.ts +1 -1
  482. package/typography/styles/_index.scss +16 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwr-editor.mjs","sources":["../../../projects/lib/editor/internal/html.ts","../../../projects/lib/editor/internal/json.ts","../../../projects/lib/editor/internal/markdown.ts","../../../projects/lib/editor/internal/schema.ts","../../../projects/lib/editor/internal/codec.ts","../../../projects/lib/editor/internal/commands.ts","../../../projects/lib/editor/internal/icons.ts","../../../projects/lib/editor/internal/link-field.ts","../../../projects/lib/editor/internal/list-item-view.ts","../../../projects/lib/editor/toolbar.ts","../../../projects/lib/editor/editor.ts","../../../projects/lib/editor/editor.html","../../../projects/lib/editor/ngwr-editor.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { DOMParser as PmDOMParser, DOMSerializer, Fragment, type Node, type Schema } from 'prosemirror-model';\n\n/** Past this many nested elements the value is refused unread — see {@link readHtml}. */\nconst MAX_DOM_DEPTH = 512;\n\n/** What the HTML parser collapses and strips, written where a space has to survive it. */\nconst NBSP = '\\u00a0';\n\n/** The part of the Trusted Types API this file touches. */\ninterface WrTrustedTypePolicy {\n createHTML(input: string): unknown;\n}\n\ninterface WrTrustedTypes {\n readonly defaultPolicy?: WrTrustedTypePolicy | null;\n createPolicy(name: string, rules: { createHTML: (input: string) => string }): WrTrustedTypePolicy;\n}\n\n/** One answer per window, `null` where there is no policy to use. */\nconst policies = new WeakMap<object, WrTrustedTypePolicy | null>();\n\n/**\n * An HTML string wrapped for a `trusted-types` page, decided once per window and\n * only where the API exists.\n *\n * A template's `innerHTML` is a Trusted Types sink like any other, and under\n * `require-trusted-types-for 'script'` a plain string throws. Pass-through is\n * sound HERE and nowhere else: the string lands in an inert template, and what\n * leaves it is rebuilt node by node from the schema's allowlist — the same\n * argument ProseMirror makes for its own clipboard policy.\n *\n * The page's default policy comes first, as it does in ProseMirror's clipboard\n * code; then one named `ngwr-editor`. Creating that one THROWS on a page whose\n * `trusted-types` allowlist does not name it, and uncaught that refused every\n * HTML value on the page — so a refusal falls back to the plain string, which\n * such a page refuses at the sink instead, as a value the editor could not read.\n * An app with an allowlist and no default policy adds `ngwr-editor` (and\n * ProseMirror's own `ProseMirrorClipboard`, for paste).\n */\nfunction trusted(html: string, view: (Window & typeof globalThis) | null): string {\n const types = (view as unknown as { trustedTypes?: WrTrustedTypes } | null)?.trustedTypes;\n if (!view || !types) return html;\n let policy = policies.get(view);\n if (policy === undefined) {\n policy = types.defaultPolicy ?? null;\n if (!policy) {\n try {\n policy = types.createPolicy('ngwr-editor', { createHTML: input => input });\n } catch {\n policy = null;\n }\n }\n policies.set(view, policy);\n }\n return (policy ? policy.createHTML(html) : html) as string;\n}\n\n/**\n * An untrusted HTML string as a checked document, or a thrown `RangeError`.\n *\n * Parsed into a `<template>` of the INJECTED document, never into a live node:\n * a template's content has no browsing context, so a `<script>` does not run, an\n * `<img onerror>` never loads and no handler fires. It is also the one inert\n * parser the server has — domino ships no `DOMParser`. From there the schema's\n * parse rules rebuild the document from an allowlist, so an attribute they do\n * not name never reaches it, and a link or image the URL policy refuses keeps its\n * text and loses the URL.\n *\n * Depth is checked before ProseMirror sees the tree: its parser recurses, a\n * browser's HTML parser caps nesting on its own and neither jsdom nor domino\n * does.\n */\nfunction readHtml(html: string, document: Document, schema: Schema): Node {\n const template = document.createElement('template');\n template.innerHTML = trusted(html, document.defaultView);\n if (depthOf(template.content) > MAX_DOM_DEPTH) throw new RangeError('<wr-editor>: the HTML value nests too deeply');\n const doc = PmDOMParser.fromSchema(schema).parse(template.content);\n doc.check();\n return doc;\n}\n\nfunction depthOf(root: ParentNode): number {\n let deepest = 0;\n const stack: [Element, number][] = [];\n for (let child = root.firstElementChild; child; child = child.nextElementSibling) stack.push([child, 1]);\n while (stack.length) {\n const [element, depth] = stack.pop()!;\n if (depth > deepest) deepest = depth;\n if (deepest > MAX_DOM_DEPTH) return deepest;\n for (let child = element.firstElementChild; child; child = child.nextElementSibling) stack.push([child, depth + 1]);\n }\n return deepest;\n}\n\n/**\n * A document as HTML, serialized in a document of its own.\n *\n * Never the live one: an `<img>` created by the page's document starts loading\n * the moment its `src` is set, attached or not. On the server the injected\n * document is domino's and loads nothing, which is also why the fallback is safe\n * where `createHTMLDocument` is missing.\n *\n * Spaces are written the way {@link keepSpaces} says, so the editor's own output\n * reads back as the text it was written from.\n */\nfunction writeHtml(doc: Node, document: Document): string {\n const off = document.implementation?.createHTMLDocument?.('') ?? document;\n const container = off.createElement('div');\n const content = withKeptSpaces(doc).content;\n container.appendChild(DOMSerializer.fromSchema(doc.type.schema).serializeFragment(content, { document: off }));\n return container.innerHTML;\n}\n\nfunction withKeptSpaces(node: Node): Node {\n if (node.isTextblock) return keepSpaces(node);\n if (node.isLeaf) return node;\n const children: Node[] = [];\n let changed = false;\n node.forEach(child => {\n const next = withKeptSpaces(child);\n changed ||= next !== child;\n children.push(next);\n });\n return changed ? node.copy(Fragment.from(children)) : node;\n}\n\n/**\n * A textblock whose spaces survive the HTML parser: every space it would collapse\n * or strip is written as a no-break space.\n *\n * The surface draws spaces as typed (`white-space: break-spaces`), but the parser\n * that reads a value back — ProseMirror's, and a browser's rendering of the same\n * HTML — collapses a run into one and drops one at the start of a block, after a\n * line break and at the end. So a space stays a space only where a character\n * other than a space comes before it and anything but the block's end comes\n * after; the rest alternate as no-break spaces, the way CKEditor writes them. A\n * run that crosses a mark boundary is still one run. A code block is read with\n * its whitespace kept, and left alone.\n */\nfunction keepSpaces(block: Node): Node {\n if (block.type.spec.code || !block.textContent.includes(' ')) return block;\n const children: Node[] = [];\n let before: 'start' | 'space' | 'other' = 'start';\n let changed = false;\n block.forEach((child, _offset, index) => {\n if (!child.isText) {\n children.push(child);\n before = child.type.name === 'hard_break' ? 'start' : 'other';\n return;\n }\n const text = child.text!;\n const last = index === block.childCount - 1;\n let out = '';\n for (let i = 0; i < text.length; i++) {\n const char = text[i];\n if (char !== ' ') {\n out += char;\n before = 'other';\n } else if (before === 'other' && !(last && i === text.length - 1)) {\n out += ' ';\n before = 'space';\n } else {\n out += NBSP;\n before = 'other';\n }\n }\n changed ||= out !== text;\n children.push(out === text ? child : block.type.schema.text(out, child.marks));\n });\n return changed ? block.copy(Fragment.from(children)) : block;\n}\n\nexport { readHtml, writeHtml };\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { Node, Schema } from 'prosemirror-model';\n\nimport type { WrEditorJson } from '../interfaces';\n\n/**\n * How deep a JSON value may nest before it is refused unread.\n *\n * Not the editing limit — that is `MAX_NESTING`, counted in quotes and list\n * items. This one is the stack's: `Node.fromJSON` and `check()` both recurse,\n * and about three thousand nested blocks overflow them. A document the editor\n * itself can produce is nowhere near it (eleven levels of list is under forty\n * JSON levels), so anything past it was not written by an editor.\n */\nconst MAX_JSON_DEPTH = 256;\n\n/**\n * An untrusted JSON value as a checked document, or a thrown `RangeError`.\n *\n * Both steps are needed. `nodeFromJSON` refuses an unknown node or mark, an\n * empty text node and an attribute its validator rejects — the URL policy\n * among them — but does NOT check content expressions; `check()` does, and\n * re-runs the validators besides. The shape pass in front keeps a malformed or\n * hostile value from reaching either: a non-object, a `text` that is not a\n * string, or nesting past {@link MAX_JSON_DEPTH}.\n */\nfunction readJson(value: unknown, schema: Schema): Node {\n assertShape(value, 0);\n const doc = schema.nodeFromJSON(value);\n if (doc.type !== schema.topNodeType) throw new RangeError('<wr-editor>: a JSON value is a `doc` node');\n doc.check();\n return doc;\n}\n\nfunction assertShape(value: unknown, depth: number): asserts value is WrEditorJson {\n if (depth > MAX_JSON_DEPTH) throw new RangeError('<wr-editor>: the JSON value nests too deeply');\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new RangeError('<wr-editor>: every JSON node is an object');\n }\n const node = value as Record<string, unknown>;\n if (typeof node['type'] !== 'string') throw new RangeError('<wr-editor>: every JSON node has a string `type`');\n if (node['text'] !== undefined && typeof node['text'] !== 'string') {\n throw new RangeError('<wr-editor>: `text` is a string');\n }\n for (const key of ['attrs', 'marks', 'content'] as const) {\n const child = node[key];\n if (child === undefined) continue;\n if (key === 'attrs') {\n if (typeof child !== 'object' || child === null || Array.isArray(child)) {\n throw new RangeError('<wr-editor>: `attrs` is an object');\n }\n continue;\n }\n if (!Array.isArray(child)) throw new RangeError(`<wr-editor>: \\`${key}\\` is an array`);\n for (const item of child) assertShape(item, depth + 1);\n }\n}\n\nexport { readJson };\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n type WrMarkdownAlign,\n type WrMarkdownBlock,\n type WrMarkdownCell,\n type WrMarkdownInline,\n type WrMarkdownListItem,\n parseMarkdown,\n serializeMarkdown,\n} from 'ngwr/markdown';\n\nimport type { WrEditorJson, WrEditorMarkJson } from '../interfaces';\n\n/**\n * Markdown to and from the editor's document JSON — both walkers pure, with no\n * ProseMirror import, so they run under SSR and in a spec with no DOM.\n *\n * The reading half never passes `streaming: true`: that mode withholds a\n * trailing `**` or `[` as a half-typed fragment, which in an editor would delete\n * what the user actually wrote.\n */\n\n// ---------------------------------------------------------------------------\n// Markdown → document\n// ---------------------------------------------------------------------------\n\n/** A markdown string as the editor's document JSON. */\nfunction markdownToJson(source: string): WrEditorJson {\n const content = blocksToJson(parseMarkdown(source));\n return { type: 'doc', content: content.length ? content : [{ type: 'paragraph' }] };\n}\n\nfunction blocksToJson(blocks: readonly WrMarkdownBlock[]): WrEditorJson[] {\n return blocks.map(blockToJson);\n}\n\nfunction blockToJson(block: WrMarkdownBlock): WrEditorJson {\n switch (block.kind) {\n case 'paragraph':\n return textblock('paragraph', undefined, block.inlines);\n case 'heading':\n // The schema stops at three; h4–h6 keep being headings rather than turning\n // into paragraphs, the same clamp the HTML path applies.\n return textblock('heading', { level: Math.min(block.level, 3) }, block.inlines);\n case 'code':\n // An empty text node is refused by ProseMirror, so an empty fence has no\n // content. The info word goes through the schema's own rule, as it does on\n // the HTML path: the parser keeps a word of any length, the schema refuses\n // one past 64 characters, and passed on unchanged it refused the whole\n // document over one fence tagged with a URL.\n return {\n type: 'code_block',\n attrs: { language: languageValue(block.language) },\n ...(block.code ? { content: [{ type: 'text', text: block.code }] } : {}),\n };\n case 'quote': {\n const children = blocksToJson(block.children);\n return { type: 'blockquote', content: children.length ? children : [{ type: 'paragraph' }] };\n }\n case 'list':\n return {\n type: block.ordered ? 'ordered_list' : 'bullet_list',\n attrs: block.ordered ? { order: block.start, tight: block.tight } : { tight: block.tight },\n content: block.items.map(itemToJson),\n };\n case 'table':\n return tableToJson(block.head, block.rows, block.align);\n case 'rule':\n return { type: 'horizontal_rule' };\n }\n}\n\n/**\n * A list item. Its content has to open with a paragraph — the shape\n * `prosemirror-schema-list`'s commands are written for — so an item that starts\n * with a code block, a quote or a nested list gets an empty paragraph in front,\n * which {@link jsonToMarkdown} drops again on the way out.\n */\nfunction itemToJson(item: WrMarkdownListItem): WrEditorJson {\n const children = blocksToJson(item.children);\n if (children[0]?.type !== 'paragraph') children.unshift({ type: 'paragraph' });\n return { type: 'list_item', attrs: { checked: item.checked }, content: children };\n}\n\nfunction tableToJson(\n head: readonly WrMarkdownCell[],\n rows: readonly (readonly WrMarkdownCell[])[],\n align: readonly WrMarkdownAlign[]\n): WrEditorJson {\n const row = (cells: readonly WrMarkdownCell[], type: 'table_header' | 'table_cell'): WrEditorJson => ({\n type: 'table_row',\n content: cells.map((cell, index) => ({\n type,\n attrs: { align: align[index] ?? null },\n content: [textblock('paragraph', undefined, cell.inlines)],\n })),\n });\n return { type: 'table', content: [row(head, 'table_header'), ...rows.map(cells => row(cells, 'table_cell'))] };\n}\n\nfunction textblock(\n type: string,\n attrs: Readonly<Record<string, unknown>> | undefined,\n inlines: readonly WrMarkdownInline[]\n): WrEditorJson {\n const content = inlinesToJson(inlines);\n return { type, ...(attrs ? { attrs } : {}), ...(content.length ? { content } : {}) };\n}\n\n/**\n * Nested inline nodes flattened into leaves that each carry the marks collected\n * on the way down — the shape ProseMirror holds.\n *\n * A mark is added once however often it nests (`**a **b** c**`): a mark set with\n * the same mark twice is invalid to ProseMirror, and the whole value would be\n * refused over it. Adjacent leaves with the same marks are joined, because\n * `Node.fromJSON` does not join them and ProseMirror assumes it never sees two.\n */\nfunction inlinesToJson(inlines: readonly WrMarkdownInline[]): WrEditorJson[] {\n const out: WrEditorJson[] = [];\n collect(inlines, [], out);\n return out;\n}\n\nfunction collect(nodes: readonly WrMarkdownInline[], marks: readonly WrEditorMarkJson[], out: WrEditorJson[]): void {\n for (const node of nodes) {\n switch (node.kind) {\n case 'text':\n // A soft break and the indentation around it render as one space; kept\n // as `\\n`, the editor's `pre-wrap` would draw a line break the markdown\n // never had.\n pushText(out, node.value.replace(/\\s*\\n\\s*/g, ' '), marks);\n break;\n case 'code':\n pushText(out, node.value, withMark(marks, { type: 'code' }));\n break;\n case 'break':\n out.push(withMarks({ type: 'hard_break' }, marks));\n break;\n case 'image':\n out.push(\n withMarks(\n { type: 'image', attrs: { src: node.src, alt: node.alt, title: node.title } },\n marks.filter(mark => mark.type === 'link')\n )\n );\n break;\n case 'link':\n collect(node.children, withMark(marks, { type: 'link', attrs: { href: node.href, title: node.title } }), out);\n break;\n case 'strong':\n collect(node.children, withMark(marks, { type: 'strong' }), out);\n break;\n case 'em':\n collect(node.children, withMark(marks, { type: 'em' }), out);\n break;\n case 'del':\n collect(node.children, withMark(marks, { type: 'strike' }), out);\n break;\n }\n }\n}\n\nfunction withMark(marks: readonly WrEditorMarkJson[], mark: WrEditorMarkJson): readonly WrEditorMarkJson[] {\n // The outer one wins — for a link that is the one the reader would follow.\n return marks.some(existing => existing.type === mark.type) ? marks : [...marks, mark];\n}\n\nfunction withMarks(node: WrEditorJson, marks: readonly WrEditorMarkJson[]): WrEditorJson {\n return marks.length ? { ...node, marks } : node;\n}\n\nfunction pushText(out: WrEditorJson[], text: string, marks: readonly WrEditorMarkJson[]): void {\n if (!text) return;\n const last = out[out.length - 1];\n if (last?.type === 'text' && sameMarks(last.marks ?? [], marks)) {\n out[out.length - 1] = { ...last, text: last.text + text };\n return;\n }\n out.push(withMarks({ type: 'text', text }, marks));\n}\n\nfunction sameMarks(a: readonly WrEditorMarkJson[], b: readonly WrEditorMarkJson[]): boolean {\n if (a.length !== b.length) return false;\n const key = (mark: WrEditorMarkJson): string => `${mark.type}:${JSON.stringify(mark.attrs ?? null)}`;\n const left = a.map(key).sort();\n const right = b.map(key).sort();\n return left.every((value, index) => value === right[index]);\n}\n\n// ---------------------------------------------------------------------------\n// Document → markdown\n// ---------------------------------------------------------------------------\n\n/**\n * The editor's document JSON as markdown, through `serializeMarkdown` — so the\n * editor writes exactly the dialect `<wr-markdown>` renders.\n *\n * Underline has no markdown spelling and is dropped (in `markdown` format the\n * schema does not carry it in the first place). Everything else the schema holds\n * has a markdown form; what the serializer normalises is listed on\n * `serializeMarkdown` itself.\n */\nfunction jsonToMarkdown(doc: WrEditorJson): string {\n return serializeMarkdown(childrenToBlocks(doc));\n}\n\nfunction childrenToBlocks(node: WrEditorJson): WrMarkdownBlock[] {\n return (node.content ?? []).flatMap(jsonToBlock);\n}\n\nfunction jsonToBlock(node: WrEditorJson): WrMarkdownBlock[] {\n const attrs = node.attrs ?? {};\n switch (node.type) {\n case 'paragraph':\n return [{ kind: 'paragraph', inlines: jsonToInlines(node.content ?? []) }];\n case 'heading':\n return [\n {\n kind: 'heading',\n level: headingLevel(attrs['level']),\n inlines: jsonToInlines(node.content ?? []),\n id: '',\n },\n ];\n case 'code_block':\n return [\n {\n kind: 'code',\n language: typeof attrs['language'] === 'string' ? attrs['language'] : null,\n code: (node.content ?? []).map(child => child.text ?? '').join(''),\n closed: true,\n },\n ];\n case 'blockquote':\n return [{ kind: 'quote', children: childrenToBlocks(node) }];\n case 'bullet_list':\n case 'ordered_list':\n return [\n {\n kind: 'list',\n ordered: node.type === 'ordered_list',\n start: node.type === 'ordered_list' && typeof attrs['order'] === 'number' ? attrs['order'] : 1,\n tight: attrs['tight'] !== false,\n items: (node.content ?? []).map(jsonToItem),\n },\n ];\n case 'table':\n return tableBlock(node);\n case 'horizontal_rule':\n return [{ kind: 'rule' }];\n default:\n return [];\n }\n}\n\nfunction headingLevel(value: unknown): 1 | 2 | 3 {\n return value === 2 || value === 3 ? value : 1;\n}\n\nfunction jsonToItem(item: WrEditorJson): WrMarkdownListItem {\n const content = item.content ?? [];\n // The filler paragraph `itemToJson` put in front of a non-paragraph block.\n const filler = content.length > 1 && content[0].type === 'paragraph' && !(content[0].content ?? []).length;\n const checked = item.attrs?.['checked'];\n return {\n children: (filler ? content.slice(1) : content).flatMap(jsonToBlock),\n checked: typeof checked === 'boolean' ? checked : null,\n };\n}\n\n/**\n * A table as markdown, every row as wide as the widest one.\n *\n * A markdown table is as wide as its header, and `serializeMarkdown` fits every\n * row to it — but a document can hold a header narrower than the rows below it:\n * a paste whose merged header came across one cell short, since `colspan` is not\n * read. Fitted to that header, the cells past it were on screen and never saved.\n * So the header grows empty cells instead, which markdown can carry.\n */\nfunction tableBlock(table: WrEditorJson): WrMarkdownBlock[] {\n const rows = (table.content ?? []).map(row => row.content ?? []);\n const width = rows.reduce((widest, cells) => Math.max(widest, cells.length), 0);\n const [first, ...body] = rows;\n if (!first?.length) return [];\n const head = Array.from({ length: width }, (_, index) => first[index]);\n\n const cellOf = (cell: WrEditorJson | undefined): WrMarkdownCell => ({\n // Markdown has one line per cell: a cell's paragraphs join with a space.\n inlines: (cell?.content ?? []).flatMap((paragraph, index) => [\n ...(index ? [{ kind: 'text', value: ' ' } as const] : []),\n ...jsonToInlines(paragraph.content ?? []),\n ]),\n });\n const align = head.map(cell => {\n const value = cell?.attrs?.['align'];\n return value === 'start' || value === 'center' || value === 'end' ? value : null;\n });\n\n return [\n {\n kind: 'table',\n head: head.map(cellOf),\n rows: body.map(cells => head.map((_, index) => cellOf(cells[index]))),\n align,\n },\n ];\n}\n\n/**\n * Leaves back into an inline tree, each wrapped in its own marks.\n *\n * Deliberately naive: `serializeMarkdown` flattens whatever tree it is given to\n * the same leaves-with-mark-sets and regroups them in its one canonical nesting,\n * so wrapping every leaf separately writes exactly what a hand-merged tree would.\n */\nfunction jsonToInlines(nodes: readonly WrEditorJson[]): WrMarkdownInline[] {\n return nodes.flatMap((node): WrMarkdownInline[] => {\n const marks = node.marks ?? [];\n switch (node.type) {\n case 'text': {\n const code = marks.some(mark => mark.type === 'code');\n const text = node.text ?? '';\n return text ? [wrap(code ? { kind: 'code', value: text } : { kind: 'text', value: text }, marks)] : [];\n }\n case 'hard_break':\n return [wrap({ kind: 'break' }, marks)];\n case 'image': {\n const attrs = node.attrs ?? {};\n return [\n wrap(\n {\n kind: 'image',\n src: stringOf(attrs['src']),\n alt: stringOf(attrs['alt']),\n title: typeof attrs['title'] === 'string' ? attrs['title'] : null,\n },\n marks\n ),\n ];\n }\n default:\n return [];\n }\n });\n}\n\nfunction stringOf(value: unknown): string {\n return typeof value === 'string' ? value : '';\n}\n\n// ---------------------------------------------------------------------------\n// Shared with the schema\n// ---------------------------------------------------------------------------\n\n/**\n * A fence's info word: what markdown keeps, and nothing that could break out of\n * it — or `null`. The one rule for a code block's language on every path in,\n * which is why it lives here, where the markdown walker needs it without\n * importing ProseMirror.\n */\nfunction languageValue(raw: string | null): string | null {\n const word = (raw ?? '').trim().split(/\\s+/)[0].toLowerCase();\n return word && word.length <= 64 ? word : null;\n}\n\nfunction wrap(leaf: WrMarkdownInline, marks: readonly WrEditorMarkJson[]): WrMarkdownInline {\n let node = leaf;\n for (const mark of marks) {\n switch (mark.type) {\n case 'strong':\n node = { kind: 'strong', children: [node] };\n break;\n case 'em':\n node = { kind: 'em', children: [node] };\n break;\n case 'strike':\n node = { kind: 'del', children: [node] };\n break;\n case 'link': {\n const attrs = mark.attrs ?? {};\n node = {\n kind: 'link',\n href: stringOf(attrs['href']),\n title: typeof attrs['title'] === 'string' ? attrs['title'] : null,\n children: [node],\n };\n break;\n }\n // `code` is the leaf itself, and `underline` has no markdown form.\n }\n }\n return node;\n}\n\nexport { markdownToJson, jsonToMarkdown, languageValue };\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { safeMarkdownUrl } from 'ngwr/markdown';\nimport { type Mark, type MarkSpec, type Node, type NodeSpec, Schema } from 'prosemirror-model';\n\nimport { languageValue } from './markdown';\n\n/**\n * How deep blockquotes and list items may nest: the deepest document markdown\n * reads back with its structure. `parseMarkdown` parses twelve block levels and\n * keeps whatever sits at the twelfth as literal text, so the CONTENT of a twelfth\n * quote or item would come back flattened — a heading in there reads back as a\n * paragraph saying `## …`. Each quote and each list item is one level, as it is\n * there.\n */\nconst MAX_NESTING = 11;\n\n/** The `align` values a table cell may carry — `ngwr/markdown`'s own vocabulary. */\nconst ALIGNS: ReadonlySet<unknown> = new Set([null, 'start', 'center', 'end']);\n\n/** The largest ordinal the markdown parser reads back (`\\d{1,9}`). */\nconst MAX_ORDER = 999999999;\n\n/**\n * The one URL policy of all three formats, as a schema rule.\n *\n * `safeMarkdownUrl` is what `parseMarkdown` already applies, so the markdown path\n * never produces a refused URL. The HTML path asks it in `getAttrs`, where a\n * refusal drops the link and keeps its text. And the JSON path — plus every\n * attribute ProseMirror validates since view 1.42.3, clipboard slice context\n * included — hits these validators, which THROW: a JSON value holding a refused\n * URL is refused as a whole, the same as one holding an unknown node.\n */\nfunction requireUrl(kind: 'link' | 'image') {\n return (value: unknown): void => {\n if (typeof value !== 'string' || safeMarkdownUrl(value, kind) !== value) {\n throw new RangeError(`<wr-editor>: refused ${kind} URL`);\n }\n };\n}\n\nfunction nullableString(value: unknown): void {\n if (value !== null && typeof value !== 'string') throw new RangeError('<wr-editor>: expected a string or null');\n}\n\n/**\n * The attributes of an `<a>` a pasted or bound document may keep: the href, and\n * only when the policy allows it. `false` drops the mark and keeps the text —\n * which is why this refuses rather than rewrites.\n */\nfunction linkAttrs(dom: HTMLElement): false | { href: string; title: string | null } {\n const href = safeMarkdownUrl(dom.getAttribute('href') ?? '', 'link');\n return href ? { href, title: dom.getAttribute('title') } : false;\n}\n\nfunction imageAttrs(dom: HTMLElement): false | { src: string; alt: string; title: string | null } {\n const src = safeMarkdownUrl(dom.getAttribute('src') ?? '', 'image');\n return src ? { src, alt: dom.getAttribute('alt') ?? '', title: dom.getAttribute('title') } : false;\n}\n\n/**\n * A list item's task state, from this schema's own `data-checked` or from the\n * `<input type=\"checkbox\">` GitHub-style renderers put first in the item.\n */\nfunction checkedOf(dom: HTMLElement): boolean | null {\n const data = dom.getAttribute('data-checked');\n if (data === 'true' || data === 'false') return data === 'true';\n for (let child = dom.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === 3 && !(child.textContent ?? '').trim()) continue;\n if (child.nodeName !== 'INPUT') return null;\n const input = child as HTMLInputElement;\n return (input.getAttribute('type') ?? '').toLowerCase() === 'checkbox' ? input.hasAttribute('checked') : null;\n }\n return null;\n}\n\nfunction alignOf(dom: HTMLElement): 'start' | 'center' | 'end' | null {\n // The first one that says anything: an element with no inline style reports\n // `''` for it, not null, so a nullish fallback would stop there.\n const raw = [dom.getAttribute('data-align'), dom.style?.textAlign, dom.getAttribute('align')].find(Boolean) ?? '';\n const word = raw.toLowerCase();\n if (word === 'center') return 'center';\n if (word === 'start' || word === 'left') return 'start';\n if (word === 'end' || word === 'right') return 'end';\n return null;\n}\n\nfunction languageOf(dom: HTMLElement): string | null {\n const code = dom.querySelector('code');\n const named = dom.getAttribute('data-language') ?? code?.getAttribute('data-language');\n const fromClass = /(?:^|\\s)language-(\\S+)/.exec(code?.getAttribute('class') ?? '')?.[1];\n return languageValue(named ?? fromClass ?? null);\n}\n\nfunction orderOf(dom: HTMLElement): number {\n const start = Number.parseInt(dom.getAttribute('start') ?? '', 10);\n return Number.isFinite(start) ? Math.min(Math.max(start, 0), MAX_ORDER) : 1;\n}\n\nconst nodes: Record<string, NodeSpec> = {\n doc: { content: 'block+' },\n\n paragraph: {\n group: 'block',\n content: 'inline*',\n parseDOM: [{ tag: 'p' }],\n toDOM: () => ['p', 0],\n },\n\n heading: {\n group: 'block',\n content: 'inline*',\n defining: true,\n attrs: {\n level: {\n default: 1,\n // A FUNCTION, not `'number'`: the level becomes a tag name in `toDOM`,\n // and a type check alone accepts `{ level: 9 }`.\n validate: (value: unknown) => {\n if (value !== 1 && value !== 2 && value !== 3) throw new RangeError('<wr-editor>: heading level is 1–3');\n },\n },\n },\n // h4–h6 clamp to h3 rather than falling through to a paragraph, which would\n // lose the fact that the line was a heading at all.\n parseDOM: [\n { tag: 'h1', attrs: { level: 1 } },\n { tag: 'h2', attrs: { level: 2 } },\n { tag: 'h3', attrs: { level: 3 } },\n { tag: 'h4', attrs: { level: 3 } },\n { tag: 'h5', attrs: { level: 3 } },\n { tag: 'h6', attrs: { level: 3 } },\n ],\n toDOM: node => [`h${Math.min(Math.max(Number(node.attrs['level']) || 1, 1), 3)}`, 0],\n },\n\n blockquote: {\n group: 'block',\n content: 'block+',\n defining: true,\n parseDOM: [{ tag: 'blockquote' }],\n toDOM: () => ['blockquote', 0],\n },\n\n code_block: {\n group: 'block',\n content: 'text*',\n marks: '',\n code: true,\n defining: true,\n attrs: {\n language: {\n default: null,\n validate: (value: unknown) => {\n if (value !== null && (typeof value !== 'string' || languageValue(value) !== value)) {\n throw new RangeError('<wr-editor>: a code language is one lowercase word');\n }\n },\n },\n },\n parseDOM: [{ tag: 'pre', preserveWhitespace: 'full', getAttrs: dom => ({ language: languageOf(dom) }) }],\n toDOM: node => {\n const language = node.attrs['language'] as string | null;\n return ['pre', ['code', language ? { class: `language-${language}`, 'data-language': language } : {}, 0]];\n },\n },\n\n horizontal_rule: {\n group: 'block',\n parseDOM: [{ tag: 'hr' }],\n toDOM: () => ['hr'],\n },\n\n bullet_list: {\n group: 'block',\n content: 'list_item+',\n attrs: { tight: { default: true, validate: 'boolean' } },\n parseDOM: [{ tag: 'ul' }],\n toDOM: () => ['ul', 0],\n },\n\n ordered_list: {\n group: 'block',\n content: 'list_item+',\n attrs: {\n order: {\n default: 1,\n validate: (value: unknown) => {\n if (!Number.isInteger(value) || (value as number) < 0 || (value as number) > MAX_ORDER) {\n throw new RangeError('<wr-editor>: a list starts at a whole number');\n }\n },\n },\n tight: { default: true, validate: 'boolean' },\n },\n parseDOM: [{ tag: 'ol', getAttrs: dom => ({ order: orderOf(dom) }) }],\n toDOM: node => (node.attrs['order'] === 1 ? ['ol', 0] : ['ol', { start: String(node.attrs['order']) }, 0]),\n },\n\n list_item: {\n content: 'paragraph block*',\n defining: true,\n attrs: {\n checked: {\n default: null,\n validate: (value: unknown) => {\n if (value !== null && typeof value !== 'boolean') throw new RangeError('<wr-editor>: checked is a boolean');\n },\n },\n },\n parseDOM: [{ tag: 'li', getAttrs: dom => ({ checked: checkedOf(dom) }) }],\n toDOM: node => {\n const checked = node.attrs['checked'] as boolean | null;\n return checked === null ? ['li', 0] : ['li', { 'data-checked': String(checked) }, 0];\n },\n },\n\n table: {\n group: 'block',\n content: 'table_row+',\n isolating: true,\n parseDOM: [{ tag: 'table' }],\n toDOM: () => ['table', ['tbody', 0]],\n },\n\n table_row: {\n content: '(table_header | table_cell)+',\n parseDOM: [{ tag: 'tr' }],\n toDOM: () => ['tr', 0],\n },\n\n table_header: cell('th'),\n table_cell: cell('td'),\n\n text: { group: 'inline' },\n\n image: {\n group: 'inline',\n inline: true,\n draggable: true,\n attrs: {\n src: { validate: requireUrl('image') },\n alt: { default: '', validate: 'string' },\n title: { default: null, validate: nullableString },\n },\n parseDOM: [{ tag: 'img[src]', getAttrs: imageAttrs }],\n toDOM: node => {\n // Re-asked here: validators do not run on `type.create()`, so a node built\n // in code never passed through them.\n const src = safeMarkdownUrl(String(node.attrs['src'] ?? ''), 'image');\n const title = node.attrs['title'] as string | null;\n return ['img', { src: src ?? '', alt: String(node.attrs['alt'] ?? ''), ...(title ? { title } : {}) }];\n },\n },\n\n hard_break: {\n group: 'inline',\n inline: true,\n selectable: false,\n linebreakReplacement: true,\n parseDOM: [{ tag: 'br' }],\n toDOM: () => ['br'],\n },\n};\n\nfunction cell(tag: 'th' | 'td'): NodeSpec {\n return {\n content: 'paragraph+',\n isolating: true,\n attrs: {\n align: {\n default: null,\n validate: (value: unknown) => {\n if (!ALIGNS.has(value)) throw new RangeError('<wr-editor>: align is start, center or end');\n },\n },\n },\n parseDOM: [{ tag, getAttrs: dom => ({ align: alignOf(dom) }) }],\n // The value is one of three words — checked by the validator, and again\n // here — so writing it into `style` cannot carry anything the input chose.\n toDOM: node => {\n const align = node.attrs['align'] as string | null;\n return ALIGNS.has(align) && align ? [tag, { style: `text-align: ${align}` }, 0] : [tag, 0];\n },\n };\n}\n\n/**\n * Marks in nesting order, outermost first — which is also how `toDOM` nests\n * them in the HTML this writes.\n */\nfunction marks(underline: boolean): Record<string, MarkSpec> {\n return {\n link: {\n inclusive: false,\n attrs: {\n href: { validate: requireUrl('link') },\n title: { default: null, validate: nullableString },\n },\n parseDOM: [{ tag: 'a[href]', getAttrs: linkAttrs }],\n toDOM: (mark: Mark) => {\n const href = safeMarkdownUrl(String(mark.attrs['href'] ?? ''), 'link');\n if (!href) return ['span', 0];\n const title = mark.attrs['title'] as string | null;\n return ['a', { href, ...(title ? { title } : {}), rel: 'noopener noreferrer nofollow' }, 0];\n },\n },\n strong: {\n parseDOM: [\n { tag: 'strong' },\n // Google Docs wraps a whole paste in `<b style=\"font-weight: normal\">`.\n { tag: 'b', getAttrs: dom => dom.style.fontWeight !== 'normal' && null },\n { style: 'font-weight=400', clearMark: mark => mark.type.name === 'strong' },\n { style: 'font-weight', getAttrs: value => /^(bold(er)?|[5-9]\\d{2,})$/.test(value) && null },\n ],\n toDOM: () => ['strong', 0],\n },\n em: {\n parseDOM: [\n { tag: 'i' },\n { tag: 'em' },\n { style: 'font-style=italic' },\n { style: 'font-style=normal', clearMark: mark => mark.type.name === 'em' },\n ],\n toDOM: () => ['em', 0],\n },\n ...(underline\n ? {\n underline: {\n parseDOM: [\n { tag: 'u' },\n { style: 'text-decoration=underline' },\n { style: 'text-decoration-line=underline' },\n ],\n toDOM: () => ['u', 0],\n } satisfies MarkSpec,\n }\n : {}),\n strike: {\n parseDOM: [\n { tag: 's' },\n { tag: 'del' },\n { tag: 'strike' },\n { style: 'text-decoration=line-through' },\n { style: 'text-decoration-line=line-through' },\n ],\n toDOM: () => ['s', 0],\n },\n code: {\n code: true,\n parseDOM: [{ tag: 'code' }],\n toDOM: () => ['code', 0],\n },\n };\n}\n\nlet full: Schema | null = null;\nlet markdown: Schema | null = null;\n\n/**\n * The schema for a format, built on first use and shared after that.\n *\n * Markdown gets its own, one mark short: it has no underline, and a mark the\n * value cannot carry would paint on screen and vanish on save — from a paste,\n * where no toolbar button could have kept it out.\n */\nfunction editorSchema(format: 'html' | 'markdown' | 'json'): Schema {\n if (format === 'markdown') return (markdown ??= new Schema({ nodes, marks: marks(false) }));\n return (full ??= new Schema({ nodes, marks: marks(true) }));\n}\n\n/** How many blockquotes and list items deep the document's deepest block sits. */\nfunction nestingOf(doc: Node): number {\n let deepest = 0;\n const walk = (node: Node, depth: number): void => {\n node.forEach(child => {\n if (child.isTextblock || child.isLeaf) return;\n const next = child.type.name === 'blockquote' || child.type.name === 'list_item' ? depth + 1 : depth;\n if (next > deepest) deepest = next;\n walk(child, next);\n });\n };\n walk(doc, 0);\n return deepest;\n}\n\n/**\n * A document that is one empty textblock — the shape the placeholder is drawn\n * on. Which textblock is open: an empty heading shows the hint as well.\n *\n * Not the test for \"nothing written\"; that is {@link isBlankDoc}.\n */\nfunction isEmptyDoc(doc: Node): boolean {\n if (doc.childCount !== 1) return false;\n const only = doc.firstChild!;\n return only.isTextblock && only.childCount === 0;\n}\n\n/**\n * A document with nothing written in it: no text but whitespace, and no leaf\n * but line breaks. An image or a rule is content in its own right; structure\n * alone is not.\n *\n * Decided by content rather than by shape, because every one of these looks\n * empty and markdown already wrote them as `''`: Enter on an empty editor (two\n * empty paragraphs), a lone Shift-Enter, a few spaces, and a list, a quote or a\n * heading chosen on an empty editor. Written as anything else, `required()`\n * passed in `html` and `json` over an editor with nothing in it.\n */\nfunction isBlankDoc(doc: Node): boolean {\n let written = false;\n doc.descendants(node => {\n if (node.isText ? /\\S/.test(node.text!) : node.isLeaf && node.type.name !== 'hard_break') written = true;\n return !written;\n });\n return !written;\n}\n\nexport { MAX_NESTING, editorSchema, nestingOf, isEmptyDoc, isBlankDoc };\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { Node, Schema } from 'prosemirror-model';\n\nimport type { WrEditorFormat, WrEditorJson, WrEditorValue } from '../interfaces';\n\nimport { readHtml, writeHtml } from './html';\nimport { readJson } from './json';\nimport { jsonToMarkdown, markdownToJson } from './markdown';\nimport { isBlankDoc } from './schema';\n\n/**\n * The three formats meeting in one place. JSON is the pivot: markdown is walked\n * into it, HTML is parsed by the schema's own rules, and a bound JSON value is\n * validated like any other untrusted input.\n */\n\n/**\n * A bound value as a document in `schema`, or a thrown error naming why it was\n * refused. `null`, `undefined` and `''` are the empty document in every format.\n *\n * Throwing is the whole contract: the caller keeps the document it already has,\n * which is the rule `wr-input-number` and `wr-date-picker` follow for input they\n * cannot read. Nothing here ever returns a \"repaired\" document to write back.\n */\nexport function readValue(\n value: WrEditorValue | undefined,\n format: WrEditorFormat,\n schema: Schema,\n document: Document\n): Node {\n if (value === null || value === undefined || value === '') return schema.topNodeType.createAndFill()!;\n\n switch (format) {\n case 'json':\n if (typeof value === 'string') throw new RangeError('<wr-editor>: `format=\"json\"` takes an object, not a string');\n return readJson(value, schema);\n case 'markdown':\n if (typeof value !== 'string') throw new RangeError('<wr-editor>: `format=\"markdown\"` takes a string');\n return readJson(markdownToJson(value), schema);\n case 'html':\n if (typeof value !== 'string') throw new RangeError('<wr-editor>: `format=\"html\"` takes a string');\n return readHtml(value, document, schema);\n }\n}\n\n/**\n * A document in the bound format — `''` or `null` when nothing is written in it,\n * the same in all three: see {@link isBlankDoc}.\n */\nexport function writeValue(doc: Node, format: WrEditorFormat, document: Document): WrEditorValue {\n if (isBlankDoc(doc)) return format === 'json' ? null : '';\n\n switch (format) {\n case 'json':\n return doc.toJSON() as WrEditorJson;\n case 'markdown':\n return jsonToMarkdown(doc.toJSON() as WrEditorJson);\n case 'html':\n return writeHtml(doc, document);\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { baseKeymap, chainCommands, exitCode, setBlockType, toggleMark, wrapIn } from 'prosemirror-commands';\nimport { history, redo, undo } from 'prosemirror-history';\nimport { inputRules, textblockTypeInputRule, undoInputRule, wrappingInputRule } from 'prosemirror-inputrules';\nimport { keymap } from 'prosemirror-keymap';\nimport type { Mark, MarkType, NodeType, ResolvedPos, Schema } from 'prosemirror-model';\nimport { liftListItem, sinkListItem, splitListItem, wrapInList } from 'prosemirror-schema-list';\nimport { type Command, type EditorState, Plugin, TextSelection, type Transaction } from 'prosemirror-state';\n\nimport type { WrEditorTool } from '../interfaces';\n\nimport { MAX_NESTING, nestingOf } from './schema';\n\n/** Every tool but the separator. */\ntype WrEditorCommandTool = Exclude<WrEditorTool, '|'>;\n\n/** A shortcut, always on the platform's primary modifier (⌘ on Apple, Ctrl elsewhere). */\ninterface WrEditorShortcut {\n readonly key: string;\n readonly shift?: boolean;\n readonly alt?: boolean;\n}\n\n/**\n * The keyboard half of each tool — the keymap below binds exactly these, so a\n * hint can never name a shortcut that does nothing.\n *\n * Where a convention exists it is followed: Google Docs for the block types\n * (Mod-Alt-0…3, Mod-Shift-7/8), and Tiptap / Notion for the three it does not\n * cover (Mod-Shift-S strikethrough, Mod-E inline code, Mod-Shift-B quote,\n * Mod-Alt-C code block). The horizontal rule has none. Tab is deliberately not\n * bound — indenting with it would be a keyboard trap (WCAG 2.1.2), so list items\n * move with Mod-] and Mod-[ — and neither is Escape, which `<wr-dialog>` needs.\n *\n * Where a layout types `[` and `]` with AltGr or Option (German, French, the\n * Nordic and Polish layouts), the bracket chords are also read with that Alt\n * held — see {@link bracketKeys} — since nothing else indents a list item. The\n * Mod-Alt chords are NOT widened the same way: on Windows, Ctrl+Alt is AltGr, and\n * on those layouts AltGr+0 types `}` and AltGr+C types `ć`. Taking the chord by\n * physical key would make those characters impossible to type in the editor, so\n * there the key types its character and the toolbar sets the block type.\n */\nconst SHORTCUTS: Readonly<Partial<Record<WrEditorCommandTool, WrEditorShortcut>>> = {\n bold: { key: 'B' },\n italic: { key: 'I' },\n underline: { key: 'U' },\n strike: { key: 'S', shift: true },\n code: { key: 'E' },\n paragraph: { key: '0', alt: true },\n heading1: { key: '1', alt: true },\n heading2: { key: '2', alt: true },\n heading3: { key: '3', alt: true },\n bulletList: { key: '8', shift: true },\n orderedList: { key: '7', shift: true },\n blockquote: { key: 'B', shift: true },\n codeBlock: { key: 'C', alt: true },\n link: { key: 'K' },\n undo: { key: 'Z' },\n redo: { key: 'Z', shift: true },\n};\n\n/**\n * The tools a click toggles — the ones that carry `aria-pressed`. Not `link`,\n * which opens a panel: a popup button that also claimed to be pressed would say\n * two contradictory things.\n */\nconst TOGGLES: ReadonlySet<WrEditorCommandTool> = new Set<WrEditorCommandTool>([\n 'bold',\n 'italic',\n 'underline',\n 'strike',\n 'code',\n 'paragraph',\n 'heading1',\n 'heading2',\n 'heading3',\n 'bulletList',\n 'orderedList',\n 'blockquote',\n 'codeBlock',\n]);\n\n// ---------------------------------------------------------------------------\n// State\n// ---------------------------------------------------------------------------\n\nfunction markActive(state: EditorState, type: MarkType | undefined): boolean {\n if (!type) return false;\n const { empty, from, to, $from } = state.selection;\n if (empty) return !!type.isInSet(state.storedMarks ?? $from.marks());\n return state.doc.rangeHasMark(from, to, type);\n}\n\n/**\n * Whether every textblock the selection touches is `type` — asked of the blocks\n * themselves rather than of `$from.parent`, which is the DOCUMENT under a\n * select-all.\n */\nfunction parentIs(state: EditorState, type: NodeType, attrs?: Record<string, unknown>): boolean {\n const { empty, from, to, $from } = state.selection;\n if (empty) return $from.parent.hasMarkup(type, attrs);\n let found = false;\n let all = true;\n state.doc.nodesBetween(from, to, node => {\n if (!node.isTextblock) return true;\n found = true;\n if (!node.hasMarkup(type, attrs)) all = false;\n return false;\n });\n return found && all;\n}\n\n/** The nearest list around the selection, with the position it starts at. */\nfunction nearestList(state: EditorState): { readonly type: NodeType; readonly pos: number } | null {\n const { $from } = state.selection;\n for (let depth = $from.depth; depth > 0; depth--) {\n const node = $from.node(depth);\n if (node.type.name === 'bullet_list' || node.type.name === 'ordered_list') {\n return { type: node.type, pos: $from.before(depth) };\n }\n }\n return null;\n}\n\nfunction insideNode(state: EditorState, type: NodeType): boolean {\n const { $from } = state.selection;\n for (let depth = $from.depth; depth > 0; depth--) if ($from.node(depth).type === type) return true;\n return false;\n}\n\n/** Whether a tool's state is \"on\" at the selection — what `aria-pressed` reports. */\nfunction toolActive(tool: WrEditorCommandTool, state: EditorState): boolean {\n const { marks, nodes } = state.schema;\n switch (tool) {\n case 'bold':\n return markActive(state, marks['strong']);\n case 'italic':\n return markActive(state, marks['em']);\n case 'underline':\n return markActive(state, marks['underline']);\n case 'strike':\n return markActive(state, marks['strike']);\n case 'code':\n return markActive(state, marks['code']);\n case 'link':\n return linkRange(state) !== null;\n case 'paragraph':\n return parentIs(state, nodes['paragraph']);\n case 'heading1':\n return parentIs(state, nodes['heading'], { level: 1 });\n case 'heading2':\n return parentIs(state, nodes['heading'], { level: 2 });\n case 'heading3':\n return parentIs(state, nodes['heading'], { level: 3 });\n case 'codeBlock':\n return parentIs(state, nodes['code_block']);\n case 'bulletList':\n return nearestList(state)?.type === nodes['bullet_list'];\n case 'orderedList':\n return nearestList(state)?.type === nodes['ordered_list'];\n case 'blockquote':\n return insideNode(state, nodes['blockquote']);\n default:\n return false;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Commands\n// ---------------------------------------------------------------------------\n\n/** What a tool does, or `null` for one the schema cannot carry (underline in markdown). */\nfunction toolCommand(tool: WrEditorCommandTool, schema: Schema): Command | null {\n const { marks, nodes } = schema;\n const mark = (type: MarkType | undefined): Command | null => (type ? toggleMark(type) : null);\n const heading = (level: 1 | 2 | 3): Command => toggleBlock(nodes['heading'], nodes['paragraph'], { level });\n\n switch (tool) {\n case 'bold':\n return mark(marks['strong']);\n case 'italic':\n return mark(marks['em']);\n case 'underline':\n return mark(marks['underline']);\n case 'strike':\n return mark(marks['strike']);\n case 'code':\n return mark(marks['code']);\n // The link tool opens a panel; `setLink` is its command.\n case 'link':\n return toggleMark(marks['link'], { href: '#' });\n case 'paragraph':\n return setBlockType(nodes['paragraph']);\n case 'heading1':\n return heading(1);\n case 'heading2':\n return heading(2);\n case 'heading3':\n return heading(3);\n case 'codeBlock':\n return toggleBlock(nodes['code_block'], nodes['paragraph']);\n case 'bulletList':\n return toggleList(nodes['bullet_list'], nodes['list_item']);\n case 'orderedList':\n return toggleList(nodes['ordered_list'], nodes['list_item']);\n case 'blockquote':\n return toggleQuote(nodes['blockquote']);\n case 'horizontalRule':\n return insertRule(nodes['horizontal_rule']);\n case 'undo':\n return undo;\n case 'redo':\n return redo;\n }\n}\n\n/** A block type that switches back to a paragraph when it is already on. */\nfunction toggleBlock(type: NodeType, paragraph: NodeType, attrs?: Record<string, unknown>): Command {\n return (state, dispatch) =>\n parentIs(state, type, attrs)\n ? setBlockType(paragraph)(state, dispatch)\n : setBlockType(type, attrs)(state, dispatch);\n}\n\n/**\n * A list toggle: out of this kind of list, over to it from the other kind, or\n * into a new one.\n */\nfunction toggleList(type: NodeType, item: NodeType): Command {\n return (state, dispatch) => {\n const list = nearestList(state);\n if (!list) return wrapInList(type)(state, dispatch);\n if (list.type === type) return liftListItem(item)(state, dispatch);\n if (dispatch) {\n const tight = state.doc.nodeAt(list.pos)?.attrs['tight'] !== false;\n const attrs = type.name === 'ordered_list' ? { order: 1, tight } : { tight };\n dispatch(state.tr.setNodeMarkup(list.pos, type, attrs).scrollIntoView());\n }\n return true;\n };\n}\n\n/**\n * Into a quote, or out of the nearest one.\n *\n * Out is a hand-rolled lift rather than `prosemirror-commands`' `lift`, which\n * lifts out of whatever the selection's parent is — inside a quoted list that is\n * the list item, not the quote. The target depth is the quote's own parent; a\n * lift that does not fit there throws, and the throw is the \"cannot\".\n */\nfunction toggleQuote(quote: NodeType): Command {\n return (state, dispatch) => {\n const { $from, $to } = state.selection;\n const range = insideNode(state, quote) ? $from.blockRange($to, node => node.type === quote) : null;\n if (!range) return wrapIn(quote)(state, dispatch);\n try {\n const tr = state.tr.lift(range, range.depth - 1);\n if (dispatch) dispatch(tr.scrollIntoView());\n return true;\n } catch {\n return false;\n }\n };\n}\n\n/**\n * A horizontal rule at the selection, where one fits without leaving an\n * isolating node — a table cell holds paragraphs only, and splitting the table\n * around a rule is not what anyone clicking the button meant.\n */\nfunction insertRule(rule: NodeType): Command {\n return (state, dispatch) => {\n const { $from } = state.selection;\n let fits = false;\n for (let depth = $from.depth; depth >= 0; depth--) {\n const node = $from.node(depth);\n const index = $from.index(depth);\n if (node.canReplaceWith(index, index, rule)) {\n fits = true;\n break;\n }\n if (node.type.spec.isolating) break;\n }\n if (!fits) return false;\n if (dispatch) dispatch(state.tr.replaceSelectionWith(rule.create()).scrollIntoView());\n return true;\n };\n}\n\n// ---------------------------------------------------------------------------\n// Tables\n// ---------------------------------------------------------------------------\n\n/** The table around the selection, as a depth of `$from`, or `-1`. */\nfunction tableDepth(state: EditorState): number {\n const { $from } = state.selection;\n for (let depth = $from.depth; depth > 0; depth--) if ($from.node(depth).type.name === 'table') return depth;\n return -1;\n}\n\n/**\n * An empty paragraph beside the table at `depth`, with the caret in it — the one\n * way to a line the keyboard cannot otherwise reach. There is no gap cursor here,\n * and a cell holds paragraphs, so Enter only ever splits inside it.\n */\nfunction paragraphBeside(\n state: EditorState,\n depth: number,\n side: 'before' | 'after',\n dispatch?: (tr: Transaction) => void\n): boolean {\n const { $from } = state.selection;\n const paragraph = state.schema.nodes['paragraph'];\n const parent = $from.node(depth - 1);\n const index = $from.index(depth - 1) + (side === 'after' ? 1 : 0);\n if (!parent.canReplaceWith(index, index, paragraph)) return false;\n if (dispatch) {\n const pos = side === 'after' ? $from.after(depth) : $from.before(depth);\n const tr = state.tr.insert(pos, paragraph.create());\n dispatch(tr.setSelection(TextSelection.create(tr.doc, pos + 1)).scrollIntoView());\n }\n return true;\n}\n\n/** Mod-Enter in a table: out of it, onto a new line below — what `exitCode` does for a code block. */\nconst exitTable: Command = (state, dispatch) => {\n const depth = tableDepth(state);\n return depth > 0 && paragraphBeside(state, depth, 'after', dispatch);\n};\n\n/**\n * The arrow key off the edge of a table nothing can be reached past: ArrowDown on\n * the last line of its last row with no text anywhere after it, ArrowUp on the\n * first line of its first row with none before. Anywhere else the key moves the\n * caret as it always does. Up and down only — left and right swap ends under\n * `dir=\"rtl\"`, and the vertical pair means the same thing in both directions.\n */\nfunction leaveTable(side: 'before' | 'after'): Command {\n return (state, dispatch, view) => {\n if (view && !view.editable) return false;\n const depth = tableDepth(state);\n const { $from, empty } = state.selection;\n if (depth < 0 || !empty) return false;\n // table > row > cell > paragraph: the row's place in the table, and the\n // paragraph's in its cell.\n const table = $from.node(depth);\n const cell = $from.node(depth + 2);\n const row = $from.index(depth);\n const block = $from.index(depth + 2);\n const edge =\n side === 'after' ? row === table.childCount - 1 && block === cell.childCount - 1 : row === 0 && block === 0;\n if (!edge) return false;\n const onEdgeLine = view\n ? view.endOfTextblock(side === 'after' ? 'down' : 'up')\n : $from.parentOffset === (side === 'after' ? $from.parent.content.size : 0);\n if (!onEdgeLine) return false;\n const outside = state.doc.resolve(side === 'after' ? $from.after(depth) : $from.before(depth));\n if (TextSelection.findFrom(outside, side === 'after' ? 1 : -1, true)) return false;\n return paragraphBeside(state, depth, side, dispatch);\n };\n}\n\nfunction insertHardBreak(state: EditorState, dispatch?: (tr: Transaction) => void): boolean {\n const type = state.schema.nodes['hard_break'];\n const { $from } = state.selection;\n if (!$from.parent.canReplaceWith($from.index(), $from.index(), type)) return false;\n if (dispatch) dispatch(state.tr.replaceSelectionWith(type.create()).scrollIntoView());\n return true;\n}\n\n// ---------------------------------------------------------------------------\n// Links\n// ---------------------------------------------------------------------------\n\n/**\n * The run of text carrying one link around the selection — the whole link, when\n * the caret merely sits in it — or `null` when there is none.\n */\nfunction linkRange(state: EditorState): { readonly from: number; readonly to: number; readonly mark: Mark } | null {\n const type = state.schema.marks['link'];\n const { empty, from, to, $from } = state.selection;\n if (!empty) {\n let found: Mark | null = null;\n state.doc.nodesBetween(from, to, node => {\n found ??= type.isInSet(node.marks) ?? null;\n });\n return found ? { from, to, mark: found } : null;\n }\n return markAround($from, type);\n}\n\nfunction markAround($pos: ResolvedPos, type: MarkType): { from: number; to: number; mark: Mark } | null {\n const parent = $pos.parent;\n const start = $pos.start();\n const offsets: number[] = [];\n parent.forEach((_child, offset) => offsets.push(offset));\n\n // The child the caret is in — or, at a boundary, the one before it and then\n // the one after, since a non-inclusive mark does not report itself at its end.\n const index = $pos.index();\n const candidates = ($pos.textOffset > 0 ? [index] : [index - 1, index]).filter(i => i >= 0 && i < parent.childCount);\n for (const at of candidates) {\n const mark = type.isInSet(parent.child(at).marks);\n if (!mark) continue;\n let first = at;\n let last = at;\n while (first > 0 && mark.isInSet(parent.child(first - 1).marks)) first--;\n while (last < parent.childCount - 1 && mark.isInSet(parent.child(last + 1).marks)) last++;\n return { from: start + offsets[first], to: start + offsets[last] + parent.child(last).nodeSize, mark };\n }\n return null;\n}\n\n/**\n * Link the selection to `href` — replacing the link it sits in when the caret\n * is inside one, and inserting the address as its own text when nothing is\n * selected at all. `href` has already passed the URL policy.\n */\nfunction setLink(href: string): Command {\n return (state, dispatch) => {\n const type = state.schema.marks['link'];\n const { empty, from, to } = state.selection;\n const existing = linkRange(state);\n const title = (existing?.mark.attrs['title'] as string | null | undefined) ?? null;\n const mark = type.create({ href, title });\n if (!toggleMark(type, { href })(state)) return false;\n if (!dispatch) return true;\n\n const tr = state.tr;\n if (!empty) tr.removeMark(from, to, type).addMark(from, to, mark);\n else if (existing) tr.removeMark(existing.from, existing.to, type).addMark(existing.from, existing.to, mark);\n else tr.insertText(href, from).addMark(from, from + href.length, mark);\n dispatch(tr.scrollIntoView());\n return true;\n };\n}\n\n/** Remove the link the selection is in or covers. */\nconst removeLink: Command = (state, dispatch) => {\n const range = linkRange(state);\n if (!range) return false;\n if (dispatch) dispatch(state.tr.removeMark(range.from, range.to, state.schema.marks['link']).scrollIntoView());\n return true;\n};\n\n// ---------------------------------------------------------------------------\n// Plugins\n// ---------------------------------------------------------------------------\n\n/**\n * The editor's plugin stack, in precedence order: its own keys, history keys,\n * ProseMirror's base keymap, then history and the markdown-style input rules.\n *\n * `canEdit` is asked for every document-changing transaction, because\n * `view.dispatch()` does not consult `editable` — a toolbar click or a plugin\n * would otherwise change a read-only document. Outside writes never pass here:\n * they replace the state wholesale.\n *\n * The input rules are the block shortcuts only. The typographic ones (smart\n * quotes, the em dash, the ellipsis) are left out on purpose: in a form control\n * they silently rewrite what someone typed into a name, a code or a reference.\n */\nfunction editorPlugins(\n schema: Schema,\n options: { readonly apple: boolean; readonly canEdit: () => boolean }\n): Plugin[] {\n const { nodes } = schema;\n const keys: Record<string, Command> = {};\n const bind = (combo: string, command: Command | null): void => {\n if (!command) return;\n keys[combo] = command;\n // `event.key` is upper case under Shift or Caps Lock, and ProseMirror\n // matches on it; bound twice, the way `prosemirror-example-setup` does.\n const last = combo.slice(combo.lastIndexOf('-') + 1);\n if (/^[a-z]$/.test(last)) keys[combo.slice(0, -1) + last.toUpperCase()] = command;\n };\n\n for (const [tool, shortcut] of Object.entries(SHORTCUTS) as [WrEditorCommandTool, WrEditorShortcut][]) {\n if (tool === 'link' || tool === 'undo' || tool === 'redo') continue;\n bind(comboOf(shortcut), toolCommand(tool, schema));\n }\n bind('Mod-z', undo);\n bind('Mod-Shift-z', redo);\n if (!options.apple) bind('Mod-y', redo);\n keys['Shift-Enter'] = chainCommands(exitCode, insertHardBreak);\n keys['Mod-Enter'] = chainCommands(exitCode, exitTable);\n keys['Enter'] = splitListItem(nodes['list_item']);\n keys['Mod-['] = liftListItem(nodes['list_item']);\n keys['Mod-]'] = sinkListItem(nodes['list_item']);\n keys['ArrowDown'] = leaveTable('after');\n keys['ArrowUp'] = leaveTable('before');\n keys['Backspace'] = undoInputRule;\n\n return [\n new Plugin({\n filterTransaction: (tr, state) => {\n if (!tr.docChanged) return true;\n if (!options.canEdit()) return false;\n // `MAX_NESTING` is the deepest markdown reads back with its structure. A\n // document that already nests deeper (a bound HTML or JSON value) is kept\n // as it is; what is refused is an edit that makes it deeper still.\n const depth = nestingOf(tr.doc);\n return depth <= MAX_NESTING || depth <= nestingOf(state.doc);\n },\n }),\n bracketKeys(nodes['list_item'], options.apple),\n keymap(keys),\n keymap(baseKeymap),\n history(),\n inputRules({\n rules: [\n textblockTypeInputRule(/^(#{1,3})\\s$/, nodes['heading'], match => ({ level: match[1].length })),\n wrappingInputRule(/^\\s*>\\s$/, nodes['blockquote']),\n wrappingInputRule(/^\\s*([-+*])\\s$/, nodes['bullet_list']),\n wrappingInputRule(\n /^(\\d{1,9})\\.\\s$/,\n nodes['ordered_list'],\n match => ({ order: Number(match[1]) }),\n (match, node) => node.childCount + (node.attrs['order'] as number) === Number(match[1])\n ),\n textblockTypeInputRule(/^```$/, nodes['code_block']),\n ],\n }),\n ];\n}\n\n/**\n * Mod-] and Mod-[ as they are TYPED on a layout that needs AltGr or Option for a\n * bracket: Windows German reports AltGr+8 as Ctrl+Alt with `key` `[`, macOS\n * German reports Option+5 under ⌘ as ⌘+Alt with `key` `[`. The keymap matches on\n * the full modifier set, so neither reaches `Mod-[`, and indenting a list item has\n * no other path — Tab is not bound and the toolbar has no indent tool.\n *\n * Matched on the character, never on `event.code`: the physical key at `]` is `+`\n * on a German keyboard, and Ctrl and `+` is the browser's zoom.\n */\nfunction bracketKeys(item: NodeType, apple: boolean): Plugin {\n const lift = liftListItem(item);\n const sink = sinkListItem(item);\n return new Plugin({\n props: {\n handleKeyDown: (view, event) => {\n if (!event.altKey || event.shiftKey || (event.key !== '[' && event.key !== ']')) return false;\n const mod = apple ? event.metaKey && !event.ctrlKey : event.ctrlKey && !event.metaKey;\n return mod && (event.key === ']' ? sink : lift)(view.state, view.dispatch);\n },\n },\n });\n}\n\n/** A shortcut in ProseMirror's key-name syntax. */\nfunction comboOf(shortcut: WrEditorShortcut): string {\n return `Mod-${shortcut.alt ? 'Alt-' : ''}${shortcut.shift ? 'Shift-' : ''}${shortcut.key.toLowerCase()}`;\n}\n\nexport {\n SHORTCUTS,\n TOGGLES,\n toolActive,\n toolCommand,\n linkRange,\n setLink,\n removeLink,\n exitTable,\n leaveTable,\n editorPlugins,\n comboOf,\n};\nexport type { WrEditorCommandTool, WrEditorShortcut };\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrEditorCommandTool } from './commands';\n\n/**\n * Toolbar glyphs as path data, drawn inline so the editor needs no\n * `provideWrIcons()` — the same reason `<wr-textarea>` inlines its grip.\n *\n * Lucide's (ISC), on its 24-unit grid with a 2-unit stroke; `line` elements are\n * rewritten as the equivalent paths so one `<path>` loop draws every icon.\n */\nexport const TOOL_ICONS: Readonly<Record<WrEditorCommandTool, readonly string[]>> = {\n bold: ['M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8'],\n italic: ['M19 4h-9', 'M14 20H5', 'M15 4 9 20'],\n underline: ['M6 4v6a6 6 0 0 0 12 0V4', 'M4 20h16'],\n strike: ['M16 4H9a3 3 0 0 0-2.83 4', 'M14 12a4 4 0 0 1 0 8H6', 'M4 12h16'],\n code: ['m16 18 6-6-6-6', 'm8 6-6 6 6 6'],\n paragraph: ['M13 4v16', 'M17 4v16', 'M19 4H9.5a4.5 4.5 0 0 0 0 9H13'],\n heading1: ['M4 12h8', 'M4 18V6', 'M12 18V6', 'm17 12 3-2v8'],\n heading2: ['M4 12h8', 'M4 18V6', 'M12 18V6', 'M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1'],\n heading3: [\n 'M4 12h8',\n 'M4 18V6',\n 'M12 18V6',\n 'M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2',\n 'M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2',\n ],\n bulletList: ['M3 5h.01', 'M3 12h.01', 'M3 19h.01', 'M8 5h13', 'M8 12h13', 'M8 19h13'],\n orderedList: [\n 'M11 5h10',\n 'M11 12h10',\n 'M11 19h10',\n 'M4 4h1v5',\n 'M4 9h2',\n 'M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02',\n ],\n blockquote: ['M17 5H3', 'M21 12H8', 'M21 19H8', 'M3 12v7'],\n codeBlock: [\n 'm10 9-3 3 3 3',\n 'm14 15 3-3-3-3',\n 'M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z',\n ],\n link: [\n 'M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71',\n 'M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71',\n ],\n horizontalRule: ['M5 12h14'],\n undo: ['M9 14 4 9l5-5', 'M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11'],\n redo: ['m15 14 5-5-5-5', 'M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13'],\n};\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { computed, signal } from '@angular/core';\n\nimport type { WrFormFieldContext } from 'ngwr/form';\n\nlet nextId = 0;\n\n/**\n * The field the link panel's URL input belongs to — provided as `WR_FORM_FIELD`\n * for the editor's whole subtree.\n *\n * It does two jobs at once. It is the SHIELD every composite control needs: the\n * editor is the control a `<wr-form-field>` wraps, and without a nearer provider\n * the `[wrInput]` in its link panel would adopt the outer field's id, take over\n * its label and announce its error as its own. And it is the input's own field:\n * `[wrInput]` binds `id`, `aria-invalid` and `aria-describedby` from whatever\n * field it finds, so answering here is how a refused URL reaches a screen reader\n * without binding attributes the directive already owns.\n *\n * @internal\n */\nexport class WrEditorLinkField implements WrFormFieldContext {\n private readonly id = `wr-editor-link-${nextId++}`;\n\n /** The URL just submitted was refused by the link policy. */\n readonly invalid = signal(false);\n\n readonly controlId = signal(`${this.id}-url`).asReadonly();\n readonly errorId = `${this.id}-error`;\n readonly panelId = `${this.id}-panel`;\n\n readonly errorKeys = computed<readonly string[]>(() => (this.invalid() ? ['url'] : []));\n readonly describedBy = computed(() => (this.invalid() ? this.errorId : null));\n readonly labelId = signal<string | null>(null).asReadonly();\n\n adoptControlId(): void {\n // The panel's input never carries an id of its own.\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { Node } from 'prosemirror-model';\nimport type { NodeView, NodeViewConstructor, ViewMutationRecord } from 'prosemirror-view';\n\n/** The words a task item is read with — `editor.taskDone` / `editor.taskTodo`. */\ninterface WrTaskLabels {\n readonly done: string;\n readonly todo: string;\n}\n\n/**\n * List items as the editor draws them, which differs from the HTML it writes\n * only for a TASK item.\n *\n * A task item's box is presentational, with its state as text beside it —\n * exactly what `<wr-markdown>` renders. A real `<input type=\"checkbox\">` would be\n * an unlabelled form control inside the text, and making it operable would\n * promise an interaction v1 does not have. The box and the words sit outside the\n * editable content, so ProseMirror neither edits nor serializes them; the words\n * come from the catalog, which is why this is a node view the component builds\n * rather than a schema `toDOM` (the schema is shared and has no catalog).\n */\nfunction listItemView(labels: WrTaskLabels): NodeViewConstructor {\n return (node, view) => new WrListItemView(node, view.dom.ownerDocument, labels);\n}\n\nclass WrListItemView implements NodeView {\n readonly dom: HTMLElement;\n readonly contentDOM: HTMLElement;\n private node: Node;\n\n constructor(node: Node, document: Document, labels: WrTaskLabels) {\n this.node = node;\n this.dom = document.createElement('li');\n const checked = node.attrs['checked'] as boolean | null;\n if (checked === null) {\n this.contentDOM = this.dom;\n return;\n }\n\n this.dom.className = 'wr-editor__item wr-editor__item--task';\n this.dom.setAttribute('data-checked', String(checked));\n const box = document.createElement('span');\n box.className = checked ? 'wr-editor__task wr-editor__task--checked' : 'wr-editor__task';\n box.contentEditable = 'false';\n box.setAttribute('aria-hidden', 'true');\n const state = document.createElement('span');\n state.className = 'wr-editor__sr-only';\n state.contentEditable = 'false';\n state.textContent = checked ? labels.done : labels.todo;\n this.contentDOM = document.createElement('div');\n this.contentDOM.className = 'wr-editor__task-body';\n this.dom.append(box, state, this.contentDOM);\n }\n\n update(node: Node): boolean {\n // A task item becoming a plain one (or the reverse, or toggled) is drawn\n // again from scratch; there is no in-place way to add or drop the box.\n if (node.type !== this.node.type || node.attrs['checked'] !== this.node.attrs['checked']) return false;\n this.node = node;\n return true;\n }\n\n ignoreMutation(mutation: ViewMutationRecord): boolean {\n if (mutation.type === 'selection' || this.contentDOM === this.dom) return false;\n return !this.contentDOM.contains(mutation.target);\n }\n}\n\nexport { listItemView };\nexport type { WrTaskLabels };\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrEditorTool } from './interfaces';\n\n/**\n * The toolbar `<wr-editor>` draws when `toolbar` is not bound — every tool, in\n * five groups. Exported so a toolbar can be built from it rather than retyped:\n *\n * ```ts\n * readonly tools = WR_EDITOR_TOOLBAR.filter(tool => tool !== 'code');\n * ```\n *\n * `underline` is dropped in `markdown` format whether it is listed or not.\n */\nexport const WR_EDITOR_TOOLBAR: readonly WrEditorTool[] = [\n 'bold',\n 'italic',\n 'underline',\n 'strike',\n 'code',\n '|',\n 'paragraph',\n 'heading1',\n 'heading2',\n 'heading3',\n '|',\n 'bulletList',\n 'orderedList',\n 'blockquote',\n 'codeBlock',\n '|',\n 'link',\n 'horizontalRule',\n '|',\n 'undo',\n 'redo',\n];\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOCUMENT, NgTemplateOutlet, isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n Injector,\n PLATFORM_ID,\n type Signal,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n computed,\n effect,\n inject,\n input,\n isDevMode,\n model,\n output,\n signal,\n untracked,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { WrButton } from 'ngwr/button';\nimport { useConfigValue } from 'ngwr/config';\nimport { WR_FORM_FIELD, useFormFieldAria } from 'ngwr/form';\nimport { readI18nText, useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WrInput } from 'ngwr/input';\nimport { safeMarkdownUrl } from 'ngwr/markdown';\nimport { WrPlatform } from 'ngwr/platform';\nimport { WrPopover } from 'ngwr/popover';\nimport { isComposing } from 'ngwr/utils';\nimport type { Node } from 'prosemirror-model';\nimport { EditorState, type Transaction } from 'prosemirror-state';\nimport { Decoration, DecorationSet, EditorView } from 'prosemirror-view';\n\nimport type { WrEditorFormat, WrEditorJson, WrEditorMarkJson, WrEditorTool, WrEditorValue } from './interfaces';\nimport { readValue, writeValue } from './internal/codec';\nimport {\n SHORTCUTS,\n TOGGLES,\n type WrEditorCommandTool,\n editorPlugins,\n linkRange,\n removeLink,\n setLink,\n toolActive,\n toolCommand,\n} from './internal/commands';\nimport { TOOL_ICONS } from './internal/icons';\nimport { WrEditorLinkField } from './internal/link-field';\nimport { listItemView } from './internal/list-item-view';\nimport { editorSchema, isEmptyDoc } from './internal/schema';\nimport { WR_EDITOR_TOOLBAR } from './toolbar';\n\nlet nextId = 0;\n\nfunction warn(message: string): void {\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(`[NGWR] <wr-editor>: ${message}`);\n}\n\n/** A document's JSON with every mark the target schema does not know dropped. */\nfunction withoutMarks(node: WrEditorJson, known: Readonly<Record<string, unknown>>): WrEditorJson {\n return {\n ...node,\n ...(node.marks ? { marks: node.marks.filter(mark => mark.type in known) } : {}),\n ...(node.content ? { content: node.content.map(child => withoutMarks(child, known)) } : {}),\n };\n}\n\n/** One toolbar button's state at the current selection. */\ninterface WrToolState {\n readonly tool: WrEditorCommandTool;\n readonly active: boolean;\n readonly available: boolean;\n}\n\n/**\n * Rich-text editor on ProseMirror, with a toolbar, a link panel, keyboard\n * shortcuts and markdown-style block shortcuts (`# `, `> `, `- `, `1. `,\n * ` ``` `).\n *\n * A signal-forms native control: it implements `FormValueControl<WrEditorValue>`,\n * so `[formField]` binds straight to its `value` model — no\n * `ControlValueAccessor` in between. `[(value)]` works standalone.\n *\n * The value is an HTML string, a markdown string or the document as JSON, chosen\n * by `format`. Whatever arrives is treated as untrusted and rebuilt from the\n * editor's schema, so only what the schema allows survives, and links and images\n * go through `safeMarkdownUrl` in all three. A value the editor cannot read is\n * refused — the document it already shows is kept, a warning names the reason in\n * dev mode, and nothing is written back. Until a value it CAN read arrives the\n * editor is read-only and carries `wr-editor--refused`: the model still holds the\n * refused value, and an edit would write the document on screen over it.\n *\n * Headings stop at three levels: an h4–h6 read from HTML or markdown becomes an\n * h3 rather than a paragraph. Underline exists in `html` and `json` only —\n * markdown cannot spell it, so in that format the tool, the shortcut and the mark\n * itself are absent.\n *\n * ProseMirror is an OPTIONAL peer dependency: only an app that imports\n * `ngwr/editor` installs `prosemirror-model`, `-state`, `-view`, `-commands`,\n * `-keymap`, `-history`, `-schema-list` and `-inputrules`.\n *\n * @example\n * ```html\n * <!-- signal forms -->\n * <wr-editor format=\"markdown\" placeholder=\"Describe the change\" [formField]=\"form.body\" />\n *\n * <!-- standalone two-way binding -->\n * <wr-editor [(value)]=\"html\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/editor\n */\n@Component({\n selector: 'wr-editor',\n templateUrl: './editor.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'classes()',\n '(focusout)': 'onFocusOut($event)',\n },\n // The editor is the control a `<wr-form-field>` wraps; the `[wrInput]` in its\n // link panel is a part. See `WrEditorLinkField` — the provider is both the\n // shield and that input's own field, which is why `fieldAria` below reads the\n // real field with `skipSelf`.\n providers: [\n { provide: WrEditorLinkField, useFactory: () => new WrEditorLinkField() },\n { provide: WR_FORM_FIELD, useExisting: WrEditorLinkField },\n ],\n imports: [NgTemplateOutlet, WrButton, WrInput, WrPopover],\n})\nexport class WrEditor implements FormValueControl<WrEditorValue> {\n /**\n * The document. A string in `html` and `markdown` format, a\n * {@link WrEditorJson} tree in `json`; `''` / `null` when nothing is written.\n * Bound by `[formField]`, or two-way via `[(value)]`.\n */\n readonly value = model<WrEditorValue>(null);\n\n /** Emitted on blur so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n /**\n * Disable the editor and its toolbar. Bound automatically from the field's\n * disabled state when used with `[formField]`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Refuse edits while the text stays focusable, selectable and announced.\n * Bound automatically from the field's readonly state when used with\n * `[formField]`.\n *\n * The surface keeps its tab stop and reports `aria-readonly`; typing, paste,\n * drop, the shortcuts and every toolbar command are refused. The toolbar goes\n * inert, since none of its tools can apply.\n *\n * @default false\n */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Hint shown while the document is empty, and exposed as `aria-placeholder`.\n *\n * @default ''\n */\n readonly placeholder = input<string>('');\n\n /**\n * Accessible name of the text surface. Falls back to the surrounding\n * `<wr-form-field>`'s label, then to `editor.label`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /**\n * What `value` holds — see {@link WrEditorFormat}. Unset, it falls back to\n * `provideWrConfig({ editor: { format } })`. Changing it re-reads `value` in\n * the new format.\n *\n * @default 'html'\n */\n readonly format = input<WrEditorFormat | null>(null);\n\n // `null` as the input's own default, not `'html'`, so \"the template said\n // nothing\" stays distinguishable from \"the template said html\" and an app-wide\n // default can apply.\n protected readonly resolvedFormat = useConfigValue(this.format, c => c.editor?.format, 'html');\n\n /**\n * The toolbar's tools, in order, with `'|'` between groups; `false` hides it.\n * `underline` is left out in `markdown` format, which cannot store it.\n *\n * @default WR_EDITOR_TOOLBAR\n */\n readonly toolbar = input<readonly WrEditorTool[] | false>(WR_EDITOR_TOOLBAR);\n\n private readonly document = inject(DOCUMENT);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly platform = inject(WrPlatform);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /**\n * Ambient reading direction, read by the toolbar's arrow keys. Optional so a\n * bare `TestBed` needs no provider; `null` means LTR.\n */\n private readonly dir = inject(Directionality, { optional: true });\n\n /** @internal */\n protected readonly linkField = inject(WrEditorLinkField, { self: true });\n\n /** The surrounding `<wr-form-field>`'s error state, read past the editor's own shield. @internal */\n protected readonly fieldAria = useFormFieldAria({ skipSelf: true });\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'editor.label', 'Rich text');\n\n /**\n * The field's label names the surface, when there is one — a\n * `contenteditable` is not labelable, so the field's `<label for>` cannot\n * reach it. An explicit `ariaLabel` still wins over both.\n */\n protected readonly labelledBy = computed(() => (this.ariaLabel() ? null : this.fieldAria.labelledBy()));\n\n /** `null` while the field's label carries the name. */\n protected readonly accessibleName = computed(() => (this.labelledBy() ? null : this.resolvedAriaLabel()));\n\n protected readonly surfaceId = `wr-editor-${nextId++}`;\n\n /** ProseMirror owns the surface from here on; until then the preview stands in. */\n protected readonly mounted = signal(false);\n\n protected readonly focused = signal(false);\n\n private readonly editorState = signal<EditorState | null>(null);\n\n /**\n * Whether `value` holds something the editor could not read, so the document\n * on screen is not the one the model holds — empty at mount, or the previous\n * record after a write. Edits are refused until a readable value arrives:\n * the first keystroke would otherwise replace the stored value with whatever\n * is on screen, and the only sign of it was a dev-mode warning.\n */\n private readonly refused = signal(false);\n\n /** Read-only by the input, or because the value was refused. @internal */\n protected readonly locked = computed(() => this.readonly() || this.refused());\n\n /** Apple keyboards name the modifier ⌘. Read in the browser only — see `mount()`. */\n private readonly apple = signal(false);\n\n private readonly surface = viewChild.required<ElementRef<HTMLElement>>('surface');\n // `read`, because `#tool` sits on a `wr-btn` and would otherwise resolve to the component.\n private readonly toolButtons = viewChildren<unknown, ElementRef<HTMLButtonElement>>('tool', { read: ElementRef });\n private readonly linkPopover = viewChild<WrPopover>('linkPopover');\n\n private view: EditorView | null = null;\n /** The format the live document was read in, which is the format it is written in. */\n private viewFormat: WrEditorFormat = 'html';\n /**\n * The value the live document was last read from or written as. A write from\n * outside that equals it is the document already on screen — an echo of the\n * editor's own emit, or a consumer writing back what it was handed — and must\n * neither re-parse nor reset the selection.\n */\n private lastSerialized: WrEditorValue | undefined = undefined;\n private linkToSurface = false;\n\n // Labels\n\n protected readonly toolbarLabel = readI18nText('editor.toolbar', 'Formatting');\n protected readonly linkUrlLabel = readI18nText('editor.linkUrl', 'Link address');\n protected readonly linkApplyLabel = readI18nText('editor.linkApply', 'Apply');\n protected readonly linkRemoveLabel = readI18nText('editor.linkRemove', 'Remove link');\n protected readonly linkInvalidLabel = readI18nText('editor.linkInvalid', 'This address cannot be used as a link.');\n protected readonly taskDoneLabel = readI18nText('editor.taskDone', 'Done:');\n protected readonly taskTodoLabel = readI18nText('editor.taskTodo', 'To do:');\n private readonly keyCtrl = readI18nText('editor.keyCtrl', 'Ctrl');\n private readonly keyShift = readI18nText('editor.keyShift', 'Shift');\n private readonly keyAlt = readI18nText('editor.keyAlt', 'Alt');\n private readonly headingLabel = useI18nFormatter('editor.heading', 'Heading {{level}}');\n private readonly shortcutLabel = useI18nFormatter('editor.shortcut', '{{label}} ({{keys}})');\n\n private readonly toolLabels: Readonly<Record<WrEditorCommandTool, Signal<string>>> = {\n bold: readI18nText('editor.bold', 'Bold'),\n italic: readI18nText('editor.italic', 'Italic'),\n underline: readI18nText('editor.underline', 'Underline'),\n strike: readI18nText('editor.strike', 'Strikethrough'),\n code: readI18nText('editor.code', 'Inline code'),\n paragraph: readI18nText('editor.paragraph', 'Paragraph'),\n heading1: computed(() => this.headingLabel({ level: 1 })),\n heading2: computed(() => this.headingLabel({ level: 2 })),\n heading3: computed(() => this.headingLabel({ level: 3 })),\n bulletList: readI18nText('editor.bulletList', 'Bulleted list'),\n orderedList: readI18nText('editor.orderedList', 'Numbered list'),\n blockquote: readI18nText('editor.blockquote', 'Quote'),\n codeBlock: readI18nText('editor.codeBlock', 'Code block'),\n link: readI18nText('editor.link', 'Insert link'),\n horizontalRule: readI18nText('editor.horizontalRule', 'Horizontal line'),\n undo: readI18nText('editor.undo', 'Undo'),\n redo: readI18nText('editor.redo', 'Redo'),\n };\n\n // Toolbar\n\n /**\n * The bound tools as drawn: underline dropped where the format cannot store\n * it, and separators only BETWEEN two groups — a leading, trailing or doubled\n * one would be left behind by that filter or by a hand-built list.\n */\n protected readonly tools = computed<readonly WrEditorTool[]>(() => {\n const bound = this.toolbar();\n if (!bound) return [];\n const markdown = this.resolvedFormat() === 'markdown';\n const out: WrEditorTool[] = [];\n for (const tool of bound) {\n if (markdown && tool === 'underline') continue;\n if (tool === '|' && (out.length === 0 || out[out.length - 1] === '|')) continue;\n if (tool !== '|' && out.includes(tool)) continue;\n out.push(tool);\n }\n if (out[out.length - 1] === '|') out.pop();\n return out;\n });\n\n /** The tools that are buttons, in order — what the roving tab stop moves over. */\n private readonly buttons = computed(() => this.tools().filter((tool): tool is WrEditorCommandTool => tool !== '|'));\n\n /** Each drawn entry's index among the buttons, `-1` for a separator. @internal */\n protected readonly buttonIndex = computed(() => {\n let index = 0;\n return this.tools().map(tool => (tool === '|' ? -1 : index++));\n });\n\n private readonly commands = computed(() => {\n const schema = editorSchema(this.resolvedFormat());\n return new Map(this.buttons().map(tool => [tool, toolCommand(tool, schema)]));\n });\n\n /** Every button's pressed and available state at the current selection. @internal */\n protected readonly toolStates = computed<ReadonlyMap<WrEditorCommandTool, WrToolState>>(() => {\n const state = this.editorState();\n const editable = this.canEdit();\n const commands = this.commands();\n return new Map(\n this.buttons().map(tool => {\n const command = commands.get(tool);\n return [\n tool,\n {\n tool,\n active: !!state && toolActive(tool, state),\n available: !!state && editable && !!command && command(state),\n },\n ];\n })\n );\n });\n\n private readonly rovingIndex = signal(0);\n\n /**\n * The one button in the tab order. It follows the user, and moves off a tool\n * that stopped applying so the toolbar never loses its tab stop — unless NO\n * tool applies (read-only, disabled), where it stays put, because there is\n * nothing to reach.\n */\n private readonly tabStop = computed(() => {\n const buttons = this.buttons();\n const states = this.toolStates();\n const current = Math.min(this.rovingIndex(), Math.max(buttons.length - 1, 0));\n if (states.get(buttons[current])?.available) return current;\n const first = buttons.findIndex(tool => states.get(tool)?.available);\n return first >= 0 ? first : current;\n });\n\n /** Whether the live document is empty — pre-mount, whether the value is. */\n private readonly empty = computed(() => {\n const state = this.editorState();\n if (state) return isEmptyDoc(state.doc);\n const value = this.value();\n return value === null || value === undefined || value === '';\n });\n\n /** The task-item words, handed to ProseMirror through its node views. */\n private readonly nodeViews = computed(() => ({\n list_item: listItemView({ done: this.taskDoneLabel(), todo: this.taskTodoLabel() }),\n }));\n\n protected readonly ariaPlaceholder = computed(() => (this.placeholder() && this.empty() ? this.placeholder() : null));\n\n // Link panel\n\n protected readonly linkDraft = signal('');\n\n /** Whether the selection is in a link — what the panel's remove button needs. */\n protected readonly linkActive = computed(() => this.toolStates().get('link')?.active ?? false);\n\n /**\n * The value rendered by Angular until ProseMirror takes over: on the server,\n * and for the first browser frame. Read from the doc JSON, so it shows exactly\n * what the schema kept — the same sanitised document the editor will mount.\n */\n protected readonly preview = computed<WrEditorJson | null>(() => {\n if (this.mounted()) return null;\n const format = this.resolvedFormat();\n try {\n return readValue(this.value(), format, editorSchema(format), this.document).toJSON() as WrEditorJson;\n } catch (error) {\n // The browser warns once, when it mounts; the server has no mount to wait for.\n if (!this.isBrowser && isDevMode()) this.warnRefused(format, error);\n return null;\n }\n });\n\n protected readonly classes = computed(() => {\n const parts = ['wr-editor'];\n if (this.focused()) parts.push('wr-editor--focused');\n if (this.disabled()) parts.push('wr-editor--disabled');\n else if (this.locked()) parts.push('wr-editor--readonly');\n if (this.refused()) parts.push('wr-editor--refused');\n return parts.join(' ');\n });\n\n constructor() {\n // Outside writes: a form reset, a server load, a patch. Skipped when the\n // value is the document already on screen — see `lastSerialized`.\n effect(() => {\n const value = this.value();\n const format = this.resolvedFormat();\n untracked(() => this.sync(value, format));\n });\n\n // `editable` and the placeholder are functions ProseMirror asks on every\n // update, so poking it is enough to make it ask again.\n effect(() => {\n this.readonly();\n this.disabled();\n this.refused();\n this.placeholder();\n untracked(() => this.view?.setProps({}));\n });\n\n // The task-item words live in node views, which ProseMirror only redraws\n // when the `nodeViews` prop itself changes.\n effect(() => {\n const nodeViews = this.nodeViews();\n untracked(() => this.view?.setProps({ nodeViews }));\n });\n\n // The roving tab stop is written to the DOM rather than bound: `wr-btn`\n // binds `[attr.tabindex]` on its host (`null` for a native button), and a\n // host binding runs after the template's and removes the attribute on the\n // first pass. Nothing rewrites it after that, so a write after render sticks.\n afterRenderEffect({\n write: () => {\n const stop = this.tabStop();\n this.toolButtons().forEach((ref, index) => (ref.nativeElement.tabIndex = index === stop ? 0 : -1));\n },\n });\n\n // `afterNextRender` alone is not the guard: it keys on the global server\n // flag, not on `PLATFORM_ID`, so a platform test would still run it.\n if (!this.isBrowser) return;\n afterNextRender(() => this.mount());\n }\n\n /** Focus the text surface — what Signal Forms calls to focus this control. */\n focus(options?: FocusOptions): void {\n const view = this.view;\n // ProseMirror's own `focus()` is a no-op while the view is not editable,\n // and read-only has to stay focusable.\n if (view?.editable) view.focus();\n else this.surface().nativeElement.focus(options);\n }\n\n // Template handlers\n\n protected label(tool: WrEditorCommandTool): string {\n return this.toolLabels[tool]();\n }\n\n protected icon(tool: WrEditorCommandTool): readonly string[] {\n return TOOL_ICONS[tool];\n }\n\n protected isToggle(tool: WrEditorCommandTool): boolean {\n return TOGGLES.has(tool);\n }\n\n /** The tooltip: the label, with the shortcut when the tool has one. */\n protected tooltip(tool: WrEditorCommandTool): string {\n const shortcut = SHORTCUTS[tool];\n if (!shortcut) return this.label(tool);\n const keys = this.apple()\n ? `${shortcut.alt ? '⌥' : ''}${shortcut.shift ? '⇧' : ''}⌘${shortcut.key}`\n : [\n this.keyCtrl(),\n ...(shortcut.alt ? [this.keyAlt()] : []),\n ...(shortcut.shift ? [this.keyShift()] : []),\n shortcut.key,\n ].join('+');\n return this.shortcutLabel({ label: this.label(tool), keys });\n }\n\n /** `aria-keyshortcuts` — key names from the ARIA spec, never localised. */\n protected keyShortcuts(tool: WrEditorCommandTool): string | null {\n const shortcut = SHORTCUTS[tool];\n if (!shortcut) return null;\n const mod = this.apple() ? 'Meta' : 'Control';\n const combo = `${mod}+${shortcut.alt ? 'Alt+' : ''}${shortcut.shift ? 'Shift+' : ''}${shortcut.key}`;\n return tool === 'redo' && !this.apple() ? `${combo} Control+Y` : combo;\n }\n\n protected state(tool: WrEditorCommandTool): WrToolState | undefined {\n return this.toolStates().get(tool);\n }\n\n /**\n * A toolbar button was activated.\n *\n * By pointer, focus never left the text (`mousedown` is cancelled), so the\n * caret is put back where the command left it. By keyboard, focus stays on the\n * button, as the toolbar pattern asks — unless the tool no longer applies,\n * which disables it: a disabled button drops its focus on `<body>`, so the text\n * takes it first.\n */\n protected onToolClick(tool: WrEditorCommandTool, event: MouseEvent): void {\n const view = this.view;\n const command = this.commands().get(tool);\n if (!view || !command || !this.canEdit()) return;\n command(view.state, view.dispatch, view);\n if (event.detail !== 0 || !this.state(tool)?.available) view.focus();\n }\n\n protected onToolFocus(index: number): void {\n this.rovingIndex.set(index);\n }\n\n /** The APG toolbar keys: the arrows rove and wrap, Home and End jump. */\n protected onToolbarKeydown(event: KeyboardEvent): void {\n if (isComposing(event) || event.altKey || event.ctrlKey || event.metaKey) return;\n const buttons = this.toolButtons().map(ref => ref.nativeElement);\n const current = buttons.indexOf(event.target as HTMLButtonElement);\n if (current < 0) return;\n const reachable = buttons.map((button, index) => (button.disabled ? -1 : index)).filter(index => index >= 0);\n if (!reachable.length) return;\n\n const rtl = this.dir?.value === 'rtl';\n const at = reachable.indexOf(current);\n let next: number;\n switch (event.key) {\n case 'ArrowRight':\n next = reachable[(at + (rtl ? -1 : 1) + reachable.length) % reachable.length];\n break;\n case 'ArrowLeft':\n next = reachable[(at + (rtl ? 1 : -1) + reachable.length) % reachable.length];\n break;\n case 'Home':\n next = reachable[0];\n break;\n case 'End':\n next = reachable[reachable.length - 1];\n break;\n default:\n return;\n }\n event.preventDefault();\n this.rovingIndex.set(next);\n buttons[next].focus();\n }\n\n /** `touch` once focus leaves the whole control — not when it moves between its own parts. */\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as globalThis.Node | null;\n if (next && this.withinControl(next)) return;\n const fromPanel = this.inLinkPanel(event.target as globalThis.Node);\n\n // Chromium fires a `focusout` with no `relatedTarget` when the focused\n // element is REMOVED — the link panel closing with focus inside it, or its\n // remove button leaving — and the popover hands focus back only after that.\n // It does the same when Tab runs off the end of the document, which is where\n // the overlay container sits. So where focus went is decided once it has\n // settled, or Escape on the panel marked the field touched with focus never\n // leaving the control.\n if (!next && fromPanel) {\n afterNextRender(\n () => {\n const active = this.document.activeElement;\n if (active && this.withinControl(active)) return;\n this.leaveLinkPanel();\n this.touch.emit();\n },\n { injector: this.injector }\n );\n return;\n }\n\n if (next && fromPanel) this.leaveLinkPanel();\n this.touch.emit();\n }\n\n protected onLinkOpened(): void {\n const state = this.view?.state;\n const range = state ? linkRange(state) : null;\n this.linkDraft.set(range ? String(range.mark.attrs['href'] ?? '') : '');\n this.linkField.invalid.set(false);\n afterNextRender(() => this.focusLinkInput(), { injector: this.injector });\n }\n\n protected onLinkClosed(): void {\n // Back to the text when the panel was opened from it (Mod-K) or when a link\n // was just applied; otherwise the popover has already handed focus back to\n // the toolbar button, which is where Escape should leave it.\n //\n // Only while focus is where the popover left it — on the link button — or\n // nowhere. A click elsewhere on the page closes the panel too, and by then\n // it has put focus where the user wanted it; taking it back sent their next\n // keystrokes into this editor.\n const toSurface = this.linkToSurface;\n this.linkToSurface = false;\n this.linkField.invalid.set(false);\n if (!toSurface) return;\n const active = this.document.activeElement;\n const linkButton = this.toolButtons()[this.buttons().indexOf('link')]?.nativeElement;\n if (!active || active === this.document.body || active === linkButton) this.view?.focus();\n }\n\n protected onLinkInput(event: Event): void {\n this.linkDraft.set((event.target as HTMLInputElement).value);\n this.linkField.invalid.set(false);\n }\n\n protected applyLink(event: Event): void {\n event.preventDefault();\n const view = this.view;\n if (!view || !this.canEdit()) return;\n const draft = this.linkDraft().trim();\n // An emptied field on an existing link means \"no link\".\n if (!draft && this.linkActive()) {\n this.removeLink();\n return;\n }\n const href = draft ? safeMarkdownUrl(draft, 'link') : null;\n if (!href) {\n this.linkField.invalid.set(true);\n this.focusLinkInput();\n return;\n }\n if (!setLink(href)(view.state, view.dispatch)) return;\n this.linkToSurface = true;\n this.linkPopover()?.close();\n }\n\n protected removeLink(): void {\n const view = this.view;\n if (!view || !this.canEdit()) return;\n removeLink(view.state, view.dispatch);\n this.linkToSurface = true;\n this.linkPopover()?.close();\n }\n\n // Preview helpers — the template's typed view of untyped JSON.\n\n protected nodesOf(raw: unknown): readonly WrEditorJson[] {\n return Array.isArray(raw) ? (raw as readonly WrEditorJson[]) : [];\n }\n\n protected nodeOf(raw: unknown): WrEditorJson {\n return raw as WrEditorJson;\n }\n\n protected markAt(node: WrEditorJson, depth: number): WrEditorMarkJson | null {\n return node.marks?.[depth] ?? null;\n }\n\n protected attr(node: WrEditorJson | WrEditorMarkJson, name: string): unknown {\n return node.attrs?.[name] ?? null;\n }\n\n protected text(node: WrEditorJson | WrEditorMarkJson, name: string): string | null {\n const value = node.attrs?.[name];\n return typeof value === 'string' ? value : null;\n }\n\n protected textOf(node: WrEditorJson): string {\n return (node.content ?? []).map(child => child.text ?? '').join('');\n }\n\n // Internals\n\n /** Whether an edit may happen at all — not while read-only, disabled or refused. */\n private canEdit(): boolean {\n return !this.readonly() && !this.disabled() && !this.refused();\n }\n\n private mount(): void {\n this.apple.set((this.platform.userAgent ?? '').toLowerCase().includes('mac'));\n const format = untracked(this.resolvedFormat);\n const value = untracked(this.value);\n const schema = editorSchema(format);\n let doc: Node;\n try {\n doc = readValue(value, format, schema, this.document);\n } catch (error) {\n if (isDevMode()) this.warnRefused(format, error);\n doc = schema.topNodeType.createAndFill()!;\n // An empty document over a stored value: see `refused`.\n this.refused.set(true);\n }\n\n const state = this.createState(doc);\n this.view = new EditorView(\n { mount: this.surface().nativeElement },\n {\n state,\n editable: () => untracked(() => this.canEdit()),\n dispatchTransaction: tr => this.dispatch(tr),\n decorations: current => this.placeholderDecorations(current),\n nodeViews: untracked(this.nodeViews),\n handleKeyDown: (_view, event) => this.onSurfaceKeydown(event),\n }\n );\n this.viewFormat = format;\n this.lastSerialized = value;\n this.editorState.set(state);\n this.mounted.set(true);\n this.destroyRef.onDestroy(() => {\n this.view?.destroy();\n this.view = null;\n });\n }\n\n private createState(doc: Node): EditorState {\n const current = this.view?.state;\n const plugins =\n current?.schema === doc.type.schema\n ? current.plugins\n : editorPlugins(doc.type.schema, {\n apple: untracked(this.apple),\n canEdit: () => untracked(() => this.canEdit()),\n });\n return EditorState.create({ doc, plugins });\n }\n\n private dispatch(tr: Transaction): void {\n const view = this.view;\n if (!view) return;\n const previous = view.state;\n const next = previous.apply(tr);\n view.updateState(next);\n this.editorState.set(next);\n // A refused transaction leaves the document as it was even though it asked\n // to change it; that is not an edit, and must not reach the model.\n if (next.doc !== previous.doc) this.emit(next.doc);\n }\n\n private emit(doc: Node): void {\n const out = writeValue(doc, this.viewFormat, this.document);\n if (out === this.lastSerialized) return;\n this.lastSerialized = out;\n this.value.set(out);\n }\n\n /**\n * Bring an outside write into the view.\n *\n * Compared as DOCUMENTS, never as strings: `<b>` comes back as `<strong>`, so a\n * normalised string differs from what the consumer wrote while the documents\n * are equal — and an equal document is left alone, selection and history\n * included. A different one replaces the state wholesale, history with it,\n * which is right for a form reset or a server load: undo back into content the\n * app replaced would be wrong. The normalised form is never written back —\n * that would mark the field dirty on load. A write that arrives mid-composition\n * (IME) replaces the composition too: the model is the source of truth.\n */\n private sync(value: WrEditorValue, format: WrEditorFormat): void {\n const view = this.view;\n if (!view) return;\n if (format === this.viewFormat && value === this.lastSerialized) return;\n\n const schema = editorSchema(format);\n let doc: Node;\n try {\n doc = readValue(value, format, schema, this.document);\n } catch (error) {\n if (isDevMode()) this.warnRefused(format, error);\n // Only the format moved, and the screen still shows this very value read\n // in the old one: carried across, an edit converts it and loses nothing.\n // Any other refusal leaves the model holding what the screen does not show.\n const carried = format !== this.viewFormat && value === this.lastSerialized && !this.refused();\n if (format !== this.viewFormat) this.switchFormat(format, schema);\n this.refused.set(!carried);\n return;\n }\n\n this.refused.set(false);\n this.lastSerialized = value;\n if (format === this.viewFormat && doc.eq(view.state.doc)) return;\n this.viewFormat = format;\n this.replaceState(doc);\n }\n\n /**\n * A new format whose value could not be read: keep the document, moved into\n * the new format's schema — markdown's lacks underline, so that mark is\n * dropped on the way. What is written from here on is in the new format.\n */\n private switchFormat(format: WrEditorFormat, schema: EditorState['schema']): void {\n const view = this.view!;\n this.viewFormat = format;\n if (view.state.schema === schema) return;\n let doc: Node;\n try {\n doc = schema.nodeFromJSON(withoutMarks(view.state.doc.toJSON() as WrEditorJson, schema.marks));\n doc.check();\n } catch {\n doc = schema.topNodeType.createAndFill()!;\n }\n this.replaceState(doc);\n }\n\n private replaceState(doc: Node): void {\n const state = this.createState(doc);\n this.view!.updateState(state);\n this.editorState.set(state);\n }\n\n private placeholderDecorations(state: EditorState): DecorationSet | null {\n const text = untracked(this.placeholder);\n if (!text || !isEmptyDoc(state.doc)) return null;\n const first = state.doc.firstChild!;\n return DecorationSet.create(state.doc, [\n Decoration.node(0, first.nodeSize, { class: 'wr-editor__placeholder', 'data-placeholder': text }),\n ]);\n }\n\n /**\n * Mod-K opens the link panel. Its propagation stops here: `<wr-command-palette>`\n * binds the same chord on the document, and `WrHotkey` deliberately does not\n * skip an event another listener already handled.\n */\n private onSurfaceKeydown(event: KeyboardEvent): boolean {\n if (isComposing(event) || event.altKey || event.shiftKey) return false;\n const mod = untracked(this.apple) ? event.metaKey && !event.ctrlKey : event.ctrlKey && !event.metaKey;\n if (!mod || (event.key.toLowerCase() !== 'k' && event.code !== 'KeyK')) return false;\n const popover = this.linkPopover();\n if (!popover || !untracked(this.toolStates).get('link')?.available) return false;\n event.stopPropagation();\n this.linkToSurface = true;\n popover.open();\n return true;\n }\n\n private focusLinkInput(): void {\n const input = this.document.getElementById(this.linkField.controlId()) as HTMLInputElement | null;\n input?.focus();\n input?.select();\n }\n\n /**\n * Focus left the link panel for somewhere outside the control — Tab, Shift+Tab,\n * a click elsewhere. The panel is not a focus trap, and left open it stays\n * anchored to a control the user has left, whose next close would then pull\n * focus back into the text. Closed with focus left where it went.\n */\n private leaveLinkPanel(): void {\n this.linkToSurface = false;\n this.linkPopover()?.close();\n }\n\n /** Whether a node is part of this control: the host, or its link panel. */\n private withinControl(node: globalThis.Node): boolean {\n return this.host.nativeElement.contains(node) || this.inLinkPanel(node);\n }\n\n private inLinkPanel(node: globalThis.Node): boolean {\n const panel = this.document.getElementById(this.linkField.panelId);\n if (!panel) return false;\n // The popover focuses its own pane before the input takes over.\n return panel.contains(node) || node === panel.closest('.cdk-overlay-pane');\n }\n\n private warnRefused(format: WrEditorFormat, error: unknown): void {\n const reason = error instanceof Error ? error.message : String(error);\n warn(\n `the bound value could not be read as ${format} and was ignored — the editor keeps the document it had and ` +\n `refuses edits until it is given a value it can read, so the stored one is not overwritten. ${reason}`\n );\n }\n}\n","@if (tools().length) {\n <div class=\"wr-editor__toolbar\" role=\"toolbar\" [attr.aria-label]=\"toolbarLabel()\" [attr.aria-controls]=\"surfaceId\">\n @for (item of tools(); track $index; let n = $index) {\n @if (item === '|') {\n <span class=\"wr-editor__separator\" aria-hidden=\"true\"></span>\n } @else if (item === 'link') {\n <!-- The link button hosts the link panel, so it carries the popover's own\n `aria-haspopup` / `aria-expanded` / `aria-controls` — and no tooltip,\n since one element cannot host `[wrPopover]` twice; its name and\n `aria-keyshortcuts` still say what the others' tooltips say. No\n `aria-pressed` either: a button that opens a popup is not a toggle,\n and the panel's remove button is where \"in a link\" is announced. -->\n <button\n #tool\n #linkPopover=\"wrPopover\"\n wr-btn\n type=\"button\"\n class=\"wr-editor__tool\"\n [class.wr-editor__tool--active]=\"state(item)?.active\"\n [disabled]=\"!state(item)?.available\"\n [attr.aria-label]=\"label(item)\"\n [attr.aria-keyshortcuts]=\"keyShortcuts(item)\"\n [wrPopover]=\"linkPanel\"\n [ariaLabel]=\"label(item)\"\n (opened)=\"onLinkOpened()\"\n (closed)=\"onLinkClosed()\"\n (focus)=\"onToolFocus(buttonIndex()[n])\"\n (keydown)=\"onToolbarKeydown($event)\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <svg\n class=\"wr-editor__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @for (d of icon(item); track $index) {\n <path [attr.d]=\"d\" />\n }\n </svg>\n </button>\n } @else {\n <button\n #tool\n wr-btn\n type=\"button\"\n class=\"wr-editor__tool\"\n mode=\"tooltip\"\n [class.wr-editor__tool--active]=\"state(item)?.active\"\n [disabled]=\"!state(item)?.available\"\n [attr.aria-pressed]=\"isToggle(item) ? (state(item)?.active ? 'true' : 'false') : null\"\n [attr.aria-label]=\"label(item)\"\n [attr.aria-keyshortcuts]=\"keyShortcuts(item)\"\n [wrPopover]=\"tooltip(item)\"\n (click)=\"onToolClick(item, $event)\"\n (focus)=\"onToolFocus(buttonIndex()[n])\"\n (keydown)=\"onToolbarKeydown($event)\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <svg\n class=\"wr-editor__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @for (d of icon(item); track $index) {\n <path [attr.d]=\"d\" />\n }\n </svg>\n </button>\n }\n }\n </div>\n}\n\n<!--\n The static preview: what Angular renders until ProseMirror mounts — on the\n server, and for the first browser frame. It is a SIBLING of the mount surface,\n never inside it: `{ mount }` replaces the element's children, and nodes Angular\n owns would be deleted out from under the next change detection.\n-->\n@if (preview(); as doc) {\n <div class=\"wr-editor__preview wr-editor__content\">\n <ng-container [ngTemplateOutlet]=\"previewBlocks\" [ngTemplateOutletContext]=\"{ $implicit: doc.content }\" />\n </div>\n}\n\n<!--\n The mount surface. Angular binds every attribute it needs, so the prerendered\n page and the synchronous first render already carry the role, the name and the\n field's error state; ProseMirror adds only its own class, `contenteditable` and\n `translate`, and never touches an attribute it did not set. No Angular child\n ever lives in here.\n-->\n<div\n #surface\n class=\"wr-editor__surface wr-editor__content\"\n role=\"textbox\"\n aria-multiline=\"true\"\n [id]=\"surfaceId\"\n [hidden]=\"!mounted()\"\n [attr.aria-label]=\"accessibleName()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-readonly]=\"locked() && !disabled() ? 'true' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.aria-placeholder]=\"ariaPlaceholder()\"\n [attr.tabindex]=\"locked() && !disabled() ? 0 : null\"\n (focus)=\"focused.set(true)\"\n (blur)=\"focused.set(false)\"\n></div>\n\n<!--\n The popover styles its panel as `.wr-popover-overlay > *`, which is this form,\n so the form stays a plain block and the layout lives one level in.\n-->\n<ng-template #linkPanel>\n <form\n class=\"wr-editor-link\"\n novalidate\n [id]=\"linkField.panelId\"\n (submit)=\"applyLink($event)\"\n (focusout)=\"onFocusOut($event)\"\n >\n <div class=\"wr-editor-link__body\">\n <label class=\"wr-editor-link__label\" [attr.for]=\"linkField.controlId()\">{{ linkUrlLabel() }}</label>\n <input\n wrInput\n class=\"wr-editor-link__input\"\n type=\"text\"\n inputmode=\"url\"\n autocomplete=\"url\"\n spellcheck=\"false\"\n [value]=\"linkDraft()\"\n (input)=\"onLinkInput($event)\"\n />\n @if (linkField.invalid()) {\n <p class=\"wr-editor-link__error\" role=\"alert\" [id]=\"linkField.errorId\">{{ linkInvalidLabel() }}</p>\n }\n <div class=\"wr-editor-link__actions\">\n @if (linkActive()) {\n <button wr-btn type=\"button\" class=\"wr-editor-link__remove\" (click)=\"removeLink()\">\n {{ linkRemoveLabel() }}\n </button>\n }\n <button wr-btn type=\"submit\" color=\"primary\" class=\"wr-editor-link__apply\">{{ linkApplyLabel() }}</button>\n </div>\n </div>\n </form>\n</ng-template>\n\n<!--\n Recursion runs through `ngTemplateOutlet`, as in `<wr-markdown>`, so the preview\n is exactly the document with no wrapper between a `<ul>` and its `<li>`.\n-->\n<ng-template #previewBlocks let-raw>\n @for (node of nodesOf(raw); track $index) {\n @switch (node.type) {\n @case ('paragraph') {\n <p [class.wr-editor__placeholder]=\"ariaPlaceholder() !== null\" [attr.data-placeholder]=\"ariaPlaceholder()\">\n <ng-container [ngTemplateOutlet]=\"previewInline\" [ngTemplateOutletContext]=\"{ $implicit: node.content }\" />\n </p>\n }\n @case ('heading') {\n @switch (attr(node, 'level')) {\n @case (2) {\n <h2>\n <ng-container\n [ngTemplateOutlet]=\"previewInline\"\n [ngTemplateOutletContext]=\"{ $implicit: node.content }\"\n />\n </h2>\n }\n @case (3) {\n <h3>\n <ng-container\n [ngTemplateOutlet]=\"previewInline\"\n [ngTemplateOutletContext]=\"{ $implicit: node.content }\"\n />\n </h3>\n }\n @default {\n <h1>\n <ng-container\n [ngTemplateOutlet]=\"previewInline\"\n [ngTemplateOutletContext]=\"{ $implicit: node.content }\"\n />\n </h1>\n }\n }\n }\n @case ('blockquote') {\n <blockquote>\n <ng-container [ngTemplateOutlet]=\"previewBlocks\" [ngTemplateOutletContext]=\"{ $implicit: node.content }\" />\n </blockquote>\n }\n @case ('code_block') {\n <pre><code>{{ textOf(node) }}</code></pre>\n }\n @case ('horizontal_rule') {\n <hr />\n }\n @case ('bullet_list') {\n <ul>\n <ng-container [ngTemplateOutlet]=\"previewBlocks\" [ngTemplateOutletContext]=\"{ $implicit: node.content }\" />\n </ul>\n }\n @case ('ordered_list') {\n <ol [attr.start]=\"attr(node, 'order') === 1 ? null : attr(node, 'order')\">\n <ng-container [ngTemplateOutlet]=\"previewBlocks\" [ngTemplateOutletContext]=\"{ $implicit: node.content }\" />\n </ol>\n }\n @case ('list_item') {\n @let checked = attr(node, 'checked');\n @if (checked === null) {\n <li>\n <ng-container [ngTemplateOutlet]=\"previewBlocks\" [ngTemplateOutletContext]=\"{ $implicit: node.content }\" />\n </li>\n } @else {\n <li class=\"wr-editor__item wr-editor__item--task\" [attr.data-checked]=\"checked\">\n <span class=\"wr-editor__task\" [class.wr-editor__task--checked]=\"checked === true\" aria-hidden=\"true\"></span>\n <span class=\"wr-editor__sr-only\">{{ checked === true ? taskDoneLabel() : taskTodoLabel() }}</span>\n <div class=\"wr-editor__task-body\">\n <ng-container\n [ngTemplateOutlet]=\"previewBlocks\"\n [ngTemplateOutletContext]=\"{ $implicit: node.content }\"\n />\n </div>\n </li>\n }\n }\n @case ('table') {\n <table>\n <tbody>\n <ng-container [ngTemplateOutlet]=\"previewBlocks\" [ngTemplateOutletContext]=\"{ $implicit: node.content }\" />\n </tbody>\n </table>\n }\n @case ('table_row') {\n <tr>\n <ng-container [ngTemplateOutlet]=\"previewBlocks\" [ngTemplateOutletContext]=\"{ $implicit: node.content }\" />\n </tr>\n }\n @case ('table_header') {\n <th [style.text-align]=\"text(node, 'align')\">\n <ng-container [ngTemplateOutlet]=\"previewBlocks\" [ngTemplateOutletContext]=\"{ $implicit: node.content }\" />\n </th>\n }\n @case ('table_cell') {\n <td [style.text-align]=\"text(node, 'align')\">\n <ng-container [ngTemplateOutlet]=\"previewBlocks\" [ngTemplateOutletContext]=\"{ $implicit: node.content }\" />\n </td>\n }\n }\n }\n</ng-template>\n\n<ng-template #previewInline let-raw>\n @for (node of nodesOf(raw); track $index) {\n <ng-container [ngTemplateOutlet]=\"previewMarked\" [ngTemplateOutletContext]=\"{ $implicit: node, depth: 0 }\" />\n }\n</ng-template>\n\n<!-- One mark per level, outermost first — the order the schema ranks them in. -->\n<ng-template #previewMarked let-raw let-depth=\"depth\">\n @let node = nodeOf(raw);\n @let mark = markAt(node, depth);\n @if (mark) {\n @switch (mark.type) {\n @case ('link') {\n <a [href]=\"text(mark, 'href')\" [attr.title]=\"text(mark, 'title')\" rel=\"noopener noreferrer nofollow\"\n ><ng-container\n [ngTemplateOutlet]=\"previewMarked\"\n [ngTemplateOutletContext]=\"{ $implicit: node, depth: depth + 1 }\"\n /></a>\n }\n @case ('strong') {\n <strong\n ><ng-container\n [ngTemplateOutlet]=\"previewMarked\"\n [ngTemplateOutletContext]=\"{ $implicit: node, depth: depth + 1 }\"\n /></strong>\n }\n @case ('em') {\n <em\n ><ng-container\n [ngTemplateOutlet]=\"previewMarked\"\n [ngTemplateOutletContext]=\"{ $implicit: node, depth: depth + 1 }\"\n /></em>\n }\n @case ('underline') {\n <u\n ><ng-container\n [ngTemplateOutlet]=\"previewMarked\"\n [ngTemplateOutletContext]=\"{ $implicit: node, depth: depth + 1 }\"\n /></u>\n }\n @case ('strike') {\n <s\n ><ng-container\n [ngTemplateOutlet]=\"previewMarked\"\n [ngTemplateOutletContext]=\"{ $implicit: node, depth: depth + 1 }\"\n /></s>\n }\n @case ('code') {\n <code\n ><ng-container\n [ngTemplateOutlet]=\"previewMarked\"\n [ngTemplateOutletContext]=\"{ $implicit: node, depth: depth + 1 }\"\n /></code>\n }\n @default {\n <ng-container\n [ngTemplateOutlet]=\"previewMarked\"\n [ngTemplateOutletContext]=\"{ $implicit: node, depth: depth + 1 }\"\n />\n }\n }\n } @else {\n @switch (node.type) {\n @case ('text') {\n <ng-container>{{ node.text }}</ng-container>\n }\n @case ('hard_break') {\n <br />\n }\n @case ('image') {\n <img [src]=\"text(node, 'src')\" [alt]=\"text(node, 'alt') ?? ''\" [attr.title]=\"text(node, 'title')\" />\n }\n }\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["PmDOMParser","nextId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAIH;AACA,MAAM,aAAa,GAAG,GAAG;AAEzB;AACA,MAAM,IAAI,GAAG,QAAQ;AAYrB;AACA,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAsC;AAElE;;;;;;;;;;;;;;;;;AAiBG;AACH,SAAS,OAAO,CAAC,IAAY,EAAE,IAAyC,EAAA;AACtE,IAAA,MAAM,KAAK,GAAI,IAA4D,EAAE,YAAY;AACzF,IAAA,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,IAAI;IAChC,IAAI,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;AAC/B,IAAA,IAAI,MAAM,KAAK,SAAS,EAAE;AACxB,QAAA,MAAM,GAAG,KAAK,CAAC,aAAa,IAAI,IAAI;QACpC,IAAI,CAAC,MAAM,EAAE;AACX,YAAA,I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A,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAE7C,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAlBpB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAAA,aAAA,EAEN,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,YAAY,EAAE,oBAAoB;qBACnC,EAAA,SAAA,EAKU;AACT,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,IAAI,iBAAiB,EAAE,EAAE;AACzE,wBAAA,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,EAAE;qBAC3D,EAAA,OAAA,EACQ,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,s+YAAA,EAAA;s1BA4Hc,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAEI,MAAM,EAAA,EAAA,GAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAC5D,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE9QnE;;AAEG;;"}
@@ -58,10 +58,10 @@ class WrEmpty {
58
58
  title = input(null, /* @ts-ignore */
59
59
  ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
60
60
  resolvedTitle = useI18nText(this.title, 'empty.noData', 'No data');
61
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrEmpty, deps: [], target: i0.ɵɵFactoryTarget.Component });
62
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: WrEmpty, isStandalone: true, selector: "wr-empty", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status" }, classAttribute: "wr-empty" }, ngImport: i0, template: "@if (iconName(); as name) {\n <wr-icon class=\"wr-empty__icon\" [name]=\"name\" />\n} @else if (icon()) {\n <svg\n class=\"wr-icon__svg wr-empty__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\"\n />\n </svg>\n}\n<div class=\"wr-empty__title\">{{ resolvedTitle() }}</div>\n<div class=\"wr-empty__description\">\n <ng-content />\n</div>\n<div class=\"wr-empty__actions\">\n <ng-content select=\"[wrEmptyActions]\" />\n</div>\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
61
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrEmpty, deps: [], target: i0.ɵɵFactoryTarget.Component });
62
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: WrEmpty, isStandalone: true, selector: "wr-empty", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status" }, classAttribute: "wr-empty" }, ngImport: i0, template: "@if (iconName(); as name) {\n <wr-icon class=\"wr-empty__icon\" [name]=\"name\" />\n} @else if (icon()) {\n <svg\n class=\"wr-icon__svg wr-empty__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\"\n />\n </svg>\n}\n<div class=\"wr-empty__title\">{{ resolvedTitle() }}</div>\n<div class=\"wr-empty__description\">\n <ng-content />\n</div>\n<div class=\"wr-empty__actions\">\n <ng-content select=\"[wrEmptyActions]\" />\n</div>\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
63
63
  }
64
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrEmpty, decorators: [{
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrEmpty, decorators: [{
65
65
  type: Component,
66
66
  args: [{ selector: 'wr-empty', encapsulation: ViewEncapsulation.None, host: { class: 'wr-empty', role: 'status' }, imports: [WrIcon], template: "@if (iconName(); as name) {\n <wr-icon class=\"wr-empty__icon\" [name]=\"name\" />\n} @else if (icon()) {\n <svg\n class=\"wr-icon__svg wr-empty__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\"\n />\n </svg>\n}\n<div class=\"wr-empty__title\">{{ resolvedTitle() }}</div>\n<div class=\"wr-empty__description\">\n <ng-content />\n</div>\n<div class=\"wr-empty__actions\">\n <ng-content select=\"[wrEmptyActions]\" />\n</div>\n" }]
67
67
  }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-empty.mjs","sources":["../../../projects/lib/empty/empty.ts","../../../projects/lib/empty/empty.html","../../../projects/lib/empty/ngwr-empty.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, input } from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\n\n/**\n * Empty-state placeholder. Drop into any container where the underlying\n * data is missing (search yielded nothing, table is empty, etc.).\n *\n * Slots:\n *\n * - **Default** — primary description / instructions.\n * - **`[wrEmptyActions]`** — action row rendered below the description.\n *\n * Localization: the default headline reads from the `empty.noData` key in\n * the registered `WrI18n` catalog, falling back to `'No data'` when no\n * `WrI18n` is provided. The `[title]` input always wins when set.\n *\n * @example\n * ```html\n * <wr-empty iconName=\"search\" title=\"No results\">\n * Try a different query or clear filters.\n * <ng-container wrEmptyActions>\n * <wr-btn (click)=\"reset()\">Reset filters</wr-btn>\n * </ng-container>\n * </wr-empty>\n * ```\n *\n * @see https://ngwr.dev/reference/components/empty\n */\n@Component({\n selector: 'wr-empty',\n templateUrl: './empty.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-empty', role: 'status' },\n imports: [WrIcon],\n})\nexport class WrEmpty {\n /**\n * Render the built-in folder glyph. Pass `false` to show no icon at all.\n * Ignored when `iconName` is set — the same contract as `<wr-alert>`.\n *\n * This used to be typed as an icon NAME, which it never was: whatever name\n * you passed, the template drew the folder. Any truthy value still shows it,\n * so nothing that compiled before behaves differently.\n *\n * @default true\n */\n readonly icon = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Show any registered ngwr icon instead of the built-in glyph.\n *\n * @default null\n */\n readonly iconName = input<WrIconName | null>(null);\n\n /** Headline. Falls back to `empty.noData` from WrI18n, then `'No data'`. */\n readonly title = input<string | null>(null);\n\n protected readonly resolvedTitle = useI18nText(this.title, 'empty.noData', 'No data');\n}\n","@if (iconName(); as name) {\n <wr-icon class=\"wr-empty__icon\" [name]=\"name\" />\n} @else if (icon()) {\n <svg\n class=\"wr-icon__svg wr-empty__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\"\n />\n </svg>\n}\n<div class=\"wr-empty__title\">{{ resolvedTitle() }}</div>\n<div class=\"wr-empty__description\">\n <ng-content />\n</div>\n<div class=\"wr-empty__actions\">\n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A,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDiBY,MAAM,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAEL,OAAO,EAAA,UAAA,EAAA,CAAA;kBAPnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,iBAEL,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAA,OAAA,EAClC,CAAC,MAAM,CAAC,EAAA,QAAA,EAAA,owBAAA,EAAA;;;AE3CnB;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-empty.mjs","sources":["../../../projects/lib/empty/empty.ts","../../../projects/lib/empty/empty.html","../../../projects/lib/empty/ngwr-empty.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ViewEncapsulation, input } from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\n\n/**\n * Empty-state placeholder. Drop into any container where the underlying\n * data is missing (search yielded nothing, table is empty, etc.).\n *\n * Slots:\n *\n * - **Default** — primary description / instructions.\n * - **`[wrEmptyActions]`** — action row rendered below the description.\n *\n * Localization: the default headline reads from the `empty.noData` key in\n * the registered `WrI18n` catalog, falling back to `'No data'` when no\n * `WrI18n` is provided. The `[title]` input always wins when set.\n *\n * @example\n * ```html\n * <wr-empty iconName=\"search\" title=\"No results\">\n * Try a different query or clear filters.\n * <ng-container wrEmptyActions>\n * <wr-btn (click)=\"reset()\">Reset filters</wr-btn>\n * </ng-container>\n * </wr-empty>\n * ```\n *\n * @see https://ngwr.dev/reference/components/empty\n */\n@Component({\n selector: 'wr-empty',\n templateUrl: './empty.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-empty', role: 'status' },\n imports: [WrIcon],\n})\nexport class WrEmpty {\n /**\n * Render the built-in folder glyph. Pass `false` to show no icon at all.\n * Ignored when `iconName` is set — the same contract as `<wr-alert>`.\n *\n * This used to be typed as an icon NAME, which it never was: whatever name\n * you passed, the template drew the folder. Any truthy value still shows it,\n * so nothing that compiled before behaves differently.\n *\n * @default true\n */\n readonly icon = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Show any registered ngwr icon instead of the built-in glyph.\n *\n * @default null\n */\n readonly iconName = input<WrIconName | null>(null);\n\n /** Headline. Falls back to `empty.noData` from WrI18n, then `'No data'`. */\n readonly title = input<string | null>(null);\n\n protected readonly resolvedTitle = useI18nText(this.title, 'empty.noData', 'No data');\n}\n","@if (iconName(); as name) {\n <wr-icon class=\"wr-empty__icon\" [name]=\"name\" />\n} @else if (icon()) {\n <svg\n class=\"wr-icon__svg wr-empty__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\"\n />\n </svg>\n}\n<div class=\"wr-empty__title\">{{ resolvedTitle() }}</div>\n<div class=\"wr-empty__description\">\n <ng-content />\n</div>\n<div class=\"wr-empty__actions\">\n <ng-content select=\"[wrEmptyActions]\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AAQH;;;;;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