ngwr 11.2.0 → 12.1.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 +85 -26
- package/burger/styles/_index.scss +1 -1
- package/button/styles/_index.scss +2 -2
- package/calendar/styles/_index.scss +32 -12
- package/calendar-heatmap/styles/_index.scss +20 -0
- package/carousel/styles/_index.scss +23 -1
- package/cascader/styles/_index.scss +15 -3
- package/checkbox/styles/_index.scss +2 -2
- package/collapse/styles/_index.scss +2 -2
- package/color-picker/styles/_index.scss +3 -3
- package/compare/styles/_index.scss +18 -2
- package/context-menu/styles/_index.scss +21 -2
- package/date-picker/styles/_index.scss +5 -5
- package/descriptions/styles/_index.scss +1 -1
- package/drag-drop/styles/_index.scss +28 -1
- package/drawer/styles/_index.scss +37 -0
- package/dropdown/styles/_index.scss +2 -2
- package/event-calendar/styles/_index.scss +67 -10
- package/fesm2022/ngwr-action-sheet.mjs +3 -3
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-aurora.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-bar-chart-testing.mjs +20 -2
- package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-blur-text.mjs +3 -3
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +4 -4
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +29 -17
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-heatmap.mjs +17 -5
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-testing.mjs +1 -1
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +187 -9
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +10 -10
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +124 -24
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +48 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-circular-text.mjs +4 -4
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +27 -7
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker-testing.mjs +26 -6
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +98 -8
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +14 -5
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-confetti.mjs +31 -6
- package/fesm2022/ngwr-confetti.mjs.map +1 -1
- package/fesm2022/ngwr-config.mjs +9 -0
- package/fesm2022/ngwr-config.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs +30 -11
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +333 -43
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +25 -9
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/{ngwr-date-adapter-fns.mjs → ngwr-date-adapters-fns.mjs} +37 -10
- package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -0
- package/fesm2022/{ngwr-date-adapter-luxon.mjs → ngwr-date-adapters-luxon.mjs} +5 -5
- package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -0
- package/fesm2022/ngwr-date-picker-testing.mjs +11 -6
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +119 -37
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/{ngwr-date-adapter.mjs → ngwr-date.mjs} +36 -10
- package/fesm2022/ngwr-date.mjs.map +1 -0
- package/fesm2022/ngwr-decrypt-text.mjs +3 -3
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +73 -18
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-divider.mjs +52 -5
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart-testing.mjs +8 -4
- package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart.mjs +7 -7
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +160 -11
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +121 -58
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +26 -10
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +28 -15
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text-testing.mjs +5 -3
- package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +75 -46
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +3 -3
- package/fesm2022/ngwr-form.mjs +32 -15
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +21 -11
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +3 -3
- package/fesm2022/ngwr-glitch-text-testing.mjs +51 -17
- package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +7 -7
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text-testing.mjs +46 -11
- package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +4 -4
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +24 -9
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +73 -1
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +55 -1
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +26 -15
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper-testing.mjs +53 -9
- package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -1
- package/fesm2022/ngwr-image-cropper.mjs +150 -12
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number-testing.mjs +15 -10
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +17 -10
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp-testing.mjs +12 -6
- package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +24 -5
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +4 -4
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +73 -26
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +7 -7
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +7 -7
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown.mjs +66 -8
- package/fesm2022/ngwr-markdown.mjs.map +1 -1
- package/fesm2022/ngwr-marquee.mjs +4 -4
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-mention.mjs +108 -13
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-meter-group-testing.mjs +26 -6
- package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group.mjs +3 -3
- package/fesm2022/ngwr-overlay.mjs +6 -6
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination-testing.mjs +6 -6
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +83 -16
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +39 -26
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +6 -6
- package/fesm2022/ngwr-popover-testing.mjs +7 -2
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +155 -33
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +42 -5
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +21 -30
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text.mjs +3 -3
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented-testing.mjs +85 -1
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +123 -10
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +159 -34
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +11 -9
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +31 -16
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +100 -9
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +3 -3
- package/fesm2022/ngwr-speed-dial-testing.mjs +15 -13
- package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +27 -12
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-split-text.mjs +17 -5
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-spotlight-card.mjs +7 -7
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +6 -6
- package/fesm2022/ngwr-star-border.mjs +4 -4
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper-testing.mjs +8 -8
- package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +33 -8
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +17 -5
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +99 -39
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +11 -10
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +36 -10
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +181 -4
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +7 -7
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +9 -9
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +34 -10
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +3 -3
- package/fesm2022/ngwr-tree.mjs +28 -10
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter-testing.mjs +15 -1
- package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +13 -5
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +5 -2
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +4 -4
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +4 -4
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +94 -24
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +2 -2
- package/glitch-text/styles/_index.scss +27 -12
- package/i18n/en.json +56 -6
- package/i18n/ru.json +56 -6
- package/image-cropper/styles/_index.scss +19 -0
- package/input/styles/_index.scss +2 -2
- package/input-number/styles/_index.scss +2 -2
- package/input-otp/styles/_index.scss +9 -2
- package/knob/styles/_index.scss +1 -1
- package/lightbox/styles/_index.scss +16 -2
- package/line-chart/styles/_index.scss +28 -14
- package/list/styles/_index.scss +1 -1
- package/llms-full.txt +19 -24
- package/llms.txt +46 -8
- package/markdown/styles/_index.scss +3 -3
- package/mcp/api.js +6 -4
- package/mcp/catalog.js +40 -3
- package/mcp/providers.js +16 -3
- package/mcp/tools.js +21 -1
- package/meter-group/styles/_index.scss +1 -1
- package/overlay/styles/_index.scss +33 -1
- package/package.json +17 -12
- package/pagination/styles/_index.scss +23 -1
- package/popover/styles/_index.scss +16 -7
- package/progress/styles/_index.scss +1 -1
- package/radio/styles/_index.scss +2 -2
- package/rating/styles/_index.scss +1 -1
- package/schematics/collection.json +1 -1
- package/schematics/migrations/v12/index.js +65 -0
- package/schematics/migrations/v7/index.js +12 -1
- package/schematics/migrations/v8/index.js +10 -1
- package/schematics/migrations.json +5 -0
- package/schematics/ng-add/index.js +8 -3
- package/schematics/provider/index.js +80 -13
- package/schematics/use/index.js +9 -129
- package/schematics/use/rule.js +206 -0
- package/schematics/use/symbol-map.json +4 -4
- package/segmented/styles/_index.scss +14 -3
- package/select/styles/_index.scss +14 -2
- package/sidebar/styles/_index.scss +12 -10
- package/skills/ngwr/SKILL.md +7 -5
- package/skills/ngwr/references/catalog.md +9 -9
- package/skills/ngwr/references/setup.md +10 -5
- package/slider/styles/_index.scss +1 -1
- package/speed-dial/styles/_index.scss +1 -1
- package/stepper/styles/_index.scss +12 -3
- package/switch/styles/_index.scss +2 -2
- package/table/styles/_index.scss +61 -12
- package/tabs/styles/_index.scss +1 -1
- package/textarea/styles/_index.scss +1 -1
- package/theme/styles/_colors.scss +142 -56
- package/theme/styles/_dark.scss +46 -3
- package/theme/styles/_focus.scss +28 -5
- package/theme/styles/_mixins.scss +1 -1
- package/theme/styles/_variables.scss +67 -0
- package/transfer/styles/_index.scss +26 -3
- package/tree/styles/_index.scss +29 -6
- package/types/ngwr-bar-chart-testing.d.ts +9 -1
- package/types/ngwr-blur-text.d.ts +8 -4
- package/types/ngwr-breadcrumbs.d.ts +17 -10
- package/types/ngwr-calendar-testing.d.ts +1 -1
- package/types/ngwr-calendar.d.ts +66 -0
- package/types/ngwr-carousel.d.ts +85 -6
- package/types/ngwr-cascader.d.ts +17 -0
- package/types/ngwr-click-spark.d.ts +4 -0
- package/types/ngwr-color-picker-testing.d.ts +8 -0
- package/types/ngwr-color-picker.d.ts +21 -1
- package/types/ngwr-confetti.d.ts +8 -0
- package/types/ngwr-config.d.ts +10 -1
- package/types/ngwr-context-menu-testing.d.ts +24 -11
- package/types/ngwr-context-menu.d.ts +56 -0
- package/types/ngwr-counter.d.ts +1 -0
- package/types/{ngwr-date-adapter-fns.d.ts → ngwr-date-adapters-fns.d.ts} +33 -6
- package/types/{ngwr-date-adapter-luxon.d.ts → ngwr-date-adapters-luxon.d.ts} +1 -1
- package/types/ngwr-date-picker-testing.d.ts +11 -6
- package/types/ngwr-date-picker.d.ts +8 -4
- package/types/{ngwr-date-adapter.d.ts → ngwr-date.d.ts} +24 -5
- package/types/ngwr-dialog.d.ts +38 -1
- package/types/ngwr-divider.d.ts +25 -0
- package/types/ngwr-donut-chart-testing.d.ts +7 -3
- package/types/ngwr-donut-chart.d.ts +3 -3
- package/types/ngwr-drag-drop.d.ts +56 -2
- package/types/ngwr-drawer.d.ts +56 -5
- package/types/ngwr-event-calendar.d.ts +8 -2
- package/types/ngwr-falling-text-testing.d.ts +5 -3
- package/types/ngwr-falling-text.d.ts +1 -1
- package/types/ngwr-form.d.ts +12 -2
- package/types/ngwr-glitch-text-testing.d.ts +37 -8
- package/types/ngwr-gradient-text-testing.d.ts +16 -3
- package/types/ngwr-i18n.d.ts +13 -4
- package/types/ngwr-image-cropper-testing.d.ts +49 -10
- package/types/ngwr-image-cropper.d.ts +70 -5
- package/types/ngwr-input-number-testing.d.ts +15 -10
- package/types/ngwr-input-number.d.ts +11 -4
- package/types/ngwr-input-otp-testing.d.ts +12 -6
- package/types/ngwr-input-otp.d.ts +15 -1
- package/types/ngwr-line-chart.d.ts +20 -3
- package/types/ngwr-markdown.d.ts +11 -0
- package/types/ngwr-mention.d.ts +32 -0
- package/types/ngwr-meter-group-testing.d.ts +12 -2
- package/types/ngwr-overlay.d.ts +1 -0
- package/types/ngwr-pagination-testing.d.ts +4 -4
- package/types/ngwr-pagination.d.ts +11 -0
- package/types/ngwr-pipes.d.ts +1 -1
- package/types/ngwr-popover-testing.d.ts +7 -2
- package/types/ngwr-popover.d.ts +1 -0
- package/types/ngwr-result.d.ts +6 -0
- package/types/ngwr-segmented-testing.d.ts +53 -0
- package/types/ngwr-segmented.d.ts +107 -5
- package/types/ngwr-select.d.ts +68 -6
- package/types/ngwr-shiny-text.d.ts +4 -2
- package/types/ngwr-sidebar.d.ts +14 -5
- package/types/ngwr-slider.d.ts +69 -1
- package/types/ngwr-speed-dial-testing.d.ts +15 -11
- package/types/ngwr-speed-dial.d.ts +22 -3
- package/types/ngwr-split-text.d.ts +9 -0
- package/types/ngwr-stepper-testing.d.ts +5 -5
- package/types/ngwr-stepper.d.ts +8 -0
- package/types/ngwr-storage.d.ts +1 -0
- package/types/ngwr-table.d.ts +104 -11
- package/types/ngwr-tabs-testing.d.ts +11 -10
- package/types/ngwr-tabs.d.ts +2 -0
- package/types/ngwr-theme.d.ts +82 -1
- package/types/ngwr-tour.d.ts +22 -4
- package/types/ngwr-tree.d.ts +5 -4
- package/types/ngwr-typewriter-testing.d.ts +10 -0
- package/types/ngwr-utils.d.ts +5 -2
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +39 -11
- package/typography/styles/_index.scss +1 -1
- package/window/styles/_index.scss +72 -26
- package/fesm2022/ngwr-date-adapter-fns.mjs.map +0 -1
- package/fesm2022/ngwr-date-adapter-luxon.mjs.map +0 -1
- package/fesm2022/ngwr-date-adapter.mjs.map +0 -1
package/types/ngwr-theme.d.ts
CHANGED
|
@@ -45,6 +45,87 @@ declare const WR_COLORS: readonly ["primary", "secondary", "success", "warning",
|
|
|
45
45
|
*/
|
|
46
46
|
type WrColor = (typeof WR_COLORS)[number];
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @license
|
|
50
|
+
*
|
|
51
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
52
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
53
|
+
*/
|
|
54
|
+
/**
|
|
55
|
+
* The palette recipe, in TypeScript.
|
|
56
|
+
*
|
|
57
|
+
* `theme/styles/_colors.scss` derives seven tokens per intent from one hex, and
|
|
58
|
+
* until now that arithmetic existed only in Sass — so a theme picked at RUNTIME
|
|
59
|
+
* (a builder, a tenant colour from an API, a preset fetched from a registry)
|
|
60
|
+
* could not reproduce it. The showcase had half of it copied by hand for its
|
|
61
|
+
* own primary-colour switcher, which is the copy that drifts.
|
|
62
|
+
*
|
|
63
|
+
* **Seven tokens, not twelve, and that is not an omission.** The tint and ink
|
|
64
|
+
* layer is written in terms of `var()`:
|
|
65
|
+
*
|
|
66
|
+
* ```css
|
|
67
|
+
* --wr-color-primary-soft: rgba(var(--wr-color-primary-rgb), 0.12);
|
|
68
|
+
* --wr-color-primary-ink: color-mix(in srgb, var(--wr-color-primary) 78%, var(--wr-color-dark));
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* so redefining the base and its channels re-resolves `-soft`, `-soft-border`,
|
|
72
|
+
* `-soft-contrast`, `-active` and `-ink` for free. A preset that also emitted
|
|
73
|
+
* those would be freezing values the stylesheet is meant to keep deriving.
|
|
74
|
+
*
|
|
75
|
+
* **`-contrast` IS re-derived, and must be.** It picks whichever of black and
|
|
76
|
+
* white scores higher against the fill, so a re-tuned intent keeps the label of
|
|
77
|
+
* the colour it replaced unless something recomputes it — that is how the dark
|
|
78
|
+
* theme once put white text on its lightened primary at 3.36:1.
|
|
79
|
+
*
|
|
80
|
+
* The LIGHT recipe only. `_dark.scss` is hand-tuned rather than derived — its
|
|
81
|
+
* `dark-light` uses `color.scale(…, 70%)` where the light block uses
|
|
82
|
+
* `color.adjust(…, 5%)`, and `light-light` goes -2.5% — so a generator claiming
|
|
83
|
+
* to reproduce it would be lying. Feed dark seeds through the same recipe if you
|
|
84
|
+
* want a derived dark theme; you will get a consistent one, not the shipped one.
|
|
85
|
+
*
|
|
86
|
+
* `pnpm check:theme` compiles nothing and trusts nothing: it reads the BUILT
|
|
87
|
+
* stylesheet and asserts this module reproduces every one of those tokens for
|
|
88
|
+
* the nine shipped intents.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* import { wrThemeTokens } from 'ngwr/theme';
|
|
93
|
+
*
|
|
94
|
+
* const tokens = wrThemeTokens({ primary: '#41598f' });
|
|
95
|
+
* for (const [name, value] of Object.entries(tokens)) {
|
|
96
|
+
* document.documentElement.style.setProperty(name, value);
|
|
97
|
+
* }
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The readable label ON a filled intent — whichever of black and white scores
|
|
103
|
+
* higher, the SCSS `_contrast()`.
|
|
104
|
+
*
|
|
105
|
+
* It PICKS, it does not blend, so those two values are the ceiling for every
|
|
106
|
+
* intent. The comparison is `>=`, so a colour exactly at the flip point
|
|
107
|
+
* (√21 ≈ 4.58 against both) takes the dark label, matching the SCSS.
|
|
108
|
+
*/
|
|
109
|
+
declare function wrContrastFor(hex: string): string;
|
|
110
|
+
/**
|
|
111
|
+
* The seven `--wr-color-<name>*` tokens one seed produces.
|
|
112
|
+
*
|
|
113
|
+
* Returns an empty record for a hex it cannot parse rather than a palette built
|
|
114
|
+
* on black — a silently black theme is harder to notice than a missing one.
|
|
115
|
+
*
|
|
116
|
+
* `name` is a shipped intent rather than any string: a token layer the
|
|
117
|
+
* stylesheet never declares has nothing reading it, and a typo would otherwise
|
|
118
|
+
* emit `--wr-color-primry-*` and paint nothing.
|
|
119
|
+
*/
|
|
120
|
+
declare function wrIntentTokens(name: WrColor, seed: string): Record<string, string>;
|
|
121
|
+
/**
|
|
122
|
+
* Every token a theme preset needs, for as many intents as it re-tunes.
|
|
123
|
+
*
|
|
124
|
+
* Intents left out keep the values the stylesheet compiled, so a preset that
|
|
125
|
+
* only moves `primary` writes seven declarations and nothing else.
|
|
126
|
+
*/
|
|
127
|
+
declare function wrThemeTokens(seeds: Partial<Record<WrColor, string>>): Record<string, string>;
|
|
128
|
+
|
|
48
129
|
/**
|
|
49
130
|
* @license
|
|
50
131
|
*
|
|
@@ -132,5 +213,5 @@ declare class WrTheme {
|
|
|
132
213
|
*/
|
|
133
214
|
declare function provideWrTheme(config?: Partial<WrThemeConfig>): EnvironmentProviders;
|
|
134
215
|
|
|
135
|
-
export { DEFAULT_WR_THEME_CONFIG, WR_COLORS, WR_THEME_CONFIG, WrTheme, provideWrTheme };
|
|
216
|
+
export { DEFAULT_WR_THEME_CONFIG, WR_COLORS, WR_THEME_CONFIG, WrTheme, provideWrTheme, wrContrastFor, wrIntentTokens, wrThemeTokens };
|
|
136
217
|
export type { WrColor, WrResolvedTheme, WrThemeConfig, WrThemeMode };
|
package/types/ngwr-tour.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ declare class WrTour {
|
|
|
74
74
|
/** The step being shown, or `null` when idle. */
|
|
75
75
|
readonly step: _angular_core.Signal<WrTourStep | null>;
|
|
76
76
|
private readonly noStepAfter;
|
|
77
|
+
private readonly noStepBefore;
|
|
77
78
|
/**
|
|
78
79
|
* Whether this is the last step the user will see. Not `index() === total() - 1`:
|
|
79
80
|
* a trailing step whose target is missing is skipped, so comparing against the
|
|
@@ -81,6 +82,14 @@ declare class WrTour {
|
|
|
81
82
|
* ending the tour when it was pressed.
|
|
82
83
|
*/
|
|
83
84
|
readonly isLast: _angular_core.Signal<boolean>;
|
|
85
|
+
/**
|
|
86
|
+
* Whether this is the first step the user will see. Not `index() === 0`, for the
|
|
87
|
+
* mirror of the reason above: a LEADING step whose target is missing is skipped,
|
|
88
|
+
* so the tour opens on a later index and the raw one put a Back button on the
|
|
89
|
+
* first card — one that did nothing at all, because `prev()` walks off the start
|
|
90
|
+
* and returns without moving.
|
|
91
|
+
*/
|
|
92
|
+
readonly isFirst: _angular_core.Signal<boolean>;
|
|
84
93
|
constructor();
|
|
85
94
|
/**
|
|
86
95
|
* Begin a tour. Restarts if one is already running. A no-op under SSR — a
|
|
@@ -102,6 +111,8 @@ declare class WrTour {
|
|
|
102
111
|
private goTo;
|
|
103
112
|
/** Whether the tour has a step past `index` that can actually be shown. */
|
|
104
113
|
private anyResolvableAfter;
|
|
114
|
+
/** Whether the tour has a step before `index` that can actually be shown. */
|
|
115
|
+
private anyResolvableBefore;
|
|
105
116
|
private resolve;
|
|
106
117
|
private openStep;
|
|
107
118
|
private placeSpotlight;
|
|
@@ -129,6 +140,13 @@ interface WrTourController {
|
|
|
129
140
|
* skipped and the raw count would call the final card "Next".
|
|
130
141
|
*/
|
|
131
142
|
readonly isLast: () => boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Whether this is the first step the user will actually see — the service looks
|
|
145
|
+
* BEHIND for a reachable one, for the mirror reason: a leading step whose target
|
|
146
|
+
* is missing gets skipped, so the tour opens on a later index and the raw one
|
|
147
|
+
* would put a Back button on the very first card.
|
|
148
|
+
*/
|
|
149
|
+
readonly isFirst: () => boolean;
|
|
132
150
|
next(): void;
|
|
133
151
|
prev(): void;
|
|
134
152
|
stop(): void;
|
|
@@ -141,10 +159,10 @@ interface WrTourController {
|
|
|
141
159
|
*/
|
|
142
160
|
declare class WrTourPopup {
|
|
143
161
|
protected readonly tour: WrTourController;
|
|
144
|
-
protected readonly nextLabel: string
|
|
145
|
-
protected readonly backLabel: string
|
|
146
|
-
protected readonly doneLabel: string
|
|
147
|
-
protected readonly skipLabel: string
|
|
162
|
+
protected readonly nextLabel: _angular_core.Signal<string>;
|
|
163
|
+
protected readonly backLabel: _angular_core.Signal<string>;
|
|
164
|
+
protected readonly doneLabel: _angular_core.Signal<string>;
|
|
165
|
+
protected readonly skipLabel: _angular_core.Signal<string>;
|
|
148
166
|
/** `Step {{current}} of {{total}}` — also the dialog's accessible name. */
|
|
149
167
|
protected readonly progress: (params?: ngwr_i18n.WrI18nParams) => string;
|
|
150
168
|
protected readonly isLast: _angular_core.Signal<boolean>;
|
package/types/ngwr-tree.d.ts
CHANGED
|
@@ -158,6 +158,7 @@ declare class WrTree<TId = string> implements FormValueControl<unknown> {
|
|
|
158
158
|
private readonly scrollStrategies;
|
|
159
159
|
private readonly destroyRef;
|
|
160
160
|
private readonly platformId;
|
|
161
|
+
private readonly injector;
|
|
161
162
|
/**
|
|
162
163
|
* Ambient reading direction. Optional so a bare `TestBed` — or a consumer who
|
|
163
164
|
* never set a direction — needs no provider; `Directionality` is root-provided
|
|
@@ -179,10 +180,10 @@ declare class WrTree<TId = string> implements FormValueControl<unknown> {
|
|
|
179
180
|
* `flat[i]` is undefined.
|
|
180
181
|
*/
|
|
181
182
|
protected readonly cursorIndex: _angular_core.Signal<number>;
|
|
182
|
-
/** Resolved ARIA labels —
|
|
183
|
-
protected readonly clearLabel: string
|
|
184
|
-
protected readonly expandLabel: string
|
|
185
|
-
protected readonly collapseLabel: string
|
|
183
|
+
/** Resolved ARIA labels — signals, so they follow both a late catalog and a locale switch. */
|
|
184
|
+
protected readonly clearLabel: _angular_core.Signal<string>;
|
|
185
|
+
protected readonly expandLabel: _angular_core.Signal<string>;
|
|
186
|
+
protected readonly collapseLabel: _angular_core.Signal<string>;
|
|
186
187
|
protected readonly chipRemoveLabel: (params?: ngwr_i18n.WrI18nParams) => string;
|
|
187
188
|
/** Flattened list of currently visible nodes — what the template renders. */
|
|
188
189
|
protected readonly flat: _angular_core.Signal<readonly FlatNode<TId>[]>;
|
|
@@ -108,6 +108,16 @@ declare class WrTypewriterHarness extends ComponentHarness {
|
|
|
108
108
|
static with(options?: WrTypewriterHarnessFilters): HarnessPredicate<WrTypewriterHarness>;
|
|
109
109
|
private readonly content;
|
|
110
110
|
private readonly cursor;
|
|
111
|
+
/**
|
|
112
|
+
* One custom property off the host's `style` ATTRIBUTE.
|
|
113
|
+
*
|
|
114
|
+
* Not `getCssValue()`, which is `getComputedStyle`: with the entry point's own
|
|
115
|
+
* stylesheet loaded that resolves the sheet's declaration, so the method
|
|
116
|
+
* answers plausibly at exactly the moment the host binding — the thing under
|
|
117
|
+
* test — is what broke. The sibling reader below already says this; the
|
|
118
|
+
* blink duration was reading the computed value anyway.
|
|
119
|
+
*/
|
|
120
|
+
private inlineVar;
|
|
111
121
|
/**
|
|
112
122
|
* What has been typed so far — a FRAGMENT while the machine is running.
|
|
113
123
|
*
|
package/types/ngwr-utils.d.ts
CHANGED
|
@@ -381,8 +381,11 @@ declare function throttle<TArgs extends readonly unknown[]>(fn: (...args: TArgs)
|
|
|
381
381
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
382
382
|
*/
|
|
383
383
|
/**
|
|
384
|
-
* Canonical `KeyboardEvent.key` values
|
|
385
|
-
*
|
|
384
|
+
* Canonical `KeyboardEvent.key` values for your own `keydown` handlers.
|
|
385
|
+
*
|
|
386
|
+
* The spec spellings are easy to get wrong — arrows are `ArrowUp`, space is a
|
|
387
|
+
* literal `' '` — and a typo like `'Esacpe'` never matches and never errors.
|
|
388
|
+
* These give you autocomplete and the {@link WrKey} union to match against.
|
|
386
389
|
*/
|
|
387
390
|
declare const KEYS: {
|
|
388
391
|
readonly ENTER: "Enter";
|
package/types/ngwr-version.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { InjectionToken } from '@angular/core';
|
|
|
16
16
|
* Distinct from `Version` exported by `@angular/core`, which reports the
|
|
17
17
|
* loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.
|
|
18
18
|
*/
|
|
19
|
-
declare const NGWR_VERSION = "
|
|
19
|
+
declare const NGWR_VERSION = "12.1.0";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* @license
|
package/types/ngwr-window.d.ts
CHANGED
|
@@ -166,6 +166,31 @@ interface WrWindowConfig<D = unknown> {
|
|
|
166
166
|
*/
|
|
167
167
|
type WrWindowState = 'normal' | 'minimized' | 'maximized';
|
|
168
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @license
|
|
171
|
+
*
|
|
172
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
173
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* One window as `WrWindowManager.saveLayout()` recorded it — the geometry the
|
|
178
|
+
* window really had, not the geometry it happens to be showing while maximized
|
|
179
|
+
* or minimized.
|
|
180
|
+
*
|
|
181
|
+
* Public because `readLayout()` returns an array of these; a consumer that
|
|
182
|
+
* stores or forwards that result has to be able to name the element type.
|
|
183
|
+
*/
|
|
184
|
+
interface WrWindowLayoutSnapshot {
|
|
185
|
+
readonly id: string;
|
|
186
|
+
readonly state: WrWindowState;
|
|
187
|
+
readonly x: number;
|
|
188
|
+
readonly y: number;
|
|
189
|
+
readonly width: number;
|
|
190
|
+
readonly height: number;
|
|
191
|
+
readonly title: string;
|
|
192
|
+
}
|
|
193
|
+
|
|
169
194
|
/** Hook signature for `WrWindowRef.beforeClose()`. Return falsy to veto. */
|
|
170
195
|
type WrWindowBeforeCloseHook<R> = (result: R | undefined) => boolean | Promise<boolean>;
|
|
171
196
|
|
|
@@ -272,6 +297,7 @@ declare class WrWindowRef<C, R = unknown> {
|
|
|
272
297
|
constructor(id: string, _overlayRef: OverlayRef);
|
|
273
298
|
/** Resolved instance of the projected component. */
|
|
274
299
|
get componentInstance(): C;
|
|
300
|
+
private isClosed;
|
|
275
301
|
/**
|
|
276
302
|
* Close the window, optionally returning a result. If a `beforeClose`
|
|
277
303
|
* hook is registered it is consulted first — a falsy resolution
|
|
@@ -315,15 +341,6 @@ declare const WR_WINDOW_REF: InjectionToken<WrWindowRef<unknown, unknown>>;
|
|
|
315
341
|
/** Resolves to the `data` passed in `WrWindowConfig.data`. */
|
|
316
342
|
declare const WR_WINDOW_DATA: InjectionToken<unknown>;
|
|
317
343
|
|
|
318
|
-
interface RestoreSnapshot {
|
|
319
|
-
readonly id: string;
|
|
320
|
-
readonly state: WrWindowState;
|
|
321
|
-
readonly x: number;
|
|
322
|
-
readonly y: number;
|
|
323
|
-
readonly width: number;
|
|
324
|
-
readonly height: number;
|
|
325
|
-
readonly title: string;
|
|
326
|
-
}
|
|
327
344
|
/**
|
|
328
345
|
* Owns the open `<wr-window>` stack, hands out z-indexes, cascades the
|
|
329
346
|
* default spawn position, and opens programmatic windows that wrap a
|
|
@@ -388,6 +405,17 @@ declare class WrWindowManager {
|
|
|
388
405
|
* "Settings" menu item that should always re-focus the same window).
|
|
389
406
|
*/
|
|
390
407
|
open<C, R = unknown, D = unknown>(component: ComponentType<C>, config?: WrWindowConfig<D>): WrWindowRef<C, R>;
|
|
408
|
+
/**
|
|
409
|
+
* Whether a keyboard event routed to `ref`'s overlay is actually meant for it.
|
|
410
|
+
*
|
|
411
|
+
* The window holding real DOM focus owns the key. When focus is outside every
|
|
412
|
+
* window — the common case, since a window is not modal and traps nothing —
|
|
413
|
+
* the FRONT-most one does, by the manager's own z stack rather than by attach
|
|
414
|
+
* order. A tie (nothing has ever been focused, so no z has been handed out
|
|
415
|
+
* yet) leaves every window willing, and the dispatcher's newest-first walk
|
|
416
|
+
* settles it as before.
|
|
417
|
+
*/
|
|
418
|
+
private ownsKeyboard;
|
|
391
419
|
/** Close every programmatically-opened window. */
|
|
392
420
|
closeAll(): void;
|
|
393
421
|
/** Look up an open window by its `config.id`. Returns `null` when no match. */
|
|
@@ -406,7 +434,7 @@ declare class WrWindowManager {
|
|
|
406
434
|
*/
|
|
407
435
|
saveLayout(name: string): void;
|
|
408
436
|
/** Read a saved workspace. Returns `null` when no snapshot is found. */
|
|
409
|
-
readLayout(name: string): readonly
|
|
437
|
+
readLayout(name: string): readonly WrWindowLayoutSnapshot[] | null;
|
|
410
438
|
/**
|
|
411
439
|
* Apply a saved workspace.
|
|
412
440
|
*
|
|
@@ -472,4 +500,4 @@ declare class WrWindowTaskbar {
|
|
|
472
500
|
}
|
|
473
501
|
|
|
474
502
|
export { WR_WINDOW_DATA, WR_WINDOW_REF, WrWindowManager, WrWindowRef, WrWindowTaskbar };
|
|
475
|
-
export type { WrWindowBeforeCloseHook, WrWindowChromeSize, WrWindowConfig, WrWindowOs, WrWindowPersistMode, WrWindowSize, WrWindowSnap, WrWindowState, WrWindowStorageConfig };
|
|
503
|
+
export type { WrWindowBeforeCloseHook, WrWindowChromeSize, WrWindowConfig, WrWindowLayoutSnapshot, WrWindowOs, WrWindowPersistMode, WrWindowSize, WrWindowSnap, WrWindowState, WrWindowStorageConfig };
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
@use '../../theme/styles' as theme;
|
|
2
2
|
|
|
3
|
+
/// Two-corner variant of `theme.smooth-br`. The host no longer clips at its own
|
|
4
|
+
/// rounded edge (it has to let the resize grips out), so the chrome and the
|
|
5
|
+
/// status bar each have to round the pair of corners they sit in or their square
|
|
6
|
+
/// backgrounds paint over the frame's curve. Neither rounds all four, which is
|
|
7
|
+
/// what the shared mixin does — hence the local copy of its squircle arithmetic.
|
|
8
|
+
@mixin _corner-pair($start, $end, $br) {
|
|
9
|
+
#{$start}: $br;
|
|
10
|
+
#{$end}: $br;
|
|
11
|
+
|
|
12
|
+
@supports (corner-shape: squircle) {
|
|
13
|
+
corner-shape: squircle;
|
|
14
|
+
#{$start}: calc(#{$br} * 1.85);
|
|
15
|
+
#{$end}: calc(#{$br} * 1.85);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
3
19
|
.wr-window {
|
|
4
20
|
--wr-window-bg: var(--wr-color-surface);
|
|
5
21
|
--wr-window-border: var(--wr-color-outline);
|
|
@@ -7,6 +23,7 @@
|
|
|
7
23
|
--wr-window-chrome-color: var(--wr-color-on-surface);
|
|
8
24
|
--wr-window-radius: var(--wr-border-radius-base);
|
|
9
25
|
--wr-window-handle-size: 8px;
|
|
26
|
+
--wr-window-handle-corner: 14px;
|
|
10
27
|
--wr-window-chrome-height: 2.25rem;
|
|
11
28
|
--wr-window-title-size: var(--wr-text-sm);
|
|
12
29
|
--wr-window-action-size: 1.5rem;
|
|
@@ -21,7 +38,13 @@
|
|
|
21
38
|
box-shadow: var(--wr-shadow-modal);
|
|
22
39
|
font-family: var(--wr-font-family-base);
|
|
23
40
|
color: var(--wr-color-on-surface);
|
|
24
|
-
|
|
41
|
+
// The resize grips live entirely OUTSIDE the padding box (see `&__handle`),
|
|
42
|
+
// and `overflow: hidden` clipped every pixel of them — including hit-testing,
|
|
43
|
+
// which is why they only ever worked where they overlapped the window's own
|
|
44
|
+
// chrome and body. `clip` still contains overflowing chrome / status-bar
|
|
45
|
+
// content; it just draws the line at the grips' reach instead of at zero.
|
|
46
|
+
overflow: clip;
|
|
47
|
+
overflow-clip-margin: var(--wr-window-handle-corner);
|
|
25
48
|
user-select: none;
|
|
26
49
|
// Enter animation — popover-style fade + scale-up. Disabled by
|
|
27
50
|
// .wr-window--no-anim and prefers-reduced-motion below.
|
|
@@ -38,8 +61,10 @@
|
|
|
38
61
|
display: none;
|
|
39
62
|
}
|
|
40
63
|
|
|
64
|
+
// Squares the host AND the two bars that now round their own corners
|
|
65
|
+
// (see `&__chrome` / `&__status-bar`) — one variable instead of three rules.
|
|
41
66
|
&--maximized {
|
|
42
|
-
|
|
67
|
+
--wr-window-radius: 0px;
|
|
43
68
|
}
|
|
44
69
|
|
|
45
70
|
// Compact title bar — useful for utility / docked panels where every
|
|
@@ -74,6 +99,7 @@
|
|
|
74
99
|
color: var(--wr-window-chrome-color);
|
|
75
100
|
cursor: grab;
|
|
76
101
|
border-bottom: 1px solid var(--wr-window-border);
|
|
102
|
+
@include _corner-pair(border-start-start-radius, border-start-end-radius, var(--wr-window-radius));
|
|
77
103
|
touch-action: none;
|
|
78
104
|
|
|
79
105
|
&:active {
|
|
@@ -130,7 +156,7 @@
|
|
|
130
156
|
|
|
131
157
|
&:hover {
|
|
132
158
|
color: var(--wr-color-on-surface);
|
|
133
|
-
background:
|
|
159
|
+
background: var(--wr-color-fill-strong);
|
|
134
160
|
}
|
|
135
161
|
|
|
136
162
|
&--close:hover {
|
|
@@ -229,7 +255,8 @@
|
|
|
229
255
|
gap: 0.5rem;
|
|
230
256
|
padding: 0.25rem 0.75rem;
|
|
231
257
|
border-top: 1px solid var(--wr-window-border);
|
|
232
|
-
background:
|
|
258
|
+
background: var(--wr-color-fill);
|
|
259
|
+
@include _corner-pair(border-end-start-radius, border-end-end-radius, var(--wr-window-radius));
|
|
233
260
|
font-size: var(--wr-text-xs);
|
|
234
261
|
color: var(--wr-color-on-surface-muted);
|
|
235
262
|
|
|
@@ -242,19 +269,35 @@
|
|
|
242
269
|
display: none;
|
|
243
270
|
}
|
|
244
271
|
|
|
245
|
-
// Resize handles (only rendered in normal state)
|
|
272
|
+
// Resize handles (only rendered in normal state).
|
|
273
|
+
//
|
|
274
|
+
// Every grip sits ENTIRELY OUTSIDE the padding box — the band the drop shadow
|
|
275
|
+
// already occupies, and where a native window manager puts its own invisible
|
|
276
|
+
// resize border. They used to straddle the frame (inset `-2px`, 8px deep, 14px
|
|
277
|
+
// at the corners), which put 6px of every edge grip and 12px of every corner
|
|
278
|
+
// grip ON TOP of the window's own controls: a press 3px inside the close
|
|
279
|
+
// button started a top-right RESIZE instead of closing the window (20.6% of
|
|
280
|
+
// that button was grip), and 28% of a button at the bottom of the body was
|
|
281
|
+
// dead. The outward 2px never worked at all — `overflow: hidden` clipped it —
|
|
282
|
+
// so the whole grab area was carved out of the window's own chrome and body.
|
|
283
|
+
//
|
|
284
|
+
// `100%` rather than a negative length: it pins the grip's INNER edge to the
|
|
285
|
+
// padding box edge whatever `--wr-window-handle-size` is, so the two can't
|
|
286
|
+
// drift apart into an overlap again. The trade is that a window flush against
|
|
287
|
+
// the top of the viewport has its top grip off-screen; every other edge, and
|
|
288
|
+
// moving the window, still work.
|
|
246
289
|
&__handle {
|
|
247
290
|
position: absolute;
|
|
248
291
|
z-index: 1;
|
|
249
292
|
|
|
250
293
|
&--t {
|
|
251
|
-
|
|
294
|
+
bottom: 100%;
|
|
252
295
|
inset-inline: 0;
|
|
253
296
|
height: var(--wr-window-handle-size);
|
|
254
297
|
cursor: ns-resize;
|
|
255
298
|
}
|
|
256
299
|
&--b {
|
|
257
|
-
|
|
300
|
+
top: 100%;
|
|
258
301
|
inset-inline: 0;
|
|
259
302
|
height: var(--wr-window-handle-size);
|
|
260
303
|
cursor: ns-resize;
|
|
@@ -269,7 +312,7 @@
|
|
|
269
312
|
top: 0;
|
|
270
313
|
bottom: 0;
|
|
271
314
|
// rtl-ok: west grip — paired with the physical `left` the resize math writes
|
|
272
|
-
|
|
315
|
+
right: 100%;
|
|
273
316
|
width: var(--wr-window-handle-size);
|
|
274
317
|
cursor: ew-resize;
|
|
275
318
|
}
|
|
@@ -277,41 +320,44 @@
|
|
|
277
320
|
top: 0;
|
|
278
321
|
bottom: 0;
|
|
279
322
|
// rtl-ok: east grip — paired with the physical `left` + width the resize math writes
|
|
280
|
-
|
|
323
|
+
left: 100%;
|
|
281
324
|
width: var(--wr-window-handle-size);
|
|
282
325
|
cursor: ew-resize;
|
|
283
326
|
}
|
|
284
327
|
|
|
328
|
+
// The corners take the outward diagonal square, clear of both edge bands —
|
|
329
|
+
// an L would need two elements, and the edge grip beside it already answers
|
|
330
|
+
// for the one axis it drops.
|
|
285
331
|
&--tl {
|
|
286
|
-
|
|
332
|
+
bottom: 100%;
|
|
287
333
|
// rtl-ok: north-west grip — `nwse-resize` names a screen diagonal
|
|
288
|
-
|
|
289
|
-
width:
|
|
290
|
-
height:
|
|
334
|
+
right: 100%;
|
|
335
|
+
width: var(--wr-window-handle-corner);
|
|
336
|
+
height: var(--wr-window-handle-corner);
|
|
291
337
|
cursor: nwse-resize;
|
|
292
338
|
}
|
|
293
339
|
&--tr {
|
|
294
|
-
|
|
340
|
+
bottom: 100%;
|
|
295
341
|
// rtl-ok: north-east grip — `nesw-resize` names a screen diagonal
|
|
296
|
-
|
|
297
|
-
width:
|
|
298
|
-
height:
|
|
342
|
+
left: 100%;
|
|
343
|
+
width: var(--wr-window-handle-corner);
|
|
344
|
+
height: var(--wr-window-handle-corner);
|
|
299
345
|
cursor: nesw-resize;
|
|
300
346
|
}
|
|
301
347
|
&--bl {
|
|
302
|
-
|
|
348
|
+
top: 100%;
|
|
303
349
|
// rtl-ok: south-west grip — `nesw-resize` names a screen diagonal
|
|
304
|
-
|
|
305
|
-
width:
|
|
306
|
-
height:
|
|
350
|
+
right: 100%;
|
|
351
|
+
width: var(--wr-window-handle-corner);
|
|
352
|
+
height: var(--wr-window-handle-corner);
|
|
307
353
|
cursor: nesw-resize;
|
|
308
354
|
}
|
|
309
355
|
&--br {
|
|
310
|
-
|
|
356
|
+
top: 100%;
|
|
311
357
|
// rtl-ok: south-east grip — `nwse-resize` names a screen diagonal
|
|
312
|
-
|
|
313
|
-
width:
|
|
314
|
-
height:
|
|
358
|
+
left: 100%;
|
|
359
|
+
width: var(--wr-window-handle-corner);
|
|
360
|
+
height: var(--wr-window-handle-corner);
|
|
315
361
|
cursor: nwse-resize;
|
|
316
362
|
}
|
|
317
363
|
}
|
|
@@ -403,7 +449,7 @@
|
|
|
403
449
|
transition: background var(--wr-transition-base);
|
|
404
450
|
|
|
405
451
|
&:hover {
|
|
406
|
-
background:
|
|
452
|
+
background: var(--wr-color-fill-strong);
|
|
407
453
|
}
|
|
408
454
|
}
|
|
409
455
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-date-adapter-fns.mjs","sources":["../../../projects/lib/date-adapter-fns/wr-date-fns-adapter.ts","../../../projects/lib/date-adapter-fns/provide-wr-date-fns-adapter.ts","../../../projects/lib/date-adapter-fns/ngwr-date-adapter-fns.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 { Service, inject } from '@angular/core';\n\nimport {\n addDays as dfAddDays,\n addMonths as dfAddMonths,\n addYears as dfAddYears,\n compareAsc,\n format as dfFormat,\n getDate,\n getDay,\n getDaysInMonth,\n getHours,\n getMinutes,\n getMonth,\n getSeconds,\n getYear,\n isSameDay,\n isSameMonth,\n isValid,\n parse as dfParse,\n set as dfSet,\n startOfDay,\n} from 'date-fns';\nimport { WrDateAdapter, WR_DATE_LOCALE, type WrDateFormat, isNamedFormat } from 'ngwr/date-adapter';\n\nconst NAMED_PATTERNS: Readonly<Record<WrDateFormat, string>> = {\n shortDate: 'P',\n mediumDate: 'PP',\n longDate: 'PPP',\n time: 'p',\n shortDateTime: 'P p',\n mediumDateTime: 'PP p',\n};\n\n/**\n * {@link WrDateAdapter} backed by `date-fns`. Same `Date` value type as the\n * native adapter, but defers all math, formatting, and parsing to date-fns\n * — pick this when you want more robust locale-aware patterns (`P`, `PP`,\n * `PPP`, `p`) without writing them by hand.\n *\n * @example\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideWrDateFnsAdapter()],\n * });\n * ```\n *\n * Peer dep: `date-fns@^3` (or `^4`).\n */\n@Service()\nexport class WrDateFnsAdapter 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 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 isValid(date);\n }\n\n // Accessors\n\n getYear(date: Date): number {\n return getYear(date);\n }\n getMonth(date: Date): number {\n return getMonth(date);\n }\n getDate(date: Date): number {\n return getDate(date);\n }\n getDayOfWeek(date: Date): number {\n return getDay(date);\n }\n getDaysInMonth(date: Date): number {\n return getDaysInMonth(date);\n }\n getHours(date: Date): number {\n return getHours(date);\n }\n getMinutes(date: Date): number {\n return getMinutes(date);\n }\n getSeconds(date: Date): number {\n return getSeconds(date);\n }\n\n // Immutable math\n\n addYears(date: Date, amount: number): Date {\n return dfAddYears(date, amount);\n }\n addMonths(date: Date, amount: number): Date {\n return dfAddMonths(date, amount);\n }\n addDays(date: Date, amount: number): Date {\n return dfAddDays(date, amount);\n }\n setTime(date: Date, hours: number, minutes: number, seconds: number): Date {\n return dfSet(date, { hours, minutes, seconds, milliseconds: 0 });\n }\n\n // Comparison\n\n isSameDay(a: Date, b: Date): boolean {\n return isSameDay(a, b);\n }\n isSameMonth(a: Date, b: Date): boolean {\n return isSameMonth(a, b);\n }\n compareDate(a: Date, b: Date): number {\n return compareAsc(startOfDay(a), startOfDay(b));\n }\n\n // Formatting / parsing\n\n format(date: Date, formatKeyOrString: WrDateFormat | (string & {})): string {\n const pattern = isNamedFormat(formatKeyOrString) ? NAMED_PATTERNS[formatKeyOrString] : formatKeyOrString;\n return dfFormat(date, pattern);\n }\n\n parse(value: string, formatKeyOrString: WrDateFormat | (string & {})): Date | null {\n const raw = value?.trim();\n if (!raw) return null;\n const pattern = isNamedFormat(formatKeyOrString) ? NAMED_PATTERNS[formatKeyOrString] : formatKeyOrString;\n const result = dfParse(raw, pattern, new Date());\n return isValid(result) ? result : null;\n }\n\n // Locale info\n\n getFirstDayOfWeek(): number {\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') return info.firstDay % 7;\n } catch {\n // Intl.Locale unsupported — fall through.\n }\n return this.locale.toLowerCase().startsWith('en-us') ? 0 : 1;\n }\n\n getDayOfWeekNames(style: 'narrow' | 'short' | 'long'): readonly string[] {\n const formatter = new Intl.DateTimeFormat(this.locale, { weekday: style });\n const first = this.getFirstDayOfWeek();\n const base = new Date(2024, 0, 7); // Sunday\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 getMonthNames(style: 'narrow' | 'short' | 'long'): readonly string[] {\n const formatter = new Intl.DateTimeFormat(this.locale, { month: style });\n const out: string[] = [];\n for (let i = 0; i < 12; i++) out.push(formatter.format(new Date(2024, i, 15)));\n return out;\n }\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 type { EnvironmentProviders } from '@angular/core';\n\nimport { provideWrDateAdapter } from 'ngwr/date-adapter';\n\nimport { WrDateFnsAdapter } from './wr-date-fns-adapter';\n\n/**\n * Register the {@link WrDateFnsAdapter} so date-pickers / calendars in this\n * app use `date-fns` for all math and formatting. Pass `locale` to override\n * the BCP 47 tag.\n *\n * @example\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideWrDateFnsAdapter()],\n * });\n * ```\n */\nexport function provideWrDateFnsAdapter(options: { readonly locale?: string } = {}): EnvironmentProviders {\n return provideWrDateAdapter({ adapter: WrDateFnsAdapter, locale: options.locale });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["dfAddYears","dfAddMonths","dfAddDays","dfSet","dfFormat","dfParse"],"mappings":";;;;;AAAA;;;;;AAKG;AA2BH,MAAM,cAAc,GAA2C;AAC7D,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,cAAc,EAAE,MAAM;CACvB;AAED;;;;;;;;;;;;;;AAcG;AAEG,MAAO,gBAAiB,SAAQ,aAAmB,CAAA;AACtC,IAAA,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC;;IAIhD,KAAK,GAAA;QACH,OAAO,IAAI,IAAI,EAAE;IACnB;AAEA,IAAA,KAAK,CAAC,IAAU,EAAA;QACd,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;IACjC;AAEA,IAAA,UAAU,CAAC,IAAY,EAAE,KAAa,EAAE,GAAW,EAAA;QACjD,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC;AACpC,QAAA,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,GAAG,GAAG;AAAE,YAAA,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC;AAChD,QAAA,OAAO,CAAC;IACV;AAEA,IAAA,OAAO,CAAC,IAAU,EAAA;AAChB,QAAA,OAAO,OAAO,CAAC,IAAI,CAAC;IACtB;;AAIA,IAAA,OAAO,CAAC,IAAU,EAAA;AAChB,QAAA,OAAO,OAAO,CAAC,IAAI,CAAC;IACtB;AACA,IAAA,QAAQ,CAAC,IAAU,EAAA;AACjB,QAAA,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB;AACA,IAAA,OAAO,CAAC,IAAU,EAAA;AACh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;;ACxDD;;;;;AAKG;AAQH;;;;;;;;;;;AAWG;AACG,SAAU,uBAAuB,CAAC,OAAA,GAAwC,EAAE,EAAA;AAChF,IAAA,OAAO,oBAAoB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;AACpF;;AC3BA;;AAEG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-date-adapter-luxon.mjs","sources":["../../../projects/lib/date-adapter-luxon/wr-luxon-adapter.ts","../../../projects/lib/date-adapter-luxon/provide-wr-luxon-adapter.ts","../../../projects/lib/date-adapter-luxon/ngwr-date-adapter-luxon.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 { Service, inject } from '@angular/core';\n\nimport { DateTime, Info } from 'luxon';\nimport { WrDateAdapter, WR_DATE_LOCALE, type WrDateFormat, isNamedFormat } from 'ngwr/date-adapter';\n\nconst NAMED_PATTERNS: Readonly<Record<WrDateFormat, string>> = {\n shortDate: 'D',\n mediumDate: 'DD',\n longDate: 'DDD',\n time: 't',\n shortDateTime: 'f',\n mediumDateTime: 'ff',\n};\n\n/**\n * Token translation table — our token grammar (matches the native adapter)\n * mapped to luxon's. Notably `MMMM`/`MMM` (month names) become luxon's\n * standalone-month tokens `LLLL`/`LLL`.\n */\nconst TOKEN_MAP: Readonly<Record<string, string>> = {\n yyyy: 'yyyy',\n yy: 'yy',\n MMMM: 'LLLL',\n MMM: 'LLL',\n MM: 'MM',\n M: 'M',\n dd: 'dd',\n d: 'd',\n HH: 'HH',\n H: 'H',\n hh: 'hh',\n h: 'h',\n mm: 'mm',\n ss: 'ss',\n a: 'a',\n};\n\nconst TOKEN_RE = /yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|H|hh|h|mm|ss|a/g;\n\n/**\n * A quoted literal, in Luxon's own syntax: text between single quotes, where\n * `''` is an escaped quote. Split on this and the odd-numbered pieces are the\n * literals — which must reach Luxon untouched.\n */\nconst QUOTED_RE = /('(?:[^']|'')*')/;\n\n/**\n * Rewrite the library's tokens into Luxon's, LEAVING QUOTED TEXT ALONE.\n *\n * The tokens are mostly shared, but a few are not — `MMMM` is Luxon's standalone\n * `LLLL`, for one — so the pattern is translated on the way in. Doing that over\n * the whole string also rewrote the caller's own literals: `\"MMMM 'MMMM'\"`, a\n * month name followed by the word, printed \"August LLLL\". Splitting on quotes\n * first keeps the substitution where it belongs.\n */\nfunction translatePattern(pattern: string): string {\n return pattern\n .split(QUOTED_RE)\n .map((part, index) => (index % 2 === 1 ? part : part.replace(TOKEN_RE, t => TOKEN_MAP[t] ?? t)))\n .join('');\n}\n\n/**\n * {@link WrDateAdapter} backed by Luxon `DateTime`. Use this when you need\n * proper timezone-aware math or IANA zone handling (the native + date-fns\n * adapters both work on plain `Date` and inherit JS quirks).\n *\n * @example\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideWrLuxonAdapter()],\n * });\n * ```\n *\n * Peer dep: `luxon@^3`.\n */\n@Service()\nexport class WrLuxonAdapter extends WrDateAdapter<DateTime> {\n private readonly locale = inject(WR_DATE_LOCALE);\n\n // Construction & identity\n\n today(): DateTime {\n return DateTime.now().setLocale(this.locale);\n }\n\n clone(date: DateTime): DateTime {\n return DateTime.fromMillis(date.toMillis(), { zone: date.zone, locale: this.locale });\n }\n\n createDate(year: number, month: number, day: number): DateTime {\n // `month` is 0-based on our API; luxon's months are 1-based.\n return DateTime.fromObject({ year, month: month + 1, day }, { locale: this.locale });\n }\n\n isValid(date: DateTime): boolean {\n return date.isValid;\n }\n\n // Accessors\n\n getYear(date: DateTime): number {\n return date.year;\n }\n getMonth(date: DateTime): number {\n return date.month - 1;\n }\n getDate(date: DateTime): number {\n return date.day;\n }\n getDayOfWeek(date: DateTime): number {\n // Luxon weekday: 1 (Mon) – 7 (Sun). Our API: 0 (Sun) – 6 (Sat).\n return date.weekday % 7;\n }\n getDaysInMonth(date: DateTime): number {\n return date.daysInMonth ?? 30;\n }\n getHours(date: DateTime): number {\n return date.hour;\n }\n getMinutes(date: DateTime): number {\n return date.minute;\n }\n getSeconds(date: DateTime): number {\n return date.second;\n }\n\n // Immutable math\n\n addYears(date: DateTime, amount: number): DateTime {\n return date.plus({ years: amount });\n }\n addMonths(date: DateTime, amount: number): DateTime {\n return date.plus({ months: amount });\n }\n addDays(date: DateTime, amount: number): DateTime {\n return date.plus({ days: amount });\n }\n setTime(date: DateTime, hours: number, minutes: number, seconds: number): DateTime {\n return date.set({ hour: hours, minute: minutes, second: seconds, millisecond: 0 });\n }\n\n // Comparison\n\n /**\n * The comparison trio, all three answering the same question: what CALENDAR DAY\n * does each value display?\n *\n * Field comparison rather than Luxon's own helpers, and deliberately. This\n * adapter exists for zone-aware apps, so its values do not all share a zone —\n * the grid is built with `createDate` in the app's zone while the selected value\n * may arrive as `DateTime.utc()`. Two things went wrong when the zone was left\n * in the answer:\n *\n * `compareDate` subtracted `startOf('day')` millis, and `startOf` respects each\n * value's OWN zone, so two values both reading \"1 August\" came out three hours\n * apart. Non-zero means \"different day\" to every caller — including\n * `isWithinRange`, which the base class documents as inclusive and which\n * therefore dropped its own endpoint.\n *\n * `hasSame` is the other tempting one-liner, and it asks a third question: it\n * re-expresses one side in the other's zone and tests that instant against the\n * day's bounds. That mostly agrees with a field comparison — but only mostly,\n * and only in this version of luxon, whose `hasSame` keeps the local time\n * while an earlier one kept the instant. Where a date's midnight is ambiguous\n * or missing (Cuba rewinds 01:00 to 00:00 on 2 November 2025) the bounds stop\n * lining up and it answers false for two values a user reads as the same date.\n * The native adapter compares fields; agreeing with it is what keeps a\n * calendar built on either adapter rendering the same thing.\n */\n isSameDay(a: DateTime, b: DateTime): boolean {\n return a.year === b.year && a.month === b.month && a.day === b.day;\n }\n isSameMonth(a: DateTime, b: DateTime): boolean {\n return a.year === b.year && a.month === b.month;\n }\n compareDate(a: DateTime, b: DateTime): number {\n if (a.year !== b.year) return a.year - b.year;\n if (a.month !== b.month) return a.month - b.month;\n return a.day - b.day;\n }\n\n // Formatting / parsing\n\n format(date: DateTime, formatKeyOrString: WrDateFormat | (string & {})): string {\n if (isNamedFormat(formatKeyOrString)) {\n return date.setLocale(this.locale).toFormat(NAMED_PATTERNS[formatKeyOrString]);\n }\n return date.setLocale(this.locale).toFormat(translatePattern(formatKeyOrString));\n }\n\n parse(value: string, formatKeyOrString: WrDateFormat | (string & {})): DateTime | null {\n const raw = value?.trim();\n if (!raw) return null;\n const pattern = isNamedFormat(formatKeyOrString)\n ? NAMED_PATTERNS[formatKeyOrString]\n : translatePattern(formatKeyOrString);\n const parsed = DateTime.fromFormat(raw, pattern, { locale: this.locale });\n return parsed.isValid ? parsed : null;\n }\n\n // Locale info\n\n getFirstDayOfWeek(): number {\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') return info.firstDay % 7;\n } catch {\n // Intl.Locale unsupported — fall through.\n }\n return this.locale.toLowerCase().startsWith('en-us') ? 0 : 1;\n }\n\n getDayOfWeekNames(style: 'narrow' | 'short' | 'long'): readonly string[] {\n // Luxon returns Mon-first; reorder according to our locale's first day.\n const names = Info.weekdays(style, { locale: this.locale });\n const first = this.getFirstDayOfWeek();\n // Convert Mon-first (index 0 = Mon) to our Sun-first then rotate.\n // Easier: pad to Sun-first using known offset (luxon Mon=0, Sun=6).\n const sunFirst = [names[6], ...names.slice(0, 6)];\n return [...sunFirst.slice(first), ...sunFirst.slice(0, first)];\n }\n\n getMonthNames(style: 'narrow' | 'short' | 'long'): readonly string[] {\n return Info.months(style, { locale: this.locale });\n }\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 type { EnvironmentProviders } from '@angular/core';\n\nimport { provideWrDateAdapter } from 'ngwr/date-adapter';\n\nimport { WrLuxonAdapter } from './wr-luxon-adapter';\n\n/**\n * Register the {@link WrLuxonAdapter} so date-pickers / calendars in this\n * app use Luxon `DateTime` for all math and formatting. Pass `locale` to\n * override the BCP 47 tag.\n *\n * @example\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideWrLuxonAdapter()],\n * });\n * ```\n */\nexport function provideWrLuxonAdapter(options: { readonly locale?: string } = {}): EnvironmentProviders {\n return provideWrDateAdapter({ adapter: WrLuxonAdapter, locale: options.locale });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAOH,MAAM,cAAc,GAA2C;AAC7D,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,aAAa,EAAE,GAAG;AAClB,IAAA,cAAc,EAAE,IAAI;CACrB;AAED;;;;AAIG;AACH,MAAM,SAAS,GAAqC;AAClD,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,CAAC,EAAE,GAAG;AACN,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,EAAE,EAAE,IAAI;AACR,IAAA,CAAC,EAAE,GAAG;CACP;AAED,MAAM,QAAQ,GAAG,+CAA+C;AAEhE;;;;AAIG;AACH,MAAM,SAAS,GAAG,kBAAkB;AAEpC;;;;;;;;AAQG;AACH,SAAS,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