ngwr 15.1.0 → 15.3.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/alert/styles/_index.scss +13 -5
- package/bits/aurora/styles/_rules.scss +11 -0
- package/bits/dot-grid/styles/_rules.scss +9 -1
- package/bits/iridescence/iridescence.scss +1 -0
- package/bits/iridescence/styles/_index.scss +8 -0
- package/bits/iridescence/styles/_rules.scss +72 -0
- package/bits/marquee/styles/_rules.scss +7 -3
- package/bits/ripple-grid/styles/_rules.scss +10 -2
- package/bits/spotlight-card/styles/_rules.scss +7 -4
- package/bits/star-border/styles/_rules.scss +5 -2
- package/bits/threads/styles/_rules.scss +9 -1
- package/bits/waves/styles/_rules.scss +8 -1
- package/charts/candlestick-chart/styles/_index.scss +2 -2
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +5 -5
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.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-bits-aurora.mjs +30 -38
- package/fesm2022/ngwr-bits-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-bits-blur-text.mjs +3 -3
- package/fesm2022/ngwr-bits-border-glow-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bits-border-glow.mjs +11 -5
- package/fesm2022/ngwr-bits-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-bits-circular-text.mjs +3 -3
- package/fesm2022/ngwr-bits-click-spark.mjs +3 -3
- package/fesm2022/ngwr-bits-confetti.mjs +3 -3
- package/fesm2022/ngwr-bits-decrypt-text.mjs +3 -3
- package/fesm2022/ngwr-bits-dot-grid.mjs +12 -9
- package/fesm2022/ngwr-bits-dot-grid.mjs.map +1 -1
- package/fesm2022/ngwr-bits-falling-text.mjs +3 -3
- package/fesm2022/ngwr-bits-fuzzy-text.mjs +3 -3
- package/fesm2022/ngwr-bits-glitch-text.mjs +3 -3
- package/fesm2022/ngwr-bits-gradient-text.mjs +3 -3
- package/fesm2022/ngwr-bits-iridescence-testing.mjs +31 -0
- package/fesm2022/ngwr-bits-iridescence-testing.mjs.map +1 -0
- package/fesm2022/ngwr-bits-iridescence.mjs +591 -0
- package/fesm2022/ngwr-bits-iridescence.mjs.map +1 -0
- package/fesm2022/ngwr-bits-marquee-testing.mjs +1 -1
- package/fesm2022/ngwr-bits-marquee-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bits-marquee.mjs +7 -7
- package/fesm2022/ngwr-bits-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-bits-ripple-grid.mjs +8 -11
- package/fesm2022/ngwr-bits-ripple-grid.mjs.map +1 -1
- package/fesm2022/ngwr-bits-rotating-text.mjs +3 -3
- package/fesm2022/ngwr-bits-shiny-text.mjs +6 -6
- package/fesm2022/ngwr-bits-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-bits-split-text.mjs +3 -3
- package/fesm2022/ngwr-bits-spotlight-card-testing.mjs +1 -1
- package/fesm2022/ngwr-bits-spotlight-card-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bits-spotlight-card.mjs +10 -10
- package/fesm2022/ngwr-bits-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-bits-star-border-testing.mjs +1 -1
- package/fesm2022/ngwr-bits-star-border-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bits-star-border.mjs +7 -7
- package/fesm2022/ngwr-bits-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-bits-threads.mjs +17 -12
- package/fesm2022/ngwr-bits-threads.mjs.map +1 -1
- package/fesm2022/ngwr-bits-tilt-card.mjs +6 -6
- package/fesm2022/ngwr-bits-typewriter.mjs +3 -3
- package/fesm2022/ngwr-bits-waves.mjs +15 -11
- package/fesm2022/ngwr-bits-waves.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +24 -8
- 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.mjs +3 -3
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +3 -3
- package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +7 -7
- package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-chart-legend.mjs +6 -6
- package/fesm2022/ngwr-charts-core.mjs +3 -3
- package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-gauge.mjs +3 -3
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-line-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-meter-group.mjs +3 -3
- package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
- package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +6 -6
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +12 -12
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-picker.mjs +21 -21
- package/fesm2022/ngwr-date.mjs +6 -6
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +15 -15
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +18 -18
- package/fesm2022/ngwr-dropdown.mjs +9 -9
- package/fesm2022/ngwr-editor.mjs +3 -3
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +6 -6
- package/fesm2022/ngwr-file-upload.mjs +3 -3
- package/fesm2022/ngwr-form.mjs +9 -9
- package/fesm2022/ngwr-graph.mjs +6 -6
- package/fesm2022/ngwr-hotkey.mjs +29 -7
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +2 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +2 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +2 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +2 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +2 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +2 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +2 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +2 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +2 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +2 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +2 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +2 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +2 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +2 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +2 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +2 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +2 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +2 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +2 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +2 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +2 -0
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +2 -0
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number.mjs +3 -3
- package/fesm2022/ngwr-input-otp.mjs +3 -3
- 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 +3 -3
- package/fesm2022/ngwr-list.mjs +6 -6
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-overlay.mjs +6 -6
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +6 -3
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +26 -23
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +6 -6
- package/fesm2022/ngwr-popconfirm.mjs +6 -6
- package/fesm2022/ngwr-popover.mjs +12 -12
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +4 -3
- 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 +12 -12
- package/fesm2022/ngwr-schema-form.mjs +6 -3
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select-testing.mjs +16 -0
- package/fesm2022/ngwr-select-testing.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +230 -50
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +3 -3
- package/fesm2022/ngwr-sortable-list.mjs +9 -9
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +18 -14
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +18 -18
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs.mjs +6 -6
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +3 -3
- 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 +6 -6
- package/fesm2022/ngwr-transfer.mjs +3 -3
- package/fesm2022/ngwr-tree.mjs +3 -3
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +31 -1
- 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 +3 -3
- package/fesm2022/ngwr-window.mjs +12 -12
- package/i18n/ar.json +2 -0
- package/i18n/cs.json +2 -0
- package/i18n/de.json +2 -0
- package/i18n/en.json +2 -0
- package/i18n/es.json +2 -0
- package/i18n/fr.json +2 -0
- package/i18n/he.json +2 -0
- package/i18n/hi.json +2 -0
- package/i18n/id.json +2 -0
- package/i18n/it.json +2 -0
- package/i18n/ja.json +2 -0
- package/i18n/ko.json +2 -0
- package/i18n/nl.json +2 -0
- package/i18n/pl.json +2 -0
- package/i18n/pt.json +2 -0
- package/i18n/ru.json +2 -0
- package/i18n/sv.json +2 -0
- package/i18n/tr.json +2 -0
- package/i18n/uk.json +2 -0
- package/i18n/vi.json +2 -0
- package/i18n/zh-TW.json +2 -0
- package/i18n/zh.json +2 -0
- package/llms-full.txt +15 -4
- package/mcp/server.js +15 -1
- package/mcp/tools.js +3 -3
- package/package.json +10 -1
- package/schematics/ng-add/index.js +2 -2
- package/schematics/use/symbol-map.json +2 -0
- package/select/styles/_index.scss +23 -1
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +3 -1
- package/types/ngwr-alert.d.ts +3 -1
- package/types/ngwr-bits-aurora.d.ts +11 -0
- package/types/ngwr-bits-border-glow-testing.d.ts +5 -6
- package/types/ngwr-bits-border-glow.d.ts +5 -1
- package/types/ngwr-bits-dot-grid.d.ts +7 -2
- package/types/ngwr-bits-iridescence-testing.d.ts +85 -0
- package/types/ngwr-bits-iridescence.d.ts +244 -0
- package/types/ngwr-bits-ripple-grid.d.ts +4 -7
- package/types/ngwr-bits-splash-cursor.d.ts +0 -1
- package/types/ngwr-bits-spotlight-card-testing.d.ts +3 -1
- package/types/ngwr-bits-star-border-testing.d.ts +7 -7
- package/types/ngwr-bits-threads.d.ts +11 -8
- package/types/ngwr-bits-waves.d.ts +6 -3
- package/types/ngwr-breadcrumbs.d.ts +15 -0
- package/types/ngwr-charts-core.d.ts +0 -10
- package/types/ngwr-color-picker.d.ts +0 -21
- package/types/ngwr-dropdown.d.ts +0 -52
- package/types/ngwr-editor.d.ts +2 -84
- package/types/ngwr-hotkey.d.ts +14 -2
- package/types/ngwr-i18n.d.ts +0 -15
- package/types/ngwr-mention.d.ts +0 -13
- package/types/ngwr-popconfirm.d.ts +0 -33
- package/types/ngwr-popover.d.ts +0 -51
- package/types/ngwr-select-testing.d.ts +9 -0
- package/types/ngwr-select.d.ts +133 -2
- package/types/ngwr-sidebar.d.ts +1 -1
- package/types/ngwr-tour.d.ts +0 -2
- package/types/ngwr-utils.d.ts +49 -7
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +0 -56
|
@@ -88,7 +88,7 @@ var WrTilt = class WrTilt {
|
|
|
88
88
|
}
|
|
89
89
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
90
90
|
minVersion: "12.0.0",
|
|
91
|
-
version: "22.2.
|
|
91
|
+
version: "22.2.4",
|
|
92
92
|
ngImport: i0,
|
|
93
93
|
type: WrTilt,
|
|
94
94
|
deps: [],
|
|
@@ -96,7 +96,7 @@ var WrTilt = class WrTilt {
|
|
|
96
96
|
});
|
|
97
97
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
98
98
|
minVersion: "17.1.0",
|
|
99
|
-
version: "22.2.
|
|
99
|
+
version: "22.2.4",
|
|
100
100
|
type: WrTilt,
|
|
101
101
|
isStandalone: true,
|
|
102
102
|
selector: "[wrTilt]",
|
|
@@ -139,7 +139,7 @@ var WrTilt = class WrTilt {
|
|
|
139
139
|
};
|
|
140
140
|
i0.ɵɵngDeclareClassMetadata({
|
|
141
141
|
minVersion: "12.0.0",
|
|
142
|
-
version: "22.2.
|
|
142
|
+
version: "22.2.4",
|
|
143
143
|
ngImport: i0,
|
|
144
144
|
type: WrTilt,
|
|
145
145
|
decorators: [{
|
|
@@ -197,7 +197,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
197
197
|
var WrTiltCard = class WrTiltCard {
|
|
198
198
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
199
199
|
minVersion: "12.0.0",
|
|
200
|
-
version: "22.2.
|
|
200
|
+
version: "22.2.4",
|
|
201
201
|
ngImport: i0,
|
|
202
202
|
type: WrTiltCard,
|
|
203
203
|
deps: [],
|
|
@@ -205,7 +205,7 @@ var WrTiltCard = class WrTiltCard {
|
|
|
205
205
|
});
|
|
206
206
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
207
207
|
minVersion: "14.0.0",
|
|
208
|
-
version: "22.2.
|
|
208
|
+
version: "22.2.4",
|
|
209
209
|
type: WrTiltCard,
|
|
210
210
|
isStandalone: true,
|
|
211
211
|
selector: "wr-tilt-card",
|
|
@@ -232,7 +232,7 @@ var WrTiltCard = class WrTiltCard {
|
|
|
232
232
|
};
|
|
233
233
|
i0.ɵɵngDeclareClassMetadata({
|
|
234
234
|
minVersion: "12.0.0",
|
|
235
|
-
version: "22.2.
|
|
235
|
+
version: "22.2.4",
|
|
236
236
|
ngImport: i0,
|
|
237
237
|
type: WrTiltCard,
|
|
238
238
|
decorators: [{
|
|
@@ -184,7 +184,7 @@ var WrTypewriter = class WrTypewriter {
|
|
|
184
184
|
}
|
|
185
185
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
186
186
|
minVersion: "12.0.0",
|
|
187
|
-
version: "22.2.
|
|
187
|
+
version: "22.2.4",
|
|
188
188
|
ngImport: i0,
|
|
189
189
|
type: WrTypewriter,
|
|
190
190
|
deps: [],
|
|
@@ -192,7 +192,7 @@ var WrTypewriter = class WrTypewriter {
|
|
|
192
192
|
});
|
|
193
193
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
194
194
|
minVersion: "17.0.0",
|
|
195
|
-
version: "22.2.
|
|
195
|
+
version: "22.2.4",
|
|
196
196
|
type: WrTypewriter,
|
|
197
197
|
isStandalone: true,
|
|
198
198
|
selector: "wr-typewriter",
|
|
@@ -319,7 +319,7 @@ var WrTypewriter = class WrTypewriter {
|
|
|
319
319
|
};
|
|
320
320
|
i0.ɵɵngDeclareClassMetadata({
|
|
321
321
|
minVersion: "12.0.0",
|
|
322
|
-
version: "22.2.
|
|
322
|
+
version: "22.2.4",
|
|
323
323
|
ngImport: i0,
|
|
324
324
|
type: WrTypewriter,
|
|
325
325
|
decorators: [{
|
|
@@ -388,7 +388,6 @@ var WrWaves = class WrWaves {
|
|
|
388
388
|
height: 0
|
|
389
389
|
};
|
|
390
390
|
ratio = 0;
|
|
391
|
-
lastTime = -1;
|
|
392
391
|
mouse = {
|
|
393
392
|
x: -10,
|
|
394
393
|
y: 0,
|
|
@@ -404,6 +403,7 @@ var WrWaves = class WrWaves {
|
|
|
404
403
|
rafId = 0;
|
|
405
404
|
painted = signal(false, ...ngDevMode ? [{ debugName: "painted" }] : /* istanbul ignore next */ []);
|
|
406
405
|
booted = signal(false, ...ngDevMode ? [{ debugName: "booted" }] : /* istanbul ignore next */ []);
|
|
406
|
+
hasBox = signal(false, ...ngDevMode ? [{ debugName: "hasBox" }] : /* istanbul ignore next */ []);
|
|
407
407
|
constructor() {
|
|
408
408
|
if (!this.isBrowser) return;
|
|
409
409
|
afterNextRender(() => this.zone.runOutsideAngular(() => this.boot()));
|
|
@@ -427,6 +427,7 @@ var WrWaves = class WrWaves {
|
|
|
427
427
|
});
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
430
|
+
if (!this.hasBox()) return;
|
|
430
431
|
onCleanup(this.zone.runOutsideAngular(() => this.animate()));
|
|
431
432
|
});
|
|
432
433
|
}
|
|
@@ -462,7 +463,11 @@ var WrWaves = class WrWaves {
|
|
|
462
463
|
cancelAnimationFrame(this.rafId);
|
|
463
464
|
this.rafId = 0;
|
|
464
465
|
};
|
|
465
|
-
const io = typeof IntersectionObserver === "undefined" ? null : new IntersectionObserver((entries) =>
|
|
466
|
+
const io = typeof IntersectionObserver === "undefined" ? null : new IntersectionObserver((entries) => {
|
|
467
|
+
const { isIntersecting, intersectionRatio } = entries[entries.length - 1];
|
|
468
|
+
if (isIntersecting && intersectionRatio > 0) run();
|
|
469
|
+
else halt();
|
|
470
|
+
}, { threshold: [0, 1e-9] });
|
|
466
471
|
if (io) io.observe(this.host.nativeElement);
|
|
467
472
|
else run();
|
|
468
473
|
return () => {
|
|
@@ -470,7 +475,6 @@ var WrWaves = class WrWaves {
|
|
|
470
475
|
window.removeEventListener("touchmove", onTouchMove);
|
|
471
476
|
io?.disconnect();
|
|
472
477
|
halt();
|
|
473
|
-
this.lastTime = -1;
|
|
474
478
|
};
|
|
475
479
|
}
|
|
476
480
|
resize(width, height) {
|
|
@@ -478,7 +482,7 @@ var WrWaves = class WrWaves {
|
|
|
478
482
|
if (!this.fit(width, height)) return;
|
|
479
483
|
if (moved) {
|
|
480
484
|
this.setLines();
|
|
481
|
-
if (this.
|
|
485
|
+
if (!this.platform.prefersReducedMotion()) this.drift(performance.now());
|
|
482
486
|
}
|
|
483
487
|
this.drawLines();
|
|
484
488
|
}
|
|
@@ -492,6 +496,7 @@ var WrWaves = class WrWaves {
|
|
|
492
496
|
height
|
|
493
497
|
};
|
|
494
498
|
this.ratio = ratio;
|
|
499
|
+
this.hasBox.set(width > 0 && height > 0);
|
|
495
500
|
const canvas = this.canvasRef().nativeElement;
|
|
496
501
|
canvas.width = Math.round(width * ratio);
|
|
497
502
|
canvas.height = Math.round(height * ratio);
|
|
@@ -541,7 +546,6 @@ var WrWaves = class WrWaves {
|
|
|
541
546
|
mouse.lx = mouse.x;
|
|
542
547
|
mouse.ly = mouse.y;
|
|
543
548
|
mouse.a = Math.atan2(dy, dx);
|
|
544
|
-
this.lastTime = time;
|
|
545
549
|
this.movePoints(time);
|
|
546
550
|
this.drawLines();
|
|
547
551
|
this.rafId = requestAnimationFrame((t) => this.tick(t));
|
|
@@ -614,7 +618,7 @@ var WrWaves = class WrWaves {
|
|
|
614
618
|
ctx.stroke();
|
|
615
619
|
}
|
|
616
620
|
resolveLineColor() {
|
|
617
|
-
const expression = this.lineColor() ?? "var(--wr-waves-line-color)";
|
|
621
|
+
const expression = (this.lineColor() ?? "").trim() || "var(--wr-waves-line-color)";
|
|
618
622
|
return resolveCssColor(this.canvasRef().nativeElement, expression, "rgba(15, 23, 42, 0.12)");
|
|
619
623
|
}
|
|
620
624
|
updateMouse(x, y) {
|
|
@@ -632,7 +636,7 @@ var WrWaves = class WrWaves {
|
|
|
632
636
|
}
|
|
633
637
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
634
638
|
minVersion: "12.0.0",
|
|
635
|
-
version: "22.2.
|
|
639
|
+
version: "22.2.4",
|
|
636
640
|
ngImport: i0,
|
|
637
641
|
type: WrWaves,
|
|
638
642
|
deps: [],
|
|
@@ -640,7 +644,7 @@ var WrWaves = class WrWaves {
|
|
|
640
644
|
});
|
|
641
645
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
642
646
|
minVersion: "17.2.0",
|
|
643
|
-
version: "22.2.
|
|
647
|
+
version: "22.2.4",
|
|
644
648
|
type: WrWaves,
|
|
645
649
|
isStandalone: true,
|
|
646
650
|
selector: "wr-waves",
|
|
@@ -741,13 +745,13 @@ var WrWaves = class WrWaves {
|
|
|
741
745
|
ngImport: i0,
|
|
742
746
|
template: "<canvas #canvas class=\"wr-waves__canvas\" aria-hidden=\"true\"></canvas>",
|
|
743
747
|
isInline: true,
|
|
744
|
-
styles: [".wr-waves{--wr-waves-line-color: light-dark( color-mix(in srgb, var(--wr-color-on-surface) 12%, transparent), rgb(255 255 255 / 14%) );--wr-waves-x-gap: 10px;position:absolute;inset:0;display:block;margin:0;padding:0;overflow:hidden;background-image:repeating-linear-gradient(to right,var(--wr-waves-line-color) 0 1px,transparent 1px var(--wr-waves-x-gap))}.wr-waves--painted{background-image:none}.wr-waves__canvas{display:block;width:100%;height:100%}\n"],
|
|
748
|
+
styles: [".wr-waves{--wr-waves-line-color: light-dark( color-mix(in srgb, var(--wr-color-on-surface) 12%, transparent), rgb(255 255 255 / 14%) );--wr-waves-x-gap: 10px;position:absolute;inset:0;display:block;margin:0;padding:0;overflow:hidden;background-image:repeating-linear-gradient(to right,var(--wr-waves-line-color) 0 1px,transparent 1px var(--wr-waves-x-gap))}.wr-waves--painted{background-image:none}.wr-waves__canvas{display:block;width:100%;height:100%}@media(forced-colors:active){.wr-waves__canvas{forced-color-adjust:none}}\n"],
|
|
745
749
|
encapsulation: i0.ViewEncapsulation.None
|
|
746
750
|
});
|
|
747
751
|
};
|
|
748
752
|
i0.ɵɵngDeclareClassMetadata({
|
|
749
753
|
minVersion: "12.0.0",
|
|
750
|
-
version: "22.2.
|
|
754
|
+
version: "22.2.4",
|
|
751
755
|
ngImport: i0,
|
|
752
756
|
type: WrWaves,
|
|
753
757
|
decorators: [{
|
|
@@ -762,7 +766,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
762
766
|
"[style.--wr-waves-x-gap.px]": "xGap()",
|
|
763
767
|
"[class.wr-waves--painted]": "painted()"
|
|
764
768
|
},
|
|
765
|
-
styles: [".wr-waves{--wr-waves-line-color: light-dark( color-mix(in srgb, var(--wr-color-on-surface) 12%, transparent), rgb(255 255 255 / 14%) );--wr-waves-x-gap: 10px;position:absolute;inset:0;display:block;margin:0;padding:0;overflow:hidden;background-image:repeating-linear-gradient(to right,var(--wr-waves-line-color) 0 1px,transparent 1px var(--wr-waves-x-gap))}.wr-waves--painted{background-image:none}.wr-waves__canvas{display:block;width:100%;height:100%}\n"]
|
|
769
|
+
styles: [".wr-waves{--wr-waves-line-color: light-dark( color-mix(in srgb, var(--wr-color-on-surface) 12%, transparent), rgb(255 255 255 / 14%) );--wr-waves-x-gap: 10px;position:absolute;inset:0;display:block;margin:0;padding:0;overflow:hidden;background-image:repeating-linear-gradient(to right,var(--wr-waves-line-color) 0 1px,transparent 1px var(--wr-waves-x-gap))}.wr-waves--painted{background-image:none}.wr-waves__canvas{display:block;width:100%;height:100%}@media(forced-colors:active){.wr-waves__canvas{forced-color-adjust:none}}\n"]
|
|
766
770
|
}]
|
|
767
771
|
}],
|
|
768
772
|
ctorParameters: () => [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-bits-waves.mjs","names":[],"sources":["../../../projects/lib/bits/waves/waves.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 Waves background by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/backgrounds/waves\n *\n * A grid of vertical lines drawn on a 2D canvas. Each point drifts on\n * perlin noise and is pushed around by the pointer with a spring\n * (tension + friction) pulling it back to rest. Each line is drawn as\n * quadratic curves through the points' midpoints, not as straight segments.\n */\n\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n NgZone,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n effect,\n inject,\n input,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\n\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr, resolveCssColor, watchColorScheme } from 'ngwr/utils';\n\n// Perlin noise (Stefan Gustavson's reference permutation)\n/* eslint-disable no-bitwise -- permutation-table hashing is inherently bitwise */\n\nclass Grad {\n constructor(\n private readonly x: number,\n private readonly y: number\n ) {}\n\n dot2(x: number, y: number): number {\n return this.x * x + this.y * y;\n }\n}\n\nconst GRAD3: readonly Grad[] = [\n new Grad(1, 1),\n new Grad(-1, 1),\n new Grad(1, -1),\n new Grad(-1, -1),\n new Grad(1, 0),\n new Grad(-1, 0),\n new Grad(1, 0),\n new Grad(-1, 0),\n new Grad(0, 1),\n new Grad(0, -1),\n new Grad(0, 1),\n new Grad(0, -1),\n];\n\n// prettier-ignore\nconst P: readonly number[] = [\n 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240,\n 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33, 88,\n 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, 166, 77, 146, 158, 231, 83,\n 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244, 102, 143, 54, 65, 25, 63, 161, 1, 216,\n 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196, 135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, 186,\n 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118, 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58,\n 17, 182, 189, 28, 42, 223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155, 167, 43, 172, 9,\n 129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246, 97, 228, 251, 34, 242, 193,\n 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235, 249, 14, 239, 107, 49, 192, 214, 31, 181, 199, 106, 157,\n 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, 138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128,\n 195, 78, 66, 215, 61, 156, 180,\n];\n\nclass Noise {\n private readonly perm = new Array<number>(512);\n private readonly gradP = new Array<Grad>(512);\n\n constructor(seed: number) {\n if (seed > 0 && seed < 1) seed *= 65536;\n seed = Math.floor(seed);\n if (seed < 256) seed |= seed << 8;\n for (let i = 0; i < 256; i++) {\n const v = i & 1 ? P[i] ^ (seed & 255) : P[i] ^ ((seed >> 8) & 255);\n this.perm[i] = this.perm[i + 256] = v;\n this.gradP[i] = this.gradP[i + 256] = GRAD3[v % 12];\n }\n }\n\n private fade(t: number): number {\n return t * t * t * (t * (t * 6 - 15) + 10);\n }\n\n private lerp(a: number, b: number, t: number): number {\n return (1 - t) * a + t * b;\n }\n\n perlin2(x: number, y: number): number {\n let gx = Math.floor(x);\n let gy = Math.floor(y);\n x -= gx;\n y -= gy;\n gx &= 255;\n gy &= 255;\n const n00 = this.gradP[gx + this.perm[gy]].dot2(x, y);\n const n01 = this.gradP[gx + this.perm[gy + 1]].dot2(x, y - 1);\n const n10 = this.gradP[gx + 1 + this.perm[gy]].dot2(x - 1, y);\n const n11 = this.gradP[gx + 1 + this.perm[gy + 1]].dot2(x - 1, y - 1);\n const u = this.fade(x);\n return this.lerp(this.lerp(n00, n10, u), this.lerp(n01, n11, u), this.fade(y));\n }\n}\n\n/* eslint-enable no-bitwise */\n// Component\n\ninterface WavePoint {\n x: number;\n y: number;\n wave: { x: number; y: number };\n cursor: { x: number; y: number; vx: number; vy: number };\n}\n\n/**\n * Wave-field background — a grid of lines drifting on perlin noise,\n * nudged by the pointer. Fills its nearest positioned ancestor; put it\n * behind hero copy or section content.\n *\n * Colours are theme-aware by default: a soft dark line on light surfaces,\n * a faint white line on dark — override with `[lineColor]`.\n *\n * @example\n * ```html\n * <section style=\"position: relative\">\n * <wr-waves />\n * <h1>Hero copy above the waves</h1>\n * </section>\n * ```\n *\n * @see https://ngwr.dev/bits/waves\n */\n/**\n * The most bitmap pixels the canvas is backed with. The field is redrawn every\n * frame, so the backing store is a per-frame cost: a 1280-wide hero keeps the\n * full 2x (about 2.3 MP), and a wider one steps down toward 1x instead of\n * growing to a 3456-pixel-wide bitmap on a large retina window.\n */\nconst MAX_CANVAS_PIXELS = 2_500_000;\n\n@Component({\n selector: 'wr-waves',\n template: '<canvas #canvas class=\"wr-waves__canvas\" aria-hidden=\"true\"></canvas>',\n styleUrl: './waves.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-waves',\n '[style.background-color]': 'backgroundColor()',\n // Feeds the CSS stand-in grid (see waves.scss) so it matches the real\n // spacing, and switches it off the moment the canvas has painted.\n '[style.--wr-waves-x-gap.px]': 'xGap()',\n '[class.wr-waves--painted]': 'painted()',\n },\n})\nexport class WrWaves {\n /** Line stroke colour, any CSS colour. When unset, the theme decides. */\n readonly lineColor = input<string | null>(null);\n\n /** Background fill behind the lines. @default 'transparent' */\n readonly backgroundColor = input('transparent');\n\n /** Horizontal noise drift per ms. @default 0.0125 */\n readonly waveSpeedX = input(0.0125, { transform: numAttr(0.0125) });\n\n /** Vertical noise drift per ms. @default 0.005 */\n readonly waveSpeedY = input(0.005, { transform: numAttr(0.005) });\n\n /** Horizontal wave amplitude in px. @default 32 */\n readonly waveAmpX = input(32, { transform: numAttr(32) });\n\n /** Vertical wave amplitude in px. @default 16 */\n readonly waveAmpY = input(16, { transform: numAttr(16) });\n\n /** Horizontal gap between lines in px. @default 10 */\n readonly xGap = input(10, { transform: numAttr(10) });\n\n /** Vertical gap between points on a line in px. @default 32 */\n readonly yGap = input(32, { transform: numAttr(32) });\n\n /** Velocity damping of the cursor spring, 0..1. @default 0.925 */\n readonly friction = input(0.925, { transform: numAttr(0.925) });\n\n /** Pull-back strength of the cursor spring. @default 0.005 */\n readonly tension = input(0.005, { transform: numAttr(0.005) });\n\n /** Max px a point can be dragged from rest. @default 100 */\n readonly maxCursorMove = input(100, { transform: numAttr(100) });\n\n private readonly canvasRef = viewChild.required<ElementRef<HTMLCanvasElement>>('canvas');\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly zone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n private readonly platform = inject(WrPlatform);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private ctx: CanvasRenderingContext2D | null = null;\n private readonly noise = new Noise(Math.random());\n private lines: WavePoint[][] = [];\n /** The host's layout box, in CSS pixels before any transform: what the grid is laid out in. */\n private box = { width: 0, height: 0 };\n /** Bitmap pixels per CSS pixel the canvas is backed at; 0 until the first fit. */\n private ratio = 0;\n /** The time of the frame the loop last drew, or -1 while no loop has drawn. */\n private lastTime = -1;\n private readonly mouse = { x: -10, y: 0, lx: 0, ly: 0, sx: 0, sy: 0, v: 0, vs: 0, a: 0, set: false };\n private rafId = 0;\n\n /**\n * Flips once the canvas has drawn, which retires the CSS stand-in grid.\n *\n * A canvas cannot be prerendered, so on an SSR'd or prerendered page this\n * element is simply blank until the bundle has loaded and hydration has run —\n * measured at ~2.8s on ngwr.dev's own home page. The stylesheet paints a static\n * grid of the same colour and pitch in the meantime, straight from the\n * prerendered HTML, and this hands over to the real thing.\n */\n protected readonly painted = signal(false);\n\n /** Flips once `boot()` has a context and a grid — the motion half waits for it. */\n private readonly booted = signal(false);\n\n constructor() {\n if (!this.isBrowser) return;\n\n afterNextRender(() => this.zone.runOutsideAngular(() => this.boot()));\n\n // Re-seed the grid when geometry inputs change. The bitmap is left alone,\n // so the next frame draws over the old grid rather than over a blank canvas.\n effect(() => {\n this.xGap();\n this.yGap();\n if (!this.ctx) return;\n this.setLines();\n // And paint it, when there is no frame loop to. Under\n // `prefers-reduced-motion` the grid is drawn once and no frame follows,\n // so a later gap change rebuilt the grid and left it undrawn — with\n // `.wr-waves--painted` already on the host, so the element stayed\n // visible and empty.\n if (this.platform.prefersReducedMotion()) this.drawLines();\n });\n\n // The still grid keeps the line colour it was drawn with, so a scheme switch\n // under reduced motion re-resolves it and draws the grid again. The loop\n // needs no help: every frame it draws resolves the colour afresh.\n watchColorScheme(() => {\n if (this.booted() && this.platform.prefersReducedMotion()) this.drawLines();\n });\n\n // Motion or a still grid, decided live: a preference switched while the page\n // is open used to keep the field drifting until a reload, because `boot()`\n // read it once.\n effect(onCleanup => {\n if (!this.booted()) return;\n if (this.platform.prefersReducedMotion()) {\n // One static, undisturbed grid — no drift, no loop, no pointer\n // reactivity. Repainted when the line colour changes, since there is\n // no next frame to pick it up.\n this.lineColor();\n untracked(() => {\n this.setLines();\n this.drawLines();\n });\n return;\n }\n onCleanup(this.zone.runOutsideAngular(() => this.animate()));\n });\n }\n\n // Setup\n\n private boot(): void {\n const canvas = this.canvasRef().nativeElement;\n this.ctx = canvas.getContext('2d');\n if (!this.ctx) return;\n\n // `clientWidth` and not `getBoundingClientRect()`: the rect is the box after\n // transforms, and no observer hears of a transform, so a field booted inside\n // a dialog's scale-in kept a bitmap 96% of its box, stretched by CSS once\n // the animation ended. The observer's first entry follows with the exact,\n // sub-pixel size.\n const hostEl = this.host.nativeElement;\n this.fit(hostEl.clientWidth, hostEl.clientHeight);\n this.setLines();\n\n // The box is the observer's to follow, transforms excluded. A window resize\n // is for the pixel ratio, which browser zoom and a move to another screen\n // change with no box change at all.\n const onResize = (): void => this.resize(this.box.width, this.box.height);\n window.addEventListener('resize', onResize);\n const ro = new ResizeObserver(entries => {\n const rect = entries[entries.length - 1]?.contentRect;\n if (rect) this.resize(rect.width, rect.height);\n });\n ro.observe(hostEl);\n this.destroyRef.onDestroy(() => {\n window.removeEventListener('resize', onResize);\n ro.disconnect();\n });\n this.booted.set(true);\n }\n\n /** Start the drift and the pointer reactivity; returns what stops both. */\n private animate(): () => void {\n const onMouseMove = (e: MouseEvent): void => this.updateMouse(e.clientX, e.clientY);\n const onTouchMove = (e: TouchEvent): void => this.updateMouse(e.touches[0].clientX, e.touches[0].clientY);\n\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('touchmove', onTouchMove, { passive: true });\n\n const run = (): void => {\n if (this.rafId === 0) this.rafId = requestAnimationFrame(t => this.tick(t));\n };\n const halt = (): void => {\n cancelAnimationFrame(this.rafId);\n this.rafId = 0;\n };\n // Off screen the field stops asking for frames: it is decoration, and a\n // canvas redrawn out of sight still costs the browser a frame every frame.\n // Firefox on a wide retina window showed it: scrolled back up, the page\n // above the fold stayed blank for seconds until this loop and the pixel\n // budget below went in. Without an observer (jsdom) it simply runs.\n const io =\n typeof IntersectionObserver === 'undefined'\n ? null\n : new IntersectionObserver(entries => (entries[entries.length - 1].isIntersecting ? run() : halt()));\n if (io) io.observe(this.host.nativeElement);\n else run();\n\n return () => {\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('touchmove', onTouchMove);\n io?.disconnect();\n halt();\n // The still grid that follows is undisturbed: no drift to carry over.\n this.lastTime = -1;\n };\n }\n\n /** Fit the canvas to a new box or pixel ratio and, when that cleared it, repaint at once. */\n private resize(width: number, height: number): void {\n const moved = width !== this.box.width || height !== this.box.height;\n if (!this.fit(width, height)) return;\n if (moved) {\n this.setLines();\n // Re-seeded points sit at rest. A drifting field puts them where the last\n // frame had the drift, or the repaint below shows straight lines for a frame.\n if (this.lastTime >= 0) this.drift(this.lastTime);\n }\n // Observer entries arrive after the frame's own callbacks and before its\n // paint, and the fit cleared the bitmap, so a repaint left to the next frame\n // would leave this one blank: a resize drag flickered every frame.\n this.drawLines();\n }\n\n /**\n * Back the canvas for a `width` × `height` box, in CSS pixels, at the screen's\n * pixel ratio. Returns whether anything changed: writing `canvas.width` clears\n * the bitmap even to the value it already has, so an unchanged box is left alone.\n */\n private fit(width: number, height: number): boolean {\n // Backed at the screen's pixel ratio. A bitmap the size of the CSS box is\n // upscaled on a 2x screen, which smears every 1px line across two device\n // pixels and steps its curves. Capped at 2: the field repaints every frame,\n // and a 3x phone would push half as many pixels again for no visible gain.\n // Capped again by `MAX_CANVAS_PIXELS`, never below 1.\n const area = width * height;\n const budget = area > 0 ? Math.sqrt(MAX_CANVAS_PIXELS / area) : 2;\n const ratio = Math.max(1, Math.min(window.devicePixelRatio || 1, 2, budget));\n if (width === this.box.width && height === this.box.height && ratio === this.ratio) return false;\n\n this.box = { width, height };\n this.ratio = ratio;\n const canvas = this.canvasRef().nativeElement;\n canvas.width = Math.round(width * ratio);\n canvas.height = Math.round(height * ratio);\n // Resizing the bitmap resets the context, transform included, so the scale\n // goes on afterwards. Every coordinate below stays in CSS pixels.\n this.ctx?.setTransform(ratio, 0, 0, ratio, 0, 0);\n return true;\n }\n\n private setLines(): void {\n const { width, height } = this.box;\n this.lines = [];\n const oWidth = width + 200;\n const oHeight = height + 30;\n const xGap = this.xGap();\n const yGap = this.yGap();\n const totalLines = Math.ceil(oWidth / xGap);\n const totalPoints = Math.ceil(oHeight / yGap);\n const xStart = (width - xGap * totalLines) / 2;\n const yStart = (height - yGap * totalPoints) / 2;\n for (let i = 0; i <= totalLines; i++) {\n const pts: WavePoint[] = [];\n for (let j = 0; j <= totalPoints; j++) {\n pts.push({\n x: xStart + xGap * i,\n y: yStart + yGap * j,\n wave: { x: 0, y: 0 },\n cursor: { x: 0, y: 0, vx: 0, vy: 0 },\n });\n }\n this.lines.push(pts);\n }\n }\n\n // Frame loop\n\n private tick(time: number): void {\n const mouse = this.mouse;\n mouse.sx += (mouse.x - mouse.sx) * 0.1;\n mouse.sy += (mouse.y - mouse.sy) * 0.1;\n const dx = mouse.x - mouse.lx;\n const dy = mouse.y - mouse.ly;\n const d = Math.hypot(dx, dy);\n mouse.v = d;\n mouse.vs += (d - mouse.vs) * 0.1;\n mouse.vs = Math.min(100, mouse.vs);\n mouse.lx = mouse.x;\n mouse.ly = mouse.y;\n mouse.a = Math.atan2(dy, dx);\n\n this.lastTime = time;\n this.movePoints(time);\n this.drawLines();\n this.rafId = requestAnimationFrame(t => this.tick(t));\n }\n\n /** Put every point where the noise drifts it at `time`. */\n private drift(time: number): void {\n const waveSpeedX = this.waveSpeedX();\n const waveSpeedY = this.waveSpeedY();\n const waveAmpX = this.waveAmpX();\n const waveAmpY = this.waveAmpY();\n\n for (const pts of this.lines) {\n for (const p of pts) {\n const move = this.noise.perlin2((p.x + time * waveSpeedX) * 0.002, (p.y + time * waveSpeedY) * 0.0015) * 12;\n p.wave.x = Math.cos(move) * waveAmpX;\n p.wave.y = Math.sin(move) * waveAmpY;\n }\n }\n }\n\n private movePoints(time: number): void {\n this.drift(time);\n\n const mouse = this.mouse;\n const friction = this.friction();\n const tension = this.tension();\n const maxCursorMove = this.maxCursorMove();\n\n for (const pts of this.lines) {\n for (const p of pts) {\n const dx = p.x - mouse.sx;\n const dy = p.y - mouse.sy;\n const dist = Math.hypot(dx, dy);\n const l = Math.max(175, mouse.vs);\n if (dist < l) {\n const s = 1 - dist / l;\n const f = Math.cos(dist * 0.001) * s;\n p.cursor.vx += Math.cos(mouse.a) * f * l * mouse.vs * 0.00065;\n p.cursor.vy += Math.sin(mouse.a) * f * l * mouse.vs * 0.00065;\n }\n\n p.cursor.vx += (0 - p.cursor.x) * tension;\n p.cursor.vy += (0 - p.cursor.y) * tension;\n p.cursor.vx *= friction;\n p.cursor.vy *= friction;\n p.cursor.x += p.cursor.vx * 2;\n p.cursor.y += p.cursor.vy * 2;\n p.cursor.x = Math.min(maxCursorMove, Math.max(-maxCursorMove, p.cursor.x));\n p.cursor.y = Math.min(maxCursorMove, Math.max(-maxCursorMove, p.cursor.y));\n }\n }\n }\n\n private moved(point: WavePoint, withCursor: boolean): { x: number; y: number } {\n const x = point.x + point.wave.x + (withCursor ? point.cursor.x : 0);\n const y = point.y + point.wave.y + (withCursor ? point.cursor.y : 0);\n return { x: Math.round(x * 10) / 10, y: Math.round(y * 10) / 10 };\n }\n\n private drawLines(): void {\n const ctx = this.ctx;\n if (!ctx) return;\n // Retire the CSS stand-in: from here the canvas has real pixels. Set inside\n // the draw rather than at the end of `boot()` so it can never switch the\n // fallback off before something has actually been painted. Runs outside\n // Angular (the rAF loop does), so `signal.set` schedules the one host-binding\n // update it needs; every later call is a no-op on an unchanged value.\n if (!this.painted()) this.painted.set(true);\n const { width, height } = this.box;\n ctx.clearRect(0, 0, width, height);\n ctx.beginPath();\n ctx.strokeStyle = this.resolveLineColor();\n for (const points of this.lines) {\n // Both ends stay where the grid put them, as they did when each line was\n // a polyline; only the interior follows the pointer.\n const last = points.length - 1;\n const path = points.map((p, idx) => this.moved(p, idx > 0 && idx < last));\n // A curve through the MIDPOINTS, with each grid point as its control.\n // Joining the points themselves with `lineTo` put a corner at every one,\n // and at the default 32px pitch they read as a jagged line. Consecutive\n // curves share a tangent at the midpoint between them, so the line bends\n // without a kink anywhere and still passes near every point.\n ctx.moveTo(path[0].x, path[0].y);\n for (let i = 1; i < last; i++) {\n const p = path[i];\n const next = path[i + 1];\n ctx.quadraticCurveTo(p.x, p.y, (p.x + next.x) / 2, (p.y + next.y) / 2);\n }\n ctx.lineTo(path[last].x, path[last].y);\n }\n ctx.stroke();\n }\n\n /**\n * Explicit input wins; otherwise the theme's `--wr-waves-line-color`. Either\n * is resolved through the cascade before it reaches `strokeStyle`, which\n * reads neither a custom property nor the `light-dark()` the hook holds.\n * Called on every draw, so a colour-scheme change lands on the next frame.\n */\n private resolveLineColor(): string {\n const expression = this.lineColor() ?? 'var(--wr-waves-line-color)';\n return resolveCssColor(this.canvasRef().nativeElement, expression, 'rgba(15, 23, 42, 0.12)');\n }\n\n private updateMouse(x: number, y: number): void {\n // Re-read the box each move — cheaper than tracking scroll, and the\n // host is usually a hero that rarely reflows mid-gesture. The rect is the\n // box as drawn, after any transform on the host or an ancestor, and the\n // grid is laid out in the box before them, so the pointer is scaled back.\n const rect = this.host.nativeElement.getBoundingClientRect();\n const mouse = this.mouse;\n mouse.x = (x - rect.left) * (rect.width > 0 ? this.box.width / rect.width : 1);\n mouse.y = (y - rect.top) * (rect.height > 0 ? this.box.height / rect.height : 1);\n if (!mouse.set) {\n mouse.sx = mouse.x;\n mouse.sy = mouse.y;\n mouse.lx = mouse.x;\n mouse.ly = mouse.y;\n mouse.set = true;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsCA,IAAM,OAAN,MAAU;CAEW;CACA;CAFnB,YACmB,GACA,GAAS;EADT,KAAA,IAAA;EACA,KAAA,IAAA;CAChB;CAEH,KAAK,GAAW,GAAS;EACvB,OAAO,KAAK,IAAI,IAAI,KAAK,IAAI;CAC/B;AACD;AAED,MAAM,QAAyB;CAC7B,IAAI,KAAK,GAAG,CAAC;CACb,IAAI,KAAK,IAAI,CAAC;CACd,IAAI,KAAK,GAAG,EAAE;CACd,IAAI,KAAK,IAAI,EAAE;CACf,IAAI,KAAK,GAAG,CAAC;CACb,IAAI,KAAK,IAAI,CAAC;CACd,IAAI,KAAK,GAAG,CAAC;CACb,IAAI,KAAK,IAAI,CAAC;CACd,IAAI,KAAK,GAAG,CAAC;CACb,IAAI,KAAK,GAAG,EAAE;CACd,IAAI,KAAK,GAAG,CAAC;CACb,IAAI,KAAK,GAAG,EAAE;AACf;AAGD,MAAM,IAAuB;CAC3B;CAAK;CAAK;CAAK;CAAI;CAAI;CAAI;CAAK;CAAI;CAAK;CAAI;CAAI;CAAI;CAAK;CAAK;CAAG;CAAK;CAAK;CAAI;CAAK;CAAI;CAAI;CAAK;CAAG;CAAI;CAAI;CAC7G;CAAI;CAAI;CAAI;CAAK;CAAG;CAAK;CAAK;CAAK;CAAK;CAAI;CAAG;CAAI;CAAK;CAAI;CAAI;CAAK;CAAK;CAAK;CAAK;CAAI;CAAI;CAAI;CAAI;CAAK;CAAI;CAC7G;CAAK;CAAK;CAAI;CAAI;CAAK;CAAI;CAAK;CAAK;CAAK;CAAK;CAAI;CAAK;CAAI;CAAK;CAAI;CAAK;CAAK;CAAI;CAAI;CAAK;C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,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAQ,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ngwr-bits-waves.mjs","names":[],"sources":["../../../projects/lib/bits/waves/waves.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 Waves background by David Haz / reactbits.dev.\n * Original: https://www.reactbits.dev/backgrounds/waves\n *\n * A grid of vertical lines drawn on a 2D canvas. Each point drifts on\n * perlin noise and is pushed around by the pointer with a spring\n * (tension + friction) pulling it back to rest. Each line is drawn as\n * quadratic curves through the points' midpoints, not as straight segments.\n */\n\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n NgZone,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n effect,\n inject,\n input,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\n\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr, resolveCssColor, watchColorScheme } from 'ngwr/utils';\n\n// Perlin noise (Stefan Gustavson's reference permutation)\n/* eslint-disable no-bitwise -- permutation-table hashing is inherently bitwise */\n\nclass Grad {\n constructor(\n private readonly x: number,\n private readonly y: number\n ) {}\n\n dot2(x: number, y: number): number {\n return this.x * x + this.y * y;\n }\n}\n\nconst GRAD3: readonly Grad[] = [\n new Grad(1, 1),\n new Grad(-1, 1),\n new Grad(1, -1),\n new Grad(-1, -1),\n new Grad(1, 0),\n new Grad(-1, 0),\n new Grad(1, 0),\n new Grad(-1, 0),\n new Grad(0, 1),\n new Grad(0, -1),\n new Grad(0, 1),\n new Grad(0, -1),\n];\n\n// prettier-ignore\nconst P: readonly number[] = [\n 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240,\n 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33, 88,\n 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, 166, 77, 146, 158, 231, 83,\n 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244, 102, 143, 54, 65, 25, 63, 161, 1, 216,\n 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196, 135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, 186,\n 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118, 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58,\n 17, 182, 189, 28, 42, 223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155, 167, 43, 172, 9,\n 129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246, 97, 228, 251, 34, 242, 193,\n 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235, 249, 14, 239, 107, 49, 192, 214, 31, 181, 199, 106, 157,\n 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, 138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128,\n 195, 78, 66, 215, 61, 156, 180,\n];\n\nclass Noise {\n private readonly perm = new Array<number>(512);\n private readonly gradP = new Array<Grad>(512);\n\n constructor(seed: number) {\n if (seed > 0 && seed < 1) seed *= 65536;\n seed = Math.floor(seed);\n if (seed < 256) seed |= seed << 8;\n for (let i = 0; i < 256; i++) {\n const v = i & 1 ? P[i] ^ (seed & 255) : P[i] ^ ((seed >> 8) & 255);\n this.perm[i] = this.perm[i + 256] = v;\n this.gradP[i] = this.gradP[i + 256] = GRAD3[v % 12];\n }\n }\n\n private fade(t: number): number {\n return t * t * t * (t * (t * 6 - 15) + 10);\n }\n\n private lerp(a: number, b: number, t: number): number {\n return (1 - t) * a + t * b;\n }\n\n perlin2(x: number, y: number): number {\n let gx = Math.floor(x);\n let gy = Math.floor(y);\n x -= gx;\n y -= gy;\n gx &= 255;\n gy &= 255;\n const n00 = this.gradP[gx + this.perm[gy]].dot2(x, y);\n const n01 = this.gradP[gx + this.perm[gy + 1]].dot2(x, y - 1);\n const n10 = this.gradP[gx + 1 + this.perm[gy]].dot2(x - 1, y);\n const n11 = this.gradP[gx + 1 + this.perm[gy + 1]].dot2(x - 1, y - 1);\n const u = this.fade(x);\n return this.lerp(this.lerp(n00, n10, u), this.lerp(n01, n11, u), this.fade(y));\n }\n}\n\n/* eslint-enable no-bitwise */\n// Component\n\ninterface WavePoint {\n x: number;\n y: number;\n wave: { x: number; y: number };\n cursor: { x: number; y: number; vx: number; vy: number };\n}\n\n/**\n * Wave-field background — a grid of lines drifting on perlin noise,\n * nudged by the pointer. Fills its nearest positioned ancestor; put it\n * behind hero copy or section content.\n *\n * Colours are theme-aware by default: a soft dark line on light surfaces,\n * a faint white line on dark — override with `[lineColor]`.\n *\n * @example\n * ```html\n * <section style=\"position: relative\">\n * <wr-waves />\n * <h1>Hero copy above the waves</h1>\n * </section>\n * ```\n *\n * @see https://ngwr.dev/bits/waves\n */\n/**\n * The most bitmap pixels the canvas is backed with. The field is redrawn every\n * frame, so the backing store is a per-frame cost: a 1280-wide hero keeps the\n * full 2x (about 2.3 MP), and a wider one steps down toward 1x instead of\n * growing to a 3456-pixel-wide bitmap on a large retina window.\n */\nconst MAX_CANVAS_PIXELS = 2_500_000;\n\n@Component({\n selector: 'wr-waves',\n template: '<canvas #canvas class=\"wr-waves__canvas\" aria-hidden=\"true\"></canvas>',\n styleUrl: './waves.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-waves',\n '[style.background-color]': 'backgroundColor()',\n // Feeds the CSS stand-in grid (see waves.scss) so it matches the real\n // spacing, and switches it off the moment the canvas has painted.\n '[style.--wr-waves-x-gap.px]': 'xGap()',\n '[class.wr-waves--painted]': 'painted()',\n },\n})\nexport class WrWaves {\n /** Line stroke colour, any CSS colour. When unset, empty or blank, `--wr-waves-line-color` decides. */\n readonly lineColor = input<string | null>(null);\n\n /** Background fill behind the lines. @default 'transparent' */\n readonly backgroundColor = input('transparent');\n\n /** Horizontal noise drift per ms. @default 0.0125 */\n readonly waveSpeedX = input(0.0125, { transform: numAttr(0.0125) });\n\n /** Vertical noise drift per ms. @default 0.005 */\n readonly waveSpeedY = input(0.005, { transform: numAttr(0.005) });\n\n /** Horizontal wave amplitude in px. @default 32 */\n readonly waveAmpX = input(32, { transform: numAttr(32) });\n\n /** Vertical wave amplitude in px. @default 16 */\n readonly waveAmpY = input(16, { transform: numAttr(16) });\n\n /** Horizontal gap between lines in px. @default 10 */\n readonly xGap = input(10, { transform: numAttr(10) });\n\n /** Vertical gap between points on a line in px. @default 32 */\n readonly yGap = input(32, { transform: numAttr(32) });\n\n /** Velocity damping of the cursor spring, 0..1. @default 0.925 */\n readonly friction = input(0.925, { transform: numAttr(0.925) });\n\n /** Pull-back strength of the cursor spring. @default 0.005 */\n readonly tension = input(0.005, { transform: numAttr(0.005) });\n\n /** Max px a point can be dragged from rest. @default 100 */\n readonly maxCursorMove = input(100, { transform: numAttr(100) });\n\n private readonly canvasRef = viewChild.required<ElementRef<HTMLCanvasElement>>('canvas');\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly zone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n private readonly platform = inject(WrPlatform);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private ctx: CanvasRenderingContext2D | null = null;\n private readonly noise = new Noise(Math.random());\n private lines: WavePoint[][] = [];\n /** The host's layout box, in CSS pixels before any transform: what the grid is laid out in. */\n private box = { width: 0, height: 0 };\n /** Bitmap pixels per CSS pixel the canvas is backed at; 0 until the first fit. */\n private ratio = 0;\n private readonly mouse = { x: -10, y: 0, lx: 0, ly: 0, sx: 0, sy: 0, v: 0, vs: 0, a: 0, set: false };\n private rafId = 0;\n\n /**\n * Flips once the canvas has drawn, which retires the CSS stand-in grid.\n *\n * A canvas cannot be prerendered, so on an SSR'd or prerendered page this\n * element is simply blank until the bundle has loaded and hydration has run —\n * measured at ~2.8s on ngwr.dev's own home page. The stylesheet paints a static\n * grid of the same colour and pitch in the meantime, straight from the\n * prerendered HTML, and this hands over to the real thing.\n */\n protected readonly painted = signal(false);\n\n /** Flips once `boot()` has a context and a grid — the motion half waits for it. */\n private readonly booted = signal(false);\n\n /**\n * Whether the box has an area. The intersection observer calls a zero-area host\n * intersecting and sends no entry when it gains a size, so this reads the box instead.\n */\n private readonly hasBox = signal(false);\n\n constructor() {\n if (!this.isBrowser) return;\n\n afterNextRender(() => this.zone.runOutsideAngular(() => this.boot()));\n\n // Re-seed the grid when geometry inputs change. The bitmap is left alone,\n // so the next frame draws over the old grid rather than over a blank canvas.\n effect(() => {\n this.xGap();\n this.yGap();\n if (!this.ctx) return;\n this.setLines();\n // And paint it, when there is no frame loop to. Under\n // `prefers-reduced-motion` the grid is drawn once and no frame follows,\n // so a later gap change rebuilt the grid and left it undrawn — with\n // `.wr-waves--painted` already on the host, so the element stayed\n // visible and empty.\n if (this.platform.prefersReducedMotion()) this.drawLines();\n });\n\n // The still grid keeps the line colour it was drawn with, so a scheme switch\n // under reduced motion re-resolves it and draws the grid again. The loop\n // needs no help: every frame it draws resolves the colour afresh.\n watchColorScheme(() => {\n if (this.booted() && this.platform.prefersReducedMotion()) this.drawLines();\n });\n\n // Motion or a still grid, decided live: a preference switched while the page\n // is open used to keep the field drifting until a reload, because `boot()`\n // read it once.\n effect(onCleanup => {\n if (!this.booted()) return;\n if (this.platform.prefersReducedMotion()) {\n // One static, undisturbed grid — no drift, no loop, no pointer\n // reactivity. Repainted when the line colour changes, since there is\n // no next frame to pick it up.\n this.lineColor();\n untracked(() => {\n this.setLines();\n this.drawLines();\n });\n return;\n }\n if (!this.hasBox()) return;\n onCleanup(this.zone.runOutsideAngular(() => this.animate()));\n });\n }\n\n // Setup\n\n private boot(): void {\n const canvas = this.canvasRef().nativeElement;\n this.ctx = canvas.getContext('2d');\n if (!this.ctx) return;\n\n // `clientWidth` and not `getBoundingClientRect()`: the rect is the box after\n // transforms, and no observer hears of a transform, so a field booted inside\n // a dialog's scale-in kept a bitmap 96% of its box, stretched by CSS once\n // the animation ended. The observer's first entry follows with the exact,\n // sub-pixel size.\n const hostEl = this.host.nativeElement;\n this.fit(hostEl.clientWidth, hostEl.clientHeight);\n this.setLines();\n\n // The box is the observer's to follow, transforms excluded. A window resize\n // is for the pixel ratio, which browser zoom and a move to another screen\n // change with no box change at all.\n const onResize = (): void => this.resize(this.box.width, this.box.height);\n window.addEventListener('resize', onResize);\n const ro = new ResizeObserver(entries => {\n const rect = entries[entries.length - 1]?.contentRect;\n if (rect) this.resize(rect.width, rect.height);\n });\n ro.observe(hostEl);\n this.destroyRef.onDestroy(() => {\n window.removeEventListener('resize', onResize);\n ro.disconnect();\n });\n this.booted.set(true);\n }\n\n /** Start the drift and the pointer reactivity; returns what stops both. */\n private animate(): () => void {\n const onMouseMove = (e: MouseEvent): void => this.updateMouse(e.clientX, e.clientY);\n const onTouchMove = (e: TouchEvent): void => this.updateMouse(e.touches[0].clientX, e.touches[0].clientY);\n\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('touchmove', onTouchMove, { passive: true });\n\n const run = (): void => {\n if (this.rafId === 0) this.rafId = requestAnimationFrame(t => this.tick(t));\n };\n const halt = (): void => {\n cancelAnimationFrame(this.rafId);\n this.rafId = 0;\n };\n // Off screen the field stops asking for frames: it is decoration, and a\n // canvas redrawn out of sight still costs the browser a frame every frame.\n // Firefox on a wide retina window showed it: scrolled back up, the page\n // above the fold stayed blank for seconds until this loop and the pixel\n // budget below went in. Without an observer (jsdom) it simply runs. A box\n // flush against a zero-height clip intersects with nothing showing, and only a\n // second threshold reports the clip moving. It sits below any real ratio, or a\n // clip closing on a transition steps from under it to 0 without crossing anything.\n const io =\n typeof IntersectionObserver === 'undefined'\n ? null\n : new IntersectionObserver(\n entries => {\n const { isIntersecting, intersectionRatio } = entries[entries.length - 1];\n if (isIntersecting && intersectionRatio > 0) run();\n else halt();\n },\n { threshold: [0, 1e-9] }\n );\n if (io) io.observe(this.host.nativeElement);\n else run();\n\n return () => {\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('touchmove', onTouchMove);\n io?.disconnect();\n halt();\n };\n }\n\n /** Fit the canvas to a new box or pixel ratio and, when that cleared it, repaint at once. */\n private resize(width: number, height: number): void {\n const moved = width !== this.box.width || height !== this.box.height;\n if (!this.fit(width, height)) return;\n if (moved) {\n this.setLines();\n // Re-seeded points sit at rest. A drifting field puts them where the next\n // frame will, or the repaint below shows straight lines until it comes.\n if (!this.platform.prefersReducedMotion()) this.drift(performance.now());\n }\n // Observer entries arrive after the frame's own callbacks and before its\n // paint, and the fit cleared the bitmap, so a repaint left to the next frame\n // would leave this one blank: a resize drag flickered every frame.\n this.drawLines();\n }\n\n /**\n * Back the canvas for a `width` × `height` box, in CSS pixels, at the screen's\n * pixel ratio. Returns whether anything changed: writing `canvas.width` clears\n * the bitmap even to the value it already has, so an unchanged box is left alone.\n */\n private fit(width: number, height: number): boolean {\n // Backed at the screen's pixel ratio. A bitmap the size of the CSS box is\n // upscaled on a 2x screen, which smears every 1px line across two device\n // pixels and steps its curves. Capped at 2: the field repaints every frame,\n // and a 3x phone would push half as many pixels again for no visible gain.\n // Capped again by `MAX_CANVAS_PIXELS`, never below 1.\n const area = width * height;\n const budget = area > 0 ? Math.sqrt(MAX_CANVAS_PIXELS / area) : 2;\n const ratio = Math.max(1, Math.min(window.devicePixelRatio || 1, 2, budget));\n if (width === this.box.width && height === this.box.height && ratio === this.ratio) return false;\n\n this.box = { width, height };\n this.ratio = ratio;\n this.hasBox.set(width > 0 && height > 0);\n const canvas = this.canvasRef().nativeElement;\n canvas.width = Math.round(width * ratio);\n canvas.height = Math.round(height * ratio);\n // Resizing the bitmap resets the context, transform included, so the scale\n // goes on afterwards. Every coordinate below stays in CSS pixels.\n this.ctx?.setTransform(ratio, 0, 0, ratio, 0, 0);\n return true;\n }\n\n private setLines(): void {\n const { width, height } = this.box;\n this.lines = [];\n const oWidth = width + 200;\n const oHeight = height + 30;\n const xGap = this.xGap();\n const yGap = this.yGap();\n const totalLines = Math.ceil(oWidth / xGap);\n const totalPoints = Math.ceil(oHeight / yGap);\n const xStart = (width - xGap * totalLines) / 2;\n const yStart = (height - yGap * totalPoints) / 2;\n for (let i = 0; i <= totalLines; i++) {\n const pts: WavePoint[] = [];\n for (let j = 0; j <= totalPoints; j++) {\n pts.push({\n x: xStart + xGap * i,\n y: yStart + yGap * j,\n wave: { x: 0, y: 0 },\n cursor: { x: 0, y: 0, vx: 0, vy: 0 },\n });\n }\n this.lines.push(pts);\n }\n }\n\n // Frame loop\n\n private tick(time: number): void {\n const mouse = this.mouse;\n mouse.sx += (mouse.x - mouse.sx) * 0.1;\n mouse.sy += (mouse.y - mouse.sy) * 0.1;\n const dx = mouse.x - mouse.lx;\n const dy = mouse.y - mouse.ly;\n const d = Math.hypot(dx, dy);\n mouse.v = d;\n mouse.vs += (d - mouse.vs) * 0.1;\n mouse.vs = Math.min(100, mouse.vs);\n mouse.lx = mouse.x;\n mouse.ly = mouse.y;\n mouse.a = Math.atan2(dy, dx);\n\n this.movePoints(time);\n this.drawLines();\n this.rafId = requestAnimationFrame(t => this.tick(t));\n }\n\n /** Put every point where the noise drifts it at `time`. */\n private drift(time: number): void {\n const waveSpeedX = this.waveSpeedX();\n const waveSpeedY = this.waveSpeedY();\n const waveAmpX = this.waveAmpX();\n const waveAmpY = this.waveAmpY();\n\n for (const pts of this.lines) {\n for (const p of pts) {\n const move = this.noise.perlin2((p.x + time * waveSpeedX) * 0.002, (p.y + time * waveSpeedY) * 0.0015) * 12;\n p.wave.x = Math.cos(move) * waveAmpX;\n p.wave.y = Math.sin(move) * waveAmpY;\n }\n }\n }\n\n private movePoints(time: number): void {\n this.drift(time);\n\n const mouse = this.mouse;\n const friction = this.friction();\n const tension = this.tension();\n const maxCursorMove = this.maxCursorMove();\n\n for (const pts of this.lines) {\n for (const p of pts) {\n const dx = p.x - mouse.sx;\n const dy = p.y - mouse.sy;\n const dist = Math.hypot(dx, dy);\n const l = Math.max(175, mouse.vs);\n if (dist < l) {\n const s = 1 - dist / l;\n const f = Math.cos(dist * 0.001) * s;\n p.cursor.vx += Math.cos(mouse.a) * f * l * mouse.vs * 0.00065;\n p.cursor.vy += Math.sin(mouse.a) * f * l * mouse.vs * 0.00065;\n }\n\n p.cursor.vx += (0 - p.cursor.x) * tension;\n p.cursor.vy += (0 - p.cursor.y) * tension;\n p.cursor.vx *= friction;\n p.cursor.vy *= friction;\n p.cursor.x += p.cursor.vx * 2;\n p.cursor.y += p.cursor.vy * 2;\n p.cursor.x = Math.min(maxCursorMove, Math.max(-maxCursorMove, p.cursor.x));\n p.cursor.y = Math.min(maxCursorMove, Math.max(-maxCursorMove, p.cursor.y));\n }\n }\n }\n\n private moved(point: WavePoint, withCursor: boolean): { x: number; y: number } {\n const x = point.x + point.wave.x + (withCursor ? point.cursor.x : 0);\n const y = point.y + point.wave.y + (withCursor ? point.cursor.y : 0);\n return { x: Math.round(x * 10) / 10, y: Math.round(y * 10) / 10 };\n }\n\n private drawLines(): void {\n const ctx = this.ctx;\n if (!ctx) return;\n // Retire the CSS stand-in: from here the canvas has real pixels. Set inside\n // the draw rather than at the end of `boot()` so it can never switch the\n // fallback off before something has actually been painted. Runs outside\n // Angular (the rAF loop does), so `signal.set` schedules the one host-binding\n // update it needs; every later call is a no-op on an unchanged value.\n if (!this.painted()) this.painted.set(true);\n const { width, height } = this.box;\n ctx.clearRect(0, 0, width, height);\n ctx.beginPath();\n ctx.strokeStyle = this.resolveLineColor();\n for (const points of this.lines) {\n // Both ends stay where the grid put them, as they did when each line was\n // a polyline; only the interior follows the pointer.\n const last = points.length - 1;\n const path = points.map((p, idx) => this.moved(p, idx > 0 && idx < last));\n // A curve through the MIDPOINTS, with each grid point as its control.\n // Joining the points themselves with `lineTo` put a corner at every one,\n // and at the default 32px pitch they read as a jagged line. Consecutive\n // curves share a tangent at the midpoint between them, so the line bends\n // without a kink anywhere and still passes near every point.\n ctx.moveTo(path[0].x, path[0].y);\n for (let i = 1; i < last; i++) {\n const p = path[i];\n const next = path[i + 1];\n ctx.quadraticCurveTo(p.x, p.y, (p.x + next.x) / 2, (p.y + next.y) / 2);\n }\n ctx.lineTo(path[last].x, path[last].y);\n }\n ctx.stroke();\n }\n\n /**\n * Explicit input wins; otherwise the theme's `--wr-waves-line-color`. Either\n * is resolved through the cascade before it reaches `strokeStyle`, which\n * reads neither a custom property nor the `light-dark()` the hook holds.\n * Called on every draw, so a colour-scheme change lands on the next frame.\n */\n private resolveLineColor(): string {\n const expression = (this.lineColor() ?? '').trim() || 'var(--wr-waves-line-color)';\n return resolveCssColor(this.canvasRef().nativeElement, expression, 'rgba(15, 23, 42, 0.12)');\n }\n\n private updateMouse(x: number, y: number): void {\n // Re-read the box each move — cheaper than tracking scroll, and the\n // host is usually a hero that rarely reflows mid-gesture. The rect is the\n // box as drawn, after any transform on the host or an ancestor, and the\n // grid is laid out in the box before them, so the pointer is scaled back.\n const rect = this.host.nativeElement.getBoundingClientRect();\n const mouse = this.mouse;\n mouse.x = (x - rect.left) * (rect.width > 0 ? this.box.width / rect.width : 1);\n mouse.y = (y - rect.top) * (rect.height > 0 ? this.box.height / rect.height : 1);\n if (!mouse.set) {\n mouse.sx = mouse.x;\n mouse.sy = mouse.y;\n mouse.lx = mouse.x;\n mouse.ly = mouse.y;\n mouse.set = true;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsCA,IAAM,OAAN,MAAU;CAEW;CACA;CAFnB,YACmB,GACA,GAAS;EADT,KAAA,IAAA;EACA,KAAA,IAAA;CAChB;CAEH,KAAK,GAAW,GAAS;EACvB,OAAO,KAAK,IAAI,IAAI,KAAK,IAAI;CAC/B;AACD;AAED,MAAM,QAAyB;CAC7B,IAAI,KAAK,GAAG,CAAC;CACb,IAAI,KAAK,IAAI,CAAC;CACd,IAAI,KAAK,GAAG,EAAE;CACd,IAAI,KAAK,IAAI,EAAE;CACf,IAAI,KAAK,GAAG,CAAC;CACb,IAAI,KAAK,IAAI,CAAC;CACd,IAAI,KAAK,GAAG,CAAC;CACb,IAAI,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,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAQ,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -20,7 +20,7 @@ var WrBreadcrumbs = class WrBreadcrumbs {
|
|
|
20
20
|
separatorValue = computed(() => `"${cssString(this.separator())}"`, ...ngDevMode ? [{ debugName: "separatorValue" }] : /* istanbul ignore next */ []);
|
|
21
21
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
22
22
|
minVersion: "12.0.0",
|
|
23
|
-
version: "22.2.
|
|
23
|
+
version: "22.2.4",
|
|
24
24
|
ngImport: i0,
|
|
25
25
|
type: WrBreadcrumbs,
|
|
26
26
|
deps: [],
|
|
@@ -28,7 +28,7 @@ var WrBreadcrumbs = class WrBreadcrumbs {
|
|
|
28
28
|
});
|
|
29
29
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
30
30
|
minVersion: "17.1.0",
|
|
31
|
-
version: "22.2.
|
|
31
|
+
version: "22.2.4",
|
|
32
32
|
type: WrBreadcrumbs,
|
|
33
33
|
isStandalone: true,
|
|
34
34
|
selector: "wr-breadcrumbs",
|
|
@@ -60,7 +60,7 @@ var WrBreadcrumbs = class WrBreadcrumbs {
|
|
|
60
60
|
};
|
|
61
61
|
i0.ɵɵngDeclareClassMetadata({
|
|
62
62
|
minVersion: "12.0.0",
|
|
63
|
-
version: "22.2.
|
|
63
|
+
version: "22.2.4",
|
|
64
64
|
ngImport: i0,
|
|
65
65
|
type: WrBreadcrumbs,
|
|
66
66
|
decorators: [{
|
|
@@ -104,6 +104,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
104
104
|
var WrBreadcrumbsItem = class WrBreadcrumbsItem {
|
|
105
105
|
href = input(null, ...ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []);
|
|
106
106
|
routerLink = input(null, ...ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []);
|
|
107
|
+
queryParams = input(null, ...ngDevMode ? [{ debugName: "queryParams" }] : /* istanbul ignore next */ []);
|
|
107
108
|
external = input(false, ...ngDevMode ? [{ debugName: "external" }] : /* istanbul ignore next */ []);
|
|
108
109
|
icon = input(null, ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
|
|
109
110
|
isLink = computed(() => this.href() != null || this.routerLink() != null, ...ngDevMode ? [{ debugName: "isLink" }] : /* istanbul ignore next */ []);
|
|
@@ -111,7 +112,7 @@ var WrBreadcrumbsItem = class WrBreadcrumbsItem {
|
|
|
111
112
|
rootClass = computed(() => this.isLink() ? "wr-breadcrumbs__link" : "wr-breadcrumbs__current", ...ngDevMode ? [{ debugName: "rootClass" }] : /* istanbul ignore next */ []);
|
|
112
113
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
113
114
|
minVersion: "12.0.0",
|
|
114
|
-
version: "22.2.
|
|
115
|
+
version: "22.2.4",
|
|
115
116
|
ngImport: i0,
|
|
116
117
|
type: WrBreadcrumbsItem,
|
|
117
118
|
deps: [],
|
|
@@ -119,7 +120,7 @@ var WrBreadcrumbsItem = class WrBreadcrumbsItem {
|
|
|
119
120
|
});
|
|
120
121
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
121
122
|
minVersion: "17.0.0",
|
|
122
|
-
version: "22.2.
|
|
123
|
+
version: "22.2.4",
|
|
123
124
|
type: WrBreadcrumbsItem,
|
|
124
125
|
isStandalone: true,
|
|
125
126
|
selector: "wr-breadcrumbs-item",
|
|
@@ -138,6 +139,13 @@ var WrBreadcrumbsItem = class WrBreadcrumbsItem {
|
|
|
138
139
|
isRequired: false,
|
|
139
140
|
transformFunction: null
|
|
140
141
|
},
|
|
142
|
+
queryParams: {
|
|
143
|
+
classPropertyName: "queryParams",
|
|
144
|
+
publicName: "queryParams",
|
|
145
|
+
isSignal: true,
|
|
146
|
+
isRequired: false,
|
|
147
|
+
transformFunction: null
|
|
148
|
+
},
|
|
141
149
|
external: {
|
|
142
150
|
classPropertyName: "external",
|
|
143
151
|
publicName: "external",
|
|
@@ -158,7 +166,7 @@ var WrBreadcrumbsItem = class WrBreadcrumbsItem {
|
|
|
158
166
|
classAttribute: "wr-breadcrumbs__item"
|
|
159
167
|
},
|
|
160
168
|
ngImport: i0,
|
|
161
|
-
template: "<!--\n The label lives in a template rather than inside each branch below. A default\n `<ng-content />` written into two `@if` branches fills only ONE of them — the\n last in static order — and the other renders empty, with no template error and\n nothing in the console. This component has been broken exactly that way\n before; stamping one template from either branch keeps two anchors and one\n projection.\n-->\n<ng-template #label>\n @if (icon(); as i) {\n <wr-icon class=\"wr-breadcrumbs__icon\" [name]=\"i\" />\n }\n <ng-content />\n</ng-template>\n\n@if (isRouter()) {\n <!--\n Only ROUTER crumbs get `RouterLink`. Applied unconditionally it owns the\n anchor's `href` and writes null into it whenever `routerLink` is null —\n which silently turned every `href`-based crumb, a documented input, into\n text that navigates nowhere.\n -->\n <a [class]=\"rootClass()\" [routerLink]=\"routerLink()\">\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n} @else {\n <a\n [class]=\"rootClass()\"\n [attr.href]=\"href()\"\n [attr.aria-current]=\"isLink() ? null : 'page'\"\n [attr.role]=\"isLink() ? null : 'text'\"\n [attr.tabindex]=\"isLink() ? null : -1\"\n [attr.target]=\"external() ? '_blank' : null\"\n [attr.rel]=\"external() ? 'noreferrer noopener' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n}\n",
|
|
169
|
+
template: "<!--\n The label lives in a template rather than inside each branch below. A default\n `<ng-content />` written into two `@if` branches fills only ONE of them — the\n last in static order — and the other renders empty, with no template error and\n nothing in the console. This component has been broken exactly that way\n before; stamping one template from either branch keeps two anchors and one\n projection.\n-->\n<ng-template #label>\n @if (icon(); as i) {\n <wr-icon class=\"wr-breadcrumbs__icon\" [name]=\"i\" />\n }\n <ng-content />\n</ng-template>\n\n@if (isRouter()) {\n <!--\n Only ROUTER crumbs get `RouterLink`. Applied unconditionally it owns the\n anchor's `href` and writes null into it whenever `routerLink` is null —\n which silently turned every `href`-based crumb, a documented input, into\n text that navigates nowhere.\n -->\n <a [class]=\"rootClass()\" [routerLink]=\"routerLink()\" [queryParams]=\"queryParams()\">\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n} @else {\n <a\n [class]=\"rootClass()\"\n [attr.href]=\"href()\"\n [attr.aria-current]=\"isLink() ? null : 'page'\"\n [attr.role]=\"isLink() ? null : 'text'\"\n [attr.tabindex]=\"isLink() ? null : -1\"\n [attr.target]=\"external() ? '_blank' : null\"\n [attr.rel]=\"external() ? 'noreferrer noopener' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n}\n",
|
|
162
170
|
dependencies: [
|
|
163
171
|
{
|
|
164
172
|
kind: "directive",
|
|
@@ -201,7 +209,7 @@ var WrBreadcrumbsItem = class WrBreadcrumbsItem {
|
|
|
201
209
|
};
|
|
202
210
|
i0.ɵɵngDeclareClassMetadata({
|
|
203
211
|
minVersion: "12.0.0",
|
|
204
|
-
version: "22.2.
|
|
212
|
+
version: "22.2.4",
|
|
205
213
|
ngImport: i0,
|
|
206
214
|
type: WrBreadcrumbsItem,
|
|
207
215
|
decorators: [{
|
|
@@ -218,7 +226,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
218
226
|
class: "wr-breadcrumbs__item",
|
|
219
227
|
role: "listitem"
|
|
220
228
|
},
|
|
221
|
-
template: "<!--\n The label lives in a template rather than inside each branch below. A default\n `<ng-content />` written into two `@if` branches fills only ONE of them — the\n last in static order — and the other renders empty, with no template error and\n nothing in the console. This component has been broken exactly that way\n before; stamping one template from either branch keeps two anchors and one\n projection.\n-->\n<ng-template #label>\n @if (icon(); as i) {\n <wr-icon class=\"wr-breadcrumbs__icon\" [name]=\"i\" />\n }\n <ng-content />\n</ng-template>\n\n@if (isRouter()) {\n <!--\n Only ROUTER crumbs get `RouterLink`. Applied unconditionally it owns the\n anchor's `href` and writes null into it whenever `routerLink` is null —\n which silently turned every `href`-based crumb, a documented input, into\n text that navigates nowhere.\n -->\n <a [class]=\"rootClass()\" [routerLink]=\"routerLink()\">\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n} @else {\n <a\n [class]=\"rootClass()\"\n [attr.href]=\"href()\"\n [attr.aria-current]=\"isLink() ? null : 'page'\"\n [attr.role]=\"isLink() ? null : 'text'\"\n [attr.tabindex]=\"isLink() ? null : -1\"\n [attr.target]=\"external() ? '_blank' : null\"\n [attr.rel]=\"external() ? 'noreferrer noopener' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n}\n"
|
|
229
|
+
template: "<!--\n The label lives in a template rather than inside each branch below. A default\n `<ng-content />` written into two `@if` branches fills only ONE of them — the\n last in static order — and the other renders empty, with no template error and\n nothing in the console. This component has been broken exactly that way\n before; stamping one template from either branch keeps two anchors and one\n projection.\n-->\n<ng-template #label>\n @if (icon(); as i) {\n <wr-icon class=\"wr-breadcrumbs__icon\" [name]=\"i\" />\n }\n <ng-content />\n</ng-template>\n\n@if (isRouter()) {\n <!--\n Only ROUTER crumbs get `RouterLink`. Applied unconditionally it owns the\n anchor's `href` and writes null into it whenever `routerLink` is null —\n which silently turned every `href`-based crumb, a documented input, into\n text that navigates nowhere.\n -->\n <a [class]=\"rootClass()\" [routerLink]=\"routerLink()\" [queryParams]=\"queryParams()\">\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n} @else {\n <a\n [class]=\"rootClass()\"\n [attr.href]=\"href()\"\n [attr.aria-current]=\"isLink() ? null : 'page'\"\n [attr.role]=\"isLink() ? null : 'text'\"\n [attr.tabindex]=\"isLink() ? null : -1\"\n [attr.target]=\"external() ? '_blank' : null\"\n [attr.rel]=\"external() ? 'noreferrer noopener' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n}\n"
|
|
222
230
|
}]
|
|
223
231
|
}],
|
|
224
232
|
propDecorators: {
|
|
@@ -238,6 +246,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
238
246
|
required: false
|
|
239
247
|
}]
|
|
240
248
|
}],
|
|
249
|
+
queryParams: [{
|
|
250
|
+
type: i0.Input,
|
|
251
|
+
args: [{
|
|
252
|
+
isSignal: true,
|
|
253
|
+
alias: "queryParams",
|
|
254
|
+
required: false
|
|
255
|
+
}]
|
|
256
|
+
}],
|
|
241
257
|
external: [{
|
|
242
258
|
type: i0.Input,
|
|
243
259
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-breadcrumbs.mjs","names":[],"sources":["../../../projects/lib/breadcrumbs/breadcrumbs.ts","../../../projects/lib/breadcrumbs/breadcrumbs.html","../../../projects/lib/breadcrumbs/breadcrumbs-item.ts","../../../projects/lib/breadcrumbs/breadcrumbs-item.html"],"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 { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\n\n/** Escape a string for use inside a double-quoted CSS `<string>`. */\nfunction cssString(value: string): string {\n return value.replace(/[\\\\\"]/g, '\\\\$&').replace(/[\\n\\r\\f]/g, char => `\\\\${char.codePointAt(0)!.toString(16)} `);\n}\n\n/**\n * Breadcrumb navigation. Project `<wr-breadcrumbs-item>` children — each keeps\n * its own element and takes `role=\"listitem\"` inside the `<ol>` rather than\n * rendering an `<li>`, separated by the configured glyph (default `/`). The\n * container exposes the `nav[aria-label]` landmark required by WCAG.\n *\n * @example\n * ```html\n * <wr-breadcrumbs>\n * <wr-breadcrumbs-item routerLink=\"/\">Home</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item routerLink=\"/docs\">Docs</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item>Current</wr-breadcrumbs-item>\n * </wr-breadcrumbs>\n *\n * <!-- Custom separator -->\n * <wr-breadcrumbs separator=\"›\">…</wr-breadcrumbs>\n * ```\n *\n * @see https://ngwr.dev/reference/components/breadcrumbs\n */\n@Component({\n selector: 'wr-breadcrumbs',\n templateUrl: './breadcrumbs.html',\n styleUrl: './breadcrumbs.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-breadcrumbs',\n '[style.--wr-breadcrumbs-separator]': 'separatorValue()',\n },\n})\nexport class WrBreadcrumbs {\n /** Separator glyph between items. Any short string. @default '/' */\n readonly separator = input('/');\n\n /**\n * Accessible label for the `nav` landmark. Falls back to `breadcrumbs.label`,\n * then `'Breadcrumbs'`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n // The English default used to live on the input itself, which made this the one\n // landmark in the library a catalog could not reach: `wr-anchor` and `wr-sidebar`\n // announced in Russian on the same page while this one stayed \"Breadcrumbs\", and\n // the only escape was restating `[ariaLabel]` on every trail.\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'breadcrumbs.label', 'Breadcrumbs');\n\n // The glyph is WRAPPED in quotes here and unwrapped by `content:` in the\n // stylesheet, so an unescaped `\"` inside it closes the library's own string\n // and the rest of the value is parsed as CSS — `/\" url(\"…\") \"` computes to\n // `content: \"/\" url(\"…\") \"\"`, an image the browser fetches. Escaping is the\n // whole fix, and it is lossless: a separator that IS a quote still renders.\n protected readonly separatorValue = computed(() => `\"${cssString(this.separator())}\"`);\n}\n","<nav class=\"wr-breadcrumbs__nav\" [attr.aria-label]=\"resolvedAriaLabel()\">\n <ol class=\"wr-breadcrumbs__list\">\n <ng-content />\n </ol>\n</nav>\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 { NgTemplateOutlet } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\n\n/**\n * One row inside `<wr-breadcrumbs>`. The host itself is the row — a\n * `<wr-breadcrumbs-item role=\"listitem\" class=\"wr-breadcrumbs__item\">`\n * inside the parent's `<ol>` — and it contains either a real\n * `<a class=\"wr-breadcrumbs__link\">` (when `[href]` or `[routerLink]` is\n * set) or, for the current crumb, a non-interactive\n * `<a class=\"wr-breadcrumbs__current\" role=\"text\" tabindex=\"-1\"\n * aria-current=\"page\">` (when neither is set — typically the last crumb).\n *\n * @example\n * ```html\n * <wr-breadcrumbs-item icon=\"home\" routerLink=\"/\">Home</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item href=\"https://ngwr.dev\">External</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item>Current page</wr-breadcrumbs-item>\n * ```\n */\n@Component({\n selector: 'wr-breadcrumbs-item',\n templateUrl: './breadcrumbs-item.html',\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, RouterLink, WrIcon],\n host: { class: 'wr-breadcrumbs__item', role: 'listitem' },\n})\nexport class WrBreadcrumbsItem {\n /** Plain anchor href. Overridden by `routerLink` when both are set. */\n readonly href = input<string | null>(null);\n\n /** Angular router target. Anything `RouterLink` accepts (string or `any[]`). */\n readonly routerLink = input<string | readonly unknown[] | null>(null);\n\n /** Open external `href` in a new tab. Ignored when `routerLink` is set. @default false */\n readonly external = input(false);\n\n /** Optional leading icon rendered inline before the label. @default null */\n readonly icon = input<WrIconName | null>(null);\n\n protected readonly isLink = computed(() => this.href() != null || this.routerLink() != null);\n protected readonly isRouter = computed(() => this.routerLink() != null);\n\n protected readonly rootClass = computed(() => (this.isLink() ? 'wr-breadcrumbs__link' : 'wr-breadcrumbs__current'));\n}\n","<!--\n The label lives in a template rather than inside each branch below. A default\n `<ng-content />` written into two `@if` branches fills only ONE of them — the\n last in static order — and the other renders empty, with no template error and\n nothing in the console. This component has been broken exactly that way\n before; stamping one template from either branch keeps two anchors and one\n projection.\n-->\n<ng-template #label>\n @if (icon(); as i) {\n <wr-icon class=\"wr-breadcrumbs__icon\" [name]=\"i\" />\n }\n <ng-content />\n</ng-template>\n\n@if (isRouter()) {\n <!--\n Only ROUTER crumbs get `RouterLink`. Applied unconditionally it owns the\n anchor's `href` and writes null into it whenever `routerLink` is null —\n which silently turned every `href`-based crumb, a documented input, into\n text that navigates nowhere.\n -->\n <a [class]=\"rootClass()\" [routerLink]=\"routerLink()\">\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n} @else {\n <a\n [class]=\"rootClass()\"\n [attr.href]=\"href()\"\n [attr.aria-current]=\"isLink() ? null : 'page'\"\n [attr.role]=\"isLink() ? null : 'text'\"\n [attr.tabindex]=\"isLink() ? null : -1\"\n [attr.target]=\"external() ? '_blank' : null\"\n [attr.rel]=\"external() ? 'noreferrer noopener' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n}\n"],"mappings":";;;;;;;;;;;;AAYA,SAAS,UAAU,OAAa;CAC9B,OAAO,MAAM,QAAQ,UAAU,MAAM,CAAC,CAAC,QAAQ,cAAa,SAAQ,KAAK,KAAK,YAAY,CAAC,CAAE,CAAC,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A;GAAA,MAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA,EAAA,QAAA,WAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UCpC9B;EAsCA,cAAA;GAAA;IAAA,MAAA;IAAA,MDLY;IAAgB,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAU,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAM,UAAA;IAAA,QAAA,CAAA,MAAA;GAAA;EAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAGnC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAP7B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAqB,eAEhB,kBAAkB;GAAI,SAC5B;IAAC;IAAkB;IAAY;GAAM;GAAC,MACzC;IAAE,OAAO;IAAwB,MAAM;GAAU;GAAE,UAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ngwr-breadcrumbs.mjs","names":[],"sources":["../../../projects/lib/breadcrumbs/breadcrumbs.ts","../../../projects/lib/breadcrumbs/breadcrumbs.html","../../../projects/lib/breadcrumbs/breadcrumbs-item.ts","../../../projects/lib/breadcrumbs/breadcrumbs-item.html"],"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 { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\n\n/** Escape a string for use inside a double-quoted CSS `<string>`. */\nfunction cssString(value: string): string {\n return value.replace(/[\\\\\"]/g, '\\\\$&').replace(/[\\n\\r\\f]/g, char => `\\\\${char.codePointAt(0)!.toString(16)} `);\n}\n\n/**\n * Breadcrumb navigation. Project `<wr-breadcrumbs-item>` children — each keeps\n * its own element and takes `role=\"listitem\"` inside the `<ol>` rather than\n * rendering an `<li>`, separated by the configured glyph (default `/`). The\n * container exposes the `nav[aria-label]` landmark required by WCAG.\n *\n * @example\n * ```html\n * <wr-breadcrumbs>\n * <wr-breadcrumbs-item routerLink=\"/\">Home</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item routerLink=\"/docs\">Docs</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item>Current</wr-breadcrumbs-item>\n * </wr-breadcrumbs>\n *\n * <!-- Custom separator -->\n * <wr-breadcrumbs separator=\"›\">…</wr-breadcrumbs>\n * ```\n *\n * @see https://ngwr.dev/reference/components/breadcrumbs\n */\n@Component({\n selector: 'wr-breadcrumbs',\n templateUrl: './breadcrumbs.html',\n styleUrl: './breadcrumbs.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-breadcrumbs',\n '[style.--wr-breadcrumbs-separator]': 'separatorValue()',\n },\n})\nexport class WrBreadcrumbs {\n /** Separator glyph between items. Any short string. @default '/' */\n readonly separator = input('/');\n\n /**\n * Accessible label for the `nav` landmark. Falls back to `breadcrumbs.label`,\n * then `'Breadcrumbs'`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n // The English default used to live on the input itself, which made this the one\n // landmark in the library a catalog could not reach: `wr-anchor` and `wr-sidebar`\n // announced in Russian on the same page while this one stayed \"Breadcrumbs\", and\n // the only escape was restating `[ariaLabel]` on every trail.\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'breadcrumbs.label', 'Breadcrumbs');\n\n // The glyph is WRAPPED in quotes here and unwrapped by `content:` in the\n // stylesheet, so an unescaped `\"` inside it closes the library's own string\n // and the rest of the value is parsed as CSS — `/\" url(\"…\") \"` computes to\n // `content: \"/\" url(\"…\") \"\"`, an image the browser fetches. Escaping is the\n // whole fix, and it is lossless: a separator that IS a quote still renders.\n protected readonly separatorValue = computed(() => `\"${cssString(this.separator())}\"`);\n}\n","<nav class=\"wr-breadcrumbs__nav\" [attr.aria-label]=\"resolvedAriaLabel()\">\n <ol class=\"wr-breadcrumbs__list\">\n <ng-content />\n </ol>\n</nav>\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 { NgTemplateOutlet } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { type Params, RouterLink } from '@angular/router';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\n\n/**\n * One row inside `<wr-breadcrumbs>`. The host itself is the row — a\n * `<wr-breadcrumbs-item role=\"listitem\" class=\"wr-breadcrumbs__item\">`\n * inside the parent's `<ol>` — and it contains either a real\n * `<a class=\"wr-breadcrumbs__link\">` (when `[href]` or `[routerLink]` is\n * set) or, for the current crumb, a non-interactive\n * `<a class=\"wr-breadcrumbs__current\" role=\"text\" tabindex=\"-1\"\n * aria-current=\"page\">` (when neither is set — typically the last crumb).\n *\n * @example\n * ```html\n * <wr-breadcrumbs-item icon=\"home\" routerLink=\"/\">Home</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item routerLink=\"/debts\" [queryParams]=\"{ date: day }\">Debts</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item href=\"https://ngwr.dev\">External</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item>Current page</wr-breadcrumbs-item>\n * ```\n */\n@Component({\n selector: 'wr-breadcrumbs-item',\n templateUrl: './breadcrumbs-item.html',\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, RouterLink, WrIcon],\n host: { class: 'wr-breadcrumbs__item', role: 'listitem' },\n})\nexport class WrBreadcrumbsItem {\n /** Plain anchor href. Overridden by `routerLink` when both are set. */\n readonly href = input<string | null>(null);\n\n /** Angular router target. Anything `RouterLink` accepts (string or `any[]`). */\n readonly routerLink = input<string | readonly unknown[] | null>(null);\n\n /**\n * Query parameters for a `routerLink` crumb, the way `RouterLink` takes them.\n * A `?` written into `routerLink` is part of the path, and the router escapes\n * it: `/debts?date=1` became `/debts%3Fdate%3D1`. Ignored without `routerLink`.\n *\n * @default null\n */\n readonly queryParams = input<Params | null>(null);\n\n /** Open external `href` in a new tab. Ignored when `routerLink` is set. @default false */\n readonly external = input(false);\n\n /** Optional leading icon rendered inline before the label. @default null */\n readonly icon = input<WrIconName | null>(null);\n\n protected readonly isLink = computed(() => this.href() != null || this.routerLink() != null);\n protected readonly isRouter = computed(() => this.routerLink() != null);\n\n protected readonly rootClass = computed(() => (this.isLink() ? 'wr-breadcrumbs__link' : 'wr-breadcrumbs__current'));\n}\n","<!--\n The label lives in a template rather than inside each branch below. A default\n `<ng-content />` written into two `@if` branches fills only ONE of them — the\n last in static order — and the other renders empty, with no template error and\n nothing in the console. This component has been broken exactly that way\n before; stamping one template from either branch keeps two anchors and one\n projection.\n-->\n<ng-template #label>\n @if (icon(); as i) {\n <wr-icon class=\"wr-breadcrumbs__icon\" [name]=\"i\" />\n }\n <ng-content />\n</ng-template>\n\n@if (isRouter()) {\n <!--\n Only ROUTER crumbs get `RouterLink`. Applied unconditionally it owns the\n anchor's `href` and writes null into it whenever `routerLink` is null —\n which silently turned every `href`-based crumb, a documented input, into\n text that navigates nowhere.\n -->\n <a [class]=\"rootClass()\" [routerLink]=\"routerLink()\" [queryParams]=\"queryParams()\">\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n} @else {\n <a\n [class]=\"rootClass()\"\n [attr.href]=\"href()\"\n [attr.aria-current]=\"isLink() ? null : 'page'\"\n [attr.role]=\"isLink() ? null : 'text'\"\n [attr.tabindex]=\"isLink() ? null : -1\"\n [attr.target]=\"external() ? '_blank' : null\"\n [attr.rel]=\"external() ? 'noreferrer noopener' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n}\n"],"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ngDeclareFactory({
|
|
28
28
|
minVersion: "12.0.0",
|
|
29
|
-
version: "22.2.
|
|
29
|
+
version: "22.2.4",
|
|
30
30
|
ngImport: i0,
|
|
31
31
|
type: WrBurger,
|
|
32
32
|
deps: [],
|
|
@@ -34,7 +34,7 @@ var WrBurger = class WrBurger {
|
|
|
34
34
|
});
|
|
35
35
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
36
36
|
minVersion: "17.1.0",
|
|
37
|
-
version: "22.2.
|
|
37
|
+
version: "22.2.4",
|
|
38
38
|
type: WrBurger,
|
|
39
39
|
isStandalone: true,
|
|
40
40
|
selector: "wr-burger",
|
|
@@ -70,7 +70,7 @@ var WrBurger = class WrBurger {
|
|
|
70
70
|
};
|
|
71
71
|
i0.ɵɵngDeclareClassMetadata({
|
|
72
72
|
minVersion: "12.0.0",
|
|
73
|
-
version: "22.2.
|
|
73
|
+
version: "22.2.4",
|
|
74
74
|
ngImport: i0,
|
|
75
75
|
type: WrBurger,
|
|
76
76
|
decorators: [{
|
package/fesm2022/ngwr-button.mjs
CHANGED
|
@@ -115,7 +115,7 @@ var WrButton = class WrButton {
|
|
|
115
115
|
}, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
116
116
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
117
117
|
minVersion: "12.0.0",
|
|
118
|
-
version: "22.2.
|
|
118
|
+
version: "22.2.4",
|
|
119
119
|
ngImport: i0,
|
|
120
120
|
type: WrButton,
|
|
121
121
|
deps: [],
|
|
@@ -123,7 +123,7 @@ var WrButton = class WrButton {
|
|
|
123
123
|
});
|
|
124
124
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
125
125
|
minVersion: "17.0.0",
|
|
126
|
-
version: "22.2.
|
|
126
|
+
version: "22.2.4",
|
|
127
127
|
type: WrButton,
|
|
128
128
|
isStandalone: true,
|
|
129
129
|
selector: "wr-btn, button[wr-btn], a[wr-btn]",
|
|
@@ -232,7 +232,7 @@ var WrButton = class WrButton {
|
|
|
232
232
|
};
|
|
233
233
|
i0.ɵɵngDeclareClassMetadata({
|
|
234
234
|
minVersion: "12.0.0",
|
|
235
|
-
version: "22.2.
|
|
235
|
+
version: "22.2.4",
|
|
236
236
|
ngImport: i0,
|
|
237
237
|
type: WrButton,
|
|
238
238
|
decorators: [{
|
|
@@ -355,7 +355,7 @@ var WrButtonGroup = class WrButtonGroup {
|
|
|
355
355
|
}, ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
|
|
356
356
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
357
357
|
minVersion: "12.0.0",
|
|
358
|
-
version: "22.2.
|
|
358
|
+
version: "22.2.4",
|
|
359
359
|
ngImport: i0,
|
|
360
360
|
type: WrButtonGroup,
|
|
361
361
|
deps: [],
|
|
@@ -363,7 +363,7 @@ var WrButtonGroup = class WrButtonGroup {
|
|
|
363
363
|
});
|
|
364
364
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
365
365
|
minVersion: "17.1.0",
|
|
366
|
-
version: "22.2.
|
|
366
|
+
version: "22.2.4",
|
|
367
367
|
type: WrButtonGroup,
|
|
368
368
|
isStandalone: true,
|
|
369
369
|
selector: "wr-btn-group",
|
|
@@ -390,7 +390,7 @@ var WrButtonGroup = class WrButtonGroup {
|
|
|
390
390
|
};
|
|
391
391
|
i0.ɵɵngDeclareClassMetadata({
|
|
392
392
|
minVersion: "12.0.0",
|
|
393
|
-
version: "22.2.
|
|
393
|
+
version: "22.2.4",
|
|
394
394
|
ngImport: i0,
|
|
395
395
|
type: WrButtonGroup,
|
|
396
396
|
decorators: [{
|