@caribeng/ui 22.2.0 → 22.5.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.
- package/README.md +311 -231
- package/fesm2022/caribeng-ui-accordion.mjs +2 -2
- package/fesm2022/caribeng-ui-account-picker.mjs +533 -0
- package/fesm2022/caribeng-ui-aging.mjs +488 -0
- package/fesm2022/{caribeng-ui-caribe-alert.mjs → caribeng-ui-alert.mjs} +45 -45
- package/fesm2022/caribeng-ui-amount.mjs +249 -0
- package/fesm2022/caribeng-ui-anchor.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-animation-lottie.mjs → caribeng-ui-animation-lottie.mjs} +41 -41
- package/fesm2022/caribeng-ui-audit-log.mjs +323 -0
- package/fesm2022/caribeng-ui-avatar.mjs +4 -4
- package/fesm2022/caribeng-ui-badge.mjs +8 -2
- package/fesm2022/caribeng-ui-breadcrumb.mjs +26 -9
- package/fesm2022/{caribeng-ui-caribe-button-group.mjs → caribeng-ui-button-group.mjs} +15 -15
- package/fesm2022/caribeng-ui-button.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-card-content.mjs → caribeng-ui-card-content.mjs} +39 -39
- package/fesm2022/{caribeng-ui-caribe-card-move.mjs → caribeng-ui-card-move.mjs} +65 -65
- package/fesm2022/{caribeng-ui-caribe-card-primary.mjs → caribeng-ui-card-primary.mjs} +31 -31
- package/fesm2022/{caribeng-ui-caribe-card-select.mjs → caribeng-ui-card-select.mjs} +67 -67
- package/fesm2022/caribeng-ui-carousel.mjs +2 -2
- package/fesm2022/caribeng-ui-cascadeselect.mjs +45 -9
- package/fesm2022/caribeng-ui-chart.mjs +8 -5
- package/fesm2022/caribeng-ui-chat.mjs +1303 -0
- package/fesm2022/{caribeng-ui-caribe-coachmark.mjs → caribeng-ui-coachmark.mjs} +85 -85
- package/fesm2022/caribeng-ui-code-block.mjs +332 -0
- package/fesm2022/caribeng-ui-colorpicker.mjs +99 -5
- package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
- package/fesm2022/caribeng-ui-comments.mjs +864 -0
- package/fesm2022/caribeng-ui-confirmdialog.mjs +78 -13
- package/fesm2022/caribeng-ui-confirmpopup.mjs +91 -16
- package/fesm2022/caribeng-ui-contextmenu.mjs +8 -4
- package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
- package/fesm2022/caribeng-ui-datagrid.mjs +1635 -0
- package/fesm2022/caribeng-ui-dataview.mjs +6 -3
- package/fesm2022/caribeng-ui-datepicker.mjs +2 -2
- package/fesm2022/caribeng-ui-dock.mjs +52 -12
- package/fesm2022/caribeng-ui-document.mjs +495 -0
- package/fesm2022/{caribeng-ui-caribe-dots-indicator.mjs → caribeng-ui-dots-indicator.mjs} +41 -41
- package/fesm2022/caribeng-ui-drawer.mjs +9 -4
- package/fesm2022/caribeng-ui-dynamic-form.mjs +1581 -0
- package/fesm2022/caribeng-ui-editor.mjs +2324 -1311
- package/fesm2022/{caribeng-ui-caribe-expansion-panel.mjs → caribeng-ui-expansion-panel.mjs} +39 -39
- package/fesm2022/{caribeng-ui-caribe-fab-menu.mjs → caribeng-ui-fab-menu.mjs} +75 -75
- package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
- package/fesm2022/caribeng-ui-file-card.mjs +134 -17
- package/fesm2022/{caribeng-ui-caribe-file-download.mjs → caribeng-ui-file-download.mjs} +63 -63
- package/fesm2022/caribeng-ui-financial-report.mjs +380 -0
- package/fesm2022/{caribeng-ui-caribe-float-menu.mjs → caribeng-ui-float-menu.mjs} +31 -31
- package/fesm2022/caribeng-ui-floatlabel.mjs +2 -2
- package/fesm2022/caribeng-ui-flow.mjs +1508 -0
- package/fesm2022/caribeng-ui-folder-card.mjs +122 -12
- package/fesm2022/{caribeng-ui-caribe-footer.mjs → caribeng-ui-footer.mjs} +19 -19
- package/fesm2022/caribeng-ui-gantt.mjs +1094 -0
- package/fesm2022/{caribeng-ui-caribe-header.mjs → caribeng-ui-header.mjs} +49 -49
- package/fesm2022/{caribeng-ui-caribe-icon-button.mjs → caribeng-ui-icon-button.mjs} +23 -23
- package/fesm2022/caribeng-ui-image-cropper.mjs +671 -0
- package/fesm2022/caribeng-ui-import-wizard.mjs +746 -0
- package/fesm2022/caribeng-ui-infinite-scroll.mjs +226 -0
- package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
- package/fesm2022/caribeng-ui-input-number.mjs +22 -6
- package/fesm2022/{caribeng-ui-caribe-input-search.mjs → caribeng-ui-input-search.mjs} +65 -65
- package/fesm2022/{caribeng-ui-caribe-input-token.mjs → caribeng-ui-input-token.mjs} +59 -59
- package/fesm2022/caribeng-ui-inputmask.mjs +8 -2
- package/fesm2022/caribeng-ui-inputotp.mjs +2 -2
- package/fesm2022/caribeng-ui-journal-entry.mjs +340 -0
- package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
- package/fesm2022/caribeng-ui-kbd.mjs +122 -0
- package/fesm2022/caribeng-ui-kpi.mjs +189 -0
- package/fesm2022/{caribeng-ui-caribe-link.mjs → caribeng-ui-link.mjs} +37 -37
- package/fesm2022/caribeng-ui-masonry.mjs +93 -0
- package/fesm2022/caribeng-ui-media-player.mjs +821 -0
- package/fesm2022/caribeng-ui-megamenu.mjs +13 -9
- package/fesm2022/caribeng-ui-mentions.mjs +495 -0
- package/fesm2022/caribeng-ui-menu.mjs +8 -4
- package/fesm2022/caribeng-ui-menubar.mjs +9 -5
- package/fesm2022/caribeng-ui-message.mjs +6 -3
- package/fesm2022/caribeng-ui-notification-center.mjs +636 -0
- package/fesm2022/{caribeng-ui-caribe-off-canvas.mjs → caribeng-ui-off-canvas.mjs} +55 -55
- package/fesm2022/{caribeng-ui-caribe-onboarding.mjs → caribeng-ui-onboarding.mjs} +105 -105
- package/fesm2022/caribeng-ui-orderlist.mjs +2 -2
- package/fesm2022/caribeng-ui-organizationchart.mjs +6 -10
- package/fesm2022/caribeng-ui-panel.mjs +6 -6
- package/fesm2022/caribeng-ui-panelmenu.mjs +9 -6
- package/fesm2022/caribeng-ui-pdfviewer.mjs +1755 -25
- package/fesm2022/caribeng-ui-period-picker.mjs +637 -0
- package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
- package/fesm2022/caribeng-ui-picklist.mjs +2 -2
- package/fesm2022/caribeng-ui-pivot.mjs +419 -0
- package/fesm2022/caribeng-ui-pricing.mjs +263 -69
- package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
- package/fesm2022/caribeng-ui-rating.mjs +14 -17
- package/fesm2022/caribeng-ui-reconciliation.mjs +386 -0
- package/fesm2022/caribeng-ui-ripple.mjs +2 -0
- package/fesm2022/caribeng-ui-scheduler.mjs +1027 -0
- package/fesm2022/caribeng-ui-scrolltop.mjs +3 -1
- package/fesm2022/caribeng-ui-select.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-shortcut.mjs → caribeng-ui-shortcut.mjs} +29 -29
- package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
- package/fesm2022/caribeng-ui-signature-pad.mjs +654 -0
- package/fesm2022/{caribeng-ui-caribe-status.mjs → caribeng-ui-status.mjs} +11 -11
- package/fesm2022/{caribeng-ui-caribe-step-indicator.mjs → caribeng-ui-step-indicator.mjs} +53 -53
- package/fesm2022/caribeng-ui-stepper.mjs +12 -5
- package/fesm2022/caribeng-ui-steps.mjs +2 -2
- package/fesm2022/caribeng-ui-table.mjs +333 -19
- package/fesm2022/caribeng-ui-tabmenu.mjs +10 -6
- package/fesm2022/caribeng-ui-tabs.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-tag-button.mjs → caribeng-ui-tag-button.mjs} +25 -25
- package/fesm2022/caribeng-ui-tag.mjs +2 -2
- package/fesm2022/caribeng-ui-tieredmenu.mjs +111 -21
- package/fesm2022/{caribeng-ui-caribe-tracker.mjs → caribeng-ui-tracker.mjs} +29 -29
- package/fesm2022/{caribeng-ui-caribe-transaction-status.mjs → caribeng-ui-transaction-status.mjs} +11 -11
- package/fesm2022/caribeng-ui-treeselect.mjs +44 -9
- package/fesm2022/caribeng-ui-treetable.mjs +236 -17
- package/fesm2022/{caribeng-ui-caribe-voucher.mjs → caribeng-ui-voucher.mjs} +45 -45
- package/fesm2022/caribeng-ui-xlsx.mjs +486 -0
- package/fesm2022/caribeng-ui.mjs +1568 -1
- package/package.json +258 -178
- package/schematics/collection.json +5 -0
- package/schematics/migrate-from-primeng/core-icons.json +1 -0
- package/schematics/migrate-from-primeng/icons.js +269 -0
- package/schematics/migrate-from-primeng/index.js +290 -0
- package/schematics/migrate-from-primeng/mappings/button.js +93 -0
- package/schematics/migrate-from-primeng/mappings/card.js +33 -0
- package/schematics/migrate-from-primeng/mappings/checkbox.js +44 -0
- package/schematics/migrate-from-primeng/mappings/confirm.js +221 -0
- package/schematics/migrate-from-primeng/mappings/datepicker.js +121 -0
- package/schematics/migrate-from-primeng/mappings/dialog.js +84 -0
- package/schematics/migrate-from-primeng/mappings/index.js +88 -0
- package/schematics/migrate-from-primeng/mappings/inputnumber.js +62 -0
- package/schematics/migrate-from-primeng/mappings/inputtext.js +60 -0
- package/schematics/migrate-from-primeng/mappings/menu.js +468 -0
- package/schematics/migrate-from-primeng/mappings/multiselect.js +49 -0
- package/schematics/migrate-from-primeng/mappings/radiobutton.js +22 -0
- package/schematics/migrate-from-primeng/mappings/rules.js +206 -0
- package/schematics/migrate-from-primeng/mappings/select.js +97 -0
- package/schematics/migrate-from-primeng/mappings/service-calls.js +100 -0
- package/schematics/migrate-from-primeng/mappings/table.js +613 -0
- package/schematics/migrate-from-primeng/mappings/tabs.js +225 -0
- package/schematics/migrate-from-primeng/mappings/tag.js +29 -0
- package/schematics/migrate-from-primeng/mappings/textarea.js +44 -0
- package/schematics/migrate-from-primeng/mappings/toast.js +173 -0
- package/schematics/migrate-from-primeng/mappings/toggleswitch.js +37 -0
- package/schematics/migrate-from-primeng/mappings/tooltip.js +44 -0
- package/schematics/migrate-from-primeng/mappings/types.js +10 -0
- package/schematics/migrate-from-primeng/report.js +79 -0
- package/schematics/migrate-from-primeng/schema.js +2 -0
- package/schematics/migrate-from-primeng/schema.json +34 -0
- package/schematics/migrate-from-primeng/template.js +387 -0
- package/schematics/migrate-from-primeng/todo.js +5 -0
- package/schematics/migrate-from-primeng/typescript.js +442 -0
- package/schematics/migrate-from-primeng/workspace.js +117 -0
- package/schematics/ng-add/index.js +16 -1
- package/types/caribeng-ui-account-picker.d.ts +142 -0
- package/types/caribeng-ui-aging.d.ts +123 -0
- package/types/{caribeng-ui-caribe-alert.d.ts → caribeng-ui-alert.d.ts} +2 -2
- package/types/caribeng-ui-amount.d.ts +82 -0
- package/types/{caribeng-ui-caribe-animation-lottie.d.ts → caribeng-ui-animation-lottie.d.ts} +2 -2
- package/types/caribeng-ui-audit-log.d.ts +86 -0
- package/types/caribeng-ui-badge.d.ts +3 -1
- package/types/caribeng-ui-breadcrumb.d.ts +9 -1
- package/types/{caribeng-ui-caribe-button-group.d.ts → caribeng-ui-button-group.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-card-content.d.ts → caribeng-ui-card-content.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-card-move.d.ts → caribeng-ui-card-move.d.ts} +1 -1
- package/types/{caribeng-ui-caribe-card-primary.d.ts → caribeng-ui-card-primary.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-card-select.d.ts → caribeng-ui-card-select.d.ts} +2 -2
- package/types/caribeng-ui-cascadeselect.d.ts +6 -0
- package/types/caribeng-ui-chart.d.ts +3 -1
- package/types/caribeng-ui-chat.d.ts +299 -0
- package/types/{caribeng-ui-caribe-coachmark.d.ts → caribeng-ui-coachmark.d.ts} +2 -2
- package/types/caribeng-ui-code-block.d.ts +65 -0
- package/types/caribeng-ui-colorpicker.d.ts +5 -1
- package/types/caribeng-ui-command-palette.d.ts +133 -0
- package/types/caribeng-ui-comments.d.ts +214 -0
- package/types/caribeng-ui-confirmdialog.d.ts +34 -2
- package/types/caribeng-ui-confirmpopup.d.ts +39 -2
- package/types/caribeng-ui-contextmenu.d.ts +7 -0
- package/types/caribeng-ui-copy-button.d.ts +90 -0
- package/types/caribeng-ui-datagrid.d.ts +269 -0
- package/types/caribeng-ui-dataview.d.ts +2 -0
- package/types/caribeng-ui-dock.d.ts +13 -1
- package/types/caribeng-ui-document.d.ts +138 -0
- package/types/{caribeng-ui-caribe-dots-indicator.d.ts → caribeng-ui-dots-indicator.d.ts} +2 -2
- package/types/caribeng-ui-drawer.d.ts +3 -1
- package/types/caribeng-ui-dynamic-form.d.ts +409 -0
- package/types/caribeng-ui-editor.d.ts +110 -12
- package/types/{caribeng-ui-caribe-expansion-panel.d.ts → caribeng-ui-expansion-panel.d.ts} +1 -1
- package/types/{caribeng-ui-caribe-fab-menu.d.ts → caribeng-ui-fab-menu.d.ts} +2 -2
- package/types/caribeng-ui-file-card.d.ts +27 -2
- package/types/{caribeng-ui-caribe-file-download.d.ts → caribeng-ui-file-download.d.ts} +1 -1
- package/types/caribeng-ui-financial-report.d.ts +102 -0
- package/types/{caribeng-ui-caribe-float-menu.d.ts → caribeng-ui-float-menu.d.ts} +2 -2
- package/types/caribeng-ui-flow.d.ts +228 -0
- package/types/caribeng-ui-folder-card.d.ts +27 -5
- package/types/{caribeng-ui-caribe-footer.d.ts → caribeng-ui-footer.d.ts} +2 -2
- package/types/caribeng-ui-gantt.d.ts +244 -0
- package/types/{caribeng-ui-caribe-header.d.ts → caribeng-ui-header.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-icon-button.d.ts → caribeng-ui-icon-button.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-illustration.d.ts → caribeng-ui-illustration.d.ts} +1 -1
- package/types/caribeng-ui-image-cropper.d.ts +169 -0
- package/types/caribeng-ui-import-wizard.d.ts +149 -0
- package/types/caribeng-ui-infinite-scroll.d.ts +75 -0
- package/types/caribeng-ui-input-number.d.ts +1 -1
- package/types/{caribeng-ui-caribe-input-search.d.ts → caribeng-ui-input-search.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-input-token.d.ts → caribeng-ui-input-token.d.ts} +2 -2
- package/types/caribeng-ui-inputmask.d.ts +3 -1
- package/types/caribeng-ui-journal-entry.d.ts +110 -0
- package/types/caribeng-ui-kanban.d.ts +783 -0
- package/types/caribeng-ui-kbd.d.ts +36 -0
- package/types/caribeng-ui-kpi.d.ts +64 -0
- package/types/{caribeng-ui-caribe-link.d.ts → caribeng-ui-link.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-logo.d.ts → caribeng-ui-logo.d.ts} +1 -1
- package/types/caribeng-ui-masonry.d.ts +32 -0
- package/types/caribeng-ui-media-player.d.ts +140 -0
- package/types/caribeng-ui-megamenu.d.ts +11 -0
- package/types/caribeng-ui-mentions.d.ts +127 -0
- package/types/caribeng-ui-menu.d.ts +7 -0
- package/types/caribeng-ui-menubar.d.ts +7 -0
- package/types/caribeng-ui-message.d.ts +2 -0
- package/types/caribeng-ui-notification-center.d.ts +153 -0
- package/types/{caribeng-ui-caribe-off-canvas.d.ts → caribeng-ui-off-canvas.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-onboarding.d.ts → caribeng-ui-onboarding.d.ts} +2 -2
- package/types/caribeng-ui-panelmenu.d.ts +7 -0
- package/types/caribeng-ui-pdfviewer.d.ts +245 -5
- package/types/caribeng-ui-period-picker.d.ts +148 -0
- package/types/caribeng-ui-phone-input.d.ts +168 -0
- package/types/caribeng-ui-pivot.d.ts +116 -0
- package/types/caribeng-ui-pricing.d.ts +41 -4
- package/types/caribeng-ui-qrcode.d.ts +88 -0
- package/types/caribeng-ui-reconciliation.d.ts +109 -0
- package/types/caribeng-ui-scheduler.d.ts +188 -0
- package/types/{caribeng-ui-caribe-shortcut.d.ts → caribeng-ui-shortcut.d.ts} +2 -2
- package/types/caribeng-ui-sidebar.d.ts +167 -0
- package/types/caribeng-ui-signature-pad.d.ts +151 -0
- package/types/{caribeng-ui-caribe-status.d.ts → caribeng-ui-status.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-step-indicator.d.ts → caribeng-ui-step-indicator.d.ts} +2 -2
- package/types/caribeng-ui-stepper.d.ts +2 -0
- package/types/caribeng-ui-table.d.ts +67 -3
- package/types/caribeng-ui-tabmenu.d.ts +7 -0
- package/types/{caribeng-ui-caribe-tag-button.d.ts → caribeng-ui-tag-button.d.ts} +2 -2
- package/types/caribeng-ui-tieredmenu.d.ts +17 -1
- package/types/{caribeng-ui-caribe-tracker.d.ts → caribeng-ui-tracker.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-transaction-status.d.ts → caribeng-ui-transaction-status.d.ts} +2 -2
- package/types/caribeng-ui-treeselect.d.ts +6 -0
- package/types/caribeng-ui-treetable.d.ts +67 -2
- package/types/{caribeng-ui-caribe-voucher.d.ts → caribeng-ui-voucher.d.ts} +2 -2
- package/types/caribeng-ui-xlsx.d.ts +79 -0
- package/types/caribeng-ui.d.ts +985 -2
- package/fesm2022/caribeng-ui-caribe-calendar.mjs +0 -92
- package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +0 -130
- package/fesm2022/caribeng-ui-caribe-data-table.mjs +0 -94
- package/fesm2022/caribeng-ui-caribe-file-select.mjs +0 -88
- package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +0 -100
- package/fesm2022/caribeng-ui-caribe-input-date.mjs +0 -138
- package/fesm2022/caribeng-ui-caribe-input-select.mjs +0 -154
- package/fesm2022/caribeng-ui-caribe-loader.mjs +0 -48
- package/fesm2022/caribeng-ui-caribe-modal.mjs +0 -119
- package/fesm2022/caribeng-ui-caribe-pictogram.mjs +0 -52
- package/fesm2022/caribeng-ui-caribe-pop-over.mjs +0 -104
- package/fesm2022/caribeng-ui-caribe-preloader.mjs +0 -57
- package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +0 -84
- package/fesm2022/caribeng-ui-caribe-stroke.mjs +0 -69
- package/fesm2022/caribeng-ui-caribe-switch.mjs +0 -182
- package/styles/caribeng.css +0 -380
- package/styles/scss/_mixins.scss +0 -46
- package/styles/scss/_overlay.scss +0 -15
- package/styles/scss/_tokens.scss +0 -267
- package/styles/scss/_utilities.scss +0 -73
- package/styles/scss/_variables.scss +0 -33
- package/styles/scss/index.scss +0 -16
- package/types/caribeng-ui-caribe-calendar.d.ts +0 -27
- package/types/caribeng-ui-caribe-circle-loading.d.ts +0 -28
- package/types/caribeng-ui-caribe-data-table.d.ts +0 -26
- package/types/caribeng-ui-caribe-file-select.d.ts +0 -31
- package/types/caribeng-ui-caribe-inline-alert.d.ts +0 -28
- package/types/caribeng-ui-caribe-input-date.d.ts +0 -40
- package/types/caribeng-ui-caribe-input-select.d.ts +0 -47
- package/types/caribeng-ui-caribe-loader.d.ts +0 -22
- package/types/caribeng-ui-caribe-modal.d.ts +0 -21
- package/types/caribeng-ui-caribe-pictogram.d.ts +0 -15
- package/types/caribeng-ui-caribe-pop-over.d.ts +0 -17
- package/types/caribeng-ui-caribe-preloader.d.ts +0 -24
- package/types/caribeng-ui-caribe-progress-bar.d.ts +0 -28
- package/types/caribeng-ui-caribe-stroke.d.ts +0 -17
- package/types/caribeng-ui-caribe-switch.d.ts +0 -55
- /package/fesm2022/{caribeng-ui-caribe-illustration.mjs → caribeng-ui-illustration.mjs} +0 -0
- /package/fesm2022/{caribeng-ui-caribe-logo.mjs → caribeng-ui-logo.mjs} +0 -0
|
@@ -3,7 +3,7 @@ import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Compo
|
|
|
3
3
|
import { injectCbTranslation, cbFormat } from '@caribeng/ui';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Coachmark
|
|
6
|
+
* Coachmark: tarjeta de ayuda guiada paso a paso para resaltar
|
|
7
7
|
* funcionalidades.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -43,93 +43,93 @@ class CbCoachmark {
|
|
|
43
43
|
this.visible.set(false);
|
|
44
44
|
}
|
|
45
45
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCoachmark, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbCoachmark, isStandalone: true, selector: "cb-coachmark", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", index: "indexChange", stepChange: "stepChange" }, ngImport: i0, template: `
|
|
47
|
-
@if (visible() && steps().length) {
|
|
48
|
-
<aside
|
|
49
|
-
class="cb-coachmark"
|
|
50
|
-
role="dialog"
|
|
51
|
-
[attr.aria-label]="t().guidedHelp"
|
|
52
|
-
(keydown.escape)="close()"
|
|
53
|
-
>
|
|
54
|
-
<!-- Región viva: al cambiar de paso se anuncian el contador y el título. -->
|
|
55
|
-
<div class="cb-coachmark__announce" aria-live="polite" aria-atomic="true">
|
|
56
|
-
<span class="cb-coachmark__counter">
|
|
57
|
-
{{ fmt(t().stepOf, index() + 1, steps().length) }}
|
|
58
|
-
</span>
|
|
59
|
-
<h3 class="cb-coachmark__title">{{ steps()[index()] }}</h3>
|
|
60
|
-
</div>
|
|
61
|
-
<div class="cb-coachmark__actions">
|
|
62
|
-
<button
|
|
63
|
-
type="button"
|
|
64
|
-
class="cb-coachmark__btn cb-coachmark__btn--ghost"
|
|
65
|
-
(click)="close()"
|
|
66
|
-
>
|
|
67
|
-
{{ t().skip }}
|
|
68
|
-
</button>
|
|
69
|
-
<button
|
|
70
|
-
type="button"
|
|
71
|
-
class="cb-coachmark__btn"
|
|
72
|
-
(click)="previous()"
|
|
73
|
-
[disabled]="index() === 0"
|
|
74
|
-
>
|
|
75
|
-
{{ t().previous }}
|
|
76
|
-
</button>
|
|
77
|
-
<button
|
|
78
|
-
type="button"
|
|
79
|
-
class="cb-coachmark__btn cb-coachmark__btn--primary"
|
|
80
|
-
(click)="next()"
|
|
81
|
-
>
|
|
82
|
-
{{ index() === steps().length - 1 ? t().finish : t().next }}
|
|
83
|
-
</button>
|
|
84
|
-
</div>
|
|
85
|
-
</aside>
|
|
86
|
-
}
|
|
87
|
-
`, isInline: true, styles: [":host{display:block;width:100%;max-width:20rem}.cb-coachmark{position:relative;display:flex;flex-direction:column;gap:var(--cb-space-2, .5rem);box-sizing:border-box;padding:var(--cb-space-4, 1rem);font-family:var(--cb-font-sans, inherit);color:var(--cb-color-surface-0, #ffffff);background-color:var(--cb-color-surface-900, #0f172a);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-lg, 0 16px 36px rgba(0, 0, 0, .3))}.cb-coachmark__announce{display:flex;flex-direction:column;gap:var(--cb-space-2, .5rem)}.cb-coachmark__counter{font-size:var(--cb-text-xs, .72rem);font-weight:var(--cb-font-weight-semibold, 600);letter-spacing:.04em;text-transform:uppercase;color:var(--cb-color-primary-300, #6ee7b7)}.cb-coachmark__title{margin:0;font-size:var(--cb-text-base, .95rem);font-weight:var(--cb-font-weight-semibold, 600);line-height:var(--cb-line-height-normal, 1.45)}.cb-coachmark__actions{display:flex;justify-content:flex-end;gap:var(--cb-space-2, .5rem);margin-top:var(--cb-space-2, .5rem)}.cb-coachmark__btn{padding:var(--cb-space-2, .4rem) var(--cb-space-3, .75rem);font:inherit;font-size:var(--cb-text-sm, .8125rem);font-weight:var(--cb-font-weight-medium, 500);color:var(--cb-color-surface-0, #ffffff);background-color:#ffffff1f;border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-coachmark__btn:hover:not(:disabled){background-color:#ffffff38}.cb-coachmark__btn:disabled{opacity:.4;cursor:not-allowed}.cb-coachmark__btn--ghost{background-color:transparent}.cb-coachmark__btn--primary{color
|
|
46
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbCoachmark, isStandalone: true, selector: "cb-coachmark", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", index: "indexChange", stepChange: "stepChange" }, ngImport: i0, template: `
|
|
47
|
+
@if (visible() && steps().length) {
|
|
48
|
+
<aside
|
|
49
|
+
class="cb-coachmark"
|
|
50
|
+
role="dialog"
|
|
51
|
+
[attr.aria-label]="t().guidedHelp"
|
|
52
|
+
(keydown.escape)="close()"
|
|
53
|
+
>
|
|
54
|
+
<!-- Región viva: al cambiar de paso se anuncian el contador y el título. -->
|
|
55
|
+
<div class="cb-coachmark__announce" aria-live="polite" aria-atomic="true">
|
|
56
|
+
<span class="cb-coachmark__counter">
|
|
57
|
+
{{ fmt(t().stepOf, index() + 1, steps().length) }}
|
|
58
|
+
</span>
|
|
59
|
+
<h3 class="cb-coachmark__title">{{ steps()[index()] }}</h3>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="cb-coachmark__actions">
|
|
62
|
+
<button
|
|
63
|
+
type="button"
|
|
64
|
+
class="cb-coachmark__btn cb-coachmark__btn--ghost"
|
|
65
|
+
(click)="close()"
|
|
66
|
+
>
|
|
67
|
+
{{ t().skip }}
|
|
68
|
+
</button>
|
|
69
|
+
<button
|
|
70
|
+
type="button"
|
|
71
|
+
class="cb-coachmark__btn"
|
|
72
|
+
(click)="previous()"
|
|
73
|
+
[disabled]="index() === 0"
|
|
74
|
+
>
|
|
75
|
+
{{ t().previous }}
|
|
76
|
+
</button>
|
|
77
|
+
<button
|
|
78
|
+
type="button"
|
|
79
|
+
class="cb-coachmark__btn cb-coachmark__btn--primary"
|
|
80
|
+
(click)="next()"
|
|
81
|
+
>
|
|
82
|
+
{{ index() === steps().length - 1 ? t().finish : t().next }}
|
|
83
|
+
</button>
|
|
84
|
+
</div>
|
|
85
|
+
</aside>
|
|
86
|
+
}
|
|
87
|
+
`, isInline: true, styles: [":host{display:block;width:100%;max-width:20rem}.cb-coachmark{position:relative;display:flex;flex-direction:column;gap:var(--cb-space-2, .5rem);box-sizing:border-box;padding:var(--cb-space-4, 1rem);font-family:var(--cb-font-sans, inherit);color:var(--cb-color-surface-0, #ffffff);background-color:var(--cb-color-surface-900, #0f172a);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-lg, 0 16px 36px rgba(0, 0, 0, .3))}.cb-coachmark__announce{display:flex;flex-direction:column;gap:var(--cb-space-2, .5rem)}.cb-coachmark__counter{font-size:var(--cb-text-xs, .72rem);font-weight:var(--cb-font-weight-semibold, 600);letter-spacing:.04em;text-transform:uppercase;color:var(--cb-color-primary-300, #6ee7b7)}.cb-coachmark__title{margin:0;font-size:var(--cb-text-base, .95rem);font-weight:var(--cb-font-weight-semibold, 600);line-height:var(--cb-line-height-normal, 1.45)}.cb-coachmark__actions{display:flex;justify-content:flex-end;gap:var(--cb-space-2, .5rem);margin-top:var(--cb-space-2, .5rem)}.cb-coachmark__btn{padding:var(--cb-space-2, .4rem) var(--cb-space-3, .75rem);font:inherit;font-size:var(--cb-text-sm, .8125rem);font-weight:var(--cb-font-weight-medium, 500);color:var(--cb-color-surface-0, #ffffff);background-color:#ffffff1f;border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-coachmark__btn:hover:not(:disabled){background-color:#ffffff38}.cb-coachmark__btn:disabled{opacity:.4;cursor:not-allowed}.cb-coachmark__btn--ghost{background-color:transparent}.cb-coachmark__btn--primary{color:#fff;background-color:var(--cb-color-primary-700, #047857)}.cb-coachmark__btn--primary:hover:not(:disabled){background-color:var(--cb-color-primary-500, #10b981)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
88
88
|
}
|
|
89
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCoachmark, decorators: [{
|
|
90
90
|
type: Component,
|
|
91
|
-
args: [{ selector: 'cb-coachmark', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: `
|
|
92
|
-
@if (visible() && steps().length) {
|
|
93
|
-
<aside
|
|
94
|
-
class="cb-coachmark"
|
|
95
|
-
role="dialog"
|
|
96
|
-
[attr.aria-label]="t().guidedHelp"
|
|
97
|
-
(keydown.escape)="close()"
|
|
98
|
-
>
|
|
99
|
-
<!-- Región viva: al cambiar de paso se anuncian el contador y el título. -->
|
|
100
|
-
<div class="cb-coachmark__announce" aria-live="polite" aria-atomic="true">
|
|
101
|
-
<span class="cb-coachmark__counter">
|
|
102
|
-
{{ fmt(t().stepOf, index() + 1, steps().length) }}
|
|
103
|
-
</span>
|
|
104
|
-
<h3 class="cb-coachmark__title">{{ steps()[index()] }}</h3>
|
|
105
|
-
</div>
|
|
106
|
-
<div class="cb-coachmark__actions">
|
|
107
|
-
<button
|
|
108
|
-
type="button"
|
|
109
|
-
class="cb-coachmark__btn cb-coachmark__btn--ghost"
|
|
110
|
-
(click)="close()"
|
|
111
|
-
>
|
|
112
|
-
{{ t().skip }}
|
|
113
|
-
</button>
|
|
114
|
-
<button
|
|
115
|
-
type="button"
|
|
116
|
-
class="cb-coachmark__btn"
|
|
117
|
-
(click)="previous()"
|
|
118
|
-
[disabled]="index() === 0"
|
|
119
|
-
>
|
|
120
|
-
{{ t().previous }}
|
|
121
|
-
</button>
|
|
122
|
-
<button
|
|
123
|
-
type="button"
|
|
124
|
-
class="cb-coachmark__btn cb-coachmark__btn--primary"
|
|
125
|
-
(click)="next()"
|
|
126
|
-
>
|
|
127
|
-
{{ index() === steps().length - 1 ? t().finish : t().next }}
|
|
128
|
-
</button>
|
|
129
|
-
</div>
|
|
130
|
-
</aside>
|
|
131
|
-
}
|
|
132
|
-
`, styles: [":host{display:block;width:100%;max-width:20rem}.cb-coachmark{position:relative;display:flex;flex-direction:column;gap:var(--cb-space-2, .5rem);box-sizing:border-box;padding:var(--cb-space-4, 1rem);font-family:var(--cb-font-sans, inherit);color:var(--cb-color-surface-0, #ffffff);background-color:var(--cb-color-surface-900, #0f172a);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-lg, 0 16px 36px rgba(0, 0, 0, .3))}.cb-coachmark__announce{display:flex;flex-direction:column;gap:var(--cb-space-2, .5rem)}.cb-coachmark__counter{font-size:var(--cb-text-xs, .72rem);font-weight:var(--cb-font-weight-semibold, 600);letter-spacing:.04em;text-transform:uppercase;color:var(--cb-color-primary-300, #6ee7b7)}.cb-coachmark__title{margin:0;font-size:var(--cb-text-base, .95rem);font-weight:var(--cb-font-weight-semibold, 600);line-height:var(--cb-line-height-normal, 1.45)}.cb-coachmark__actions{display:flex;justify-content:flex-end;gap:var(--cb-space-2, .5rem);margin-top:var(--cb-space-2, .5rem)}.cb-coachmark__btn{padding:var(--cb-space-2, .4rem) var(--cb-space-3, .75rem);font:inherit;font-size:var(--cb-text-sm, .8125rem);font-weight:var(--cb-font-weight-medium, 500);color:var(--cb-color-surface-0, #ffffff);background-color:#ffffff1f;border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-coachmark__btn:hover:not(:disabled){background-color:#ffffff38}.cb-coachmark__btn:disabled{opacity:.4;cursor:not-allowed}.cb-coachmark__btn--ghost{background-color:transparent}.cb-coachmark__btn--primary{color
|
|
91
|
+
args: [{ selector: 'cb-coachmark', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: `
|
|
92
|
+
@if (visible() && steps().length) {
|
|
93
|
+
<aside
|
|
94
|
+
class="cb-coachmark"
|
|
95
|
+
role="dialog"
|
|
96
|
+
[attr.aria-label]="t().guidedHelp"
|
|
97
|
+
(keydown.escape)="close()"
|
|
98
|
+
>
|
|
99
|
+
<!-- Región viva: al cambiar de paso se anuncian el contador y el título. -->
|
|
100
|
+
<div class="cb-coachmark__announce" aria-live="polite" aria-atomic="true">
|
|
101
|
+
<span class="cb-coachmark__counter">
|
|
102
|
+
{{ fmt(t().stepOf, index() + 1, steps().length) }}
|
|
103
|
+
</span>
|
|
104
|
+
<h3 class="cb-coachmark__title">{{ steps()[index()] }}</h3>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="cb-coachmark__actions">
|
|
107
|
+
<button
|
|
108
|
+
type="button"
|
|
109
|
+
class="cb-coachmark__btn cb-coachmark__btn--ghost"
|
|
110
|
+
(click)="close()"
|
|
111
|
+
>
|
|
112
|
+
{{ t().skip }}
|
|
113
|
+
</button>
|
|
114
|
+
<button
|
|
115
|
+
type="button"
|
|
116
|
+
class="cb-coachmark__btn"
|
|
117
|
+
(click)="previous()"
|
|
118
|
+
[disabled]="index() === 0"
|
|
119
|
+
>
|
|
120
|
+
{{ t().previous }}
|
|
121
|
+
</button>
|
|
122
|
+
<button
|
|
123
|
+
type="button"
|
|
124
|
+
class="cb-coachmark__btn cb-coachmark__btn--primary"
|
|
125
|
+
(click)="next()"
|
|
126
|
+
>
|
|
127
|
+
{{ index() === steps().length - 1 ? t().finish : t().next }}
|
|
128
|
+
</button>
|
|
129
|
+
</div>
|
|
130
|
+
</aside>
|
|
131
|
+
}
|
|
132
|
+
`, styles: [":host{display:block;width:100%;max-width:20rem}.cb-coachmark{position:relative;display:flex;flex-direction:column;gap:var(--cb-space-2, .5rem);box-sizing:border-box;padding:var(--cb-space-4, 1rem);font-family:var(--cb-font-sans, inherit);color:var(--cb-color-surface-0, #ffffff);background-color:var(--cb-color-surface-900, #0f172a);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-lg, 0 16px 36px rgba(0, 0, 0, .3))}.cb-coachmark__announce{display:flex;flex-direction:column;gap:var(--cb-space-2, .5rem)}.cb-coachmark__counter{font-size:var(--cb-text-xs, .72rem);font-weight:var(--cb-font-weight-semibold, 600);letter-spacing:.04em;text-transform:uppercase;color:var(--cb-color-primary-300, #6ee7b7)}.cb-coachmark__title{margin:0;font-size:var(--cb-text-base, .95rem);font-weight:var(--cb-font-weight-semibold, 600);line-height:var(--cb-line-height-normal, 1.45)}.cb-coachmark__actions{display:flex;justify-content:flex-end;gap:var(--cb-space-2, .5rem);margin-top:var(--cb-space-2, .5rem)}.cb-coachmark__btn{padding:var(--cb-space-2, .4rem) var(--cb-space-3, .75rem);font:inherit;font-size:var(--cb-text-sm, .8125rem);font-weight:var(--cb-font-weight-medium, 500);color:var(--cb-color-surface-0, #ffffff);background-color:#ffffff1f;border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-coachmark__btn:hover:not(:disabled){background-color:#ffffff38}.cb-coachmark__btn:disabled{opacity:.4;cursor:not-allowed}.cb-coachmark__btn--ghost{background-color:transparent}.cb-coachmark__btn--primary{color:#fff;background-color:var(--cb-color-primary-700, #047857)}.cb-coachmark__btn--primary:hover:not(:disabled){background-color:var(--cb-color-primary-500, #10b981)}\n"] }]
|
|
133
133
|
}], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }, { type: i0.Output, args: ["indexChange"] }], stepChange: [{ type: i0.Output, args: ["stepChange"] }] } });
|
|
134
134
|
|
|
135
135
|
/**
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { CbCopyButton } from '@caribeng/ui/copy-button';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Resaltado de sintaxis propio de CaribeNG, ligero y sin dependencias.
|
|
7
|
+
* Devuelve tokens (no HTML): quien los pinta decide cómo, sin innerHTML.
|
|
8
|
+
* Lenguajes: TypeScript/JavaScript, HTML/XML (y plantillas Angular), CSS/SCSS,
|
|
9
|
+
* JSON, Bash, Python y SQL. Un lenguaje desconocido se devuelve como texto.
|
|
10
|
+
*/
|
|
11
|
+
const words = (list) => new RegExp(`\\b(?:${list.trim().split(/\s+/).join('|')})\\b`, 'y');
|
|
12
|
+
const STRING_DQ = /"(?:\\.|[^"\\\n])*"?/y;
|
|
13
|
+
const STRING_SQ = /'(?:\\.|[^'\\\n])*'?/y;
|
|
14
|
+
const NUMBER = /\b(?:0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[eE][+-]?\d+)?n?)\b/y;
|
|
15
|
+
const SPACE = /\s+/y;
|
|
16
|
+
const JS = [
|
|
17
|
+
['comment', /\/\/.*/y],
|
|
18
|
+
['comment', /\/\*[\s\S]*?(?:\*\/|$)/y],
|
|
19
|
+
['string', /`(?:\\[\s\S]|[^`\\])*`?/y],
|
|
20
|
+
['string', STRING_DQ],
|
|
21
|
+
['string', STRING_SQ],
|
|
22
|
+
['keyword', /@[A-Za-z_]\w*/y],
|
|
23
|
+
[
|
|
24
|
+
'keyword',
|
|
25
|
+
words(`abstract as async await break case catch class const constructor continue debugger declare default delete do else enum
|
|
26
|
+
export extends finally for from function get if implements import in instanceof interface is keyof let namespace new of
|
|
27
|
+
override private protected public readonly return satisfies set static super switch throw try type typeof var void while with yield`),
|
|
28
|
+
],
|
|
29
|
+
['builtin', words('true false null undefined this NaN Infinity console window document Math JSON Promise Array Object String Number Boolean Date Map Set Error any unknown never string number boolean symbol bigint')],
|
|
30
|
+
['number', NUMBER],
|
|
31
|
+
['function', /[A-Za-z_$][\w$]*(?=\s*(?:<[^>()]*>)?\()/y],
|
|
32
|
+
['variable', /[A-Za-z_$][\w$]*/y],
|
|
33
|
+
['operator', /=>|\?\?=?|\?\.|\.{3}|[=!]==?|[<>]=?|&&|\|\||[-+*/%&|^~!?:=]+/y],
|
|
34
|
+
['punctuation', /[{}()[\];,.<>]/y],
|
|
35
|
+
];
|
|
36
|
+
const HTML = [
|
|
37
|
+
// Dentro de una etiqueta: atributos, valores y cierre.
|
|
38
|
+
['tag', /\/?>/y, { in: 'tag', exit: true }],
|
|
39
|
+
['string', /"[^"]*"?/y, { in: 'tag' }],
|
|
40
|
+
['string', /'[^']*'?/y, { in: 'tag' }],
|
|
41
|
+
['operator', /=/y, { in: 'tag' }],
|
|
42
|
+
['attr', /[^\s=/>"']+/y, { in: 'tag' }],
|
|
43
|
+
// Fuera: comentarios, etiquetas, interpolación y bloques de control de Angular.
|
|
44
|
+
['comment', /<!--[\s\S]*?(?:-->|$)/y],
|
|
45
|
+
['keyword', /<!DOCTYPE[^>]*>/iy],
|
|
46
|
+
['tag', /<\/?[A-Za-z][\w:.-]*/y, { enter: 'tag' }],
|
|
47
|
+
['variable', /\{\{[\s\S]*?(?:\}\}|$)/y],
|
|
48
|
+
['keyword', /@(?:if|else if|else|for|empty|switch|case|default|defer|placeholder|loading|let)\b/y],
|
|
49
|
+
['plain', /[^<{@\s]+/y],
|
|
50
|
+
];
|
|
51
|
+
const CSS = [
|
|
52
|
+
['comment', /\/\*[\s\S]*?(?:\*\/|$)/y],
|
|
53
|
+
['comment', /\/\/.*/y],
|
|
54
|
+
['string', STRING_DQ],
|
|
55
|
+
['string', STRING_SQ],
|
|
56
|
+
['keyword', /@[\w-]+/y],
|
|
57
|
+
['variable', /--[\w-]+|\$[\w-]+/y],
|
|
58
|
+
['number', /#[\da-fA-F]{3,8}\b/y],
|
|
59
|
+
['number', /-?(?:\d+\.?\d*|\.\d+)(?:px|rem|em|%|vh|vw|vmin|vmax|s|ms|deg|fr|ch|ex|dvh|svh|lh)?\b/y],
|
|
60
|
+
['function', /[\w-]+(?=\()/y],
|
|
61
|
+
['property', /[\w-]+(?=\s*:(?!:))/y],
|
|
62
|
+
['keyword', words('!important important')],
|
|
63
|
+
['punctuation', /[{}()[\];:,>+~*]/y],
|
|
64
|
+
['plain', /[\w-]+|[.#&]/y],
|
|
65
|
+
];
|
|
66
|
+
const JSON_RULES = [
|
|
67
|
+
['property', /"(?:\\.|[^"\\\n])*"(?=\s*:)/y],
|
|
68
|
+
['string', STRING_DQ],
|
|
69
|
+
['number', /-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/y],
|
|
70
|
+
['builtin', words('true false null')],
|
|
71
|
+
['punctuation', /[{}[\]:,]/y],
|
|
72
|
+
];
|
|
73
|
+
const BASH = [
|
|
74
|
+
['comment', /#.*/y],
|
|
75
|
+
['string', STRING_DQ],
|
|
76
|
+
['string', STRING_SQ],
|
|
77
|
+
['variable', /\$\{[^}]*\}?|\$[\w@#?*!$-]/y],
|
|
78
|
+
['keyword', words('if then else elif fi for while until do done case esac in function return export local readonly unset source exit')],
|
|
79
|
+
['builtin', words('echo cd ls cat cp mv rm mkdir touch grep sed awk curl wget sudo npm npx pnpm yarn node ng nx git docker kubectl')],
|
|
80
|
+
['attr', /(?<=\s)--?[\w-]+/y],
|
|
81
|
+
['number', /\b\d+\b/y],
|
|
82
|
+
['operator', /&&|\|\||[|&;<>]+|=/y],
|
|
83
|
+
];
|
|
84
|
+
const PYTHON = [
|
|
85
|
+
['comment', /#.*/y],
|
|
86
|
+
['string', /[rbfu]{0,2}(?:"""[\s\S]*?(?:"""|$)|'''[\s\S]*?(?:'''|$))/iy],
|
|
87
|
+
['string', /[rbfu]{0,2}(?:"(?:\\.|[^"\\\n])*"?|'(?:\\.|[^'\\\n])*'?)/iy],
|
|
88
|
+
['keyword', /@[A-Za-z_][\w.]*/y],
|
|
89
|
+
['keyword', words('and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield match case')],
|
|
90
|
+
['builtin', words('True False None self print len range dict list set tuple str int float bool open super isinstance enumerate zip map filter')],
|
|
91
|
+
['number', NUMBER],
|
|
92
|
+
['function', /[A-Za-z_]\w*(?=\s*\()/y],
|
|
93
|
+
['variable', /[A-Za-z_]\w*/y],
|
|
94
|
+
['operator', /\*\*=?|\/\/=?|->|[-+*/%@&|^~<>!=]=?/y],
|
|
95
|
+
['punctuation', /[{}()[\];,.:]/y],
|
|
96
|
+
];
|
|
97
|
+
const SQL = [
|
|
98
|
+
['comment', /--.*/y],
|
|
99
|
+
['comment', /\/\*[\s\S]*?(?:\*\/|$)/y],
|
|
100
|
+
['string', STRING_SQ],
|
|
101
|
+
['property', /"(?:[^"]|"")*"?/y],
|
|
102
|
+
[
|
|
103
|
+
'keyword',
|
|
104
|
+
new RegExp(`\\b(?:${'select from where and or not insert into values update set delete create table alter drop index view join left right inner outer full on as group by order having limit offset distinct union all case when then else end is null in between like exists primary key foreign references default returning with desc asc'.split(' ').join('|')})\\b`, 'iy'),
|
|
105
|
+
],
|
|
106
|
+
['function', /[A-Za-z_]\w*(?=\s*\()/y],
|
|
107
|
+
['number', /\b\d+(?:\.\d+)?\b/y],
|
|
108
|
+
['operator', /<>|[<>!]=?|[-+*/%=|]+/y],
|
|
109
|
+
['punctuation', /[(),;.]/y],
|
|
110
|
+
];
|
|
111
|
+
const LANGUAGES = {
|
|
112
|
+
ts: JS,
|
|
113
|
+
typescript: JS,
|
|
114
|
+
js: JS,
|
|
115
|
+
javascript: JS,
|
|
116
|
+
jsx: JS,
|
|
117
|
+
tsx: JS,
|
|
118
|
+
mjs: JS,
|
|
119
|
+
html: HTML,
|
|
120
|
+
xml: HTML,
|
|
121
|
+
svg: HTML,
|
|
122
|
+
angular: HTML,
|
|
123
|
+
css: CSS,
|
|
124
|
+
scss: CSS,
|
|
125
|
+
sass: CSS,
|
|
126
|
+
less: CSS,
|
|
127
|
+
json: JSON_RULES,
|
|
128
|
+
jsonc: JSON_RULES,
|
|
129
|
+
bash: BASH,
|
|
130
|
+
sh: BASH,
|
|
131
|
+
shell: BASH,
|
|
132
|
+
zsh: BASH,
|
|
133
|
+
console: BASH,
|
|
134
|
+
py: PYTHON,
|
|
135
|
+
python: PYTHON,
|
|
136
|
+
sql: SQL,
|
|
137
|
+
};
|
|
138
|
+
/** Nombre visible de un lenguaje ("ts" → "TypeScript"). */
|
|
139
|
+
function cbCodeLanguageLabel(language) {
|
|
140
|
+
const key = language.toLowerCase();
|
|
141
|
+
const names = {
|
|
142
|
+
ts: 'TypeScript', typescript: 'TypeScript', tsx: 'TSX', js: 'JavaScript', javascript: 'JavaScript', jsx: 'JSX', mjs: 'JavaScript',
|
|
143
|
+
html: 'HTML', xml: 'XML', svg: 'SVG', angular: 'Angular', css: 'CSS', scss: 'SCSS', sass: 'Sass', less: 'Less',
|
|
144
|
+
json: 'JSON', jsonc: 'JSON', bash: 'Bash', sh: 'Shell', shell: 'Shell', zsh: 'Zsh', console: 'Consola',
|
|
145
|
+
py: 'Python', python: 'Python', sql: 'SQL', text: 'Texto', txt: 'Texto', plaintext: 'Texto',
|
|
146
|
+
};
|
|
147
|
+
return names[key] ?? language;
|
|
148
|
+
}
|
|
149
|
+
/** Si hay reglas de resaltado para el lenguaje. */
|
|
150
|
+
function cbCodeSupports(language) {
|
|
151
|
+
return !!LANGUAGES[language.toLowerCase()];
|
|
152
|
+
}
|
|
153
|
+
function tokenize(code, rules) {
|
|
154
|
+
const tokens = [];
|
|
155
|
+
const push = (type, text) => {
|
|
156
|
+
const last = tokens[tokens.length - 1];
|
|
157
|
+
if (last && last.type === type && (type === 'plain' || type === 'punctuation'))
|
|
158
|
+
tokens[tokens.length - 1] = { type, text: last.text + text };
|
|
159
|
+
else
|
|
160
|
+
tokens.push({ type, text });
|
|
161
|
+
};
|
|
162
|
+
let pos = 0;
|
|
163
|
+
let state = null;
|
|
164
|
+
outer: while (pos < code.length) {
|
|
165
|
+
SPACE.lastIndex = pos;
|
|
166
|
+
const space = SPACE.exec(code);
|
|
167
|
+
if (space) {
|
|
168
|
+
push('plain', space[0]);
|
|
169
|
+
pos += space[0].length;
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
for (const [type, re, opts] of rules) {
|
|
173
|
+
// Las reglas sin `in` solo valen en el estado inicial.
|
|
174
|
+
if ((opts?.in ?? null) !== state)
|
|
175
|
+
continue;
|
|
176
|
+
re.lastIndex = pos;
|
|
177
|
+
const m = re.exec(code);
|
|
178
|
+
if (m && m[0].length) {
|
|
179
|
+
push(type, m[0]);
|
|
180
|
+
pos += m[0].length;
|
|
181
|
+
if (opts?.enter)
|
|
182
|
+
state = opts.enter;
|
|
183
|
+
if (opts?.exit)
|
|
184
|
+
state = null;
|
|
185
|
+
continue outer;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
push('plain', code[pos]);
|
|
189
|
+
pos++;
|
|
190
|
+
}
|
|
191
|
+
return tokens;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Tokeniza `code` y lo reparte en líneas (los comentarios y strings de varias
|
|
195
|
+
* líneas se parten en cada salto). Lenguaje desconocido = texto plano.
|
|
196
|
+
*/
|
|
197
|
+
function cbHighlight(code, language = '') {
|
|
198
|
+
const source = (code ?? '').replace(/\r\n?/g, '\n');
|
|
199
|
+
const rules = LANGUAGES[language.toLowerCase()];
|
|
200
|
+
const tokens = rules ? tokenize(source, rules) : [{ type: 'plain', text: source }];
|
|
201
|
+
const lines = [[]];
|
|
202
|
+
for (const token of tokens) {
|
|
203
|
+
const parts = token.text.split('\n');
|
|
204
|
+
parts.forEach((part, i) => {
|
|
205
|
+
if (i > 0)
|
|
206
|
+
lines.push([]);
|
|
207
|
+
if (part)
|
|
208
|
+
lines[lines.length - 1].push({ type: token.type, text: part });
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
return lines;
|
|
212
|
+
}
|
|
213
|
+
/** Interpreta `"1,3-5"` o `[1, 3, 4, 5]` como conjunto de números de línea. */
|
|
214
|
+
function cbParseLineSet(value) {
|
|
215
|
+
if (!value)
|
|
216
|
+
return new Set();
|
|
217
|
+
if (Array.isArray(value))
|
|
218
|
+
return new Set(value);
|
|
219
|
+
const set = new Set();
|
|
220
|
+
for (const part of String(value).split(',')) {
|
|
221
|
+
const [a, b] = part.split('-').map((n) => Number(n.trim()));
|
|
222
|
+
if (!Number.isFinite(a))
|
|
223
|
+
continue;
|
|
224
|
+
const end = Number.isFinite(b) ? b : a;
|
|
225
|
+
for (let n = Math.min(a, end); n <= Math.max(a, end); n++)
|
|
226
|
+
set.add(n);
|
|
227
|
+
}
|
|
228
|
+
return set;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Bloque de código de CaribeNG con resaltado de sintaxis propio (sin
|
|
233
|
+
* dependencias), nombre de archivo o lenguaje, botón de copiar, números de
|
|
234
|
+
* línea y líneas destacadas. Sigue el tema claro u oscuro.
|
|
235
|
+
*
|
|
236
|
+
* El código se pinta como texto (tokens), nunca como HTML.
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```html
|
|
240
|
+
* <cb-code-block language="ts" filename="app.config.ts" [code]="codigo" lineNumbers highlightLines="3-4" />
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
class CbCodeBlock {
|
|
244
|
+
constructor() {
|
|
245
|
+
/** Código a mostrar. */
|
|
246
|
+
this.code = input('', /* @ts-ignore */
|
|
247
|
+
...(ngDevMode ? [{ debugName: "code" }] : /* istanbul ignore next */ []));
|
|
248
|
+
/** Lenguaje (`ts`, `html`, `css`, `json`, `bash`, `python`, `sql`…). Desconocido = texto. */
|
|
249
|
+
this.language = input('', /* @ts-ignore */
|
|
250
|
+
...(ngDevMode ? [{ debugName: "language" }] : /* istanbul ignore next */ []));
|
|
251
|
+
/** Nombre de archivo en la cabecera (en lugar del lenguaje). */
|
|
252
|
+
this.filename = input('', /* @ts-ignore */
|
|
253
|
+
...(ngDevMode ? [{ debugName: "filename" }] : /* istanbul ignore next */ []));
|
|
254
|
+
this.lineNumbers = input(false, { ...(ngDevMode ? { debugName: "lineNumbers" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
255
|
+
/** Número de la primera línea. */
|
|
256
|
+
this.startLine = input(1, /* @ts-ignore */
|
|
257
|
+
...(ngDevMode ? [{ debugName: "startLine" }] : /* istanbul ignore next */ []));
|
|
258
|
+
/** Líneas destacadas: `"2,5-7"` o `[2, 5, 6, 7]`. */
|
|
259
|
+
this.highlightLines = input('', /* @ts-ignore */
|
|
260
|
+
...(ngDevMode ? [{ debugName: "highlightLines" }] : /* istanbul ignore next */ []));
|
|
261
|
+
/** Parte las líneas largas en lugar de hacer scroll horizontal. */
|
|
262
|
+
this.wrap = input(false, { ...(ngDevMode ? { debugName: "wrap" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
263
|
+
this.copyable = input(true, { ...(ngDevMode ? { debugName: "copyable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
264
|
+
/** Muestra la cabecera (lenguaje o archivo y copiar). */
|
|
265
|
+
this.header = input(true, { ...(ngDevMode ? { debugName: "header" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
266
|
+
/** Alto máximo con scroll (`20rem`). */
|
|
267
|
+
this.maxHeight = input('', /* @ts-ignore */
|
|
268
|
+
...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
|
|
269
|
+
/** Nombre del bloque. Por defecto, el archivo o el lenguaje. */
|
|
270
|
+
this.ariaLabel = input(undefined, /* @ts-ignore */
|
|
271
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
272
|
+
/** Tokens por línea (sin la línea vacía final que deja un salto de línea al terminar). */
|
|
273
|
+
this.lines = computed(() => cbHighlight(this.code().replace(/\n$/, ''), this.language()), /* @ts-ignore */
|
|
274
|
+
...(ngDevMode ? [{ debugName: "lines" }] : /* istanbul ignore next */ []));
|
|
275
|
+
this.highlighted = computed(() => cbParseLineSet(this.highlightLines()), /* @ts-ignore */
|
|
276
|
+
...(ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []));
|
|
277
|
+
this.languageLabel = computed(() => (this.language() ? cbCodeLanguageLabel(this.language()) : ''), /* @ts-ignore */
|
|
278
|
+
...(ngDevMode ? [{ debugName: "languageLabel" }] : /* istanbul ignore next */ []));
|
|
279
|
+
this.showHeader = computed(() => this.header() && (!!this.filename() || !!this.language() || this.copyable()), /* @ts-ignore */
|
|
280
|
+
...(ngDevMode ? [{ debugName: "showHeader" }] : /* istanbul ignore next */ []));
|
|
281
|
+
}
|
|
282
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCodeBlock, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
283
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbCodeBlock, isStandalone: true, selector: "cb-code-block", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: false, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null }, filename: { classPropertyName: "filename", publicName: "filename", isSignal: true, isRequired: false, transformFunction: null }, lineNumbers: { classPropertyName: "lineNumbers", publicName: "lineNumbers", isSignal: true, isRequired: false, transformFunction: null }, startLine: { classPropertyName: "startLine", publicName: "startLine", isSignal: true, isRequired: false, transformFunction: null }, highlightLines: { classPropertyName: "highlightLines", publicName: "highlightLines", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, copyable: { classPropertyName: "copyable", publicName: "copyable", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cb-code-block--wrap": "wrap()", "class.cb-code-block--numbers": "lineNumbers()" }, classAttribute: "cb-code-block" }, ngImport: i0, template: `
|
|
284
|
+
@if (showHeader()) {
|
|
285
|
+
<div class="cb-code-block__header">
|
|
286
|
+
<span class="cb-code-block__title">{{ filename() || languageLabel() }}</span>
|
|
287
|
+
@if (copyable()) {
|
|
288
|
+
<cb-copy-button class="cb-code-block__copy" [value]="code()" size="sm" />
|
|
289
|
+
}
|
|
290
|
+
</div>
|
|
291
|
+
}
|
|
292
|
+
<pre
|
|
293
|
+
class="cb-code-block__pre"
|
|
294
|
+
tabindex="0"
|
|
295
|
+
[style.max-height]="maxHeight() || null"
|
|
296
|
+
[attr.aria-label]="ariaLabel() ?? (filename() || languageLabel() || null)"
|
|
297
|
+
><!-- En una línea: dentro de <pre> cada espacio cuenta. --><code class="cb-code-block__code">@for (line of lines(); track $index; let i = $index) {<span class="cb-code-block__line" [class.cb-code-block__line--hl]="highlighted().has(i + startLine())">@if (lineNumbers()) {<span class="cb-code-block__ln" aria-hidden="true">{{ i + startLine() }}</span>}<span class="cb-code-block__text">@for (token of line; track $index) {<span [class]="token.type === 'plain' ? null : 'cb-tok cb-tok-' + token.type">{{ token.text }}</span>}</span></span>}</code></pre>
|
|
298
|
+
`, isInline: true, styles: [":host{--cb-code-bg: #f6f8fa;--cb-code-fg: #1f2328;--cb-code-border: var(--cb-color-border);--cb-code-muted: #6e7781;--cb-code-hl: rgb(234 179 8 / .16);--cb-tok-keyword: #cf222e;--cb-tok-builtin: #0550ae;--cb-tok-string: #0a3069;--cb-tok-number: #0550ae;--cb-tok-comment: #6e7781;--cb-tok-function: #8250df;--cb-tok-operator: #cf222e;--cb-tok-punctuation: #57606a;--cb-tok-tag: #116329;--cb-tok-attr: #0550ae;--cb-tok-property: #0550ae;--cb-tok-variable: #1f2328;display:block;overflow:hidden;border:1px solid var(--cb-code-border);border-radius:var(--cb-radius-md, 8px);background:var(--cb-code-bg);color:var(--cb-code-fg);font-family:var(--cb-font-sans)}:host-context([data-theme=\"dark\"]){--cb-code-bg: #0d1117;--cb-code-fg: #e6edf3;--cb-code-muted: #8b949e;--cb-code-hl: rgb(234 179 8 / .14);--cb-tok-keyword: #ff7b72;--cb-tok-builtin: #79c0ff;--cb-tok-string: #a5d6ff;--cb-tok-number: #79c0ff;--cb-tok-comment: #8b949e;--cb-tok-function: #d2a8ff;--cb-tok-operator: #ff7b72;--cb-tok-punctuation: #b1bac4;--cb-tok-tag: #7ee787;--cb-tok-attr: #79c0ff;--cb-tok-property: #79c0ff;--cb-tok-variable: #e6edf3}.cb-code-block__header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-height:2.25rem;padding:.125rem .25rem .125rem .875rem;border-bottom:1px solid var(--cb-code-border);color:var(--cb-code-muted);font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-medium, 500)}.cb-code-block__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cb-code-block__pre{margin:0;padding:.75rem 0;overflow:auto;font-family:var(--cb-font-mono);font-size:.8125rem;line-height:1.6;tab-size:2}.cb-code-block__pre:focus-visible{outline:2px solid var(--cb-color-focus-ring);outline-offset:-2px}.cb-code-block__code{display:block;min-width:fit-content;font:inherit}.cb-code-block__line{display:flex;padding:0 1rem}.cb-code-block__line--hl{background:var(--cb-code-hl);box-shadow:inset 3px 0 #eab308cc}.cb-code-block__ln{flex:none;min-width:2ch;margin-right:1rem;color:var(--cb-code-muted);text-align:right;-webkit-user-select:none;user-select:none}.cb-code-block__text{white-space:pre}.cb-code-block__text:empty:before{content:\" \"}:host(.cb-code-block--wrap) .cb-code-block__code{min-width:0}:host(.cb-code-block--wrap) .cb-code-block__text{white-space:pre-wrap;overflow-wrap:anywhere}.cb-tok-keyword{color:var(--cb-tok-keyword)}.cb-tok-builtin{color:var(--cb-tok-builtin)}.cb-tok-string{color:var(--cb-tok-string)}.cb-tok-number{color:var(--cb-tok-number)}.cb-tok-comment{color:var(--cb-tok-comment);font-style:italic}.cb-tok-function{color:var(--cb-tok-function)}.cb-tok-operator{color:var(--cb-tok-operator)}.cb-tok-punctuation{color:var(--cb-tok-punctuation)}.cb-tok-tag{color:var(--cb-tok-tag)}.cb-tok-attr{color:var(--cb-tok-attr)}.cb-tok-property{color:var(--cb-tok-property)}.cb-tok-variable{color:var(--cb-tok-variable)}\n"], dependencies: [{ kind: "component", type: CbCopyButton, selector: "cb-copy-button", inputs: ["value", "showLabel", "label", "copiedLabel", "timeout", "variant", "severity", "size", "disabled"], outputs: ["copied", "copyError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
299
|
+
}
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCodeBlock, decorators: [{
|
|
301
|
+
type: Component,
|
|
302
|
+
args: [{ selector: 'cb-code-block', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [CbCopyButton], host: {
|
|
303
|
+
class: 'cb-code-block',
|
|
304
|
+
'[class.cb-code-block--wrap]': 'wrap()',
|
|
305
|
+
'[class.cb-code-block--numbers]': 'lineNumbers()',
|
|
306
|
+
}, template: `
|
|
307
|
+
@if (showHeader()) {
|
|
308
|
+
<div class="cb-code-block__header">
|
|
309
|
+
<span class="cb-code-block__title">{{ filename() || languageLabel() }}</span>
|
|
310
|
+
@if (copyable()) {
|
|
311
|
+
<cb-copy-button class="cb-code-block__copy" [value]="code()" size="sm" />
|
|
312
|
+
}
|
|
313
|
+
</div>
|
|
314
|
+
}
|
|
315
|
+
<pre
|
|
316
|
+
class="cb-code-block__pre"
|
|
317
|
+
tabindex="0"
|
|
318
|
+
[style.max-height]="maxHeight() || null"
|
|
319
|
+
[attr.aria-label]="ariaLabel() ?? (filename() || languageLabel() || null)"
|
|
320
|
+
><!-- En una línea: dentro de <pre> cada espacio cuenta. --><code class="cb-code-block__code">@for (line of lines(); track $index; let i = $index) {<span class="cb-code-block__line" [class.cb-code-block__line--hl]="highlighted().has(i + startLine())">@if (lineNumbers()) {<span class="cb-code-block__ln" aria-hidden="true">{{ i + startLine() }}</span>}<span class="cb-code-block__text">@for (token of line; track $index) {<span [class]="token.type === 'plain' ? null : 'cb-tok cb-tok-' + token.type">{{ token.text }}</span>}</span></span>}</code></pre>
|
|
321
|
+
`, styles: [":host{--cb-code-bg: #f6f8fa;--cb-code-fg: #1f2328;--cb-code-border: var(--cb-color-border);--cb-code-muted: #6e7781;--cb-code-hl: rgb(234 179 8 / .16);--cb-tok-keyword: #cf222e;--cb-tok-builtin: #0550ae;--cb-tok-string: #0a3069;--cb-tok-number: #0550ae;--cb-tok-comment: #6e7781;--cb-tok-function: #8250df;--cb-tok-operator: #cf222e;--cb-tok-punctuation: #57606a;--cb-tok-tag: #116329;--cb-tok-attr: #0550ae;--cb-tok-property: #0550ae;--cb-tok-variable: #1f2328;display:block;overflow:hidden;border:1px solid var(--cb-code-border);border-radius:var(--cb-radius-md, 8px);background:var(--cb-code-bg);color:var(--cb-code-fg);font-family:var(--cb-font-sans)}:host-context([data-theme=\"dark\"]){--cb-code-bg: #0d1117;--cb-code-fg: #e6edf3;--cb-code-muted: #8b949e;--cb-code-hl: rgb(234 179 8 / .14);--cb-tok-keyword: #ff7b72;--cb-tok-builtin: #79c0ff;--cb-tok-string: #a5d6ff;--cb-tok-number: #79c0ff;--cb-tok-comment: #8b949e;--cb-tok-function: #d2a8ff;--cb-tok-operator: #ff7b72;--cb-tok-punctuation: #b1bac4;--cb-tok-tag: #7ee787;--cb-tok-attr: #79c0ff;--cb-tok-property: #79c0ff;--cb-tok-variable: #e6edf3}.cb-code-block__header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-height:2.25rem;padding:.125rem .25rem .125rem .875rem;border-bottom:1px solid var(--cb-code-border);color:var(--cb-code-muted);font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-medium, 500)}.cb-code-block__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cb-code-block__pre{margin:0;padding:.75rem 0;overflow:auto;font-family:var(--cb-font-mono);font-size:.8125rem;line-height:1.6;tab-size:2}.cb-code-block__pre:focus-visible{outline:2px solid var(--cb-color-focus-ring);outline-offset:-2px}.cb-code-block__code{display:block;min-width:fit-content;font:inherit}.cb-code-block__line{display:flex;padding:0 1rem}.cb-code-block__line--hl{background:var(--cb-code-hl);box-shadow:inset 3px 0 #eab308cc}.cb-code-block__ln{flex:none;min-width:2ch;margin-right:1rem;color:var(--cb-code-muted);text-align:right;-webkit-user-select:none;user-select:none}.cb-code-block__text{white-space:pre}.cb-code-block__text:empty:before{content:\" \"}:host(.cb-code-block--wrap) .cb-code-block__code{min-width:0}:host(.cb-code-block--wrap) .cb-code-block__text{white-space:pre-wrap;overflow-wrap:anywhere}.cb-tok-keyword{color:var(--cb-tok-keyword)}.cb-tok-builtin{color:var(--cb-tok-builtin)}.cb-tok-string{color:var(--cb-tok-string)}.cb-tok-number{color:var(--cb-tok-number)}.cb-tok-comment{color:var(--cb-tok-comment);font-style:italic}.cb-tok-function{color:var(--cb-tok-function)}.cb-tok-operator{color:var(--cb-tok-operator)}.cb-tok-punctuation{color:var(--cb-tok-punctuation)}.cb-tok-tag{color:var(--cb-tok-tag)}.cb-tok-attr{color:var(--cb-tok-attr)}.cb-tok-property{color:var(--cb-tok-property)}.cb-tok-variable{color:var(--cb-tok-variable)}\n"] }]
|
|
322
|
+
}], propDecorators: { code: [{ type: i0.Input, args: [{ isSignal: true, alias: "code", required: false }] }], language: [{ type: i0.Input, args: [{ isSignal: true, alias: "language", required: false }] }], filename: [{ type: i0.Input, args: [{ isSignal: true, alias: "filename", required: false }] }], lineNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineNumbers", required: false }] }], startLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "startLine", required: false }] }], highlightLines: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightLines", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], copyable: [{ type: i0.Input, args: [{ isSignal: true, alias: "copyable", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
323
|
+
|
|
324
|
+
/*
|
|
325
|
+
* Public API Surface de @caribeng/ui/code-block
|
|
326
|
+
*/
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Generated bundle index. Do not edit.
|
|
330
|
+
*/
|
|
331
|
+
|
|
332
|
+
export { CbCodeBlock, cbCodeLanguageLabel, cbCodeSupports, cbHighlight, cbParseLineSet };
|