ngwr 11.1.0 β 12.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 +7 -7
- package/burger/styles/_index.scss +1 -1
- package/button/styles/_index.scss +2 -2
- package/calendar/styles/_index.scss +32 -12
- package/calendar-heatmap/styles/_index.scss +20 -0
- package/carousel/styles/_index.scss +23 -1
- package/cascader/styles/_index.scss +15 -3
- package/checkbox/styles/_index.scss +2 -2
- package/circular-text/styles/_index.scss +11 -0
- package/collapse/styles/_index.scss +2 -2
- package/color-picker/styles/_index.scss +3 -3
- package/command-palette/styles/_index.scss +12 -0
- package/compare/styles/_index.scss +18 -2
- package/context-menu/styles/_index.scss +21 -2
- package/date-picker/styles/_index.scss +5 -5
- package/descriptions/styles/_index.scss +1 -1
- package/drag-drop/styles/_index.scss +28 -1
- package/drawer/styles/_index.scss +37 -0
- package/dropdown/styles/_index.scss +2 -2
- package/event-calendar/styles/_index.scss +67 -10
- package/fesm2022/ngwr-action-sheet-testing.mjs +313 -0
- package/fesm2022/ngwr-action-sheet-testing.mjs.map +1 -0
- package/fesm2022/ngwr-action-sheet.mjs +3 -3
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-aurora.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-bar-chart-testing.mjs +107 -0
- package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-blur-text-testing.mjs +203 -0
- package/fesm2022/ngwr-blur-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-blur-text.mjs +18 -4
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow-testing.mjs +325 -0
- package/fesm2022/ngwr-border-glow-testing.mjs.map +1 -0
- package/fesm2022/ngwr-border-glow.mjs +4 -4
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +29 -17
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs +95 -0
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -0
- package/fesm2022/ngwr-calendar-heatmap.mjs +17 -5
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-testing.mjs +368 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-calendar.mjs +228 -10
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +10 -10
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +124 -24
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +60 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +14 -6
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text-testing.mjs +230 -0
- package/fesm2022/ngwr-circular-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-circular-text.mjs +4 -4
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +27 -7
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker-testing.mjs +452 -0
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -0
- package/fesm2022/ngwr-color-picker.mjs +126 -10
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +14 -5
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-confetti.mjs +31 -6
- package/fesm2022/ngwr-confetti.mjs.map +1 -1
- package/fesm2022/ngwr-config.mjs +9 -0
- package/fesm2022/ngwr-config.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs +30 -11
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +358 -48
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +25 -9
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/{ngwr-date-adapter-fns.mjs β ngwr-date-adapters-fns.mjs} +37 -10
- package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -0
- package/fesm2022/{ngwr-date-adapter-luxon.mjs β ngwr-date-adapters-luxon.mjs} +5 -5
- package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -0
- package/fesm2022/ngwr-date-picker-testing.mjs +21 -85
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +119 -37
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/{ngwr-date-adapter.mjs β ngwr-date.mjs} +36 -10
- package/fesm2022/ngwr-date.mjs.map +1 -0
- package/fesm2022/ngwr-decrypt-text-testing.mjs +261 -0
- package/fesm2022/ngwr-decrypt-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-decrypt-text.mjs +9 -4
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +73 -18
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-divider.mjs +52 -5
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart-testing.mjs +97 -0
- package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-donut-chart.mjs +7 -7
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +160 -11
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +156 -64
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +58 -12
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar-testing.mjs +446 -0
- package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-event-calendar.mjs +66 -28
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text-testing.mjs +220 -0
- package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-falling-text.mjs +75 -46
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +3 -3
- package/fesm2022/ngwr-form.mjs +32 -15
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text-testing.mjs +134 -0
- package/fesm2022/ngwr-fuzzy-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-fuzzy-text.mjs +21 -11
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge-testing.mjs +86 -0
- package/fesm2022/ngwr-gauge-testing.mjs.map +1 -0
- package/fesm2022/ngwr-gauge.mjs +3 -3
- package/fesm2022/ngwr-glitch-text-testing.mjs +215 -0
- package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-glitch-text.mjs +7 -7
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text-testing.mjs +258 -0
- package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-gradient-text.mjs +4 -4
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +24 -9
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +87 -1
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +69 -1
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +26 -15
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper-testing.mjs +200 -0
- package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -0
- package/fesm2022/ngwr-image-cropper.mjs +156 -11
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number-testing.mjs +15 -10
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +89 -15
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp-testing.mjs +12 -6
- package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +24 -5
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob-testing.mjs +220 -0
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -0
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox-testing.mjs +223 -0
- package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -0
- package/fesm2022/ngwr-lightbox.mjs +11 -4
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart-testing.mjs +119 -0
- package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-line-chart.mjs +73 -26
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +7 -7
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +7 -7
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown.mjs +66 -8
- package/fesm2022/ngwr-markdown.mjs.map +1 -1
- package/fesm2022/ngwr-marquee-testing.mjs +336 -0
- package/fesm2022/ngwr-marquee-testing.mjs.map +1 -0
- package/fesm2022/ngwr-marquee.mjs +4 -4
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-mention.mjs +108 -13
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-meter-group-testing.mjs +100 -0
- package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -0
- package/fesm2022/ngwr-meter-group.mjs +3 -3
- package/fesm2022/ngwr-overlay.mjs +34 -7
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination-testing.mjs +6 -6
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +17 -13
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +39 -26
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +6 -6
- package/fesm2022/ngwr-popover-testing.mjs +7 -2
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +169 -33
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +42 -5
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +21 -30
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text-testing.mjs +220 -0
- package/fesm2022/ngwr-rotating-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-rotating-text.mjs +4 -4
- package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented-testing.mjs +14 -1
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +29 -6
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +227 -43
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text-testing.mjs +237 -0
- package/fesm2022/ngwr-shiny-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-shiny-text.mjs +11 -9
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +31 -16
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +143 -14
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline-testing.mjs +76 -0
- package/fesm2022/ngwr-sparkline-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sparkline.mjs +3 -3
- package/fesm2022/ngwr-speed-dial-testing.mjs +281 -0
- package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -0
- package/fesm2022/ngwr-speed-dial.mjs +27 -12
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splash-cursor-testing.mjs +89 -0
- package/fesm2022/ngwr-splash-cursor-testing.mjs.map +1 -0
- package/fesm2022/ngwr-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-split-text-testing.mjs +224 -0
- package/fesm2022/ngwr-split-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-split-text.mjs +31 -5
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter-testing.mjs +245 -0
- package/fesm2022/ngwr-splitter-testing.mjs.map +1 -0
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-spotlight-card-testing.mjs +368 -0
- package/fesm2022/ngwr-spotlight-card-testing.mjs.map +1 -0
- package/fesm2022/ngwr-spotlight-card.mjs +7 -7
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +6 -6
- package/fesm2022/ngwr-star-border-testing.mjs +172 -0
- package/fesm2022/ngwr-star-border-testing.mjs.map +1 -0
- package/fesm2022/ngwr-star-border.mjs +4 -4
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper-testing.mjs +8 -8
- package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +33 -8
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +17 -5
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +110 -40
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +11 -10
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +51 -11
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +181 -4
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card-testing.mjs +190 -0
- package/fesm2022/ngwr-tilt-card-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tilt-card.mjs +26 -8
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +44 -15
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour-testing.mjs +173 -0
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tour.mjs +34 -10
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +3 -3
- package/fesm2022/ngwr-tree.mjs +36 -11
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter-testing.mjs +242 -0
- package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -0
- package/fesm2022/ngwr-typewriter.mjs +13 -5
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +5 -2
- package/fesm2022/ngwr-utils.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 +4 -4
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves-testing.mjs +128 -0
- package/fesm2022/ngwr-waves-testing.mjs.map +1 -0
- package/fesm2022/ngwr-waves.mjs +4 -4
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window-testing.mjs +361 -0
- package/fesm2022/ngwr-window-testing.mjs.map +1 -0
- package/fesm2022/ngwr-window.mjs +175 -31
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +2 -2
- package/glitch-text/styles/_index.scss +27 -12
- package/i18n/en.json +71 -7
- package/i18n/ru.json +71 -7
- package/image-cropper/styles/_index.scss +19 -0
- package/input/styles/_index.scss +2 -2
- package/input-number/styles/_index.scss +2 -2
- package/input-otp/styles/_index.scss +9 -2
- package/knob/styles/_index.scss +1 -1
- package/lightbox/styles/_index.scss +16 -2
- package/line-chart/styles/_index.scss +28 -14
- package/list/styles/_index.scss +1 -1
- package/llms-full.txt +161 -19
- package/llms.txt +45 -10
- package/markdown/styles/_index.scss +3 -3
- package/mcp/api.js +6 -4
- package/mcp/catalog.js +40 -3
- package/mcp/providers.js +42 -0
- package/mcp/tools.js +22 -30
- package/meter-group/styles/_index.scss +1 -1
- package/overlay/styles/_index.scss +33 -1
- package/package.json +161 -12
- package/pagination/styles/_index.scss +23 -1
- package/popover/styles/_index.scss +16 -7
- package/progress/styles/_index.scss +1 -1
- package/radio/styles/_index.scss +2 -2
- package/rating/styles/_index.scss +1 -1
- package/schematics/collection.json +1 -1
- package/schematics/migrations/v12/index.js +65 -0
- package/schematics/migrations/v7/index.js +12 -1
- package/schematics/migrations/v8/index.js +10 -1
- package/schematics/migrations.json +5 -0
- package/schematics/ng-add/index.js +8 -3
- package/schematics/provider/index.js +80 -13
- package/schematics/use/index.js +9 -129
- package/schematics/use/rule.js +206 -0
- package/schematics/use/symbol-map.json +4 -4
- package/segmented/styles/_index.scss +14 -3
- package/select/styles/_index.scss +14 -2
- package/sidebar/styles/_index.scss +12 -10
- package/skills/ngwr/SKILL.md +117 -0
- package/skills/ngwr/references/catalog.md +212 -0
- package/skills/ngwr/references/setup.md +78 -0
- package/slider/styles/_index.scss +1 -1
- package/speed-dial/styles/_index.scss +1 -1
- package/stepper/styles/_index.scss +12 -3
- package/switch/styles/_index.scss +2 -2
- package/table/styles/_index.scss +61 -12
- package/tabs/styles/_index.scss +1 -1
- package/textarea/styles/_index.scss +1 -1
- package/theme/styles/_colors.scss +142 -56
- package/theme/styles/_dark.scss +46 -3
- package/theme/styles/_focus.scss +28 -5
- package/theme/styles/_mixins.scss +1 -1
- package/theme/styles/_variables.scss +67 -0
- package/transfer/styles/_index.scss +26 -3
- package/tree/styles/_index.scss +29 -6
- package/types/ngwr-action-sheet-testing.d.ts +260 -0
- package/types/ngwr-bar-chart-testing.d.ts +85 -0
- package/types/ngwr-blur-text-testing.d.ts +180 -0
- package/types/ngwr-blur-text.d.ts +20 -4
- package/types/ngwr-border-glow-testing.d.ts +219 -0
- package/types/ngwr-breadcrumbs.d.ts +17 -10
- package/types/ngwr-calendar-heatmap-testing.d.ts +79 -0
- package/types/ngwr-calendar-testing.d.ts +277 -0
- package/types/ngwr-calendar.d.ts +76 -0
- package/types/ngwr-carousel.d.ts +85 -6
- package/types/ngwr-cascader.d.ts +17 -0
- package/types/ngwr-checkbox.d.ts +13 -0
- package/types/ngwr-circular-text-testing.d.ts +196 -0
- package/types/ngwr-click-spark.d.ts +4 -0
- package/types/ngwr-color-picker-testing.d.ts +299 -0
- package/types/ngwr-color-picker.d.ts +34 -2
- package/types/ngwr-confetti.d.ts +8 -0
- package/types/ngwr-config.d.ts +10 -1
- package/types/ngwr-context-menu-testing.d.ts +24 -11
- package/types/ngwr-context-menu.d.ts +71 -1
- package/types/ngwr-counter.d.ts +1 -0
- package/types/{ngwr-date-adapter-fns.d.ts β ngwr-date-adapters-fns.d.ts} +33 -6
- package/types/{ngwr-date-adapter-luxon.d.ts β ngwr-date-adapters-luxon.d.ts} +1 -1
- package/types/ngwr-date-picker-testing.d.ts +17 -72
- package/types/ngwr-date-picker.d.ts +8 -4
- package/types/{ngwr-date-adapter.d.ts β ngwr-date.d.ts} +24 -5
- package/types/ngwr-decrypt-text-testing.d.ts +222 -0
- package/types/ngwr-dialog.d.ts +38 -1
- package/types/ngwr-divider.d.ts +25 -0
- package/types/ngwr-donut-chart-testing.d.ts +83 -0
- package/types/ngwr-donut-chart.d.ts +3 -3
- package/types/ngwr-drag-drop.d.ts +56 -2
- package/types/ngwr-drawer.d.ts +68 -5
- package/types/ngwr-dropdown.d.ts +9 -0
- package/types/ngwr-event-calendar-testing.d.ts +301 -0
- package/types/ngwr-event-calendar.d.ts +17 -8
- package/types/ngwr-falling-text-testing.d.ts +188 -0
- package/types/ngwr-falling-text.d.ts +1 -1
- package/types/ngwr-form.d.ts +12 -2
- package/types/ngwr-fuzzy-text-testing.d.ts +130 -0
- package/types/ngwr-gauge-testing.d.ts +71 -0
- package/types/ngwr-glitch-text-testing.d.ts +201 -0
- package/types/ngwr-gradient-text-testing.d.ts +186 -0
- package/types/ngwr-i18n.d.ts +13 -4
- package/types/ngwr-image-cropper-testing.d.ts +173 -0
- package/types/ngwr-image-cropper.d.ts +71 -5
- package/types/ngwr-input-number-testing.d.ts +15 -10
- package/types/ngwr-input-number.d.ts +44 -5
- package/types/ngwr-input-otp-testing.d.ts +12 -6
- package/types/ngwr-input-otp.d.ts +15 -1
- package/types/ngwr-knob-testing.d.ts +150 -0
- package/types/ngwr-lightbox-testing.d.ts +154 -0
- package/types/ngwr-lightbox.d.ts +6 -0
- package/types/ngwr-line-chart-testing.d.ts +93 -0
- package/types/ngwr-line-chart.d.ts +20 -3
- package/types/ngwr-markdown.d.ts +11 -0
- package/types/ngwr-marquee-testing.d.ts +280 -0
- package/types/ngwr-mention.d.ts +32 -0
- package/types/ngwr-meter-group-testing.d.ts +77 -0
- package/types/ngwr-overlay.d.ts +20 -1
- package/types/ngwr-pagination-testing.d.ts +4 -4
- package/types/ngwr-pipes.d.ts +1 -1
- package/types/ngwr-popover-testing.d.ts +7 -2
- package/types/ngwr-popover.d.ts +1 -0
- package/types/ngwr-result.d.ts +6 -0
- package/types/ngwr-rotating-text-testing.d.ts +191 -0
- package/types/ngwr-segmented-testing.d.ts +9 -0
- package/types/ngwr-segmented.d.ts +21 -1
- package/types/ngwr-select.d.ts +100 -6
- package/types/ngwr-shiny-text-testing.d.ts +165 -0
- package/types/ngwr-shiny-text.d.ts +4 -2
- package/types/ngwr-sidebar.d.ts +14 -5
- package/types/ngwr-slider.d.ts +84 -1
- package/types/ngwr-sparkline-testing.d.ts +69 -0
- package/types/ngwr-speed-dial-testing.d.ts +199 -0
- package/types/ngwr-speed-dial.d.ts +22 -3
- package/types/ngwr-splash-cursor-testing.d.ts +95 -0
- package/types/ngwr-split-text-testing.d.ts +209 -0
- package/types/ngwr-split-text.d.ts +21 -0
- package/types/ngwr-splitter-testing.d.ts +174 -0
- package/types/ngwr-spotlight-card-testing.d.ts +303 -0
- package/types/ngwr-star-border-testing.d.ts +135 -0
- package/types/ngwr-stepper-testing.d.ts +5 -5
- package/types/ngwr-stepper.d.ts +8 -0
- package/types/ngwr-storage.d.ts +1 -0
- package/types/ngwr-table.d.ts +114 -12
- package/types/ngwr-tabs-testing.d.ts +11 -10
- package/types/ngwr-tabs.d.ts +2 -0
- package/types/ngwr-theme.d.ts +82 -1
- package/types/ngwr-tilt-card-testing.d.ts +158 -0
- package/types/ngwr-tilt-card.d.ts +2 -0
- package/types/ngwr-toast.d.ts +14 -5
- package/types/ngwr-tour-testing.d.ts +143 -0
- package/types/ngwr-tour.d.ts +22 -4
- package/types/ngwr-tree.d.ts +12 -4
- package/types/ngwr-typewriter-testing.d.ts +211 -0
- package/types/ngwr-utils.d.ts +5 -2
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-waves-testing.d.ts +121 -0
- package/types/ngwr-window-testing.d.ts +263 -0
- package/types/ngwr-window.d.ts +66 -21
- package/typography/styles/_index.scss +1 -1
- package/window/styles/_index.scss +116 -42
- package/fesm2022/ngwr-date-adapter-fns.mjs.map +0 -1
- package/fesm2022/ngwr-date-adapter-luxon.mjs.map +0 -1
- package/fesm2022/ngwr-date-adapter.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, model, output, viewChild, effect, computed, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import { input, model, output, viewChild, inject, ElementRef, effect, computed, ViewEncapsulation, Component } from '@angular/core';
|
|
4
4
|
import { useI18nText } from 'ngwr/i18n';
|
|
5
5
|
import { WrIcon } from 'ngwr/icon';
|
|
6
6
|
|
|
@@ -10,10 +10,11 @@ import { WrIcon } from 'ngwr/icon';
|
|
|
10
10
|
* Use of this source code is governed by an MIT-style license that can be
|
|
11
11
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
12
12
|
*/
|
|
13
|
+
let menuUid = 0;
|
|
13
14
|
/**
|
|
14
|
-
* Floating action button that expands into a fan of secondary actions on
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Floating action button that expands into a fan of secondary actions on click.
|
|
16
|
+
* Place inside a positioned container or near `position: fixed` β the component
|
|
17
|
+
* itself doesn't pin to the viewport.
|
|
17
18
|
*
|
|
18
19
|
* @example
|
|
19
20
|
* ```html
|
|
@@ -28,7 +29,6 @@ import { WrIcon } from 'ngwr/icon';
|
|
|
28
29
|
*
|
|
29
30
|
* @see https://ngwr.dev/reference/components/speed-dial
|
|
30
31
|
*/
|
|
31
|
-
let menuUid = 0;
|
|
32
32
|
class WrSpeedDial {
|
|
33
33
|
actions = input([], /* @ts-ignore */
|
|
34
34
|
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
@@ -62,6 +62,7 @@ class WrSpeedDial {
|
|
|
62
62
|
menuId = `wr-speed-dial-menu-${++menuUid}`;
|
|
63
63
|
triggerEl = viewChild('trigger', /* @ts-ignore */
|
|
64
64
|
...(ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []));
|
|
65
|
+
host = inject(ElementRef);
|
|
65
66
|
constructor() {
|
|
66
67
|
// A disabled trigger cannot be pressed, and the trigger is the only way to close
|
|
67
68
|
// the dial β so being disabled while open left it fanned out with no way back.
|
|
@@ -90,12 +91,26 @@ class WrSpeedDial {
|
|
|
90
91
|
if (this.disabled())
|
|
91
92
|
return;
|
|
92
93
|
this.open.set(false);
|
|
94
|
+
// Take the focus back before the action goes β the collapsed wrapper turns
|
|
95
|
+
// `visibility: hidden`, and a browser blurs an element it hides, so the caret
|
|
96
|
+
// landed on `<body>` and the next Tab restarted at the top of the document.
|
|
97
|
+
// Escape already did this; the SUCCESS path did not.
|
|
98
|
+
//
|
|
99
|
+
// Before the emit, not after: `pick` is where a consumer opens a dialog or
|
|
100
|
+
// navigates, and such a handler moves focus itself β focusing afterwards would
|
|
101
|
+
// yank the caret back onto the trigger. `wr-dropdown` sequences it the same way.
|
|
102
|
+
//
|
|
103
|
+
// Only when the caret is inside the dial: Safari does not focus a button on
|
|
104
|
+
// mouse-down, so an unguarded call would steal it from wherever the user is.
|
|
105
|
+
if (this.host.nativeElement.contains(this.host.nativeElement.ownerDocument.activeElement)) {
|
|
106
|
+
this.triggerEl()?.nativeElement.focus();
|
|
107
|
+
}
|
|
93
108
|
this.pick.emit(action);
|
|
94
109
|
}
|
|
95
110
|
/**
|
|
96
|
-
*
|
|
97
|
-
* order
|
|
98
|
-
* action to leave it.
|
|
111
|
+
* Escape closes the dial and hands the caret back. The actions are ordinary buttons
|
|
112
|
+
* in the tab order, so without this a keyboard user who opened the dial had to tab
|
|
113
|
+
* through every action to leave it.
|
|
99
114
|
*/
|
|
100
115
|
onKeydown(event) {
|
|
101
116
|
if (event.key !== 'Escape' || !this.open())
|
|
@@ -112,12 +127,12 @@ class WrSpeedDial {
|
|
|
112
127
|
initial(label) {
|
|
113
128
|
return [...label][0] ?? '';
|
|
114
129
|
}
|
|
115
|
-
static Ι΅fac = i0.Ι΅Ι΅ngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
116
|
-
static Ι΅cmp = i0.Ι΅Ι΅ngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
130
|
+
static Ι΅fac = i0.Ι΅Ι΅ngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrSpeedDial, deps: [], target: i0.Ι΅Ι΅FactoryTarget.Component });
|
|
131
|
+
static Ι΅cmp = i0.Ι΅Ι΅ngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: WrSpeedDial, isStandalone: true, selector: "wr-speed-dial", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, triggerLabel: { classPropertyName: "triggerLabel", publicName: "triggerLabel", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, safeArea: { classPropertyName: "safeArea", publicName: "safeArea", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", pick: "pick" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "class": "classes()" } }, viewQueries: [{ propertyName: "triggerEl", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\n #trigger\n type=\"button\"\n class=\"wr-speed-dial__trigger\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"menuId\"\n [attr.aria-label]=\"resolvedTriggerLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"onTrigger()\"\n>\n <wr-icon [name]=\"icon()\" />\n</button>\n\n<!--\n A LIST of buttons, deliberately not a `role=\"menu\"`. The dial used to announce\n aria-haspopup=\"menu\" over role=\"menuitem\" buttons while handling no menu key at\n all \u2014 no arrows, no Home/End, no focus moving in on open \u2014 and the actions were\n N tab stops rather than the pattern's one. That role also puts a screen reader\n into focus mode, so the arrow keys it promises stop reading the page and then do\n nothing here. The structure now says what the component does: a disclosure\n button (aria-expanded / aria-controls) revealing ordinary buttons that Tab\n reaches and Enter activates, with Escape as the way back.\n\n `role=\"list\"` is written out because `list-style: none` (styles/_index.scss)\n drops the implicit list semantics in Safari.\n-->\n<ul class=\"wr-speed-dial__actions\" role=\"list\" [attr.id]=\"menuId\">\n @for (action of actions(); track action.id) {\n <li class=\"wr-speed-dial__action-wrap\" [style.--wr-speed-dial-i]=\"$index + 1\">\n <button\n type=\"button\"\n class=\"wr-speed-dial__action\"\n [attr.aria-label]=\"action.label\"\n [title]=\"action.label\"\n [disabled]=\"disabled()\"\n (click)=\"onPick(action)\"\n >\n @if (action.icon) {\n <wr-icon [name]=\"action.icon\" />\n } @else {\n <span>{{ initial(action.label) }}</span>\n }\n </button>\n </li>\n }\n</ul>\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
117
132
|
}
|
|
118
|
-
i0.Ι΅Ι΅ngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
133
|
+
i0.Ι΅Ι΅ngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrSpeedDial, decorators: [{
|
|
119
134
|
type: Component,
|
|
120
|
-
args: [{ selector: 'wr-speed-dial', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()', '(keydown)': 'onKeydown($event)' }, imports: [WrIcon], template: "<button\n #trigger\n type=\"button\"\n class=\"wr-speed-dial__trigger\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"menuId\"\n
|
|
135
|
+
args: [{ selector: 'wr-speed-dial', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()', '(keydown)': 'onKeydown($event)' }, imports: [WrIcon], template: "<button\n #trigger\n type=\"button\"\n class=\"wr-speed-dial__trigger\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"menuId\"\n [attr.aria-label]=\"resolvedTriggerLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"onTrigger()\"\n>\n <wr-icon [name]=\"icon()\" />\n</button>\n\n<!--\n A LIST of buttons, deliberately not a `role=\"menu\"`. The dial used to announce\n aria-haspopup=\"menu\" over role=\"menuitem\" buttons while handling no menu key at\n all \u2014 no arrows, no Home/End, no focus moving in on open \u2014 and the actions were\n N tab stops rather than the pattern's one. That role also puts a screen reader\n into focus mode, so the arrow keys it promises stop reading the page and then do\n nothing here. The structure now says what the component does: a disclosure\n button (aria-expanded / aria-controls) revealing ordinary buttons that Tab\n reaches and Enter activates, with Escape as the way back.\n\n `role=\"list\"` is written out because `list-style: none` (styles/_index.scss)\n drops the implicit list semantics in Safari.\n-->\n<ul class=\"wr-speed-dial__actions\" role=\"list\" [attr.id]=\"menuId\">\n @for (action of actions(); track action.id) {\n <li class=\"wr-speed-dial__action-wrap\" [style.--wr-speed-dial-i]=\"$index + 1\">\n <button\n type=\"button\"\n class=\"wr-speed-dial__action\"\n [attr.aria-label]=\"action.label\"\n [title]=\"action.label\"\n [disabled]=\"disabled()\"\n (click)=\"onPick(action)\"\n >\n @if (action.icon) {\n <wr-icon [name]=\"action.icon\" />\n } @else {\n <span>{{ initial(action.label) }}</span>\n }\n </button>\n </li>\n }\n</ul>\n" }]
|
|
121
136
|
}], ctorParameters: () => [], propDecorators: { actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], safeArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "safeArea", required: false }] }], pick: [{ type: i0.Output, args: ["pick"] }], triggerEl: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
122
137
|
|
|
123
138
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-speed-dial.mjs","sources":["../../../projects/lib/speed-dial/speed-dial.ts","../../../projects/lib/speed-dial/speed-dial.html","../../../projects/lib/speed-dial/ngwr-speed-dial.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n type ElementRef,\n ViewEncapsulation,\n computed,\n effect,\n input,\n model,\n output,\n viewChild,\n} from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\n\nimport type { WrSpeedDialAction, WrSpeedDialDirection } from './interfaces';\n\n/**\n * Floating action button that expands into a fan of secondary actions on\n * click / hover. Place inside a positioned container or near `position: fixed`\n * β the component itself doesn't pin to the viewport.\n *\n * @example\n * ```html\n * <wr-speed-dial\n * [actions]=\"[\n * { id: 'new', label: 'New', icon: 'add' },\n * { id: 'edit', label: 'Edit', icon: 'cog' }\n * ]\"\n * (pick)=\"onPick($event)\"\n * />\n * ```\n *\n * @see https://ngwr.dev/reference/components/speed-dial\n */\nlet menuUid = 0;\n\n@Component({\n selector: 'wr-speed-dial',\n templateUrl: './speed-dial.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()', '(keydown)': 'onKeydown($event)' },\n imports: [WrIcon],\n})\nexport class WrSpeedDial {\n readonly actions = input<readonly WrSpeedDialAction[]>([]);\n\n /**\n * Accessible name of the trigger. Falls back to `speedDial.label`, then\n * `'Actions'` β the trigger is icon-only, so without this it has no name at all.\n */\n readonly triggerLabel = input<string | null>(null);\n\n protected readonly resolvedTriggerLabel = useI18nText(this.triggerLabel, 'speedDial.label', 'Actions');\n\n /** Direction the actions fan out. @default 'up' */\n readonly direction = input<WrSpeedDialDirection>('up');\n\n /** Two-way bindable open state. @default false */\n readonly open = model(false);\n\n /** Icon for the main trigger button. @default 'add' */\n readonly icon = input<WrIconName>('add');\n\n /** Disable interaction. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Pad the host toward the dial `direction` with `env(safe-area-inset-*)`.\n * Only matters when the consumer pins the dial to that edge of the\n * viewport; otherwise it has no effect. @default false\n */\n readonly safeArea = input(false, { transform: coerceBooleanProperty });\n\n /** Fires when the user picks one of the actions. */\n readonly pick = output<WrSpeedDialAction>();\n\n /** Id the trigger's `aria-controls` points at. */\n protected readonly menuId = `wr-speed-dial-menu-${++menuUid}`;\n\n protected readonly triggerEl = viewChild<ElementRef<HTMLButtonElement>>('trigger');\n\n constructor() {\n // A disabled trigger cannot be pressed, and the trigger is the only way to close\n // the dial β so being disabled while open left it fanned out with no way back.\n effect(() => {\n if (this.disabled() && this.open()) this.open.set(false);\n });\n }\n\n protected readonly classes = computed(() => {\n const parts = ['wr-speed-dial', `wr-speed-dial--${this.direction()}`];\n if (this.open()) parts.push('wr-speed-dial--open');\n if (this.disabled()) parts.push('wr-speed-dial--disabled');\n if (this.safeArea()) parts.push('wr-speed-dial--safe-area');\n return parts.join(' ');\n });\n\n protected onTrigger(): void {\n if (this.disabled()) return;\n this.open.update(v => !v);\n }\n\n protected onPick(action: WrSpeedDialAction): void {\n if (this.disabled()) return;\n this.open.set(false);\n this.pick.emit(action);\n }\n\n /**\n * `role=\"menu\"` promises a way out, and the actions are ordinary buttons in the tab\n * order β without this a keyboard user who opened the dial had to tab through every\n * action to leave it.\n */\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key !== 'Escape' || !this.open()) return;\n event.preventDefault();\n this.open.set(false);\n this.triggerEl()?.nativeElement.focus();\n }\n\n /**\n * First GLYPH of the label, for an action with no icon. `charAt(0)` returns one\n * UTF-16 code unit, which cuts an astral character (an emoji) in half and renders a\n * replacement character.\n */\n protected initial(label: string): string {\n return [...label][0] ?? '';\n }\n}\n\nexport type { WrSpeedDialAction, WrSpeedDialDirection } from './interfaces';\n","<button\n #trigger\n type=\"button\"\n class=\"wr-speed-dial__trigger\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"menuId\"\n aria-haspopup=\"menu\"\n [attr.aria-label]=\"resolvedTriggerLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"onTrigger()\"\n>\n <wr-icon [name]=\"icon()\" />\n</button>\n\n<ul class=\"wr-speed-dial__actions\" role=\"menu\" [attr.id]=\"menuId\">\n @for (action of actions(); track action.id) {\n <!--\n role=\"none\" is load-bearing: role=\"menu\" on the <ul> strips the implicit\n list semantics from its children, so an unroled <li> sits between the menu\n and its menuitem and breaks the required menu -> menuitem parentage.\n Marking it presentational restores the direct relationship.\n -->\n <li class=\"wr-speed-dial__action-wrap\" role=\"none\" [style.--wr-speed-dial-i]=\"$index + 1\">\n <button\n type=\"button\"\n class=\"wr-speed-dial__action\"\n role=\"menuitem\"\n [attr.aria-label]=\"action.label\"\n [title]=\"action.label\"\n [disabled]=\"disabled()\"\n (click)=\"onPick(action)\"\n >\n @if (action.icon) {\n <wr-icon [name]=\"action.icon\" />\n } @else {\n <span>{{ initial(action.label) }}</span>\n }\n </button>\n </li>\n }\n</ul>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AAoBH;;;;;;;;;;;;;;;;;AAiBG;AACH,IAAI,OAAO,GAAG,CAAC;MASF,WAAW,CAAA;IACb,OAAO,GAAG,KAAK,CAA+B,EAAE;gFAAC;AAE1D;;;AAGG;IACM,YAAY,GAAG,KAAK,CAAgB,IAAI;qFAAC;IAE/B,oBAAoB,GAAG,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,iBAAiB,EAAE,SAAS,CAAC;;IAG7F,SAAS,GAAG,KAAK,CAAuB,IAAI;kFAAC;;IAG7C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,EAAA,CAAA;;2FAEL,WAAW,EAAA,UAAA,EAAA,CAAA;kBAPvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,iBAEV,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,EAAE,EAAA,OAAA,EACzD,CAAC,MAAM,CAAC,EAAA,QAAA,EAAA,+zCAAA,EAAA;i1BAsCuD,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AExFnF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-speed-dial.mjs","sources":["../../../projects/lib/speed-dial/speed-dial.ts","../../../projects/lib/speed-dial/speed-dial.html","../../../projects/lib/speed-dial/ngwr-speed-dial.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n viewChild,\n} from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\n\nimport type { WrSpeedDialAction, WrSpeedDialDirection } from './interfaces';\n\nlet menuUid = 0;\n\n/**\n * Floating action button that expands into a fan of secondary actions on click.\n * Place inside a positioned container or near `position: fixed` β the component\n * itself doesn't pin to the viewport.\n *\n * @example\n * ```html\n * <wr-speed-dial\n * [actions]=\"[\n * { id: 'new', label: 'New', icon: 'add' },\n * { id: 'edit', label: 'Edit', icon: 'cog' }\n * ]\"\n * (pick)=\"onPick($event)\"\n * />\n * ```\n *\n * @see https://ngwr.dev/reference/components/speed-dial\n */\n@Component({\n selector: 'wr-speed-dial',\n templateUrl: './speed-dial.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()', '(keydown)': 'onKeydown($event)' },\n imports: [WrIcon],\n})\nexport class WrSpeedDial {\n readonly actions = input<readonly WrSpeedDialAction[]>([]);\n\n /**\n * Accessible name of the trigger. Falls back to `speedDial.label`, then\n * `'Actions'` β the trigger is icon-only, so without this it has no name at all.\n */\n readonly triggerLabel = input<string | null>(null);\n\n protected readonly resolvedTriggerLabel = useI18nText(this.triggerLabel, 'speedDial.label', 'Actions');\n\n /** Direction the actions fan out. @default 'up' */\n readonly direction = input<WrSpeedDialDirection>('up');\n\n /** Two-way bindable open state. @default false */\n readonly open = model(false);\n\n /** Icon for the main trigger button. @default 'add' */\n readonly icon = input<WrIconName>('add');\n\n /** Disable interaction. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Pad the host toward the dial `direction` with `env(safe-area-inset-*)`.\n * Only matters when the consumer pins the dial to that edge of the\n * viewport; otherwise it has no effect. @default false\n */\n readonly safeArea = input(false, { transform: coerceBooleanProperty });\n\n /** Fires when the user picks one of the actions. */\n readonly pick = output<WrSpeedDialAction>();\n\n /** Id the trigger's `aria-controls` points at. */\n protected readonly menuId = `wr-speed-dial-menu-${++menuUid}`;\n\n protected readonly triggerEl = viewChild<ElementRef<HTMLButtonElement>>('trigger');\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n // A disabled trigger cannot be pressed, and the trigger is the only way to close\n // the dial β so being disabled while open left it fanned out with no way back.\n effect(() => {\n if (this.disabled() && this.open()) this.open.set(false);\n });\n }\n\n protected readonly classes = computed(() => {\n const parts = ['wr-speed-dial', `wr-speed-dial--${this.direction()}`];\n if (this.open()) parts.push('wr-speed-dial--open');\n if (this.disabled()) parts.push('wr-speed-dial--disabled');\n if (this.safeArea()) parts.push('wr-speed-dial--safe-area');\n return parts.join(' ');\n });\n\n protected onTrigger(): void {\n if (this.disabled()) return;\n this.open.update(v => !v);\n }\n\n protected onPick(action: WrSpeedDialAction): void {\n if (this.disabled()) return;\n this.open.set(false);\n // Take the focus back before the action goes β the collapsed wrapper turns\n // `visibility: hidden`, and a browser blurs an element it hides, so the caret\n // landed on `<body>` and the next Tab restarted at the top of the document.\n // Escape already did this; the SUCCESS path did not.\n //\n // Before the emit, not after: `pick` is where a consumer opens a dialog or\n // navigates, and such a handler moves focus itself β focusing afterwards would\n // yank the caret back onto the trigger. `wr-dropdown` sequences it the same way.\n //\n // Only when the caret is inside the dial: Safari does not focus a button on\n // mouse-down, so an unguarded call would steal it from wherever the user is.\n if (this.host.nativeElement.contains(this.host.nativeElement.ownerDocument.activeElement)) {\n this.triggerEl()?.nativeElement.focus();\n }\n this.pick.emit(action);\n }\n\n /**\n * Escape closes the dial and hands the caret back. The actions are ordinary buttons\n * in the tab order, so without this a keyboard user who opened the dial had to tab\n * through every action to leave it.\n */\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key !== 'Escape' || !this.open()) return;\n event.preventDefault();\n this.open.set(false);\n this.triggerEl()?.nativeElement.focus();\n }\n\n /**\n * First GLYPH of the label, for an action with no icon. `charAt(0)` returns one\n * UTF-16 code unit, which cuts an astral character (an emoji) in half and renders a\n * replacement character.\n */\n protected initial(label: string): string {\n return [...label][0] ?? '';\n }\n}\n\nexport type { WrSpeedDialAction, WrSpeedDialDirection } from './interfaces';\n","<button\n #trigger\n type=\"button\"\n class=\"wr-speed-dial__trigger\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"menuId\"\n [attr.aria-label]=\"resolvedTriggerLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"onTrigger()\"\n>\n <wr-icon [name]=\"icon()\" />\n</button>\n\n<!--\n A LIST of buttons, deliberately not a `role=\"menu\"`. The dial used to announce\n aria-haspopup=\"menu\" over role=\"menuitem\" buttons while handling no menu key at\n all β no arrows, no Home/End, no focus moving in on open β and the actions were\n N tab stops rather than the pattern's one. That role also puts a screen reader\n into focus mode, so the arrow keys it promises stop reading the page and then do\n nothing here. The structure now says what the component does: a disclosure\n button (aria-expanded / aria-controls) revealing ordinary buttons that Tab\n reaches and Enter activates, with Escape as the way back.\n\n `role=\"list\"` is written out because `list-style: none` (styles/_index.scss)\n drops the implicit list semantics in Safari.\n-->\n<ul class=\"wr-speed-dial__actions\" role=\"list\" [attr.id]=\"menuId\">\n @for (action of actions(); track action.id) {\n <li class=\"wr-speed-dial__action-wrap\" [style.--wr-speed-dial-i]=\"$index + 1\">\n <button\n type=\"button\"\n class=\"wr-speed-dial__action\"\n [attr.aria-label]=\"action.label\"\n [title]=\"action.label\"\n [disabled]=\"disabled()\"\n (click)=\"onPick(action)\"\n >\n @if (action.icon) {\n <wr-icon [name]=\"action.icon\" />\n } @else {\n <span>{{ initial(action.label) }}</span>\n }\n </button>\n </li>\n }\n</ul>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AAqBH,IAAI,OAAO,GAAG,CAAC;AAEf;;;;;;;;;;;;;;;;;AAiBG;MAQU,WAAW,CAAA;IACb,OAAO,GAAG,KAAK,CAA+B,EAAE;gFAAC;AAE1D;;;AAGG;IACM,YAAY,GAAG,KAAK,CAAgB,IAAI;qFAAC;IAE/B,oBAAoB,GAAG,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,iBAAiB,EAAE,SAAS,CAAC;;IAG7F,SAAS,GAAG,KAAK,CAAuB,IAAI;kFAAC;;IAG7C,IAAI,GAAG,KAAK,CAAC,KAAK;6EAAC;;IAGnB,IAAI,GAAG,KAAK,CAAa,KAAK;6EAAC;;IAG/B,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;AAEtE;;;;AAIG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;IAG7D,IAAI,GAAG,MAAM,EAAqB;;AAGxB,IAAA,MAAM,GAAG,CAAA,mBAAA,EAAsB,EAAE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IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,iBAEV,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,EAAE,EAAA,OAAA,EACzD,CAAC,MAAM,CAAC,EAAA,QAAA,EAAA,0sDAAA,EAAA;i1BAsCuD,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzFnF;;AAEG;;;;"}
|
|
@@ -42,10 +42,10 @@ class WrSpinner {
|
|
|
42
42
|
return size === 'md' ? 'wr-spinner' : `wr-spinner wr-spinner--${size}`;
|
|
43
43
|
}, /* @ts-ignore */
|
|
44
44
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
45
|
-
static Ι΅fac = i0.Ι΅Ι΅ngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
46
|
-
static Ι΅cmp = i0.Ι΅Ι΅ngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
45
|
+
static Ι΅fac = i0.Ι΅Ι΅ngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrSpinner, deps: [], target: i0.Ι΅Ι΅FactoryTarget.Component });
|
|
46
|
+
static Ι΅cmp = i0.Ι΅Ι΅ngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: WrSpinner, isStandalone: true, selector: "wr-spinner", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status" }, properties: { "attr.aria-label": "resolvedAriaLabel()", "class": "classes()" } }, ngImport: i0, template: "<svg viewBox=\"0 0 50 50\" aria-hidden=\"true\">\n <circle class=\"wr-spinner__path\" cx=\"25\" cy=\"25\" r=\"20\" fill=\"none\" stroke-width=\"5\" />\n</svg>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
47
47
|
}
|
|
48
|
-
i0.Ι΅Ι΅ngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
48
|
+
i0.Ι΅Ι΅ngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrSpinner, decorators: [{
|
|
49
49
|
type: Component,
|
|
50
50
|
args: [{ selector: 'wr-spinner', encapsulation: ViewEncapsulation.None, host: {
|
|
51
51
|
role: 'status',
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { 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
|
+
* Test harness for `<wr-splash-cursor>` β a WebGL fluid that splashes dye under the
|
|
11
|
+
* pointer.
|
|
12
|
+
*
|
|
13
|
+
* **This is a deliberately small surface, and the reason is the component.** The
|
|
14
|
+
* simulation is GL programs and framebuffers driven by `window` pointer listeners; the
|
|
15
|
+
* layout is `position: fixed`, `inset: 0`, `z-index: 50` and a `100dvh` canvas, all of
|
|
16
|
+
* it in the stylesheet. A unit test gets no WebGL context β the simulation is never
|
|
17
|
+
* constructed β and loads no stylesheet, so asking `getCssValue('position')` would
|
|
18
|
+
* answer `static` about a component whose whole layout contract is `fixed`. Three
|
|
19
|
+
* questions survive that, and they are the three below.
|
|
20
|
+
*
|
|
21
|
+
* There is no `isSimulating()`, `getSplatCount()` or `splat()`: the simulation returns
|
|
22
|
+
* `null` the moment the context is refused, so every one of those would report on
|
|
23
|
+
* something that was never built. No `moveMouse()` either β the listeners live on
|
|
24
|
+
* `window` and are only attached once a context exists, so a dispatched move reaches
|
|
25
|
+
* nothing. And no `isReducedMotion()` or `hasWebGL()`: the component renders
|
|
26
|
+
* byte-identical DOM whether it is running, standing down for reduced motion, or on a
|
|
27
|
+
* machine with no WebGL at all, so any answer would be the same for a working component
|
|
28
|
+
* and a broken one.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const splash = await loader.getHarness(WrSplashCursorHarness);
|
|
33
|
+
*
|
|
34
|
+
* expect(await splash.isFullscreen()).toBe(true);
|
|
35
|
+
* expect(await splash.isDecorative()).toBe(true);
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @see https://ngwr.dev/guides/testing
|
|
39
|
+
*/
|
|
40
|
+
class WrSplashCursorHarness extends ComponentHarness {
|
|
41
|
+
static hostSelector = 'wr-splash-cursor';
|
|
42
|
+
/** Build a predicate that narrows the query β pass to `getHarness` / `getAllHarnesses`. */
|
|
43
|
+
static with(options = {}) {
|
|
44
|
+
return new HarnessPredicate(WrSplashCursorHarness, options).addOption('fullscreen', options.fullscreen, async (harness, fullscreen) => (await harness.isFullscreen()) === fullscreen);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Whether the effect covers the whole viewport, rather than filling the nearest
|
|
48
|
+
* positioned ancestor.
|
|
49
|
+
*
|
|
50
|
+
* The component's one behavioural switch: fullscreen is a fixed, click-through
|
|
51
|
+
* overlay above the page, contained is an absolutely positioned box whose walls the
|
|
52
|
+
* dye collides with. Note what is being read β there is no `--fullscreen` class, only
|
|
53
|
+
* a `--contained` one written from a NEGATED binding, so this method answers the
|
|
54
|
+
* absence of a class. That inversion is exactly the kind that gets flipped in a
|
|
55
|
+
* refactor and looks fine on a page where the effect is full-viewport anyway, which
|
|
56
|
+
* is the whole reason the method exists.
|
|
57
|
+
*/
|
|
58
|
+
async isFullscreen() {
|
|
59
|
+
return !(await (await this.host()).hasClass('wr-splash-cursor--contained'));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Whether the effect is hidden from assistive tech.
|
|
63
|
+
*
|
|
64
|
+
* It has no text and nothing to say, and at full size it sits in front of the entire
|
|
65
|
+
* page β so losing this puts a nameless graphic over everything a screen reader is
|
|
66
|
+
* trying to get through.
|
|
67
|
+
*/
|
|
68
|
+
async isDecorative() {
|
|
69
|
+
return (await (await this.locatorFor('.wr-splash-cursor__canvas')()).getAttribute('aria-hidden')) === 'true';
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Whether the drawing surface is in the markup.
|
|
73
|
+
*
|
|
74
|
+
* It is there in all three states where nothing is ever drawn on it β prerendered on
|
|
75
|
+
* the server, WebGL refused, or reduced motion β because the documented contract is
|
|
76
|
+
* that the component renders nothing VISIBLE and stops, never that it renders no
|
|
77
|
+
* element and never that it throws on a null context.
|
|
78
|
+
*/
|
|
79
|
+
async hasCanvas() {
|
|
80
|
+
return (await this.locatorForOptional('.wr-splash-cursor__canvas')()) !== null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Generated bundle index. Do not edit.
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
export { WrSplashCursorHarness };
|
|
89
|
+
//# sourceMappingURL=ngwr-splash-cursor-testing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngwr-splash-cursor-testing.mjs","sources":["../../../projects/lib/splash-cursor/testing/wr-splash-cursor-harness.ts","../../../projects/lib/splash-cursor/testing/ngwr-splash-cursor-testing.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSplashCursorHarnessFilters } from './interfaces';\n\n/**\n * Test harness for `<wr-splash-cursor>` β a WebGL fluid that splashes dye under the\n * pointer.\n *\n * **This is a deliberately small surface, and the reason is the component.** The\n * simulation is GL programs and framebuffers driven by `window` pointer listeners; the\n * layout is `position: fixed`, `inset: 0`, `z-index: 50` and a `100dvh` canvas, all of\n * it in the stylesheet. A unit test gets no WebGL context β the simulation is never\n * constructed β and loads no stylesheet, so asking `getCssValue('position')` would\n * answer `static` about a component whose whole layout contract is `fixed`. Three\n * questions survive that, and they are the three below.\n *\n * There is no `isSimulating()`, `getSplatCount()` or `splat()`: the simulation returns\n * `null` the moment the context is refused, so every one of those would report on\n * something that was never built. No `moveMouse()` either β the listeners live on\n * `window` and are only attached once a context exists, so a dispatched move reaches\n * nothing. And no `isReducedMotion()` or `hasWebGL()`: the component renders\n * byte-identical DOM whether it is running, standing down for reduced motion, or on a\n * machine with no WebGL at all, so any answer would be the same for a working component\n * and a broken one.\n *\n * @example\n * ```ts\n * const splash = await loader.getHarness(WrSplashCursorHarness);\n *\n * expect(await splash.isFullscreen()).toBe(true);\n * expect(await splash.isDecorative()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSplashCursorHarness extends ComponentHarness {\n static hostSelector = 'wr-splash-cursor';\n\n /** Build a predicate that narrows the query β pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSplashCursorHarnessFilters = {}): HarnessPredicate<WrSplashCursorHarness> {\n return new HarnessPredicate(WrSplashCursorHarness, options).addOption(\n 'fullscreen',\n options.fullscreen,\n async (harness, fullscreen) => (await harness.isFullscreen()) === fullscreen\n );\n }\n\n /**\n * Whether the effect covers the whole viewport, rather than filling the nearest\n * positioned ancestor.\n *\n * The component's one behavioural switch: fullscreen is a fixed, click-through\n * overlay above the page, contained is an absolutely positioned box whose walls the\n * dye collides with. Note what is being read β there is no `--fullscreen` class, only\n * a `--contained` one written from a NEGATED binding, so this method answers the\n * absence of a class. That inversion is exactly the kind that gets flipped in a\n * refactor and looks fine on a page where the effect is full-viewport anyway, which\n * is the whole reason the method exists.\n */\n async isFullscreen(): Promise<boolean> {\n return !(await (await this.host()).hasClass('wr-splash-cursor--contained'));\n }\n\n /**\n * Whether the effect is hidden from assistive tech.\n *\n * It has no text and nothing to say, and at full size it sits in front of the entire\n * page β so losing this puts a nameless graphic over everything a screen reader is\n * trying to get through.\n */\n async isDecorative(): Promise<boolean> {\n return (await (await this.locatorFor('.wr-splash-cursor__canvas')()).getAttribute('aria-hidden')) === 'true';\n }\n\n /**\n * Whether the drawing surface is in the markup.\n *\n * It is there in all three states where nothing is ever drawn on it β prerendered on\n * the server, WebGL refused, or reduced motion β because the documented contract is\n * that the component renders nothing VISIBLE and stops, never that it renders no\n * element and never that it throws on a null context.\n */\n async hasCanvas(): Promise<boolean> {\n return (await this.locatorForOptional('.wr-splash-cursor__canvas')()) !== null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AACG,MAAO,qBAAsB,SAAQ,gBAAgB,CAAA;AACzD,IAAA,OAAO,YAAY,GAAG,kBAAkB;;AAGxC,IAAA,OAAO,IAAI,CAAC,OAAA,GAAwC,EAAE,EAAA;AACpD,QAAA,OAAO,IAAI,gBAAgB,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC,SAAS,CACnE,YAAY,EACZ,OAAO,CAAC,UAAU,EAClB,OAAO,OAAO,EAAE,UAAU,KAAK,CAAC,MAAM,OAAO,CAAC,YAAY,EAAE,MAAM,UAAU,CAC7E;IACH;AAEA;;;;;;;;;;;AAWG;AACH,IAAA,MAAM,YAAY,GAAA;AAChB,QAAA,OAAO,EAAE,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,6BAA6B,CAAC,CAAC;IAC7E;AAEA;;;;;;AAMG;AACH,IAAA,MAAM,YAAY,GAAA;QAChB,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,2BAA2B,CAAC,EAAE,EAAE,YAAY,CAAC,aAAa,CAAC,MAAM,MAAM;IAC9G;AAEA;;;;;;;AAOG;AACH,IAAA,MAAM,SAAS,GAAA;AACb,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,EAAE,MAAM,IAAI;IAChF;;;AC3FF;;AAEG;;;;"}
|
|
@@ -951,10 +951,10 @@ class WrSplashCursor {
|
|
|
951
951
|
onCleanup(teardown);
|
|
952
952
|
});
|
|
953
953
|
}
|
|
954
|
-
static Ι΅fac = i0.Ι΅Ι΅ngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
955
|
-
static Ι΅cmp = i0.Ι΅Ι΅ngDeclareComponent({ minVersion: "17.2.0", version: "22.1.
|
|
954
|
+
static Ι΅fac = i0.Ι΅Ι΅ngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrSplashCursor, deps: [], target: i0.Ι΅Ι΅FactoryTarget.Component });
|
|
955
|
+
static Ι΅cmp = i0.Ι΅Ι΅ngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: WrSplashCursor, isStandalone: true, selector: "wr-splash-cursor", inputs: { fullscreen: { classPropertyName: "fullscreen", publicName: "fullscreen", isSignal: true, isRequired: false, transformFunction: null }, simResolution: { classPropertyName: "simResolution", publicName: "simResolution", isSignal: true, isRequired: false, transformFunction: null }, dyeResolution: { classPropertyName: "dyeResolution", publicName: "dyeResolution", isSignal: true, isRequired: false, transformFunction: null }, densityDissipation: { classPropertyName: "densityDissipation", publicName: "densityDissipation", isSignal: true, isRequired: false, transformFunction: null }, velocityDissipation: { classPropertyName: "velocityDissipation", publicName: "velocityDissipation", isSignal: true, isRequired: false, transformFunction: null }, pressure: { classPropertyName: "pressure", publicName: "pressure", isSignal: true, isRequired: false, transformFunction: null }, pressureIterations: { classPropertyName: "pressureIterations", publicName: "pressureIterations", isSignal: true, isRequired: false, transformFunction: null }, curl: { classPropertyName: "curl", publicName: "curl", isSignal: true, isRequired: false, transformFunction: null }, splatRadius: { classPropertyName: "splatRadius", publicName: "splatRadius", isSignal: true, isRequired: false, transformFunction: null }, splatForce: { classPropertyName: "splatForce", publicName: "splatForce", isSignal: true, isRequired: false, transformFunction: null }, shading: { classPropertyName: "shading", publicName: "shading", isSignal: true, isRequired: false, transformFunction: null }, colorUpdateSpeed: { classPropertyName: "colorUpdateSpeed", publicName: "colorUpdateSpeed", isSignal: true, isRequired: false, transformFunction: null }, rainbow: { classPropertyName: "rainbow", publicName: "rainbow", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.wr-splash-cursor--contained": "!fullscreen()" }, classAttribute: "wr-splash-cursor" }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: '<canvas #canvas class="wr-splash-cursor__canvas" aria-hidden="true"></canvas>', isInline: true, styles: [".wr-splash-cursor{position:fixed;inset:0;z-index:50;display:block;pointer-events:none}.wr-splash-cursor__canvas{display:block;width:100vw;height:100vh;height:100dvh}.wr-splash-cursor--contained{position:absolute;z-index:0}.wr-splash-cursor--contained .wr-splash-cursor__canvas{width:100%;height:100%}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
956
956
|
}
|
|
957
|
-
i0.Ι΅Ι΅ngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
957
|
+
i0.Ι΅Ι΅ngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrSplashCursor, decorators: [{
|
|
958
958
|
type: Component,
|
|
959
959
|
args: [{ selector: 'wr-splash-cursor', template: '<canvas #canvas class="wr-splash-cursor__canvas" aria-hidden="true"></canvas>', encapsulation: ViewEncapsulation.None, host: {
|
|
960
960
|
class: 'wr-splash-cursor',
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { 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
|
+
/** The animated pieces β one per character or per word, whitespace excluded. */
|
|
10
|
+
const PIECE = '.wr-split-text__piece';
|
|
11
|
+
/** The whitespace runs between them, rendered but never staggered. */
|
|
12
|
+
const SPACE = '.wr-split-text__space';
|
|
13
|
+
/** The readable copy of the string, carried once and hidden with CSS. */
|
|
14
|
+
const SR_ONLY = '.wr-split-text__sr-only';
|
|
15
|
+
/**
|
|
16
|
+
* An inline `opacity` declaration β written on every piece the tween touches.
|
|
17
|
+
*
|
|
18
|
+
* `motionToStyle` always produces an opacity, whether or not `from` declared one, and
|
|
19
|
+
* the same property is re-committed when the tween finishes. Matched off the `style`
|
|
20
|
+
* ATTRIBUTE, never through `getCssValue`: a computed style answers `1` for a piece
|
|
21
|
+
* nothing was ever written to, which is the exact case this has to distinguish.
|
|
22
|
+
*/
|
|
23
|
+
const INLINE_OPACITY = /(?:^|;)\s*opacity\s*:/;
|
|
24
|
+
/** The host's own alignment declaration, as the host binding wrote it. */
|
|
25
|
+
const INLINE_TEXT_ALIGN = /(?:^|;)\s*text-align\s*:\s*([^;]+)/;
|
|
26
|
+
/** Exactly what the element holds β untrimmed, unlike `TestElement.text()`. */
|
|
27
|
+
async function rawText(element) {
|
|
28
|
+
return (await element.getProperty('textContent')) ?? '';
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Test harness for `<wr-split-text>`.
|
|
32
|
+
*
|
|
33
|
+
* **The tween is unreadable from a test, and the absent methods are absent for that
|
|
34
|
+
* reason.** Each piece is animated from a `from` motion state to a `to` one through the
|
|
35
|
+
* Web Animations API, started by an `IntersectionObserver`. A unit test has no layout,
|
|
36
|
+
* no compositor and no WAAPI, so there is no `getOpacity()` and no `getTransform()`:
|
|
37
|
+
* both would report the frozen staged value in jsdom and a value the compositor is not
|
|
38
|
+
* painting in a browser. There is no `getFromState()` / `getToState()` either β those
|
|
39
|
+
* objects only reach the DOM as staged inline styles, on the one path that throws here,
|
|
40
|
+
* so reporting them would mean re-deriving an input from a string the component may
|
|
41
|
+
* never have written. No `isAnimating()`, no `whenAnimationComplete()`: nothing in the
|
|
42
|
+
* document says a tween is running, and completion is the `animationComplete` OUTPUT,
|
|
43
|
+
* which the host binds. No `enterViewport()` / `trigger()`, because an observer is not
|
|
44
|
+
* reachable from a `TestElement` β and observation here is additionally gated behind
|
|
45
|
+
* `document.fonts.ready`, which jsdom does not have, so a `waitForFonts()` would resolve
|
|
46
|
+
* instantly and prove nothing about the gating it claimed to test. Nothing measures
|
|
47
|
+
* either: `getLineCount()` / `didItWrap()` would need layout (and `lines` is not a split
|
|
48
|
+
* this port supports), and the `overflow: hidden` mask with its descender compensation
|
|
49
|
+
* is a stylesheet, which a test runs none of.
|
|
50
|
+
*
|
|
51
|
+
* **What is real is the split, the accessible layer and the alignment.** The string is
|
|
52
|
+
* carried once in a visually-hidden span and every drawn piece is `aria-hidden`, so
|
|
53
|
+
* {@link getAccessibleText} is what is heard while {@link getPieces} is what is drawn β
|
|
54
|
+
* two questions, and a spec asserting only the second would pass on a component that
|
|
55
|
+
* spells the text out letter by letter. {@link getRenderedText} closes the loop by
|
|
56
|
+
* putting the pieces and the spaces back together: the split has to be lossless, and
|
|
57
|
+
* that comparison is what catches a dropped space or a halved surrogate pair. Whether
|
|
58
|
+
* the hidden copy is genuinely off-screen is CSS, so nothing here claims to know.
|
|
59
|
+
*
|
|
60
|
+
* **{@link getTextAlign} is the one input this component reflects**, written straight
|
|
61
|
+
* onto the host as an inline style β an honest read with no layout involved, unlike
|
|
62
|
+
* anything else about how the text is arranged. And {@link hasStagedMotion} is the one
|
|
63
|
+
* fact about the tween worth pinning: that the pieces were taken over, not that anything
|
|
64
|
+
* is moving.
|
|
65
|
+
*
|
|
66
|
+
* Driving the reveal is the spec's job β jsdom supplies neither half of it, and the font
|
|
67
|
+
* gate defers observation by a microtask:
|
|
68
|
+
*
|
|
69
|
+
* ```ts
|
|
70
|
+
* // Before TestBed.createComponent β keep the callbacks so the spec can fire them.
|
|
71
|
+
* vi.stubGlobal('IntersectionObserver', StubObserver);
|
|
72
|
+
* // Otherwise `el.animate(...)` throws mid-stagger and leaves the DOM half-staged.
|
|
73
|
+
* Reflect.set(Element.prototype, 'animate', () => ({ cancel: () => undefined, onfinish: null }));
|
|
74
|
+
* // β¦and always settle before tearing down: observation is queued off a promise, and
|
|
75
|
+
* // landing after destroy() registers a teardown on a dead DestroyRef (NG0911).
|
|
76
|
+
* await fixture.whenStable();
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* const hero = await loader.getHarness(WrSplitTextHarness.with({ textAlign: 'center' }));
|
|
82
|
+
*
|
|
83
|
+
* expect(await hero.getPieces()).toEqual(['H', 'e', 'l', 'l', 'o']);
|
|
84
|
+
* expect(await hero.getRenderedText()).toBe(await hero.getAccessibleText());
|
|
85
|
+
* expect(await hero.isTextHidden()).toBe(true);
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* @see https://ngwr.dev/guides/testing
|
|
89
|
+
*/
|
|
90
|
+
class WrSplitTextHarness extends ComponentHarness {
|
|
91
|
+
static hostSelector = 'wr-split-text';
|
|
92
|
+
/** Build a predicate that narrows the query β pass to `getHarness` / `getAllHarnesses`. */
|
|
93
|
+
static with(options = {}) {
|
|
94
|
+
return new HarnessPredicate(WrSplitTextHarness, options)
|
|
95
|
+
.addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getAccessibleText(), text))
|
|
96
|
+
.addOption('pieceCount', options.pieceCount, async (harness, count) => (await harness.getPieceCount()) === count)
|
|
97
|
+
.addOption('textAlign', options.textAlign, async (harness, align) => (await harness.getTextAlign()) === align);
|
|
98
|
+
}
|
|
99
|
+
pieces = this.locatorForAll(PIECE);
|
|
100
|
+
spaces = this.locatorForAll(SPACE);
|
|
101
|
+
/**
|
|
102
|
+
* The whole string, as the one readable copy holds it.
|
|
103
|
+
*
|
|
104
|
+
* All a screen reader gets, since every drawn piece is out of the tree β lose this
|
|
105
|
+
* span and the component becomes a nameless pile of hidden spans, with no other
|
|
106
|
+
* symptom anywhere in the DOM.
|
|
107
|
+
*
|
|
108
|
+
* Untrimmed, deliberately: leading and trailing whitespace is content the split has to
|
|
109
|
+
* carry, and {@link getRenderedText} is meant to compare equal to this. A trimmed read
|
|
110
|
+
* on one side of that comparison would forgive the case it exists to catch.
|
|
111
|
+
*/
|
|
112
|
+
async getAccessibleText() {
|
|
113
|
+
return rawText(await this.locatorFor(SR_ONLY)());
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The animated pieces, in document order β one per character, or one per word.
|
|
117
|
+
*
|
|
118
|
+
* The split the stagger runs over: `['H', 'i']` at the default `splitType="chars"`
|
|
119
|
+
* against `['Hi', 'there']` for `"words"`, and `['a', 'π']` for a surrogate pair the
|
|
120
|
+
* code-point split kept whole instead of halving into two broken glyphs. Whitespace is
|
|
121
|
+
* not here β it is drawn separately and never staggered, so see {@link getSpaceCount}.
|
|
122
|
+
*/
|
|
123
|
+
async getPieces() {
|
|
124
|
+
return Promise.all((await this.pieces()).map(rawText));
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* How many pieces the stagger runs over.
|
|
128
|
+
*
|
|
129
|
+
* `delay` Γ this is the real length of the effect, and the only number about the
|
|
130
|
+
* animation present in the document.
|
|
131
|
+
*/
|
|
132
|
+
async getPieceCount() {
|
|
133
|
+
return (await this.pieces()).length;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* How many whitespace runs sit between the pieces.
|
|
137
|
+
*
|
|
138
|
+
* Its own method because whitespace is deliberately excluded from the animated set:
|
|
139
|
+
* reclassifying spaces as pieces would leave {@link getRenderedText} identical, change
|
|
140
|
+
* the stagger count and the rhythm of the reveal, and show up nowhere else.
|
|
141
|
+
*/
|
|
142
|
+
async getSpaceCount() {
|
|
143
|
+
return (await this.spaces()).length;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Everything the component drew, pieces and spaces together, in document order.
|
|
147
|
+
*
|
|
148
|
+
* The assertion this exists for is `getRenderedText() === getAccessibleText()`: the
|
|
149
|
+
* split must be lossless. A swallowed space, a re-split that dropped a character or a
|
|
150
|
+
* surrogate pair cut in half all leave the accessible copy intact and are invisible
|
|
151
|
+
* from anywhere else.
|
|
152
|
+
*/
|
|
153
|
+
async getRenderedText() {
|
|
154
|
+
const parts = await this.locatorForAll(`${PIECE}, ${SPACE}`)();
|
|
155
|
+
return (await Promise.all(parts.map(rawText))).join('');
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Whether every drawn piece is out of the accessibility tree.
|
|
159
|
+
*
|
|
160
|
+
* The defect this component exists to avoid is a screen reader reading
|
|
161
|
+
* `H. e. l. l. o.`, and one piece missing `aria-hidden` brings it back β so this is
|
|
162
|
+
* all-or-nothing, across both element kinds: a readable space is heard as a pause in
|
|
163
|
+
* the middle of a word.
|
|
164
|
+
*
|
|
165
|
+
* Throws when the split produced nothing at all. An empty run of elements satisfies
|
|
166
|
+
* "every one of them is hidden" without anything being hidden, which is also what a
|
|
167
|
+
* component that stopped rendering its pieces would report.
|
|
168
|
+
*/
|
|
169
|
+
async isTextHidden() {
|
|
170
|
+
const parts = await this.locatorForAll(`${PIECE}, ${SPACE}`)();
|
|
171
|
+
if (parts.length === 0) {
|
|
172
|
+
throw new Error('WrSplitTextHarness.isTextHidden(): this <wr-split-text> drew no pieces, so there is nothing to be ' +
|
|
173
|
+
'hidden from a screen reader and "true" would be a vacuous answer β the same one a component that ' +
|
|
174
|
+
'stopped splitting its text would give. Check `text` is set, or ask getPieceCount().');
|
|
175
|
+
}
|
|
176
|
+
const hidden = await Promise.all(parts.map(part => part.getAttribute('aria-hidden')));
|
|
177
|
+
return hidden.every(value => value === 'true');
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* The alignment the host was given, as the component wrote it.
|
|
181
|
+
*
|
|
182
|
+
* Off the inline `style` attribute rather than through `getCssValue`, and the
|
|
183
|
+
* difference is not pedantry: computed style answers for an element nobody wrote to β
|
|
184
|
+
* with the inherited or user-agent value β so a host that stopped reflecting the input
|
|
185
|
+
* altogether would keep reporting a plausible `left` or `start`. The attribute is the
|
|
186
|
+
* fact being asserted.
|
|
187
|
+
*
|
|
188
|
+
* `null` means the host carries no alignment at all, which the component never does:
|
|
189
|
+
* the binding is unconditional and the input defaults to `'center'`.
|
|
190
|
+
*/
|
|
191
|
+
async getTextAlign() {
|
|
192
|
+
const match = INLINE_TEXT_ALIGN.exec((await (await this.host()).getAttribute('style')) ?? '');
|
|
193
|
+
return match ? match[1].trim() : null;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Whether the reveal has taken the pieces over β NOT whether anything is animating.
|
|
197
|
+
*
|
|
198
|
+
* Read off the inline `style` attribute the component writes itself, so it stays
|
|
199
|
+
* `true` once the reveal has finished: the tween commits its end state back to the
|
|
200
|
+
* same inline properties on `onfinish`. Anyone reaching for `isAnimating()` wants a
|
|
201
|
+
* frame, and there are no frames here.
|
|
202
|
+
*
|
|
203
|
+
* `false` is the answer worth asserting. It means no piece was written to, which is
|
|
204
|
+
* both the pre-trigger state and the reduced-motion promise β the component returns
|
|
205
|
+
* before staging anything, so a reader who asked for less motion cannot be left with
|
|
206
|
+
* text parked at `from.opacity: 0` by a tween that never runs.
|
|
207
|
+
*
|
|
208
|
+
* ANY piece counts, not all of them, and that is the conservative reading rather than
|
|
209
|
+
* a loose one: a stagger that stages the first piece and then throws leaves exactly
|
|
210
|
+
* one glyph invisible, which is a real failure β and one jsdom reproduces every time
|
|
211
|
+
* `Element.prototype.animate` is missing.
|
|
212
|
+
*/
|
|
213
|
+
async hasStagedMotion() {
|
|
214
|
+
const styles = await Promise.all((await this.pieces()).map(piece => piece.getAttribute('style')));
|
|
215
|
+
return styles.some(style => INLINE_OPACITY.test(style ?? ''));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Generated bundle index. Do not edit.
|
|
221
|
+
*/
|
|
222
|
+
|
|
223
|
+
export { WrSplitTextHarness };
|
|
224
|
+
//# sourceMappingURL=ngwr-split-text-testing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngwr-split-text-testing.mjs","sources":["../../../projects/lib/split-text/testing/wr-split-text-harness.ts","../../../projects/lib/split-text/testing/ngwr-split-text-testing.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrSplitTextHarnessFilters } from './interfaces';\n\n/** The animated pieces β one per character or per word, whitespace excluded. */\nconst PIECE = '.wr-split-text__piece';\n\n/** The whitespace runs between them, rendered but never staggered. */\nconst SPACE = '.wr-split-text__space';\n\n/** The readable copy of the string, carried once and hidden with CSS. */\nconst SR_ONLY = '.wr-split-text__sr-only';\n\n/**\n * An inline `opacity` declaration β written on every piece the tween touches.\n *\n * `motionToStyle` always produces an opacity, whether or not `from` declared one, and\n * the same property is re-committed when the tween finishes. Matched off the `style`\n * ATTRIBUTE, never through `getCssValue`: a computed style answers `1` for a piece\n * nothing was ever written to, which is the exact case this has to distinguish.\n */\nconst INLINE_OPACITY = /(?:^|;)\\s*opacity\\s*:/;\n\n/** The host's own alignment declaration, as the host binding wrote it. */\nconst INLINE_TEXT_ALIGN = /(?:^|;)\\s*text-align\\s*:\\s*([^;]+)/;\n\n/** Exactly what the element holds β untrimmed, unlike `TestElement.text()`. */\nasync function rawText(element: TestElement): Promise<string> {\n return (await element.getProperty<string | null>('textContent')) ?? '';\n}\n\n/**\n * Test harness for `<wr-split-text>`.\n *\n * **The tween is unreadable from a test, and the absent methods are absent for that\n * reason.** Each piece is animated from a `from` motion state to a `to` one through the\n * Web Animations API, started by an `IntersectionObserver`. A unit test has no layout,\n * no compositor and no WAAPI, so there is no `getOpacity()` and no `getTransform()`:\n * both would report the frozen staged value in jsdom and a value the compositor is not\n * painting in a browser. There is no `getFromState()` / `getToState()` either β those\n * objects only reach the DOM as staged inline styles, on the one path that throws here,\n * so reporting them would mean re-deriving an input from a string the component may\n * never have written. No `isAnimating()`, no `whenAnimationComplete()`: nothing in the\n * document says a tween is running, and completion is the `animationComplete` OUTPUT,\n * which the host binds. No `enterViewport()` / `trigger()`, because an observer is not\n * reachable from a `TestElement` β and observation here is additionally gated behind\n * `document.fonts.ready`, which jsdom does not have, so a `waitForFonts()` would resolve\n * instantly and prove nothing about the gating it claimed to test. Nothing measures\n * either: `getLineCount()` / `didItWrap()` would need layout (and `lines` is not a split\n * this port supports), and the `overflow: hidden` mask with its descender compensation\n * is a stylesheet, which a test runs none of.\n *\n * **What is real is the split, the accessible layer and the alignment.** The string is\n * carried once in a visually-hidden span and every drawn piece is `aria-hidden`, so\n * {@link getAccessibleText} is what is heard while {@link getPieces} is what is drawn β\n * two questions, and a spec asserting only the second would pass on a component that\n * spells the text out letter by letter. {@link getRenderedText} closes the loop by\n * putting the pieces and the spaces back together: the split has to be lossless, and\n * that comparison is what catches a dropped space or a halved surrogate pair. Whether\n * the hidden copy is genuinely off-screen is CSS, so nothing here claims to know.\n *\n * **{@link getTextAlign} is the one input this component reflects**, written straight\n * onto the host as an inline style β an honest read with no layout involved, unlike\n * anything else about how the text is arranged. And {@link hasStagedMotion} is the one\n * fact about the tween worth pinning: that the pieces were taken over, not that anything\n * is moving.\n *\n * Driving the reveal is the spec's job β jsdom supplies neither half of it, and the font\n * gate defers observation by a microtask:\n *\n * ```ts\n * // Before TestBed.createComponent β keep the callbacks so the spec can fire them.\n * vi.stubGlobal('IntersectionObserver', StubObserver);\n * // Otherwise `el.animate(...)` throws mid-stagger and leaves the DOM half-staged.\n * Reflect.set(Element.prototype, 'animate', () => ({ cancel: () => undefined, onfinish: null }));\n * // β¦and always settle before tearing down: observation is queued off a promise, and\n * // landing after destroy() registers a teardown on a dead DestroyRef (NG0911).\n * await fixture.whenStable();\n * ```\n *\n * @example\n * ```ts\n * const hero = await loader.getHarness(WrSplitTextHarness.with({ textAlign: 'center' }));\n *\n * expect(await hero.getPieces()).toEqual(['H', 'e', 'l', 'l', 'o']);\n * expect(await hero.getRenderedText()).toBe(await hero.getAccessibleText());\n * expect(await hero.isTextHidden()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSplitTextHarness extends ComponentHarness {\n static hostSelector = 'wr-split-text';\n\n /** Build a predicate that narrows the query β pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSplitTextHarnessFilters = {}): HarnessPredicate<WrSplitTextHarness> {\n return new HarnessPredicate(WrSplitTextHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getAccessibleText(), text)\n )\n .addOption('pieceCount', options.pieceCount, async (harness, count) => (await harness.getPieceCount()) === count)\n .addOption('textAlign', options.textAlign, async (harness, align) => (await harness.getTextAlign()) === align);\n }\n\n private readonly pieces = this.locatorForAll(PIECE);\n private readonly spaces = this.locatorForAll(SPACE);\n\n /**\n * The whole string, as the one readable copy holds it.\n *\n * All a screen reader gets, since every drawn piece is out of the tree β lose this\n * span and the component becomes a nameless pile of hidden spans, with no other\n * symptom anywhere in the DOM.\n *\n * Untrimmed, deliberately: leading and trailing whitespace is content the split has to\n * carry, and {@link getRenderedText} is meant to compare equal to this. A trimmed read\n * on one side of that comparison would forgive the case it exists to catch.\n */\n async getAccessibleText(): Promise<string> {\n return rawText(await this.locatorFor(SR_ONLY)());\n }\n\n /**\n * The animated pieces, in document order β one per character, or one per word.\n *\n * The split the stagger runs over: `['H', 'i']` at the default `splitType=\"chars\"`\n * against `['Hi', 'there']` for `\"words\"`, and `['a', 'π']` for a surrogate pair the\n * code-point split kept whole instead of halving into two broken glyphs. Whitespace is\n * not here β it is drawn separately and never staggered, so see {@link getSpaceCount}.\n */\n async getPieces(): Promise<string[]> {\n return Promise.all((await this.pieces()).map(rawText));\n }\n\n /**\n * How many pieces the stagger runs over.\n *\n * `delay` Γ this is the real length of the effect, and the only number about the\n * animation present in the document.\n */\n async getPieceCount(): Promise<number> {\n return (await this.pieces()).length;\n }\n\n /**\n * How many whitespace runs sit between the pieces.\n *\n * Its own method because whitespace is deliberately excluded from the animated set:\n * reclassifying spaces as pieces would leave {@link getRenderedText} identical, change\n * the stagger count and the rhythm of the reveal, and show up nowhere else.\n */\n async getSpaceCount(): Promise<number> {\n return (await this.spaces()).length;\n }\n\n /**\n * Everything the component drew, pieces and spaces together, in document order.\n *\n * The assertion this exists for is `getRenderedText() === getAccessibleText()`: the\n * split must be lossless. A swallowed space, a re-split that dropped a character or a\n * surrogate pair cut in half all leave the accessible copy intact and are invisible\n * from anywhere else.\n */\n async getRenderedText(): Promise<string> {\n const parts = await this.locatorForAll(`${PIECE}, ${SPACE}`)();\n return (await Promise.all(parts.map(rawText))).join('');\n }\n\n /**\n * Whether every drawn piece is out of the accessibility tree.\n *\n * The defect this component exists to avoid is a screen reader reading\n * `H. e. l. l. o.`, and one piece missing `aria-hidden` brings it back β so this is\n * all-or-nothing, across both element kinds: a readable space is heard as a pause in\n * the middle of a word.\n *\n * Throws when the split produced nothing at all. An empty run of elements satisfies\n * \"every one of them is hidden\" without anything being hidden, which is also what a\n * component that stopped rendering its pieces would report.\n */\n async isTextHidden(): Promise<boolean> {\n const parts = await this.locatorForAll(`${PIECE}, ${SPACE}`)();\n\n if (parts.length === 0) {\n throw new Error(\n 'WrSplitTextHarness.isTextHidden(): this <wr-split-text> drew no pieces, so there is nothing to be ' +\n 'hidden from a screen reader and \"true\" would be a vacuous answer β the same one a component that ' +\n 'stopped splitting its text would give. Check `text` is set, or ask getPieceCount().'\n );\n }\n\n const hidden = await Promise.all(parts.map(part => part.getAttribute('aria-hidden')));\n return hidden.every(value => value === 'true');\n }\n\n /**\n * The alignment the host was given, as the component wrote it.\n *\n * Off the inline `style` attribute rather than through `getCssValue`, and the\n * difference is not pedantry: computed style answers for an element nobody wrote to β\n * with the inherited or user-agent value β so a host that stopped reflecting the input\n * altogether would keep reporting a plausible `left` or `start`. The attribute is the\n * fact being asserted.\n *\n * `null` means the host carries no alignment at all, which the component never does:\n * the binding is unconditional and the input defaults to `'center'`.\n */\n async getTextAlign(): Promise<string | null> {\n const match = INLINE_TEXT_ALIGN.exec((await (await this.host()).getAttribute('style')) ?? '');\n return match ? match[1].trim() : null;\n }\n\n /**\n * Whether the reveal has taken the pieces over β NOT whether anything is animating.\n *\n * Read off the inline `style` attribute the component writes itself, so it stays\n * `true` once the reveal has finished: the tween commits its end state back to the\n * same inline properties on `onfinish`. Anyone reaching for `isAnimating()` wants a\n * frame, and there are no frames here.\n *\n * `false` is the answer worth asserting. It means no piece was written to, which is\n * both the pre-trigger state and the reduced-motion promise β the component returns\n * before staging anything, so a reader who asked for less motion cannot be left with\n * text parked at `from.opacity: 0` by a tween that never runs.\n *\n * ANY piece counts, not all of them, and that is the conservative reading rather than\n * a loose one: a stagger that stages the first piece and then throws leaves exactly\n * one glyph invisible, which is a real failure β and one jsdom reproduces every time\n * `Element.prototype.animate` is missing.\n */\n async hasStagedMotion(): Promise<boolean> {\n const styles = await Promise.all((await this.pieces()).map(piece => piece.getAttribute('style')));\n return styles.some(style => INLINE_OPACITY.test(style ?? ''));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;AACA,MAAM,KAAK,GAAG,uBAAuB;AAErC;AACA,MAAM,KAAK,GAAG,uBAAuB;AAErC;AACA,MAAM,OAAO,GAAG,yBAAyB;AAEzC;;;;;;;AAOG;AACH,MAAM,cAAc,GAAG,uBAAuB;AAE9C;AACA,MAAM,iBAAiB,GAAG,oCAAoC;AAE9D;AACA,eAAe,OAAO,CAAC,OAAoB,EAAA;I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