ngwr 14.7.0 → 14.9.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 +66 -332
- package/alert/styles/_index.scss +10 -0
- package/avatar/styles/_index.scss +18 -7
- package/badge/styles/_index.scss +7 -0
- package/badge/styles/_tag.scss +7 -1
- package/bar-chart/styles/_index.scss +1 -0
- package/button/styles/_index.scss +6 -0
- package/calendar-heatmap/styles/_index.scss +1 -0
- package/cascader/styles/_rules.scss +87 -15
- package/checkbox/styles/_index.scss +4 -0
- package/command-palette/styles/_index.scss +1 -1
- package/date-picker/styles/_index.scss +30 -0
- package/density/styles/_index.scss +4 -2
- package/divider/styles/_index.scss +2 -0
- package/donut-chart/styles/_index.scss +10 -0
- package/dropdown/styles/_index.scss +67 -5
- package/editor/styles/_index.scss +441 -0
- package/event-calendar/styles/_index.scss +209 -35
- package/fesm2022/ngwr-action-sheet-testing.mjs.map +1 -1
- package/fesm2022/ngwr-action-sheet.mjs +3 -3
- package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-aurora.mjs +3 -3
- package/fesm2022/ngwr-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +28 -13
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart.mjs +31 -6
- package/fesm2022/ngwr-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text.mjs +3 -3
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow-testing.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +3 -3
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +6 -6
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-burger.mjs.map +1 -1
- package/fesm2022/ngwr-button-testing.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +61 -6
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +3 -3
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +4 -4
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +18 -8
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +3 -3
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +3 -3
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-clipboard.mjs.map +1 -1
- package/fesm2022/ngwr-collapse-testing.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-collapse.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +6 -6
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette-testing.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-compare.mjs.map +1 -1
- package/fesm2022/ngwr-confetti.mjs +3 -3
- package/fesm2022/ngwr-confetti.mjs.map +1 -1
- package/fesm2022/ngwr-config.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +12 -12
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-cookie.mjs.map +1 -1
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapters-fns.mjs +3 -3
- package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
- package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +721 -62
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +3 -3
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text.mjs +3 -3
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-density.mjs.map +1 -1
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs.map +1 -1
- package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +15 -15
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart.mjs +48 -6
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +6 -6
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +18 -18
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +174 -25
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor-testing.mjs +568 -0
- package/fesm2022/ngwr-editor-testing.mjs.map +1 -0
- package/fesm2022/ngwr-editor.mjs +2601 -0
- package/fesm2022/ngwr-editor.mjs.map +1 -0
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-empty.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +14 -7
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +3 -3
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +3 -3
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form-testing.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +61 -10
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge-testing.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +35 -6
- package/fesm2022/ngwr-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +3 -3
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +3 -3
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +6 -6
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +31 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +31 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +31 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +39 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +31 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +31 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +31 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +31 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +31 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +31 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +31 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +31 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +31 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +31 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +31 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +31 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +31 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +31 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +31 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +31 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-TW.mjs +31 -0
- package/fesm2022/ngwr-i18n-zh-TW.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +31 -0
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-feather.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +15 -3
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +3 -3
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-keyboard.mjs.map +1 -1
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +3 -3
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +18 -7
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +6 -6
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-markdown.mjs +798 -17
- package/fesm2022/ngwr-markdown.mjs.map +1 -1
- package/fesm2022/ngwr-marquee-testing.mjs.map +1 -1
- package/fesm2022/ngwr-marquee.mjs +3 -3
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-media.mjs.map +1 -1
- package/fesm2022/ngwr-mention-testing.mjs.map +1 -1
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group-testing.mjs +7 -3
- package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group.mjs +26 -6
- package/fesm2022/ngwr-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +6 -6
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +13 -5
- package/fesm2022/ngwr-page-header.mjs.map +1 -1
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +21 -21
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-platform.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +6 -6
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +578 -16
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio-testing.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-rating-testing.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text.mjs +3 -3
- package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +3 -3
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select-testing.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +12 -12
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +6 -6
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +10 -3
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline-testing.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +84 -10
- package/fesm2022/ngwr-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor-testing.mjs.map +1 -1
- package/fesm2022/ngwr-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-splash-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-split-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-split-text.mjs +3 -3
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter-testing.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card-testing.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card.mjs +6 -6
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +6 -6
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-star-border-testing.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +3 -3
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch-testing.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +18 -18
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +6 -6
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +6 -6
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-timeline.mjs.map +1 -1
- package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
- package/fesm2022/ngwr-toast.mjs +9 -9
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +10 -3
- package/fesm2022/ngwr-toolbar.mjs.map +1 -1
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +6 -6
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +3 -3
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +3 -3
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +3 -3
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +7 -3
- package/fesm2022/ngwr-typography.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-validators.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 +3 -3
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves-testing.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +3 -3
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window-testing.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +12 -12
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/form/styles/_index.scss +16 -1
- package/gauge/styles/_index.scss +1 -0
- package/i18n/ar.json +32 -1
- package/i18n/cs.json +32 -1
- package/i18n/de.json +32 -1
- package/i18n/en.json +32 -1
- package/i18n/es.json +32 -1
- package/i18n/fr.json +32 -1
- package/i18n/he.json +32 -1
- package/i18n/hi.json +32 -1
- package/i18n/id.json +32 -1
- package/i18n/it.json +32 -1
- package/i18n/ja.json +32 -1
- package/i18n/ko.json +32 -1
- package/i18n/nl.json +32 -1
- package/i18n/pl.json +32 -1
- package/i18n/pt.json +32 -1
- package/i18n/ru.json +32 -1
- package/i18n/sv.json +32 -1
- package/i18n/tr.json +32 -1
- package/i18n/uk.json +32 -1
- package/i18n/vi.json +32 -1
- package/i18n/zh-TW.json +32 -1
- package/i18n/zh.json +32 -1
- package/input/styles/_index.scss +24 -1
- package/input-number/styles/_index.scss +69 -0
- package/input-otp/styles/_index.scss +5 -5
- package/line-chart/styles/_index.scss +30 -2
- package/llms-full.txt +14 -4
- package/llms.txt +188 -132
- package/mcp/providers.js +2 -2
- package/mcp/server.js +1 -1
- package/meter-group/styles/_index.scss +1 -0
- package/overlay/styles/_arrow.scss +30 -2
- package/package.json +43 -2
- package/page-header/styles/_index.scss +37 -1
- package/pagination/styles/_index.scss +9 -5
- package/popover/styles/_index.scss +73 -5
- package/progress/styles/_index.scss +4 -0
- package/radio/styles/_index.scss +4 -1
- package/schematics/use/symbol-map.json +1 -0
- package/select/styles/_index.scss +51 -12
- package/sidebar/styles/_index.scss +44 -2
- package/skeleton/styles/_index.scss +3 -0
- package/skills/ngwr/SKILL.md +5 -5
- package/skills/ngwr/references/catalog.md +2 -0
- package/skills/ngwr/references/setup.md +3 -3
- package/sparkline/styles/_index.scss +19 -0
- package/styles.scss +1 -0
- package/table/styles/_index.scss +7 -0
- package/textarea/styles/_index.scss +12 -3
- package/theme/styles/_colors.scss +39 -13
- package/theme/styles/_contrast.scss +9 -7
- package/toast/styles/_index.scss +4 -0
- package/toolbar/styles/_index.scss +35 -1
- package/tree/styles/_index.scss +46 -7
- package/types/ngwr-badge.d.ts +22 -7
- package/types/ngwr-bar-chart.d.ts +19 -1
- package/types/ngwr-calendar-heatmap.d.ts +29 -1
- package/types/ngwr-checkbox.d.ts +2 -0
- package/types/ngwr-config.d.ts +12 -0
- package/types/ngwr-date-picker.d.ts +308 -43
- package/types/ngwr-donut-chart.d.ts +24 -1
- package/types/ngwr-dropdown.d.ts +22 -2
- package/types/ngwr-editor-testing.d.ts +378 -0
- package/types/ngwr-editor.d.ts +449 -0
- package/types/ngwr-event-calendar.d.ts +8 -0
- package/types/ngwr-form.d.ts +35 -5
- package/types/ngwr-gauge.d.ts +20 -1
- package/types/ngwr-input-number.d.ts +7 -0
- package/types/ngwr-line-chart.d.ts +9 -1
- package/types/ngwr-markdown.d.ts +61 -2
- package/types/ngwr-meter-group-testing.d.ts +3 -2
- package/types/ngwr-meter-group.d.ts +14 -1
- package/types/ngwr-page-header.d.ts +10 -2
- package/types/ngwr-popover.d.ts +154 -3
- package/types/ngwr-sidebar.d.ts +7 -0
- package/types/ngwr-sparkline.d.ts +43 -1
- package/types/ngwr-toolbar.d.ts +7 -0
- package/types/ngwr-typography.d.ts +4 -0
- package/types/ngwr-version.d.ts +1 -1
- package/typography/styles/_index.scss +16 -0
package/fesm2022/ngwr-date.mjs
CHANGED
|
@@ -847,10 +847,10 @@ class WrNativeDateAdapter extends WrDateAdapter {
|
|
|
847
847
|
return null;
|
|
848
848
|
return out;
|
|
849
849
|
}
|
|
850
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
851
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
850
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrNativeDateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
851
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.7", ngImport: i0, type: WrNativeDateAdapter });
|
|
852
852
|
}
|
|
853
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
853
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrNativeDateAdapter, decorators: [{
|
|
854
854
|
type: Service
|
|
855
855
|
}] });
|
|
856
856
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-date.mjs","sources":["../../../projects/lib/date/wr-date-adapter.ts","../../../projects/lib/date/tokens/wr-date-locale.token.ts","../../../projects/lib/date/wr-native-date-adapter.ts","../../../projects/lib/date/provide-wr-date-adapter.ts","../../../projects/lib/date/ngwr-date.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 type { WrDateFormat } from './interfaces';\n\n/**\n * Abstraction over a date object so the calendar, date picker and time picker\n * can work with `Date`, `date-fns`, `luxon`, or any other library a consumer\n * prefers — without changing component code.\n *\n * Default implementation: {@link WrNativeDateAdapter} (native `Date`,\n * `Intl.DateTimeFormat`). Register a different adapter via\n * `provideWrDateAdapter({ adapter: MyAdapter })`.\n *\n * Used as both the type and the DI token — `inject(WrDateAdapter)` works\n * directly thanks to Angular's class-as-token resolution.\n *\n * Every \"mutating\" method (`addX`, `setTime`) returns a **new** value;\n * adapters never mutate in place so consumers can pass dates around safely.\n */\nexport abstract class WrDateAdapter<TDate = Date> {\n // Construction & identity\n\n /** Current moment. */\n abstract today(): TDate;\n\n /** Defensive clone — must return an independent value, never the same reference. */\n abstract clone(date: TDate): TDate;\n\n /** Build a date from year / month (0-based) / day. */\n abstract createDate(year: number, month: number, day: number): TDate;\n\n /** `false` for `NaN` / invalid input. */\n abstract isValid(date: TDate): boolean;\n\n // Accessors\n\n abstract getYear(date: TDate): number;\n /** `0` (January) – `11` (December). */\n abstract getMonth(date: TDate): number;\n /** Day of the month, `1`-`31`. */\n abstract getDate(date: TDate): number;\n /** `0` (Sunday) – `6` (Saturday). */\n abstract getDayOfWeek(date: TDate): number;\n abstract getDaysInMonth(date: TDate): number;\n abstract getHours(date: TDate): number;\n abstract getMinutes(date: TDate): number;\n abstract getSeconds(date: TDate): number;\n\n // Immutable math\n\n abstract addYears(date: TDate, amount: number): TDate;\n abstract addMonths(date: TDate, amount: number): TDate;\n abstract addDays(date: TDate, amount: number): TDate;\n /** Returns a new date with the time portion replaced. */\n abstract setTime(date: TDate, hours: number, minutes: number, seconds: number): TDate;\n\n // Comparison\n\n abstract isSameDay(a: TDate, b: TDate): boolean;\n abstract isSameMonth(a: TDate, b: TDate): boolean;\n /** Negative if `a < b`, positive if `a > b`, zero if equal (compared at day precision). */\n abstract compareDate(a: TDate, b: TDate): number;\n\n /**\n * Convenience used by the calendar's range UI. Inclusive on both ends.\n * Implementation can stay on the base class because it delegates to\n * `compareDate`.\n */\n isWithinRange(date: TDate, start: TDate, end: TDate): boolean {\n return this.compareDate(date, start) >= 0 && this.compareDate(date, end) <= 0;\n }\n\n // Formatting / parsing\n\n /**\n * Format a date. Accepts either a named {@link WrDateFormat} key (which the\n * adapter resolves locale-aware) or a raw format string (`'dd.MM.yyyy'`).\n *\n * Supported tokens for raw strings: `yyyy`, `yy`, `MMMM`, `MMM`, `MM`, `M`,\n * `dd`, `d`, `HH`, `H`, `hh`, `h`, `mm`, `ss`, `a` (the locale's day-period\n * marker — `PM`, `م`, `午後`).\n *\n * `MMMM` / `MMM` take the form the language uses in the position the pattern\n * puts them: beside a day token a case language declines the month (ru writes\n * `15 марта`, not `15 март`), and on their own they stay nominative, which is\n * what a calendar heading wants.\n */\n abstract format(date: TDate, formatKeyOrString: WrDateFormat | (string & {})): string;\n\n /**\n * Parse a string into a date. Returns `null` when parsing fails. Accepts\n * the same `formatKeyOrString` set as {@link format}.\n *\n * **The round trip is a contract, not an aspiration**: whatever {@link format}\n * writes for a given key, `parse` reads back to the same date. A caller relies\n * on it every keystroke — the picker re-parses what it printed — and returning\n * `null` is how an adapter refuses, which leaves the caller's committed value\n * exactly as it was.\n */\n abstract parse(value: string, formatKeyOrString: WrDateFormat | (string & {})): TDate | null;\n\n // Locale info\n\n /** `0` Sunday, `1` Monday — locale-dependent. */\n abstract getFirstDayOfWeek(): number;\n\n /** Names ordered from `getFirstDayOfWeek()` onwards. Length 7. */\n abstract getDayOfWeekNames(style: 'narrow' | 'short' | 'long'): readonly string[];\n\n /** Names from January (index `0`) to December (`11`). Length 12. */\n abstract getMonthNames(style: 'narrow' | 'short' | 'long'): readonly string[];\n}\n","/**\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 { InjectionToken, LOCALE_ID, inject } from '@angular/core';\n\n/**\n * BCP 47 locale tag the {@link WrDateAdapter} implementations read. Defaults to\n * Angular's `LOCALE_ID`; override via {@link provideWrDateAdapter}'s `locale`\n * option.\n *\n * **It used to default to `navigator.language`, and that was wrong in the\n * documented case.** The provider's own first example is the no-argument call,\n * so the path a reader copies was the broken one: an app that set\n * `LOCALE_ID: 'ru-RU'` and translated every string still rendered `March 2026`,\n * `SUN MON TUE …` and a week starting on Sunday, because the calendar was\n * asking the browser rather than the application. `navigator.language` is the\n * user's browser preference; `LOCALE_ID` is what the app says it is, and only\n * the app can be right about that. Reading the browser also made a prerendered\n * page and its hydrated self disagree — the server has no `navigator.language`\n * to match. An app that genuinely wants the browser's tag can still say so:\n * `provideWrDateAdapter({ locale: navigator.language })`.\n *\n * The token is a plain string, resolved once. It is therefore the *pinned* date\n * locale, not a live one — `WrI18n.use()` moves catalog text and cannot move\n * this. `WrI18n`'s class docs carry the full precedence and `use()` warns about\n * the gap in dev mode.\n *\n * **How far it reaches depends on the adapter, and the difference matters.**\n * The native and luxon adapters thread it through everything. The date-fns\n * adapter cannot: date-fns resolves its patterns against a `Locale` OBJECT, not\n * a tag, so this token drives only the parts that go through `Intl` (the month\n * and weekday names) and the OBJECT drives `format` / `parse`. Pass it as\n * `provideWrDateFnsAdapter({ dateFnsLocale: ru })` — with only a tag the calendar\n * headings localize and the field does not, which the adapter warns about once\n * in dev mode.\n */\nexport const WR_DATE_LOCALE = new InjectionToken<string>('WR_DATE_LOCALE', {\n providedIn: 'root',\n factory: () => inject(LOCALE_ID),\n});\n","/**\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 { Service, inject } from '@angular/core';\n\nimport type { WrDateFormat } from './interfaces';\nimport { WR_DATE_LOCALE } from './tokens';\nimport { WrDateAdapter } from './wr-date-adapter';\n\nconst NAMED_KEYS = new Set<WrDateFormat>([\n 'shortDate',\n 'mediumDate',\n 'longDate',\n 'time',\n 'shortDateTime',\n 'mediumDateTime',\n]);\n\n/**\n * Bidi control marks ICU embeds in a right-to-left date pattern — ar-SA writes its\n * separator as U+200F followed by a slash. No keyboard produces one, so both the\n * pattern and the typed string drop them before they are compared.\n */\nconst BIDI_RE = /[\\u200e\\u200f\\u061c\\u2066-\\u2069]/g;\n\nconst REGEX_META_RE = /[.*+?^${}()|[\\]\\\\]/g;\n\nfunction stripBidi(value: string): string {\n return value.replace(BIDI_RE, '');\n}\n\nfunction escapeRegex(value: string): string {\n return value.replace(REGEX_META_RE, '\\\\$&');\n}\n\n/**\n * One literal run of an `Intl` pattern, as a regex fragment.\n *\n * Whitespace inside a literal is advisory, not exact: ICU separates `02:30` from `PM`\n * with a NARROW NO-BREAK SPACE (U+202F) and no keyboard emits one, so every whitespace\n * run matches `\\s*`. A literal that is nothing BUT whitespace keeps `\\s+` — relaxing it\n * there would let `15 2026` also read as `152026`, which is how a lenient parser invents\n * a date nobody typed.\n */\nfunction literalToRegex(literal: string): string {\n const text = stripBidi(literal);\n if (!text) return '';\n if (!text.trim()) return '\\\\s+';\n return text.split(/\\s+/).map(escapeRegex).join('\\\\s*');\n}\n\n/** Longest first, so `March` is never consumed as `Mar` with `ch` left over. */\nfunction alternation(names: readonly string[]): string {\n return [...new Set(names)]\n .sort((a, b) => b.length - a.length)\n .map(name => escapeRegex(stripBidi(name)))\n .join('|');\n}\n\n/**\n * The ten digits a locale's numbering system writes, index 0 to 9 — `null` when the\n * system is algorithmic (roman, hebrew) and there is no digit-by-digit reading to do.\n */\nfunction numeralsFor(locale: string, numberingSystem: string): readonly string[] | null {\n let formatter: Intl.NumberFormat;\n try {\n formatter = new Intl.NumberFormat(locale, { numberingSystem, useGrouping: false });\n } catch {\n return null;\n }\n const digits: string[] = [];\n for (let i = 0; i < 10; i++) {\n const digit = formatter.format(i);\n if ([...digit].length !== 1 || digits.includes(digit)) return null;\n digits.push(digit);\n }\n return digits;\n}\n\n/** A character class accepting the locale's own digits AND ASCII ones. */\nfunction digitClass(numerals: readonly string[]): string {\n const extra = numerals\n .filter(digit => digit < '0' || digit > '9')\n .map(digit => `\\\\u${digit.codePointAt(0)!.toString(16).padStart(4, '0')}`)\n .join('');\n return `[0-9${extra}]`;\n}\n\n/** `١٥` to `15`, and ASCII through unchanged. `NaN` for anything else. */\nfunction digitsToNumber(text: string, numerals: readonly string[]): number {\n let out = '';\n for (const ch of text) {\n if (ch >= '0' && ch <= '9') {\n out += ch;\n continue;\n }\n const index = numerals.indexOf(ch);\n if (index < 0) return Number.NaN;\n out += String(index);\n }\n return out ? Number(out) : Number.NaN;\n}\n\nfunction isAllDigits(text: string, numerals: readonly string[]): boolean {\n return text.length > 0 && !Number.isNaN(digitsToNumber(text, numerals));\n}\n\n/** What one capture group of a named-format parser holds. */\ninterface NamedField {\n readonly kind: 'year' | 'month' | 'monthName' | 'day' | 'hour' | 'minute' | 'second' | 'dayPeriod';\n /** Month names (12) or day-period names (`[am, pm]`), matched case-insensitively. */\n readonly names?: readonly string[];\n}\n\ninterface NamedParser {\n readonly regex: RegExp;\n readonly fields: readonly NamedField[];\n readonly numerals: readonly string[];\n readonly hourCycle: string | undefined;\n}\n\n/** The parts assembled into a `Date`, whatever route read them. */\ninterface DateParts {\n year?: number;\n month?: number;\n day?: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n hour12?: number;\n isPm?: boolean;\n}\n\nconst INTL_OPTIONS: Readonly<Record<WrDateFormat, Intl.DateTimeFormatOptions>> = {\n shortDate: { year: 'numeric', month: 'numeric', day: 'numeric' },\n mediumDate: { year: 'numeric', month: 'short', day: 'numeric' },\n longDate: { year: 'numeric', month: 'long', day: 'numeric' },\n time: { hour: '2-digit', minute: '2-digit' },\n shortDateTime: { year: 'numeric', month: 'numeric', day: 'numeric', hour: '2-digit', minute: '2-digit' },\n mediumDateTime: { year: 'numeric', month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' },\n};\n\n/** Recognised tokens, longest first so `MMMM` matches before `MMM`. */\n/**\n * Every token, with single-quoted runs taken FIRST so they win.\n *\n * Without that, the one-letter tokens match letters inside literal text: `'yyyy [year]'`\n * came out as `2025 [yeamr]`, because the `a` in \"year\" was read as the meridiem token.\n * Quote literals the way `DatePipe` and LDML do — `'at'` — and `''` for a real quote.\n */\nconst PART_RE = /'([^']*)'|yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|H|hh|h|mm|ss|a/g;\n\nfunction pad(n: number, width = 2): string {\n return String(Math.abs(n)).padStart(width, '0');\n}\n\n/** Whether `value` is one of the shared named format keys. */\nfunction isNamedFormat(value: string): value is WrDateFormat {\n return NAMED_KEYS.has(value as WrDateFormat);\n}\n\n/**\n * `digits` is a character class rather than `\\d`, and it always accepts ASCII as well as\n * the locale's own numerals. The token formatter WRITES ASCII, so the round trip never\n * needed more — but a reader on an Arabic keyboard types `١٥` into the same field, and\n * `\\d` made that silently unparseable with no feedback anywhere.\n */\nfunction tokenToRegex(token: string, digits: string): string {\n switch (token) {\n case 'yyyy':\n return `(${digits}{4})`;\n case 'yy':\n return `(${digits}{2})`;\n case 'MM':\n case 'dd':\n case 'HH':\n case 'hh':\n case 'mm':\n case 'ss':\n return `(${digits}{2})`;\n case 'M':\n case 'd':\n case 'H':\n case 'h':\n return `(${digits}{1,2})`;\n case 'a':\n return '(am|pm|AM|PM)';\n default:\n return '(.+)';\n }\n}\n\n/**\n * Reference {@link WrDateAdapter} implementation backed by the native `Date`\n * object and `Intl.DateTimeFormat`. Zero external dependencies. Suitable for\n * most apps — swap to a `date-fns` / `luxon` adapter only when you need\n * timezone-aware math or richer parsing.\n */\n@Service()\nexport class WrNativeDateAdapter extends WrDateAdapter<Date> {\n private readonly locale = inject(WR_DATE_LOCALE);\n\n // Construction & identity\n\n today(): Date {\n return new Date();\n }\n\n clone(date: Date): Date {\n return new Date(date.getTime());\n }\n\n createDate(year: number, month: number, day: number): Date {\n // Native Date constructor with year < 100 maps to 1900 + year unless we explicitly setFullYear.\n const d = new Date(year, month, day);\n if (year >= 0 && year < 100) d.setFullYear(year);\n return d;\n }\n\n isValid(date: Date): boolean {\n return date instanceof Date && !Number.isNaN(date.getTime());\n }\n\n // Accessors\n\n getYear(date: Date): number {\n return date.getFullYear();\n }\n\n getMonth(date: Date): number {\n return date.getMonth();\n }\n\n getDate(date: Date): number {\n return date.getDate();\n }\n\n getDayOfWeek(date: Date): number {\n return date.getDay();\n }\n\n getDaysInMonth(date: Date): number {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();\n }\n\n getHours(date: Date): number {\n return date.getHours();\n }\n\n getMinutes(date: Date): number {\n return date.getMinutes();\n }\n\n getSeconds(date: Date): number {\n return date.getSeconds();\n }\n\n // Immutable math\n\n addYears(date: Date, amount: number): Date {\n const d = this.clone(date);\n d.setFullYear(d.getFullYear() + amount);\n return d;\n }\n\n addMonths(date: Date, amount: number): Date {\n const d = this.clone(date);\n const desiredDay = d.getDate();\n d.setDate(1);\n d.setMonth(d.getMonth() + amount);\n // Clamp day to the new month's length (Jan 31 + 1 month → Feb 28/29).\n d.setDate(Math.min(desiredDay, this.getDaysInMonth(d)));\n return d;\n }\n\n addDays(date: Date, amount: number): Date {\n // A calendar day, not 86 400 000 ms. Where daylight saving applies a day can be 23 or\n // 25 hours long, so millisecond arithmetic drifts the wall clock and — across an\n // autumn change — lands back on the same calendar date, which makes a month grid\n // repeat a day and lose one. Not observable in a fixed-offset timezone, which is why\n // the reason lives here rather than only in a test.\n const d = this.clone(date);\n d.setDate(d.getDate() + amount);\n return d;\n }\n\n setTime(date: Date, hours: number, minutes: number, seconds: number): Date {\n const d = this.clone(date);\n d.setHours(hours, minutes, seconds, 0);\n return d;\n }\n\n // Comparison\n\n isSameDay(a: Date, b: Date): boolean {\n return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();\n }\n\n isSameMonth(a: Date, b: Date): boolean {\n return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth();\n }\n\n compareDate(a: Date, b: Date): number {\n const ay = a.getFullYear();\n const by = b.getFullYear();\n if (ay !== by) return ay - by;\n const am = a.getMonth();\n const bm = b.getMonth();\n if (am !== bm) return am - bm;\n return a.getDate() - b.getDate();\n }\n\n // Formatting / parsing\n\n // `(string & {})` keeps autocomplete for the WrDateFormat literals\n // while still accepting any other string as a raw token pattern.\n format(date: Date, formatKeyOrString: WrDateFormat | (string & {})): string {\n if (isNamedFormat(formatKeyOrString)) {\n return this.intl(formatKeyOrString).format(date);\n }\n return this.formatWithTokens(date, formatKeyOrString);\n }\n\n /**\n * Read back what {@link format} wrote.\n *\n * A named format used to delegate to `new Date(raw)`, which understands only\n * Anglo-American forms — so the field could not read its own output anywhere else.\n * `new Date('15.3.2026')` and `new Date('14:30')` are both `Invalid Date`, while\n * `new Date('1')` is 1 January 2001: retyping a de-DE date committed the year 2001 on\n * the first keystroke and then refused every one after it, and `mode=\"time\"` collapsed\n * to midnight in EVERY locale, en-US included. The named branch now builds its parser\n * from the SAME `Intl.DateTimeFormat` that printed the string, so the round trip holds\n * by construction rather than by luck.\n *\n * Returns `null` rather than a guess whenever the string does not match — the caller's\n * committed value is then left exactly as it was, which is the contract\n * `wr-input-number` follows for unparseable text.\n */\n parse(value: string, formatKeyOrString: WrDateFormat | (string & {})): Date | null {\n const raw = value?.trim();\n if (!raw) return null;\n\n if (isNamedFormat(formatKeyOrString)) {\n return this.parseNamed(raw, formatKeyOrString);\n }\n\n return this.parseWithTokens(raw, formatKeyOrString);\n }\n\n // Locale info\n\n getFirstDayOfWeek(): number {\n // `Intl.Locale.prototype.getWeekInfo` is Stage 3 — not in TS lib types yet,\n // so we probe at runtime through an unknown cast.\n try {\n const locale = new Intl.Locale(this.locale) as unknown as { getWeekInfo?: () => { firstDay: number } };\n const info = locale.getWeekInfo?.();\n if (info && typeof info.firstDay === 'number') {\n // Intl uses 1 (Mon) – 7 (Sun); we use 0 (Sun) – 6 (Sat).\n return info.firstDay % 7;\n }\n } catch {\n // Browser doesn't support Intl.Locale or getWeekInfo — fall through.\n }\n return this.locale.toLowerCase().startsWith('en-us') ? 0 : 1;\n }\n\n /**\n * One `Intl.DateTimeFormat` per named format, built once.\n *\n * Constructing one is the expensive part of `format()`, and this adapter is\n * called per CELL: `wr-event-calendar` builds an `aria-label` for every time\n * slot on every day, so a week view asked for hundreds of identical\n * formatters. `locale` is injected once and never changes for the life of the\n * adapter, so the cache needs no invalidation — that is the whole reason it\n * can be this simple.\n */\n private readonly formatters = new Map<string, Intl.DateTimeFormat>();\n\n /**\n * Every `Intl` call this adapter makes pins `calendar: 'gregory'`, and that is a\n * correctness fix rather than a preference.\n *\n * The value type is a JS `Date`, every accessor on this class (`getYear`,\n * `getMonth`, `getDate`) is Gregorian, `createDate` builds a Gregorian date and the\n * calendar grid draws Gregorian months. A locale whose DEFAULT calendar is something\n * else — `fa-IR` resolves to `persian`, `th-TH` to `buddhist`, `ar-SA` to\n * `islamic-umalqura` in several engines — printed a field the grid beside it could\n * never agree with (`۱۴۰۴/۱۲/۲۴` over a grid headed 2026), and no parser can turn\n * that back into the `Date` it came from. Pinning the calendar makes format and parse\n * describe the same one.\n */\n private intlOptions(options: Intl.DateTimeFormatOptions): Intl.DateTimeFormatOptions {\n return { ...options, calendar: 'gregory' };\n }\n\n private intl(key: WrDateFormat): Intl.DateTimeFormat {\n let found = this.formatters.get(key);\n if (!found) {\n found = new Intl.DateTimeFormat(this.locale, this.intlOptions(INTL_OPTIONS[key]));\n this.formatters.set(key, found);\n }\n return found;\n }\n\n getDayOfWeekNames(style: 'narrow' | 'short' | 'long'): readonly string[] {\n const formatter = new Intl.DateTimeFormat(this.locale, this.intlOptions({ weekday: style }));\n const first = this.getFirstDayOfWeek();\n // Pick a reference Sunday and walk seven days.\n const base = new Date(2024, 0, 7); // Sunday 7 Jan 2024\n const out: string[] = [];\n for (let i = 0; i < 7; i++) {\n const d = new Date(base);\n d.setDate(base.getDate() + ((first + i) % 7));\n out.push(formatter.format(d));\n }\n return out;\n }\n\n /**\n * Month names in the STANDALONE (nominative) form — what a calendar heading wants.\n * Inside a date the same name often declines; {@link monthNames} serves that form to\n * the token formatter, and this method deliberately keeps the heading one.\n */\n getMonthNames(style: 'narrow' | 'short' | 'long'): readonly string[] {\n return this.monthNames(style, 'standalone');\n }\n\n private numeralsCache: readonly string[] | null = null;\n\n /** The locale's own ten digits, cached — empty when its system is algorithmic. */\n private localeNumerals(): readonly string[] {\n this.numeralsCache ??=\n numeralsFor(this.locale, new Intl.NumberFormat(this.locale).resolvedOptions().numberingSystem) ?? [];\n return this.numeralsCache;\n }\n\n private dayPeriodCache: readonly [string, string] | null = null;\n\n /**\n * `[am, pm]` as the LOCALE writes them — `PM`, `م`, `午後`.\n *\n * The `a` token used to return a hard-coded lowercase `pm`, byte for byte identical in\n * every locale, which made it the one token in the pattern language that could not be\n * localised at all. `Intl` is the source rather than the i18n catalog because\n * `ngwr/date` deliberately depends on nothing: the panel next to it reads\n * `datePicker.am` / `datePicker.pm`, so an app that wants its own wording overrides it\n * there and passes a 24-hour pattern here.\n */\n private dayPeriods(): readonly [string, string] {\n if (this.dayPeriodCache) return this.dayPeriodCache;\n let periods: [string, string] = ['AM', 'PM'];\n try {\n const formatter = new Intl.DateTimeFormat(this.locale, this.intlOptions({ hour: 'numeric', hour12: true }));\n const read = (hour: number): string =>\n formatter.formatToParts(new Date(2024, 0, 15, hour)).find(p => p.type === 'dayPeriod')?.value ?? '';\n const [am, pm] = [read(9), read(21)];\n if (am && pm && am !== pm) periods = [am, pm];\n } catch {\n // No `Intl` day period for this locale — the English pair stays.\n }\n this.dayPeriodCache = periods;\n return periods;\n }\n\n private readonly monthNameCache = new Map<string, readonly string[]>();\n\n /**\n * `context: 'format'` asks `Intl` for the month name as it appears BESIDE A DAY, which\n * is where a case language stops using the nominative: ru writes `15 марта`, not\n * `15 март`, and fi writes `maaliskuuta`, not `maaliskuu`. The name comes out of a\n * `{ day, month }` formatter's parts, because a `{ month }` formatter alone can only\n * ever answer with the standalone form.\n *\n * Some locales write the month NUMERICALLY in that position — fi abbreviates `15.3.`,\n * ja writes `3` with `月` as a separate literal — and there the standalone name is the\n * only name there is, so a purely numeric answer falls back to it. Without that guard\n * `dd MMMM yyyy` would render `15 3 2026` in Japanese.\n */\n private monthNames(style: 'narrow' | 'short' | 'long', context: 'standalone' | 'format'): readonly string[] {\n const cacheKey = `${style}:${context}`;\n const cached = this.monthNameCache.get(cacheKey);\n if (cached) return cached;\n\n const standaloneFormatter = new Intl.DateTimeFormat(this.locale, this.intlOptions({ month: style }));\n const standalone: string[] = [];\n for (let i = 0; i < 12; i++) standalone.push(standaloneFormatter.format(new Date(2024, i, 15)));\n\n let out: readonly string[] = standalone;\n if (context === 'format') {\n const numerals = numeralsFor(this.locale, standaloneFormatter.resolvedOptions().numberingSystem) ?? [];\n const inDate = new Intl.DateTimeFormat(this.locale, this.intlOptions({ day: 'numeric', month: style }));\n out = standalone.map((name, i) => {\n const part = inDate.formatToParts(new Date(2024, i, 15)).find(p => p.type === 'month')?.value;\n if (!part || isAllDigits(part, numerals)) return name;\n return part;\n });\n }\n\n this.monthNameCache.set(cacheKey, out);\n return out;\n }\n\n // Internals: token-based format / parse\n\n /** Whether a token pattern also writes the day, which decides the month's form. */\n private hasDayToken(pattern: string): boolean {\n let found = false;\n pattern.replace(PART_RE, (part: string, quoted?: string) => {\n if (quoted === undefined && (part === 'd' || part === 'dd')) found = true;\n return part;\n });\n return found;\n }\n\n private formatWithTokens(date: Date, pattern: string): string {\n const year = date.getFullYear();\n const month = date.getMonth();\n const day = date.getDate();\n const hours24 = date.getHours();\n const hours12 = hours24 % 12 === 0 ? 12 : hours24 % 12;\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n // A pattern that writes the day wants the month declined for that position — `MMMM`\n // used to hand `15 март 2026` to a Russian field, which reads as machine output.\n const context = this.hasDayToken(pattern) ? 'format' : 'standalone';\n const monthNames = this.monthNames('long', context);\n const monthShort = this.monthNames('short', context);\n\n return pattern.replace(PART_RE, (part, quoted?: string) => {\n // A quoted run is emitted as-is; `''` is how a single quote is written.\n if (quoted !== undefined) return quoted === '' ? \"'\" : quoted;\n const token = part;\n switch (token) {\n case 'yyyy':\n return pad(year, 4);\n case 'yy':\n return pad(year % 100, 2);\n case 'MMMM':\n return monthNames[month] ?? '';\n case 'MMM':\n return monthShort[month] ?? '';\n case 'MM':\n return pad(month + 1);\n case 'M':\n return String(month + 1);\n case 'dd':\n return pad(day);\n case 'd':\n return String(day);\n case 'HH':\n return pad(hours24);\n case 'H':\n return String(hours24);\n case 'hh':\n return pad(hours12);\n case 'h':\n return String(hours12);\n case 'mm':\n return pad(minutes);\n case 'ss':\n return pad(seconds);\n case 'a':\n return this.dayPeriods()[hours24 < 12 ? 0 : 1];\n }\n return token;\n });\n }\n\n private parseWithTokens(value: string, pattern: string): Date | null {\n const tokens: string[] = [];\n // Both forms are accepted on the way IN: the formatter writes the declined one beside\n // a day (`15 марта`), and a heading or an older stored string carries the nominative.\n const monthLong = [this.monthNames('long', 'format'), this.monthNames('long', 'standalone')];\n const monthShort = [this.monthNames('short', 'format'), this.monthNames('short', 'standalone')];\n const numerals = this.localeNumerals();\n const digits = digitClass(numerals);\n const escaped = pattern.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const regex = escaped.replace(PART_RE, (part, quoted?: string) => {\n if (quoted !== undefined) {\n // Literal text matches itself and captures nothing, so the token indices stay\n // aligned with the groups below.\n return quoted === '' ? \"'\" : quoted;\n }\n tokens.push(part);\n // `a` is the one token whose text is locale-dependent, so its alternation is built\n // here rather than in the pure `tokenToRegex`: the marker this adapter now PRINTS\n // has to be one the same adapter can read.\n if (part === 'a') return `(${alternation([...this.dayPeriods(), 'am', 'pm'])})`;\n return tokenToRegex(part, digits);\n });\n\n const match = new RegExp(`^${regex}$`, 'i').exec(value);\n if (!match) return null;\n\n const parts: DateParts = {};\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n const raw = match[i + 1];\n const n = digitsToNumber(raw, numerals);\n switch (token) {\n case 'yyyy':\n parts.year = n;\n break;\n case 'yy':\n parts.year = 2000 + n;\n break;\n case 'MM':\n case 'M':\n parts.month = n - 1;\n break;\n case 'MMM':\n case 'MMMM': {\n const sets = token === 'MMM' ? monthShort : monthLong;\n const wanted = raw.toLowerCase();\n const found = sets\n .map(names => names.findIndex(name => name.toLowerCase() === wanted))\n .find(index => index >= 0);\n if (found === undefined) return null;\n parts.month = found;\n break;\n }\n case 'dd':\n case 'd':\n parts.day = n;\n break;\n case 'HH':\n case 'H':\n parts.hours = n;\n break;\n case 'hh':\n case 'h':\n parts.hour12 = n;\n break;\n case 'mm':\n parts.minutes = n;\n break;\n case 'ss':\n parts.seconds = n;\n break;\n case 'a': {\n const marker = raw.toLowerCase();\n parts.isPm = marker === 'pm' || marker === this.dayPeriods()[1].toLowerCase();\n break;\n }\n }\n }\n\n return this.compose(parts);\n }\n\n /**\n * Build the parser for one named format out of the very formatter that prints it.\n *\n * `formatToParts` is the only honest source for a locale's field ORDER and its\n * literals — ru writes `dd.MM.y` with a two-digit month while its own\n * `{ month: 'numeric' }` request says one digit, ja puts the year first, and ar-SA\n * separates fields with U+200F. Names (a month, AM/PM) become an alternation of the\n * real strings; numbers accept the locale's digits AND ASCII, because a physical\n * keyboard produces the latter whatever the display shows.\n *\n * Returns `null` — meaning \"this format cannot be read back\" — rather than guessing,\n * for a field type nothing here asks for (an era, a weekday) or a numbering system\n * with no digit-by-digit reading (roman numerals). `parse` then refuses, which leaves\n * the caller's committed value untouched.\n */\n private buildNamedParser(key: WrDateFormat): NamedParser | null {\n const formatter = this.intl(key);\n const resolved = formatter.resolvedOptions();\n const numerals = numeralsFor(this.locale, resolved.numberingSystem);\n if (!numerals) return null;\n const digits = digitClass(numerals);\n\n // Distinct values in every field, so nothing below can read one field's reference\n // value out of another's position.\n const reference = new Date(2024, 0, 15, 13, 45, 56);\n const fields: NamedField[] = [];\n const fragments: { readonly source: string; readonly literal: boolean }[] = [];\n\n for (const part of formatter.formatToParts(reference)) {\n switch (part.type) {\n case 'literal':\n fragments.push({ source: literalToRegex(part.value), literal: true });\n break;\n case 'year':\n fields.push({ kind: 'year' });\n // Exactly two digits or exactly four — the shapes a year is actually written\n // in. `{1,4}` would let the third keystroke of `15.3.2026` read as the year 2\n // and commit it, which is a smaller version of the defect this replaces.\n fragments.push({ source: `(${digits}{2}|${digits}{4})`, literal: false });\n break;\n case 'month': {\n const names = this.namedMonthNames(formatter);\n if (names.every(name => isAllDigits(name, numerals))) {\n fields.push({ kind: 'month' });\n fragments.push({ source: `(${digits}{1,2})`, literal: false });\n } else {\n fields.push({ kind: 'monthName', names });\n fragments.push({ source: `(${alternation(names)})`, literal: false });\n }\n break;\n }\n case 'day':\n fields.push({ kind: 'day' });\n fragments.push({ source: `(${digits}{1,2})`, literal: false });\n break;\n case 'hour':\n fields.push({ kind: 'hour' });\n fragments.push({ source: `(${digits}{1,2})`, literal: false });\n break;\n case 'minute':\n fields.push({ kind: 'minute' });\n fragments.push({ source: `(${digits}{1,2})`, literal: false });\n break;\n case 'second':\n fields.push({ kind: 'second' });\n fragments.push({ source: `(${digits}{1,2})`, literal: false });\n break;\n case 'dayPeriod': {\n const names = this.dayPeriodNames(formatter);\n fields.push({ kind: 'dayPeriod', names });\n fragments.push({ source: `(${alternation(names)})`, literal: false });\n break;\n }\n default:\n return null;\n }\n }\n\n if (!fields.length) return null;\n\n // A trailing literal is optional. ru's medium date ends ` г.` and fi's short date\n // ends with a bare `.`; someone retyping the field types the fields and stops, and\n // refusing that would reintroduce the very \"cannot read its own output\" defect for\n // the one part of the string that carries no information.\n const source = fragments\n .map((fragment, i) =>\n i === fragments.length - 1 && fragment.literal && fragment.source ? `(?:${fragment.source})?` : fragment.source\n )\n .join('');\n\n return { regex: new RegExp(`^${source}$`, 'iu'), fields, numerals, hourCycle: resolved.hourCycle };\n }\n\n /** The twelve month strings THIS formatter writes, in its own style and context. */\n private namedMonthNames(formatter: Intl.DateTimeFormat): readonly string[] {\n const out: string[] = [];\n for (let i = 0; i < 12; i++) {\n out.push(formatter.formatToParts(new Date(2024, i, 15)).find(p => p.type === 'month')?.value ?? '');\n }\n return out;\n }\n\n /** `[am, pm]` as THIS formatter writes them — `ص` / `م` in Arabic, not AM / PM. */\n private dayPeriodNames(formatter: Intl.DateTimeFormat): readonly string[] {\n const read = (hour: number): string =>\n formatter.formatToParts(new Date(2024, 0, 15, hour, 30)).find(p => p.type === 'dayPeriod')?.value ?? '';\n return [read(9), read(21)];\n }\n\n private readonly namedParsers = new Map<WrDateFormat, NamedParser | null>();\n\n private parseNamed(raw: string, key: WrDateFormat): Date | null {\n let parser = this.namedParsers.get(key);\n if (parser === undefined) {\n parser = this.buildNamedParser(key);\n this.namedParsers.set(key, parser);\n }\n if (!parser) return null;\n\n const match = parser.regex.exec(stripBidi(raw));\n if (!match) return null;\n\n const parts: DateParts = {};\n const twelveHour = parser.fields.some(field => field.kind === 'dayPeriod');\n\n for (let i = 0; i < parser.fields.length; i++) {\n const field = parser.fields[i];\n const captured = match[i + 1] ?? '';\n if (field.kind === 'monthName' || field.kind === 'dayPeriod') {\n const wanted = stripBidi(captured).toLowerCase();\n const index = (field.names ?? []).findIndex(name => stripBidi(name).toLowerCase() === wanted);\n if (index < 0) return null;\n if (field.kind === 'monthName') parts.month = index;\n else parts.isPm = index === 1;\n continue;\n }\n\n const n = digitsToNumber(captured, parser.numerals);\n if (Number.isNaN(n)) return null;\n switch (field.kind) {\n case 'year':\n // Two digits mean this century, the same reading the `yy` token gives — the\n // picker's own doc promises `1/5/25` cleans up to 2025.\n parts.year = captured.length <= 2 ? 2000 + n : n;\n break;\n case 'month':\n parts.month = n - 1;\n break;\n case 'day':\n parts.day = n;\n break;\n case 'hour':\n if (twelveHour) parts.hour12 = n;\n // `hourCycle: 'h24'` numbers midnight 24 rather than 0.\n else parts.hours = n === 24 && parser.hourCycle === 'h24' ? 0 : n;\n break;\n case 'minute':\n parts.minutes = n;\n break;\n case 'second':\n parts.seconds = n;\n break;\n }\n }\n\n return this.compose(parts);\n }\n\n /**\n * Assemble whatever was read into a `Date`, or refuse.\n *\n * `new Date(2025, 12, 45)` does not fail — it rolls forward into the next year — and\n * `isValid` is happy with the result, so a text field used to turn nonsense into a\n * confident wrong answer. The clock parts are range-checked directly; the month and the\n * day are checked by comparing what came back, which catches every rollover including a\n * month of 12 or -1.\n */\n private compose(parts: DateParts): Date | null {\n const now = new Date();\n const year = parts.year ?? now.getFullYear();\n const month = parts.month ?? now.getMonth();\n\n let hours = parts.hours ?? 0;\n if (parts.hour12 !== undefined) hours = (parts.hour12 % 12) + (parts.isPm ? 12 : 0);\n const minutes = parts.minutes ?? 0;\n const seconds = parts.seconds ?? 0;\n if (hours < 0 || hours > 23 || minutes < 0 || minutes > 59 || seconds < 0 || seconds > 59) return null;\n\n // A time-only format carries no date, and the date it should imply is TODAY — the\n // previous default was 1 January, so a picker in `mode=\"time\"` moved the model back\n // to New Year's Day as a side effect of reading a clock. The default is clamped to\n // the month it lands in, because an unclamped 31st would roll a February string\n // forward and the rollover check below would then refuse a well-formed string.\n const monthLength = new Date(year, month + 1, 0).getDate();\n const day = parts.day ?? Math.min(now.getDate(), monthLength);\n\n const out = new Date(year, month, day, hours, minutes, seconds);\n // Same trap `createDate` documents: a year under 100 maps onto 1900 + year unless it\n // is written back explicitly, so `0025-08-11` used to parse as 1925.\n if (year >= 0 && year < 100) out.setFullYear(year);\n if (!this.isValid(out)) return null;\n if (out.getMonth() !== month || out.getDate() !== day) return null;\n return out;\n }\n}\n\nexport { isNamedFormat };\n","/**\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 { type EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\n\nimport type { WrDateAdapterOptions } from './interfaces';\nimport { WR_DATE_LOCALE } from './tokens';\nimport { WrDateAdapter } from './wr-date-adapter';\nimport { WrNativeDateAdapter } from './wr-native-date-adapter';\n\n/**\n * Register the date adapter and locale used by the calendar / date picker /\n * time picker. Call once at bootstrap.\n *\n * Omit `locale` and dates follow Angular's `LOCALE_ID`, which is what the app\n * already says it is. Pass one only to pin dates to something else — see\n * {@link WR_DATE_LOCALE}, and `WrI18n` for how the three locale inputs rank.\n *\n * @example\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideWrDateAdapter(), // native adapter, LOCALE_ID\n * // provideWrDateAdapter({ locale: 'ru-RU' }), // pin the dates\n * // provideWrDateAdapter({ adapter: MyDateFnsAdapter, locale: 'fr' }),\n * ],\n * });\n * ```\n */\nexport function provideWrDateAdapter(options: WrDateAdapterOptions = {}): EnvironmentProviders {\n const providers: Parameters<typeof makeEnvironmentProviders>[0] = [\n { provide: WrDateAdapter, useClass: options.adapter ?? WrNativeDateAdapter },\n ];\n\n if (options.locale) {\n providers.push({ provide: WR_DATE_LOCALE, useValue: options.locale });\n }\n\n return makeEnvironmentProviders(providers);\n}\n\nexport type { WrDateAdapterOptions } from './interfaces';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAAA;;;;;AAKG;AAIH;;;;;;;;;;;;;;AAcG;MACmB,aAAa,CAAA;AA4CjC;;;;AAIG;AACH,IAAA,aAAa,CAAC,IAAW,EAAE,KAAY,EAAE,GAAU,EAAA;QACjD,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC;IAC/E;AAyCD;;ACpHD;;;;;AAKG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;MACU,cAAc,GAAG,IAAI,cAAc,CAAS,gBAAgB,EAAE;AACzE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,MAAM,CAAC,SAAS,CAAC;AACjC,CAAA;;AC3CD;;;;;AAKG;AAQH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAe;IACvC,WAAW;IACX,YAAY;IACZ,UAAU;IACV,MAAM;IACN,eAAe;IACf,gBAAgB;AACjB,CAAA,CAAC;AAEF;;;;AAIG;AACH,MAAM,OAAO,GAAG,oCAAoC;AAEpD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Aa,EAAE,QAAQ,EAAE,OAAO,CAAC,OAAO,IAAI,mBAAmB,EAAE;KAC7E;AAED,IAAA,IAAI,OAAO,CAAC,MAAM,EAAE;AAClB,QAAA,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;IACvE;AAEA,IAAA,OAAO,wBAAwB,CAAC,SAAS,CAAC;AAC5C;;AC3CA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-date.mjs","sources":["../../../projects/lib/date/wr-date-adapter.ts","../../../projects/lib/date/tokens/wr-date-locale.token.ts","../../../projects/lib/date/wr-native-date-adapter.ts","../../../projects/lib/date/provide-wr-date-adapter.ts","../../../projects/lib/date/ngwr-date.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 type { WrDateFormat } from './interfaces';\n\n/**\n * Abstraction over a date object so the calendar, date picker and time picker\n * can work with `Date`, `date-fns`, `luxon`, or any other library a consumer\n * prefers — without changing component code.\n *\n * Default implementation: {@link WrNativeDateAdapter} (native `Date`,\n * `Intl.DateTimeFormat`). Register a different adapter via\n * `provideWrDateAdapter({ adapter: MyAdapter })`.\n *\n * Used as both the type and the DI token — `inject(WrDateAdapter)` works\n * directly thanks to Angular's class-as-token resolution.\n *\n * Every \"mutating\" method (`addX`, `setTime`) returns a **new** value;\n * adapters never mutate in place so consumers can pass dates around safely.\n */\nexport abstract class WrDateAdapter<TDate = Date> {\n // Construction & identity\n\n /** Current moment. */\n abstract today(): TDate;\n\n /** Defensive clone — must return an independent value, never the same reference. */\n abstract clone(date: TDate): TDate;\n\n /** Build a date from year / month (0-based) / day. */\n abstract createDate(year: number, month: number, day: number): TDate;\n\n /** `false` for `NaN` / invalid input. */\n abstract isValid(date: TDate): boolean;\n\n // Accessors\n\n abstract getYear(date: TDate): number;\n /** `0` (January) – `11` (December). */\n abstract getMonth(date: TDate): number;\n /** Day of the month, `1`-`31`. */\n abstract getDate(date: TDate): number;\n /** `0` (Sunday) – `6` (Saturday). */\n abstract getDayOfWeek(date: TDate): number;\n abstract getDaysInMonth(date: TDate): number;\n abstract getHours(date: TDate): number;\n abstract getMinutes(date: TDate): number;\n abstract getSeconds(date: TDate): number;\n\n // Immutable math\n\n abstract addYears(date: TDate, amount: number): TDate;\n abstract addMonths(date: TDate, amount: number): TDate;\n abstract addDays(date: TDate, amount: number): TDate;\n /** Returns a new date with the time portion replaced. */\n abstract setTime(date: TDate, hours: number, minutes: number, seconds: number): TDate;\n\n // Comparison\n\n abstract isSameDay(a: TDate, b: TDate): boolean;\n abstract isSameMonth(a: TDate, b: TDate): boolean;\n /** Negative if `a < b`, positive if `a > b`, zero if equal (compared at day precision). */\n abstract compareDate(a: TDate, b: TDate): number;\n\n /**\n * Convenience used by the calendar's range UI. Inclusive on both ends.\n * Implementation can stay on the base class because it delegates to\n * `compareDate`.\n */\n isWithinRange(date: TDate, start: TDate, end: TDate): boolean {\n return this.compareDate(date, start) >= 0 && this.compareDate(date, end) <= 0;\n }\n\n // Formatting / parsing\n\n /**\n * Format a date. Accepts either a named {@link WrDateFormat} key (which the\n * adapter resolves locale-aware) or a raw format string (`'dd.MM.yyyy'`).\n *\n * Supported tokens for raw strings: `yyyy`, `yy`, `MMMM`, `MMM`, `MM`, `M`,\n * `dd`, `d`, `HH`, `H`, `hh`, `h`, `mm`, `ss`, `a` (the locale's day-period\n * marker — `PM`, `م`, `午後`).\n *\n * `MMMM` / `MMM` take the form the language uses in the position the pattern\n * puts them: beside a day token a case language declines the month (ru writes\n * `15 марта`, not `15 март`), and on their own they stay nominative, which is\n * what a calendar heading wants.\n */\n abstract format(date: TDate, formatKeyOrString: WrDateFormat | (string & {})): string;\n\n /**\n * Parse a string into a date. Returns `null` when parsing fails. Accepts\n * the same `formatKeyOrString` set as {@link format}.\n *\n * **The round trip is a contract, not an aspiration**: whatever {@link format}\n * writes for a given key, `parse` reads back to the same date. A caller relies\n * on it every keystroke — the picker re-parses what it printed — and returning\n * `null` is how an adapter refuses, which leaves the caller's committed value\n * exactly as it was.\n */\n abstract parse(value: string, formatKeyOrString: WrDateFormat | (string & {})): TDate | null;\n\n // Locale info\n\n /** `0` Sunday, `1` Monday — locale-dependent. */\n abstract getFirstDayOfWeek(): number;\n\n /** Names ordered from `getFirstDayOfWeek()` onwards. Length 7. */\n abstract getDayOfWeekNames(style: 'narrow' | 'short' | 'long'): readonly string[];\n\n /** Names from January (index `0`) to December (`11`). Length 12. */\n abstract getMonthNames(style: 'narrow' | 'short' | 'long'): readonly string[];\n}\n","/**\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 { InjectionToken, LOCALE_ID, inject } from '@angular/core';\n\n/**\n * BCP 47 locale tag the {@link WrDateAdapter} implementations read. Defaults to\n * Angular's `LOCALE_ID`; override via {@link provideWrDateAdapter}'s `locale`\n * option.\n *\n * **It used to default to `navigator.language`, and that was wrong in the\n * documented case.** The provider's own first example is the no-argument call,\n * so the path a reader copies was the broken one: an app that set\n * `LOCALE_ID: 'ru-RU'` and translated every string still rendered `March 2026`,\n * `SUN MON TUE …` and a week starting on Sunday, because the calendar was\n * asking the browser rather than the application. `navigator.language` is the\n * user's browser preference; `LOCALE_ID` is what the app says it is, and only\n * the app can be right about that. Reading the browser also made a prerendered\n * page and its hydrated self disagree — the server has no `navigator.language`\n * to match. An app that genuinely wants the browser's tag can still say so:\n * `provideWrDateAdapter({ locale: navigator.language })`.\n *\n * The token is a plain string, resolved once. It is therefore the *pinned* date\n * locale, not a live one — `WrI18n.use()` moves catalog text and cannot move\n * this. `WrI18n`'s class docs carry the full precedence and `use()` warns about\n * the gap in dev mode.\n *\n * **How far it reaches depends on the adapter, and the difference matters.**\n * The native and luxon adapters thread it through everything. The date-fns\n * adapter cannot: date-fns resolves its patterns against a `Locale` OBJECT, not\n * a tag, so this token drives only the parts that go through `Intl` (the month\n * and weekday names) and the OBJECT drives `format` / `parse`. Pass it as\n * `provideWrDateFnsAdapter({ dateFnsLocale: ru })` — with only a tag the calendar\n * headings localize and the field does not, which the adapter warns about once\n * in dev mode.\n */\nexport const WR_DATE_LOCALE = new InjectionToken<string>('WR_DATE_LOCALE', {\n providedIn: 'root',\n factory: () => inject(LOCALE_ID),\n});\n","/**\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 { Service, inject } from '@angular/core';\n\nimport type { WrDateFormat } from './interfaces';\nimport { WR_DATE_LOCALE } from './tokens';\nimport { WrDateAdapter } from './wr-date-adapter';\n\nconst NAMED_KEYS = new Set<WrDateFormat>([\n 'shortDate',\n 'mediumDate',\n 'longDate',\n 'time',\n 'shortDateTime',\n 'mediumDateTime',\n]);\n\n/**\n * Bidi control marks ICU embeds in a right-to-left date pattern — ar-SA writes its\n * separator as U+200F followed by a slash. No keyboard produces one, so both the\n * pattern and the typed string drop them before they are compared.\n */\nconst BIDI_RE = /[\\u200e\\u200f\\u061c\\u2066-\\u2069]/g;\n\nconst REGEX_META_RE = /[.*+?^${}()|[\\]\\\\]/g;\n\nfunction stripBidi(value: string): string {\n return value.replace(BIDI_RE, '');\n}\n\nfunction escapeRegex(value: string): string {\n return value.replace(REGEX_META_RE, '\\\\$&');\n}\n\n/**\n * One literal run of an `Intl` pattern, as a regex fragment.\n *\n * Whitespace inside a literal is advisory, not exact: ICU separates `02:30` from `PM`\n * with a NARROW NO-BREAK SPACE (U+202F) and no keyboard emits one, so every whitespace\n * run matches `\\s*`. A literal that is nothing BUT whitespace keeps `\\s+` — relaxing it\n * there would let `15 2026` also read as `152026`, which is how a lenient parser invents\n * a date nobody typed.\n */\nfunction literalToRegex(literal: string): string {\n const text = stripBidi(literal);\n if (!text) return '';\n if (!text.trim()) return '\\\\s+';\n return text.split(/\\s+/).map(escapeRegex).join('\\\\s*');\n}\n\n/** Longest first, so `March` is never consumed as `Mar` with `ch` left over. */\nfunction alternation(names: readonly string[]): string {\n return [...new Set(names)]\n .sort((a, b) => b.length - a.length)\n .map(name => escapeRegex(stripBidi(name)))\n .join('|');\n}\n\n/**\n * The ten digits a locale's numbering system writes, index 0 to 9 — `null` when the\n * system is algorithmic (roman, hebrew) and there is no digit-by-digit reading to do.\n */\nfunction numeralsFor(locale: string, numberingSystem: string): readonly string[] | null {\n let formatter: Intl.NumberFormat;\n try {\n formatter = new Intl.NumberFormat(locale, { numberingSystem, useGrouping: false });\n } catch {\n return null;\n }\n const digits: string[] = [];\n for (let i = 0; i < 10; i++) {\n const digit = formatter.format(i);\n if ([...digit].length !== 1 || digits.includes(digit)) return null;\n digits.push(digit);\n }\n return digits;\n}\n\n/** A character class accepting the locale's own digits AND ASCII ones. */\nfunction digitClass(numerals: readonly string[]): string {\n const extra = numerals\n .filter(digit => digit < '0' || digit > '9')\n .map(digit => `\\\\u${digit.codePointAt(0)!.toString(16).padStart(4, '0')}`)\n .join('');\n return `[0-9${extra}]`;\n}\n\n/** `١٥` to `15`, and ASCII through unchanged. `NaN` for anything else. */\nfunction digitsToNumber(text: string, numerals: readonly string[]): number {\n let out = '';\n for (const ch of text) {\n if (ch >= '0' && ch <= '9') {\n out += ch;\n continue;\n }\n const index = numerals.indexOf(ch);\n if (index < 0) return Number.NaN;\n out += String(index);\n }\n return out ? Number(out) : Number.NaN;\n}\n\nfunction isAllDigits(text: string, numerals: readonly string[]): boolean {\n return text.length > 0 && !Number.isNaN(digitsToNumber(text, numerals));\n}\n\n/** What one capture group of a named-format parser holds. */\ninterface NamedField {\n readonly kind: 'year' | 'month' | 'monthName' | 'day' | 'hour' | 'minute' | 'second' | 'dayPeriod';\n /** Month names (12) or day-period names (`[am, pm]`), matched case-insensitively. */\n readonly names?: readonly string[];\n}\n\ninterface NamedParser {\n readonly regex: RegExp;\n readonly fields: readonly NamedField[];\n readonly numerals: readonly string[];\n readonly hourCycle: string | undefined;\n}\n\n/** The parts assembled into a `Date`, whatever route read them. */\ninterface DateParts {\n year?: number;\n month?: number;\n day?: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n hour12?: number;\n isPm?: boolean;\n}\n\nconst INTL_OPTIONS: Readonly<Record<WrDateFormat, Intl.DateTimeFormatOptions>> = {\n shortDate: { year: 'numeric', month: 'numeric', day: 'numeric' },\n mediumDate: { year: 'numeric', month: 'short', day: 'numeric' },\n longDate: { year: 'numeric', month: 'long', day: 'numeric' },\n time: { hour: '2-digit', minute: '2-digit' },\n shortDateTime: { year: 'numeric', month: 'numeric', day: 'numeric', hour: '2-digit', minute: '2-digit' },\n mediumDateTime: { year: 'numeric', month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' },\n};\n\n/** Recognised tokens, longest first so `MMMM` matches before `MMM`. */\n/**\n * Every token, with single-quoted runs taken FIRST so they win.\n *\n * Without that, the one-letter tokens match letters inside literal text: `'yyyy [year]'`\n * came out as `2025 [yeamr]`, because the `a` in \"year\" was read as the meridiem token.\n * Quote literals the way `DatePipe` and LDML do — `'at'` — and `''` for a real quote.\n */\nconst PART_RE = /'([^']*)'|yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|H|hh|h|mm|ss|a/g;\n\nfunction pad(n: number, width = 2): string {\n return String(Math.abs(n)).padStart(width, '0');\n}\n\n/** Whether `value` is one of the shared named format keys. */\nfunction isNamedFormat(value: string): value is WrDateFormat {\n return NAMED_KEYS.has(value as WrDateFormat);\n}\n\n/**\n * `digits` is a character class rather than `\\d`, and it always accepts ASCII as well as\n * the locale's own numerals. The token formatter WRITES ASCII, so the round trip never\n * needed more — but a reader on an Arabic keyboard types `١٥` into the same field, and\n * `\\d` made that silently unparseable with no feedback anywhere.\n */\nfunction tokenToRegex(token: string, digits: string): string {\n switch (token) {\n case 'yyyy':\n return `(${digits}{4})`;\n case 'yy':\n return `(${digits}{2})`;\n case 'MM':\n case 'dd':\n case 'HH':\n case 'hh':\n case 'mm':\n case 'ss':\n return `(${digits}{2})`;\n case 'M':\n case 'd':\n case 'H':\n case 'h':\n return `(${digits}{1,2})`;\n case 'a':\n return '(am|pm|AM|PM)';\n default:\n return '(.+)';\n }\n}\n\n/**\n * Reference {@link WrDateAdapter} implementation backed by the native `Date`\n * object and `Intl.DateTimeFormat`. Zero external dependencies. Suitable for\n * most apps — swap to a `date-fns` / `luxon` adapter only when you need\n * timezone-aware math or richer parsing.\n */\n@Service()\nexport class WrNativeDateAdapter extends WrDateAdapter<Date> {\n private readonly locale = inject(WR_DATE_LOCALE);\n\n // Construction & identity\n\n today(): Date {\n return new Date();\n }\n\n clone(date: Date): Date {\n return new Date(date.getTime());\n }\n\n createDate(year: number, month: number, day: number): Date {\n // Native Date constructor with year < 100 maps to 1900 + year unless we explicitly setFullYear.\n const d = new Date(year, month, day);\n if (year >= 0 && year < 100) d.setFullYear(year);\n return d;\n }\n\n isValid(date: Date): boolean {\n return date instanceof Date && !Number.isNaN(date.getTime());\n }\n\n // Accessors\n\n getYear(date: Date): number {\n return date.getFullYear();\n }\n\n getMonth(date: Date): number {\n return date.getMonth();\n }\n\n getDate(date: Date): number {\n return date.getDate();\n }\n\n getDayOfWeek(date: Date): number {\n return date.getDay();\n }\n\n getDaysInMonth(date: Date): number {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();\n }\n\n getHours(date: Date): number {\n return date.getHours();\n }\n\n getMinutes(date: Date): number {\n return date.getMinutes();\n }\n\n getSeconds(date: Date): number {\n return date.getSeconds();\n }\n\n // Immutable math\n\n addYears(date: Date, amount: number): Date {\n const d = this.clone(date);\n d.setFullYear(d.getFullYear() + amount);\n return d;\n }\n\n addMonths(date: Date, amount: number): Date {\n const d = this.clone(date);\n const desiredDay = d.getDate();\n d.setDate(1);\n d.setMonth(d.getMonth() + amount);\n // Clamp day to the new month's length (Jan 31 + 1 month → Feb 28/29).\n d.setDate(Math.min(desiredDay, this.getDaysInMonth(d)));\n return d;\n }\n\n addDays(date: Date, amount: number): Date {\n // A calendar day, not 86 400 000 ms. Where daylight saving applies a day can be 23 or\n // 25 hours long, so millisecond arithmetic drifts the wall clock and — across an\n // autumn change — lands back on the same calendar date, which makes a month grid\n // repeat a day and lose one. Not observable in a fixed-offset timezone, which is why\n // the reason lives here rather than only in a test.\n const d = this.clone(date);\n d.setDate(d.getDate() + amount);\n return d;\n }\n\n setTime(date: Date, hours: number, minutes: number, seconds: number): Date {\n const d = this.clone(date);\n d.setHours(hours, minutes, seconds, 0);\n return d;\n }\n\n // Comparison\n\n isSameDay(a: Date, b: Date): boolean {\n return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();\n }\n\n isSameMonth(a: Date, b: Date): boolean {\n return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth();\n }\n\n compareDate(a: Date, b: Date): number {\n const ay = a.getFullYear();\n const by = b.getFullYear();\n if (ay !== by) return ay - by;\n const am = a.getMonth();\n const bm = b.getMonth();\n if (am !== bm) return am - bm;\n return a.getDate() - b.getDate();\n }\n\n // Formatting / parsing\n\n // `(string & {})` keeps autocomplete for the WrDateFormat literals\n // while still accepting any other string as a raw token pattern.\n format(date: Date, formatKeyOrString: WrDateFormat | (string & {})): string {\n if (isNamedFormat(formatKeyOrString)) {\n return this.intl(formatKeyOrString).format(date);\n }\n return this.formatWithTokens(date, formatKeyOrString);\n }\n\n /**\n * Read back what {@link format} wrote.\n *\n * A named format used to delegate to `new Date(raw)`, which understands only\n * Anglo-American forms — so the field could not read its own output anywhere else.\n * `new Date('15.3.2026')` and `new Date('14:30')` are both `Invalid Date`, while\n * `new Date('1')` is 1 January 2001: retyping a de-DE date committed the year 2001 on\n * the first keystroke and then refused every one after it, and `mode=\"time\"` collapsed\n * to midnight in EVERY locale, en-US included. The named branch now builds its parser\n * from the SAME `Intl.DateTimeFormat` that printed the string, so the round trip holds\n * by construction rather than by luck.\n *\n * Returns `null` rather than a guess whenever the string does not match — the caller's\n * committed value is then left exactly as it was, which is the contract\n * `wr-input-number` follows for unparseable text.\n */\n parse(value: string, formatKeyOrString: WrDateFormat | (string & {})): Date | null {\n const raw = value?.trim();\n if (!raw) return null;\n\n if (isNamedFormat(formatKeyOrString)) {\n return this.parseNamed(raw, formatKeyOrString);\n }\n\n return this.parseWithTokens(raw, formatKeyOrString);\n }\n\n // Locale info\n\n getFirstDayOfWeek(): number {\n // `Intl.Locale.prototype.getWeekInfo` is Stage 3 — not in TS lib types yet,\n // so we probe at runtime through an unknown cast.\n try {\n const locale = new Intl.Locale(this.locale) as unknown as { getWeekInfo?: () => { firstDay: number } };\n const info = locale.getWeekInfo?.();\n if (info && typeof info.firstDay === 'number') {\n // Intl uses 1 (Mon) – 7 (Sun); we use 0 (Sun) – 6 (Sat).\n return info.firstDay % 7;\n }\n } catch {\n // Browser doesn't support Intl.Locale or getWeekInfo — fall through.\n }\n return this.locale.toLowerCase().startsWith('en-us') ? 0 : 1;\n }\n\n /**\n * One `Intl.DateTimeFormat` per named format, built once.\n *\n * Constructing one is the expensive part of `format()`, and this adapter is\n * called per CELL: `wr-event-calendar` builds an `aria-label` for every time\n * slot on every day, so a week view asked for hundreds of identical\n * formatters. `locale` is injected once and never changes for the life of the\n * adapter, so the cache needs no invalidation — that is the whole reason it\n * can be this simple.\n */\n private readonly formatters = new Map<string, Intl.DateTimeFormat>();\n\n /**\n * Every `Intl` call this adapter makes pins `calendar: 'gregory'`, and that is a\n * correctness fix rather than a preference.\n *\n * The value type is a JS `Date`, every accessor on this class (`getYear`,\n * `getMonth`, `getDate`) is Gregorian, `createDate` builds a Gregorian date and the\n * calendar grid draws Gregorian months. A locale whose DEFAULT calendar is something\n * else — `fa-IR` resolves to `persian`, `th-TH` to `buddhist`, `ar-SA` to\n * `islamic-umalqura` in several engines — printed a field the grid beside it could\n * never agree with (`۱۴۰۴/۱۲/۲۴` over a grid headed 2026), and no parser can turn\n * that back into the `Date` it came from. Pinning the calendar makes format and parse\n * describe the same one.\n */\n private intlOptions(options: Intl.DateTimeFormatOptions): Intl.DateTimeFormatOptions {\n return { ...options, calendar: 'gregory' };\n }\n\n private intl(key: WrDateFormat): Intl.DateTimeFormat {\n let found = this.formatters.get(key);\n if (!found) {\n found = new Intl.DateTimeFormat(this.locale, this.intlOptions(INTL_OPTIONS[key]));\n this.formatters.set(key, found);\n }\n return found;\n }\n\n getDayOfWeekNames(style: 'narrow' | 'short' | 'long'): readonly string[] {\n const formatter = new Intl.DateTimeFormat(this.locale, this.intlOptions({ weekday: style }));\n const first = this.getFirstDayOfWeek();\n // Pick a reference Sunday and walk seven days.\n const base = new Date(2024, 0, 7); // Sunday 7 Jan 2024\n const out: string[] = [];\n for (let i = 0; i < 7; i++) {\n const d = new Date(base);\n d.setDate(base.getDate() + ((first + i) % 7));\n out.push(formatter.format(d));\n }\n return out;\n }\n\n /**\n * Month names in the STANDALONE (nominative) form — what a calendar heading wants.\n * Inside a date the same name often declines; {@link monthNames} serves that form to\n * the token formatter, and this method deliberately keeps the heading one.\n */\n getMonthNames(style: 'narrow' | 'short' | 'long'): readonly string[] {\n return this.monthNames(style, 'standalone');\n }\n\n private numeralsCache: readonly string[] | null = null;\n\n /** The locale's own ten digits, cached — empty when its system is algorithmic. */\n private localeNumerals(): readonly string[] {\n this.numeralsCache ??=\n numeralsFor(this.locale, new Intl.NumberFormat(this.locale).resolvedOptions().numberingSystem) ?? [];\n return this.numeralsCache;\n }\n\n private dayPeriodCache: readonly [string, string] | null = null;\n\n /**\n * `[am, pm]` as the LOCALE writes them — `PM`, `م`, `午後`.\n *\n * The `a` token used to return a hard-coded lowercase `pm`, byte for byte identical in\n * every locale, which made it the one token in the pattern language that could not be\n * localised at all. `Intl` is the source rather than the i18n catalog because\n * `ngwr/date` deliberately depends on nothing: the panel next to it reads\n * `datePicker.am` / `datePicker.pm`, so an app that wants its own wording overrides it\n * there and passes a 24-hour pattern here.\n */\n private dayPeriods(): readonly [string, string] {\n if (this.dayPeriodCache) return this.dayPeriodCache;\n let periods: [string, string] = ['AM', 'PM'];\n try {\n const formatter = new Intl.DateTimeFormat(this.locale, this.intlOptions({ hour: 'numeric', hour12: true }));\n const read = (hour: number): string =>\n formatter.formatToParts(new Date(2024, 0, 15, hour)).find(p => p.type === 'dayPeriod')?.value ?? '';\n const [am, pm] = [read(9), read(21)];\n if (am && pm && am !== pm) periods = [am, pm];\n } catch {\n // No `Intl` day period for this locale — the English pair stays.\n }\n this.dayPeriodCache = periods;\n return periods;\n }\n\n private readonly monthNameCache = new Map<string, readonly string[]>();\n\n /**\n * `context: 'format'` asks `Intl` for the month name as it appears BESIDE A DAY, which\n * is where a case language stops using the nominative: ru writes `15 марта`, not\n * `15 март`, and fi writes `maaliskuuta`, not `maaliskuu`. The name comes out of a\n * `{ day, month }` formatter's parts, because a `{ month }` formatter alone can only\n * ever answer with the standalone form.\n *\n * Some locales write the month NUMERICALLY in that position — fi abbreviates `15.3.`,\n * ja writes `3` with `月` as a separate literal — and there the standalone name is the\n * only name there is, so a purely numeric answer falls back to it. Without that guard\n * `dd MMMM yyyy` would render `15 3 2026` in Japanese.\n */\n private monthNames(style: 'narrow' | 'short' | 'long', context: 'standalone' | 'format'): readonly string[] {\n const cacheKey = `${style}:${context}`;\n const cached = this.monthNameCache.get(cacheKey);\n if (cached) return cached;\n\n const standaloneFormatter = new Intl.DateTimeFormat(this.locale, this.intlOptions({ month: style }));\n const standalone: string[] = [];\n for (let i = 0; i < 12; i++) standalone.push(standaloneFormatter.format(new Date(2024, i, 15)));\n\n let out: readonly string[] = standalone;\n if (context === 'format') {\n const numerals = numeralsFor(this.locale, standaloneFormatter.resolvedOptions().numberingSystem) ?? [];\n const inDate = new Intl.DateTimeFormat(this.locale, this.intlOptions({ day: 'numeric', month: style }));\n out = standalone.map((name, i) => {\n const part = inDate.formatToParts(new Date(2024, i, 15)).find(p => p.type === 'month')?.value;\n if (!part || isAllDigits(part, numerals)) return name;\n return part;\n });\n }\n\n this.monthNameCache.set(cacheKey, out);\n return out;\n }\n\n // Internals: token-based format / parse\n\n /** Whether a token pattern also writes the day, which decides the month's form. */\n private hasDayToken(pattern: string): boolean {\n let found = false;\n pattern.replace(PART_RE, (part: string, quoted?: string) => {\n if (quoted === undefined && (part === 'd' || part === 'dd')) found = true;\n return part;\n });\n return found;\n }\n\n private formatWithTokens(date: Date, pattern: string): string {\n const year = date.getFullYear();\n const month = date.getMonth();\n const day = date.getDate();\n const hours24 = date.getHours();\n const hours12 = hours24 % 12 === 0 ? 12 : hours24 % 12;\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n // A pattern that writes the day wants the month declined for that position — `MMMM`\n // used to hand `15 март 2026` to a Russian field, which reads as machine output.\n const context = this.hasDayToken(pattern) ? 'format' : 'standalone';\n const monthNames = this.monthNames('long', context);\n const monthShort = this.monthNames('short', context);\n\n return pattern.replace(PART_RE, (part, quoted?: string) => {\n // A quoted run is emitted as-is; `''` is how a single quote is written.\n if (quoted !== undefined) return quoted === '' ? \"'\" : quoted;\n const token = part;\n switch (token) {\n case 'yyyy':\n return pad(year, 4);\n case 'yy':\n return pad(year % 100, 2);\n case 'MMMM':\n return monthNames[month] ?? '';\n case 'MMM':\n return monthShort[month] ?? '';\n case 'MM':\n return pad(month + 1);\n case 'M':\n return String(month + 1);\n case 'dd':\n return pad(day);\n case 'd':\n return String(day);\n case 'HH':\n return pad(hours24);\n case 'H':\n return String(hours24);\n case 'hh':\n return pad(hours12);\n case 'h':\n return String(hours12);\n case 'mm':\n return pad(minutes);\n case 'ss':\n return pad(seconds);\n case 'a':\n return this.dayPeriods()[hours24 < 12 ? 0 : 1];\n }\n return token;\n });\n }\n\n private parseWithTokens(value: string, pattern: string): Date | null {\n const tokens: string[] = [];\n // Both forms are accepted on the way IN: the formatter writes the declined one beside\n // a day (`15 марта`), and a heading or an older stored string carries the nominative.\n const monthLong = [this.monthNames('long', 'format'), this.monthNames('long', 'standalone')];\n const monthShort = [this.monthNames('short', 'format'), this.monthNames('short', 'standalone')];\n const numerals = this.localeNumerals();\n const digits = digitClass(numerals);\n const escaped = pattern.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const regex = escaped.replace(PART_RE, (part, quoted?: string) => {\n if (quoted !== undefined) {\n // Literal text matches itself and captures nothing, so the token indices stay\n // aligned with the groups below.\n return quoted === '' ? \"'\" : quoted;\n }\n tokens.push(part);\n // `a` is the one token whose text is locale-dependent, so its alternation is built\n // here rather than in the pure `tokenToRegex`: the marker this adapter now PRINTS\n // has to be one the same adapter can read.\n if (part === 'a') return `(${alternation([...this.dayPeriods(), 'am', 'pm'])})`;\n return tokenToRegex(part, digits);\n });\n\n const match = new RegExp(`^${regex}$`, 'i').exec(value);\n if (!match) return null;\n\n const parts: DateParts = {};\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n const raw = match[i + 1];\n const n = digitsToNumber(raw, numerals);\n switch (token) {\n case 'yyyy':\n parts.year = n;\n break;\n case 'yy':\n parts.year = 2000 + n;\n break;\n case 'MM':\n case 'M':\n parts.month = n - 1;\n break;\n case 'MMM':\n case 'MMMM': {\n const sets = token === 'MMM' ? monthShort : monthLong;\n const wanted = raw.toLowerCase();\n const found = sets\n .map(names => names.findIndex(name => name.toLowerCase() === wanted))\n .find(index => index >= 0);\n if (found === undefined) return null;\n parts.month = found;\n break;\n }\n case 'dd':\n case 'd':\n parts.day = n;\n break;\n case 'HH':\n case 'H':\n parts.hours = n;\n break;\n case 'hh':\n case 'h':\n parts.hour12 = n;\n break;\n case 'mm':\n parts.minutes = n;\n break;\n case 'ss':\n parts.seconds = n;\n break;\n case 'a': {\n const marker = raw.toLowerCase();\n parts.isPm = marker === 'pm' || marker === this.dayPeriods()[1].toLowerCase();\n break;\n }\n }\n }\n\n return this.compose(parts);\n }\n\n /**\n * Build the parser for one named format out of the very formatter that prints it.\n *\n * `formatToParts` is the only honest source for a locale's field ORDER and its\n * literals — ru writes `dd.MM.y` with a two-digit month while its own\n * `{ month: 'numeric' }` request says one digit, ja puts the year first, and ar-SA\n * separates fields with U+200F. Names (a month, AM/PM) become an alternation of the\n * real strings; numbers accept the locale's digits AND ASCII, because a physical\n * keyboard produces the latter whatever the display shows.\n *\n * Returns `null` — meaning \"this format cannot be read back\" — rather than guessing,\n * for a field type nothing here asks for (an era, a weekday) or a numbering system\n * with no digit-by-digit reading (roman numerals). `parse` then refuses, which leaves\n * the caller's committed value untouched.\n */\n private buildNamedParser(key: WrDateFormat): NamedParser | null {\n const formatter = this.intl(key);\n const resolved = formatter.resolvedOptions();\n const numerals = numeralsFor(this.locale, resolved.numberingSystem);\n if (!numerals) return null;\n const digits = digitClass(numerals);\n\n // Distinct values in every field, so nothing below can read one field's reference\n // value out of another's position.\n const reference = new Date(2024, 0, 15, 13, 45, 56);\n const fields: NamedField[] = [];\n const fragments: { readonly source: string; readonly literal: boolean }[] = [];\n\n for (const part of formatter.formatToParts(reference)) {\n switch (part.type) {\n case 'literal':\n fragments.push({ source: literalToRegex(part.value), literal: true });\n break;\n case 'year':\n fields.push({ kind: 'year' });\n // Exactly two digits or exactly four — the shapes a year is actually written\n // in. `{1,4}` would let the third keystroke of `15.3.2026` read as the year 2\n // and commit it, which is a smaller version of the defect this replaces.\n fragments.push({ source: `(${digits}{2}|${digits}{4})`, literal: false });\n break;\n case 'month': {\n const names = this.namedMonthNames(formatter);\n if (names.every(name => isAllDigits(name, numerals))) {\n fields.push({ kind: 'month' });\n fragments.push({ source: `(${digits}{1,2})`, literal: false });\n } else {\n fields.push({ kind: 'monthName', names });\n fragments.push({ source: `(${alternation(names)})`, literal: false });\n }\n break;\n }\n case 'day':\n fields.push({ kind: 'day' });\n fragments.push({ source: `(${digits}{1,2})`, literal: false });\n break;\n case 'hour':\n fields.push({ kind: 'hour' });\n fragments.push({ source: `(${digits}{1,2})`, literal: false });\n break;\n case 'minute':\n fields.push({ kind: 'minute' });\n fragments.push({ source: `(${digits}{1,2})`, literal: false });\n break;\n case 'second':\n fields.push({ kind: 'second' });\n fragments.push({ source: `(${digits}{1,2})`, literal: false });\n break;\n case 'dayPeriod': {\n const names = this.dayPeriodNames(formatter);\n fields.push({ kind: 'dayPeriod', names });\n fragments.push({ source: `(${alternation(names)})`, literal: false });\n break;\n }\n default:\n return null;\n }\n }\n\n if (!fields.length) return null;\n\n // A trailing literal is optional. ru's medium date ends ` г.` and fi's short date\n // ends with a bare `.`; someone retyping the field types the fields and stops, and\n // refusing that would reintroduce the very \"cannot read its own output\" defect for\n // the one part of the string that carries no information.\n const source = fragments\n .map((fragment, i) =>\n i === fragments.length - 1 && fragment.literal && fragment.source ? `(?:${fragment.source})?` : fragment.source\n )\n .join('');\n\n return { regex: new RegExp(`^${source}$`, 'iu'), fields, numerals, hourCycle: resolved.hourCycle };\n }\n\n /** The twelve month strings THIS formatter writes, in its own style and context. */\n private namedMonthNames(formatter: Intl.DateTimeFormat): readonly string[] {\n const out: string[] = [];\n for (let i = 0; i < 12; i++) {\n out.push(formatter.formatToParts(new Date(2024, i, 15)).find(p => p.type === 'month')?.value ?? '');\n }\n return out;\n }\n\n /** `[am, pm]` as THIS formatter writes them — `ص` / `م` in Arabic, not AM / PM. */\n private dayPeriodNames(formatter: Intl.DateTimeFormat): readonly string[] {\n const read = (hour: number): string =>\n formatter.formatToParts(new Date(2024, 0, 15, hour, 30)).find(p => p.type === 'dayPeriod')?.value ?? '';\n return [read(9), read(21)];\n }\n\n private readonly namedParsers = new Map<WrDateFormat, NamedParser | null>();\n\n private parseNamed(raw: string, key: WrDateFormat): Date | null {\n let parser = this.namedParsers.get(key);\n if (parser === undefined) {\n parser = this.buildNamedParser(key);\n this.namedParsers.set(key, parser);\n }\n if (!parser) return null;\n\n const match = parser.regex.exec(stripBidi(raw));\n if (!match) return null;\n\n const parts: DateParts = {};\n const twelveHour = parser.fields.some(field => field.kind === 'dayPeriod');\n\n for (let i = 0; i < parser.fields.length; i++) {\n const field = parser.fields[i];\n const captured = match[i + 1] ?? '';\n if (field.kind === 'monthName' || field.kind === 'dayPeriod') {\n const wanted = stripBidi(captured).toLowerCase();\n const index = (field.names ?? []).findIndex(name => stripBidi(name).toLowerCase() === wanted);\n if (index < 0) return null;\n if (field.kind === 'monthName') parts.month = index;\n else parts.isPm = index === 1;\n continue;\n }\n\n const n = digitsToNumber(captured, parser.numerals);\n if (Number.isNaN(n)) return null;\n switch (field.kind) {\n case 'year':\n // Two digits mean this century, the same reading the `yy` token gives — the\n // picker's own doc promises `1/5/25` cleans up to 2025.\n parts.year = captured.length <= 2 ? 2000 + n : n;\n break;\n case 'month':\n parts.month = n - 1;\n break;\n case 'day':\n parts.day = n;\n break;\n case 'hour':\n if (twelveHour) parts.hour12 = n;\n // `hourCycle: 'h24'` numbers midnight 24 rather than 0.\n else parts.hours = n === 24 && parser.hourCycle === 'h24' ? 0 : n;\n break;\n case 'minute':\n parts.minutes = n;\n break;\n case 'second':\n parts.seconds = n;\n break;\n }\n }\n\n return this.compose(parts);\n }\n\n /**\n * Assemble whatever was read into a `Date`, or refuse.\n *\n * `new Date(2025, 12, 45)` does not fail — it rolls forward into the next year — and\n * `isValid` is happy with the result, so a text field used to turn nonsense into a\n * confident wrong answer. The clock parts are range-checked directly; the month and the\n * day are checked by comparing what came back, which catches every rollover including a\n * month of 12 or -1.\n */\n private compose(parts: DateParts): Date | null {\n const now = new Date();\n const year = parts.year ?? now.getFullYear();\n const month = parts.month ?? now.getMonth();\n\n let hours = parts.hours ?? 0;\n if (parts.hour12 !== undefined) hours = (parts.hour12 % 12) + (parts.isPm ? 12 : 0);\n const minutes = parts.minutes ?? 0;\n const seconds = parts.seconds ?? 0;\n if (hours < 0 || hours > 23 || minutes < 0 || minutes > 59 || seconds < 0 || seconds > 59) return null;\n\n // A time-only format carries no date, and the date it should imply is TODAY — the\n // previous default was 1 January, so a picker in `mode=\"time\"` moved the model back\n // to New Year's Day as a side effect of reading a clock. The default is clamped to\n // the month it lands in, because an unclamped 31st would roll a February string\n // forward and the rollover check below would then refuse a well-formed string.\n const monthLength = new Date(year, month + 1, 0).getDate();\n const day = parts.day ?? Math.min(now.getDate(), monthLength);\n\n const out = new Date(year, month, day, hours, minutes, seconds);\n // Same trap `createDate` documents: a year under 100 maps onto 1900 + year unless it\n // is written back explicitly, so `0025-08-11` used to parse as 1925.\n if (year >= 0 && year < 100) out.setFullYear(year);\n if (!this.isValid(out)) return null;\n if (out.getMonth() !== month || out.getDate() !== day) return null;\n return out;\n }\n}\n\nexport { isNamedFormat };\n","/**\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 { type EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\n\nimport type { WrDateAdapterOptions } from './interfaces';\nimport { WR_DATE_LOCALE } from './tokens';\nimport { WrDateAdapter } from './wr-date-adapter';\nimport { WrNativeDateAdapter } from './wr-native-date-adapter';\n\n/**\n * Register the date adapter and locale used by the calendar / date picker /\n * time picker. Call once at bootstrap.\n *\n * Omit `locale` and dates follow Angular's `LOCALE_ID`, which is what the app\n * already says it is. Pass one only to pin dates to something else — see\n * {@link WR_DATE_LOCALE}, and `WrI18n` for how the three locale inputs rank.\n *\n * @example\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideWrDateAdapter(), // native adapter, LOCALE_ID\n * // provideWrDateAdapter({ locale: 'ru-RU' }), // pin the dates\n * // provideWrDateAdapter({ adapter: MyDateFnsAdapter, locale: 'fr' }),\n * ],\n * });\n * ```\n */\nexport function provideWrDateAdapter(options: WrDateAdapterOptions = {}): EnvironmentProviders {\n const providers: Parameters<typeof makeEnvironmentProviders>[0] = [\n { provide: WrDateAdapter, useClass: options.adapter ?? WrNativeDateAdapter },\n ];\n\n if (options.locale) {\n providers.push({ provide: WR_DATE_LOCALE, useValue: options.locale });\n }\n\n return makeEnvironmentProviders(providers);\n}\n\nexport type { WrDateAdapterOptions } from './interfaces';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAAA;;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AO,CAAC;;;AAG/D,QAAA,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,GAAG,GAAG;AAAE,YAAA,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC;AAClD,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;AAAE,YAAA,OAAO,IAAI;AACnC,QAAA,IAAI,GAAG,CAAC,QAAQ,EAAE,KAAK,KAAK,IAAI,GAAG,CAAC,OAAO,EAAE,KAAK,GAAG;AAAE,YAAA,OAAO,IAAI;AAClE,QAAA,OAAO,GAAG;IACZ;uGAjpBW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,OAAA,EAAA,CAAA;wGAAnB,mBAAmB,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B;;;AC1MD;;;;;AAKG;AASH;;;;;;;;;;;;;;;;;;AAkBG;AACG,SAAU,oBAAoB,CAAC,OAAA,GAAgC,EAAE,EAAA;AACrE,IAAA,MAAM,SAAS,GAAmD;QAChE,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC,OAAO,IAAI,mBAAmB,EAAE;KAC7E;AAED,IAAA,IAAI,OAAO,CAAC,MAAM,EAAE;AAClB,QAAA,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;IACvE;AAEA,IAAA,OAAO,wBAAwB,CAAC,SAAS,CAAC;AAC5C;;AC3CA;;AAEG;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-decrypt-text-testing.mjs","sources":["../../../projects/lib/decrypt-text/testing/wr-decrypt-text-harness.ts","../../../projects/lib/decrypt-text/testing/ngwr-decrypt-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 { WrDecryptTextHarnessFilters } from './interfaces';\n\n/** The readable copy of the string, carried once and hidden with CSS. */\nconst SR_ONLY = '.wr-decrypt-text__sr-only';\n\n/** One span per CODE POINT of whatever is on screen this frame. */\nconst CHAR = '.wr-decrypt-text__char';\n\n/** The modifier that carries the entire progress model. */\nconst ENCRYPTED = '.wr-decrypt-text__char--encrypted';\n\n/**\n * The wrapper holding every scramble character.\n *\n * Addressed structurally because it is the one element in this template with no BEM\n * class of its own — see {@link WrDecryptTextHarness.isAnimatedLayerHidden}, which\n * exists precisely because a selector this fragile should be written down once rather\n * than assumed in every spec.\n */\nconst SCRAMBLE = `${SR_ONLY} + span`;\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-decrypt-text>`.\n *\n * **Two layers, two questions, and they are meant to disagree.** The component renders\n * the real string once in a visually-hidden span and the scramble in a parallel\n * `aria-hidden` layer, so {@link getAccessibleText} is what a screen reader hears and\n * {@link getRenderedText} is what a sighted reader sees. Mid-reveal the second is\n * literal gibberish while the first must be untouched — that is the contract, and it is\n * the half nobody looks at. A spec asserting only the visible glyphs would pass on a\n * component that announced `XQ#PZ`.\n *\n * **Prefer the class over the glyphs.** {@link getRevealedIndices},\n * {@link getEncryptedCount} and {@link isFullyRevealed} read\n * `.wr-decrypt-text__char--encrypted`, which is deterministic with no stubbing at all —\n * they are what tell `revealDirection` `'start'` from `'end'` from `'center'`, one index\n * per tick. {@link getRenderedText} reads the glyphs themselves, which are a fresh\n * `Math.random()` draw per tick, so stub it (`vi.spyOn(Math, 'random')\n * .mockReturnValue(0)`) before asserting a string.\n *\n * **The clock is the spec's, not the harness's.** The reveal is a `setInterval` this\n * class does not own, so there is no `advance(ms)` and no `waitUntilRevealed()`: one\n * would flake on a loaded machine and the other would silently require fake timers to\n * have been installed. Fake `setInterval` / `clearInterval` and nothing else — faking\n * the microtask queue freezes the stabilization every `await harness.*()` runs through —\n * then advance the clock yourself between reads.\n *\n * **There is no keyboard path, and this harness does not pretend there is one.**\n * {@link hover}, {@link mouseAway} and {@link click} are the component's only triggers;\n * with `animateOn=\"click\"` the host takes a click handler while carrying no role, no\n * `tabindex` and no keydown handler, so a `focus()` / `sendKeys(Enter)` affordance here\n * would make a spec pass while a keyboard or switch user could not reveal the text at\n * all. There is no `enterViewport()` either: `'view'` and `'inViewHover'` hang off an\n * `IntersectionObserver` jsdom does not implement, so the spec stubs the global and\n * fires it.\n *\n * **Also deliberately absent:** `isAnimating()` — the component has such a signal and it\n * never reaches the DOM, and deriving it from \"something is encrypted\" would be wrong in\n * exactly the interesting case, since `animateOn=\"click\"` rests fully encrypted and\n * perfectly still. `getSpeed()` / `getMaxIterations()` / `getRevealDirection()` /\n * `getClickMode()` / `getAnimateOn()` — inputs that are never reflected anywhere, so\n * reporting them would mean reading the component instance rather than the rendered\n * control; they are observable as behaviour, which is what the methods above measure.\n * `getScrambleAlphabet()` — the pool is internal and each frame shows one random draw\n * from it, so any reconstruction is a guess that gets worse the shorter the string.\n * `getCharColors()` / `isDimmed()` — the `--encrypted` rule is deliberately EMPTY, a\n * styling hook for consumers, so there is nothing painted to read in any environment.\n *\n * @example\n * ```ts\n * const secret = await loader.getHarness(WrDecryptTextHarness.with({ text: 'Hello' }));\n *\n * await secret.hover();\n * vi.advanceTimersByTime(50);\n *\n * expect(await secret.getRevealedIndices()).toEqual([0]); // sequential, from the start\n * expect(await secret.getAccessibleText()).toBe('Hello'); // untouched throughout\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDecryptTextHarness extends ComponentHarness {\n static hostSelector = 'wr-decrypt-text';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrDecryptTextHarnessFilters = {}): HarnessPredicate<WrDecryptTextHarness> {\n return new HarnessPredicate(WrDecryptTextHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getAccessibleText(), text)\n )\n .addOption('revealed', options.revealed, async (harness, revealed) => {\n // Not `isFullyRevealed()`, which refuses to answer for an instance that rendered\n // no characters. A predicate is the wrong place to throw — a single empty\n // instance would take down every query on the page — so the vacuous case is\n // spelled out here instead, and matches neither `true` nor `false`.\n if ((await harness.getCharCount()) === 0) return false;\n return ((await harness.getEncryptedCount()) === 0) === revealed;\n });\n }\n\n private readonly chars = this.locatorForAll(CHAR);\n private readonly encrypted = this.locatorForAll(ENCRYPTED);\n\n /**\n * The real string, as the one readable copy holds it.\n *\n * The single highest-value assertion here: it must stay equal to the `text` input on\n * every frame, while the visible layer is unreadable by design. Lose this span and the\n * component announces nothing at all — every drawn character sits under `aria-hidden`,\n * so no other part of the DOM would change.\n *\n * Untrimmed, so that it can be compared against {@link getRenderedText} without one\n * side of the comparison quietly forgiving a lost leading space.\n */\n async getAccessibleText(): Promise<string> {\n return rawText(await this.locatorFor(SR_ONLY)());\n }\n\n /**\n * What is on screen this frame — scramble glyphs and all, in document order.\n *\n * Plain before anything triggers it, gibberish mid-reveal, and the real string once it\n * settles; comparing it against {@link getAccessibleText} is how a spec says which of\n * those it is looking at. `useOriginalCharsOnly` is visible only here — every glyph\n * has to be one the text really contains.\n *\n * Nondeterministic unless the spec stubs `Math.random`, because each unrevealed\n * position is an independent draw from the pool. When the assertion does not actually\n * need the glyphs, {@link getRevealedIndices} answers the same progress question off\n * the class and needs no stub.\n */\n async getRenderedText(): Promise<string> {\n return (await Promise.all((await this.chars()).map(rawText))).join('');\n }\n\n /**\n * How many characters the animation walks.\n *\n * CODE POINTS, not UTF-16 units: `'a🚀b'` is 3 here, and the indices\n * {@link getRevealedIndices} returns line up with `[...text]` rather than with plain\n * `text[i]`. That distinction is not pedantry — counting units gave a sequential\n * reveal extra ticks with no character to spend them on, and made \"everything is\n * revealed\" disagree with what was on screen.\n */\n async getCharCount(): Promise<number> {\n return (await this.chars()).length;\n }\n\n /**\n * The positions that have settled on their real character, ascending.\n *\n * The payload method, and the deterministic one: it reads the `--encrypted` modifier\n * rather than the glyphs, so no `Math.random` stub is involved. It is the only thing\n * that separates `revealDirection` `'start'` (`[0]`, `[0, 1]`, …) from `'end'`\n * (`[4]`, `[3, 4]`, …) from `'center'` (`[2]`, `[1, 2]`, …), and one index per tick is\n * what makes a sequential reveal sequential.\n *\n * Ascending by position, NOT in the order the reveal visited them — the DOM records\n * which characters have landed, never the path taken to them. Assert the set after\n * each tick to pin an order.\n */\n async getRevealedIndices(): Promise<number[]> {\n const chars = await this.chars();\n const states = await Promise.all(chars.map(char => char.hasClass('wr-decrypt-text__char--encrypted')));\n return states.flatMap((isEncrypted, index) => (isEncrypted ? [] : [index]));\n }\n\n /**\n * How many characters are still scrambled.\n *\n * The coarse progress read, and the cheapest way to say \"scrambled on hover\", \"plain on\n * leave\", or \"a reader who asked for less motion never saw a scramble at all\". Class-\n * based like {@link getRevealedIndices}, so it too is random-proof.\n */\n async getEncryptedCount(): Promise<number> {\n return (await this.encrypted()).length;\n }\n\n /**\n * Whether every character has settled.\n *\n * Deliberately does NOT also compare {@link getRenderedText} against\n * {@link getAccessibleText}: folding two conditions into one boolean hides which of\n * them broke, and a spec that wants both should write both lines.\n *\n * Throws when nothing was rendered. \"No character is encrypted\" is true of no\n * characters, which is the same answer a component that stopped rendering its text\n * would give — and this is the method most likely to be the only assertion in a test.\n */\n async isFullyRevealed(): Promise<boolean> {\n const total = await this.getCharCount();\n\n if (total === 0) {\n throw new Error(\n 'WrDecryptTextHarness.isFullyRevealed(): this <wr-decrypt-text> rendered no characters, so \"nothing is ' +\n 'encrypted\" is vacuously true — the same answer a component that stopped rendering its text would ' +\n 'give. Check `text` is set, or ask getCharCount().'\n );\n }\n\n return (await this.getEncryptedCount()) === 0;\n }\n\n /**\n * Whether the scramble layer is out of the accessibility tree.\n *\n * The contract that keeps a screen reader from spelling out `XQ#PZ` beside the real\n * string it already read. Worth a method rather than an assumption because the wrapper\n * holding the characters carries NO class — it can only be addressed as the readable\n * span's next sibling, which any template reshuffle breaks.\n *\n * Throws when that structural selector finds nothing, rather than returning `false`: a\n * missing wrapper and an unhidden one are different failures, and the answer to\n * \"is the scramble hidden\" when there is no scramble layer at all is not `false`.\n */\n async isAnimatedLayerHidden(): Promise<boolean> {\n const scramble = await this.locatorForOptional(SCRAMBLE)();\n\n if (!scramble) {\n throw new Error(\n 'WrDecryptTextHarness.isAnimatedLayerHidden(): no scramble layer found. It carries no class of its own, ' +\n `so it is addressed structurally as \\`${SCRAMBLE}\\` — a template that moved either span out from ` +\n 'under that selector breaks this read, and \"false\" would report the layer as ANNOUNCED rather than as ' +\n 'missing.'\n );\n }\n\n return (await scramble.getAttribute('aria-hidden')) === 'true';\n }\n\n /**\n * Point at it — the trigger for `animateOn` `'hover'` and `'inViewHover'`.\n *\n * Drives the component the way a user does, and works in a test because the trigger is\n * an event rather than a gesture: `TestElement.hover()` dispatches `pointerenter`,\n * `mouseover` and `mouseenter`, and the component listens for the last of those. A\n * hand-rolled pointer-only dispatch would not reach it.\n *\n * Does nothing in the other two modes, exactly as a real pointer does nothing there.\n */\n async hover(): Promise<void> {\n return (await this.host()).hover();\n }\n\n /**\n * Move the pointer off — the other half of hover mode.\n *\n * Pins the promise that leaving mid-scramble restores the real text IMMEDIATELY rather\n * than letting the reveal play out: the reader took the effect away, so the string has\n * to come back at once.\n */\n async mouseAway(): Promise<void> {\n return (await this.host()).mouseAway();\n }\n\n /**\n * Click the host — the `animateOn=\"click\"` trigger, and the only way to tell\n * `clickMode` `'once'` from `'toggle'`.\n *\n * There is no keyboard equivalent, and that is a statement about the component rather\n * than about this harness: in click mode the host carries a click handler with no role,\n * no `tabindex` and no keydown handler, so a keyboard or switch user cannot reveal the\n * text at all. A `sendKeys(Enter)` here would invent an affordance that does not exist\n * and let a spec pass over the top of it.\n */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;AACA,MAAM,OAAO,GAAG,2BAA2B;AAE3C;AACA,MAAM,IAAI,GAAG,wBAAwB;AAErC;AACA,MAAM,SAAS,GAAG,mCAAmC;AAErD;;;;;;;AAOG;AACH,MAAM,QAAQ,GAAG,CAAA,EAAG,OAAO,SAAS;AAEpC;AACA,eAAe,OAAO,CAAC,OAAoB,EAAA;IACzC,OAAO,CAAC,MAAM,OAAO,CAAC,WAAW,CAAgB,aAAa,CAAC,KAAK,EAAE;AACxE;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DG;AACG,MAAO,oBAAqB,SAAQ,gBAAgB,CAAA;AACxD,IAAA,OAAO,YAAY,GAAG,iBAAiB;;AAGvC,IAAA,OAAO,IAAI,CAAC,OAAA,GAAuC,EAAE,EAAA;AACnD,QAAA,OAAO,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,OAAO;aACtD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,KAC7C,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,IAAI,CAAC;AAElE,aAAA,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAI;;;;;YAKnE,IAAI,CAAC,MAAM,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;AAAE,gBAAA,OAAO,KAAK;AACtD,YAAA,OAAO,CAAC,CAAC,MAAM,OAAO,CAAC,iBAAiB,EAAE,MAAM,CAAC,MAAM,QAAQ;AACjE,QAAA,CAAC,CAAC;IACN;AAEiB,IAAA,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;AAChC,IAAA,SAAS,GAAG,IAAI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;QACH;QAEA,OAAO,CAAC,MAAM,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAC/C;AAEA;;;;;;;;;;;AAWG;AACH,IAAA,MAAM,qBAAqB,GAAA;QACzB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE;QAE1D,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CACb,yGAAyG;AACvG,gBAAA,CAAA,qCAAA,EAAwC,QAAQ,CAAA,gDAAA,CAAkD;gBAClG,uGAAuG;AACvG,gBAAA,UAAU,CACb;QACH;QAEA,OAAO,CAAC,MAAM,QAAQ,CAAC,YAAY,CAAC,aAAa,CAAC,MAAM,MAAM;IAChE;AAEA;;;;;;;;;AASG;AACH,IAAA,MAAM,KAAK,GAAA;QACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE;IACpC;AAEA;;;;;;AAMG;AACH,IAAA,MAAM,SAAS,GAAA;QACb,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE;IACxC;AAEA;;;;;;;;;AASG;AACH,IAAA,MAAM,KAAK,GAAA;QACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE;IACpC;;;ACzRF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-decrypt-text-testing.mjs","sources":["../../../projects/lib/decrypt-text/testing/wr-decrypt-text-harness.ts","../../../projects/lib/decrypt-text/testing/ngwr-decrypt-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 { WrDecryptTextHarnessFilters } from './interfaces';\n\n/** The readable copy of the string, carried once and hidden with CSS. */\nconst SR_ONLY = '.wr-decrypt-text__sr-only';\n\n/** One span per CODE POINT of whatever is on screen this frame. */\nconst CHAR = '.wr-decrypt-text__char';\n\n/** The modifier that carries the entire progress model. */\nconst ENCRYPTED = '.wr-decrypt-text__char--encrypted';\n\n/**\n * The wrapper holding every scramble character.\n *\n * Addressed structurally because it is the one element in this template with no BEM\n * class of its own — see {@link WrDecryptTextHarness.isAnimatedLayerHidden}, which\n * exists precisely because a selector this fragile should be written down once rather\n * than assumed in every spec.\n */\nconst SCRAMBLE = `${SR_ONLY} + span`;\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-decrypt-text>`.\n *\n * **Two layers, two questions, and they are meant to disagree.** The component renders\n * the real string once in a visually-hidden span and the scramble in a parallel\n * `aria-hidden` layer, so {@link getAccessibleText} is what a screen reader hears and\n * {@link getRenderedText} is what a sighted reader sees. Mid-reveal the second is\n * literal gibberish while the first must be untouched — that is the contract, and it is\n * the half nobody looks at. A spec asserting only the visible glyphs would pass on a\n * component that announced `XQ#PZ`.\n *\n * **Prefer the class over the glyphs.** {@link getRevealedIndices},\n * {@link getEncryptedCount} and {@link isFullyRevealed} read\n * `.wr-decrypt-text__char--encrypted`, which is deterministic with no stubbing at all —\n * they are what tell `revealDirection` `'start'` from `'end'` from `'center'`, one index\n * per tick. {@link getRenderedText} reads the glyphs themselves, which are a fresh\n * `Math.random()` draw per tick, so stub it (`vi.spyOn(Math, 'random')\n * .mockReturnValue(0)`) before asserting a string.\n *\n * **The clock is the spec's, not the harness's.** The reveal is a `setInterval` this\n * class does not own, so there is no `advance(ms)` and no `waitUntilRevealed()`: one\n * would flake on a loaded machine and the other would silently require fake timers to\n * have been installed. Fake `setInterval` / `clearInterval` and nothing else — faking\n * the microtask queue freezes the stabilization every `await harness.*()` runs through —\n * then advance the clock yourself between reads.\n *\n * **There is no keyboard path, and this harness does not pretend there is one.**\n * {@link hover}, {@link mouseAway} and {@link click} are the component's only triggers;\n * with `animateOn=\"click\"` the host takes a click handler while carrying no role, no\n * `tabindex` and no keydown handler, so a `focus()` / `sendKeys(Enter)` affordance here\n * would make a spec pass while a keyboard or switch user could not reveal the text at\n * all. There is no `enterViewport()` either: `'view'` and `'inViewHover'` hang off an\n * `IntersectionObserver` jsdom does not implement, so the spec stubs the global and\n * fires it.\n *\n * **Also deliberately absent:** `isAnimating()` — the component has such a signal and it\n * never reaches the DOM, and deriving it from \"something is encrypted\" would be wrong in\n * exactly the interesting case, since `animateOn=\"click\"` rests fully encrypted and\n * perfectly still. `getSpeed()` / `getMaxIterations()` / `getRevealDirection()` /\n * `getClickMode()` / `getAnimateOn()` — inputs that are never reflected anywhere, so\n * reporting them would mean reading the component instance rather than the rendered\n * control; they are observable as behaviour, which is what the methods above measure.\n * `getScrambleAlphabet()` — the pool is internal and each frame shows one random draw\n * from it, so any reconstruction is a guess that gets worse the shorter the string.\n * `getCharColors()` / `isDimmed()` — the `--encrypted` rule is deliberately EMPTY, a\n * styling hook for consumers, so there is nothing painted to read in any environment.\n *\n * @example\n * ```ts\n * const secret = await loader.getHarness(WrDecryptTextHarness.with({ text: 'Hello' }));\n *\n * await secret.hover();\n * vi.advanceTimersByTime(50);\n *\n * expect(await secret.getRevealedIndices()).toEqual([0]); // sequential, from the start\n * expect(await secret.getAccessibleText()).toBe('Hello'); // untouched throughout\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrDecryptTextHarness extends ComponentHarness {\n static hostSelector = 'wr-decrypt-text';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrDecryptTextHarnessFilters = {}): HarnessPredicate<WrDecryptTextHarness> {\n return new HarnessPredicate(WrDecryptTextHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getAccessibleText(), text)\n )\n .addOption('revealed', options.revealed, async (harness, revealed) => {\n // Not `isFullyRevealed()`, which refuses to answer for an instance that rendered\n // no characters. A predicate is the wrong place to throw — a single empty\n // instance would take down every query on the page — so the vacuous case is\n // spelled out here instead, and matches neither `true` nor `false`.\n if ((await harness.getCharCount()) === 0) return false;\n return ((await harness.getEncryptedCount()) === 0) === revealed;\n });\n }\n\n private readonly chars = this.locatorForAll(CHAR);\n private readonly encrypted = this.locatorForAll(ENCRYPTED);\n\n /**\n * The real string, as the one readable copy holds it.\n *\n * The single highest-value assertion here: it must stay equal to the `text` input on\n * every frame, while the visible layer is unreadable by design. Lose this span and the\n * component announces nothing at all — every drawn character sits under `aria-hidden`,\n * so no other part of the DOM would change.\n *\n * Untrimmed, so that it can be compared against {@link getRenderedText} without one\n * side of the comparison quietly forgiving a lost leading space.\n */\n async getAccessibleText(): Promise<string> {\n return rawText(await this.locatorFor(SR_ONLY)());\n }\n\n /**\n * What is on screen this frame — scramble glyphs and all, in document order.\n *\n * Plain before anything triggers it, gibberish mid-reveal, and the real string once it\n * settles; comparing it against {@link getAccessibleText} is how a spec says which of\n * those it is looking at. `useOriginalCharsOnly` is visible only here — every glyph\n * has to be one the text really contains.\n *\n * Nondeterministic unless the spec stubs `Math.random`, because each unrevealed\n * position is an independent draw from the pool. When the assertion does not actually\n * need the glyphs, {@link getRevealedIndices} answers the same progress question off\n * the class and needs no stub.\n */\n async getRenderedText(): Promise<string> {\n return (await Promise.all((await this.chars()).map(rawText))).join('');\n }\n\n /**\n * How many characters the animation walks.\n *\n * CODE POINTS, not UTF-16 units: `'a🚀b'` is 3 here, and the indices\n * {@link getRevealedIndices} returns line up with `[...text]` rather than with plain\n * `text[i]`. That distinction is not pedantry — counting units gave a sequential\n * reveal extra ticks with no character to spend them on, and made \"everything is\n * revealed\" disagree with what was on screen.\n */\n async getCharCount(): Promise<number> {\n return (await this.chars()).length;\n }\n\n /**\n * The positions that have settled on their real character, ascending.\n *\n * The payload method, and the deterministic one: it reads the `--encrypted` modifier\n * rather than the glyphs, so no `Math.random` stub is involved. It is the only thing\n * that separates `revealDirection` `'start'` (`[0]`, `[0, 1]`, …) from `'end'`\n * (`[4]`, `[3, 4]`, …) from `'center'` (`[2]`, `[1, 2]`, …), and one index per tick is\n * what makes a sequential reveal sequential.\n *\n * Ascending by position, NOT in the order the reveal visited them — the DOM records\n * which characters have landed, never the path taken to them. Assert the set after\n * each tick to pin an order.\n */\n async getRevealedIndices(): Promise<number[]> {\n const chars = await this.chars();\n const states = await Promise.all(chars.map(char => char.hasClass('wr-decrypt-text__char--encrypted')));\n return states.flatMap((isEncrypted, index) => (isEncrypted ? [] : [index]));\n }\n\n /**\n * How many characters are still scrambled.\n *\n * The coarse progress read, and the cheapest way to say \"scrambled on hover\", \"plain on\n * leave\", or \"a reader who asked for less motion never saw a scramble at all\". Class-\n * based like {@link getRevealedIndices}, so it too is random-proof.\n */\n async getEncryptedCount(): Promise<number> {\n return (await this.encrypted()).length;\n }\n\n /**\n * Whether every character has settled.\n *\n * Deliberately does NOT also compare {@link getRenderedText} against\n * {@link getAccessibleText}: folding two conditions into one boolean hides which of\n * them broke, and a spec that wants both should write both lines.\n *\n * Throws when nothing was rendered. \"No character is encrypted\" is true of no\n * characters, which is the same answer a component that stopped rendering its text\n * would give — and this is the method most likely to be the only assertion in a test.\n */\n async isFullyRevealed(): Promise<boolean> {\n const total = await this.getCharCount();\n\n if (total === 0) {\n throw new Error(\n 'WrDecryptTextHarness.isFullyRevealed(): this <wr-decrypt-text> rendered no characters, so \"nothing is ' +\n 'encrypted\" is vacuously true — the same answer a component that stopped rendering its text would ' +\n 'give. Check `text` is set, or ask getCharCount().'\n );\n }\n\n return (await this.getEncryptedCount()) === 0;\n }\n\n /**\n * Whether the scramble layer is out of the accessibility tree.\n *\n * The contract that keeps a screen reader from spelling out `XQ#PZ` beside the real\n * string it already read. Worth a method rather than an assumption because the wrapper\n * holding the characters carries NO class — it can only be addressed as the readable\n * span's next sibling, which any template reshuffle breaks.\n *\n * Throws when that structural selector finds nothing, rather than returning `false`: a\n * missing wrapper and an unhidden one are different failures, and the answer to\n * \"is the scramble hidden\" when there is no scramble layer at all is not `false`.\n */\n async isAnimatedLayerHidden(): Promise<boolean> {\n const scramble = await this.locatorForOptional(SCRAMBLE)();\n\n if (!scramble) {\n throw new Error(\n 'WrDecryptTextHarness.isAnimatedLayerHidden(): no scramble layer found. It carries no class of its own, ' +\n `so it is addressed structurally as \\`${SCRAMBLE}\\` — a template that moved either span out from ` +\n 'under that selector breaks this read, and \"false\" would report the layer as ANNOUNCED rather than as ' +\n 'missing.'\n );\n }\n\n return (await scramble.getAttribute('aria-hidden')) === 'true';\n }\n\n /**\n * Point at it — the trigger for `animateOn` `'hover'` and `'inViewHover'`.\n *\n * Drives the component the way a user does, and works in a test because the trigger is\n * an event rather than a gesture: `TestElement.hover()` dispatches `pointerenter`,\n * `mouseover` and `mouseenter`, and the component listens for the last of those. A\n * hand-rolled pointer-only dispatch would not reach it.\n *\n * Does nothing in the other two modes, exactly as a real pointer does nothing there.\n */\n async hover(): Promise<void> {\n return (await this.host()).hover();\n }\n\n /**\n * Move the pointer off — the other half of hover mode.\n *\n * Pins the promise that leaving mid-scramble restores the real text IMMEDIATELY rather\n * than letting the reveal play out: the reader took the effect away, so the string has\n * to come back at once.\n */\n async mouseAway(): Promise<void> {\n return (await this.host()).mouseAway();\n }\n\n /**\n * Click the host — the `animateOn=\"click\"` trigger, and the only way to tell\n * `clickMode` `'once'` from `'toggle'`.\n *\n * There is no keyboard equivalent, and that is a statement about the component rather\n * than about this harness: in click mode the host carries a click handler with no role,\n * no `tabindex` and no keydown handler, so a keyboard or switch user cannot reveal the\n * text at all. A `sendKeys(Enter)` here would invent an affordance that does not exist\n * and let a spec pass over the top of it.\n */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAMH;AACA,MAAM,OAAO,GAAG,2BAA2B;AAE3C;AACA,MAAM,IAAI,GAAG,wBAA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kBAAkB,CAAC,QAAQ,CAAC,EAAE;QAE1D,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CACb,yGAAyG;AACvG,gBAAA,CAAA,qCAAA,EAAwC,QAAQ,CAAA,gDAAA,CAAkD;gBAClG,uGAAuG;AACvG,gBAAA,UAAU,CACb;QACH;QAEA,OAAO,CAAC,MAAM,QAAQ,CAAC,YAAY,CAAC,aAAa,CAAC,MAAM,MAAM;IAChE;AAEA;;;;;;;;;AASG;AACH,IAAA,MAAM,KAAK,GAAA;QACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE;IACpC;AAEA;;;;;;AAMG;AACH,IAAA,MAAM,SAAS,GAAA;QACb,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE;IACxC;AAEA;;;;;;;;;AASG;AACH,IAAA,MAAM,KAAK,GAAA;QACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE;IACpC;;;ACzRF;;AAEG;;"}
|
|
@@ -398,10 +398,10 @@ class WrDecryptText {
|
|
|
398
398
|
})
|
|
399
399
|
.join('');
|
|
400
400
|
}
|
|
401
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
402
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
401
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrDecryptText, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
402
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: WrDecryptText, isStandalone: true, selector: "wr-decrypt-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null }, maxIterations: { classPropertyName: "maxIterations", publicName: "maxIterations", isSignal: true, isRequired: false, transformFunction: null }, sequential: { classPropertyName: "sequential", publicName: "sequential", isSignal: true, isRequired: false, transformFunction: null }, revealDirection: { classPropertyName: "revealDirection", publicName: "revealDirection", isSignal: true, isRequired: false, transformFunction: null }, useOriginalCharsOnly: { classPropertyName: "useOriginalCharsOnly", publicName: "useOriginalCharsOnly", isSignal: true, isRequired: false, transformFunction: null }, characters: { classPropertyName: "characters", publicName: "characters", isSignal: true, isRequired: false, transformFunction: null }, animateOn: { classPropertyName: "animateOn", publicName: "animateOn", isSignal: true, isRequired: false, transformFunction: null }, clickMode: { classPropertyName: "clickMode", publicName: "clickMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "click": "onClick()" }, classAttribute: "wr-decrypt-text" }, ngImport: i0, template: "<span class=\"wr-decrypt-text__sr-only\">{{ text() }}</span>\n<span aria-hidden=\"true\">\n @for (c of chars(); track $index) {\n <span [class]=\"c.revealed ? 'wr-decrypt-text__char' : 'wr-decrypt-text__char wr-decrypt-text__char--encrypted'\">{{\n c.ch\n }}</span>\n }\n</span>\n", styles: [".wr-decrypt-text{display:inline-block;white-space:pre-wrap}.wr-decrypt-text__sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.wr-decrypt-text__char{display:inline}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
403
403
|
}
|
|
404
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: WrDecryptText, decorators: [{
|
|
405
405
|
type: Component,
|
|
406
406
|
args: [{ selector: 'wr-decrypt-text', encapsulation: ViewEncapsulation.None, host: {
|
|
407
407
|
class: 'wr-decrypt-text',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-decrypt-text.mjs","sources":["../../../projects/lib/decrypt-text/decrypt-text.ts","../../../projects/lib/decrypt-text/decrypt-text.html","../../../projects/lib/decrypt-text/ngwr-decrypt-text.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 * Angular adaptation of the DecryptedText effect by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/text-animations/decrypted-text\n *\n * The reactbits version uses `motion/react` for the wrapper. This port\n * is dependency-free — vanilla signals + `setInterval` for the tick loop.\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\n\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\nimport type { WrDecryptTextAnimateOn, WrDecryptTextRevealDirection, WrDecryptTextClickMode } from './interfaces';\n\nconst DEFAULT_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+';\n\nfunction computeOrder(len: number, dir: WrDecryptTextRevealDirection): readonly number[] {\n const order: number[] = [];\n if (len <= 0) return order;\n if (dir === 'start') {\n for (let i = 0; i < len; i++) order.push(i);\n return order;\n }\n if (dir === 'end') {\n for (let i = len - 1; i >= 0; i--) order.push(i);\n return order;\n }\n const middle = Math.floor(len / 2);\n let off = 0;\n while (order.length < len) {\n if (off % 2 === 0) {\n const idx = middle + off / 2;\n if (idx >= 0 && idx < len) order.push(idx);\n } else {\n const idx = middle - Math.ceil(off / 2);\n if (idx >= 0 && idx < len) order.push(idx);\n }\n off++;\n }\n return order.slice(0, len);\n}\n\n/**\n * How many characters the animation walks — CODE POINTS, not UTF-16 units.\n *\n * Every index in this component (`revealedIndices`, the sequential order, the\n * per-character render) counts the same way `[...txt]` does. Using `txt.length`\n * for the total counted an emoji twice, so a sequential reveal spent extra ticks\n * on indices past the end of the text and the \"everything revealed\" test never\n * lined up with what was on screen.\n */\nfunction charCount(txt: string): number {\n return [...txt].length;\n}\n\nfunction fillAllIndices(len: number): Set<number> {\n const s = new Set<number>();\n for (let i = 0; i < len; i++) s.add(i);\n return s;\n}\n\nfunction removeRandomIndices(set: ReadonlySet<number>, count: number): Set<number> {\n const arr = Array.from(set);\n for (let i = 0; i < count && arr.length > 0; i++) {\n arr.splice(Math.floor(Math.random() * arr.length), 1);\n }\n return new Set(arr);\n}\n\n/**\n * Reveals a string by scrambling characters and progressively replacing\n * scramble glyphs with the originals. Supports sequential reveal in\n * three directions, or non-sequential \"settle\" after N iterations, and\n * four trigger modes (hover, click, view, in-view + hover).\n *\n * @example\n * ```html\n * <wr-decrypt-text text=\"Hello, ngwr!\" animateOn=\"hover\" />\n * <wr-decrypt-text\n * text=\"Reveal from the center\"\n * [sequential]=\"true\"\n * revealDirection=\"center\"\n * animateOn=\"view\"\n * />\n * ```\n *\n * @see https://www.reactbits.dev/text-animations/decrypted-text\n */\n@Component({\n selector: 'wr-decrypt-text',\n templateUrl: './decrypt-text.html',\n styleUrl: './decrypt-text.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-decrypt-text',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave()',\n '(click)': 'onClick()',\n },\n})\nexport class WrDecryptText {\n /** Text to reveal. Required. */\n readonly text = input.required<string>();\n\n /** Tick interval in ms. @default 50 */\n readonly speed = input(50, { transform: numAttr(50) });\n\n /** Non-sequential mode only — total scramble ticks before snapping to plain. @default 10 */\n readonly maxIterations = input(10, { transform: numAttr(10) });\n\n /** Reveal one char per tick instead of scrambling all of them. @default false */\n readonly sequential = input(false, { transform: coerceBooleanProperty });\n\n /** Order in which chars are revealed in sequential mode. @default 'start' */\n readonly revealDirection = input<WrDecryptTextRevealDirection>('start');\n\n /** Scramble using only the glyphs present in `text` (minus spaces). @default false */\n readonly useOriginalCharsOnly = input(false, { transform: coerceBooleanProperty });\n\n /** Pool of glyphs to scramble through (used when `useOriginalCharsOnly` is false). */\n readonly characters = input(DEFAULT_CHARS);\n\n /** When to start the animation. @default 'hover' */\n readonly animateOn = input<WrDecryptTextAnimateOn>('hover');\n\n /** Click behaviour. `'once'` decrypts then stops; `'toggle'` flips state on each click. @default 'once' */\n readonly clickMode = input<WrDecryptTextClickMode>('once');\n\n private readonly displayText = signal('');\n private readonly revealedIndices = signal<ReadonlySet<number>>(new Set());\n private readonly isAnimating = signal(false);\n private readonly isDecrypted = signal(true);\n private readonly direction = signal<'forward' | 'reverse'>('forward');\n\n /** Per-char render data. */\n protected readonly chars = computed(() => {\n const display = this.displayText();\n const revealed = this.revealedIndices();\n const decrypted = this.isDecrypted();\n const animating = this.isAnimating();\n return [...display].map((ch, i) => ({\n ch,\n revealed: revealed.has(i) || (!animating && decrypted),\n }));\n });\n\n /** Sequential reverse order — captured when reverse starts. */\n private reverseOrder: readonly number[] = [];\n private reversePointer = 0;\n private iterationCount = 0;\n private intervalId: ReturnType<typeof setInterval> | undefined;\n private hasAnimatedOnce = false;\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly platform = inject(WrPlatform);\n\n constructor() {\n if (!this.isBrowser) {\n // SSR: render plain text.\n effect(() => this.displayText.set(this.text()));\n return;\n }\n\n // Reset state whenever `text` or `animateOn` changes.\n effect(() => {\n const txt = this.text();\n const mode = this.animateOn();\n this.stopInterval();\n // The resting state of `click` mode is the scramble — but not for someone who\n // asked for less motion. `startInterval` short-circuits every TRIGGER to the\n // plain text, and this is the one path that never reaches it, so a reduced-\n // motion reader was left staring at permanently scrambled glyphs with no\n // pointer-free way to undo them.\n if (mode === 'click' && !this.platform.prefersReducedMotion()) {\n this.encryptInstantly(txt);\n } else {\n this.displayText.set(txt);\n this.isDecrypted.set(true);\n }\n this.revealedIndices.set(new Set());\n this.direction.set('forward');\n this.hasAnimatedOnce = false;\n });\n\n afterNextRender(() => {\n const mode = this.animateOn();\n if (mode === 'view' || mode === 'inViewHover') this.setupIntersectionObserver();\n });\n\n this.destroyRef.onDestroy(() => this.stopInterval());\n }\n\n // Trigger handlers\n\n protected onMouseEnter(): void {\n const mode = this.animateOn();\n if (mode !== 'hover' && mode !== 'inViewHover') return;\n this.triggerHoverDecrypt();\n }\n\n protected onMouseLeave(): void {\n const mode = this.animateOn();\n if (mode !== 'hover' && mode !== 'inViewHover') return;\n this.resetToPlain();\n }\n\n protected onClick(): void {\n if (this.animateOn() !== 'click') return;\n if (this.clickMode() === 'once') {\n if (this.isDecrypted()) return;\n this.direction.set('forward');\n this.triggerDecrypt();\n return;\n }\n if (this.isDecrypted()) this.triggerReverse();\n else {\n this.direction.set('forward');\n this.triggerDecrypt();\n }\n }\n\n // Internals\n\n private setupIntersectionObserver(): void {\n const io = new IntersectionObserver(\n (entries, obs) => {\n for (const e of entries) {\n if (e.isIntersecting && !this.hasAnimatedOnce) {\n obs.disconnect();\n this.hasAnimatedOnce = true;\n this.triggerDecrypt();\n break;\n }\n }\n },\n { threshold: 0.1, rootMargin: '0px' }\n );\n io.observe(this.host.nativeElement);\n this.destroyRef.onDestroy(() => io.disconnect());\n }\n\n private triggerHoverDecrypt(): void {\n if (this.isAnimating()) return;\n this.revealedIndices.set(new Set());\n this.isDecrypted.set(false);\n this.displayText.set(this.text());\n this.direction.set('forward');\n this.startInterval();\n }\n\n private resetToPlain(): void {\n this.stopInterval();\n this.revealedIndices.set(new Set());\n this.displayText.set(this.text());\n this.isDecrypted.set(true);\n this.direction.set('forward');\n }\n\n private triggerDecrypt(): void {\n if (this.sequential()) {\n this.revealedIndices.set(new Set());\n } else {\n this.revealedIndices.set(new Set());\n }\n this.direction.set('forward');\n this.startInterval();\n }\n\n private triggerReverse(): void {\n const txt = this.text();\n if (this.sequential()) {\n this.reverseOrder = computeOrder(charCount(txt), this.revealDirection()).slice().reverse();\n this.reversePointer = 0;\n }\n const all = fillAllIndices(charCount(txt));\n this.revealedIndices.set(all);\n this.displayText.set(this.shuffle(txt, all));\n this.direction.set('reverse');\n this.startInterval();\n }\n\n private encryptInstantly(txt: string): void {\n this.revealedIndices.set(new Set());\n this.displayText.set(this.shuffle(txt, new Set()));\n this.isDecrypted.set(false);\n }\n\n private startInterval(): void {\n // Reduced motion: every trigger funnels through here — skip the\n // scramble loop and jump straight to the plain, decrypted text.\n if (this.platform.prefersReducedMotion()) {\n this.resetToPlain();\n return;\n }\n\n this.stopInterval();\n this.isAnimating.set(true);\n this.iterationCount = 0;\n this.intervalId = setInterval(() => this.tick(), this.speed());\n }\n\n private stopInterval(): void {\n if (this.intervalId !== undefined) {\n clearInterval(this.intervalId);\n this.intervalId = undefined;\n }\n this.isAnimating.set(false);\n }\n\n private tick(): void {\n const txt = this.text();\n const seq = this.sequential();\n const dir = this.direction();\n const max = this.maxIterations();\n const revealed = this.revealedIndices();\n\n if (seq && dir === 'forward') {\n if (revealed.size < charCount(txt)) {\n const nextIdx = this.nextSequentialIndex(revealed, charCount(txt));\n const next = new Set(revealed);\n next.add(nextIdx);\n this.revealedIndices.set(next);\n this.displayText.set(this.shuffle(txt, next));\n } else {\n this.stopInterval();\n this.isDecrypted.set(true);\n this.displayText.set(txt);\n }\n return;\n }\n\n if (seq && dir === 'reverse') {\n if (this.reversePointer < this.reverseOrder.length) {\n const idx = this.reverseOrder[this.reversePointer++];\n const next = new Set(revealed);\n next.delete(idx);\n this.revealedIndices.set(next);\n this.displayText.set(this.shuffle(txt, next));\n if (next.size === 0) {\n this.stopInterval();\n this.isDecrypted.set(false);\n }\n } else {\n this.stopInterval();\n this.isDecrypted.set(false);\n }\n return;\n }\n\n if (!seq && dir === 'forward') {\n this.displayText.set(this.shuffle(txt, revealed));\n this.iterationCount++;\n if (this.iterationCount >= max) {\n this.stopInterval();\n this.displayText.set(txt);\n this.isDecrypted.set(true);\n }\n return;\n }\n\n if (!seq && dir === 'reverse') {\n let current = revealed;\n if (current.size === 0) current = fillAllIndices(charCount(txt));\n const removeCount = Math.max(1, Math.ceil(charCount(txt) / Math.max(1, max)));\n const next = removeRandomIndices(current, removeCount);\n this.revealedIndices.set(next);\n this.displayText.set(this.shuffle(txt, next));\n this.iterationCount++;\n if (next.size === 0 || this.iterationCount >= max) {\n this.stopInterval();\n this.isDecrypted.set(false);\n this.displayText.set(this.shuffle(txt, new Set()));\n this.revealedIndices.set(new Set());\n }\n }\n }\n\n private nextSequentialIndex(revealed: ReadonlySet<number>, len: number): number {\n switch (this.revealDirection()) {\n case 'end':\n return len - 1 - revealed.size;\n case 'center': {\n const middle = Math.floor(len / 2);\n const offset = Math.floor(revealed.size / 2);\n const candidate = revealed.size % 2 === 0 ? middle + offset : middle - offset - 1;\n if (candidate >= 0 && candidate < len && !revealed.has(candidate)) return candidate;\n for (let i = 0; i < len; i++) if (!revealed.has(i)) return i;\n return 0;\n }\n case 'start':\n default:\n return revealed.size;\n }\n }\n\n private shuffle(txt: string, revealed: ReadonlySet<number>): string {\n // Every index here counts CODE POINTS, because that is what `[...txt]`\n // produces and what `revealed` was built against. `split('')` counts UTF-16\n // units instead, so an emoji in the text (or in a custom alphabet) put half a\n // surrogate pair in the pool; and reading the revealed character back as\n // `txt[i]` mixed the two index spaces, so every character after the first\n // astral one revealed as the WRONG one.\n const pool = this.useOriginalCharsOnly()\n ? Array.from(new Set([...txt])).filter(ch => ch !== ' ')\n : [...this.characters()];\n if (pool.length === 0) return txt;\n return [...txt]\n .map((ch, i) => {\n if (ch === ' ') return ' ';\n if (revealed.has(i)) return ch;\n return pool[Math.floor(Math.random() * pool.length)];\n })\n .join('');\n }\n}\n\nexport type { WrDecryptTextAnimateOn, WrDecryptTextRevealDirection, WrDecryptTextClickMode } from './interfaces';\n","<span class=\"wr-decrypt-text__sr-only\">{{ text() }}</span>\n<span aria-hidden=\"true\">\n @for (c of chars(); track $index) {\n <span [class]=\"c.revealed ? 'wr-decrypt-text__char' : 'wr-decrypt-text__char wr-decrypt-text__char--encrypted'\">{{\n c.ch\n }}</span>\n }\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;AAWG;AAuBH,MAAM,aAAa,GAAG,kEAAkE;AAExF,SAAS,YAAY,CAAC,GAAW,EAAE,GAAiC,EAAA;IAClE,MAAM,KAAK,GAAa,EAAE;IAC1B,IAAI,GAAG,IAAI,CAAC;AAAE,QAAA,OAAO,KAAK;AAC1B,IAAA,IAAI,GAAG,KAAK,OAAO,EAAE;QACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3C,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,GAAG,KAAK,KAAK,EAAE;AACjB,QAAA,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAChD,QAAA,OAAO,KAAK;IACd;IACA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;IAClC,IAAI,GAAG,GAAG,CAAC;AACX,IAAA,OAAO,KAAK,CAAC,MAAM,GAAG,GAAG,EAAE;AACzB,QAAA,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE;AACjB,YAAA,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,CAAC;AAC5B,YAAA,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG;AAAE,gBAAA,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;QAC5C;aAAO;AACL,YAAA,MAAM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;AEtHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-decrypt-text.mjs","sources":["../../../projects/lib/decrypt-text/decrypt-text.ts","../../../projects/lib/decrypt-text/decrypt-text.html","../../../projects/lib/decrypt-text/ngwr-decrypt-text.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 * Angular adaptation of the DecryptedText effect by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/text-animations/decrypted-text\n *\n * The reactbits version uses `motion/react` for the wrapper. This port\n * is dependency-free — vanilla signals + `setInterval` for the tick loop.\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\n\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\nimport type { WrDecryptTextAnimateOn, WrDecryptTextRevealDirection, WrDecryptTextClickMode } from './interfaces';\n\nconst DEFAULT_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+';\n\nfunction computeOrder(len: number, dir: WrDecryptTextRevealDirection): readonly number[] {\n const order: number[] = [];\n if (len <= 0) return order;\n if (dir === 'start') {\n for (let i = 0; i < len; i++) order.push(i);\n return order;\n }\n if (dir === 'end') {\n for (let i = len - 1; i >= 0; i--) order.push(i);\n return order;\n }\n const middle = Math.floor(len / 2);\n let off = 0;\n while (order.length < len) {\n if (off % 2 === 0) {\n const idx = middle + off / 2;\n if (idx >= 0 && idx < len) order.push(idx);\n } else {\n const idx = middle - Math.ceil(off / 2);\n if (idx >= 0 && idx < len) order.push(idx);\n }\n off++;\n }\n return order.slice(0, len);\n}\n\n/**\n * How many characters the animation walks — CODE POINTS, not UTF-16 units.\n *\n * Every index in this component (`revealedIndices`, the sequential order, the\n * per-character render) counts the same way `[...txt]` does. Using `txt.length`\n * for the total counted an emoji twice, so a sequential reveal spent extra ticks\n * on indices past the end of the text and the \"everything revealed\" test never\n * lined up with what was on screen.\n */\nfunction charCount(txt: string): number {\n return [...txt].length;\n}\n\nfunction fillAllIndices(len: number): Set<number> {\n const s = new Set<number>();\n for (let i = 0; i < len; i++) s.add(i);\n return s;\n}\n\nfunction removeRandomIndices(set: ReadonlySet<number>, count: number): Set<number> {\n const arr = Array.from(set);\n for (let i = 0; i < count && arr.length > 0; i++) {\n arr.splice(Math.floor(Math.random() * arr.length), 1);\n }\n return new Set(arr);\n}\n\n/**\n * Reveals a string by scrambling characters and progressively replacing\n * scramble glyphs with the originals. Supports sequential reveal in\n * three directions, or non-sequential \"settle\" after N iterations, and\n * four trigger modes (hover, click, view, in-view + hover).\n *\n * @example\n * ```html\n * <wr-decrypt-text text=\"Hello, ngwr!\" animateOn=\"hover\" />\n * <wr-decrypt-text\n * text=\"Reveal from the center\"\n * [sequential]=\"true\"\n * revealDirection=\"center\"\n * animateOn=\"view\"\n * />\n * ```\n *\n * @see https://www.reactbits.dev/text-animations/decrypted-text\n */\n@Component({\n selector: 'wr-decrypt-text',\n templateUrl: './decrypt-text.html',\n styleUrl: './decrypt-text.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-decrypt-text',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave()',\n '(click)': 'onClick()',\n },\n})\nexport class WrDecryptText {\n /** Text to reveal. Required. */\n readonly text = input.required<string>();\n\n /** Tick interval in ms. @default 50 */\n readonly speed = input(50, { transform: numAttr(50) });\n\n /** Non-sequential mode only — total scramble ticks before snapping to plain. @default 10 */\n readonly maxIterations = input(10, { transform: numAttr(10) });\n\n /** Reveal one char per tick instead of scrambling all of them. @default false */\n readonly sequential = input(false, { transform: coerceBooleanProperty });\n\n /** Order in which chars are revealed in sequential mode. @default 'start' */\n readonly revealDirection = input<WrDecryptTextRevealDirection>('start');\n\n /** Scramble using only the glyphs present in `text` (minus spaces). @default false */\n readonly useOriginalCharsOnly = input(false, { transform: coerceBooleanProperty });\n\n /** Pool of glyphs to scramble through (used when `useOriginalCharsOnly` is false). */\n readonly characters = input(DEFAULT_CHARS);\n\n /** When to start the animation. @default 'hover' */\n readonly animateOn = input<WrDecryptTextAnimateOn>('hover');\n\n /** Click behaviour. `'once'` decrypts then stops; `'toggle'` flips state on each click. @default 'once' */\n readonly clickMode = input<WrDecryptTextClickMode>('once');\n\n private readonly displayText = signal('');\n private readonly revealedIndices = signal<ReadonlySet<number>>(new Set());\n private readonly isAnimating = signal(false);\n private readonly isDecrypted = signal(true);\n private readonly direction = signal<'forward' | 'reverse'>('forward');\n\n /** Per-char render data. */\n protected readonly chars = computed(() => {\n const display = this.displayText();\n const revealed = this.revealedIndices();\n const decrypted = this.isDecrypted();\n const animating = this.isAnimating();\n return [...display].map((ch, i) => ({\n ch,\n revealed: revealed.has(i) || (!animating && decrypted),\n }));\n });\n\n /** Sequential reverse order — captured when reverse starts. */\n private reverseOrder: readonly number[] = [];\n private reversePointer = 0;\n private iterationCount = 0;\n private intervalId: ReturnType<typeof setInterval> | undefined;\n private hasAnimatedOnce = false;\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly platform = inject(WrPlatform);\n\n constructor() {\n if (!this.isBrowser) {\n // SSR: render plain text.\n effect(() => this.displayText.set(this.text()));\n return;\n }\n\n // Reset state whenever `text` or `animateOn` changes.\n effect(() => {\n const txt = this.text();\n const mode = this.animateOn();\n this.stopInterval();\n // The resting state of `click` mode is the scramble — but not for someone who\n // asked for less motion. `startInterval` short-circuits every TRIGGER to the\n // plain text, and this is the one path that never reaches it, so a reduced-\n // motion reader was left staring at permanently scrambled glyphs with no\n // pointer-free way to undo them.\n if (mode === 'click' && !this.platform.prefersReducedMotion()) {\n this.encryptInstantly(txt);\n } else {\n this.displayText.set(txt);\n this.isDecrypted.set(true);\n }\n this.revealedIndices.set(new Set());\n this.direction.set('forward');\n this.hasAnimatedOnce = false;\n });\n\n afterNextRender(() => {\n const mode = this.animateOn();\n if (mode === 'view' || mode === 'inViewHover') this.setupIntersectionObserver();\n });\n\n this.destroyRef.onDestroy(() => this.stopInterval());\n }\n\n // Trigger handlers\n\n protected onMouseEnter(): void {\n const mode = this.animateOn();\n if (mode !== 'hover' && mode !== 'inViewHover') return;\n this.triggerHoverDecrypt();\n }\n\n protected onMouseLeave(): void {\n const mode = this.animateOn();\n if (mode !== 'hover' && mode !== 'inViewHover') return;\n this.resetToPlain();\n }\n\n protected onClick(): void {\n if (this.animateOn() !== 'click') return;\n if (this.clickMode() === 'once') {\n if (this.isDecrypted()) return;\n this.direction.set('forward');\n this.triggerDecrypt();\n return;\n }\n if (this.isDecrypted()) this.triggerReverse();\n else {\n this.direction.set('forward');\n this.triggerDecrypt();\n }\n }\n\n // Internals\n\n private setupIntersectionObserver(): void {\n const io = new IntersectionObserver(\n (entries, obs) => {\n for (const e of entries) {\n if (e.isIntersecting && !this.hasAnimatedOnce) {\n obs.disconnect();\n this.hasAnimatedOnce = true;\n this.triggerDecrypt();\n break;\n }\n }\n },\n { threshold: 0.1, rootMargin: '0px' }\n );\n io.observe(this.host.nativeElement);\n this.destroyRef.onDestroy(() => io.disconnect());\n }\n\n private triggerHoverDecrypt(): void {\n if (this.isAnimating()) return;\n this.revealedIndices.set(new Set());\n this.isDecrypted.set(false);\n this.displayText.set(this.text());\n this.direction.set('forward');\n this.startInterval();\n }\n\n private resetToPlain(): void {\n this.stopInterval();\n this.revealedIndices.set(new Set());\n this.displayText.set(this.text());\n this.isDecrypted.set(true);\n this.direction.set('forward');\n }\n\n private triggerDecrypt(): void {\n if (this.sequential()) {\n this.revealedIndices.set(new Set());\n } else {\n this.revealedIndices.set(new Set());\n }\n this.direction.set('forward');\n this.startInterval();\n }\n\n private triggerReverse(): void {\n const txt = this.text();\n if (this.sequential()) {\n this.reverseOrder = computeOrder(charCount(txt), this.revealDirection()).slice().reverse();\n this.reversePointer = 0;\n }\n const all = fillAllIndices(charCount(txt));\n this.revealedIndices.set(all);\n this.displayText.set(this.shuffle(txt, all));\n this.direction.set('reverse');\n this.startInterval();\n }\n\n private encryptInstantly(txt: string): void {\n this.revealedIndices.set(new Set());\n this.displayText.set(this.shuffle(txt, new Set()));\n this.isDecrypted.set(false);\n }\n\n private startInterval(): void {\n // Reduced motion: every trigger funnels through here — skip the\n // scramble loop and jump straight to the plain, decrypted text.\n if (this.platform.prefersReducedMotion()) {\n this.resetToPlain();\n return;\n }\n\n this.stopInterval();\n this.isAnimating.set(true);\n this.iterationCount = 0;\n this.intervalId = setInterval(() => this.tick(), this.speed());\n }\n\n private stopInterval(): void {\n if (this.intervalId !== undefined) {\n clearInterval(this.intervalId);\n this.intervalId = undefined;\n }\n this.isAnimating.set(false);\n }\n\n private tick(): void {\n const txt = this.text();\n const seq = this.sequential();\n const dir = this.direction();\n const max = this.maxIterations();\n const revealed = this.revealedIndices();\n\n if (seq && dir === 'forward') {\n if (revealed.size < charCount(txt)) {\n const nextIdx = this.nextSequentialIndex(revealed, charCount(txt));\n const next = new Set(revealed);\n next.add(nextIdx);\n this.revealedIndices.set(next);\n this.displayText.set(this.shuffle(txt, next));\n } else {\n this.stopInterval();\n this.isDecrypted.set(true);\n this.displayText.set(txt);\n }\n return;\n }\n\n if (seq && dir === 'reverse') {\n if (this.reversePointer < this.reverseOrder.length) {\n const idx = this.reverseOrder[this.reversePointer++];\n const next = new Set(revealed);\n next.delete(idx);\n this.revealedIndices.set(next);\n this.displayText.set(this.shuffle(txt, next));\n if (next.size === 0) {\n this.stopInterval();\n this.isDecrypted.set(false);\n }\n } else {\n this.stopInterval();\n this.isDecrypted.set(false);\n }\n return;\n }\n\n if (!seq && dir === 'forward') {\n this.displayText.set(this.shuffle(txt, revealed));\n this.iterationCount++;\n if (this.iterationCount >= max) {\n this.stopInterval();\n this.displayText.set(txt);\n this.isDecrypted.set(true);\n }\n return;\n }\n\n if (!seq && dir === 'reverse') {\n let current = revealed;\n if (current.size === 0) current = fillAllIndices(charCount(txt));\n const removeCount = Math.max(1, Math.ceil(charCount(txt) / Math.max(1, max)));\n const next = removeRandomIndices(current, removeCount);\n this.revealedIndices.set(next);\n this.displayText.set(this.shuffle(txt, next));\n this.iterationCount++;\n if (next.size === 0 || this.iterationCount >= max) {\n this.stopInterval();\n this.isDecrypted.set(false);\n this.displayText.set(this.shuffle(txt, new Set()));\n this.revealedIndices.set(new Set());\n }\n }\n }\n\n private nextSequentialIndex(revealed: ReadonlySet<number>, len: number): number {\n switch (this.revealDirection()) {\n case 'end':\n return len - 1 - revealed.size;\n case 'center': {\n const middle = Math.floor(len / 2);\n const offset = Math.floor(revealed.size / 2);\n const candidate = revealed.size % 2 === 0 ? middle + offset : middle - offset - 1;\n if (candidate >= 0 && candidate < len && !revealed.has(candidate)) return candidate;\n for (let i = 0; i < len; i++) if (!revealed.has(i)) return i;\n return 0;\n }\n case 'start':\n default:\n return revealed.size;\n }\n }\n\n private shuffle(txt: string, revealed: ReadonlySet<number>): string {\n // Every index here counts CODE POINTS, because that is what `[...txt]`\n // produces and what `revealed` was built against. `split('')` counts UTF-16\n // units instead, so an emoji in the text (or in a custom alphabet) put half a\n // surrogate pair in the pool; and reading the revealed character back as\n // `txt[i]` mixed the two index spaces, so every character after the first\n // astral one revealed as the WRONG one.\n const pool = this.useOriginalCharsOnly()\n ? Array.from(new Set([...txt])).filter(ch => ch !== ' ')\n : [...this.characters()];\n if (pool.length === 0) return txt;\n return [...txt]\n .map((ch, i) => {\n if (ch === ' ') return ' ';\n if (revealed.has(i)) return ch;\n return pool[Math.floor(Math.random() * pool.length)];\n })\n .join('');\n }\n}\n\nexport type { WrDecryptTextAnimateOn, WrDecryptTextRevealDirection, WrDecryptTextClickMode } from './interfaces';\n","<span class=\"wr-decrypt-text__sr-only\">{{ text() }}</span>\n<span aria-hidden=\"true\">\n @for (c of chars(); track $index) {\n <span [class]=\"c.revealed ? 'wr-decrypt-text__char' : 'wr-decrypt-text__char wr-decrypt-text__char--encrypted'\">{{\n c.ch\n }}</span>\n }\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;AAWG;AAuBH,MAAM,aAAa,GAAG,kEAAkE;AAExF,SAAS,YAAY,CAAC,GAAW,EAAE,GAAiC,EAAA;IAClE,MAAM,KAAK,GAAa,EAAE;IAC1B,IAAI,GAAG,IAAI,CAAC;AAAE,QAAA,OAAO,KAAK;AAC1B,IAAA,IAAI,GAAG,KAAK,OAAO,EAAE;QACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3C,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,GAAG,KAAK,KAAK,EAAE;AACjB,QAAA,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AAAE,YAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAChD,QAAA,OAAO,KAAK;IACd;IACA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;IAClC,IAAI,GAAG,GAAG,CAAC;AACX,IAAA,OAAO,KAAK,CAAC,MAAM,GAAG,GAAG,EAAE;AACzB,QAAA,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE;AACjB,YAAA,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,CAAC;AAC5B,YAAA,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG;AAAE,gBAAA,KAAK,CAAC,IAAI,CAAC,GAAG,C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