@caribeng/ui 22.1.1 → 22.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/README.md +134 -12
  2. package/fesm2022/caribeng-ui-accordion.mjs +4 -4
  3. package/fesm2022/caribeng-ui-anchor.mjs +169 -0
  4. package/fesm2022/caribeng-ui-autocomplete.mjs +10 -8
  5. package/fesm2022/caribeng-ui-avatar.mjs +2 -2
  6. package/fesm2022/caribeng-ui-avatargroup.mjs +9 -3
  7. package/fesm2022/caribeng-ui-badge.mjs +8 -2
  8. package/fesm2022/caribeng-ui-blockui.mjs +12 -4
  9. package/fesm2022/caribeng-ui-breadcrumb.mjs +17 -7
  10. package/fesm2022/caribeng-ui-button.mjs +22 -2
  11. package/fesm2022/caribeng-ui-caribe-alert.mjs +5 -2
  12. package/fesm2022/caribeng-ui-caribe-animation-lottie.mjs +6 -3
  13. package/fesm2022/caribeng-ui-caribe-button-group.mjs +6 -3
  14. package/fesm2022/caribeng-ui-caribe-calendar.mjs +11 -6
  15. package/fesm2022/caribeng-ui-caribe-card-content.mjs +6 -3
  16. package/fesm2022/caribeng-ui-caribe-card-move.mjs +29 -7
  17. package/fesm2022/caribeng-ui-caribe-card-select.mjs +56 -14
  18. package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +10 -7
  19. package/fesm2022/caribeng-ui-caribe-coachmark.mjs +42 -19
  20. package/fesm2022/caribeng-ui-caribe-data-table.mjs +15 -9
  21. package/fesm2022/caribeng-ui-caribe-dots-indicator.mjs +38 -5
  22. package/fesm2022/caribeng-ui-caribe-expansion-panel.mjs +16 -5
  23. package/fesm2022/caribeng-ui-caribe-fab-menu.mjs +56 -7
  24. package/fesm2022/caribeng-ui-caribe-file-download.mjs +68 -27
  25. package/fesm2022/caribeng-ui-caribe-file-select.mjs +22 -17
  26. package/fesm2022/caribeng-ui-caribe-float-menu.mjs +6 -3
  27. package/fesm2022/caribeng-ui-caribe-footer.mjs +8 -4
  28. package/fesm2022/caribeng-ui-caribe-header.mjs +6 -3
  29. package/fesm2022/caribeng-ui-caribe-icon-button.mjs +6 -3
  30. package/fesm2022/caribeng-ui-caribe-illustration.mjs +6 -3
  31. package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +5 -2
  32. package/fesm2022/caribeng-ui-caribe-input-search.mjs +14 -10
  33. package/fesm2022/caribeng-ui-caribe-input-select.mjs +12 -10
  34. package/fesm2022/caribeng-ui-caribe-input-token.mjs +61 -11
  35. package/fesm2022/caribeng-ui-caribe-link.mjs +7 -2
  36. package/fesm2022/caribeng-ui-caribe-loader.mjs +8 -5
  37. package/fesm2022/caribeng-ui-caribe-modal.mjs +32 -16
  38. package/fesm2022/caribeng-ui-caribe-off-canvas.mjs +26 -12
  39. package/fesm2022/caribeng-ui-caribe-onboarding.mjs +44 -19
  40. package/fesm2022/caribeng-ui-caribe-pictogram.mjs +6 -3
  41. package/fesm2022/caribeng-ui-caribe-pop-over.mjs +34 -10
  42. package/fesm2022/caribeng-ui-caribe-preloader.mjs +9 -6
  43. package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +5 -2
  44. package/fesm2022/caribeng-ui-caribe-shortcut.mjs +8 -3
  45. package/fesm2022/caribeng-ui-caribe-step-indicator.mjs +12 -5
  46. package/fesm2022/caribeng-ui-caribe-stroke.mjs +6 -3
  47. package/fesm2022/caribeng-ui-caribe-switch.mjs +5 -3
  48. package/fesm2022/caribeng-ui-caribe-tag-button.mjs +1 -1
  49. package/fesm2022/caribeng-ui-caribe-tracker.mjs +5 -2
  50. package/fesm2022/caribeng-ui-caribe-transaction-status.mjs +1 -1
  51. package/fesm2022/caribeng-ui-caribe-voucher.mjs +11 -8
  52. package/fesm2022/caribeng-ui-carousel.mjs +49 -14
  53. package/fesm2022/caribeng-ui-cascadeselect.mjs +22 -8
  54. package/fesm2022/caribeng-ui-chart.mjs +2601 -303
  55. package/fesm2022/caribeng-ui-chat.mjs +1303 -0
  56. package/fesm2022/caribeng-ui-chip.mjs +9 -4
  57. package/fesm2022/caribeng-ui-chips.mjs +9 -5
  58. package/fesm2022/caribeng-ui-code-block.mjs +332 -0
  59. package/fesm2022/caribeng-ui-colorpicker.mjs +107 -11
  60. package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
  61. package/fesm2022/caribeng-ui-confirmdialog.mjs +140 -10
  62. package/fesm2022/caribeng-ui-confirmpopup.mjs +209 -9
  63. package/fesm2022/caribeng-ui-contextmenu.mjs +13 -6
  64. package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
  65. package/fesm2022/caribeng-ui-dataview.mjs +214 -6
  66. package/fesm2022/caribeng-ui-datepicker.mjs +1630 -393
  67. package/fesm2022/caribeng-ui-descriptions.mjs +124 -0
  68. package/fesm2022/caribeng-ui-dialog.mjs +10 -7
  69. package/fesm2022/caribeng-ui-dock.mjs +58 -15
  70. package/fesm2022/caribeng-ui-drawer.mjs +17 -9
  71. package/fesm2022/caribeng-ui-dynamicdialog.mjs +210 -6
  72. package/fesm2022/caribeng-ui-editor.mjs +4413 -243
  73. package/fesm2022/caribeng-ui-empty.mjs +80 -0
  74. package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
  75. package/fesm2022/caribeng-ui-file-card.mjs +136 -19
  76. package/fesm2022/caribeng-ui-fileupload.mjs +96 -19
  77. package/fesm2022/caribeng-ui-floatlabel.mjs +4 -2
  78. package/fesm2022/caribeng-ui-folder-card.mjs +132 -15
  79. package/fesm2022/caribeng-ui-galleria.mjs +76 -45
  80. package/fesm2022/caribeng-ui-image.mjs +52 -29
  81. package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
  82. package/fesm2022/caribeng-ui-inplace.mjs +22 -6
  83. package/fesm2022/caribeng-ui-input-number.mjs +9 -7
  84. package/fesm2022/caribeng-ui-inputgroup.mjs +2 -2
  85. package/fesm2022/caribeng-ui-inputmask.mjs +22 -13
  86. package/fesm2022/caribeng-ui-inputotp.mjs +12 -6
  87. package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
  88. package/fesm2022/caribeng-ui-kbd.mjs +122 -0
  89. package/fesm2022/caribeng-ui-keyfilter.mjs +72 -0
  90. package/fesm2022/caribeng-ui-listbox.mjs +13 -11
  91. package/fesm2022/caribeng-ui-megamenu.mjs +228 -32
  92. package/fesm2022/caribeng-ui-mentions.mjs +495 -0
  93. package/fesm2022/caribeng-ui-menu.mjs +18 -8
  94. package/fesm2022/caribeng-ui-menubar.mjs +17 -8
  95. package/fesm2022/caribeng-ui-message.mjs +13 -7
  96. package/fesm2022/caribeng-ui-metergroup.mjs +29 -11
  97. package/fesm2022/caribeng-ui-multiselect.mjs +399 -97
  98. package/fesm2022/caribeng-ui-orderlist.mjs +230 -11
  99. package/fesm2022/caribeng-ui-organizationchart.mjs +16 -15
  100. package/fesm2022/caribeng-ui-paginator.mjs +18 -15
  101. package/fesm2022/caribeng-ui-panel.mjs +11 -8
  102. package/fesm2022/caribeng-ui-panelmenu.mjs +14 -8
  103. package/fesm2022/caribeng-ui-password.mjs +8 -6
  104. package/fesm2022/caribeng-ui-pdfviewer.mjs +1553 -0
  105. package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
  106. package/fesm2022/caribeng-ui-picklist.mjs +251 -14
  107. package/fesm2022/caribeng-ui-pricing.mjs +272 -75
  108. package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
  109. package/fesm2022/caribeng-ui-rating.mjs +7 -3
  110. package/fesm2022/caribeng-ui-repeater.mjs +223 -0
  111. package/fesm2022/caribeng-ui-result.mjs +91 -0
  112. package/fesm2022/caribeng-ui-ripple.mjs +2 -0
  113. package/fesm2022/caribeng-ui-scrollpanel.mjs +6 -3
  114. package/fesm2022/caribeng-ui-scrolltop.mjs +9 -4
  115. package/fesm2022/caribeng-ui-select.mjs +379 -87
  116. package/fesm2022/caribeng-ui-selectbutton.mjs +2 -2
  117. package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
  118. package/fesm2022/caribeng-ui-slider.mjs +171 -75
  119. package/fesm2022/caribeng-ui-speeddial.mjs +7 -4
  120. package/fesm2022/caribeng-ui-spinner.mjs +5 -2
  121. package/fesm2022/caribeng-ui-splitbutton.mjs +163 -0
  122. package/fesm2022/caribeng-ui-splitter.mjs +5 -2
  123. package/fesm2022/caribeng-ui-statistic.mjs +183 -0
  124. package/fesm2022/caribeng-ui-stepper.mjs +17 -7
  125. package/fesm2022/caribeng-ui-steps.mjs +6 -3
  126. package/fesm2022/caribeng-ui-table.mjs +716 -84
  127. package/fesm2022/caribeng-ui-tabmenu.mjs +13 -6
  128. package/fesm2022/caribeng-ui-tag.mjs +2 -2
  129. package/fesm2022/caribeng-ui-terminal.mjs +45 -9
  130. package/fesm2022/caribeng-ui-themetoggle.mjs +82 -0
  131. package/fesm2022/caribeng-ui-tieredmenu.mjs +113 -20
  132. package/fesm2022/caribeng-ui-timeline.mjs +175 -6
  133. package/fesm2022/caribeng-ui-toast.mjs +7 -4
  134. package/fesm2022/caribeng-ui-togglebutton.mjs +8 -6
  135. package/fesm2022/caribeng-ui-toolbar.mjs +6 -3
  136. package/fesm2022/caribeng-ui-tree.mjs +302 -6
  137. package/fesm2022/caribeng-ui-treeselect.mjs +26 -10
  138. package/fesm2022/caribeng-ui-treetable.mjs +269 -6
  139. package/fesm2022/caribeng-ui-virtualscroller.mjs +123 -10
  140. package/fesm2022/caribeng-ui.mjs +1216 -6
  141. package/package.json +93 -3
  142. package/schematics/collection.json +15 -0
  143. package/schematics/migrate-from-primeng/core-icons.json +1 -0
  144. package/schematics/migrate-from-primeng/icons.js +269 -0
  145. package/schematics/migrate-from-primeng/index.js +290 -0
  146. package/schematics/migrate-from-primeng/mappings/button.js +93 -0
  147. package/schematics/migrate-from-primeng/mappings/card.js +33 -0
  148. package/schematics/migrate-from-primeng/mappings/checkbox.js +44 -0
  149. package/schematics/migrate-from-primeng/mappings/confirm.js +221 -0
  150. package/schematics/migrate-from-primeng/mappings/datepicker.js +121 -0
  151. package/schematics/migrate-from-primeng/mappings/dialog.js +84 -0
  152. package/schematics/migrate-from-primeng/mappings/index.js +88 -0
  153. package/schematics/migrate-from-primeng/mappings/inputnumber.js +62 -0
  154. package/schematics/migrate-from-primeng/mappings/inputtext.js +60 -0
  155. package/schematics/migrate-from-primeng/mappings/menu.js +468 -0
  156. package/schematics/migrate-from-primeng/mappings/multiselect.js +49 -0
  157. package/schematics/migrate-from-primeng/mappings/radiobutton.js +22 -0
  158. package/schematics/migrate-from-primeng/mappings/rules.js +206 -0
  159. package/schematics/migrate-from-primeng/mappings/select.js +97 -0
  160. package/schematics/migrate-from-primeng/mappings/service-calls.js +100 -0
  161. package/schematics/migrate-from-primeng/mappings/table.js +613 -0
  162. package/schematics/migrate-from-primeng/mappings/tabs.js +225 -0
  163. package/schematics/migrate-from-primeng/mappings/tag.js +29 -0
  164. package/schematics/migrate-from-primeng/mappings/textarea.js +44 -0
  165. package/schematics/migrate-from-primeng/mappings/toast.js +173 -0
  166. package/schematics/migrate-from-primeng/mappings/toggleswitch.js +37 -0
  167. package/schematics/migrate-from-primeng/mappings/tooltip.js +44 -0
  168. package/schematics/migrate-from-primeng/mappings/types.js +10 -0
  169. package/schematics/migrate-from-primeng/report.js +79 -0
  170. package/schematics/migrate-from-primeng/schema.js +2 -0
  171. package/schematics/migrate-from-primeng/schema.json +34 -0
  172. package/schematics/migrate-from-primeng/template.js +387 -0
  173. package/schematics/migrate-from-primeng/todo.js +5 -0
  174. package/schematics/migrate-from-primeng/typescript.js +442 -0
  175. package/schematics/migrate-from-primeng/workspace.js +117 -0
  176. package/schematics/ng-add/index.js +140 -0
  177. package/schematics/ng-add/schema.js +2 -0
  178. package/schematics/ng-add/schema.json +66 -0
  179. package/types/caribeng-ui-anchor.d.ts +50 -0
  180. package/types/caribeng-ui-autocomplete.d.ts +4 -2
  181. package/types/caribeng-ui-avatargroup.d.ts +3 -1
  182. package/types/caribeng-ui-badge.d.ts +3 -1
  183. package/types/caribeng-ui-blockui.d.ts +9 -4
  184. package/types/caribeng-ui-breadcrumb.d.ts +11 -0
  185. package/types/caribeng-ui-button.d.ts +9 -1
  186. package/types/caribeng-ui-caribe-alert.d.ts +3 -0
  187. package/types/caribeng-ui-caribe-animation-lottie.d.ts +4 -1
  188. package/types/caribeng-ui-caribe-button-group.d.ts +4 -1
  189. package/types/caribeng-ui-caribe-calendar.d.ts +5 -1
  190. package/types/caribeng-ui-caribe-card-content.d.ts +4 -1
  191. package/types/caribeng-ui-caribe-card-move.d.ts +13 -13
  192. package/types/caribeng-ui-caribe-card-select.d.ts +10 -1
  193. package/types/caribeng-ui-caribe-circle-loading.d.ts +4 -1
  194. package/types/caribeng-ui-caribe-coachmark.d.ts +6 -0
  195. package/types/caribeng-ui-caribe-data-table.d.ts +7 -2
  196. package/types/caribeng-ui-caribe-dots-indicator.d.ts +9 -0
  197. package/types/caribeng-ui-caribe-expansion-panel.d.ts +7 -10
  198. package/types/caribeng-ui-caribe-fab-menu.d.ts +10 -1
  199. package/types/caribeng-ui-caribe-file-download.d.ts +8 -10
  200. package/types/caribeng-ui-caribe-file-select.d.ts +7 -1
  201. package/types/caribeng-ui-caribe-float-menu.d.ts +4 -1
  202. package/types/caribeng-ui-caribe-header.d.ts +3 -0
  203. package/types/caribeng-ui-caribe-icon-button.d.ts +4 -1
  204. package/types/caribeng-ui-caribe-illustration.d.ts +4 -1
  205. package/types/caribeng-ui-caribe-inline-alert.d.ts +3 -0
  206. package/types/caribeng-ui-caribe-input-search.d.ts +4 -2
  207. package/types/caribeng-ui-caribe-input-select.d.ts +4 -2
  208. package/types/caribeng-ui-caribe-input-token.d.ts +16 -1
  209. package/types/caribeng-ui-caribe-link.d.ts +3 -0
  210. package/types/caribeng-ui-caribe-loader.d.ts +4 -1
  211. package/types/caribeng-ui-caribe-modal.d.ts +7 -10
  212. package/types/caribeng-ui-caribe-off-canvas.d.ts +6 -1
  213. package/types/caribeng-ui-caribe-onboarding.d.ts +6 -0
  214. package/types/caribeng-ui-caribe-pictogram.d.ts +4 -1
  215. package/types/caribeng-ui-caribe-pop-over.d.ts +7 -10
  216. package/types/caribeng-ui-caribe-preloader.d.ts +4 -1
  217. package/types/caribeng-ui-caribe-progress-bar.d.ts +3 -0
  218. package/types/caribeng-ui-caribe-shortcut.d.ts +3 -1
  219. package/types/caribeng-ui-caribe-step-indicator.d.ts +6 -0
  220. package/types/caribeng-ui-caribe-stroke.d.ts +4 -1
  221. package/types/caribeng-ui-caribe-switch.d.ts +3 -1
  222. package/types/caribeng-ui-caribe-tracker.d.ts +3 -0
  223. package/types/caribeng-ui-caribe-voucher.d.ts +5 -2
  224. package/types/caribeng-ui-carousel.d.ts +10 -1
  225. package/types/caribeng-ui-cascadeselect.d.ts +7 -2
  226. package/types/caribeng-ui-chart.d.ts +471 -44
  227. package/types/caribeng-ui-chat.d.ts +299 -0
  228. package/types/caribeng-ui-chip.d.ts +6 -0
  229. package/types/caribeng-ui-chips.d.ts +6 -2
  230. package/types/caribeng-ui-code-block.d.ts +65 -0
  231. package/types/caribeng-ui-colorpicker.d.ts +8 -2
  232. package/types/caribeng-ui-command-palette.d.ts +133 -0
  233. package/types/caribeng-ui-confirmdialog.d.ts +57 -6
  234. package/types/caribeng-ui-confirmpopup.d.ts +74 -5
  235. package/types/caribeng-ui-contextmenu.d.ts +11 -1
  236. package/types/caribeng-ui-copy-button.d.ts +90 -0
  237. package/types/caribeng-ui-dataview.d.ts +65 -5
  238. package/types/caribeng-ui-datepicker.d.ts +186 -21
  239. package/types/caribeng-ui-descriptions.d.ts +63 -0
  240. package/types/caribeng-ui-dialog.d.ts +4 -1
  241. package/types/caribeng-ui-dock.d.ts +17 -2
  242. package/types/caribeng-ui-drawer.d.ts +7 -2
  243. package/types/caribeng-ui-dynamicdialog.d.ts +93 -3
  244. package/types/caribeng-ui-editor.d.ts +486 -13
  245. package/types/caribeng-ui-empty.d.ts +34 -0
  246. package/types/caribeng-ui-file-card.d.ts +28 -3
  247. package/types/caribeng-ui-fileupload.d.ts +27 -4
  248. package/types/caribeng-ui-folder-card.d.ts +31 -6
  249. package/types/caribeng-ui-galleria.d.ts +9 -0
  250. package/types/caribeng-ui-image.d.ts +10 -0
  251. package/types/caribeng-ui-inplace.d.ts +8 -0
  252. package/types/caribeng-ui-input-number.d.ts +3 -1
  253. package/types/caribeng-ui-inputmask.d.ts +8 -1
  254. package/types/caribeng-ui-inputotp.d.ts +7 -2
  255. package/types/caribeng-ui-kanban.d.ts +783 -0
  256. package/types/caribeng-ui-kbd.d.ts +36 -0
  257. package/types/caribeng-ui-keyfilter.d.ts +30 -0
  258. package/types/caribeng-ui-listbox.d.ts +5 -3
  259. package/types/caribeng-ui-megamenu.d.ts +37 -2
  260. package/types/caribeng-ui-mentions.d.ts +127 -0
  261. package/types/caribeng-ui-menu.d.ts +14 -2
  262. package/types/caribeng-ui-menubar.d.ts +12 -1
  263. package/types/caribeng-ui-message.d.ts +5 -0
  264. package/types/caribeng-ui-metergroup.d.ts +9 -1
  265. package/types/caribeng-ui-multiselect.d.ts +71 -10
  266. package/types/caribeng-ui-orderlist.d.ts +58 -6
  267. package/types/caribeng-ui-organizationchart.d.ts +7 -1
  268. package/types/caribeng-ui-paginator.d.ts +3 -0
  269. package/types/caribeng-ui-panel.d.ts +3 -0
  270. package/types/caribeng-ui-panelmenu.d.ts +11 -1
  271. package/types/caribeng-ui-password.d.ts +4 -2
  272. package/types/caribeng-ui-pdfviewer.d.ts +258 -0
  273. package/types/caribeng-ui-phone-input.d.ts +168 -0
  274. package/types/caribeng-ui-picklist.d.ts +67 -7
  275. package/types/caribeng-ui-pricing.d.ts +49 -9
  276. package/types/caribeng-ui-qrcode.d.ts +88 -0
  277. package/types/caribeng-ui-rating.d.ts +6 -2
  278. package/types/caribeng-ui-repeater.d.ts +79 -0
  279. package/types/caribeng-ui-result.d.ts +35 -0
  280. package/types/caribeng-ui-scrollpanel.d.ts +4 -1
  281. package/types/caribeng-ui-scrolltop.d.ts +4 -1
  282. package/types/caribeng-ui-select.d.ts +73 -9
  283. package/types/caribeng-ui-sidebar.d.ts +167 -0
  284. package/types/caribeng-ui-slider.d.ts +63 -10
  285. package/types/caribeng-ui-speeddial.d.ts +5 -2
  286. package/types/caribeng-ui-spinner.d.ts +3 -0
  287. package/types/caribeng-ui-splitbutton.d.ts +49 -0
  288. package/types/caribeng-ui-splitter.d.ts +3 -0
  289. package/types/caribeng-ui-statistic.d.ts +65 -0
  290. package/types/caribeng-ui-stepper.d.ts +5 -0
  291. package/types/caribeng-ui-steps.d.ts +4 -1
  292. package/types/caribeng-ui-table.d.ts +185 -17
  293. package/types/caribeng-ui-tabmenu.d.ts +11 -1
  294. package/types/caribeng-ui-terminal.d.ts +10 -0
  295. package/types/caribeng-ui-themetoggle.d.ts +32 -0
  296. package/types/caribeng-ui-tieredmenu.d.ts +22 -3
  297. package/types/caribeng-ui-timeline.d.ts +63 -4
  298. package/types/caribeng-ui-toast.d.ts +3 -0
  299. package/types/caribeng-ui-togglebutton.d.ts +5 -3
  300. package/types/caribeng-ui-toolbar.d.ts +7 -4
  301. package/types/caribeng-ui-tree.d.ts +76 -4
  302. package/types/caribeng-ui-treeselect.d.ts +10 -2
  303. package/types/caribeng-ui-treetable.d.ts +68 -4
  304. package/types/caribeng-ui-virtualscroller.d.ts +45 -5
  305. package/types/caribeng-ui.d.ts +775 -12
@@ -1,26 +1,333 @@
1
1
  import * as _caribeng_ui from '@caribeng/ui';
2
+ import { CbTranslation } from '@caribeng/ui';
2
3
  import * as _angular_core from '@angular/core';
3
4
  import { ControlValueAccessor } from '@angular/forms';
4
5
 
6
+ interface CbCharGroup {
7
+ label: (t: CbTranslation) => string;
8
+ chars: readonly string[];
9
+ }
10
+
11
+ /** Color de una paleta del editor: valor CSS y nombre traducido. */
12
+ interface CbEditorColor {
13
+ value: string;
14
+ label: (t: CbTranslation) => string;
15
+ }
16
+
17
+ /** Alineación de una imagen: `left`/`right` (flotante, el texto la rodea) o `center` (bloque centrado). */
18
+ type CbImageAlign = 'left' | 'center' | 'right';
19
+ /** Bordes de una tabla: todos, solo líneas horizontales o ninguno. */
20
+ type CbTableBorders = 'all' | 'horizontal' | 'none';
21
+ interface CbSanitizeOptions {
22
+ /** Permite imágenes (por defecto true). */
23
+ images?: boolean;
24
+ /**
25
+ * Tipografías permitidas (pilas CSS, p. ej. `"'Open Sans', sans-serif"`). Una tipografía
26
+ * se reconoce por su primer nombre; las demás se quitan. Por defecto, las del editor.
27
+ */
28
+ fonts?: readonly string[];
29
+ }
30
+ /** Devuelve el HTML saneado y normalizado; `''` si no hay texto ni imágenes. */
31
+ declare function cbSanitizeHtml(html: string | null | undefined, options?: CbSanitizeOptions): string;
32
+ /** Texto plano del HTML (para contar caracteres o guardar un resumen). */
33
+ declare function cbHtmlToText(html: string | null | undefined): string;
34
+
35
+ /** Recuadro de recorte en fracciones de la imagen (0–1). */
36
+ interface CbCropRect {
37
+ x: number;
38
+ y: number;
39
+ w: number;
40
+ h: number;
41
+ }
42
+
43
+ /** Una tipografía del selector: nombre visible y pila CSS que se guarda en el HTML (`''` = predeterminada). */
44
+ interface CbEditorFont {
45
+ name: string;
46
+ value: string;
47
+ }
48
+ /** Grupo del selector de tipografía (`<optgroup>`). */
49
+ interface CbEditorFontGroup {
50
+ label: string | ((t: CbTranslation) => string);
51
+ fonts: readonly CbEditorFont[];
52
+ }
5
53
  /**
6
- * Editor de CaribeNG: editor de texto enriquecido sin dependencias de terceros,
7
- * con barra de herramientas accesible (encabezados, formato, listas, cita,
8
- * alineación, enlaces, deshacer/rehacer) e integración CVA.
54
+ * Tipografías por defecto, todas libres (Google Fonts). Las "clásicas de Office" son
55
+ * métricamente compatibles con Arial, Times New Roman y Courier New, y Carlito con Calibri,
56
+ * así un documento conserva su maquetación.
57
+ */
58
+ declare const CB_EDITOR_FONTS: readonly CbEditorFontGroup[];
59
+ /** Hoja de Google Fonts con las tipografías por defecto (regular, negrita y sus cursivas). */
60
+ declare const CB_EDITOR_FONTS_HREF: string;
61
+
62
+ /** Herramientas de la barra; `'|'` es un separador y `'-'` empieza una fila nueva. */
63
+ type CbEditorTool = 'heading' | 'fontFamily' | 'fontSize' | 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'subscript' | 'superscript' | 'textColor' | 'highlight' | 'bulletList' | 'orderedList' | 'taskList' | 'indent' | 'outdent' | 'quote' | 'codeBlock' | 'alignment' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'link' | 'image' | 'table' | 'horizontalRule' | 'clear' | 'undo' | 'redo' | 'source' | 'fullscreen' | 'specialChars' | 'findReplace' | '|' | '-';
64
+ /**
65
+ * Barra por defecto, en dos filas: arriba el texto (bloque, fuente, tamaño, estilos y color);
66
+ * abajo la estructura (listas, alineación, inserciones, buscar y vistas).
67
+ */
68
+ declare const CB_EDITOR_DEFAULT_TOOLBAR: readonly CbEditorTool[];
69
+ /** Sube una imagen y devuelve su URL pública (p. ej. a tu servidor o a un bucket). */
70
+ type CbEditorImageUpload = (file: File) => Promise<string>;
71
+ /** Motivo por el que no se insertó una imagen. */
72
+ interface CbEditorImageError {
73
+ file: File;
74
+ reason: 'type' | 'size' | 'upload';
75
+ error?: unknown;
76
+ }
77
+ /** Bloques que se insertan escribiendo `/` (filtrables por nombre o por palabras clave). */
78
+ interface SlashItem {
79
+ id: string;
80
+ icon: string;
81
+ label: (t: CbTranslation) => string;
82
+ keywords: string;
83
+ }
84
+ interface EditorState {
85
+ bold: boolean;
86
+ italic: boolean;
87
+ underline: boolean;
88
+ strike: boolean;
89
+ code: boolean;
90
+ bulletList: boolean;
91
+ orderedList: boolean;
92
+ quote: boolean;
93
+ codeBlock: boolean;
94
+ subscript: boolean;
95
+ superscript: boolean;
96
+ taskList: boolean;
97
+ alignLeft: boolean;
98
+ alignCenter: boolean;
99
+ alignRight: boolean;
100
+ alignJustify: boolean;
101
+ link: boolean;
102
+ block: string;
103
+ fontSize: string;
104
+ fontFamily: string;
105
+ }
106
+ /**
107
+ * Editor de CaribeNG: editor de texto enriquecido sin dependencias de terceros.
108
+ *
109
+ * - **Valor**: HTML saneado y normalizado (lista blanca de etiquetas, sin scripts,
110
+ * eventos ni URLs peligrosas; igual en todos los navegadores; `''` si está vacío).
111
+ * El mismo saneado se aplica al cargar un valor y al pegar.
112
+ * - Barra configurable (`toolbar`) con estado activo, panel de enlaces con
113
+ * validación, imágenes con `imageUpload` (o data URL con límite de tamaño),
114
+ * pegado limpio desde Word y Google Docs, atajos de escritura (`# `, `* `,
115
+ * `1. `, `> `), contador con `maxLength`, vista de HTML y modo `readonly`.
116
+ * - Integración con Angular Forms (`ControlValueAccessor`).
117
+ *
118
+ * @example
119
+ * ```html
120
+ * <cb-editor formControlName="descripcion" [maxLength]="2000" [imageUpload]="subirImagen" />
121
+ * <cb-editor [value]="html" readonly />
122
+ * ```
9
123
  */
10
124
  declare class CbEditor implements ControlValueAccessor {
11
- readonly placeholder: _angular_core.InputSignal<string>;
125
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
126
+ protected readonly t: _angular_core.Signal<CbTranslation>;
127
+ private readonly document;
128
+ private readonly injector;
129
+ readonly placeholder: _angular_core.InputSignal<string | undefined>;
130
+ /** Nombre accesible del área de texto. Por defecto, "Editor de texto" del idioma activo. */
131
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
132
+ /** Alto mínimo del área de texto. */
12
133
  readonly height: _angular_core.InputSignal<string>;
13
- readonly disabled: _angular_core.InputSignal<boolean>;
134
+ /** Alto máximo: a partir de él, el área hace scroll (la barra queda fija). Sin él, crece con el contenido. */
135
+ readonly maxHeight: _angular_core.InputSignal<string | undefined>;
136
+ /** Muestra el número de palabras y caracteres al pie. */
137
+ readonly wordCount: _angular_core.InputSignalWithTransform<boolean, unknown>;
138
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
139
+ /** Muestra el contenido (saneado) sin barra ni edición. */
140
+ readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
14
141
  /** Marca visual y ARIA de estado inválido (también se activa con Angular Forms). */
15
142
  readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
143
+ readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
144
+ /** Herramientas de la barra y su orden (`'|'` separa grupos). */
145
+ readonly toolbar: _angular_core.InputSignal<readonly CbEditorTool[]>;
146
+ /** Máximo de caracteres de texto (sin contar las etiquetas). Muestra un contador. */
147
+ readonly maxLength: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
148
+ /** Permite imágenes (botón, pegar y soltar). */
149
+ readonly images: _angular_core.InputSignalWithTransform<boolean, unknown>;
150
+ /**
151
+ * Sube la imagen y devuelve su URL; así el HTML guarda una URL y no la imagen.
152
+ * Sin él, la imagen se inserta como data URL si no supera `maxImageSize`.
153
+ */
154
+ readonly imageUpload: _angular_core.InputSignal<CbEditorImageUpload | undefined>;
155
+ /** Tamaño máximo (bytes) de una imagen insertada como data URL. Por defecto 1 MB. */
156
+ readonly maxImageSize: _angular_core.InputSignalWithTransform<number, unknown>;
157
+ /** Pega siempre como texto plano (sin formato). */
158
+ readonly pastePlainText: _angular_core.InputSignalWithTransform<boolean, unknown>;
159
+ /** Tipografías del selector, por grupos. La primera opción con valor `''` es la predeterminada. */
160
+ readonly fonts: _angular_core.InputSignal<readonly CbEditorFontGroup[]>;
161
+ /**
162
+ * Hoja de estilos que carga las tipografías (por defecto, Google Fonts). Usa `''` si
163
+ * las sirves tú (o si tu CSP no permite fuentes externas).
164
+ */
165
+ readonly fontsHref: _angular_core.InputSignal<string>;
166
+ /** Menú flotante con formato rápido al seleccionar texto. */
167
+ readonly bubbleMenu: _angular_core.InputSignalWithTransform<boolean, unknown>;
168
+ /** Escribir `/` al inicio de una línea (o tras un espacio) abre un menú para insertar bloques. */
169
+ readonly slashCommands: _angular_core.InputSignalWithTransform<boolean, unknown>;
170
+ /** Convierte en enlace las URL (`https://…`, `www.…`) al escribir un espacio después. */
171
+ readonly autolink: _angular_core.InputSignalWithTransform<boolean, unknown>;
172
+ /** Corrección tipográfica al escribir: `(c)` → ©, `...` → …, `->` → →, ` -- ` → –, `1/2` → ½. */
173
+ readonly typography: _angular_core.InputSignalWithTransform<boolean, unknown>;
174
+ /** HTML del contenido (saneado y normalizado; `''` si está vacío). */
175
+ readonly value: _angular_core.ModelSignal<string>;
176
+ /** Una imagen no se pudo insertar (tipo, tamaño o error de subida). */
177
+ readonly imageError: _angular_core.OutputEmitterRef<CbEditorImageError>;
16
178
  /** Estado de validación: inputs manuales + estado de Angular Forms. */
17
179
  protected readonly fieldState: _caribeng_ui.CbFieldState;
18
- readonly value: _angular_core.ModelSignal<string>;
180
+ protected readonly surfaceId: string;
181
+ protected readonly countId: string;
182
+ protected readonly linkErrorId: string;
19
183
  private readonly cvaDisabled;
20
184
  protected readonly isDisabled: _angular_core.Signal<boolean>;
185
+ protected readonly state: _angular_core.WritableSignal<EditorState>;
186
+ protected readonly sourceMode: _angular_core.WritableSignal<boolean>;
187
+ protected readonly sourceText: _angular_core.WritableSignal<string>;
188
+ protected readonly message: _angular_core.WritableSignal<string>;
189
+ protected readonly length: _angular_core.WritableSignal<number>;
190
+ protected readonly linkPanel: _angular_core.WritableSignal<{
191
+ url: string;
192
+ newTab: boolean;
193
+ editing: boolean;
194
+ } | null>;
195
+ protected readonly linkUrl: _angular_core.WritableSignal<string>;
196
+ protected readonly linkNewTab: _angular_core.WritableSignal<boolean>;
197
+ protected readonly linkError: _angular_core.WritableSignal<boolean>;
198
+ protected readonly isEmpty: _angular_core.Signal<boolean>;
199
+ protected readonly invalidState: _angular_core.Signal<boolean>;
200
+ protected readonly countText: _angular_core.Signal<string>;
201
+ protected readonly words: _angular_core.WritableSignal<number>;
202
+ protected readonly wordsText: _angular_core.Signal<string>;
203
+ /** Pie: palabras y caracteres (con `maxLength`, "N de M caracteres"). */
204
+ protected readonly countLine: _angular_core.Signal<string>;
205
+ protected readonly fullscreen: _angular_core.WritableSignal<boolean>;
206
+ protected readonly openMenu: _angular_core.WritableSignal<CbEditorTool | null>;
207
+ protected readonly lastTextColor: _angular_core.WritableSignal<string>;
208
+ protected readonly lastHighlight: _angular_core.WritableSignal<string>;
209
+ protected readonly textColors: readonly CbEditorColor[];
210
+ protected readonly highlightColors: readonly CbEditorColor[];
211
+ protected readonly fontSizes: readonly [10, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 48];
212
+ protected readonly specialChars: readonly CbCharGroup[];
213
+ protected readonly bubbleTools: readonly CbEditorTool[];
214
+ /** Pilas CSS permitidas al sanear (las del selector). */
215
+ private readonly fontStackList;
216
+ protected readonly alignments: readonly ("alignLeft" | "alignCenter" | "alignRight" | "alignJustify")[];
217
+ protected readonly describedBy: _angular_core.Signal<string | null>;
218
+ protected readonly toolbarItems: _angular_core.Signal<CbEditorTool[]>;
219
+ /** Filas de la barra (`'-'` empieza una nueva). */
220
+ protected readonly toolbarRows: _angular_core.Signal<CbEditorTool[][]>;
221
+ /** Menú flotante de formato: posición respecto al área (encima o debajo de la selección). */
222
+ protected readonly bubble: _angular_core.WritableSignal<{
223
+ left: number;
224
+ top: number;
225
+ below: boolean;
226
+ } | null>;
227
+ /** Se está seleccionando con el ratón (el menú flotante espera a soltar). */
228
+ protected pointerSelecting: boolean;
229
+ /** Menú `/`: texto escrito tras la barra, opción activa y posición. */
230
+ protected readonly slash: _angular_core.WritableSignal<{
231
+ query: string;
232
+ active: number;
233
+ left: number;
234
+ top: number;
235
+ } | null>;
236
+ private slashAnchor;
237
+ protected readonly slashListId: string;
238
+ protected readonly slashItems: _angular_core.Signal<SlashItem[]>;
239
+ /** Buscar y reemplazar. */
240
+ protected readonly findOpen: _angular_core.WritableSignal<boolean>;
241
+ protected readonly findQuery: _angular_core.WritableSignal<string>;
242
+ protected readonly replaceText: _angular_core.WritableSignal<string>;
243
+ protected readonly findCase: _angular_core.WritableSignal<boolean>;
244
+ protected readonly findWhole: _angular_core.WritableSignal<boolean>;
245
+ protected readonly findTotal: _angular_core.WritableSignal<number>;
246
+ protected readonly findIndex: _angular_core.WritableSignal<number>;
247
+ /** Aviso tras "Reemplazar todo" (sustituye al contador hasta la siguiente búsqueda). */
248
+ private readonly findNote;
249
+ private findRanges;
250
+ private readonly findInputRef;
251
+ protected readonly findStatus: _angular_core.Signal<string>;
21
252
  private readonly surfaceRef;
22
253
  private readonly imageInputRef;
254
+ private readonly toolbarRef;
255
+ private readonly linkInputRef;
256
+ private readonly bodyRef;
257
+ private readonly tableRowsRef;
258
+ private readonly tableColsRef;
259
+ private readonly tableHeaderRef;
260
+ private readonly altInputRef;
23
261
  private savedRange;
262
+ private editingLink;
263
+ /** Celda de tabla donde está el cursor (muestra la barra de tabla). */
264
+ protected readonly tableCell: _angular_core.WritableSignal<HTMLTableCellElement | null>;
265
+ protected readonly tableHasHeader: _angular_core.Signal<boolean>;
266
+ protected readonly tablePanel: _angular_core.WritableSignal<boolean>;
267
+ protected readonly tableHeader: _angular_core.WritableSignal<boolean>;
268
+ protected readonly pickerRows: number[];
269
+ protected readonly pickerCols: number[];
270
+ protected readonly pickerHover: _angular_core.WritableSignal<{
271
+ r: number;
272
+ c: number;
273
+ } | null>;
274
+ protected readonly pickerFocus: _angular_core.WritableSignal<{
275
+ r: number;
276
+ c: number;
277
+ }>;
278
+ /** Se incrementa al cambiar los bordes (viven en el DOM de las celdas). */
279
+ private readonly tableTick;
280
+ protected readonly tableBorders: _angular_core.Signal<{
281
+ borders: CbTableBorders;
282
+ color: string | null;
283
+ }>;
284
+ protected readonly borderColors: {
285
+ value: string;
286
+ label: (t: CbTranslation) => string;
287
+ }[];
288
+ protected readonly crop: _angular_core.WritableSignal<{
289
+ src: string;
290
+ rect: CbCropRect;
291
+ ratio: number | null;
292
+ natural: {
293
+ w: number;
294
+ h: number;
295
+ };
296
+ busy: boolean;
297
+ error: boolean;
298
+ } | null>;
299
+ protected readonly cropRatios: {
300
+ label: string;
301
+ value: number | null;
302
+ }[];
303
+ protected readonly cropCorners: readonly ["nw", "ne", "sw", "se"];
304
+ protected readonly cropHelpId: string;
305
+ private readonly cropStageRef;
306
+ protected readonly cropValueText: _angular_core.Signal<string>;
307
+ /** Imagen seleccionada con un clic (muestra su barra y el tirador de tamaño). */
308
+ protected readonly selectedImage: _angular_core.WritableSignal<HTMLImageElement | null>;
309
+ /** Se incrementa al cambiar la imagen seleccionada (su estilo vive en el DOM, no en una señal). */
310
+ private readonly imageTick;
311
+ protected readonly imageState: _angular_core.Signal<{
312
+ width: string | null;
313
+ align: CbImageAlign | null;
314
+ }>;
315
+ protected readonly imageFrame: _angular_core.WritableSignal<{
316
+ left: number;
317
+ top: number;
318
+ width: number;
319
+ height: number;
320
+ } | null>;
321
+ protected readonly altPanel: _angular_core.WritableSignal<boolean>;
322
+ private resizing;
323
+ protected readonly imageWidths: string[];
324
+ protected readonly imageAligns: {
325
+ align: CbImageAlign | null;
326
+ icon: string;
327
+ label: (t: CbTranslation) => string;
328
+ }[];
329
+ /** Último HTML emitido o cargado: evita reescribir el DOM (y mover el cursor) con su propio valor. */
330
+ private lastHtml;
24
331
  private onChange;
25
332
  private onTouched;
26
333
  constructor();
@@ -28,22 +335,188 @@ declare class CbEditor implements ControlValueAccessor {
28
335
  registerOnChange(fn: (val: string) => void): void;
29
336
  registerOnTouched(fn: () => void): void;
30
337
  setDisabledState(isDisabled: boolean): void;
338
+ private tools;
339
+ /** Deja solo `active` en el orden de tabulación de la barra. */
340
+ protected setActiveTool(active: HTMLElement | undefined): void;
341
+ /** Flechas, Inicio y Fin mueven el foco entre las herramientas (de forma circular). */
342
+ protected onToolbarKeydown(event: KeyboardEvent): void;
343
+ protected toolIcon(tool: CbEditorTool): string;
344
+ protected toolLabel(tool: CbEditorTool): string;
345
+ protected toolKeys(tool: CbEditorTool): string;
346
+ /** Tooltip: nombre y atajo, p. ej. "Negrita (Ctrl+B)". */
347
+ protected toolTitle(tool: CbEditorTool): string;
348
+ protected ariaKeys(tool: CbEditorTool): string | null;
349
+ protected isMenu(tool: CbEditorTool): boolean;
350
+ protected groupLabel(group: CbEditorFontGroup): string;
351
+ /** Icono del botón de un menú: el de la alineación actual, o el de la herramienta. */
352
+ protected menuIcon(tool: CbEditorTool): string;
353
+ protected toggleMenu(tool: CbEditorTool): void;
354
+ /** Flecha abajo, Enter o Espacio en el botón abren el menú y enfocan su primera opción. */
355
+ protected onMenuTriggerKeydown(event: KeyboardEvent, tool: CbEditorTool): void;
356
+ /** Flechas (en la paleta, en cuadrícula de 5), Inicio, Fin, Escape y Tab dentro de un menú. */
357
+ protected onMenuKeydown(event: KeyboardEvent): void;
358
+ /** Aplica la opción elegida de un menú y lo cierra. */
359
+ protected applyMenu(tool: CbEditorTool, value: string | null): void;
360
+ protected pressable(tool: CbEditorTool): boolean;
361
+ protected isActive(tool: CbEditorTool): boolean;
31
362
  /** Evita que el botón robe la selección del área editable. */
32
363
  protected hold(event: MouseEvent): void;
33
- exec(command: string, value?: string): void;
364
+ protected run(tool: CbEditorTool): void;
365
+ exec(command: string, value?: string, css?: boolean): void;
366
+ /** Ejecuta el comando sin emitir el valor (para retocar el resultado antes). */
367
+ private command;
34
368
  /** Aplica un bloque (encabezado, párrafo o cita). */
35
369
  protected format(tag: string): void;
36
- /** Inserta un enlace sobre la selección actual. */
37
- protected insertLink(): void;
370
+ /** Quita el formato en línea y vuelve el bloque a párrafo. */
371
+ protected clearFormat(): void;
372
+ private selectionRange;
373
+ /** Color del texto seleccionado; `null` = automático (quita el color). */
374
+ setTextColor(color: string | null): void;
375
+ /** Resaltado (color de fondo) del texto seleccionado; `null` lo quita. */
376
+ setHighlight(color: string | null): void;
377
+ /** Tamaño de letra de la selección en px (`''` = normal). */
378
+ setFontSize(value: string): void;
379
+ /** Tipografía de la selección (pila CSS; `''` = la predeterminada). */
380
+ setFontFamily(value: string): void;
381
+ /** Sangría: anida en listas; en párrafos y títulos, margen en pasos de 2rem. */
382
+ changeIndent(delta: 1 | -1): void;
383
+ /** Lista de tareas: crea una, convierte la lista actual o la quita. */
384
+ toggleTaskList(): void;
385
+ /** Pantalla completa (Escape sale). */
386
+ toggleFullscreen(): void;
387
+ /** Envuelve la selección en `<code>` o la saca de él. */
388
+ private toggleCode;
389
+ /** Abre el panel de enlace (Ctrl + K); si el cursor está en un enlace, lo edita. */
390
+ protected openLink(): void;
391
+ protected closeLink(): void;
392
+ protected applyLink(event: Event): void;
393
+ protected removeLink(): void;
38
394
  /** Abre el selector de archivos guardando la posición del cursor. */
39
395
  protected pickImage(): void;
40
- /** Inserta la imagen elegida (como data URL) donde estaba el cursor. */
41
396
  protected onImageFile(event: Event): void;
42
- protected onSurfaceInput(): void;
397
+ /** Sube (o lee) la imagen y la inserta donde estaba el cursor. */
398
+ insertImage(file: File): Promise<void>;
399
+ protected onPaste(event: ClipboardEvent): void;
400
+ protected onDrop(event: DragEvent): void;
401
+ /** Inserta lo pegado: HTML saneado o texto plano, recortado si supera `maxLength`. */
402
+ private insertClipboard;
403
+ /** Impide escribir más allá de `maxLength`. */
404
+ protected onBeforeInput(event: InputEvent): void;
405
+ protected onSurfaceInput(event?: Event): void;
406
+ /** Texto (nodo y posición) donde está el cursor, si no es código ni una selección. */
407
+ private caretText;
408
+ private setCaret;
409
+ /** Al escribir un espacio tras una URL, la convierte en enlace. */
410
+ private autolinkAtCaret;
411
+ /** Corrección tipográfica del texto recién escrito (`(c)` → ©, `...` → …). */
412
+ private fixTypography;
413
+ /** Tras escribir `/` al inicio de una línea o después de un espacio, abre el menú de bloques. */
414
+ private openSlash;
415
+ /** Filtra con lo escrito tras la `/`; se cierra si el cursor sale de ahí o se escribe un espacio. */
416
+ private updateSlash;
417
+ protected closeSlash(): void;
418
+ protected slashOptionId(index: number): string;
419
+ /** Quita la `/` y lo escrito tras ella, y aplica el bloque elegido. */
420
+ protected applySlash(item: SlashItem): void;
421
+ /** Flechas, Enter / Tab y Escape mientras el menú `/` está abierto. */
422
+ private onSlashKeydown;
423
+ /** Posición del cursor (o de la selección) respecto al área, para colocar menús. */
424
+ private caretPosition;
425
+ /** Muestra el menú de formato rápido sobre una selección de texto (o lo oculta). */
426
+ private updateBubble;
427
+ /** Una herramienta del menú flotante: la aplica y recoloca el menú. */
428
+ protected runBubble(tool: CbEditorTool): void;
429
+ /** Abre el panel (Ctrl + F); el texto seleccionado se usa como búsqueda. */
430
+ openFind(): void;
431
+ /** Cierra el panel y deja seleccionada la coincidencia actual en el texto. */
432
+ closeFind(): void;
433
+ protected setFindQuery(query: string): void;
434
+ protected setFindOption(option: 'case' | 'whole'): void;
435
+ /** Recalcula las coincidencias y marca la actual (`index`, limitado al total). */
436
+ private refreshFind;
437
+ /** Siguiente (1) o anterior (-1) coincidencia, de forma circular. */
438
+ findStep(step: 1 | -1): void;
439
+ /** Resalta todas las coincidencias y la actual (sin tocar el contenido) y la hace visible. */
440
+ private paintFind;
441
+ private clearFindHighlight;
442
+ /** Reemplaza la coincidencia actual y pasa a la siguiente. */
443
+ replaceCurrent(): void;
444
+ /** Reemplaza todas las coincidencias (cada una se puede deshacer con Ctrl + Z). */
445
+ replaceAllMatches(): void;
446
+ /** Sustituye el texto de los rangos (del último al primero, para no desplazar los demás). */
447
+ private replaceRanges;
448
+ /** Enter: siguiente; Mayús + Enter: anterior (en el campo de reemplazo, reemplaza); Escape: cerrar. */
449
+ protected onFindKeydown(event: KeyboardEvent): void;
450
+ /** Atajos de teclado: Ctrl + K enlace; Ctrl + Mayús + 7 / 8 listas; Ctrl + Alt + 0–3 bloques. */
451
+ protected onSurfaceKeydown(event: KeyboardEvent): void;
452
+ /**
453
+ * Formato al escribir (como Markdown): al pulsar espacio tras `#`, `##`, `###`,
454
+ * `*`, `-`, `1.` o `>` al inicio de un párrafo, se convierte el bloque.
455
+ */
456
+ private autoformat;
457
+ protected openTablePanel(): void;
458
+ protected closeTablePanel(): void;
459
+ protected pickerOn(r: number, c: number): boolean;
460
+ protected tableSizeLabel(r: number, c: number): string;
461
+ /** Flechas en la cuadrícula de tamaño; Enter inserta. */
462
+ protected onPickerKeydown(event: KeyboardEvent, r: number, c: number): void;
463
+ /** Inserta una tabla de filas × columnas con bordes grises (se ven igual fuera del editor). */
464
+ insertTable(rows: number, cols: number): void;
465
+ /** Bordes de toda la tabla: todos, solo horizontales o ninguno; y su color. */
466
+ setTableBorders(borders: CbTableBorders | null, color: string | null): void;
467
+ /** Acciones de la barra de tabla sobre la celda actual. */
468
+ protected tableAction(id: string): void;
469
+ private deleteTable;
470
+ /** Tab / Mayús + Tab: celda siguiente o anterior; en la última, añade una fila. */
471
+ private moveCell;
472
+ /** Pone el cursor al inicio de un elemento. */
473
+ private placeCaret;
474
+ protected onSurfaceClick(event: MouseEvent): void;
475
+ private deselectImage;
476
+ /** Coloca el marco y el tirador sobre la imagen seleccionada. */
477
+ protected refreshFrame(): void;
478
+ protected imageWidthLabel(width: string): string;
479
+ private applyImageStyle;
480
+ /** Alineación: en línea (`null`), izquierda o derecha (el texto la rodea) o centrada. */
481
+ setImageAlign(align: CbImageAlign | null): void;
482
+ /** Ancho en % o px; `null` vuelve al tamaño original. */
483
+ setImageWidth(width: string | null): void;
484
+ protected deleteImage(): void;
485
+ protected openAlt(): void;
486
+ protected closeAlt(): void;
487
+ protected applyAlt(event: Event): void;
488
+ protected openCrop(): void;
489
+ protected closeCrop(): void;
490
+ /** Proporción fija (ancho / alto) o libre (`null`). */
491
+ setCropRatio(ratio: number | null): void;
492
+ /** Mueve (`corner` null) o redimensiona el recuadro arrastrando. */
493
+ protected startCropDrag(event: PointerEvent, corner: 'nw' | 'ne' | 'sw' | 'se' | null): void;
494
+ /** Flechas: mover un 2 %; Mayús + flechas: cambiar el tamaño desde la esquina inferior derecha; Enter: aplicar. */
495
+ protected onCropKeydown(event: KeyboardEvent): void;
496
+ /** Recorta los píxeles y sustituye la imagen (subiéndola con `imageUpload` si lo hay). */
497
+ applyCrop(): Promise<void>;
498
+ /** Arrastrar el tirador cambia el ancho (en % del área, para que se adapte a la pantalla). */
499
+ protected startResize(event: PointerEvent): void;
500
+ /** Flechas, Inicio y Fin en las barras de tabla e imagen (patrón *toolbar*). */
501
+ protected onContextKeydown(event: KeyboardEvent): void;
502
+ private toggleSource;
503
+ /** Saneado con las opciones del editor (imágenes y tipografías permitidas). */
504
+ private sanitize;
505
+ /** Emite el HTML saneado sin tocar el DOM (no se pierde la posición del cursor). */
506
+ private emit;
43
507
  protected onBlur(): void;
508
+ private textLength;
509
+ private remaining;
510
+ private saveSelection;
511
+ private restoreSelection;
512
+ private closest;
513
+ private closestBlock;
514
+ /** Lee el formato de la selección para marcar las herramientas activas. */
515
+ private updateState;
44
516
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CbEditor, never>;
45
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CbEditor, "cb-editor", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
517
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CbEditor, "cb-editor", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "wordCount": { "alias": "wordCount"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "toolbar": { "alias": "toolbar"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "images": { "alias": "images"; "required": false; "isSignal": true; }; "imageUpload": { "alias": "imageUpload"; "required": false; "isSignal": true; }; "maxImageSize": { "alias": "maxImageSize"; "required": false; "isSignal": true; }; "pastePlainText": { "alias": "pastePlainText"; "required": false; "isSignal": true; }; "fonts": { "alias": "fonts"; "required": false; "isSignal": true; }; "fontsHref": { "alias": "fontsHref"; "required": false; "isSignal": true; }; "bubbleMenu": { "alias": "bubbleMenu"; "required": false; "isSignal": true; }; "slashCommands": { "alias": "slashCommands"; "required": false; "isSignal": true; }; "autolink": { "alias": "autolink"; "required": false; "isSignal": true; }; "typography": { "alias": "typography"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "imageError": "imageError"; }, never, never, true, never>;
46
518
  }
47
519
 
48
- export { CbEditor };
520
+ export { CB_EDITOR_DEFAULT_TOOLBAR, CB_EDITOR_FONTS, CB_EDITOR_FONTS_HREF, CbEditor, cbHtmlToText, cbSanitizeHtml };
521
+ export type { CbEditorFont, CbEditorFontGroup, CbEditorImageError, CbEditorImageUpload, CbEditorTool, CbSanitizeOptions };
49
522
  //# sourceMappingURL=caribeng-ui-editor.d.ts.map
@@ -0,0 +1,34 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import * as _caribeng_ui from '@caribeng/ui';
3
+
4
+ /**
5
+ * Empty de CaribeNG: estado vacío con icono o imagen, mensaje y acciones
6
+ * opcionales (proyectadas). Úsalo cuando una lista, búsqueda o tabla no tiene
7
+ * datos.
8
+ *
9
+ * @example
10
+ * ```html
11
+ * <cb-empty title="Aún no tienes movimientos" description="Cuando hagas tu primera compra aparecerá aquí.">
12
+ * <cb-button size="sm">Hacer una transferencia</cb-button>
13
+ * </cb-empty>
14
+ * ```
15
+ */
16
+ declare class CbEmpty {
17
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
18
+ protected readonly t: _angular_core.Signal<_caribeng_ui.CbTranslation>;
19
+ /** Mensaje principal. Por defecto, "Sin datos" del idioma activo. */
20
+ readonly title: _angular_core.InputSignal<string | undefined>;
21
+ /** Texto de apoyo opcional. */
22
+ readonly description: _angular_core.InputSignal<string>;
23
+ /** Icono (se ignora si hay `image`). */
24
+ readonly icon: _angular_core.InputSignal<string>;
25
+ /** Ilustración opcional (decorativa). */
26
+ readonly image: _angular_core.InputSignal<string>;
27
+ /** `sm` para tablas, listas y paneles pequeños. */
28
+ readonly size: _angular_core.InputSignal<"sm" | "md">;
29
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CbEmpty, never>;
30
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CbEmpty, "cb-empty", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "image": { "alias": "image"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
31
+ }
32
+
33
+ export { CbEmpty };
34
+ //# sourceMappingURL=caribeng-ui-empty.d.ts.map
@@ -1,17 +1,27 @@
1
1
  import * as _angular_core from '@angular/core';
2
+ import * as _caribeng_ui from '@caribeng/ui';
3
+ import { CbMenuItem } from '@caribeng/ui/menu';
2
4
 
3
5
  /**
4
6
  * Tarjeta de categoría/almacenamiento de CaribeNG: icono con tinte, título y
5
7
  * subtítulo a la izquierda; dos valores alineados a la derecha. Útil para
6
8
  * resúmenes de media, almacenamiento o métricas de categoría.
7
9
  *
10
+ * Como `cb-folder-card`: con `actions` muestra un botón ⋮ con un menú
11
+ * (`actionSelect`) y con `clickable` toda la tarjeta emite `open`.
12
+ *
8
13
  * @example
9
14
  * ```html
10
15
  * <cb-file-card icon="image" color="#10b981" title="Imágenes"
11
- * subtitle="17% usado" value="245 archivos" valueSub="26.4 GB" />
16
+ * subtitle="17% usado" value="245 archivos" valueSub="26.4 GB"
17
+ * clickable (open)="verImagenes()" />
12
18
  * ```
13
19
  */
14
20
  declare class CbFileCard {
21
+ /** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
22
+ protected readonly t: _angular_core.Signal<_caribeng_ui.CbTranslation>;
23
+ private readonly menu;
24
+ private readonly trigger;
15
25
  /** Nombre del icono (del set de CaribeNG). */
16
26
  readonly icon: _angular_core.InputSignal<string>;
17
27
  /** Color del icono (CSS). El fondo del recuadro se deriva con transparencia. */
@@ -24,10 +34,25 @@ declare class CbFileCard {
24
34
  readonly value: _angular_core.InputSignal<string>;
25
35
  /** Valor secundario a la derecha (p. ej. "26.4 GB"). */
26
36
  readonly valueSub: _angular_core.InputSignal<string>;
27
- /** Fondo tintado derivado del color (con alpha). */
37
+ /** Acciones del menú ⋮. Sin acciones no se muestra el botón. */
38
+ readonly actions: _angular_core.InputSignal<readonly CbMenuItem[]>;
39
+ /** Nombre del botón ⋮ y del menú. Por defecto, "Más acciones: {título}" del idioma activo. */
40
+ readonly actionsAriaLabel: _angular_core.InputSignal<string | undefined>;
41
+ /** Toda la tarjeta es pulsable y emite `open` (clic, Enter o Espacio). */
42
+ readonly clickable: _angular_core.InputSignalWithTransform<boolean, unknown>;
43
+ /** Acción elegida en el menú ⋮. */
44
+ readonly actionSelect: _angular_core.OutputEmitterRef<CbMenuItem>;
45
+ /** Se pulsó la tarjeta (solo con `clickable`). */
46
+ readonly open: _angular_core.OutputEmitterRef<MouseEvent>;
47
+ protected readonly menuOpen: _angular_core.WritableSignal<boolean>;
48
+ protected readonly menuLabel: _angular_core.Signal<string>;
49
+ /** Fondo tintado derivado del color (cualquier color CSS: hex, rgb(), var(--…)). */
28
50
  protected tintBg(): string | null;
51
+ /** Abre o cierra el menú de acciones anclado al botón ⋮. */
52
+ toggleMenu(): void;
53
+ protected openFromKeyboard(event: Event): void;
29
54
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CbFileCard, never>;
30
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CbFileCard, "cb-file-card", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "valueSub": { "alias": "valueSub"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
55
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CbFileCard, "cb-file-card", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "valueSub": { "alias": "valueSub"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "actionsAriaLabel": { "alias": "actionsAriaLabel"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; }, { "actionSelect": "actionSelect"; "open": "open"; }, never, never, true, never>;
31
56
  }
32
57
 
33
58
  export { CbFileCard };