ngwr 10.2.1 → 11.0.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 +39 -19
- package/anchor/styles/_index.scss +4 -4
- package/back-top/styles/_index.scss +6 -1
- package/blur-text/styles/_index.scss +13 -0
- package/button/styles/_index.scss +11 -6
- package/carousel/styles/_index.scss +13 -2
- package/cascader/styles/_index.scss +2 -2
- package/circular-text/styles/_index.scss +2 -0
- package/collapse/styles/_index.scss +1 -1
- package/color-picker/styles/_index.scss +6 -1
- package/compare/styles/_index.scss +1 -2
- package/context-menu/styles/_index.scss +6 -1
- package/descriptions/styles/_index.scss +2 -2
- package/dialog/styles/_index.scss +7 -0
- package/drawer/styles/_index.scss +20 -1
- package/dropdown/styles/_index.scss +19 -5
- package/empty/styles/_index.scss +10 -0
- package/fesm2022/ngwr-action-sheet.mjs +13 -3
- package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
- package/fesm2022/ngwr-affix.mjs +40 -13
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +18 -6
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-aurora.mjs +2 -2
- package/fesm2022/ngwr-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +31 -7
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +6 -2
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +1 -1
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart.mjs +30 -9
- package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text.mjs +2 -2
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +2 -2
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +9 -4
- package/fesm2022/ngwr-burger.mjs.map +1 -1
- package/fesm2022/ngwr-button-testing.mjs +96 -0
- package/fesm2022/ngwr-button-testing.mjs.map +1 -0
- package/fesm2022/ngwr-button.mjs +31 -14
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +40 -8
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +20 -1
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +2 -2
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs +377 -0
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -0
- package/fesm2022/ngwr-carousel.mjs +67 -13
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs +534 -0
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -0
- package/fesm2022/ngwr-cascader.mjs +2 -2
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox-testing.mjs +90 -0
- package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -0
- package/fesm2022/ngwr-checkbox.mjs +9 -3
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +2 -2
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +2 -2
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-collapse-testing.mjs +368 -0
- package/fesm2022/ngwr-collapse-testing.mjs.map +1 -0
- package/fesm2022/ngwr-color-picker.mjs +134 -14
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette-testing.mjs +589 -0
- package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -0
- package/fesm2022/ngwr-command-palette.mjs +58 -8
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +103 -13
- package/fesm2022/ngwr-compare.mjs.map +1 -1
- package/fesm2022/ngwr-config.mjs +106 -0
- package/fesm2022/ngwr-config.mjs.map +1 -0
- package/fesm2022/ngwr-context-menu-testing.mjs +631 -0
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -0
- package/fesm2022/ngwr-context-menu.mjs +94 -8
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +5 -1
- package/fesm2022/ngwr-cookie.mjs.map +1 -1
- package/fesm2022/ngwr-counter.mjs +11 -3
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapter-luxon.mjs +52 -4
- package/fesm2022/ngwr-date-adapter-luxon.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapter.mjs +54 -8
- package/fesm2022/ngwr-date-adapter.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker-testing.mjs +766 -0
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -0
- package/fesm2022/ngwr-date-picker.mjs +73 -3
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text.mjs +27 -9
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
- package/fesm2022/ngwr-dialog-testing.mjs +89 -0
- package/fesm2022/ngwr-dialog-testing.mjs.map +1 -0
- package/fesm2022/ngwr-directives.mjs +36 -12
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart.mjs +22 -5
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +2 -2
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer-testing.mjs +250 -0
- package/fesm2022/ngwr-drawer-testing.mjs.map +1 -0
- package/fesm2022/ngwr-dropdown-testing.mjs +291 -0
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -0
- package/fesm2022/ngwr-dropdown.mjs +10 -2
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +24 -7
- package/fesm2022/ngwr-empty.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +57 -10
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +2 -2
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +332 -0
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -0
- package/fesm2022/ngwr-form-testing.mjs +451 -0
- package/fesm2022/ngwr-form-testing.mjs.map +1 -0
- package/fesm2022/ngwr-form.mjs +19 -3
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +9 -2
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +19 -5
- package/fesm2022/ngwr-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +2 -2
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +2 -2
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +50 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +48 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper.mjs +23 -0
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number-testing.mjs +306 -0
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -0
- package/fesm2022/ngwr-input-number.mjs +35 -3
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp-testing.mjs +419 -0
- package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -0
- package/fesm2022/ngwr-input-otp.mjs +36 -5
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs +102 -0
- package/fesm2022/ngwr-input-testing.mjs.map +1 -0
- package/fesm2022/ngwr-input.mjs +47 -10
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +44 -8
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +21 -5
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +33 -6
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +17 -4
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +2 -2
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown-testing.mjs +516 -0
- package/fesm2022/ngwr-markdown-testing.mjs.map +1 -0
- package/fesm2022/ngwr-markdown.mjs +1492 -0
- package/fesm2022/ngwr-markdown.mjs.map +1 -0
- package/fesm2022/ngwr-marquee.mjs +17 -6
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-mention-testing.mjs +513 -0
- package/fesm2022/ngwr-mention-testing.mjs.map +1 -0
- package/fesm2022/ngwr-mention.mjs +10 -1
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +22 -7
- package/fesm2022/ngwr-meta.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group.mjs +19 -5
- package/fesm2022/ngwr-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +41 -1
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination-testing.mjs +389 -0
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -0
- package/fesm2022/ngwr-pagination.mjs +14 -2
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs +309 -0
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -0
- package/fesm2022/ngwr-popconfirm.mjs +95 -17
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +316 -0
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -0
- package/fesm2022/ngwr-popover.mjs +21 -3
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh.mjs +17 -2
- package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +13 -3
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio-testing.mjs +392 -0
- package/fesm2022/ngwr-radio-testing.mjs.map +1 -0
- package/fesm2022/ngwr-radio.mjs +10 -3
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-rating-testing.mjs +384 -0
- package/fesm2022/ngwr-rating-testing.mjs.map +1 -0
- package/fesm2022/ngwr-rating.mjs +37 -2
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-segmented-testing.mjs +512 -0
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -0
- package/fesm2022/ngwr-select-testing.mjs +268 -0
- package/fesm2022/ngwr-select-testing.mjs.map +1 -0
- package/fesm2022/ngwr-select.mjs +87 -16
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +2 -2
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +65 -12
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-slider-testing.mjs +478 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -0
- package/fesm2022/ngwr-slider.mjs +57 -13
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +26 -6
- package/fesm2022/ngwr-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +37 -4
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +12 -3
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor.mjs +2 -2
- package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-split-text.mjs +2 -2
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +70 -9
- package/fesm2022/ngwr-splitter.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card.mjs +2 -2
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +2 -2
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +24 -7
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper-testing.mjs +477 -0
- package/fesm2022/ngwr-stepper-testing.mjs.map +1 -0
- package/fesm2022/ngwr-switch-testing.mjs +77 -0
- package/fesm2022/ngwr-switch-testing.mjs.map +1 -0
- package/fesm2022/ngwr-switch.mjs +9 -3
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs +580 -0
- package/fesm2022/ngwr-table-testing.mjs.map +1 -0
- package/fesm2022/ngwr-table.mjs +87 -14
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +617 -0
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tabs.mjs +38 -6
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs +238 -0
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -0
- package/fesm2022/ngwr-textarea.mjs +32 -4
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +2 -2
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-toast-testing.mjs +101 -0
- package/fesm2022/ngwr-toast-testing.mjs.map +1 -0
- package/fesm2022/ngwr-toast.mjs +2 -2
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +61 -9
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer-testing.mjs +538 -0
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -0
- package/fesm2022/ngwr-transfer.mjs +45 -14
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +734 -0
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tree.mjs +73 -7
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +5 -3
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +31 -5
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +3 -3
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +8 -0
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/gauge/styles/_index.scss +1 -1
- package/glitch-text/styles/_index.scss +4 -0
- package/i18n/en.json +48 -0
- package/i18n/ru.json +48 -0
- package/image-cropper/styles/_index.scss +13 -1
- package/input/styles/_index.scss +2 -2
- package/input-number/styles/_index.scss +7 -2
- package/knob/styles/_index.scss +8 -1
- package/layout/styles/_index.scss +3 -3
- package/lightbox/styles/_index.scss +10 -2
- package/line-chart/styles/_index.scss +6 -0
- package/llms-full.txt +151 -4
- package/llms.txt +57 -8
- package/loading-bar/styles/_index.scss +1 -2
- package/markdown/styles/_index.scss +296 -0
- package/marquee/styles/_index.scss +12 -0
- package/mcp/api.js +512 -0
- package/mcp/catalog.js +157 -0
- package/mcp/server.js +273 -0
- package/mcp/tools.js +366 -0
- package/meter-group/styles/_index.scss +1 -1
- package/package.json +186 -35
- package/pagination/styles/_index.scss +6 -6
- package/popover/styles/_index.scss +37 -5
- package/rating/styles/_index.scss +10 -0
- package/schematics/use/symbol-map.json +2 -0
- package/segmented/styles/_index.scss +7 -0
- package/select/styles/_index.scss +29 -9
- package/sidebar/styles/_index.scss +30 -5
- package/slider/styles/_index.scss +15 -0
- package/speed-dial/styles/_index.scss +20 -0
- package/split-text/styles/_index.scss +13 -0
- package/star-border/styles/_index.scss +2 -0
- package/stepper/styles/_index.scss +1 -1
- package/styles/_grid.scss +4 -4
- package/styles.scss +1 -0
- package/switch/styles/_index.scss +5 -3
- package/table/styles/_index.scss +22 -11
- package/tabs/styles/_index.scss +11 -1
- package/textarea/styles/_index.scss +5 -0
- package/theme/styles/_colors.scss +29 -13
- package/theme/styles/_dark.scss +11 -3
- package/theme/styles/_mixins.scss +3 -0
- package/timeline/styles/_index.scss +2 -2
- package/toast/styles/_index.scss +17 -8
- package/toolbar/styles/_index.scss +3 -3
- package/tour/styles/_index.scss +7 -1
- package/tree/styles/_index.scss +5 -3
- package/types/ngwr-action-sheet.d.ts +9 -1
- package/types/ngwr-affix.d.ts +7 -1
- package/types/ngwr-anchor.d.ts +8 -1
- package/types/ngwr-avatar.d.ts +13 -3
- package/types/ngwr-bar-chart.d.ts +16 -0
- package/types/ngwr-burger.d.ts +6 -2
- package/types/ngwr-button-testing.d.ts +85 -0
- package/types/ngwr-button.d.ts +26 -10
- package/types/ngwr-calendar-heatmap.d.ts +16 -2
- package/types/ngwr-calendar.d.ts +10 -0
- package/types/ngwr-carousel-testing.d.ts +257 -0
- package/types/ngwr-carousel.d.ts +20 -4
- package/types/ngwr-cascader-testing.d.ts +392 -0
- package/types/ngwr-checkbox-testing.d.ts +77 -0
- package/types/ngwr-checkbox.d.ts +7 -2
- package/types/ngwr-collapse-testing.d.ts +290 -0
- package/types/ngwr-color-picker.d.ts +20 -11
- package/types/ngwr-command-palette-testing.d.ts +437 -0
- package/types/ngwr-command-palette.d.ts +25 -2
- package/types/ngwr-compare.d.ts +50 -2
- package/types/ngwr-config.d.ts +176 -0
- package/types/ngwr-context-menu-testing.d.ts +401 -0
- package/types/ngwr-context-menu.d.ts +65 -17
- package/types/ngwr-counter.d.ts +6 -1
- package/types/ngwr-date-adapter-luxon.d.ts +26 -0
- package/types/ngwr-date-picker-testing.d.ts +518 -0
- package/types/ngwr-date-picker.d.ts +4 -0
- package/types/ngwr-dialog-testing.d.ts +79 -0
- package/types/ngwr-directives.d.ts +10 -1
- package/types/ngwr-donut-chart.d.ts +8 -1
- package/types/ngwr-drawer-testing.d.ts +196 -0
- package/types/ngwr-dropdown-testing.d.ts +202 -0
- package/types/ngwr-dropdown.d.ts +7 -1
- package/types/ngwr-empty.d.ts +19 -4
- package/types/ngwr-event-calendar.d.ts +26 -1
- package/types/ngwr-file-upload-testing.d.ts +194 -0
- package/types/ngwr-form-testing.d.ts +379 -0
- package/types/ngwr-form.d.ts +17 -0
- package/types/ngwr-gauge.d.ts +13 -1
- package/types/ngwr-image-cropper.d.ts +10 -0
- package/types/ngwr-input-number-testing.d.ts +226 -0
- package/types/ngwr-input-number.d.ts +29 -1
- package/types/ngwr-input-otp-testing.d.ts +299 -0
- package/types/ngwr-input-otp.d.ts +23 -2
- package/types/ngwr-input-testing.d.ts +84 -0
- package/types/ngwr-input.d.ts +20 -6
- package/types/ngwr-knob.d.ts +18 -0
- package/types/ngwr-layout.d.ts +1 -0
- package/types/ngwr-lightbox.d.ts +17 -3
- package/types/ngwr-line-chart.d.ts +9 -2
- package/types/ngwr-markdown-testing.d.ts +462 -0
- package/types/ngwr-markdown.d.ts +534 -0
- package/types/ngwr-marquee.d.ts +12 -2
- package/types/ngwr-mention-testing.d.ts +359 -0
- package/types/ngwr-meta.d.ts +4 -2
- package/types/ngwr-meter-group.d.ts +11 -1
- package/types/ngwr-overlay.d.ts +33 -2
- package/types/ngwr-pagination-testing.d.ts +291 -0
- package/types/ngwr-pagination.d.ts +1 -0
- package/types/ngwr-popconfirm-testing.d.ts +235 -0
- package/types/ngwr-popconfirm.d.ts +31 -21
- package/types/ngwr-popover-testing.d.ts +221 -0
- package/types/ngwr-popover.d.ts +9 -0
- package/types/ngwr-pull-to-refresh.d.ts +7 -0
- package/types/ngwr-qr.d.ts +9 -1
- package/types/ngwr-radio-testing.d.ts +296 -0
- package/types/ngwr-radio.d.ts +8 -2
- package/types/ngwr-rating-testing.d.ts +291 -0
- package/types/ngwr-rating.d.ts +23 -0
- package/types/ngwr-segmented-testing.d.ts +401 -0
- package/types/ngwr-select-testing.d.ts +175 -0
- package/types/ngwr-select.d.ts +45 -4
- package/types/ngwr-sidebar.d.ts +17 -2
- package/types/ngwr-slider-testing.d.ts +329 -0
- package/types/ngwr-slider.d.ts +35 -1
- package/types/ngwr-sparkline.d.ts +12 -2
- package/types/ngwr-speed-dial.d.ts +17 -18
- package/types/ngwr-spinner.d.ts +8 -1
- package/types/ngwr-splitter.d.ts +24 -1
- package/types/ngwr-statistic.d.ts +12 -2
- package/types/ngwr-stepper-testing.d.ts +346 -0
- package/types/ngwr-switch-testing.d.ts +66 -0
- package/types/ngwr-switch.d.ts +7 -2
- package/types/ngwr-table-testing.d.ts +423 -0
- package/types/ngwr-table.d.ts +42 -0
- package/types/ngwr-tabs-testing.d.ts +470 -0
- package/types/ngwr-tabs.d.ts +9 -0
- package/types/ngwr-textarea-testing.d.ts +184 -0
- package/types/ngwr-textarea.d.ts +7 -2
- package/types/ngwr-toast-testing.d.ts +80 -0
- package/types/ngwr-tour.d.ts +27 -0
- package/types/ngwr-transfer-testing.d.ts +444 -0
- package/types/ngwr-transfer.d.ts +16 -1
- package/types/ngwr-tree-testing.d.ts +501 -0
- package/types/ngwr-tree.d.ts +33 -0
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-virtual-scroll.d.ts +13 -1
- package/typewriter/styles/_index.scss +1 -1
- package/typography/styles/_index.scss +1 -1
- package/window/styles/_index.scss +32 -9
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* What these types are, and why they keep `Harness` in their names.
|
|
11
|
+
*
|
|
12
|
+
* `ngwr/markdown` already exports a node tree — `WrMarkdownBlock`,
|
|
13
|
+
* `WrMarkdownListItem`, `WrMarkdownCell` — which is what the PARSER produced. The
|
|
14
|
+
* types here are what the DOM says afterwards, and a spec imports both entry
|
|
15
|
+
* points, so a second `WrMarkdownListItem` in scope would be one import line away
|
|
16
|
+
* from an assertion about the wrong half of the pipeline. They are deliberately
|
|
17
|
+
* flat snapshots rather than harnesses: rendered prose is inert, there is nothing
|
|
18
|
+
* to drive, and a `toEqual` over one object says more than six awaited reads.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* How a table column is aligned, as the delimiter row asked for it.
|
|
22
|
+
*
|
|
23
|
+
* Logical values, never `left` / `right`: the alignment mirrors under `dir="rtl"`
|
|
24
|
+
* on its own, and a harness reporting the physical edge would make an RTL
|
|
25
|
+
* regression look like the intended behaviour. `null` is a column the delimiter
|
|
26
|
+
* row said nothing about.
|
|
27
|
+
*/
|
|
28
|
+
type WrMarkdownHarnessAlign = 'start' | 'center' | 'end' | null;
|
|
29
|
+
/** One rendered heading. */
|
|
30
|
+
interface WrMarkdownHarnessHeading {
|
|
31
|
+
/**
|
|
32
|
+
* The heading level, 1–6, read from the ELEMENT the renderer chose.
|
|
33
|
+
*
|
|
34
|
+
* Not from an `aria-level` or a class: `<wr-markdown>` renders a real `<h1>` …
|
|
35
|
+
* `<h6>`, which is what carries the level to assistive technology and to every
|
|
36
|
+
* stylesheet, and a `<div role="heading">` regression has to show up here.
|
|
37
|
+
*/
|
|
38
|
+
readonly level: number;
|
|
39
|
+
/** The heading's text, whitespace collapsed. */
|
|
40
|
+
readonly text: string;
|
|
41
|
+
/**
|
|
42
|
+
* The slug the document can be linked into, or `null` when `headingIds` is off.
|
|
43
|
+
*
|
|
44
|
+
* `null` is the whole reason this is reported rather than assumed: an anchor
|
|
45
|
+
* that silently stops being generated breaks every deep link into the page and
|
|
46
|
+
* changes nothing on screen.
|
|
47
|
+
*/
|
|
48
|
+
readonly id: string | null;
|
|
49
|
+
}
|
|
50
|
+
/** One rendered link. */
|
|
51
|
+
interface WrMarkdownHarnessLink {
|
|
52
|
+
/** The link's visible text. */
|
|
53
|
+
readonly text: string;
|
|
54
|
+
/** The `href` attribute as written, unresolved — a relative path stays relative. */
|
|
55
|
+
readonly href: string | null;
|
|
56
|
+
/** The link's `title`, or `null` when the source gave none. */
|
|
57
|
+
readonly title: string | null;
|
|
58
|
+
/** Where the link opens, or `null` when `linkTarget` is off. */
|
|
59
|
+
readonly target: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* The `rel`, which is not decoration: a `target="_blank"` without
|
|
62
|
+
* `noopener noreferrer` hands `window.opener` to a page whose URL came out of
|
|
63
|
+
* the document being rendered — untrusted input, by construction. Assert the
|
|
64
|
+
* pair together.
|
|
65
|
+
*/
|
|
66
|
+
readonly rel: string | null;
|
|
67
|
+
}
|
|
68
|
+
/** One rendered image. */
|
|
69
|
+
interface WrMarkdownHarnessImage {
|
|
70
|
+
/** The `src` attribute as written. A refused URL renders no image at all. */
|
|
71
|
+
readonly src: string | null;
|
|
72
|
+
/** The alt text — also what a refused `src` leaves behind as plain text. */
|
|
73
|
+
readonly alt: string | null;
|
|
74
|
+
/** The image's `title`, or `null` when the source gave none. */
|
|
75
|
+
readonly title: string | null;
|
|
76
|
+
}
|
|
77
|
+
/** One rendered task-list item. */
|
|
78
|
+
interface WrMarkdownHarnessTaskItem {
|
|
79
|
+
/**
|
|
80
|
+
* The item's visible text, with the hidden state label left out — so this is
|
|
81
|
+
* `'ship it'` and not `'Done: ship it'`.
|
|
82
|
+
*/
|
|
83
|
+
readonly text: string;
|
|
84
|
+
/** Whether the box is ticked (`- [x]`). */
|
|
85
|
+
readonly checked: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* The state as assistive technology hears it, or `null` when nothing announces
|
|
88
|
+
* it.
|
|
89
|
+
*
|
|
90
|
+
* The tick is a presentational `<span aria-hidden>` — a real
|
|
91
|
+
* `<input type="checkbox">` would be an unlabelled form control, and making it
|
|
92
|
+
* operable would promise an interaction a renderer cannot honour — so this
|
|
93
|
+
* hidden text is the ONLY thing that carries the state to a screen reader. It
|
|
94
|
+
* comes from `taskDoneLabel` / `taskTodoLabel`, so it is localized, and `null`
|
|
95
|
+
* here is a checked box nobody is told about.
|
|
96
|
+
*/
|
|
97
|
+
readonly stateLabel: string | null;
|
|
98
|
+
}
|
|
99
|
+
/** One rendered GFM table, as a snapshot. */
|
|
100
|
+
interface WrMarkdownHarnessTable {
|
|
101
|
+
/** The header cells, in column order. */
|
|
102
|
+
readonly headers: string[];
|
|
103
|
+
/**
|
|
104
|
+
* The body rows, one array of cell text per row.
|
|
105
|
+
*
|
|
106
|
+
* Every row is as wide as the header — the renderer pads a short row and
|
|
107
|
+
* truncates a long one — so this is a rectangle, which is what makes it
|
|
108
|
+
* assertable in one `toEqual`.
|
|
109
|
+
*/
|
|
110
|
+
readonly rows: string[][];
|
|
111
|
+
/** One entry per column, in the same order as {@link headers}. */
|
|
112
|
+
readonly align: WrMarkdownHarnessAlign[];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @license
|
|
117
|
+
*
|
|
118
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
119
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/** Narrows which `<wr-markdown>` a harness query matches. */
|
|
123
|
+
interface WrMarkdownHarnessFilters extends BaseHarnessFilters {
|
|
124
|
+
/**
|
|
125
|
+
* Match the document's rendered text — whitespace collapsed, the hidden
|
|
126
|
+
* task-state labels left out, the way `getText()` reads it.
|
|
127
|
+
*
|
|
128
|
+
* A string is an exact match against the WHOLE document, which is almost never
|
|
129
|
+
* what a spec means for anything longer than a line; a RegExp is tested, which
|
|
130
|
+
* is.
|
|
131
|
+
*/
|
|
132
|
+
readonly text?: string | RegExp;
|
|
133
|
+
/**
|
|
134
|
+
* Match a document that renders a heading with this text, at any level.
|
|
135
|
+
*
|
|
136
|
+
* The heading rather than the first line: a document's title is the one piece
|
|
137
|
+
* of it a spec can name without restating its contents.
|
|
138
|
+
*/
|
|
139
|
+
readonly headingText?: string | RegExp;
|
|
140
|
+
/**
|
|
141
|
+
* Match a document that renders a fenced block in this language.
|
|
142
|
+
*
|
|
143
|
+
* The language is the info string's first word, lowercased — what the renderer
|
|
144
|
+
* puts in `data-language`. A BARE fence claims none, so no filter value finds
|
|
145
|
+
* one: `<wr-markdown>` cannot report a language nobody wrote.
|
|
146
|
+
*/
|
|
147
|
+
readonly codeLanguage?: string | RegExp;
|
|
148
|
+
/**
|
|
149
|
+
* Match only streaming (`true`) or only settled (`false`) documents.
|
|
150
|
+
*
|
|
151
|
+
* Read from the host modifier the caret is painted with, so this is the
|
|
152
|
+
* document's rendered state and not the input that asked for it.
|
|
153
|
+
*/
|
|
154
|
+
readonly streaming?: boolean;
|
|
155
|
+
}
|
|
156
|
+
/** Narrows which fenced code block of a document a harness query matches. */
|
|
157
|
+
interface WrMarkdownCodeBlockHarnessFilters extends BaseHarnessFilters {
|
|
158
|
+
/**
|
|
159
|
+
* Match the block's language — a string is an exact match, a RegExp is tested.
|
|
160
|
+
*
|
|
161
|
+
* A bare fence has no language and matches neither form.
|
|
162
|
+
*/
|
|
163
|
+
readonly language?: string | RegExp;
|
|
164
|
+
/**
|
|
165
|
+
* Match the block's code.
|
|
166
|
+
*
|
|
167
|
+
* A string is an exact match against the whole snippet, newlines and
|
|
168
|
+
* indentation included — that is the point of the block, and it is also why a
|
|
169
|
+
* RegExp is usually the form worth writing here.
|
|
170
|
+
*/
|
|
171
|
+
readonly code?: string | RegExp;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @license
|
|
176
|
+
*
|
|
177
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
178
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
179
|
+
*/
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Test harness for one fenced code block of a `<wr-markdown>` document.
|
|
183
|
+
*
|
|
184
|
+
* A block of its own rather than a field on the document harness, because it is
|
|
185
|
+
* the one piece of rendered markdown that has BEHAVIOUR: it carries a language, it
|
|
186
|
+
* may or may not be coloured yet, and it may offer a copy button — three states
|
|
187
|
+
* that belong to the block and not to the page it is on.
|
|
188
|
+
*
|
|
189
|
+
* Its host is the `.wr-markdown__code-block` wrapper, which is what holds the
|
|
190
|
+
* `<pre>` and the copy button together. Blocks nested inside a quote or a list item
|
|
191
|
+
* are blocks too, and this harness finds them: `<wr-markdown>` renders them the
|
|
192
|
+
* same way, and the copy affordance is theirs as well.
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* ```ts
|
|
196
|
+
* const block = await (await loader.getHarness(WrMarkdownHarness)).getCodeBlock({ language: 'ts' });
|
|
197
|
+
*
|
|
198
|
+
* expect(await block.getCode()).toBe('const a = 1;');
|
|
199
|
+
* await block.copy();
|
|
200
|
+
* ```
|
|
201
|
+
*
|
|
202
|
+
* @see https://ngwr.dev/reference/components/markdown
|
|
203
|
+
* @see https://ngwr.dev/guides/testing
|
|
204
|
+
*/
|
|
205
|
+
declare class WrMarkdownCodeBlockHarness extends ComponentHarness {
|
|
206
|
+
static hostSelector: string;
|
|
207
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
208
|
+
static with(options?: WrMarkdownCodeBlockHarnessFilters): HarnessPredicate<WrMarkdownCodeBlockHarness>;
|
|
209
|
+
private readonly pre;
|
|
210
|
+
private readonly code;
|
|
211
|
+
private readonly copyButton;
|
|
212
|
+
/**
|
|
213
|
+
* The block's language — the info string's first word, lowercased — or `null` for
|
|
214
|
+
* a bare fence.
|
|
215
|
+
*
|
|
216
|
+
* Read from `data-language`, which is the only place it reaches the DOM, and the
|
|
217
|
+
* reason it is there at all: a highlighter picks a grammar by it, and the
|
|
218
|
+
* showcase's markdown export needs it to re-fence the block. `null` is a real
|
|
219
|
+
* answer, not a gap: a bare fence names no grammar, so nothing is ever asked to
|
|
220
|
+
* colour it.
|
|
221
|
+
*/
|
|
222
|
+
getLanguage(): Promise<string | null>;
|
|
223
|
+
/**
|
|
224
|
+
* The block's code, EXACTLY — every space, every blank line, every newline.
|
|
225
|
+
*
|
|
226
|
+
* Nothing is collapsed here, unlike every prose read on the document harness,
|
|
227
|
+
* and it is read off the `<pre>` rather than off the host so the copy button is
|
|
228
|
+
* not part of the answer. Two failures live in this one string. Angular strips
|
|
229
|
+
* whitespace-only text nodes from templates, so the code has to arrive as an
|
|
230
|
+
* interpolation — a template that types it instead loses the indentation. And a
|
|
231
|
+
* HIGHLIGHTED block is not one text node but a span per token: what separates its
|
|
232
|
+
* lines is a real `\n` interpolated between them, so a spec that only ever
|
|
233
|
+
* asserts the unhighlighted case would not notice a highlighted block copying out
|
|
234
|
+
* as one run-together line.
|
|
235
|
+
*/
|
|
236
|
+
getCode(): Promise<string>;
|
|
237
|
+
/**
|
|
238
|
+
* Whether the block is coloured right now.
|
|
239
|
+
*
|
|
240
|
+
* A block is plain text until a highlighter answers for it, and that is the
|
|
241
|
+
* intended order rather than a compromise: a grammar engine loads WASM, and
|
|
242
|
+
* blocking on it would leave the reader with an empty box instead of their code.
|
|
243
|
+
* So this is `false` with no `WR_MARKDOWN_HIGHLIGHTER` provided, `false` for a
|
|
244
|
+
* language the highlighter declined or threw on, `false` under SSR — a
|
|
245
|
+
* highlighter resolving after prerender cannot contribute to the HTML — and
|
|
246
|
+
* `false` for the first render of an async one.
|
|
247
|
+
*/
|
|
248
|
+
isHighlighted(): Promise<boolean>;
|
|
249
|
+
/**
|
|
250
|
+
* Whether this block offers a copy button.
|
|
251
|
+
*
|
|
252
|
+
* Two conditions, and both are the component's policy rather than an accident:
|
|
253
|
+
* `copyable` has to be on (bound, or defaulted through
|
|
254
|
+
* `provideWrConfig({ markdown: { copyable: true } })`), and the fence has to be
|
|
255
|
+
* CLOSED. Mid-stream a block's code is not all there, and a button that copies
|
|
256
|
+
* half a snippet is worse than no button.
|
|
257
|
+
*/
|
|
258
|
+
canCopy(): Promise<boolean>;
|
|
259
|
+
/**
|
|
260
|
+
* The copy button's accessible name, or `null` when there is no button.
|
|
261
|
+
*
|
|
262
|
+
* Worth reading rather than assuming, because it is the whole of the copy
|
|
263
|
+
* feedback: the button swaps its label — and its icon — for the "copied" one for
|
|
264
|
+
* two seconds after a successful write, and both strings come from the i18n
|
|
265
|
+
* catalog (`markdown.copy` / `markdown.copied`) or the matching inputs. Which is
|
|
266
|
+
* also why this harness reports the name instead of a `isCopied()` boolean: only
|
|
267
|
+
* the consuming app knows which of its own two strings means which.
|
|
268
|
+
*/
|
|
269
|
+
getCopyLabel(): Promise<string | null>;
|
|
270
|
+
/**
|
|
271
|
+
* Copy the block, the way a pointer does.
|
|
272
|
+
*
|
|
273
|
+
* Throws when there is no button, naming both reasons — a silent no-op here
|
|
274
|
+
* surfaces as an empty clipboard assertion several lines later. Note what a
|
|
275
|
+
* successful click needs from the environment: the directive behind the button
|
|
276
|
+
* writes through `navigator.clipboard`, which jsdom does not implement at all, so
|
|
277
|
+
* a unit test has to stand one in before the write can succeed and the label can
|
|
278
|
+
* swap.
|
|
279
|
+
*/
|
|
280
|
+
copy(): Promise<void>;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @license
|
|
285
|
+
*
|
|
286
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
287
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
288
|
+
*/
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Test harness for `<wr-markdown>`, with {@link WrMarkdownCodeBlockHarness} for one
|
|
292
|
+
* fenced code block.
|
|
293
|
+
*
|
|
294
|
+
* What a consumer of a markdown renderer actually asserts is that a piece of
|
|
295
|
+
* SOURCE became the right DOM, so everything here reads rendered elements: the
|
|
296
|
+
* heading levels, the `href` / `target` / `rel` triple on a link, the tick state of
|
|
297
|
+
* a task item, a table as a rectangle of text. The parse tree is not exposed on
|
|
298
|
+
* purpose — `parseMarkdown()` is a pure function with its own spec, and a harness
|
|
299
|
+
* that reported its nodes would pass straight through the half that breaks people,
|
|
300
|
+
* which is the template between the tree and the page.
|
|
301
|
+
*
|
|
302
|
+
* Three things worth knowing before writing expectations:
|
|
303
|
+
*
|
|
304
|
+
* - **Prose reads are whitespace-collapsed, code is not.** A soft line break inside
|
|
305
|
+
* a paragraph is a real `\n` in the DOM (CommonMark says CSS collapses it), so
|
|
306
|
+
* every text answer here is normalized to the line a reader sees.
|
|
307
|
+
* {@link WrMarkdownCodeBlockHarness.getCode} is the exception and reads its
|
|
308
|
+
* snippet exactly.
|
|
309
|
+
* - **The hidden task-state labels are left out of prose.** They are announced text,
|
|
310
|
+
* not visible text; {@link getTaskItems} reports them as a field.
|
|
311
|
+
* - **Everything is flat and in document order.** Markdown nests — a quote holds
|
|
312
|
+
* blocks, a list item holds blocks — and these readers do not re-derive that
|
|
313
|
+
* hierarchy: {@link getCodeBlocks} finds a block inside a quote, and a nested
|
|
314
|
+
* list item's text is part of its parent's, because that is what the DOM says.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```ts
|
|
318
|
+
* const md = await loader.getHarness(WrMarkdownHarness);
|
|
319
|
+
*
|
|
320
|
+
* expect(await md.getHeadings()).toEqual([{ level: 1, text: 'Release notes', id: 'release-notes' }]);
|
|
321
|
+
* expect(await md.getLinks()).toEqual([
|
|
322
|
+
* { text: 'the docs', href: 'https://ngwr.dev', title: null, target: '_blank', rel: 'noopener noreferrer' },
|
|
323
|
+
* ]);
|
|
324
|
+
* ```
|
|
325
|
+
*
|
|
326
|
+
* @see https://ngwr.dev/reference/components/markdown
|
|
327
|
+
* @see https://ngwr.dev/guides/testing
|
|
328
|
+
*/
|
|
329
|
+
declare class WrMarkdownHarness extends ComponentHarness {
|
|
330
|
+
static hostSelector: string;
|
|
331
|
+
/** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */
|
|
332
|
+
static with(options?: WrMarkdownHarnessFilters): HarnessPredicate<WrMarkdownHarness>;
|
|
333
|
+
/**
|
|
334
|
+
* The whole document as text — whitespace collapsed, the hidden task-state labels
|
|
335
|
+
* left out.
|
|
336
|
+
*
|
|
337
|
+
* The coarse read, and the useful one for the security cases: raw HTML in the
|
|
338
|
+
* source is ESCAPED rather than rendered, so `<img onerror=…>` shows up here as
|
|
339
|
+
* characters, and a refused `javascript:` URL leaves its label behind as text with
|
|
340
|
+
* no anchor around it. A code block's newlines are collapsed like everything else
|
|
341
|
+
* — {@link getCodeBlocks} is where a snippet stays exact.
|
|
342
|
+
*
|
|
343
|
+
* It is `textContent`, which means sibling BLOCKS are not separated: a document of
|
|
344
|
+
* `<h1>Title</h1><p>Body</p>` reads as `'TitleBody'`, because the renderer emits
|
|
345
|
+
* no whitespace between them and none is invented here. Assert a fragment with
|
|
346
|
+
* `toContain`, or read the blocks themselves — {@link getHeadings},
|
|
347
|
+
* {@link getParagraphs} — when the boundary matters.
|
|
348
|
+
*/
|
|
349
|
+
getText(): Promise<string>;
|
|
350
|
+
/**
|
|
351
|
+
* Whether the component rendered nothing at all.
|
|
352
|
+
*
|
|
353
|
+
* True for an empty `value`, and for one that parses to nothing — a lone `<!--`
|
|
354
|
+
* or whitespace. Distinct from `getText() === ''`, which a document made only of
|
|
355
|
+
* a thematic break or an image would also answer.
|
|
356
|
+
*/
|
|
357
|
+
isEmpty(): Promise<boolean>;
|
|
358
|
+
/**
|
|
359
|
+
* Whether the document is being streamed.
|
|
360
|
+
*
|
|
361
|
+
* Read from the `--streaming` host modifier rather than from the input, because
|
|
362
|
+
* the modifier is the whole public API of the feature on the styling side: it is
|
|
363
|
+
* what paints the caret after the last block. What it does NOT say is that
|
|
364
|
+
* partial-safe parsing is on — the same input drives both, but only this reaches
|
|
365
|
+
* the DOM.
|
|
366
|
+
*/
|
|
367
|
+
isStreaming(): Promise<boolean>;
|
|
368
|
+
/** Every heading, in document order. */
|
|
369
|
+
getHeadings(): Promise<WrMarkdownHarnessHeading[]>;
|
|
370
|
+
/**
|
|
371
|
+
* The text of every paragraph, in document order.
|
|
372
|
+
*
|
|
373
|
+
* Including the ones inside a LOOSE list item — CommonMark drops the `<p>` in a
|
|
374
|
+
* tight list and keeps it in a loose one, which is what stops a one-line list from
|
|
375
|
+
* rendering double-spaced, so an empty answer for `- a\n- b` is the correct one
|
|
376
|
+
* rather than a missed paragraph.
|
|
377
|
+
*/
|
|
378
|
+
getParagraphs(): Promise<string[]>;
|
|
379
|
+
/**
|
|
380
|
+
* Every link, in document order, with the attributes that make it safe.
|
|
381
|
+
*
|
|
382
|
+
* A URL the renderer refused is NOT here — it renders as plain text instead of as
|
|
383
|
+
* a live anchor that announces as a link and does nothing — so an empty answer
|
|
384
|
+
* where a link was expected is the sanitizer speaking, and {@link getText} still
|
|
385
|
+
* has the label.
|
|
386
|
+
*/
|
|
387
|
+
getLinks(): Promise<WrMarkdownHarnessLink[]>;
|
|
388
|
+
/**
|
|
389
|
+
* Every image, in document order.
|
|
390
|
+
*
|
|
391
|
+
* A refused source renders no image at all and leaves the alt text as prose,
|
|
392
|
+
* which is the information the author actually wrote — so assert this together
|
|
393
|
+
* with {@link getText} when the point is the refusal.
|
|
394
|
+
*/
|
|
395
|
+
getImages(): Promise<WrMarkdownHarnessImage[]>;
|
|
396
|
+
/**
|
|
397
|
+
* The text of every inline code span, in document order.
|
|
398
|
+
*
|
|
399
|
+
* A different element from a fenced block (`<code>` on its own, not inside a
|
|
400
|
+
* `<pre>`), and never one of {@link getCodeBlocks}. Read exactly rather than
|
|
401
|
+
* collapsed, for the same reason a block is: this is code, and the spacing in it
|
|
402
|
+
* is content.
|
|
403
|
+
*/
|
|
404
|
+
getInlineCode(): Promise<string[]>;
|
|
405
|
+
/**
|
|
406
|
+
* The fenced code blocks, in document order — nested ones included.
|
|
407
|
+
*
|
|
408
|
+
* A block inside a quote or a list item is a block: it renders the same way and it
|
|
409
|
+
* gets the same copy affordance, so leaving it out would report a document as
|
|
410
|
+
* having no code because its snippet is indented under a bullet.
|
|
411
|
+
*/
|
|
412
|
+
getCodeBlocks(filters?: WrMarkdownCodeBlockHarnessFilters): Promise<WrMarkdownCodeBlockHarness[]>;
|
|
413
|
+
/**
|
|
414
|
+
* The first code block matching the filters.
|
|
415
|
+
*
|
|
416
|
+
* Throws when nothing matches, naming the languages the document does offer —
|
|
417
|
+
* a `getCodeBlocks(…)[0]` that quietly resolves to `undefined` fails several lines
|
|
418
|
+
* later, on an unrelated line, with `Cannot read properties of undefined`.
|
|
419
|
+
*/
|
|
420
|
+
getCodeBlock(filters?: WrMarkdownCodeBlockHarnessFilters): Promise<WrMarkdownCodeBlockHarness>;
|
|
421
|
+
/**
|
|
422
|
+
* The text of every list item, in document order.
|
|
423
|
+
*
|
|
424
|
+
* Bullets, numbers and task items alike — a task item's tick state is in
|
|
425
|
+
* {@link getTaskItems} instead. NESTING is not re-derived: a nested list lives
|
|
426
|
+
* INSIDE its parent `<li>` (which is what makes the list's accessibility tree
|
|
427
|
+
* valid), so a parent's text contains its children's, and each child is also an
|
|
428
|
+
* entry of its own.
|
|
429
|
+
*/
|
|
430
|
+
getListItems(): Promise<string[]>;
|
|
431
|
+
/**
|
|
432
|
+
* Every task-list item (`- [x]` / `- [ ]`), in document order.
|
|
433
|
+
*
|
|
434
|
+
* Ordinary items are not here, so the count is the number of checkboxes in the
|
|
435
|
+
* document. Both halves of each entry are worth asserting: the `checked` flag is
|
|
436
|
+
* what a reader sees, and `stateLabel` is the only thing a screen reader gets —
|
|
437
|
+
* the tick itself is `aria-hidden`.
|
|
438
|
+
*/
|
|
439
|
+
getTaskItems(): Promise<WrMarkdownHarnessTaskItem[]>;
|
|
440
|
+
/** Every table, in document order, each as a rectangle of text plus its alignment. */
|
|
441
|
+
getTables(): Promise<WrMarkdownHarnessTable[]>;
|
|
442
|
+
/**
|
|
443
|
+
* The text of every blockquote, in document order.
|
|
444
|
+
*
|
|
445
|
+
* A quote holds BLOCKS, so this is everything inside it collapsed to one line —
|
|
446
|
+
* its paragraphs are also in {@link getParagraphs} and a snippet inside it is
|
|
447
|
+
* also one of {@link getCodeBlocks}.
|
|
448
|
+
*/
|
|
449
|
+
getQuotes(): Promise<string[]>;
|
|
450
|
+
/**
|
|
451
|
+
* How many thematic breaks the document rendered.
|
|
452
|
+
*
|
|
453
|
+
* A count rather than a list because an `<hr>` has no content — and it is worth
|
|
454
|
+
* counting: `---` is the one construct this renderer resolves differently from
|
|
455
|
+
* some others (it is always a break here, never a setext heading underline), so a
|
|
456
|
+
* document that lost a rule gained a heading somewhere.
|
|
457
|
+
*/
|
|
458
|
+
getRuleCount(): Promise<number>;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export { WrMarkdownCodeBlockHarness, WrMarkdownHarness };
|
|
462
|
+
export type { WrMarkdownCodeBlockHarnessFilters, WrMarkdownHarnessAlign, WrMarkdownHarnessFilters, WrMarkdownHarnessHeading, WrMarkdownHarnessImage, WrMarkdownHarnessLink, WrMarkdownHarnessTable, WrMarkdownHarnessTaskItem };
|