@aeris-ui/core 22.0.0-alpha.1 → 22.0.0-alpha.11

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 (318) hide show
  1. package/README.md +232 -191
  2. package/THIRD_PARTY_LICENSES.md +48 -0
  3. package/fesm2022/aeris-ui-core-accordion.mjs +666 -273
  4. package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
  5. package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
  6. package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
  7. package/fesm2022/aeris-ui-core-auto-complete.mjs +1301 -450
  8. package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
  9. package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
  10. package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
  11. package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
  12. package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
  13. package/fesm2022/aeris-ui-core-badge.mjs +562 -115
  14. package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
  15. package/fesm2022/aeris-ui-core-block-ui.mjs +221 -101
  16. package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
  17. package/fesm2022/aeris-ui-core-breadcrumb.mjs +609 -199
  18. package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
  19. package/fesm2022/aeris-ui-core-button-forms.mjs +78 -0
  20. package/fesm2022/aeris-ui-core-button-forms.mjs.map +1 -0
  21. package/fesm2022/aeris-ui-core-button-group.mjs +554 -36
  22. package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
  23. package/fesm2022/aeris-ui-core-button.mjs +911 -137
  24. package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
  25. package/fesm2022/aeris-ui-core-card.mjs +371 -101
  26. package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
  27. package/fesm2022/aeris-ui-core-carousel.mjs +835 -369
  28. package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
  29. package/fesm2022/aeris-ui-core-cascade-select.mjs +1294 -525
  30. package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
  31. package/fesm2022/aeris-ui-core-chart.mjs +594 -262
  32. package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
  33. package/fesm2022/aeris-ui-core-checkbox.mjs +619 -150
  34. package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
  35. package/fesm2022/aeris-ui-core-chip.mjs +1109 -121
  36. package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
  37. package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
  38. package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
  39. package/fesm2022/aeris-ui-core-code-block.mjs +687 -0
  40. package/fesm2022/aeris-ui-core-code-block.mjs.map +1 -0
  41. package/fesm2022/aeris-ui-core-color-picker.mjs +2436 -1076
  42. package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
  43. package/fesm2022/aeris-ui-core-command-palette.mjs +996 -0
  44. package/fesm2022/aeris-ui-core-command-palette.mjs.map +1 -0
  45. package/fesm2022/aeris-ui-core-compare.mjs +870 -338
  46. package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
  47. package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1454 -575
  48. package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
  49. package/fesm2022/aeris-ui-core-confirm-popup.mjs +1499 -760
  50. package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
  51. package/fesm2022/aeris-ui-core-context-menu.mjs +975 -449
  52. package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
  53. package/fesm2022/aeris-ui-core-date-picker-aeris-date-picker-input-jAhzMzLQ.mjs +946 -0
  54. package/fesm2022/aeris-ui-core-date-picker-aeris-date-picker-input-jAhzMzLQ.mjs.map +1 -0
  55. package/fesm2022/aeris-ui-core-date-picker.mjs +2538 -1183
  56. package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
  57. package/fesm2022/aeris-ui-core-dialog.mjs +1187 -368
  58. package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
  59. package/fesm2022/aeris-ui-core-divider.mjs +204 -43
  60. package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
  61. package/fesm2022/aeris-ui-core-drawer.mjs +1712 -345
  62. package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
  63. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +418 -254
  64. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
  65. package/fesm2022/aeris-ui-core-editor.mjs +1808 -783
  66. package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
  67. package/fesm2022/aeris-ui-core-file-upload.mjs +1529 -536
  68. package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
  69. package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
  70. package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
  71. package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
  72. package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
  73. package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
  74. package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
  75. package/fesm2022/aeris-ui-core-form-field.mjs +688 -0
  76. package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -0
  77. package/fesm2022/aeris-ui-core-galleria.mjs +2821 -1143
  78. package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
  79. package/fesm2022/aeris-ui-core-glass.mjs +110 -33
  80. package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
  81. package/fesm2022/aeris-ui-core-icon-field.mjs +426 -98
  82. package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
  83. package/fesm2022/aeris-ui-core-inplace.mjs +496 -132
  84. package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
  85. package/fesm2022/aeris-ui-core-input-group.mjs +413 -107
  86. package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
  87. package/fesm2022/aeris-ui-core-input-mask.mjs +713 -257
  88. package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
  89. package/fesm2022/aeris-ui-core-input-number.mjs +1095 -297
  90. package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
  91. package/fesm2022/aeris-ui-core-input-otp.mjs +678 -264
  92. package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
  93. package/fesm2022/aeris-ui-core-input-text.mjs +703 -160
  94. package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
  95. package/fesm2022/aeris-ui-core-kbd.mjs +243 -0
  96. package/fesm2022/aeris-ui-core-kbd.mjs.map +1 -0
  97. package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
  98. package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
  99. package/fesm2022/aeris-ui-core-listbox.mjs +789 -0
  100. package/fesm2022/aeris-ui-core-listbox.mjs.map +1 -0
  101. package/fesm2022/aeris-ui-core-mega-menu.mjs +662 -388
  102. package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
  103. package/fesm2022/aeris-ui-core-menu.mjs +1111 -478
  104. package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
  105. package/fesm2022/aeris-ui-core-menubar.mjs +1081 -411
  106. package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
  107. package/fesm2022/aeris-ui-core-message.mjs +513 -147
  108. package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
  109. package/fesm2022/aeris-ui-core-meter-group.mjs +641 -230
  110. package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
  111. package/fesm2022/aeris-ui-core-multi-select.mjs +1832 -577
  112. package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
  113. package/fesm2022/aeris-ui-core-navbar.mjs +1407 -0
  114. package/fesm2022/aeris-ui-core-navbar.mjs.map +1 -0
  115. package/fesm2022/aeris-ui-core-order-list.mjs +748 -220
  116. package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
  117. package/fesm2022/aeris-ui-core-organization-chart.mjs +521 -201
  118. package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
  119. package/fesm2022/aeris-ui-core-paginator.mjs +671 -127
  120. package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
  121. package/fesm2022/aeris-ui-core-panel.mjs +602 -210
  122. package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
  123. package/fesm2022/aeris-ui-core-password.mjs +1046 -269
  124. package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
  125. package/fesm2022/aeris-ui-core-pick-list.mjs +1796 -703
  126. package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
  127. package/fesm2022/aeris-ui-core-popover.mjs +1354 -385
  128. package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
  129. package/fesm2022/aeris-ui-core-progress-bar.mjs +609 -182
  130. package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
  131. package/fesm2022/aeris-ui-core-progress-spinner.mjs +428 -133
  132. package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
  133. package/fesm2022/aeris-ui-core-radio-button.mjs +502 -132
  134. package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
  135. package/fesm2022/aeris-ui-core-rating.mjs +506 -231
  136. package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
  137. package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
  138. package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
  139. package/fesm2022/aeris-ui-core-scroll-top.mjs +279 -69
  140. package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
  141. package/fesm2022/aeris-ui-core-select-native.mjs +145 -0
  142. package/fesm2022/aeris-ui-core-select-native.mjs.map +1 -0
  143. package/fesm2022/aeris-ui-core-select.mjs +1984 -668
  144. package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
  145. package/fesm2022/aeris-ui-core-sidebar.mjs +1293 -0
  146. package/fesm2022/aeris-ui-core-sidebar.mjs.map +1 -0
  147. package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
  148. package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
  149. package/fesm2022/aeris-ui-core-slider.mjs +884 -430
  150. package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
  151. package/fesm2022/aeris-ui-core-speed-dial.mjs +882 -337
  152. package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
  153. package/fesm2022/aeris-ui-core-split-button.mjs +972 -268
  154. package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
  155. package/fesm2022/aeris-ui-core-splitter.mjs +831 -356
  156. package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
  157. package/fesm2022/aeris-ui-core-stepper.mjs +705 -256
  158. package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
  159. package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
  160. package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
  161. package/fesm2022/aeris-ui-core-table.mjs +2927 -923
  162. package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
  163. package/fesm2022/aeris-ui-core-tabs.mjs +855 -283
  164. package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
  165. package/fesm2022/aeris-ui-core-textarea.mjs +919 -221
  166. package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
  167. package/fesm2022/aeris-ui-core-theme-builder.mjs +1368 -1407
  168. package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
  169. package/fesm2022/aeris-ui-core-theming.mjs +132 -144
  170. package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
  171. package/fesm2022/aeris-ui-core-tiered-menu.mjs +966 -447
  172. package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
  173. package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
  174. package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
  175. package/fesm2022/aeris-ui-core-toast.mjs +1109 -384
  176. package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
  177. package/fesm2022/aeris-ui-core-toggle-switch.mjs +398 -132
  178. package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
  179. package/fesm2022/aeris-ui-core-toolbar.mjs +1340 -131
  180. package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
  181. package/fesm2022/aeris-ui-core-tooltip.mjs +625 -330
  182. package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
  183. package/fesm2022/aeris-ui-core-tree-select.mjs +1650 -627
  184. package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
  185. package/fesm2022/aeris-ui-core-tree-table.mjs +2442 -994
  186. package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
  187. package/fesm2022/aeris-ui-core-tree.mjs +1257 -670
  188. package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
  189. package/fesm2022/aeris-ui-core.mjs +1601 -312
  190. package/fesm2022/aeris-ui-core.mjs.map +1 -1
  191. package/package.json +48 -8
  192. package/schematics/ng-add/schema.json +1 -1
  193. package/schematics/runtime/schematics/ng-add/options.js +4 -4
  194. package/schematics/runtime/schematics/ng-add/options.js.map +1 -1
  195. package/schematics/runtime/schematics/ng-add/workspace.js +1 -1
  196. package/schematics/runtime/schematics/ng-add/workspace.js.map +1 -1
  197. package/schematics/runtime/theme-builder/aeris-color-derivation.js +1 -1
  198. package/schematics/runtime/theme-builder/aeris-contrast.js +38 -17
  199. package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -1
  200. package/schematics/runtime/theme-builder/aeris-foundation.js +13 -8
  201. package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -1
  202. package/schematics/runtime/theme-builder/aeris-semantic-tones.js +33 -23
  203. package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -1
  204. package/schematics/runtime/theme-builder/aeris-theme-generator.js +8 -2
  205. package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -1
  206. package/schematics/runtime/theme-builder/aeris-theme-resolver.js +63 -76
  207. package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -1
  208. package/schematics/runtime/theme-builder/aeris-theme-tokens.js +15 -5
  209. package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -1
  210. package/schematics/runtime/theme-builder/aeris-theme-validation.js +18 -2
  211. package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -1
  212. package/schematics/runtime/theme-builder/aeris-theme.js +121 -34
  213. package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
  214. package/styles/_choice-card.scss +93 -0
  215. package/styles/_fallback-colors.scss +10 -0
  216. package/styles/_icon-artwork.scss +14 -0
  217. package/styles/_icon-template.scss +42 -0
  218. package/styles/_mobile.scss +16 -0
  219. package/styles/_selection-icons.scss +12 -0
  220. package/styles/_table-pinning.scss +119 -0
  221. package/styles/_tokens.scss +5 -5
  222. package/styles/aeris.css +447 -137
  223. package/styles/controls.css +205 -35
  224. package/tools/aeris-theme.mjs +4 -4
  225. package/tools/aeris-theme.schema.json +18 -13
  226. package/types/aeris-ui-core-accordion.d.ts +167 -93
  227. package/types/aeris-ui-core-animate-on-scroll.d.ts +72 -31
  228. package/types/aeris-ui-core-auto-complete.d.ts +339 -140
  229. package/types/aeris-ui-core-auto-focus.d.ts +24 -16
  230. package/types/aeris-ui-core-avatar.d.ts +112 -42
  231. package/types/aeris-ui-core-badge.d.ts +160 -46
  232. package/types/aeris-ui-core-block-ui.d.ts +48 -27
  233. package/types/aeris-ui-core-breadcrumb.d.ts +163 -92
  234. package/types/aeris-ui-core-button-forms.d.ts +18 -0
  235. package/types/aeris-ui-core-button-group.d.ts +150 -16
  236. package/types/aeris-ui-core-button.d.ts +274 -67
  237. package/types/aeris-ui-core-card.d.ts +74 -37
  238. package/types/aeris-ui-core-carousel.d.ts +213 -117
  239. package/types/aeris-ui-core-cascade-select.d.ts +275 -123
  240. package/types/aeris-ui-core-chart.d.ts +150 -84
  241. package/types/aeris-ui-core-checkbox.d.ts +173 -54
  242. package/types/aeris-ui-core-chip.d.ts +316 -56
  243. package/types/aeris-ui-core-class-names.d.ts +22 -20
  244. package/types/aeris-ui-core-code-block.d.ts +201 -0
  245. package/types/aeris-ui-core-color-picker.d.ts +450 -143
  246. package/types/aeris-ui-core-command-palette.d.ts +267 -0
  247. package/types/aeris-ui-core-compare.d.ts +230 -102
  248. package/types/aeris-ui-core-confirm-dialog.d.ts +450 -245
  249. package/types/aeris-ui-core-confirm-popup.d.ts +442 -263
  250. package/types/aeris-ui-core-context-menu.d.ts +270 -146
  251. package/types/aeris-ui-core-date-picker.d.ts +594 -219
  252. package/types/aeris-ui-core-dialog.d.ts +301 -117
  253. package/types/aeris-ui-core-divider.d.ts +58 -20
  254. package/types/aeris-ui-core-drawer.d.ts +380 -112
  255. package/types/aeris-ui-core-dynamic-dialog.d.ts +162 -137
  256. package/types/aeris-ui-core-editor.d.ts +257 -123
  257. package/types/aeris-ui-core-file-upload.d.ts +385 -197
  258. package/types/aeris-ui-core-filter-service.d.ts +48 -52
  259. package/types/aeris-ui-core-fluid.d.ts +12 -9
  260. package/types/aeris-ui-core-focus-trap.d.ts +39 -31
  261. package/types/aeris-ui-core-form-field.d.ts +163 -0
  262. package/types/aeris-ui-core-galleria.d.ts +636 -256
  263. package/types/aeris-ui-core-glass.d.ts +24 -11
  264. package/types/aeris-ui-core-icon-field.d.ts +94 -32
  265. package/types/aeris-ui-core-inplace.d.ts +129 -62
  266. package/types/aeris-ui-core-input-group.d.ts +84 -33
  267. package/types/aeris-ui-core-input-mask.d.ts +201 -69
  268. package/types/aeris-ui-core-input-number.d.ts +291 -87
  269. package/types/aeris-ui-core-input-otp.d.ts +191 -81
  270. package/types/aeris-ui-core-input-text.d.ts +195 -60
  271. package/types/aeris-ui-core-kbd.d.ts +74 -0
  272. package/types/aeris-ui-core-key-filter.d.ts +53 -39
  273. package/types/aeris-ui-core-listbox.d.ts +222 -0
  274. package/types/aeris-ui-core-mega-menu.d.ts +181 -121
  275. package/types/aeris-ui-core-menu.d.ts +283 -168
  276. package/types/aeris-ui-core-menubar.d.ts +289 -135
  277. package/types/aeris-ui-core-message.d.ts +138 -60
  278. package/types/aeris-ui-core-meter-group.d.ts +169 -90
  279. package/types/aeris-ui-core-multi-select.d.ts +469 -180
  280. package/types/aeris-ui-core-navbar.d.ts +208 -0
  281. package/types/aeris-ui-core-order-list.d.ts +168 -66
  282. package/types/aeris-ui-core-organization-chart.d.ts +139 -77
  283. package/types/aeris-ui-core-paginator.d.ts +129 -38
  284. package/types/aeris-ui-core-panel.d.ts +149 -78
  285. package/types/aeris-ui-core-password.d.ts +276 -102
  286. package/types/aeris-ui-core-pick-list.d.ts +428 -179
  287. package/types/aeris-ui-core-popover.d.ts +294 -105
  288. package/types/aeris-ui-core-progress-bar.d.ts +163 -73
  289. package/types/aeris-ui-core-progress-spinner.d.ts +116 -48
  290. package/types/aeris-ui-core-radio-button.d.ts +146 -50
  291. package/types/aeris-ui-core-rating.d.ts +149 -76
  292. package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
  293. package/types/aeris-ui-core-scroll-top.d.ts +73 -29
  294. package/types/aeris-ui-core-select-native.d.ts +40 -0
  295. package/types/aeris-ui-core-select.d.ts +487 -217
  296. package/types/aeris-ui-core-sidebar.d.ts +220 -0
  297. package/types/aeris-ui-core-skeleton.d.ts +39 -17
  298. package/types/aeris-ui-core-slider.d.ts +270 -115
  299. package/types/aeris-ui-core-speed-dial.d.ts +241 -111
  300. package/types/aeris-ui-core-split-button.d.ts +267 -113
  301. package/types/aeris-ui-core-splitter.d.ts +224 -106
  302. package/types/aeris-ui-core-stepper.d.ts +184 -91
  303. package/types/aeris-ui-core-style-class.d.ts +141 -71
  304. package/types/aeris-ui-core-table.d.ts +729 -304
  305. package/types/aeris-ui-core-tabs.d.ts +193 -76
  306. package/types/aeris-ui-core-textarea.d.ts +271 -78
  307. package/types/aeris-ui-core-theme-builder.d.ts +220 -463
  308. package/types/aeris-ui-core-theming.d.ts +42 -45
  309. package/types/aeris-ui-core-tiered-menu.d.ts +257 -142
  310. package/types/aeris-ui-core-timeline.d.ts +109 -71
  311. package/types/aeris-ui-core-toast.d.ts +231 -115
  312. package/types/aeris-ui-core-toggle-switch.d.ts +125 -51
  313. package/types/aeris-ui-core-toolbar.d.ts +314 -47
  314. package/types/aeris-ui-core-tooltip.d.ts +157 -88
  315. package/types/aeris-ui-core-tree-select.d.ts +394 -171
  316. package/types/aeris-ui-core-tree-table.d.ts +629 -288
  317. package/types/aeris-ui-core-tree.d.ts +294 -165
  318. package/types/aeris-ui-core.d.ts +338 -74
@@ -1,561 +1,726 @@
1
- import { DOCUMENT } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, model, input, booleanAttribute, output, viewChild, signal, computed, effect, SecurityContext, forwardRef, ViewEncapsulation, Component } from '@angular/core';
4
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
- import { DomSanitizer } from '@angular/platform-browser';
6
- import { FORMAT_TEXT_COMMAND, $getSelection, $isRangeSelection, $createParagraphNode, UNDO_COMMAND, REDO_COMMAND, FORMAT_ELEMENT_COMMAND, INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND, $isTextNode, createEditor, $getRoot, SELECTION_CHANGE_COMMAND, COMMAND_PRIORITY_LOW, $isElementNode } from 'lexical';
7
- import { $createHeadingNode, $createQuoteNode, HeadingNode, QuoteNode, registerRichText } from '@lexical/rich-text';
8
- import { $generateHtmlFromNodes, $generateNodesFromDOM } from '@lexical/html';
9
- import { INSERT_UNORDERED_LIST_COMMAND, INSERT_ORDERED_LIST_COMMAND, INSERT_CHECK_LIST_COMMAND, REMOVE_LIST_COMMAND, ListNode, ListItemNode, registerList, registerCheckList } from '@lexical/list';
10
- import { createEmptyHistoryState, registerHistory } from '@lexical/history';
11
- import { $setBlocksType } from '@lexical/selection';
12
-
1
+ import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, SecurityContext, ViewEncapsulation, booleanAttribute, computed, effect, forwardRef, inject, input, model, output, signal, viewChild } from "@angular/core";
4
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
5
+ import { ɵaerisDisplayInvalid } from "@aeris-ui/core";
6
+ import { DomSanitizer } from "@angular/platform-browser";
7
+ import { $createParagraphNode, $getRoot, $getSelection, $isElementNode, $isRangeSelection, $isTextNode, COMMAND_PRIORITY_LOW, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND, REDO_COMMAND, SELECTION_CHANGE_COMMAND, UNDO_COMMAND, createEditor } from "lexical";
8
+ import { $createHeadingNode, $createQuoteNode, HeadingNode, QuoteNode, registerRichText } from "@lexical/rich-text";
9
+ import { $generateHtmlFromNodes, $generateNodesFromDOM } from "@lexical/html";
10
+ import { INSERT_CHECK_LIST_COMMAND, INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode, REMOVE_LIST_COMMAND, registerCheckList, registerList } from "@lexical/list";
11
+ import { createEmptyHistoryState, registerHistory } from "@lexical/history";
12
+ import { $setBlocksType } from "@lexical/selection";
13
13
  const AERIS_EDITOR_DEFAULT_FORMATS = [
14
- 'undo',
15
- 'redo',
16
- 'bold',
17
- 'italic',
18
- 'underline',
19
- 'heading',
20
- 'quote',
21
- 'bulletList',
22
- 'numberedList',
14
+ "undo",
15
+ "redo",
16
+ "bold",
17
+ "italic",
18
+ "underline",
19
+ "heading",
20
+ "quote",
21
+ "bulletList",
22
+ "numberedList"
23
23
  ];
24
24
  const AERIS_EDITOR_ALL_FORMATS = [
25
- 'undo',
26
- 'redo',
27
- 'bold',
28
- 'italic',
29
- 'underline',
30
- 'strikethrough',
31
- 'code',
32
- 'highlight',
33
- 'subscript',
34
- 'superscript',
35
- 'lowercase',
36
- 'uppercase',
37
- 'capitalize',
38
- 'paragraph',
39
- 'heading1',
40
- 'heading2',
41
- 'heading3',
42
- 'heading4',
43
- 'heading5',
44
- 'heading6',
45
- 'quote',
46
- 'bulletList',
47
- 'numberedList',
48
- 'checkList',
49
- 'alignLeft',
50
- 'alignStart',
51
- 'alignCenter',
52
- 'alignRight',
53
- 'alignEnd',
54
- 'alignJustify',
55
- 'outdent',
56
- 'indent',
57
- 'clear',
25
+ "undo",
26
+ "redo",
27
+ "bold",
28
+ "italic",
29
+ "underline",
30
+ "strikethrough",
31
+ "code",
32
+ "highlight",
33
+ "subscript",
34
+ "superscript",
35
+ "lowercase",
36
+ "uppercase",
37
+ "capitalize",
38
+ "paragraph",
39
+ "heading1",
40
+ "heading2",
41
+ "heading3",
42
+ "heading4",
43
+ "heading5",
44
+ "heading6",
45
+ "quote",
46
+ "bulletList",
47
+ "numberedList",
48
+ "checkList",
49
+ "alignLeft",
50
+ "alignStart",
51
+ "alignCenter",
52
+ "alignRight",
53
+ "alignEnd",
54
+ "alignJustify",
55
+ "outdent",
56
+ "indent",
57
+ "clear"
58
58
  ];
59
59
  let editorId = 0;
60
- class AerisEditorComponent {
61
- document = inject(DOCUMENT);
62
- sanitizer = inject(DomSanitizer);
63
- value = model('', /* @ts-ignore */
64
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
65
- inputId = input('', /* @ts-ignore */
66
- ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
67
- name = input('', /* @ts-ignore */
68
- ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
69
- placeholder = input('Write something...', /* @ts-ignore */
70
- ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
71
- ariaLabel = input('', /* @ts-ignore */
72
- ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
73
- ariaLabelledby = input('', /* @ts-ignore */
74
- ...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
75
- ariaDescribedby = input('', /* @ts-ignore */
76
- ...(ngDevMode ? [{ debugName: "ariaDescribedby" }] : /* istanbul ignore next */ []));
77
- toolbarAriaLabel = input('Formatting tools', /* @ts-ignore */
78
- ...(ngDevMode ? [{ debugName: "toolbarAriaLabel" }] : /* istanbul ignore next */ []));
79
- size = input('md', /* @ts-ignore */
80
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
81
- appearance = input('outline', /* @ts-ignore */
82
- ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
83
- minHeight = input('12rem', /* @ts-ignore */
84
- ...(ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []));
85
- formats = input(AERIS_EDITOR_DEFAULT_FORMATS, /* @ts-ignore */
86
- ...(ngDevMode ? [{ debugName: "formats" }] : /* istanbul ignore next */ []));
87
- namespace = input('AerisEditor', /* @ts-ignore */
88
- ...(ngDevMode ? [{ debugName: "namespace" }] : /* istanbul ignore next */ []));
89
- lexicalTheme = input({}, /* @ts-ignore */
90
- ...(ngDevMode ? [{ debugName: "lexicalTheme" }] : /* istanbul ignore next */ []));
91
- htmlConfig = input({}, /* @ts-ignore */
92
- ...(ngDevMode ? [{ debugName: "htmlConfig" }] : /* istanbul ignore next */ []));
93
- extensions = input([], /* @ts-ignore */
94
- ...(ngDevMode ? [{ debugName: "extensions" }] : /* istanbul ignore next */ []));
95
- disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
96
- readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
97
- required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
98
- invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
99
- fluid = input(false, { ...(ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
100
- showToolbar = input(true, { ...(ngDevMode ? { debugName: "showToolbar" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
101
- valueInput = output();
102
- changed = output();
103
- focused = output();
104
- blurred = output();
105
- touch = output();
106
- ready = output();
107
- editorRoot = viewChild('editorRoot', /* @ts-ignore */
108
- ...(ngDevMode ? [{ debugName: "editorRoot" }] : /* istanbul ignore next */ []));
109
- generatedId = `aeris-editor-${++editorId}`;
110
- formDisabled = signal(false, /* @ts-ignore */
111
- ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
112
- isEditorReady = signal(false, /* @ts-ignore */
113
- ...(ngDevMode ? [{ debugName: "isEditorReady" }] : /* istanbul ignore next */ []));
114
- hasFocus = signal(false, /* @ts-ignore */
115
- ...(ngDevMode ? [{ debugName: "hasFocus" }] : /* istanbul ignore next */ []));
116
- textContent = signal('', /* @ts-ignore */
117
- ...(ngDevMode ? [{ debugName: "textContent" }] : /* istanbul ignore next */ []));
118
- activeBold = signal(false, /* @ts-ignore */
119
- ...(ngDevMode ? [{ debugName: "activeBold" }] : /* istanbul ignore next */ []));
120
- activeItalic = signal(false, /* @ts-ignore */
121
- ...(ngDevMode ? [{ debugName: "activeItalic" }] : /* istanbul ignore next */ []));
122
- activeUnderline = signal(false, /* @ts-ignore */
123
- ...(ngDevMode ? [{ debugName: "activeUnderline" }] : /* istanbul ignore next */ []));
124
- activeStrikethrough = signal(false, /* @ts-ignore */
125
- ...(ngDevMode ? [{ debugName: "activeStrikethrough" }] : /* istanbul ignore next */ []));
126
- activeCode = signal(false, /* @ts-ignore */
127
- ...(ngDevMode ? [{ debugName: "activeCode" }] : /* istanbul ignore next */ []));
128
- activeHighlight = signal(false, /* @ts-ignore */
129
- ...(ngDevMode ? [{ debugName: "activeHighlight" }] : /* istanbul ignore next */ []));
130
- activeSubscript = signal(false, /* @ts-ignore */
131
- ...(ngDevMode ? [{ debugName: "activeSubscript" }] : /* istanbul ignore next */ []));
132
- activeSuperscript = signal(false, /* @ts-ignore */
133
- ...(ngDevMode ? [{ debugName: "activeSuperscript" }] : /* istanbul ignore next */ []));
134
- activeLowercase = signal(false, /* @ts-ignore */
135
- ...(ngDevMode ? [{ debugName: "activeLowercase" }] : /* istanbul ignore next */ []));
136
- activeUppercase = signal(false, /* @ts-ignore */
137
- ...(ngDevMode ? [{ debugName: "activeUppercase" }] : /* istanbul ignore next */ []));
138
- activeCapitalize = signal(false, /* @ts-ignore */
139
- ...(ngDevMode ? [{ debugName: "activeCapitalize" }] : /* istanbul ignore next */ []));
140
- activeBlock = signal('paragraph', /* @ts-ignore */
141
- ...(ngDevMode ? [{ debugName: "activeBlock" }] : /* istanbul ignore next */ []));
142
- activeList = signal(null, /* @ts-ignore */
143
- ...(ngDevMode ? [{ debugName: "activeList" }] : /* istanbul ignore next */ []));
144
- activeAlignment = signal('left', /* @ts-ignore */
145
- ...(ngDevMode ? [{ debugName: "activeAlignment" }] : /* istanbul ignore next */ []));
146
- availableFormats = computed(() => new Set(this.formats()), /* @ts-ignore */
147
- ...(ngDevMode ? [{ debugName: "availableFormats" }] : /* istanbul ignore next */ []));
148
- hasInlineActions = computed(() => this.formats().some((format) => [
149
- 'bold',
150
- 'italic',
151
- 'underline',
152
- 'strikethrough',
153
- 'code',
154
- 'highlight',
155
- 'subscript',
156
- 'superscript',
157
- 'lowercase',
158
- 'uppercase',
159
- 'capitalize',
160
- ].includes(format)), /* @ts-ignore */
161
- ...(ngDevMode ? [{ debugName: "hasInlineActions" }] : /* istanbul ignore next */ []));
162
- hasBlockActions = computed(() => this.formats().some((format) => [
163
- 'paragraph',
164
- 'heading',
165
- 'heading1',
166
- 'heading2',
167
- 'heading3',
168
- 'heading4',
169
- 'heading5',
170
- 'heading6',
171
- 'quote',
172
- ].includes(format)), /* @ts-ignore */
173
- ...(ngDevMode ? [{ debugName: "hasBlockActions" }] : /* istanbul ignore next */ []));
174
- hasListActions = computed(() => this.formats().some((format) => ['bulletList', 'numberedList', 'checkList'].includes(format)), /* @ts-ignore */
175
- ...(ngDevMode ? [{ debugName: "hasListActions" }] : /* istanbul ignore next */ []));
176
- hasAlignmentActions = computed(() => this.formats().some((format) => ['alignLeft', 'alignStart', 'alignCenter', 'alignRight', 'alignEnd', 'alignJustify'].includes(format)), /* @ts-ignore */
177
- ...(ngDevMode ? [{ debugName: "hasAlignmentActions" }] : /* istanbul ignore next */ []));
178
- hasDocumentActions = computed(() => this.formats().some((format) => ['outdent', 'indent', 'clear'].includes(format)), /* @ts-ignore */
179
- ...(ngDevMode ? [{ debugName: "hasDocumentActions" }] : /* istanbul ignore next */ []));
180
- resolvedInputId = computed(() => this.inputId() || this.generatedId, /* @ts-ignore */
181
- ...(ngDevMode ? [{ debugName: "resolvedInputId" }] : /* istanbul ignore next */ []));
182
- effectiveDisabled = computed(() => this.disabled() || this.formDisabled(), /* @ts-ignore */
183
- ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
184
- editable = computed(() => !this.effectiveDisabled() && !this.readonly(), /* @ts-ignore */
185
- ...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
186
- toolbarDisabled = computed(() => !this.editable() || !this.isEditorReady(), /* @ts-ignore */
187
- ...(ngDevMode ? [{ debugName: "toolbarDisabled" }] : /* istanbul ignore next */ []));
188
- placeholderVisible = computed(() => !this.hasFocus() && !this.textContent().trim() && !!this.placeholder(), /* @ts-ignore */
189
- ...(ngDevMode ? [{ debugName: "placeholderVisible" }] : /* istanbul ignore next */ []));
190
- editor = null;
191
- unregisterEditor = null;
192
- lastSyncedValue = '';
193
- onChange = () => undefined;
194
- onTouched = () => undefined;
195
- constructor() {
196
- effect(() => {
197
- const editable = this.editable();
198
- this.editor?.setEditable(editable);
199
- });
200
- effect(() => {
201
- const nextValue = this.value();
202
- if (!this.editor || nextValue === this.lastSyncedValue)
203
- return;
204
- this.writeEditorValue(nextValue);
205
- });
206
- }
207
- ngAfterViewInit() {
208
- this.createEditor();
209
- }
210
- ngOnDestroy() {
211
- this.unregisterEditor?.();
212
- this.unregisterEditor = null;
213
- this.editor?.setRootElement(null);
214
- this.editor = null;
215
- this.isEditorReady.set(false);
216
- }
217
- writeValue(value) {
218
- const nextValue = value == null ? '' : String(value);
219
- this.value.set(nextValue);
220
- this.writeEditorValue(nextValue);
221
- }
222
- registerOnChange(callback) {
223
- this.onChange = callback;
224
- }
225
- registerOnTouched(callback) {
226
- this.onTouched = callback;
227
- }
228
- setDisabledState(disabled) {
229
- this.formDisabled.set(disabled);
230
- }
231
- focus() {
232
- this.editor?.focus();
233
- }
234
- clear() {
235
- if (!this.editable())
236
- return;
237
- this.writeEditorValue('');
238
- this.focus();
239
- }
240
- reset() {
241
- this.clear();
242
- }
243
- format(format) {
244
- if (!this.editable())
245
- return;
246
- this.editor?.dispatchCommand(FORMAT_TEXT_COMMAND, format);
247
- }
248
- setBlock(block) {
249
- if (!this.editable())
250
- return;
251
- this.editor?.update(() => {
252
- const selection = $getSelection();
253
- if (!$isRangeSelection(selection))
254
- return;
255
- if (block === 'heading') {
256
- block = 'h2';
257
- }
258
- if (block.startsWith('h') && this.activeBlock() !== block) {
259
- $setBlocksType(selection, () => $createHeadingNode(block));
260
- return;
261
- }
262
- if (block === 'quote' && this.activeBlock() !== 'quote') {
263
- $setBlocksType(selection, () => $createQuoteNode());
264
- return;
265
- }
266
- $setBlocksType(selection, () => $createParagraphNode());
267
- });
268
- }
269
- toggleBulletList() {
270
- if (!this.editable())
271
- return;
272
- this.editor?.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);
273
- }
274
- toggleNumberedList() {
275
- if (!this.editable())
276
- return;
277
- this.editor?.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);
278
- }
279
- toggleCheckList() {
280
- if (!this.editable())
281
- return;
282
- this.editor?.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined);
283
- }
284
- removeList() {
285
- if (!this.editable())
286
- return;
287
- this.editor?.dispatchCommand(REMOVE_LIST_COMMAND, undefined);
288
- }
289
- undo() {
290
- if (!this.editable())
291
- return;
292
- this.editor?.dispatchCommand(UNDO_COMMAND, undefined);
293
- }
294
- redo() {
295
- if (!this.editable())
296
- return;
297
- this.editor?.dispatchCommand(REDO_COMMAND, undefined);
298
- }
299
- align(alignment) {
300
- if (!this.editable())
301
- return;
302
- this.editor?.dispatchCommand(FORMAT_ELEMENT_COMMAND, alignment);
303
- }
304
- indent() {
305
- if (!this.editable())
306
- return;
307
- this.editor?.dispatchCommand(INDENT_CONTENT_COMMAND, undefined);
308
- }
309
- outdent() {
310
- if (!this.editable())
311
- return;
312
- this.editor?.dispatchCommand(OUTDENT_CONTENT_COMMAND, undefined);
313
- }
314
- clearFormatting() {
315
- if (!this.editable())
316
- return;
317
- this.editor?.update(() => {
318
- const selection = $getSelection();
319
- if (!$isRangeSelection(selection))
320
- return;
321
- selection.setFormat(0);
322
- for (const node of selection.getNodes()) {
323
- if ($isTextNode(node)) {
324
- node.setFormat(0);
325
- node.setStyle('');
326
- }
327
- }
328
- });
329
- }
330
- getLexicalEditor() {
331
- return this.editor;
332
- }
333
- handleFocus(event) {
334
- this.hasFocus.set(true);
335
- this.focused.emit(event);
336
- }
337
- handleBlur(event) {
338
- this.blurred.emit(event);
339
- }
340
- handleFocusOut(event) {
341
- const relatedTarget = event.relatedTarget;
342
- const root = this.editorRoot()?.nativeElement;
343
- if (relatedTarget instanceof Node && root?.parentElement?.contains(relatedTarget))
344
- return;
345
- this.hasFocus.set(false);
346
- this.touch.emit();
347
- this.onTouched();
348
- }
349
- createEditor() {
350
- const rootElement = this.editorRoot()?.nativeElement;
351
- if (!rootElement)
352
- return;
353
- const extensions = this.extensions();
354
- const editor = createEditor({
355
- namespace: this.namespace(),
356
- html: this.htmlConfig(),
357
- nodes: [
358
- HeadingNode,
359
- QuoteNode,
360
- ListNode,
361
- ListItemNode,
362
- ...extensions.flatMap((extension) => extension.nodes ?? []),
363
- ],
364
- onError(error) {
365
- throw error;
366
- },
367
- theme: this.resolveTheme(),
368
- });
369
- this.editor = editor;
370
- editor.setRootElement(rootElement);
371
- editor.setEditable(this.editable());
372
- this.isEditorReady.set(true);
373
- const historyState = createEmptyHistoryState();
374
- const cleanups = [
375
- registerRichText(editor),
376
- registerList(editor),
377
- registerCheckList(editor),
378
- registerHistory(editor, historyState, 250),
379
- ...extensions.flatMap((extension) => {
380
- const cleanup = extension.setup?.(editor);
381
- return cleanup ? [cleanup] : [];
382
- }),
383
- editor.registerUpdateListener(({ editorState }) => {
384
- editorState.read(() => {
385
- const root = $getRoot();
386
- const textContent = root.getTextContent();
387
- const hasStructuredContent = root
388
- .getChildren()
389
- .some((node) => !['paragraph', 'heading', 'quote'].includes(node.getType()));
390
- const html = textContent.trim() || hasStructuredContent
391
- ? $generateHtmlFromNodes(editor, null)
392
- : '';
393
- this.syncSelectionState();
394
- this.emitValue(html, textContent);
395
- }, { editor });
396
- }),
397
- editor.registerCommand(SELECTION_CHANGE_COMMAND, () => {
398
- this.syncSelectionState();
399
- return false;
400
- }, COMMAND_PRIORITY_LOW),
401
- ];
402
- this.unregisterEditor = () => {
403
- for (const cleanup of cleanups)
404
- cleanup();
405
- };
406
- this.writeEditorValue(this.value());
407
- this.ready.emit(editor);
408
- }
409
- resolveTheme() {
410
- const customTheme = this.lexicalTheme();
411
- return {
412
- ...customTheme,
413
- heading: {
414
- h1: 'aeris-editor-content__heading aeris-editor-content__heading--h1',
415
- h2: 'aeris-editor-content__heading aeris-editor-content__heading--h2',
416
- h3: 'aeris-editor-content__heading aeris-editor-content__heading--h3',
417
- h4: 'aeris-editor-content__heading aeris-editor-content__heading--h4',
418
- h5: 'aeris-editor-content__heading aeris-editor-content__heading--h5',
419
- h6: 'aeris-editor-content__heading aeris-editor-content__heading--h6',
420
- ...customTheme.heading,
421
- },
422
- list: {
423
- checklist: 'aeris-editor-content__check-list',
424
- listitem: 'aeris-editor-content__list-item',
425
- listitemChecked: 'aeris-editor-content__list-item--checked',
426
- listitemUnchecked: 'aeris-editor-content__list-item--unchecked',
427
- ol: 'aeris-editor-content__ordered-list',
428
- ul: 'aeris-editor-content__unordered-list',
429
- ...customTheme.list,
430
- nested: {
431
- listitem: 'aeris-editor-content__nested-list-item',
432
- ...customTheme.list?.nested,
433
- },
434
- },
435
- paragraph: customTheme.paragraph ?? 'aeris-editor-content__paragraph',
436
- quote: customTheme.quote ?? 'aeris-editor-content__quote',
437
- text: {
438
- bold: 'aeris-editor-content__bold',
439
- capitalize: 'aeris-editor-content__capitalize',
440
- code: 'aeris-editor-content__code',
441
- highlight: 'aeris-editor-content__highlight',
442
- italic: 'aeris-editor-content__italic',
443
- lowercase: 'aeris-editor-content__lowercase',
444
- strikethrough: 'aeris-editor-content__strikethrough',
445
- subscript: 'aeris-editor-content__subscript',
446
- superscript: 'aeris-editor-content__superscript',
447
- underline: 'aeris-editor-content__underline',
448
- underlineStrikethrough: 'aeris-editor-content__underline aeris-editor-content__strikethrough',
449
- uppercase: 'aeris-editor-content__uppercase',
450
- ...customTheme.text,
451
- },
452
- };
453
- }
454
- writeEditorValue(value) {
455
- if (!this.editor)
456
- return;
457
- this.lastSyncedValue = value;
458
- this.editor.update(() => {
459
- const root = $getRoot();
460
- root.clear();
461
- const sanitizedValue = this.sanitizer.sanitize(SecurityContext.HTML, value) ?? '';
462
- if (!sanitizedValue.trim()) {
463
- root.append($createParagraphNode());
464
- this.textContent.set('');
465
- return;
466
- }
467
- const Parser = this.document.defaultView?.DOMParser;
468
- if (!Parser) {
469
- root.append($createParagraphNode());
470
- this.textContent.set('');
471
- return;
472
- }
473
- const parser = new Parser();
474
- const dom = parser.parseFromString(sanitizedValue, 'text/html');
475
- const nodes = $generateNodesFromDOM(this.editor, dom);
476
- root.append(...(nodes.length ? nodes : [$createParagraphNode()]));
477
- this.textContent.set(root.getTextContent());
478
- });
479
- }
480
- emitValue(value, textContent) {
481
- this.textContent.set(textContent);
482
- this.syncSelectionState();
483
- if (value === this.lastSyncedValue && value === this.value())
484
- return;
485
- this.lastSyncedValue = value;
486
- this.value.set(value);
487
- this.valueInput.emit(value);
488
- this.changed.emit({ value, textContent });
489
- this.onChange(value);
490
- }
491
- syncSelectionState() {
492
- const selection = $getSelection();
493
- if (!$isRangeSelection(selection)) {
494
- this.activeBold.set(false);
495
- this.activeItalic.set(false);
496
- this.activeUnderline.set(false);
497
- this.activeStrikethrough.set(false);
498
- this.activeCode.set(false);
499
- this.activeHighlight.set(false);
500
- this.activeSubscript.set(false);
501
- this.activeSuperscript.set(false);
502
- this.activeLowercase.set(false);
503
- this.activeUppercase.set(false);
504
- this.activeCapitalize.set(false);
505
- this.activeBlock.set('paragraph');
506
- this.activeList.set(null);
507
- this.activeAlignment.set('left');
508
- return;
509
- }
510
- this.activeBold.set(selection.hasFormat('bold'));
511
- this.activeItalic.set(selection.hasFormat('italic'));
512
- this.activeUnderline.set(selection.hasFormat('underline'));
513
- this.activeStrikethrough.set(selection.hasFormat('strikethrough'));
514
- this.activeCode.set(selection.hasFormat('code'));
515
- this.activeHighlight.set(selection.hasFormat('highlight'));
516
- this.activeSubscript.set(selection.hasFormat('subscript'));
517
- this.activeSuperscript.set(selection.hasFormat('superscript'));
518
- this.activeLowercase.set(selection.hasFormat('lowercase'));
519
- this.activeUppercase.set(selection.hasFormat('uppercase'));
520
- this.activeCapitalize.set(selection.hasFormat('capitalize'));
521
- const nodes = selection.getNodes();
522
- const topLevel = nodes[0]?.getTopLevelElementOrThrow();
523
- if (topLevel instanceof HeadingNode) {
524
- this.activeBlock.set(topLevel.getTag());
525
- }
526
- else if (topLevel instanceof QuoteNode) {
527
- this.activeBlock.set('quote');
528
- }
529
- else {
530
- this.activeBlock.set('paragraph');
531
- }
532
- const elementAlignment = $isElementNode(topLevel) ? topLevel.getFormatType() : '';
533
- this.activeAlignment.set(elementAlignment === 'center' ||
534
- elementAlignment === 'start' ||
535
- elementAlignment === 'right' ||
536
- elementAlignment === 'end' ||
537
- elementAlignment === 'justify'
538
- ? elementAlignment
539
- : 'left');
540
- let currentNode = nodes[0] ?? null;
541
- while (currentNode && !(currentNode instanceof ListNode)) {
542
- currentNode = currentNode.getParent();
543
- }
544
- this.activeList.set(currentNode instanceof ListNode ? currentNode.getListType() : null);
545
- }
546
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
547
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AerisEditorComponent, isStandalone: true, selector: "aeris-editor", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, toolbarAriaLabel: { classPropertyName: "toolbarAriaLabel", publicName: "toolbarAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, formats: { classPropertyName: "formats", publicName: "formats", isSignal: true, isRequired: false, transformFunction: null }, namespace: { classPropertyName: "namespace", publicName: "namespace", isSignal: true, isRequired: false, transformFunction: null }, lexicalTheme: { classPropertyName: "lexicalTheme", publicName: "lexicalTheme", isSignal: true, isRequired: false, transformFunction: null }, htmlConfig: { classPropertyName: "htmlConfig", publicName: "htmlConfig", isSignal: true, isRequired: false, transformFunction: null }, extensions: { classPropertyName: "extensions", publicName: "extensions", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, showToolbar: { classPropertyName: "showToolbar", publicName: "showToolbar", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueInput: "valueInput", changed: "changed", focused: "focused", blurred: "blurred", touch: "touch", ready: "ready" }, host: { properties: { "attr.data-fluid": "fluid() || null" } }, providers: [
548
- {
549
- provide: NG_VALUE_ACCESSOR,
550
- useExisting: forwardRef(() => AerisEditorComponent),
551
- multi: true,
552
- },
553
- ], viewQueries: [{ propertyName: "editorRoot", first: true, predicate: ["editorRoot"], descendants: true, isSignal: true }], ngImport: i0, template: `
60
+ var AerisEditorComponent = class AerisEditorComponent {
61
+ toolbarIcons = input({}, ...ngDevMode ? [{ debugName: "toolbarIcons" }] : /* istanbul ignore next */ []);
62
+ document = inject(DOCUMENT);
63
+ sanitizer = inject(DomSanitizer);
64
+ value = model("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
65
+ inputId = input("", ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
66
+ name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
67
+ placeholder = input("Write something...", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
68
+ ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
69
+ ariaLabelledBy = input("", ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
70
+ ariaDescribedBy = input("", ...ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
71
+ toolbarAriaLabel = input("Formatting tools", ...ngDevMode ? [{ debugName: "toolbarAriaLabel" }] : /* istanbul ignore next */ []);
72
+ size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
73
+ appearance = input("outline", ...ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []);
74
+ minHeight = input("12rem", ...ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []);
75
+ formats = input(AERIS_EDITOR_DEFAULT_FORMATS, ...ngDevMode ? [{ debugName: "formats" }] : /* istanbul ignore next */ []);
76
+ namespace = input("AerisEditor", ...ngDevMode ? [{ debugName: "namespace" }] : /* istanbul ignore next */ []);
77
+ lexicalTheme = input({}, ...ngDevMode ? [{ debugName: "lexicalTheme" }] : /* istanbul ignore next */ []);
78
+ htmlConfig = input({}, ...ngDevMode ? [{ debugName: "htmlConfig" }] : /* istanbul ignore next */ []);
79
+ extensions = input([], ...ngDevMode ? [{ debugName: "extensions" }] : /* istanbul ignore next */ []);
80
+ disabled = input(false, {
81
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
82
+ transform: booleanAttribute
83
+ });
84
+ readonly = input(false, {
85
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
86
+ transform: booleanAttribute
87
+ });
88
+ required = input(false, {
89
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
90
+ transform: booleanAttribute
91
+ });
92
+ invalid = input(false, {
93
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
94
+ transform: booleanAttribute
95
+ });
96
+ touched = input(null, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
97
+ displayInvalid = computed(() => ɵaerisDisplayInvalid(this.invalid(), this.touched()), ...ngDevMode ? [{ debugName: "displayInvalid" }] : /* istanbul ignore next */ []);
98
+ fluid = input(false, {
99
+ ...ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {},
100
+ transform: booleanAttribute
101
+ });
102
+ showToolbar = input(true, {
103
+ ...ngDevMode ? { debugName: "showToolbar" } : /* istanbul ignore next */ {},
104
+ transform: booleanAttribute
105
+ });
106
+ changed = output();
107
+ focused = output();
108
+ blurred = output();
109
+ touch = output();
110
+ ready = output();
111
+ editorRoot = viewChild("editorRoot", ...ngDevMode ? [{ debugName: "editorRoot" }] : /* istanbul ignore next */ []);
112
+ generatedId = `aeris-editor-${++editorId}`;
113
+ formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
114
+ isEditorReady = signal(false, ...ngDevMode ? [{ debugName: "isEditorReady" }] : /* istanbul ignore next */ []);
115
+ hasFocus = signal(false, ...ngDevMode ? [{ debugName: "hasFocus" }] : /* istanbul ignore next */ []);
116
+ textContent = signal("", ...ngDevMode ? [{ debugName: "textContent" }] : /* istanbul ignore next */ []);
117
+ activeBold = signal(false, ...ngDevMode ? [{ debugName: "activeBold" }] : /* istanbul ignore next */ []);
118
+ activeItalic = signal(false, ...ngDevMode ? [{ debugName: "activeItalic" }] : /* istanbul ignore next */ []);
119
+ activeUnderline = signal(false, ...ngDevMode ? [{ debugName: "activeUnderline" }] : /* istanbul ignore next */ []);
120
+ activeStrikethrough = signal(false, ...ngDevMode ? [{ debugName: "activeStrikethrough" }] : /* istanbul ignore next */ []);
121
+ activeCode = signal(false, ...ngDevMode ? [{ debugName: "activeCode" }] : /* istanbul ignore next */ []);
122
+ activeHighlight = signal(false, ...ngDevMode ? [{ debugName: "activeHighlight" }] : /* istanbul ignore next */ []);
123
+ activeSubscript = signal(false, ...ngDevMode ? [{ debugName: "activeSubscript" }] : /* istanbul ignore next */ []);
124
+ activeSuperscript = signal(false, ...ngDevMode ? [{ debugName: "activeSuperscript" }] : /* istanbul ignore next */ []);
125
+ activeLowercase = signal(false, ...ngDevMode ? [{ debugName: "activeLowercase" }] : /* istanbul ignore next */ []);
126
+ activeUppercase = signal(false, ...ngDevMode ? [{ debugName: "activeUppercase" }] : /* istanbul ignore next */ []);
127
+ activeCapitalize = signal(false, ...ngDevMode ? [{ debugName: "activeCapitalize" }] : /* istanbul ignore next */ []);
128
+ activeBlock = signal("paragraph", ...ngDevMode ? [{ debugName: "activeBlock" }] : /* istanbul ignore next */ []);
129
+ activeList = signal(null, ...ngDevMode ? [{ debugName: "activeList" }] : /* istanbul ignore next */ []);
130
+ activeAlignment = signal("left", ...ngDevMode ? [{ debugName: "activeAlignment" }] : /* istanbul ignore next */ []);
131
+ availableFormats = computed(() => new Set(this.formats()), ...ngDevMode ? [{ debugName: "availableFormats" }] : /* istanbul ignore next */ []);
132
+ hasInlineActions = computed(() => this.formats().some((format) => [
133
+ "bold",
134
+ "italic",
135
+ "underline",
136
+ "strikethrough",
137
+ "code",
138
+ "highlight",
139
+ "subscript",
140
+ "superscript",
141
+ "lowercase",
142
+ "uppercase",
143
+ "capitalize"
144
+ ].includes(format)), ...ngDevMode ? [{ debugName: "hasInlineActions" }] : /* istanbul ignore next */ []);
145
+ hasBlockActions = computed(() => this.formats().some((format) => [
146
+ "paragraph",
147
+ "heading",
148
+ "heading1",
149
+ "heading2",
150
+ "heading3",
151
+ "heading4",
152
+ "heading5",
153
+ "heading6",
154
+ "quote"
155
+ ].includes(format)), ...ngDevMode ? [{ debugName: "hasBlockActions" }] : /* istanbul ignore next */ []);
156
+ hasListActions = computed(() => this.formats().some((format) => [
157
+ "bulletList",
158
+ "numberedList",
159
+ "checkList"
160
+ ].includes(format)), ...ngDevMode ? [{ debugName: "hasListActions" }] : /* istanbul ignore next */ []);
161
+ hasAlignmentActions = computed(() => this.formats().some((format) => [
162
+ "alignLeft",
163
+ "alignStart",
164
+ "alignCenter",
165
+ "alignRight",
166
+ "alignEnd",
167
+ "alignJustify"
168
+ ].includes(format)), ...ngDevMode ? [{ debugName: "hasAlignmentActions" }] : /* istanbul ignore next */ []);
169
+ hasDocumentActions = computed(() => this.formats().some((format) => [
170
+ "outdent",
171
+ "indent",
172
+ "clear"
173
+ ].includes(format)), ...ngDevMode ? [{ debugName: "hasDocumentActions" }] : /* istanbul ignore next */ []);
174
+ toolbarSeparators = computed(() => {
175
+ let hasPreviousGroup = this.availableFormats().has("undo") || this.availableFormats().has("redo");
176
+ const beforeGroup = (hasActions) => {
177
+ const show = hasPreviousGroup && hasActions;
178
+ hasPreviousGroup ||= hasActions;
179
+ return show;
180
+ };
181
+ return {
182
+ inline: beforeGroup(this.hasInlineActions()),
183
+ block: beforeGroup(this.hasBlockActions()),
184
+ list: beforeGroup(this.hasListActions()),
185
+ alignment: beforeGroup(this.hasAlignmentActions()),
186
+ document: beforeGroup(this.hasDocumentActions())
187
+ };
188
+ }, ...ngDevMode ? [{ debugName: "toolbarSeparators" }] : /* istanbul ignore next */ []);
189
+ resolvedInputId = computed(() => this.inputId() || this.generatedId, ...ngDevMode ? [{ debugName: "resolvedInputId" }] : /* istanbul ignore next */ []);
190
+ effectiveDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []);
191
+ editable = computed(() => !this.effectiveDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []);
192
+ toolbarDisabled = computed(() => !this.editable() || !this.isEditorReady(), ...ngDevMode ? [{ debugName: "toolbarDisabled" }] : /* istanbul ignore next */ []);
193
+ placeholderVisible = computed(() => !this.hasFocus() && !this.textContent().trim() && !!this.placeholder(), ...ngDevMode ? [{ debugName: "placeholderVisible" }] : /* istanbul ignore next */ []);
194
+ editor = null;
195
+ unregisterEditor = null;
196
+ lastSyncedValue = "";
197
+ onChange = () => void 0;
198
+ onTouched = () => void 0;
199
+ constructor() {
200
+ effect(() => {
201
+ const editable = this.editable();
202
+ this.editor?.setEditable(editable);
203
+ });
204
+ effect(() => {
205
+ const nextValue = this.value();
206
+ if (!this.editor || nextValue === this.lastSyncedValue) return;
207
+ this.writeEditorValue(nextValue);
208
+ });
209
+ }
210
+ ngAfterViewInit() {
211
+ this.createEditor();
212
+ }
213
+ ngOnDestroy() {
214
+ this.unregisterEditor?.();
215
+ this.unregisterEditor = null;
216
+ this.editor?.setRootElement(null);
217
+ this.editor = null;
218
+ this.isEditorReady.set(false);
219
+ }
220
+ writeValue(value) {
221
+ const nextValue = value == null ? "" : String(value);
222
+ this.value.set(nextValue);
223
+ this.writeEditorValue(nextValue);
224
+ }
225
+ registerOnChange(callback) {
226
+ this.onChange = callback;
227
+ }
228
+ registerOnTouched(callback) {
229
+ this.onTouched = callback;
230
+ }
231
+ setDisabledState(disabled) {
232
+ this.formDisabled.set(disabled);
233
+ }
234
+ focus() {
235
+ this.editor?.focus();
236
+ }
237
+ clear() {
238
+ if (!this.editable()) return;
239
+ this.writeEditorValue("");
240
+ this.focus();
241
+ }
242
+ reset() {
243
+ this.clear();
244
+ }
245
+ format(format) {
246
+ if (!this.editable()) return;
247
+ this.editor?.dispatchCommand(FORMAT_TEXT_COMMAND, format);
248
+ }
249
+ setBlock(block) {
250
+ if (!this.editable()) return;
251
+ this.editor?.update(() => {
252
+ const selection = $getSelection();
253
+ if (!$isRangeSelection(selection)) return;
254
+ if (block === "heading") block = "h2";
255
+ if (block.startsWith("h") && this.activeBlock() !== block) {
256
+ $setBlocksType(selection, () => $createHeadingNode(block));
257
+ return;
258
+ }
259
+ if (block === "quote" && this.activeBlock() !== "quote") {
260
+ $setBlocksType(selection, () => $createQuoteNode());
261
+ return;
262
+ }
263
+ $setBlocksType(selection, () => $createParagraphNode());
264
+ });
265
+ }
266
+ toggleBulletList() {
267
+ if (!this.editable()) return;
268
+ this.editor?.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, void 0);
269
+ }
270
+ toggleNumberedList() {
271
+ if (!this.editable()) return;
272
+ this.editor?.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, void 0);
273
+ }
274
+ toggleCheckList() {
275
+ if (!this.editable()) return;
276
+ this.editor?.dispatchCommand(INSERT_CHECK_LIST_COMMAND, void 0);
277
+ }
278
+ removeList() {
279
+ if (!this.editable()) return;
280
+ this.editor?.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
281
+ }
282
+ undo() {
283
+ if (!this.editable()) return;
284
+ this.editor?.dispatchCommand(UNDO_COMMAND, void 0);
285
+ }
286
+ redo() {
287
+ if (!this.editable()) return;
288
+ this.editor?.dispatchCommand(REDO_COMMAND, void 0);
289
+ }
290
+ align(alignment) {
291
+ if (!this.editable()) return;
292
+ this.editor?.dispatchCommand(FORMAT_ELEMENT_COMMAND, alignment);
293
+ }
294
+ indent() {
295
+ if (!this.editable()) return;
296
+ this.editor?.dispatchCommand(INDENT_CONTENT_COMMAND, void 0);
297
+ }
298
+ outdent() {
299
+ if (!this.editable()) return;
300
+ this.editor?.dispatchCommand(OUTDENT_CONTENT_COMMAND, void 0);
301
+ }
302
+ clearFormatting() {
303
+ if (!this.editable()) return;
304
+ this.editor?.update(() => {
305
+ const selection = $getSelection();
306
+ if (!$isRangeSelection(selection)) return;
307
+ selection.setFormat(0);
308
+ for (const node of selection.getNodes()) if ($isTextNode(node)) {
309
+ node.setFormat(0);
310
+ node.setStyle("");
311
+ }
312
+ });
313
+ }
314
+ getLexicalEditor() {
315
+ return this.editor;
316
+ }
317
+ handleFocus(event) {
318
+ this.hasFocus.set(true);
319
+ this.focused.emit(event);
320
+ }
321
+ handleBlur(event) {
322
+ this.blurred.emit(event);
323
+ }
324
+ handleFocusOut(event) {
325
+ const relatedTarget = event.relatedTarget;
326
+ const root = this.editorRoot()?.nativeElement;
327
+ if (relatedTarget instanceof Node && root?.parentElement?.contains(relatedTarget)) return;
328
+ this.hasFocus.set(false);
329
+ this.touch.emit();
330
+ this.onTouched();
331
+ }
332
+ createEditor() {
333
+ const rootElement = this.editorRoot()?.nativeElement;
334
+ if (!rootElement) return;
335
+ const extensions = this.extensions();
336
+ const editor = createEditor({
337
+ namespace: this.namespace(),
338
+ html: this.htmlConfig(),
339
+ nodes: [
340
+ HeadingNode,
341
+ QuoteNode,
342
+ ListNode,
343
+ ListItemNode,
344
+ ...extensions.flatMap((extension) => extension.nodes ?? [])
345
+ ],
346
+ onError(error) {
347
+ throw error;
348
+ },
349
+ theme: this.resolveTheme()
350
+ });
351
+ this.editor = editor;
352
+ editor.setRootElement(rootElement);
353
+ editor.setEditable(this.editable());
354
+ this.isEditorReady.set(true);
355
+ const historyState = createEmptyHistoryState();
356
+ const cleanups = [
357
+ registerRichText(editor),
358
+ registerList(editor),
359
+ registerCheckList(editor),
360
+ registerHistory(editor, historyState, 250),
361
+ ...extensions.flatMap((extension) => {
362
+ const cleanup = extension.setup?.(editor);
363
+ return cleanup ? [cleanup] : [];
364
+ }),
365
+ editor.registerUpdateListener(({ editorState }) => {
366
+ editorState.read(() => {
367
+ const root = $getRoot();
368
+ const textContent = root.getTextContent();
369
+ const hasStructuredContent = root.getChildren().some((node) => ![
370
+ "paragraph",
371
+ "heading",
372
+ "quote"
373
+ ].includes(node.getType()));
374
+ const html = textContent.trim() || hasStructuredContent ? $generateHtmlFromNodes(editor, null) : "";
375
+ this.syncSelectionState();
376
+ this.emitValue(html, textContent);
377
+ }, { editor });
378
+ }),
379
+ editor.registerCommand(SELECTION_CHANGE_COMMAND, () => {
380
+ this.syncSelectionState();
381
+ return false;
382
+ }, COMMAND_PRIORITY_LOW)
383
+ ];
384
+ this.unregisterEditor = () => {
385
+ for (const cleanup of cleanups) cleanup();
386
+ };
387
+ this.writeEditorValue(this.value());
388
+ this.ready.emit(editor);
389
+ }
390
+ resolveTheme() {
391
+ const customTheme = this.lexicalTheme();
392
+ return {
393
+ ...customTheme,
394
+ heading: {
395
+ h1: "aeris-editor-content__heading aeris-editor-content__heading--h1",
396
+ h2: "aeris-editor-content__heading aeris-editor-content__heading--h2",
397
+ h3: "aeris-editor-content__heading aeris-editor-content__heading--h3",
398
+ h4: "aeris-editor-content__heading aeris-editor-content__heading--h4",
399
+ h5: "aeris-editor-content__heading aeris-editor-content__heading--h5",
400
+ h6: "aeris-editor-content__heading aeris-editor-content__heading--h6",
401
+ ...customTheme.heading
402
+ },
403
+ list: {
404
+ checklist: "aeris-editor-content__check-list",
405
+ listitem: "aeris-editor-content__list-item",
406
+ listitemChecked: "aeris-editor-content__list-item--checked",
407
+ listitemUnchecked: "aeris-editor-content__list-item--unchecked",
408
+ ol: "aeris-editor-content__ordered-list",
409
+ ul: "aeris-editor-content__unordered-list",
410
+ ...customTheme.list,
411
+ nested: {
412
+ listitem: "aeris-editor-content__nested-list-item",
413
+ ...customTheme.list?.nested
414
+ }
415
+ },
416
+ paragraph: customTheme.paragraph ?? "aeris-editor-content__paragraph",
417
+ quote: customTheme.quote ?? "aeris-editor-content__quote",
418
+ text: {
419
+ bold: "aeris-editor-content__bold",
420
+ capitalize: "aeris-editor-content__capitalize",
421
+ code: "aeris-editor-content__code",
422
+ highlight: "aeris-editor-content__highlight",
423
+ italic: "aeris-editor-content__italic",
424
+ lowercase: "aeris-editor-content__lowercase",
425
+ strikethrough: "aeris-editor-content__strikethrough",
426
+ subscript: "aeris-editor-content__subscript",
427
+ superscript: "aeris-editor-content__superscript",
428
+ underline: "aeris-editor-content__underline",
429
+ underlineStrikethrough: "aeris-editor-content__underline aeris-editor-content__strikethrough",
430
+ uppercase: "aeris-editor-content__uppercase",
431
+ ...customTheme.text
432
+ }
433
+ };
434
+ }
435
+ writeEditorValue(value) {
436
+ if (!this.editor) return;
437
+ this.lastSyncedValue = value;
438
+ this.editor.update(() => {
439
+ const root = $getRoot();
440
+ root.clear();
441
+ const sanitizedValue = this.sanitizer.sanitize(SecurityContext.HTML, value) ?? "";
442
+ if (!sanitizedValue.trim()) {
443
+ root.append($createParagraphNode());
444
+ this.textContent.set("");
445
+ return;
446
+ }
447
+ const Parser = this.document.defaultView?.DOMParser;
448
+ if (!Parser) {
449
+ root.append($createParagraphNode());
450
+ this.textContent.set("");
451
+ return;
452
+ }
453
+ const dom = new Parser().parseFromString(sanitizedValue, "text/html");
454
+ const nodes = $generateNodesFromDOM(this.editor, dom);
455
+ root.append(...nodes.length ? nodes : [$createParagraphNode()]);
456
+ this.textContent.set(root.getTextContent());
457
+ });
458
+ }
459
+ emitValue(value, textContent) {
460
+ this.textContent.set(textContent);
461
+ this.syncSelectionState();
462
+ if (value === this.lastSyncedValue && value === this.value()) return;
463
+ this.lastSyncedValue = value;
464
+ this.value.set(value);
465
+ this.changed.emit({
466
+ value,
467
+ textContent
468
+ });
469
+ this.onChange(value);
470
+ }
471
+ syncSelectionState() {
472
+ const selection = $getSelection();
473
+ if (!$isRangeSelection(selection)) {
474
+ this.activeBold.set(false);
475
+ this.activeItalic.set(false);
476
+ this.activeUnderline.set(false);
477
+ this.activeStrikethrough.set(false);
478
+ this.activeCode.set(false);
479
+ this.activeHighlight.set(false);
480
+ this.activeSubscript.set(false);
481
+ this.activeSuperscript.set(false);
482
+ this.activeLowercase.set(false);
483
+ this.activeUppercase.set(false);
484
+ this.activeCapitalize.set(false);
485
+ this.activeBlock.set("paragraph");
486
+ this.activeList.set(null);
487
+ this.activeAlignment.set("left");
488
+ return;
489
+ }
490
+ this.activeBold.set(selection.hasFormat("bold"));
491
+ this.activeItalic.set(selection.hasFormat("italic"));
492
+ this.activeUnderline.set(selection.hasFormat("underline"));
493
+ this.activeStrikethrough.set(selection.hasFormat("strikethrough"));
494
+ this.activeCode.set(selection.hasFormat("code"));
495
+ this.activeHighlight.set(selection.hasFormat("highlight"));
496
+ this.activeSubscript.set(selection.hasFormat("subscript"));
497
+ this.activeSuperscript.set(selection.hasFormat("superscript"));
498
+ this.activeLowercase.set(selection.hasFormat("lowercase"));
499
+ this.activeUppercase.set(selection.hasFormat("uppercase"));
500
+ this.activeCapitalize.set(selection.hasFormat("capitalize"));
501
+ const nodes = selection.getNodes();
502
+ const topLevel = nodes[0]?.getTopLevelElementOrThrow();
503
+ if (topLevel instanceof HeadingNode) this.activeBlock.set(topLevel.getTag());
504
+ else if (topLevel instanceof QuoteNode) this.activeBlock.set("quote");
505
+ else this.activeBlock.set("paragraph");
506
+ const elementAlignment = $isElementNode(topLevel) ? topLevel.getFormatType() : "";
507
+ this.activeAlignment.set(elementAlignment === "center" || elementAlignment === "start" || elementAlignment === "right" || elementAlignment === "end" || elementAlignment === "justify" ? elementAlignment : "left");
508
+ let currentNode = nodes[0] ?? null;
509
+ while (currentNode && !(currentNode instanceof ListNode)) currentNode = currentNode.getParent();
510
+ this.activeList.set(currentNode instanceof ListNode ? currentNode.getListType() : null);
511
+ }
512
+ static ɵfac = i0.ɵɵngDeclareFactory({
513
+ minVersion: "12.0.0",
514
+ version: "22.2.3",
515
+ ngImport: i0,
516
+ type: AerisEditorComponent,
517
+ deps: [],
518
+ target: i0.ɵɵFactoryTarget.Component
519
+ });
520
+ static ɵcmp = i0.ɵɵngDeclareComponent({
521
+ minVersion: "17.0.0",
522
+ version: "22.2.3",
523
+ type: AerisEditorComponent,
524
+ isStandalone: true,
525
+ selector: "aeris-editor",
526
+ inputs: {
527
+ toolbarIcons: {
528
+ classPropertyName: "toolbarIcons",
529
+ publicName: "toolbarIcons",
530
+ isSignal: true,
531
+ isRequired: false,
532
+ transformFunction: null
533
+ },
534
+ value: {
535
+ classPropertyName: "value",
536
+ publicName: "value",
537
+ isSignal: true,
538
+ isRequired: false,
539
+ transformFunction: null
540
+ },
541
+ inputId: {
542
+ classPropertyName: "inputId",
543
+ publicName: "inputId",
544
+ isSignal: true,
545
+ isRequired: false,
546
+ transformFunction: null
547
+ },
548
+ name: {
549
+ classPropertyName: "name",
550
+ publicName: "name",
551
+ isSignal: true,
552
+ isRequired: false,
553
+ transformFunction: null
554
+ },
555
+ placeholder: {
556
+ classPropertyName: "placeholder",
557
+ publicName: "placeholder",
558
+ isSignal: true,
559
+ isRequired: false,
560
+ transformFunction: null
561
+ },
562
+ ariaLabel: {
563
+ classPropertyName: "ariaLabel",
564
+ publicName: "ariaLabel",
565
+ isSignal: true,
566
+ isRequired: false,
567
+ transformFunction: null
568
+ },
569
+ ariaLabelledBy: {
570
+ classPropertyName: "ariaLabelledBy",
571
+ publicName: "ariaLabelledBy",
572
+ isSignal: true,
573
+ isRequired: false,
574
+ transformFunction: null
575
+ },
576
+ ariaDescribedBy: {
577
+ classPropertyName: "ariaDescribedBy",
578
+ publicName: "ariaDescribedBy",
579
+ isSignal: true,
580
+ isRequired: false,
581
+ transformFunction: null
582
+ },
583
+ toolbarAriaLabel: {
584
+ classPropertyName: "toolbarAriaLabel",
585
+ publicName: "toolbarAriaLabel",
586
+ isSignal: true,
587
+ isRequired: false,
588
+ transformFunction: null
589
+ },
590
+ size: {
591
+ classPropertyName: "size",
592
+ publicName: "size",
593
+ isSignal: true,
594
+ isRequired: false,
595
+ transformFunction: null
596
+ },
597
+ appearance: {
598
+ classPropertyName: "appearance",
599
+ publicName: "appearance",
600
+ isSignal: true,
601
+ isRequired: false,
602
+ transformFunction: null
603
+ },
604
+ minHeight: {
605
+ classPropertyName: "minHeight",
606
+ publicName: "minHeight",
607
+ isSignal: true,
608
+ isRequired: false,
609
+ transformFunction: null
610
+ },
611
+ formats: {
612
+ classPropertyName: "formats",
613
+ publicName: "formats",
614
+ isSignal: true,
615
+ isRequired: false,
616
+ transformFunction: null
617
+ },
618
+ namespace: {
619
+ classPropertyName: "namespace",
620
+ publicName: "namespace",
621
+ isSignal: true,
622
+ isRequired: false,
623
+ transformFunction: null
624
+ },
625
+ lexicalTheme: {
626
+ classPropertyName: "lexicalTheme",
627
+ publicName: "lexicalTheme",
628
+ isSignal: true,
629
+ isRequired: false,
630
+ transformFunction: null
631
+ },
632
+ htmlConfig: {
633
+ classPropertyName: "htmlConfig",
634
+ publicName: "htmlConfig",
635
+ isSignal: true,
636
+ isRequired: false,
637
+ transformFunction: null
638
+ },
639
+ extensions: {
640
+ classPropertyName: "extensions",
641
+ publicName: "extensions",
642
+ isSignal: true,
643
+ isRequired: false,
644
+ transformFunction: null
645
+ },
646
+ disabled: {
647
+ classPropertyName: "disabled",
648
+ publicName: "disabled",
649
+ isSignal: true,
650
+ isRequired: false,
651
+ transformFunction: null
652
+ },
653
+ readonly: {
654
+ classPropertyName: "readonly",
655
+ publicName: "readonly",
656
+ isSignal: true,
657
+ isRequired: false,
658
+ transformFunction: null
659
+ },
660
+ required: {
661
+ classPropertyName: "required",
662
+ publicName: "required",
663
+ isSignal: true,
664
+ isRequired: false,
665
+ transformFunction: null
666
+ },
667
+ invalid: {
668
+ classPropertyName: "invalid",
669
+ publicName: "invalid",
670
+ isSignal: true,
671
+ isRequired: false,
672
+ transformFunction: null
673
+ },
674
+ touched: {
675
+ classPropertyName: "touched",
676
+ publicName: "touched",
677
+ isSignal: true,
678
+ isRequired: false,
679
+ transformFunction: null
680
+ },
681
+ fluid: {
682
+ classPropertyName: "fluid",
683
+ publicName: "fluid",
684
+ isSignal: true,
685
+ isRequired: false,
686
+ transformFunction: null
687
+ },
688
+ showToolbar: {
689
+ classPropertyName: "showToolbar",
690
+ publicName: "showToolbar",
691
+ isSignal: true,
692
+ isRequired: false,
693
+ transformFunction: null
694
+ }
695
+ },
696
+ outputs: {
697
+ value: "valueChange",
698
+ changed: "changed",
699
+ focused: "focused",
700
+ blurred: "blurred",
701
+ touch: "touch",
702
+ ready: "ready"
703
+ },
704
+ host: { properties: { "attr.data-fluid": "fluid() || null" } },
705
+ providers: [{
706
+ provide: NG_VALUE_ACCESSOR,
707
+ useExisting: forwardRef(() => AerisEditorComponent),
708
+ multi: true
709
+ }],
710
+ viewQueries: [{
711
+ propertyName: "editorRoot",
712
+ first: true,
713
+ predicate: ["editorRoot"],
714
+ descendants: true,
715
+ isSignal: true
716
+ }],
717
+ ngImport: i0,
718
+ template: `
554
719
  <div
555
720
  class="aeris-editor"
556
721
  [attr.data-size]="size()"
557
722
  [attr.data-appearance]="appearance()"
558
- [attr.data-invalid]="invalid() || null"
723
+ [attr.data-invalid]="displayInvalid() || null"
559
724
  [attr.data-disabled]="effectiveDisabled() || null"
560
725
  [attr.data-readonly]="readonly() || null"
561
726
  [attr.data-fluid]="fluid() || null"
@@ -565,22 +730,34 @@ class AerisEditorComponent {
565
730
  <div class="aeris-editor__toolbar" role="toolbar" [attr.aria-label]="toolbarAriaLabel()">
566
731
  @if (availableFormats().has('undo')) {
567
732
  <button type="button" aria-label="Undo" [disabled]="toolbarDisabled()" (click)="undo()">
568
- <svg aria-hidden="true" viewBox="0 0 24 24">
569
- <path d="M9 8H4V3" />
570
- <path d="M4 8c2.1-2.7 5-4 8.1-4A8 8 0 1 1 6 17.1" />
571
- </svg>
733
+ @if (toolbarIcons()['undo']; as customIcon) {
734
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
735
+ ><ng-container [ngTemplateOutlet]="customIcon"
736
+ /></span>
737
+ } @else {
738
+ <svg aria-hidden="true" viewBox="0 0 24 24">
739
+ <path d="M3 7v6h6" />
740
+ <path d="M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" />
741
+ </svg>
742
+ }
572
743
  </button>
573
744
  }
574
745
  @if (availableFormats().has('redo')) {
575
746
  <button type="button" aria-label="Redo" [disabled]="toolbarDisabled()" (click)="redo()">
576
- <svg aria-hidden="true" viewBox="0 0 24 24">
577
- <path d="M15 8h5V3" />
578
- <path d="M20 8c-2.1-2.7-5-4-8.1-4A8 8 0 1 0 18 17.1" />
579
- </svg>
747
+ @if (toolbarIcons()['redo']; as customIcon) {
748
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
749
+ ><ng-container [ngTemplateOutlet]="customIcon"
750
+ /></span>
751
+ } @else {
752
+ <svg aria-hidden="true" viewBox="0 0 24 24">
753
+ <path d="M21 7v6h-6" />
754
+ <path d="M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" />
755
+ </svg>
756
+ }
580
757
  </button>
581
758
  }
582
759
 
583
- @if (hasInlineActions()) {
760
+ @if (toolbarSeparators().inline) {
584
761
  <span class="aeris-editor__separator" aria-hidden="true"></span>
585
762
  }
586
763
  @if (availableFormats().has('bold')) {
@@ -591,7 +768,15 @@ class AerisEditorComponent {
591
768
  [disabled]="toolbarDisabled()"
592
769
  (click)="format('bold')"
593
770
  >
594
- <strong>B</strong>
771
+ @if (toolbarIcons()['bold']; as customIcon) {
772
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
773
+ ><ng-container [ngTemplateOutlet]="customIcon"
774
+ /></span>
775
+ } @else {
776
+ <svg aria-hidden="true" viewBox="0 0 24 24">
777
+ <path d="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" />
778
+ </svg>
779
+ }
595
780
  </button>
596
781
  }
597
782
  @if (availableFormats().has('italic')) {
@@ -602,7 +787,17 @@ class AerisEditorComponent {
602
787
  [disabled]="toolbarDisabled()"
603
788
  (click)="format('italic')"
604
789
  >
605
- <em>I</em>
790
+ @if (toolbarIcons()['italic']; as customIcon) {
791
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
792
+ ><ng-container [ngTemplateOutlet]="customIcon"
793
+ /></span>
794
+ } @else {
795
+ <svg aria-hidden="true" viewBox="0 0 24 24">
796
+ <line x1="19" x2="10" y1="4" y2="4" />
797
+ <line x1="14" x2="5" y1="20" y2="20" />
798
+ <line x1="15" x2="9" y1="4" y2="20" />
799
+ </svg>
800
+ }
606
801
  </button>
607
802
  }
608
803
  @if (availableFormats().has('underline')) {
@@ -613,7 +808,16 @@ class AerisEditorComponent {
613
808
  [disabled]="toolbarDisabled()"
614
809
  (click)="format('underline')"
615
810
  >
616
- <span class="aeris-editor__underline">U</span>
811
+ @if (toolbarIcons()['underline']; as customIcon) {
812
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
813
+ ><ng-container [ngTemplateOutlet]="customIcon"
814
+ /></span>
815
+ } @else {
816
+ <svg aria-hidden="true" viewBox="0 0 24 24">
817
+ <path d="M6 4v6a6 6 0 0 0 12 0V4" />
818
+ <line x1="4" x2="20" y1="20" y2="20" />
819
+ </svg>
820
+ }
617
821
  </button>
618
822
  }
619
823
  @if (availableFormats().has('strikethrough')) {
@@ -624,7 +828,17 @@ class AerisEditorComponent {
624
828
  [disabled]="toolbarDisabled()"
625
829
  (click)="format('strikethrough')"
626
830
  >
627
- <span class="aeris-editor__strikethrough">S</span>
831
+ @if (toolbarIcons()['strikethrough']; as customIcon) {
832
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
833
+ ><ng-container [ngTemplateOutlet]="customIcon"
834
+ /></span>
835
+ } @else {
836
+ <svg aria-hidden="true" viewBox="0 0 24 24">
837
+ <path d="M16 4H9a3 3 0 0 0-2.83 4" />
838
+ <path d="M14 12a4 4 0 0 1 0 8H6" />
839
+ <line x1="4" x2="20" y1="12" y2="12" />
840
+ </svg>
841
+ }
628
842
  </button>
629
843
  }
630
844
  @if (availableFormats().has('code')) {
@@ -635,7 +849,16 @@ class AerisEditorComponent {
635
849
  [disabled]="toolbarDisabled()"
636
850
  (click)="format('code')"
637
851
  >
638
- <span aria-hidden="true">&lt;/&gt;</span>
852
+ @if (toolbarIcons()['code']; as customIcon) {
853
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
854
+ ><ng-container [ngTemplateOutlet]="customIcon"
855
+ /></span>
856
+ } @else {
857
+ <svg aria-hidden="true" viewBox="0 0 24 24">
858
+ <path d="m16 18 6-6-6-6" />
859
+ <path d="m8 6-6 6 6 6" />
860
+ </svg>
861
+ }
639
862
  </button>
640
863
  }
641
864
  @if (availableFormats().has('highlight')) {
@@ -646,11 +869,16 @@ class AerisEditorComponent {
646
869
  [disabled]="toolbarDisabled()"
647
870
  (click)="format('highlight')"
648
871
  >
649
- <svg aria-hidden="true" viewBox="0 0 24 24">
650
- <path d="m9 11 4 4" />
651
- <path d="m14.5 4.5 5 5L10 19H5v-5Z" />
652
- <path d="M4 21h16" />
653
- </svg>
872
+ @if (toolbarIcons()['highlight']; as customIcon) {
873
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
874
+ ><ng-container [ngTemplateOutlet]="customIcon"
875
+ /></span>
876
+ } @else {
877
+ <svg aria-hidden="true" viewBox="0 0 24 24">
878
+ <path d="m9 11-6 6v3h9l3-3" />
879
+ <path d="m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" />
880
+ </svg>
881
+ }
654
882
  </button>
655
883
  }
656
884
  @if (availableFormats().has('subscript')) {
@@ -661,7 +889,19 @@ class AerisEditorComponent {
661
889
  [disabled]="toolbarDisabled()"
662
890
  (click)="format('subscript')"
663
891
  >
664
- <span aria-hidden="true">X<sub>2</sub></span>
892
+ @if (toolbarIcons()['subscript']; as customIcon) {
893
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
894
+ ><ng-container [ngTemplateOutlet]="customIcon"
895
+ /></span>
896
+ } @else {
897
+ <svg aria-hidden="true" viewBox="0 0 24 24">
898
+ <path d="m4 5 8 8" />
899
+ <path d="m12 5-8 8" />
900
+ <path
901
+ d="M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07"
902
+ />
903
+ </svg>
904
+ }
665
905
  </button>
666
906
  }
667
907
  @if (availableFormats().has('superscript')) {
@@ -672,7 +912,19 @@ class AerisEditorComponent {
672
912
  [disabled]="toolbarDisabled()"
673
913
  (click)="format('superscript')"
674
914
  >
675
- <span aria-hidden="true">X<sup>2</sup></span>
915
+ @if (toolbarIcons()['superscript']; as customIcon) {
916
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
917
+ ><ng-container [ngTemplateOutlet]="customIcon"
918
+ /></span>
919
+ } @else {
920
+ <svg aria-hidden="true" viewBox="0 0 24 24">
921
+ <path d="m4 19 8-8" />
922
+ <path d="m12 19-8-8" />
923
+ <path
924
+ d="M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06"
925
+ />
926
+ </svg>
927
+ }
676
928
  </button>
677
929
  }
678
930
  @if (availableFormats().has('lowercase')) {
@@ -683,7 +935,18 @@ class AerisEditorComponent {
683
935
  [disabled]="toolbarDisabled()"
684
936
  (click)="format('lowercase')"
685
937
  >
686
- aa
938
+ @if (toolbarIcons()['lowercase']; as customIcon) {
939
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
940
+ ><ng-container [ngTemplateOutlet]="customIcon"
941
+ /></span>
942
+ } @else {
943
+ <svg aria-hidden="true" viewBox="0 0 24 24">
944
+ <path d="M10 9v7" />
945
+ <path d="M14 6v10" />
946
+ <circle cx="17.5" cy="12.5" r="3.5" />
947
+ <circle cx="6.5" cy="12.5" r="3.5" />
948
+ </svg>
949
+ }
687
950
  </button>
688
951
  }
689
952
  @if (availableFormats().has('uppercase')) {
@@ -694,7 +957,19 @@ class AerisEditorComponent {
694
957
  [disabled]="toolbarDisabled()"
695
958
  (click)="format('uppercase')"
696
959
  >
697
- AA
960
+ @if (toolbarIcons()['uppercase']; as customIcon) {
961
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
962
+ ><ng-container [ngTemplateOutlet]="customIcon"
963
+ /></span>
964
+ } @else {
965
+ <svg aria-hidden="true" viewBox="0 0 24 24">
966
+ <path
967
+ d="M15 11h4.5a1 1 0 0 1 0 5h-4a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h3a1 1 0 0 1 0 5"
968
+ />
969
+ <path d="m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16" />
970
+ <path d="M3.304 13h6.392" />
971
+ </svg>
972
+ }
698
973
  </button>
699
974
  }
700
975
  @if (availableFormats().has('capitalize')) {
@@ -705,11 +980,22 @@ class AerisEditorComponent {
705
980
  [disabled]="toolbarDisabled()"
706
981
  (click)="format('capitalize')"
707
982
  >
708
- Aa
983
+ @if (toolbarIcons()['capitalize']; as customIcon) {
984
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
985
+ ><ng-container [ngTemplateOutlet]="customIcon"
986
+ /></span>
987
+ } @else {
988
+ <svg aria-hidden="true" viewBox="0 0 24 24">
989
+ <path d="m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16" />
990
+ <path d="M22 9v7" />
991
+ <path d="M3.304 13h6.392" />
992
+ <circle cx="18.5" cy="12.5" r="3.5" />
993
+ </svg>
994
+ }
709
995
  </button>
710
996
  }
711
997
 
712
- @if (hasBlockActions()) {
998
+ @if (toolbarSeparators().block) {
713
999
  <span class="aeris-editor__separator" aria-hidden="true"></span>
714
1000
  }
715
1001
  @if (availableFormats().has('paragraph')) {
@@ -720,7 +1006,17 @@ class AerisEditorComponent {
720
1006
  [disabled]="toolbarDisabled()"
721
1007
  (click)="setBlock('paragraph')"
722
1008
  >
723
- P
1009
+ @if (toolbarIcons()['paragraph']; as customIcon) {
1010
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1011
+ ><ng-container [ngTemplateOutlet]="customIcon"
1012
+ /></span>
1013
+ } @else {
1014
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1015
+ <path d="M13 4v16" />
1016
+ <path d="M17 4v16" />
1017
+ <path d="M19 4H9.5a4.5 4.5 0 0 0 0 9H13" />
1018
+ </svg>
1019
+ }
724
1020
  </button>
725
1021
  }
726
1022
  @if (availableFormats().has('heading1')) {
@@ -731,7 +1027,18 @@ class AerisEditorComponent {
731
1027
  [disabled]="toolbarDisabled()"
732
1028
  (click)="setBlock('h1')"
733
1029
  >
734
- H1
1030
+ @if (toolbarIcons()['heading1']; as customIcon) {
1031
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1032
+ ><ng-container [ngTemplateOutlet]="customIcon"
1033
+ /></span>
1034
+ } @else {
1035
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1036
+ <path d="M4 12h8" />
1037
+ <path d="M4 18V6" />
1038
+ <path d="M12 18V6" />
1039
+ <path d="m17 12 3-2v8" />
1040
+ </svg>
1041
+ }
735
1042
  </button>
736
1043
  }
737
1044
  @if (availableFormats().has('heading')) {
@@ -742,7 +1049,18 @@ class AerisEditorComponent {
742
1049
  [disabled]="toolbarDisabled()"
743
1050
  (click)="setBlock('heading')"
744
1051
  >
745
- H2
1052
+ @if (toolbarIcons()['heading']; as customIcon) {
1053
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1054
+ ><ng-container [ngTemplateOutlet]="customIcon"
1055
+ /></span>
1056
+ } @else {
1057
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1058
+ <path d="M4 12h8" />
1059
+ <path d="M4 18V6" />
1060
+ <path d="M12 18V6" />
1061
+ <path d="M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" />
1062
+ </svg>
1063
+ }
746
1064
  </button>
747
1065
  }
748
1066
  @if (availableFormats().has('heading2')) {
@@ -753,7 +1071,18 @@ class AerisEditorComponent {
753
1071
  [disabled]="toolbarDisabled()"
754
1072
  (click)="setBlock('h2')"
755
1073
  >
756
- H2
1074
+ @if (toolbarIcons()['heading2']; as customIcon) {
1075
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1076
+ ><ng-container [ngTemplateOutlet]="customIcon"
1077
+ /></span>
1078
+ } @else {
1079
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1080
+ <path d="M4 12h8" />
1081
+ <path d="M4 18V6" />
1082
+ <path d="M12 18V6" />
1083
+ <path d="M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" />
1084
+ </svg>
1085
+ }
757
1086
  </button>
758
1087
  }
759
1088
  @if (availableFormats().has('heading3')) {
@@ -764,7 +1093,19 @@ class AerisEditorComponent {
764
1093
  [disabled]="toolbarDisabled()"
765
1094
  (click)="setBlock('h3')"
766
1095
  >
767
- H3
1096
+ @if (toolbarIcons()['heading3']; as customIcon) {
1097
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1098
+ ><ng-container [ngTemplateOutlet]="customIcon"
1099
+ /></span>
1100
+ } @else {
1101
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1102
+ <path d="M4 12h8" />
1103
+ <path d="M4 18V6" />
1104
+ <path d="M12 18V6" />
1105
+ <path d="M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" />
1106
+ <path d="M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" />
1107
+ </svg>
1108
+ }
768
1109
  </button>
769
1110
  }
770
1111
  @if (availableFormats().has('heading4')) {
@@ -775,7 +1116,19 @@ class AerisEditorComponent {
775
1116
  [disabled]="toolbarDisabled()"
776
1117
  (click)="setBlock('h4')"
777
1118
  >
778
- H4
1119
+ @if (toolbarIcons()['heading4']; as customIcon) {
1120
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1121
+ ><ng-container [ngTemplateOutlet]="customIcon"
1122
+ /></span>
1123
+ } @else {
1124
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1125
+ <path d="M12 18V6" />
1126
+ <path d="M17 10v3a1 1 0 0 0 1 1h3" />
1127
+ <path d="M21 10v8" />
1128
+ <path d="M4 12h8" />
1129
+ <path d="M4 18V6" />
1130
+ </svg>
1131
+ }
779
1132
  </button>
780
1133
  }
781
1134
  @if (availableFormats().has('heading5')) {
@@ -786,7 +1139,19 @@ class AerisEditorComponent {
786
1139
  [disabled]="toolbarDisabled()"
787
1140
  (click)="setBlock('h5')"
788
1141
  >
789
- H5
1142
+ @if (toolbarIcons()['heading5']; as customIcon) {
1143
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1144
+ ><ng-container [ngTemplateOutlet]="customIcon"
1145
+ /></span>
1146
+ } @else {
1147
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1148
+ <path d="M4 12h8" />
1149
+ <path d="M4 18V6" />
1150
+ <path d="M12 18V6" />
1151
+ <path d="M17 13v-3h4" />
1152
+ <path d="M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17" />
1153
+ </svg>
1154
+ }
790
1155
  </button>
791
1156
  }
792
1157
  @if (availableFormats().has('heading6')) {
@@ -797,7 +1162,19 @@ class AerisEditorComponent {
797
1162
  [disabled]="toolbarDisabled()"
798
1163
  (click)="setBlock('h6')"
799
1164
  >
800
- H6
1165
+ @if (toolbarIcons()['heading6']; as customIcon) {
1166
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1167
+ ><ng-container [ngTemplateOutlet]="customIcon"
1168
+ /></span>
1169
+ } @else {
1170
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1171
+ <path d="M4 12h8" />
1172
+ <path d="M4 18V6" />
1173
+ <path d="M12 18V6" />
1174
+ <circle cx="19" cy="16" r="2" />
1175
+ <path d="M20 10c-2 2-3 3.5-3 6" />
1176
+ </svg>
1177
+ }
801
1178
  </button>
802
1179
  }
803
1180
  @if (availableFormats().has('quote')) {
@@ -808,18 +1185,24 @@ class AerisEditorComponent {
808
1185
  [disabled]="toolbarDisabled()"
809
1186
  (click)="setBlock('quote')"
810
1187
  >
811
- <svg aria-hidden="true" viewBox="0 0 24 24">
812
- <path
813
- d="M8 6H5.8C4.8 7.7 4.3 9.3 4.3 11c0 2.1 1.1 3.6 3 3.6 1.5 0 2.7-1.1 2.7-2.7 0-1.4-1-2.5-2.4-2.7.1-.9.5-1.9 1.1-3.2Z"
814
- />
815
- <path
816
- d="M18 6h-2.2c-1 1.7-1.5 3.3-1.5 5 0 2.1 1.1 3.6 3 3.6 1.5 0 2.7-1.1 2.7-2.7 0-1.4-1-2.5-2.4-2.7.1-.9.5-1.9 1.1-3.2Z"
817
- />
818
- </svg>
1188
+ @if (toolbarIcons()['quote']; as customIcon) {
1189
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1190
+ ><ng-container [ngTemplateOutlet]="customIcon"
1191
+ /></span>
1192
+ } @else {
1193
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1194
+ <path
1195
+ d="M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
1196
+ />
1197
+ <path
1198
+ d="M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
1199
+ />
1200
+ </svg>
1201
+ }
819
1202
  </button>
820
1203
  }
821
1204
 
822
- @if (hasListActions()) {
1205
+ @if (toolbarSeparators().list) {
823
1206
  <span class="aeris-editor__separator" aria-hidden="true"></span>
824
1207
  }
825
1208
  @if (availableFormats().has('bulletList')) {
@@ -830,14 +1213,20 @@ class AerisEditorComponent {
830
1213
  [disabled]="toolbarDisabled()"
831
1214
  (click)="toggleBulletList()"
832
1215
  >
833
- <svg aria-hidden="true" viewBox="0 0 24 24">
834
- <path d="M8 6h12" />
835
- <path d="M8 12h12" />
836
- <path d="M8 18h12" />
837
- <circle cx="4" cy="6" r="1" />
838
- <circle cx="4" cy="12" r="1" />
839
- <circle cx="4" cy="18" r="1" />
840
- </svg>
1216
+ @if (toolbarIcons()['bulletList']; as customIcon) {
1217
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1218
+ ><ng-container [ngTemplateOutlet]="customIcon"
1219
+ /></span>
1220
+ } @else {
1221
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1222
+ <path d="M3 5h.01" />
1223
+ <path d="M3 12h.01" />
1224
+ <path d="M3 19h.01" />
1225
+ <path d="M8 5h13" />
1226
+ <path d="M8 12h13" />
1227
+ <path d="M8 19h13" />
1228
+ </svg>
1229
+ }
841
1230
  </button>
842
1231
  }
843
1232
  @if (availableFormats().has('numberedList')) {
@@ -848,19 +1237,20 @@ class AerisEditorComponent {
848
1237
  [disabled]="toolbarDisabled()"
849
1238
  (click)="toggleNumberedList()"
850
1239
  >
851
- <svg aria-hidden="true" viewBox="0 0 24 24">
852
- <path d="M10 6h10" />
853
- <path d="M10 12h10" />
854
- <path d="M10 18h10" />
855
- <path d="M4 5h1v3" />
856
- <path d="M3.7 8h2.6" />
857
- <path
858
- d="M3.6 11.4c.3-.4.8-.6 1.4-.6.8 0 1.4.5 1.4 1.2 0 .5-.3.9-.8 1.2L4 14.5h2.5"
859
- />
860
- <path
861
- d="M3.7 17h2.1l-1 1h.3c.8 0 1.4.4 1.4 1.1 0 .7-.6 1.2-1.5 1.2-.6 0-1.1-.2-1.5-.6"
862
- />
863
- </svg>
1240
+ @if (toolbarIcons()['numberedList']; as customIcon) {
1241
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1242
+ ><ng-container [ngTemplateOutlet]="customIcon"
1243
+ /></span>
1244
+ } @else {
1245
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1246
+ <path d="M11 5h10" />
1247
+ <path d="M11 12h10" />
1248
+ <path d="M11 19h10" />
1249
+ <path d="M4 4h1v5" />
1250
+ <path d="M4 9h2" />
1251
+ <path d="M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" />
1252
+ </svg>
1253
+ }
864
1254
  </button>
865
1255
  }
866
1256
  @if (availableFormats().has('checkList')) {
@@ -871,17 +1261,23 @@ class AerisEditorComponent {
871
1261
  [disabled]="toolbarDisabled()"
872
1262
  (click)="toggleCheckList()"
873
1263
  >
874
- <svg aria-hidden="true" viewBox="0 0 24 24">
875
- <rect x="3" y="4" width="5" height="5" rx="1" />
876
- <path d="m4.5 6.5 1.2 1.2L8.3 5" />
877
- <path d="M11 6.5h10" />
878
- <rect x="3" y="15" width="5" height="5" rx="1" />
879
- <path d="M11 17.5h10" />
880
- </svg>
1264
+ @if (toolbarIcons()['checkList']; as customIcon) {
1265
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1266
+ ><ng-container [ngTemplateOutlet]="customIcon"
1267
+ /></span>
1268
+ } @else {
1269
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1270
+ <path d="M13 5h8" />
1271
+ <path d="M13 12h8" />
1272
+ <path d="M13 19h8" />
1273
+ <path d="m3 17 2 2 4-4" />
1274
+ <path d="m3 7 2 2 4-4" />
1275
+ </svg>
1276
+ }
881
1277
  </button>
882
1278
  }
883
1279
 
884
- @if (hasAlignmentActions()) {
1280
+ @if (toolbarSeparators().alignment) {
885
1281
  <span class="aeris-editor__separator" aria-hidden="true"></span>
886
1282
  }
887
1283
  @if (availableFormats().has('alignLeft')) {
@@ -892,9 +1288,17 @@ class AerisEditorComponent {
892
1288
  [disabled]="toolbarDisabled()"
893
1289
  (click)="align('left')"
894
1290
  >
895
- <svg aria-hidden="true" viewBox="0 0 24 24">
896
- <path d="M4 6h16M4 10h11M4 14h16M4 18h11" />
897
- </svg>
1291
+ @if (toolbarIcons()['alignLeft']; as customIcon) {
1292
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1293
+ ><ng-container [ngTemplateOutlet]="customIcon"
1294
+ /></span>
1295
+ } @else {
1296
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1297
+ <path d="M21 5H3" />
1298
+ <path d="M15 12H3" />
1299
+ <path d="M17 19H3" />
1300
+ </svg>
1301
+ }
898
1302
  </button>
899
1303
  }
900
1304
  @if (availableFormats().has('alignStart')) {
@@ -905,9 +1309,20 @@ class AerisEditorComponent {
905
1309
  [disabled]="toolbarDisabled()"
906
1310
  (click)="align('start')"
907
1311
  >
908
- <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
909
- <path d="M4 6h16M4 10h11M4 14h16M4 18h11" />
910
- </svg>
1312
+ @if (toolbarIcons()['alignStart']; as customIcon) {
1313
+ <span
1314
+ class="aeris-custom-icon aeris-editor__logical-icon"
1315
+ aria-hidden="true"
1316
+ data-aeris-custom-icon
1317
+ ><ng-container [ngTemplateOutlet]="customIcon"
1318
+ /></span>
1319
+ } @else {
1320
+ <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
1321
+ <path d="M21 5H3" />
1322
+ <path d="M15 12H3" />
1323
+ <path d="M17 19H3" />
1324
+ </svg>
1325
+ }
911
1326
  </button>
912
1327
  }
913
1328
  @if (availableFormats().has('alignCenter')) {
@@ -918,9 +1333,17 @@ class AerisEditorComponent {
918
1333
  [disabled]="toolbarDisabled()"
919
1334
  (click)="align('center')"
920
1335
  >
921
- <svg aria-hidden="true" viewBox="0 0 24 24">
922
- <path d="M4 6h16M6.5 10h11M4 14h16M6.5 18h11" />
923
- </svg>
1336
+ @if (toolbarIcons()['alignCenter']; as customIcon) {
1337
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1338
+ ><ng-container [ngTemplateOutlet]="customIcon"
1339
+ /></span>
1340
+ } @else {
1341
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1342
+ <path d="M21 5H3" />
1343
+ <path d="M17 12H7" />
1344
+ <path d="M19 19H5" />
1345
+ </svg>
1346
+ }
924
1347
  </button>
925
1348
  }
926
1349
  @if (availableFormats().has('alignRight')) {
@@ -931,9 +1354,17 @@ class AerisEditorComponent {
931
1354
  [disabled]="toolbarDisabled()"
932
1355
  (click)="align('right')"
933
1356
  >
934
- <svg aria-hidden="true" viewBox="0 0 24 24">
935
- <path d="M4 6h16M9 10h11M4 14h16M9 18h11" />
936
- </svg>
1357
+ @if (toolbarIcons()['alignRight']; as customIcon) {
1358
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1359
+ ><ng-container [ngTemplateOutlet]="customIcon"
1360
+ /></span>
1361
+ } @else {
1362
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1363
+ <path d="M21 5H3" />
1364
+ <path d="M21 12H9" />
1365
+ <path d="M21 19H7" />
1366
+ </svg>
1367
+ }
937
1368
  </button>
938
1369
  }
939
1370
  @if (availableFormats().has('alignEnd')) {
@@ -944,9 +1375,20 @@ class AerisEditorComponent {
944
1375
  [disabled]="toolbarDisabled()"
945
1376
  (click)="align('end')"
946
1377
  >
947
- <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
948
- <path d="M4 6h16M9 10h11M4 14h16M9 18h11" />
949
- </svg>
1378
+ @if (toolbarIcons()['alignEnd']; as customIcon) {
1379
+ <span
1380
+ class="aeris-custom-icon aeris-editor__logical-icon"
1381
+ aria-hidden="true"
1382
+ data-aeris-custom-icon
1383
+ ><ng-container [ngTemplateOutlet]="customIcon"
1384
+ /></span>
1385
+ } @else {
1386
+ <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
1387
+ <path d="M21 5H3" />
1388
+ <path d="M21 12H9" />
1389
+ <path d="M21 19H7" />
1390
+ </svg>
1391
+ }
950
1392
  </button>
951
1393
  }
952
1394
  @if (availableFormats().has('alignJustify')) {
@@ -957,13 +1399,21 @@ class AerisEditorComponent {
957
1399
  [disabled]="toolbarDisabled()"
958
1400
  (click)="align('justify')"
959
1401
  >
960
- <svg aria-hidden="true" viewBox="0 0 24 24">
961
- <path d="M4 6h16M4 10h16M4 14h16M4 18h16" />
962
- </svg>
1402
+ @if (toolbarIcons()['alignJustify']; as customIcon) {
1403
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1404
+ ><ng-container [ngTemplateOutlet]="customIcon"
1405
+ /></span>
1406
+ } @else {
1407
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1408
+ <path d="M3 5h18" />
1409
+ <path d="M3 12h18" />
1410
+ <path d="M3 19h18" />
1411
+ </svg>
1412
+ }
963
1413
  </button>
964
1414
  }
965
1415
 
966
- @if (hasDocumentActions()) {
1416
+ @if (toolbarSeparators().document) {
967
1417
  <span class="aeris-editor__separator" aria-hidden="true"></span>
968
1418
  }
969
1419
  @if (availableFormats().has('outdent')) {
@@ -973,10 +1423,18 @@ class AerisEditorComponent {
973
1423
  [disabled]="toolbarDisabled()"
974
1424
  (click)="outdent()"
975
1425
  >
976
- <svg aria-hidden="true" viewBox="0 0 24 24">
977
- <path d="M11 6h9M11 10h9M11 14h9M11 18h9" />
978
- <path d="m8 9-4 3 4 3" />
979
- </svg>
1426
+ @if (toolbarIcons()['outdent']; as customIcon) {
1427
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1428
+ ><ng-container [ngTemplateOutlet]="customIcon"
1429
+ /></span>
1430
+ } @else {
1431
+ <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
1432
+ <path d="M21 5H11" />
1433
+ <path d="M21 12H11" />
1434
+ <path d="M21 19H11" />
1435
+ <path d="m7 8-4 4 4 4" />
1436
+ </svg>
1437
+ }
980
1438
  </button>
981
1439
  }
982
1440
  @if (availableFormats().has('indent')) {
@@ -986,10 +1444,18 @@ class AerisEditorComponent {
986
1444
  [disabled]="toolbarDisabled()"
987
1445
  (click)="indent()"
988
1446
  >
989
- <svg aria-hidden="true" viewBox="0 0 24 24">
990
- <path d="M11 6h9M11 10h9M11 14h9M11 18h9" />
991
- <path d="m4 9 4 3-4 3" />
992
- </svg>
1447
+ @if (toolbarIcons()['indent']; as customIcon) {
1448
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1449
+ ><ng-container [ngTemplateOutlet]="customIcon"
1450
+ /></span>
1451
+ } @else {
1452
+ <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
1453
+ <path d="M21 5H11" />
1454
+ <path d="M21 12H11" />
1455
+ <path d="M21 19H11" />
1456
+ <path d="m3 8 4 4-4 4" />
1457
+ </svg>
1458
+ }
993
1459
  </button>
994
1460
  }
995
1461
  @if (availableFormats().has('clear')) {
@@ -999,11 +1465,19 @@ class AerisEditorComponent {
999
1465
  [disabled]="toolbarDisabled()"
1000
1466
  (click)="clearFormatting()"
1001
1467
  >
1002
- <svg aria-hidden="true" viewBox="0 0 24 24">
1003
- <path d="m4 20 16-16" />
1004
- <path d="M6.5 4h9l-1.5 5" />
1005
- <path d="m9.5 15-.5 2H5" />
1006
- </svg>
1468
+ @if (toolbarIcons()['clear']; as customIcon) {
1469
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1470
+ ><ng-container [ngTemplateOutlet]="customIcon"
1471
+ /></span>
1472
+ } @else {
1473
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1474
+ <path d="M4 7V4h16v3" />
1475
+ <path d="M5 20h6" />
1476
+ <path d="M13 4 8 20" />
1477
+ <path d="m15 15 5 5" />
1478
+ <path d="m20 15-5 5" />
1479
+ </svg>
1480
+ }
1007
1481
  </button>
1008
1482
  }
1009
1483
  </div>
@@ -1018,9 +1492,9 @@ class AerisEditorComponent {
1018
1492
  [id]="resolvedInputId()"
1019
1493
  [attr.contenteditable]="editable()"
1020
1494
  [attr.aria-label]="ariaLabel() || null"
1021
- [attr.aria-labelledby]="ariaLabelledby() || null"
1022
- [attr.aria-describedby]="ariaDescribedby() || null"
1023
- [attr.aria-invalid]="invalid() || null"
1495
+ [attr.aria-labelledby]="ariaLabelledBy() || null"
1496
+ [attr.aria-describedby]="ariaDescribedBy() || null"
1497
+ [attr.aria-invalid]="displayInvalid() || null"
1024
1498
  [attr.aria-required]="required() || null"
1025
1499
  [attr.aria-placeholder]="placeholder() || null"
1026
1500
  [attr.tabindex]="effectiveDisabled() ? -1 : 0"
@@ -1037,16 +1511,38 @@ class AerisEditorComponent {
1037
1511
  <input type="hidden" [name]="name()" [value]="value()" />
1038
1512
  }
1039
1513
  </div>
1040
- `, isInline: true, styles: [":host{display:inline-block;color:var(--aeris-text)}:host([data-fluid]){display:block;width:100%}.aeris-editor{--aeris-editor-padding: .875rem;--aeris-editor-font-size: .9375rem;--aeris-editor-line-height: 1.6;display:grid;overflow:hidden;width:min(100%,44rem);border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-md, .875rem);background:var(--aeris-surface);box-shadow:var(--aeris-shadow-xs, 0 1px 2px rgba(15, 23, 42, .05));transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.aeris-editor[data-fluid]{width:100%}.aeris-editor[data-size=sm]{--aeris-editor-padding: .75rem;--aeris-editor-font-size: .875rem}.aeris-editor[data-size=lg]{--aeris-editor-padding: 1rem;--aeris-editor-font-size: 1rem}.aeris-editor[data-appearance=filled]{background:var(--aeris-surface-2)}.aeris-editor:focus-within{border-color:var(--aeris-focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--aeris-focus) 18%,transparent)}.aeris-editor[data-invalid]{border-color:var(--aeris-danger)}.aeris-editor[data-disabled]{cursor:not-allowed;opacity:.62}.aeris-editor__toolbar{display:flex;flex-wrap:wrap;gap:.25rem;align-items:center;padding:.5rem;border-bottom:1px solid var(--aeris-border);background:color-mix(in srgb,var(--aeris-surface-2) 82%,transparent)}.aeris-editor__toolbar button{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--aeris-radius-sm, .625rem);background:transparent;color:var(--aeris-text);font:inherit;font-size:.8125rem;font-weight:700;cursor:pointer;transition:background .14s ease,color .14s ease,box-shadow .14s ease}.aeris-editor__toolbar button:hover:not(:disabled),.aeris-editor__toolbar button[aria-pressed=true]{background:var(--aeris-primary-soft);color:var(--aeris-text)}.aeris-editor__toolbar button:focus-visible{outline:2px solid var(--aeris-focus);outline-offset:2px}.aeris-editor__toolbar button:disabled{cursor:not-allowed;opacity:.45}.aeris-editor__toolbar svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.9}:dir(rtl) .aeris-editor__logical-icon{transform:scaleX(-1)}.aeris-editor__separator{width:1px;height:1.5rem;margin-inline:.125rem;background:var(--aeris-border)}.aeris-editor__underline{text-decoration:underline;text-underline-offset:.14em}.aeris-editor__strikethrough{text-decoration:line-through}.aeris-editor__toolbar sub,.aeris-editor__toolbar sup{font-size:.65em}.aeris-editor__content-shell{position:relative;display:grid}.aeris-editor__content{position:relative;z-index:1;min-width:0;padding:var(--aeris-editor-padding);color:var(--aeris-text);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);outline:0;overflow-wrap:anywhere}.aeris-editor__content[contenteditable=false]{cursor:default}.aeris-editor__placeholder{position:absolute;inset-block-start:var(--aeris-editor-padding);inset-inline-start:var(--aeris-editor-padding);color:var(--aeris-text-muted);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);pointer-events:none}.aeris-editor-content__paragraph{margin:0 0 .65rem}.aeris-editor-content__paragraph:last-child{margin-bottom:0}.aeris-editor-content__heading{margin:0 0 .75rem;color:var(--aeris-text);font-size:1.3em;line-height:1.25}.aeris-editor-content__heading--h1{font-size:1.65em}.aeris-editor-content__heading--h2{font-size:1.35em}.aeris-editor-content__heading--h3{font-size:1.15em}.aeris-editor-content__heading--h4{font-size:1.05em}.aeris-editor-content__heading--h5{font-size:.95em}.aeris-editor-content__heading--h6{font-size:.85em;letter-spacing:.02em;text-transform:uppercase}.aeris-editor-content__quote{margin:0 0 .75rem;padding-inline-start:.875rem;border-inline-start:3px solid var(--aeris-primary);color:var(--aeris-text-muted)}.aeris-editor-content__unordered-list,.aeris-editor-content__ordered-list{margin:0 0 .75rem;padding-inline-start:1.35rem}.aeris-editor-content__nested-list-item{list-style-type:none}.aeris-editor-content__check-list{margin:0 0 .75rem;padding-inline-start:0;list-style:none}.aeris-editor-content__list-item--checked,.aeris-editor-content__list-item--unchecked{position:relative;padding-inline-start:1.75rem;list-style:none}.aeris-editor-content__list-item--checked:before,.aeris-editor-content__list-item--unchecked:before{position:absolute;inset-block-start:.26em;inset-inline-start:0;width:1rem;height:1rem;border:1px solid var(--aeris-border-strong, var(--aeris-border));border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface);content:\"\"}.aeris-editor-content__list-item--checked:before{border-color:var(--aeris-primary);background:var(--aeris-primary)}.aeris-editor-content__list-item--checked:after{position:absolute;inset-block-start:.43em;inset-inline-start:.27rem;width:.45rem;height:.24rem;border-block-end:2px solid var(--aeris-primary-contrast, white);border-inline-start:2px solid var(--aeris-primary-contrast, white);content:\"\";transform:rotate(-45deg)}.aeris-editor-content__list-item--checked{color:var(--aeris-text-muted);text-decoration:line-through}.aeris-editor-content__bold{font-weight:700}.aeris-editor-content__italic{font-style:italic}.aeris-editor-content__underline{text-decoration:underline;text-underline-offset:.14em}.aeris-editor-content__strikethrough{text-decoration:line-through}.aeris-editor-content__code{padding:.12em .32em;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface-2);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em}.aeris-editor-content__highlight{border-radius:.18em;background:color-mix(in srgb,var(--aeris-warning, #c38600) 28%,transparent)}.aeris-editor-content__lowercase{text-transform:lowercase}.aeris-editor-content__uppercase{text-transform:uppercase}.aeris-editor-content__capitalize{text-transform:capitalize}.aeris-editor-content__subscript,.aeris-editor-content__superscript{font-size:.75em;line-height:0}.aeris-editor-content__subscript{vertical-align:sub}.aeris-editor-content__superscript{vertical-align:super}@media(prefers-reduced-motion:reduce){.aeris-editor,.aeris-editor__toolbar button{transition:none}}\n"], encapsulation: i0.ViewEncapsulation.None });
1041
- }
1042
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisEditorComponent, decorators: [{
1043
- type: Component,
1044
- args: [{ selector: 'aeris-editor', template: `
1514
+ `,
1515
+ isInline: true,
1516
+ styles: [":host{display:inline-block;color:var(--aeris-text)}:host([data-fluid]){display:block;width:100%}.aeris-editor{--aeris-editor-padding: .875rem;--aeris-editor-font-size: var(--aeris-font-size-xl, .9375rem);--aeris-editor-line-height: 1.6;display:grid;overflow:hidden;width:min(100%,44rem);border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-structured-control, var(--aeris-radius-control, var(--aeris-radius-md, .5625rem)));background:var(--aeris-surface);box-shadow:var(--aeris-shadow-xs, 0 1px 2px rgba(0, 0, 0, .1));transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),background var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-editor[data-fluid]{width:100%}.aeris-editor[data-size=sm]{--aeris-editor-padding: .75rem;--aeris-editor-font-size: var(--aeris-font-size-lg, .875rem)}.aeris-editor[data-size=lg]{--aeris-editor-padding: 1rem;--aeris-editor-font-size: var(--aeris-font-size-2xl, 1rem)}.aeris-editor[data-appearance=filled]{background:var(--aeris-surface-2)}.aeris-editor:focus-within{border-color:var(--aeris-control-focus-border, var(--aeris-focus));box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-focus-ring-color, var(--aeris-focus-ring-color, transparent))}.aeris-editor[data-invalid]{border-color:var(--aeris-control-invalid-border, var(--aeris-danger))}.aeris-editor[data-invalid]:focus-within{box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-invalid-focus-ring-color, transparent)}.aeris-editor[data-disabled]{cursor:not-allowed;opacity:.62}.aeris-editor__toolbar{display:flex;flex-wrap:wrap;gap:.25rem;align-items:center;padding:.5rem;border-bottom:1px solid var(--aeris-border);background:color-mix(in srgb,var(--aeris-surface-2) 82%,transparent)}.aeris-editor__toolbar button{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--aeris-radius-item, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--aeris-text);font:inherit;font-size:var(--aeris-font-size-md, .8125rem);font-weight:var(--aeris-font-weight-bold, 700);cursor:pointer;transition:background var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-editor__toolbar button[aria-pressed=true]{background:var(--aeris-editor-toolbar-active-background, var(--aeris-primary));color:var(--aeris-editor-toolbar-active-color, var(--aeris-on-primary))}@media(hover:hover){.aeris-editor__toolbar button:hover:not(:disabled):not([aria-pressed=true]){background:var(--aeris-interactive-hover, var(--aeris-surface-3));color:var(--aeris-text)}}.aeris-editor__toolbar button:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus);outline-offset:var(--aeris-focus-ring-offset, 2px)}.aeris-editor__toolbar button:disabled{cursor:not-allowed;opacity:.45}.aeris-editor__toolbar svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}:dir(rtl) .aeris-editor__logical-icon{transform:scaleX(-1)}.aeris-editor__separator{width:1px;height:1.5rem;margin-inline:.125rem;background:var(--aeris-border)}.aeris-editor__content-shell{position:relative;display:grid}.aeris-editor__content{position:relative;z-index:1;min-width:0;padding:var(--aeris-editor-padding);color:var(--aeris-text);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);outline:0;overflow-wrap:anywhere}.aeris-editor__content[contenteditable=false]{cursor:default}.aeris-editor__placeholder{position:absolute;inset-block-start:var(--aeris-editor-padding);inset-inline-start:var(--aeris-editor-padding);color:var(--aeris-text-muted);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);pointer-events:none}.aeris-editor-content__paragraph{margin:0 0 .65rem}.aeris-editor-content__paragraph:last-child{margin-bottom:0}.aeris-editor-content__heading{margin:0 0 .75rem;color:var(--aeris-text);font-size:1.3em;line-height:var(--aeris-line-height-tight, 1.25)}.aeris-editor-content__heading--h1{font-size:1.65em}.aeris-editor-content__heading--h2{font-size:1.35em}.aeris-editor-content__heading--h3{font-size:1.15em}.aeris-editor-content__heading--h4{font-size:1.05em}.aeris-editor-content__heading--h5{font-size:.95em}.aeris-editor-content__heading--h6{font-size:.85em;letter-spacing:.02em;text-transform:uppercase}.aeris-editor-content__quote{margin:0 0 .75rem;padding:.75rem .875rem;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .4375rem));background:var(--aeris-surface-2);color:var(--aeris-text-muted)}.aeris-editor-content__unordered-list,.aeris-editor-content__ordered-list{margin:0 0 .75rem;padding-inline-start:1.35rem}.aeris-editor-content__nested-list-item{list-style-type:none}.aeris-editor-content__check-list{margin:0 0 .75rem;padding-inline-start:0;list-style:none}.aeris-editor-content__list-item--checked,.aeris-editor-content__list-item--unchecked{position:relative;padding-inline-start:1.75rem;list-style:none}.aeris-editor-content__list-item--checked:before,.aeris-editor-content__list-item--unchecked:before{position:absolute;inset-block-start:.26em;inset-inline-start:0;width:1rem;height:1rem;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface);content:\"\"}.aeris-editor-content__list-item--checked:before{border-color:var(--aeris-primary);background:var(--aeris-primary)}.aeris-editor-content__list-item--checked:after{position:absolute;inset-block-start:.43em;inset-inline-start:.27rem;width:.45rem;height:.24rem;border-block-end:2px solid var(--aeris-primary-contrast, white);border-inline-start:2px solid var(--aeris-primary-contrast, white);content:\"\";transform:rotate(-45deg)}.aeris-editor-content__list-item--checked{color:var(--aeris-text-muted);text-decoration:line-through}.aeris-editor-content__bold{font-weight:var(--aeris-font-weight-bold, 700)}.aeris-editor-content__italic{font-style:italic}.aeris-editor-content__underline{text-decoration:underline;text-underline-offset:.14em}.aeris-editor-content__strikethrough{text-decoration:line-through}.aeris-editor-content__code{padding:.12em .32em;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface-2);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em}.aeris-editor-content__highlight{border-radius:.18em;background:color-mix(in srgb,var(--aeris-warning, #c38600) 28%,transparent)}.aeris-editor-content__lowercase{text-transform:lowercase}.aeris-editor-content__uppercase{text-transform:uppercase}.aeris-editor-content__capitalize{text-transform:capitalize}.aeris-editor-content__subscript,.aeris-editor-content__superscript{font-size:.75em;line-height:0}.aeris-editor-content__subscript{vertical-align:sub}.aeris-editor-content__superscript{vertical-align:super}@media(prefers-reduced-motion:reduce){.aeris-editor,.aeris-editor__toolbar button{transition:none}}@media(pointer:coarse){input:not([type=checkbox]):not([type=radio]),textarea{font-size:var(--aeris-mobile-input-font-size, 1rem)}}\n"],
1517
+ dependencies: [{
1518
+ kind: "directive",
1519
+ type: NgTemplateOutlet,
1520
+ selector: "[ngTemplateOutlet]",
1521
+ inputs: [
1522
+ "ngTemplateOutletContext",
1523
+ "ngTemplateOutlet",
1524
+ "ngTemplateOutletInjector"
1525
+ ]
1526
+ }],
1527
+ encapsulation: i0.ViewEncapsulation.None
1528
+ });
1529
+ };
1530
+ i0.ɵɵngDeclareClassMetadata({
1531
+ minVersion: "12.0.0",
1532
+ version: "22.2.3",
1533
+ ngImport: i0,
1534
+ type: AerisEditorComponent,
1535
+ decorators: [{
1536
+ type: Component,
1537
+ args: [{
1538
+ selector: "aeris-editor",
1539
+ imports: [NgTemplateOutlet],
1540
+ template: `
1045
1541
  <div
1046
1542
  class="aeris-editor"
1047
1543
  [attr.data-size]="size()"
1048
1544
  [attr.data-appearance]="appearance()"
1049
- [attr.data-invalid]="invalid() || null"
1545
+ [attr.data-invalid]="displayInvalid() || null"
1050
1546
  [attr.data-disabled]="effectiveDisabled() || null"
1051
1547
  [attr.data-readonly]="readonly() || null"
1052
1548
  [attr.data-fluid]="fluid() || null"
@@ -1056,22 +1552,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1056
1552
  <div class="aeris-editor__toolbar" role="toolbar" [attr.aria-label]="toolbarAriaLabel()">
1057
1553
  @if (availableFormats().has('undo')) {
1058
1554
  <button type="button" aria-label="Undo" [disabled]="toolbarDisabled()" (click)="undo()">
1059
- <svg aria-hidden="true" viewBox="0 0 24 24">
1060
- <path d="M9 8H4V3" />
1061
- <path d="M4 8c2.1-2.7 5-4 8.1-4A8 8 0 1 1 6 17.1" />
1062
- </svg>
1555
+ @if (toolbarIcons()['undo']; as customIcon) {
1556
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1557
+ ><ng-container [ngTemplateOutlet]="customIcon"
1558
+ /></span>
1559
+ } @else {
1560
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1561
+ <path d="M3 7v6h6" />
1562
+ <path d="M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" />
1563
+ </svg>
1564
+ }
1063
1565
  </button>
1064
1566
  }
1065
1567
  @if (availableFormats().has('redo')) {
1066
1568
  <button type="button" aria-label="Redo" [disabled]="toolbarDisabled()" (click)="redo()">
1067
- <svg aria-hidden="true" viewBox="0 0 24 24">
1068
- <path d="M15 8h5V3" />
1069
- <path d="M20 8c-2.1-2.7-5-4-8.1-4A8 8 0 1 0 18 17.1" />
1070
- </svg>
1569
+ @if (toolbarIcons()['redo']; as customIcon) {
1570
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1571
+ ><ng-container [ngTemplateOutlet]="customIcon"
1572
+ /></span>
1573
+ } @else {
1574
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1575
+ <path d="M21 7v6h-6" />
1576
+ <path d="M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" />
1577
+ </svg>
1578
+ }
1071
1579
  </button>
1072
1580
  }
1073
1581
 
1074
- @if (hasInlineActions()) {
1582
+ @if (toolbarSeparators().inline) {
1075
1583
  <span class="aeris-editor__separator" aria-hidden="true"></span>
1076
1584
  }
1077
1585
  @if (availableFormats().has('bold')) {
@@ -1082,7 +1590,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1082
1590
  [disabled]="toolbarDisabled()"
1083
1591
  (click)="format('bold')"
1084
1592
  >
1085
- <strong>B</strong>
1593
+ @if (toolbarIcons()['bold']; as customIcon) {
1594
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1595
+ ><ng-container [ngTemplateOutlet]="customIcon"
1596
+ /></span>
1597
+ } @else {
1598
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1599
+ <path d="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" />
1600
+ </svg>
1601
+ }
1086
1602
  </button>
1087
1603
  }
1088
1604
  @if (availableFormats().has('italic')) {
@@ -1093,7 +1609,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1093
1609
  [disabled]="toolbarDisabled()"
1094
1610
  (click)="format('italic')"
1095
1611
  >
1096
- <em>I</em>
1612
+ @if (toolbarIcons()['italic']; as customIcon) {
1613
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1614
+ ><ng-container [ngTemplateOutlet]="customIcon"
1615
+ /></span>
1616
+ } @else {
1617
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1618
+ <line x1="19" x2="10" y1="4" y2="4" />
1619
+ <line x1="14" x2="5" y1="20" y2="20" />
1620
+ <line x1="15" x2="9" y1="4" y2="20" />
1621
+ </svg>
1622
+ }
1097
1623
  </button>
1098
1624
  }
1099
1625
  @if (availableFormats().has('underline')) {
@@ -1104,7 +1630,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1104
1630
  [disabled]="toolbarDisabled()"
1105
1631
  (click)="format('underline')"
1106
1632
  >
1107
- <span class="aeris-editor__underline">U</span>
1633
+ @if (toolbarIcons()['underline']; as customIcon) {
1634
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1635
+ ><ng-container [ngTemplateOutlet]="customIcon"
1636
+ /></span>
1637
+ } @else {
1638
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1639
+ <path d="M6 4v6a6 6 0 0 0 12 0V4" />
1640
+ <line x1="4" x2="20" y1="20" y2="20" />
1641
+ </svg>
1642
+ }
1108
1643
  </button>
1109
1644
  }
1110
1645
  @if (availableFormats().has('strikethrough')) {
@@ -1115,7 +1650,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1115
1650
  [disabled]="toolbarDisabled()"
1116
1651
  (click)="format('strikethrough')"
1117
1652
  >
1118
- <span class="aeris-editor__strikethrough">S</span>
1653
+ @if (toolbarIcons()['strikethrough']; as customIcon) {
1654
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1655
+ ><ng-container [ngTemplateOutlet]="customIcon"
1656
+ /></span>
1657
+ } @else {
1658
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1659
+ <path d="M16 4H9a3 3 0 0 0-2.83 4" />
1660
+ <path d="M14 12a4 4 0 0 1 0 8H6" />
1661
+ <line x1="4" x2="20" y1="12" y2="12" />
1662
+ </svg>
1663
+ }
1119
1664
  </button>
1120
1665
  }
1121
1666
  @if (availableFormats().has('code')) {
@@ -1126,7 +1671,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1126
1671
  [disabled]="toolbarDisabled()"
1127
1672
  (click)="format('code')"
1128
1673
  >
1129
- <span aria-hidden="true">&lt;/&gt;</span>
1674
+ @if (toolbarIcons()['code']; as customIcon) {
1675
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1676
+ ><ng-container [ngTemplateOutlet]="customIcon"
1677
+ /></span>
1678
+ } @else {
1679
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1680
+ <path d="m16 18 6-6-6-6" />
1681
+ <path d="m8 6-6 6 6 6" />
1682
+ </svg>
1683
+ }
1130
1684
  </button>
1131
1685
  }
1132
1686
  @if (availableFormats().has('highlight')) {
@@ -1137,11 +1691,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1137
1691
  [disabled]="toolbarDisabled()"
1138
1692
  (click)="format('highlight')"
1139
1693
  >
1140
- <svg aria-hidden="true" viewBox="0 0 24 24">
1141
- <path d="m9 11 4 4" />
1142
- <path d="m14.5 4.5 5 5L10 19H5v-5Z" />
1143
- <path d="M4 21h16" />
1144
- </svg>
1694
+ @if (toolbarIcons()['highlight']; as customIcon) {
1695
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1696
+ ><ng-container [ngTemplateOutlet]="customIcon"
1697
+ /></span>
1698
+ } @else {
1699
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1700
+ <path d="m9 11-6 6v3h9l3-3" />
1701
+ <path d="m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" />
1702
+ </svg>
1703
+ }
1145
1704
  </button>
1146
1705
  }
1147
1706
  @if (availableFormats().has('subscript')) {
@@ -1152,7 +1711,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1152
1711
  [disabled]="toolbarDisabled()"
1153
1712
  (click)="format('subscript')"
1154
1713
  >
1155
- <span aria-hidden="true">X<sub>2</sub></span>
1714
+ @if (toolbarIcons()['subscript']; as customIcon) {
1715
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
1716
+ ><ng-container [ngTemplateOutlet]="customIcon"
1717
+ /></span>
1718
+ } @else {
1719
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1720
+ <path d="m4 5 8 8" />
1721
+ <path d="m12 5-8 8" />
1722
+ <path
1723
+ d="M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07"
1724
+ />
1725
+ </svg>
1726
+ }
1156
1727
  </button>
1157
1728
  }
1158
1729
  @if (availableFormats().has('superscript')) {
@@ -1163,7 +1734,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1163
1734
  [disabled]="toolbarDisabled()"
1164
1735
  (click)="format('superscript')"
1165
1736
  >
1166
- <span aria-hidden="true">X<sup>2</sup></span>
1737
+ @if (toolbarIcons()['superscript']; as customIcon) {
1738
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1739
+ ><ng-container [ngTemplateOutlet]="customIcon"
1740
+ /></span>
1741
+ } @else {
1742
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1743
+ <path d="m4 19 8-8" />
1744
+ <path d="m12 19-8-8" />
1745
+ <path
1746
+ d="M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06"
1747
+ />
1748
+ </svg>
1749
+ }
1167
1750
  </button>
1168
1751
  }
1169
1752
  @if (availableFormats().has('lowercase')) {
@@ -1174,7 +1757,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1174
1757
  [disabled]="toolbarDisabled()"
1175
1758
  (click)="format('lowercase')"
1176
1759
  >
1177
- aa
1760
+ @if (toolbarIcons()['lowercase']; as customIcon) {
1761
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1762
+ ><ng-container [ngTemplateOutlet]="customIcon"
1763
+ /></span>
1764
+ } @else {
1765
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1766
+ <path d="M10 9v7" />
1767
+ <path d="M14 6v10" />
1768
+ <circle cx="17.5" cy="12.5" r="3.5" />
1769
+ <circle cx="6.5" cy="12.5" r="3.5" />
1770
+ </svg>
1771
+ }
1178
1772
  </button>
1179
1773
  }
1180
1774
  @if (availableFormats().has('uppercase')) {
@@ -1185,7 +1779,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1185
1779
  [disabled]="toolbarDisabled()"
1186
1780
  (click)="format('uppercase')"
1187
1781
  >
1188
- AA
1782
+ @if (toolbarIcons()['uppercase']; as customIcon) {
1783
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1784
+ ><ng-container [ngTemplateOutlet]="customIcon"
1785
+ /></span>
1786
+ } @else {
1787
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1788
+ <path
1789
+ d="M15 11h4.5a1 1 0 0 1 0 5h-4a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h3a1 1 0 0 1 0 5"
1790
+ />
1791
+ <path d="m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16" />
1792
+ <path d="M3.304 13h6.392" />
1793
+ </svg>
1794
+ }
1189
1795
  </button>
1190
1796
  }
1191
1797
  @if (availableFormats().has('capitalize')) {
@@ -1196,11 +1802,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1196
1802
  [disabled]="toolbarDisabled()"
1197
1803
  (click)="format('capitalize')"
1198
1804
  >
1199
- Aa
1805
+ @if (toolbarIcons()['capitalize']; as customIcon) {
1806
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1807
+ ><ng-container [ngTemplateOutlet]="customIcon"
1808
+ /></span>
1809
+ } @else {
1810
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1811
+ <path d="m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16" />
1812
+ <path d="M22 9v7" />
1813
+ <path d="M3.304 13h6.392" />
1814
+ <circle cx="18.5" cy="12.5" r="3.5" />
1815
+ </svg>
1816
+ }
1200
1817
  </button>
1201
1818
  }
1202
1819
 
1203
- @if (hasBlockActions()) {
1820
+ @if (toolbarSeparators().block) {
1204
1821
  <span class="aeris-editor__separator" aria-hidden="true"></span>
1205
1822
  }
1206
1823
  @if (availableFormats().has('paragraph')) {
@@ -1211,7 +1828,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1211
1828
  [disabled]="toolbarDisabled()"
1212
1829
  (click)="setBlock('paragraph')"
1213
1830
  >
1214
- P
1831
+ @if (toolbarIcons()['paragraph']; as customIcon) {
1832
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1833
+ ><ng-container [ngTemplateOutlet]="customIcon"
1834
+ /></span>
1835
+ } @else {
1836
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1837
+ <path d="M13 4v16" />
1838
+ <path d="M17 4v16" />
1839
+ <path d="M19 4H9.5a4.5 4.5 0 0 0 0 9H13" />
1840
+ </svg>
1841
+ }
1215
1842
  </button>
1216
1843
  }
1217
1844
  @if (availableFormats().has('heading1')) {
@@ -1222,7 +1849,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1222
1849
  [disabled]="toolbarDisabled()"
1223
1850
  (click)="setBlock('h1')"
1224
1851
  >
1225
- H1
1852
+ @if (toolbarIcons()['heading1']; as customIcon) {
1853
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1854
+ ><ng-container [ngTemplateOutlet]="customIcon"
1855
+ /></span>
1856
+ } @else {
1857
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1858
+ <path d="M4 12h8" />
1859
+ <path d="M4 18V6" />
1860
+ <path d="M12 18V6" />
1861
+ <path d="m17 12 3-2v8" />
1862
+ </svg>
1863
+ }
1226
1864
  </button>
1227
1865
  }
1228
1866
  @if (availableFormats().has('heading')) {
@@ -1233,7 +1871,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1233
1871
  [disabled]="toolbarDisabled()"
1234
1872
  (click)="setBlock('heading')"
1235
1873
  >
1236
- H2
1874
+ @if (toolbarIcons()['heading']; as customIcon) {
1875
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1876
+ ><ng-container [ngTemplateOutlet]="customIcon"
1877
+ /></span>
1878
+ } @else {
1879
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1880
+ <path d="M4 12h8" />
1881
+ <path d="M4 18V6" />
1882
+ <path d="M12 18V6" />
1883
+ <path d="M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" />
1884
+ </svg>
1885
+ }
1237
1886
  </button>
1238
1887
  }
1239
1888
  @if (availableFormats().has('heading2')) {
@@ -1244,7 +1893,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1244
1893
  [disabled]="toolbarDisabled()"
1245
1894
  (click)="setBlock('h2')"
1246
1895
  >
1247
- H2
1896
+ @if (toolbarIcons()['heading2']; as customIcon) {
1897
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1898
+ ><ng-container [ngTemplateOutlet]="customIcon"
1899
+ /></span>
1900
+ } @else {
1901
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1902
+ <path d="M4 12h8" />
1903
+ <path d="M4 18V6" />
1904
+ <path d="M12 18V6" />
1905
+ <path d="M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" />
1906
+ </svg>
1907
+ }
1248
1908
  </button>
1249
1909
  }
1250
1910
  @if (availableFormats().has('heading3')) {
@@ -1255,7 +1915,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1255
1915
  [disabled]="toolbarDisabled()"
1256
1916
  (click)="setBlock('h3')"
1257
1917
  >
1258
- H3
1918
+ @if (toolbarIcons()['heading3']; as customIcon) {
1919
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1920
+ ><ng-container [ngTemplateOutlet]="customIcon"
1921
+ /></span>
1922
+ } @else {
1923
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1924
+ <path d="M4 12h8" />
1925
+ <path d="M4 18V6" />
1926
+ <path d="M12 18V6" />
1927
+ <path d="M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" />
1928
+ <path d="M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" />
1929
+ </svg>
1930
+ }
1259
1931
  </button>
1260
1932
  }
1261
1933
  @if (availableFormats().has('heading4')) {
@@ -1266,7 +1938,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1266
1938
  [disabled]="toolbarDisabled()"
1267
1939
  (click)="setBlock('h4')"
1268
1940
  >
1269
- H4
1941
+ @if (toolbarIcons()['heading4']; as customIcon) {
1942
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1943
+ ><ng-container [ngTemplateOutlet]="customIcon"
1944
+ /></span>
1945
+ } @else {
1946
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1947
+ <path d="M12 18V6" />
1948
+ <path d="M17 10v3a1 1 0 0 0 1 1h3" />
1949
+ <path d="M21 10v8" />
1950
+ <path d="M4 12h8" />
1951
+ <path d="M4 18V6" />
1952
+ </svg>
1953
+ }
1270
1954
  </button>
1271
1955
  }
1272
1956
  @if (availableFormats().has('heading5')) {
@@ -1277,7 +1961,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1277
1961
  [disabled]="toolbarDisabled()"
1278
1962
  (click)="setBlock('h5')"
1279
1963
  >
1280
- H5
1964
+ @if (toolbarIcons()['heading5']; as customIcon) {
1965
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1966
+ ><ng-container [ngTemplateOutlet]="customIcon"
1967
+ /></span>
1968
+ } @else {
1969
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1970
+ <path d="M4 12h8" />
1971
+ <path d="M4 18V6" />
1972
+ <path d="M12 18V6" />
1973
+ <path d="M17 13v-3h4" />
1974
+ <path d="M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17" />
1975
+ </svg>
1976
+ }
1281
1977
  </button>
1282
1978
  }
1283
1979
  @if (availableFormats().has('heading6')) {
@@ -1288,7 +1984,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1288
1984
  [disabled]="toolbarDisabled()"
1289
1985
  (click)="setBlock('h6')"
1290
1986
  >
1291
- H6
1987
+ @if (toolbarIcons()['heading6']; as customIcon) {
1988
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
1989
+ ><ng-container [ngTemplateOutlet]="customIcon"
1990
+ /></span>
1991
+ } @else {
1992
+ <svg aria-hidden="true" viewBox="0 0 24 24">
1993
+ <path d="M4 12h8" />
1994
+ <path d="M4 18V6" />
1995
+ <path d="M12 18V6" />
1996
+ <circle cx="19" cy="16" r="2" />
1997
+ <path d="M20 10c-2 2-3 3.5-3 6" />
1998
+ </svg>
1999
+ }
1292
2000
  </button>
1293
2001
  }
1294
2002
  @if (availableFormats().has('quote')) {
@@ -1299,18 +2007,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1299
2007
  [disabled]="toolbarDisabled()"
1300
2008
  (click)="setBlock('quote')"
1301
2009
  >
1302
- <svg aria-hidden="true" viewBox="0 0 24 24">
1303
- <path
1304
- d="M8 6H5.8C4.8 7.7 4.3 9.3 4.3 11c0 2.1 1.1 3.6 3 3.6 1.5 0 2.7-1.1 2.7-2.7 0-1.4-1-2.5-2.4-2.7.1-.9.5-1.9 1.1-3.2Z"
1305
- />
1306
- <path
1307
- d="M18 6h-2.2c-1 1.7-1.5 3.3-1.5 5 0 2.1 1.1 3.6 3 3.6 1.5 0 2.7-1.1 2.7-2.7 0-1.4-1-2.5-2.4-2.7.1-.9.5-1.9 1.1-3.2Z"
1308
- />
1309
- </svg>
2010
+ @if (toolbarIcons()['quote']; as customIcon) {
2011
+ <span class="aeris-custom-icon" data-aeris-custom-icon aria-hidden="true"
2012
+ ><ng-container [ngTemplateOutlet]="customIcon"
2013
+ /></span>
2014
+ } @else {
2015
+ <svg aria-hidden="true" viewBox="0 0 24 24">
2016
+ <path
2017
+ d="M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
2018
+ />
2019
+ <path
2020
+ d="M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
2021
+ />
2022
+ </svg>
2023
+ }
1310
2024
  </button>
1311
2025
  }
1312
2026
 
1313
- @if (hasListActions()) {
2027
+ @if (toolbarSeparators().list) {
1314
2028
  <span class="aeris-editor__separator" aria-hidden="true"></span>
1315
2029
  }
1316
2030
  @if (availableFormats().has('bulletList')) {
@@ -1321,14 +2035,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1321
2035
  [disabled]="toolbarDisabled()"
1322
2036
  (click)="toggleBulletList()"
1323
2037
  >
1324
- <svg aria-hidden="true" viewBox="0 0 24 24">
1325
- <path d="M8 6h12" />
1326
- <path d="M8 12h12" />
1327
- <path d="M8 18h12" />
1328
- <circle cx="4" cy="6" r="1" />
1329
- <circle cx="4" cy="12" r="1" />
1330
- <circle cx="4" cy="18" r="1" />
1331
- </svg>
2038
+ @if (toolbarIcons()['bulletList']; as customIcon) {
2039
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
2040
+ ><ng-container [ngTemplateOutlet]="customIcon"
2041
+ /></span>
2042
+ } @else {
2043
+ <svg aria-hidden="true" viewBox="0 0 24 24">
2044
+ <path d="M3 5h.01" />
2045
+ <path d="M3 12h.01" />
2046
+ <path d="M3 19h.01" />
2047
+ <path d="M8 5h13" />
2048
+ <path d="M8 12h13" />
2049
+ <path d="M8 19h13" />
2050
+ </svg>
2051
+ }
1332
2052
  </button>
1333
2053
  }
1334
2054
  @if (availableFormats().has('numberedList')) {
@@ -1339,19 +2059,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1339
2059
  [disabled]="toolbarDisabled()"
1340
2060
  (click)="toggleNumberedList()"
1341
2061
  >
1342
- <svg aria-hidden="true" viewBox="0 0 24 24">
1343
- <path d="M10 6h10" />
1344
- <path d="M10 12h10" />
1345
- <path d="M10 18h10" />
1346
- <path d="M4 5h1v3" />
1347
- <path d="M3.7 8h2.6" />
1348
- <path
1349
- d="M3.6 11.4c.3-.4.8-.6 1.4-.6.8 0 1.4.5 1.4 1.2 0 .5-.3.9-.8 1.2L4 14.5h2.5"
1350
- />
1351
- <path
1352
- d="M3.7 17h2.1l-1 1h.3c.8 0 1.4.4 1.4 1.1 0 .7-.6 1.2-1.5 1.2-.6 0-1.1-.2-1.5-.6"
1353
- />
1354
- </svg>
2062
+ @if (toolbarIcons()['numberedList']; as customIcon) {
2063
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
2064
+ ><ng-container [ngTemplateOutlet]="customIcon"
2065
+ /></span>
2066
+ } @else {
2067
+ <svg aria-hidden="true" viewBox="0 0 24 24">
2068
+ <path d="M11 5h10" />
2069
+ <path d="M11 12h10" />
2070
+ <path d="M11 19h10" />
2071
+ <path d="M4 4h1v5" />
2072
+ <path d="M4 9h2" />
2073
+ <path d="M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" />
2074
+ </svg>
2075
+ }
1355
2076
  </button>
1356
2077
  }
1357
2078
  @if (availableFormats().has('checkList')) {
@@ -1362,17 +2083,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1362
2083
  [disabled]="toolbarDisabled()"
1363
2084
  (click)="toggleCheckList()"
1364
2085
  >
1365
- <svg aria-hidden="true" viewBox="0 0 24 24">
1366
- <rect x="3" y="4" width="5" height="5" rx="1" />
1367
- <path d="m4.5 6.5 1.2 1.2L8.3 5" />
1368
- <path d="M11 6.5h10" />
1369
- <rect x="3" y="15" width="5" height="5" rx="1" />
1370
- <path d="M11 17.5h10" />
1371
- </svg>
2086
+ @if (toolbarIcons()['checkList']; as customIcon) {
2087
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
2088
+ ><ng-container [ngTemplateOutlet]="customIcon"
2089
+ /></span>
2090
+ } @else {
2091
+ <svg aria-hidden="true" viewBox="0 0 24 24">
2092
+ <path d="M13 5h8" />
2093
+ <path d="M13 12h8" />
2094
+ <path d="M13 19h8" />
2095
+ <path d="m3 17 2 2 4-4" />
2096
+ <path d="m3 7 2 2 4-4" />
2097
+ </svg>
2098
+ }
1372
2099
  </button>
1373
2100
  }
1374
2101
 
1375
- @if (hasAlignmentActions()) {
2102
+ @if (toolbarSeparators().alignment) {
1376
2103
  <span class="aeris-editor__separator" aria-hidden="true"></span>
1377
2104
  }
1378
2105
  @if (availableFormats().has('alignLeft')) {
@@ -1383,9 +2110,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1383
2110
  [disabled]="toolbarDisabled()"
1384
2111
  (click)="align('left')"
1385
2112
  >
1386
- <svg aria-hidden="true" viewBox="0 0 24 24">
1387
- <path d="M4 6h16M4 10h11M4 14h16M4 18h11" />
1388
- </svg>
2113
+ @if (toolbarIcons()['alignLeft']; as customIcon) {
2114
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
2115
+ ><ng-container [ngTemplateOutlet]="customIcon"
2116
+ /></span>
2117
+ } @else {
2118
+ <svg aria-hidden="true" viewBox="0 0 24 24">
2119
+ <path d="M21 5H3" />
2120
+ <path d="M15 12H3" />
2121
+ <path d="M17 19H3" />
2122
+ </svg>
2123
+ }
1389
2124
  </button>
1390
2125
  }
1391
2126
  @if (availableFormats().has('alignStart')) {
@@ -1396,9 +2131,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1396
2131
  [disabled]="toolbarDisabled()"
1397
2132
  (click)="align('start')"
1398
2133
  >
1399
- <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
1400
- <path d="M4 6h16M4 10h11M4 14h16M4 18h11" />
1401
- </svg>
2134
+ @if (toolbarIcons()['alignStart']; as customIcon) {
2135
+ <span
2136
+ class="aeris-custom-icon aeris-editor__logical-icon"
2137
+ aria-hidden="true"
2138
+ data-aeris-custom-icon
2139
+ ><ng-container [ngTemplateOutlet]="customIcon"
2140
+ /></span>
2141
+ } @else {
2142
+ <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
2143
+ <path d="M21 5H3" />
2144
+ <path d="M15 12H3" />
2145
+ <path d="M17 19H3" />
2146
+ </svg>
2147
+ }
1402
2148
  </button>
1403
2149
  }
1404
2150
  @if (availableFormats().has('alignCenter')) {
@@ -1409,9 +2155,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1409
2155
  [disabled]="toolbarDisabled()"
1410
2156
  (click)="align('center')"
1411
2157
  >
1412
- <svg aria-hidden="true" viewBox="0 0 24 24">
1413
- <path d="M4 6h16M6.5 10h11M4 14h16M6.5 18h11" />
1414
- </svg>
2158
+ @if (toolbarIcons()['alignCenter']; as customIcon) {
2159
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
2160
+ ><ng-container [ngTemplateOutlet]="customIcon"
2161
+ /></span>
2162
+ } @else {
2163
+ <svg aria-hidden="true" viewBox="0 0 24 24">
2164
+ <path d="M21 5H3" />
2165
+ <path d="M17 12H7" />
2166
+ <path d="M19 19H5" />
2167
+ </svg>
2168
+ }
1415
2169
  </button>
1416
2170
  }
1417
2171
  @if (availableFormats().has('alignRight')) {
@@ -1422,9 +2176,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1422
2176
  [disabled]="toolbarDisabled()"
1423
2177
  (click)="align('right')"
1424
2178
  >
1425
- <svg aria-hidden="true" viewBox="0 0 24 24">
1426
- <path d="M4 6h16M9 10h11M4 14h16M9 18h11" />
1427
- </svg>
2179
+ @if (toolbarIcons()['alignRight']; as customIcon) {
2180
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
2181
+ ><ng-container [ngTemplateOutlet]="customIcon"
2182
+ /></span>
2183
+ } @else {
2184
+ <svg aria-hidden="true" viewBox="0 0 24 24">
2185
+ <path d="M21 5H3" />
2186
+ <path d="M21 12H9" />
2187
+ <path d="M21 19H7" />
2188
+ </svg>
2189
+ }
1428
2190
  </button>
1429
2191
  }
1430
2192
  @if (availableFormats().has('alignEnd')) {
@@ -1435,9 +2197,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1435
2197
  [disabled]="toolbarDisabled()"
1436
2198
  (click)="align('end')"
1437
2199
  >
1438
- <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
1439
- <path d="M4 6h16M9 10h11M4 14h16M9 18h11" />
1440
- </svg>
2200
+ @if (toolbarIcons()['alignEnd']; as customIcon) {
2201
+ <span
2202
+ class="aeris-custom-icon aeris-editor__logical-icon"
2203
+ aria-hidden="true"
2204
+ data-aeris-custom-icon
2205
+ ><ng-container [ngTemplateOutlet]="customIcon"
2206
+ /></span>
2207
+ } @else {
2208
+ <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
2209
+ <path d="M21 5H3" />
2210
+ <path d="M21 12H9" />
2211
+ <path d="M21 19H7" />
2212
+ </svg>
2213
+ }
1441
2214
  </button>
1442
2215
  }
1443
2216
  @if (availableFormats().has('alignJustify')) {
@@ -1448,13 +2221,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1448
2221
  [disabled]="toolbarDisabled()"
1449
2222
  (click)="align('justify')"
1450
2223
  >
1451
- <svg aria-hidden="true" viewBox="0 0 24 24">
1452
- <path d="M4 6h16M4 10h16M4 14h16M4 18h16" />
1453
- </svg>
2224
+ @if (toolbarIcons()['alignJustify']; as customIcon) {
2225
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
2226
+ ><ng-container [ngTemplateOutlet]="customIcon"
2227
+ /></span>
2228
+ } @else {
2229
+ <svg aria-hidden="true" viewBox="0 0 24 24">
2230
+ <path d="M3 5h18" />
2231
+ <path d="M3 12h18" />
2232
+ <path d="M3 19h18" />
2233
+ </svg>
2234
+ }
1454
2235
  </button>
1455
2236
  }
1456
2237
 
1457
- @if (hasDocumentActions()) {
2238
+ @if (toolbarSeparators().document) {
1458
2239
  <span class="aeris-editor__separator" aria-hidden="true"></span>
1459
2240
  }
1460
2241
  @if (availableFormats().has('outdent')) {
@@ -1464,10 +2245,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1464
2245
  [disabled]="toolbarDisabled()"
1465
2246
  (click)="outdent()"
1466
2247
  >
1467
- <svg aria-hidden="true" viewBox="0 0 24 24">
1468
- <path d="M11 6h9M11 10h9M11 14h9M11 18h9" />
1469
- <path d="m8 9-4 3 4 3" />
1470
- </svg>
2248
+ @if (toolbarIcons()['outdent']; as customIcon) {
2249
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
2250
+ ><ng-container [ngTemplateOutlet]="customIcon"
2251
+ /></span>
2252
+ } @else {
2253
+ <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
2254
+ <path d="M21 5H11" />
2255
+ <path d="M21 12H11" />
2256
+ <path d="M21 19H11" />
2257
+ <path d="m7 8-4 4 4 4" />
2258
+ </svg>
2259
+ }
1471
2260
  </button>
1472
2261
  }
1473
2262
  @if (availableFormats().has('indent')) {
@@ -1477,10 +2266,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1477
2266
  [disabled]="toolbarDisabled()"
1478
2267
  (click)="indent()"
1479
2268
  >
1480
- <svg aria-hidden="true" viewBox="0 0 24 24">
1481
- <path d="M11 6h9M11 10h9M11 14h9M11 18h9" />
1482
- <path d="m4 9 4 3-4 3" />
1483
- </svg>
2269
+ @if (toolbarIcons()['indent']; as customIcon) {
2270
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
2271
+ ><ng-container [ngTemplateOutlet]="customIcon"
2272
+ /></span>
2273
+ } @else {
2274
+ <svg class="aeris-editor__logical-icon" aria-hidden="true" viewBox="0 0 24 24">
2275
+ <path d="M21 5H11" />
2276
+ <path d="M21 12H11" />
2277
+ <path d="M21 19H11" />
2278
+ <path d="m3 8 4 4-4 4" />
2279
+ </svg>
2280
+ }
1484
2281
  </button>
1485
2282
  }
1486
2283
  @if (availableFormats().has('clear')) {
@@ -1490,11 +2287,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1490
2287
  [disabled]="toolbarDisabled()"
1491
2288
  (click)="clearFormatting()"
1492
2289
  >
1493
- <svg aria-hidden="true" viewBox="0 0 24 24">
1494
- <path d="m4 20 16-16" />
1495
- <path d="M6.5 4h9l-1.5 5" />
1496
- <path d="m9.5 15-.5 2H5" />
1497
- </svg>
2290
+ @if (toolbarIcons()['clear']; as customIcon) {
2291
+ <span class="aeris-custom-icon" aria-hidden="true" data-aeris-custom-icon
2292
+ ><ng-container [ngTemplateOutlet]="customIcon"
2293
+ /></span>
2294
+ } @else {
2295
+ <svg aria-hidden="true" viewBox="0 0 24 24">
2296
+ <path d="M4 7V4h16v3" />
2297
+ <path d="M5 20h6" />
2298
+ <path d="M13 4 8 20" />
2299
+ <path d="m15 15 5 5" />
2300
+ <path d="m20 15-5 5" />
2301
+ </svg>
2302
+ }
1498
2303
  </button>
1499
2304
  }
1500
2305
  </div>
@@ -1509,9 +2314,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1509
2314
  [id]="resolvedInputId()"
1510
2315
  [attr.contenteditable]="editable()"
1511
2316
  [attr.aria-label]="ariaLabel() || null"
1512
- [attr.aria-labelledby]="ariaLabelledby() || null"
1513
- [attr.aria-describedby]="ariaDescribedby() || null"
1514
- [attr.aria-invalid]="invalid() || null"
2317
+ [attr.aria-labelledby]="ariaLabelledBy() || null"
2318
+ [attr.aria-describedby]="ariaDescribedBy() || null"
2319
+ [attr.aria-invalid]="displayInvalid() || null"
1515
2320
  [attr.aria-required]="required() || null"
1516
2321
  [attr.aria-placeholder]="placeholder() || null"
1517
2322
  [attr.tabindex]="effectiveDisabled() ? -1 : 0"
@@ -1528,21 +2333,241 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1528
2333
  <input type="hidden" [name]="name()" [value]="value()" />
1529
2334
  }
1530
2335
  </div>
1531
- `, encapsulation: ViewEncapsulation.None, providers: [
1532
- {
1533
- provide: NG_VALUE_ACCESSOR,
1534
- useExisting: forwardRef(() => AerisEditorComponent),
1535
- multi: true,
1536
- },
1537
- ], host: {
1538
- '[attr.data-fluid]': 'fluid() || null',
1539
- }, styles: [":host{display:inline-block;color:var(--aeris-text)}:host([data-fluid]){display:block;width:100%}.aeris-editor{--aeris-editor-padding: .875rem;--aeris-editor-font-size: .9375rem;--aeris-editor-line-height: 1.6;display:grid;overflow:hidden;width:min(100%,44rem);border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-md, .875rem);background:var(--aeris-surface);box-shadow:var(--aeris-shadow-xs, 0 1px 2px rgba(15, 23, 42, .05));transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.aeris-editor[data-fluid]{width:100%}.aeris-editor[data-size=sm]{--aeris-editor-padding: .75rem;--aeris-editor-font-size: .875rem}.aeris-editor[data-size=lg]{--aeris-editor-padding: 1rem;--aeris-editor-font-size: 1rem}.aeris-editor[data-appearance=filled]{background:var(--aeris-surface-2)}.aeris-editor:focus-within{border-color:var(--aeris-focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--aeris-focus) 18%,transparent)}.aeris-editor[data-invalid]{border-color:var(--aeris-danger)}.aeris-editor[data-disabled]{cursor:not-allowed;opacity:.62}.aeris-editor__toolbar{display:flex;flex-wrap:wrap;gap:.25rem;align-items:center;padding:.5rem;border-bottom:1px solid var(--aeris-border);background:color-mix(in srgb,var(--aeris-surface-2) 82%,transparent)}.aeris-editor__toolbar button{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--aeris-radius-sm, .625rem);background:transparent;color:var(--aeris-text);font:inherit;font-size:.8125rem;font-weight:700;cursor:pointer;transition:background .14s ease,color .14s ease,box-shadow .14s ease}.aeris-editor__toolbar button:hover:not(:disabled),.aeris-editor__toolbar button[aria-pressed=true]{background:var(--aeris-primary-soft);color:var(--aeris-text)}.aeris-editor__toolbar button:focus-visible{outline:2px solid var(--aeris-focus);outline-offset:2px}.aeris-editor__toolbar button:disabled{cursor:not-allowed;opacity:.45}.aeris-editor__toolbar svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.9}:dir(rtl) .aeris-editor__logical-icon{transform:scaleX(-1)}.aeris-editor__separator{width:1px;height:1.5rem;margin-inline:.125rem;background:var(--aeris-border)}.aeris-editor__underline{text-decoration:underline;text-underline-offset:.14em}.aeris-editor__strikethrough{text-decoration:line-through}.aeris-editor__toolbar sub,.aeris-editor__toolbar sup{font-size:.65em}.aeris-editor__content-shell{position:relative;display:grid}.aeris-editor__content{position:relative;z-index:1;min-width:0;padding:var(--aeris-editor-padding);color:var(--aeris-text);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);outline:0;overflow-wrap:anywhere}.aeris-editor__content[contenteditable=false]{cursor:default}.aeris-editor__placeholder{position:absolute;inset-block-start:var(--aeris-editor-padding);inset-inline-start:var(--aeris-editor-padding);color:var(--aeris-text-muted);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);pointer-events:none}.aeris-editor-content__paragraph{margin:0 0 .65rem}.aeris-editor-content__paragraph:last-child{margin-bottom:0}.aeris-editor-content__heading{margin:0 0 .75rem;color:var(--aeris-text);font-size:1.3em;line-height:1.25}.aeris-editor-content__heading--h1{font-size:1.65em}.aeris-editor-content__heading--h2{font-size:1.35em}.aeris-editor-content__heading--h3{font-size:1.15em}.aeris-editor-content__heading--h4{font-size:1.05em}.aeris-editor-content__heading--h5{font-size:.95em}.aeris-editor-content__heading--h6{font-size:.85em;letter-spacing:.02em;text-transform:uppercase}.aeris-editor-content__quote{margin:0 0 .75rem;padding-inline-start:.875rem;border-inline-start:3px solid var(--aeris-primary);color:var(--aeris-text-muted)}.aeris-editor-content__unordered-list,.aeris-editor-content__ordered-list{margin:0 0 .75rem;padding-inline-start:1.35rem}.aeris-editor-content__nested-list-item{list-style-type:none}.aeris-editor-content__check-list{margin:0 0 .75rem;padding-inline-start:0;list-style:none}.aeris-editor-content__list-item--checked,.aeris-editor-content__list-item--unchecked{position:relative;padding-inline-start:1.75rem;list-style:none}.aeris-editor-content__list-item--checked:before,.aeris-editor-content__list-item--unchecked:before{position:absolute;inset-block-start:.26em;inset-inline-start:0;width:1rem;height:1rem;border:1px solid var(--aeris-border-strong, var(--aeris-border));border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface);content:\"\"}.aeris-editor-content__list-item--checked:before{border-color:var(--aeris-primary);background:var(--aeris-primary)}.aeris-editor-content__list-item--checked:after{position:absolute;inset-block-start:.43em;inset-inline-start:.27rem;width:.45rem;height:.24rem;border-block-end:2px solid var(--aeris-primary-contrast, white);border-inline-start:2px solid var(--aeris-primary-contrast, white);content:\"\";transform:rotate(-45deg)}.aeris-editor-content__list-item--checked{color:var(--aeris-text-muted);text-decoration:line-through}.aeris-editor-content__bold{font-weight:700}.aeris-editor-content__italic{font-style:italic}.aeris-editor-content__underline{text-decoration:underline;text-underline-offset:.14em}.aeris-editor-content__strikethrough{text-decoration:line-through}.aeris-editor-content__code{padding:.12em .32em;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface-2);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em}.aeris-editor-content__highlight{border-radius:.18em;background:color-mix(in srgb,var(--aeris-warning, #c38600) 28%,transparent)}.aeris-editor-content__lowercase{text-transform:lowercase}.aeris-editor-content__uppercase{text-transform:uppercase}.aeris-editor-content__capitalize{text-transform:capitalize}.aeris-editor-content__subscript,.aeris-editor-content__superscript{font-size:.75em;line-height:0}.aeris-editor-content__subscript{vertical-align:sub}.aeris-editor-content__superscript{vertical-align:super}@media(prefers-reduced-motion:reduce){.aeris-editor,.aeris-editor__toolbar button{transition:none}}\n"] }]
1540
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedby", required: false }] }], toolbarAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolbarAriaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], formats: [{ type: i0.Input, args: [{ isSignal: true, alias: "formats", required: false }] }], namespace: [{ type: i0.Input, args: [{ isSignal: true, alias: "namespace", required: false }] }], lexicalTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "lexicalTheme", required: false }] }], htmlConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "htmlConfig", required: false }] }], extensions: [{ type: i0.Input, args: [{ isSignal: true, alias: "extensions", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], showToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToolbar", required: false }] }], valueInput: [{ type: i0.Output, args: ["valueInput"] }], changed: [{ type: i0.Output, args: ["changed"] }], focused: [{ type: i0.Output, args: ["focused"] }], blurred: [{ type: i0.Output, args: ["blurred"] }], touch: [{ type: i0.Output, args: ["touch"] }], ready: [{ type: i0.Output, args: ["ready"] }], editorRoot: [{ type: i0.ViewChild, args: ['editorRoot', { isSignal: true }] }] } });
2336
+ `,
2337
+ encapsulation: ViewEncapsulation.None,
2338
+ providers: [{
2339
+ provide: NG_VALUE_ACCESSOR,
2340
+ useExisting: forwardRef(() => AerisEditorComponent),
2341
+ multi: true
2342
+ }],
2343
+ host: { "[attr.data-fluid]": "fluid() || null" },
2344
+ styles: [":host{display:inline-block;color:var(--aeris-text)}:host([data-fluid]){display:block;width:100%}.aeris-editor{--aeris-editor-padding: .875rem;--aeris-editor-font-size: var(--aeris-font-size-xl, .9375rem);--aeris-editor-line-height: 1.6;display:grid;overflow:hidden;width:min(100%,44rem);border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-structured-control, var(--aeris-radius-control, var(--aeris-radius-md, .5625rem)));background:var(--aeris-surface);box-shadow:var(--aeris-shadow-xs, 0 1px 2px rgba(0, 0, 0, .1));transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),background var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-editor[data-fluid]{width:100%}.aeris-editor[data-size=sm]{--aeris-editor-padding: .75rem;--aeris-editor-font-size: var(--aeris-font-size-lg, .875rem)}.aeris-editor[data-size=lg]{--aeris-editor-padding: 1rem;--aeris-editor-font-size: var(--aeris-font-size-2xl, 1rem)}.aeris-editor[data-appearance=filled]{background:var(--aeris-surface-2)}.aeris-editor:focus-within{border-color:var(--aeris-control-focus-border, var(--aeris-focus));box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-focus-ring-color, var(--aeris-focus-ring-color, transparent))}.aeris-editor[data-invalid]{border-color:var(--aeris-control-invalid-border, var(--aeris-danger))}.aeris-editor[data-invalid]:focus-within{box-shadow:0 0 0 var(--aeris-focus-ring-width, 3px) var(--aeris-control-invalid-focus-ring-color, transparent)}.aeris-editor[data-disabled]{cursor:not-allowed;opacity:.62}.aeris-editor__toolbar{display:flex;flex-wrap:wrap;gap:.25rem;align-items:center;padding:.5rem;border-bottom:1px solid var(--aeris-border);background:color-mix(in srgb,var(--aeris-surface-2) 82%,transparent)}.aeris-editor__toolbar button{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--aeris-radius-item, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--aeris-text);font:inherit;font-size:var(--aeris-font-size-md, .8125rem);font-weight:var(--aeris-font-weight-bold, 700);cursor:pointer;transition:background var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-editor__toolbar button[aria-pressed=true]{background:var(--aeris-editor-toolbar-active-background, var(--aeris-primary));color:var(--aeris-editor-toolbar-active-color, var(--aeris-on-primary))}@media(hover:hover){.aeris-editor__toolbar button:hover:not(:disabled):not([aria-pressed=true]){background:var(--aeris-interactive-hover, var(--aeris-surface-3));color:var(--aeris-text)}}.aeris-editor__toolbar button:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus);outline-offset:var(--aeris-focus-ring-offset, 2px)}.aeris-editor__toolbar button:disabled{cursor:not-allowed;opacity:.45}.aeris-editor__toolbar svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}:dir(rtl) .aeris-editor__logical-icon{transform:scaleX(-1)}.aeris-editor__separator{width:1px;height:1.5rem;margin-inline:.125rem;background:var(--aeris-border)}.aeris-editor__content-shell{position:relative;display:grid}.aeris-editor__content{position:relative;z-index:1;min-width:0;padding:var(--aeris-editor-padding);color:var(--aeris-text);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);outline:0;overflow-wrap:anywhere}.aeris-editor__content[contenteditable=false]{cursor:default}.aeris-editor__placeholder{position:absolute;inset-block-start:var(--aeris-editor-padding);inset-inline-start:var(--aeris-editor-padding);color:var(--aeris-text-muted);font-size:var(--aeris-editor-font-size);line-height:var(--aeris-editor-line-height);pointer-events:none}.aeris-editor-content__paragraph{margin:0 0 .65rem}.aeris-editor-content__paragraph:last-child{margin-bottom:0}.aeris-editor-content__heading{margin:0 0 .75rem;color:var(--aeris-text);font-size:1.3em;line-height:var(--aeris-line-height-tight, 1.25)}.aeris-editor-content__heading--h1{font-size:1.65em}.aeris-editor-content__heading--h2{font-size:1.35em}.aeris-editor-content__heading--h3{font-size:1.15em}.aeris-editor-content__heading--h4{font-size:1.05em}.aeris-editor-content__heading--h5{font-size:.95em}.aeris-editor-content__heading--h6{font-size:.85em;letter-spacing:.02em;text-transform:uppercase}.aeris-editor-content__quote{margin:0 0 .75rem;padding:.75rem .875rem;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .4375rem));background:var(--aeris-surface-2);color:var(--aeris-text-muted)}.aeris-editor-content__unordered-list,.aeris-editor-content__ordered-list{margin:0 0 .75rem;padding-inline-start:1.35rem}.aeris-editor-content__nested-list-item{list-style-type:none}.aeris-editor-content__check-list{margin:0 0 .75rem;padding-inline-start:0;list-style:none}.aeris-editor-content__list-item--checked,.aeris-editor-content__list-item--unchecked{position:relative;padding-inline-start:1.75rem;list-style:none}.aeris-editor-content__list-item--checked:before,.aeris-editor-content__list-item--unchecked:before{position:absolute;inset-block-start:.26em;inset-inline-start:0;width:1rem;height:1rem;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface);content:\"\"}.aeris-editor-content__list-item--checked:before{border-color:var(--aeris-primary);background:var(--aeris-primary)}.aeris-editor-content__list-item--checked:after{position:absolute;inset-block-start:.43em;inset-inline-start:.27rem;width:.45rem;height:.24rem;border-block-end:2px solid var(--aeris-primary-contrast, white);border-inline-start:2px solid var(--aeris-primary-contrast, white);content:\"\";transform:rotate(-45deg)}.aeris-editor-content__list-item--checked{color:var(--aeris-text-muted);text-decoration:line-through}.aeris-editor-content__bold{font-weight:var(--aeris-font-weight-bold, 700)}.aeris-editor-content__italic{font-style:italic}.aeris-editor-content__underline{text-decoration:underline;text-underline-offset:.14em}.aeris-editor-content__strikethrough{text-decoration:line-through}.aeris-editor-content__code{padding:.12em .32em;border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-xs, .25rem);background:var(--aeris-surface-2);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em}.aeris-editor-content__highlight{border-radius:.18em;background:color-mix(in srgb,var(--aeris-warning, #c38600) 28%,transparent)}.aeris-editor-content__lowercase{text-transform:lowercase}.aeris-editor-content__uppercase{text-transform:uppercase}.aeris-editor-content__capitalize{text-transform:capitalize}.aeris-editor-content__subscript,.aeris-editor-content__superscript{font-size:.75em;line-height:0}.aeris-editor-content__subscript{vertical-align:sub}.aeris-editor-content__superscript{vertical-align:super}@media(prefers-reduced-motion:reduce){.aeris-editor,.aeris-editor__toolbar button{transition:none}}@media(pointer:coarse){input:not([type=checkbox]):not([type=radio]),textarea{font-size:var(--aeris-mobile-input-font-size, 1rem)}}\n"]
2345
+ }]
2346
+ }],
2347
+ ctorParameters: () => [],
2348
+ propDecorators: {
2349
+ toolbarIcons: [{
2350
+ type: i0.Input,
2351
+ args: [{
2352
+ isSignal: true,
2353
+ alias: "toolbarIcons",
2354
+ required: false
2355
+ }]
2356
+ }],
2357
+ value: [{
2358
+ type: i0.Input,
2359
+ args: [{
2360
+ isSignal: true,
2361
+ alias: "value",
2362
+ required: false
2363
+ }]
2364
+ }, {
2365
+ type: i0.Output,
2366
+ args: ["valueChange"]
2367
+ }],
2368
+ inputId: [{
2369
+ type: i0.Input,
2370
+ args: [{
2371
+ isSignal: true,
2372
+ alias: "inputId",
2373
+ required: false
2374
+ }]
2375
+ }],
2376
+ name: [{
2377
+ type: i0.Input,
2378
+ args: [{
2379
+ isSignal: true,
2380
+ alias: "name",
2381
+ required: false
2382
+ }]
2383
+ }],
2384
+ placeholder: [{
2385
+ type: i0.Input,
2386
+ args: [{
2387
+ isSignal: true,
2388
+ alias: "placeholder",
2389
+ required: false
2390
+ }]
2391
+ }],
2392
+ ariaLabel: [{
2393
+ type: i0.Input,
2394
+ args: [{
2395
+ isSignal: true,
2396
+ alias: "ariaLabel",
2397
+ required: false
2398
+ }]
2399
+ }],
2400
+ ariaLabelledBy: [{
2401
+ type: i0.Input,
2402
+ args: [{
2403
+ isSignal: true,
2404
+ alias: "ariaLabelledBy",
2405
+ required: false
2406
+ }]
2407
+ }],
2408
+ ariaDescribedBy: [{
2409
+ type: i0.Input,
2410
+ args: [{
2411
+ isSignal: true,
2412
+ alias: "ariaDescribedBy",
2413
+ required: false
2414
+ }]
2415
+ }],
2416
+ toolbarAriaLabel: [{
2417
+ type: i0.Input,
2418
+ args: [{
2419
+ isSignal: true,
2420
+ alias: "toolbarAriaLabel",
2421
+ required: false
2422
+ }]
2423
+ }],
2424
+ size: [{
2425
+ type: i0.Input,
2426
+ args: [{
2427
+ isSignal: true,
2428
+ alias: "size",
2429
+ required: false
2430
+ }]
2431
+ }],
2432
+ appearance: [{
2433
+ type: i0.Input,
2434
+ args: [{
2435
+ isSignal: true,
2436
+ alias: "appearance",
2437
+ required: false
2438
+ }]
2439
+ }],
2440
+ minHeight: [{
2441
+ type: i0.Input,
2442
+ args: [{
2443
+ isSignal: true,
2444
+ alias: "minHeight",
2445
+ required: false
2446
+ }]
2447
+ }],
2448
+ formats: [{
2449
+ type: i0.Input,
2450
+ args: [{
2451
+ isSignal: true,
2452
+ alias: "formats",
2453
+ required: false
2454
+ }]
2455
+ }],
2456
+ namespace: [{
2457
+ type: i0.Input,
2458
+ args: [{
2459
+ isSignal: true,
2460
+ alias: "namespace",
2461
+ required: false
2462
+ }]
2463
+ }],
2464
+ lexicalTheme: [{
2465
+ type: i0.Input,
2466
+ args: [{
2467
+ isSignal: true,
2468
+ alias: "lexicalTheme",
2469
+ required: false
2470
+ }]
2471
+ }],
2472
+ htmlConfig: [{
2473
+ type: i0.Input,
2474
+ args: [{
2475
+ isSignal: true,
2476
+ alias: "htmlConfig",
2477
+ required: false
2478
+ }]
2479
+ }],
2480
+ extensions: [{
2481
+ type: i0.Input,
2482
+ args: [{
2483
+ isSignal: true,
2484
+ alias: "extensions",
2485
+ required: false
2486
+ }]
2487
+ }],
2488
+ disabled: [{
2489
+ type: i0.Input,
2490
+ args: [{
2491
+ isSignal: true,
2492
+ alias: "disabled",
2493
+ required: false
2494
+ }]
2495
+ }],
2496
+ readonly: [{
2497
+ type: i0.Input,
2498
+ args: [{
2499
+ isSignal: true,
2500
+ alias: "readonly",
2501
+ required: false
2502
+ }]
2503
+ }],
2504
+ required: [{
2505
+ type: i0.Input,
2506
+ args: [{
2507
+ isSignal: true,
2508
+ alias: "required",
2509
+ required: false
2510
+ }]
2511
+ }],
2512
+ invalid: [{
2513
+ type: i0.Input,
2514
+ args: [{
2515
+ isSignal: true,
2516
+ alias: "invalid",
2517
+ required: false
2518
+ }]
2519
+ }],
2520
+ touched: [{
2521
+ type: i0.Input,
2522
+ args: [{
2523
+ isSignal: true,
2524
+ alias: "touched",
2525
+ required: false
2526
+ }]
2527
+ }],
2528
+ fluid: [{
2529
+ type: i0.Input,
2530
+ args: [{
2531
+ isSignal: true,
2532
+ alias: "fluid",
2533
+ required: false
2534
+ }]
2535
+ }],
2536
+ showToolbar: [{
2537
+ type: i0.Input,
2538
+ args: [{
2539
+ isSignal: true,
2540
+ alias: "showToolbar",
2541
+ required: false
2542
+ }]
2543
+ }],
2544
+ changed: [{
2545
+ type: i0.Output,
2546
+ args: ["changed"]
2547
+ }],
2548
+ focused: [{
2549
+ type: i0.Output,
2550
+ args: ["focused"]
2551
+ }],
2552
+ blurred: [{
2553
+ type: i0.Output,
2554
+ args: ["blurred"]
2555
+ }],
2556
+ touch: [{
2557
+ type: i0.Output,
2558
+ args: ["touch"]
2559
+ }],
2560
+ ready: [{
2561
+ type: i0.Output,
2562
+ args: ["ready"]
2563
+ }],
2564
+ editorRoot: [{
2565
+ type: i0.ViewChild,
2566
+ args: ["editorRoot", { isSignal: true }]
2567
+ }]
2568
+ }
2569
+ });
1541
2570
  const AerisEditor = [AerisEditorComponent];
1542
-
1543
- /**
1544
- * Generated bundle index. Do not edit.
1545
- */
1546
-
1547
2571
  export { AERIS_EDITOR_ALL_FORMATS, AERIS_EDITOR_DEFAULT_FORMATS, AerisEditor, AerisEditorComponent };
1548
- //# sourceMappingURL=aeris-ui-core-editor.mjs.map
2572
+
2573
+ //# sourceMappingURL=aeris-ui-core-editor.mjs.map