ngwr 15.1.0 → 15.2.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/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 +3 -3
- 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 +6 -6
- 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 +6 -6
- 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 +3 -3
- package/fesm2022/ngwr-pipes.mjs +21 -21
- 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 +3 -3
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select.mjs +12 -12
- 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 +9 -9
- 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/llms-full.txt +12 -1
- 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 +1 -0
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +2 -0
- 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-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-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-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
|
@@ -22,4 +22,15 @@
|
|
|
22
22
|
width: 100%;
|
|
23
23
|
height: 100%;
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
// Under forced colours the ribbon would cover the palette's own ground, which forced
|
|
27
|
+
// text and marks are chosen against. The adjust inherits to the colour probe inside
|
|
28
|
+
// the canvas, which would otherwise read the forced colour, so a frame drawn in this
|
|
29
|
+
// mode is still right when it ends.
|
|
30
|
+
@media (forced-colors: active) {
|
|
31
|
+
&__canvas {
|
|
32
|
+
display: none;
|
|
33
|
+
forced-color-adjust: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
25
36
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
// so the handover moves nothing.
|
|
29
29
|
background-image: radial-gradient(
|
|
30
30
|
circle,
|
|
31
|
-
var(--wr-dot-grid-dot-color) calc(var(--wr-dot-grid-dot-size) / 2 - 0.25px),
|
|
31
|
+
var(--wr-dot-grid-input-dot-color, var(--wr-dot-grid-dot-color)) calc(var(--wr-dot-grid-dot-size) / 2 - 0.25px),
|
|
32
32
|
transparent calc(var(--wr-dot-grid-dot-size) / 2 + 0.25px)
|
|
33
33
|
);
|
|
34
34
|
background-position: center;
|
|
@@ -43,4 +43,12 @@
|
|
|
43
43
|
width: 100%;
|
|
44
44
|
height: 100%;
|
|
45
45
|
}
|
|
46
|
+
|
|
47
|
+
// The adjust inherits to the colour probe inside the canvas, which would otherwise
|
|
48
|
+
// read the forced colour. A still frame drawn then keeps it after the mode ends.
|
|
49
|
+
@media (forced-colors: active) {
|
|
50
|
+
&__canvas {
|
|
51
|
+
forced-color-adjust: none;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
46
54
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward './styles/rules';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Public Sass entry for `@use 'ngwr/bits/iridescence'`.
|
|
2
|
+
//
|
|
3
|
+
// `iridescence.scss` — the component's `styleUrl` — forwards `_rules` and
|
|
4
|
+
// nothing else, so the compiled component styles carry this component's own
|
|
5
|
+
// CSS and no second copy of the theme layer.
|
|
6
|
+
@use '../../../theme/styles';
|
|
7
|
+
|
|
8
|
+
@forward 'rules';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Iridescence background. A WebGL2 canvas fills the nearest positioned ancestor
|
|
2
|
+
// and the picture lives in the fragment shader. A uniform reads neither a `var()`
|
|
3
|
+
// nor a `light-dark()`, so `iridescence.ts` resolves the colour through
|
|
4
|
+
// `resolveCssColorChannels` before it reaches one.
|
|
5
|
+
|
|
6
|
+
.wr-iridescence {
|
|
7
|
+
// Multiplied over the picture, so white leaves it as it is.
|
|
8
|
+
--wr-iridescence-color: light-dark(#ffffff, #5c669e);
|
|
9
|
+
|
|
10
|
+
position: absolute;
|
|
11
|
+
inset: 0;
|
|
12
|
+
z-index: 0;
|
|
13
|
+
display: block;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
// The pointer is followed on the parent, so the layer itself never takes a
|
|
16
|
+
// click or a hover from what sits behind or around it.
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
|
|
19
|
+
// Stand-in, shown before hydration, on a machine with no WebGL2 and after a
|
|
20
|
+
// lost context, so the box is never empty and text placed on it keeps its
|
|
21
|
+
// ground. The colours are sampled from the shader's own output at a white tint,
|
|
22
|
+
// and the bands run along its drape axis: 329deg is the direction across the
|
|
23
|
+
// folds, `(-0.51, 0.86)` in GL. `multiply` is what `uColor` does to the shader,
|
|
24
|
+
// so an opaque tint lands on both the same way, and the second layer shades the
|
|
25
|
+
// far corners so the first does not read as plain stripes.
|
|
26
|
+
background-color: var(--wr-iridescence-input-color, var(--wr-iridescence-color));
|
|
27
|
+
background-image:
|
|
28
|
+
linear-gradient(59deg, #e6dcf0 0%, transparent 35%, transparent 65%, #d6d0ea 100%),
|
|
29
|
+
linear-gradient(
|
|
30
|
+
329deg,
|
|
31
|
+
#e9dbef 0%,
|
|
32
|
+
#c49cd1 16%,
|
|
33
|
+
#f2e6f3 32%,
|
|
34
|
+
#b2bcde 48%,
|
|
35
|
+
#7387b2 60%,
|
|
36
|
+
#d5c7e7 74%,
|
|
37
|
+
#c6bce4 86%,
|
|
38
|
+
#ebddf0 100%
|
|
39
|
+
);
|
|
40
|
+
background-blend-mode: multiply;
|
|
41
|
+
|
|
42
|
+
&__canvas {
|
|
43
|
+
display: block;
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
opacity: 0;
|
|
47
|
+
transition: opacity var(--wr-duration-slower) var(--wr-ease-in-out);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// The stand-in stays under it and is not retired. It is an approximation and
|
|
51
|
+
// not the same picture, so swapping one for the other would pop.
|
|
52
|
+
&--painted &__canvas {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media (prefers-reduced-motion: reduce) {
|
|
57
|
+
&__canvas {
|
|
58
|
+
transition: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// The browser has already taken the stand-in down to the palette's own ground,
|
|
63
|
+
// which forced text and marks are chosen against, and the silk would cover it. The
|
|
64
|
+
// adjust inherits to the colour probe inside the canvas, which would otherwise read
|
|
65
|
+
// the forced colour, so a frame drawn in this mode is still right when it ends.
|
|
66
|
+
@media (forced-colors: active) {
|
|
67
|
+
&__canvas {
|
|
68
|
+
display: none;
|
|
69
|
+
forced-color-adjust: none;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Vars driven from component inputs:
|
|
3
3
|
// --wr-marquee-gap gap between items (px)
|
|
4
4
|
// --wr-marquee-height item height (px)
|
|
5
|
-
// --wr-marquee-fade-color edge fade colour (falls back to
|
|
5
|
+
// --wr-marquee-input-fade-color edge fade colour (falls back to
|
|
6
|
+
// --wr-marquee-fade-color, then the page bg)
|
|
6
7
|
|
|
7
8
|
.wr-marquee {
|
|
8
9
|
--wr-marquee-gap: 32px;
|
|
@@ -10,6 +11,9 @@
|
|
|
10
11
|
// Default to the lib's surface colour; consumers can override via
|
|
11
12
|
// `[fadeOutColor]` or by setting `--wr-marquee-fade-color` directly.
|
|
12
13
|
--wr-marquee-fade-color-auto: var(--wr-color-surface, #ffffff);
|
|
14
|
+
// What `[fadeOutColor]` writes on the host, which the inline value beats. Unset here so
|
|
15
|
+
// a marquee rendered inside another one does not inherit its colour.
|
|
16
|
+
--wr-marquee-input-fade-color: initial;
|
|
13
17
|
|
|
14
18
|
position: relative;
|
|
15
19
|
display: block;
|
|
@@ -138,7 +142,7 @@
|
|
|
138
142
|
left: 0;
|
|
139
143
|
background: linear-gradient(
|
|
140
144
|
to right,
|
|
141
|
-
var(--wr-marquee-fade-color, var(--wr-marquee-fade-color-auto)) 0%,
|
|
145
|
+
var(--wr-marquee-input-fade-color, var(--wr-marquee-fade-color, var(--wr-marquee-fade-color-auto))) 0%,
|
|
142
146
|
rgba(0, 0, 0, 0) 100%
|
|
143
147
|
);
|
|
144
148
|
}
|
|
@@ -148,7 +152,7 @@
|
|
|
148
152
|
right: 0;
|
|
149
153
|
background: linear-gradient(
|
|
150
154
|
to left,
|
|
151
|
-
var(--wr-marquee-fade-color, var(--wr-marquee-fade-color-auto)) 0%,
|
|
155
|
+
var(--wr-marquee-input-fade-color, var(--wr-marquee-fade-color, var(--wr-marquee-fade-color-auto))) 0%,
|
|
152
156
|
rgba(0, 0, 0, 0) 100%
|
|
153
157
|
);
|
|
154
158
|
}
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
background-image:
|
|
33
33
|
linear-gradient(
|
|
34
34
|
to right,
|
|
35
|
-
var(--wr-ripple-grid-line-color) var(--wr-ripple-grid-line-width),
|
|
35
|
+
var(--wr-ripple-grid-input-line-color, var(--wr-ripple-grid-line-color)) var(--wr-ripple-grid-line-width),
|
|
36
36
|
transparent var(--wr-ripple-grid-line-width)
|
|
37
37
|
),
|
|
38
38
|
linear-gradient(
|
|
39
39
|
to bottom,
|
|
40
|
-
var(--wr-ripple-grid-line-color) var(--wr-ripple-grid-line-width),
|
|
40
|
+
var(--wr-ripple-grid-input-line-color, var(--wr-ripple-grid-line-color)) var(--wr-ripple-grid-line-width),
|
|
41
41
|
transparent var(--wr-ripple-grid-line-width)
|
|
42
42
|
);
|
|
43
43
|
background-position: calc(50% - var(--wr-ripple-grid-line-width) / 2) calc(50% - var(--wr-ripple-grid-line-width) / 2);
|
|
@@ -52,4 +52,12 @@
|
|
|
52
52
|
width: 100%;
|
|
53
53
|
height: 100%;
|
|
54
54
|
}
|
|
55
|
+
|
|
56
|
+
// The adjust inherits to the colour probe inside the canvas, which would otherwise
|
|
57
|
+
// read the forced colour. A still frame drawn then keeps it after the mode ends.
|
|
58
|
+
@media (forced-colors: active) {
|
|
59
|
+
&__canvas {
|
|
60
|
+
forced-color-adjust: none;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
55
63
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Cursor-tracked spotlight card (reactbits port). The `--wr-spotlight-x/y`
|
|
2
|
-
// vars come from the host's mousemove handler; `--wr-spotlight-color`
|
|
3
|
-
// set inline from the `[spotlightColor]` input when provided — otherwise
|
|
4
|
-
//
|
|
2
|
+
// vars come from the host's mousemove handler; `--wr-spotlight-input-color`
|
|
3
|
+
// is set inline from the `[spotlightColor]` input when provided — otherwise
|
|
4
|
+
// `--wr-spotlight-color` below decides. `--wr-color-on-surface` flips between
|
|
5
5
|
// schemes (dark on light surfaces, light on dark), so one tint reads as a
|
|
6
6
|
// dark-ish glow in light mode and a light beam in dark mode; the dark side
|
|
7
7
|
// takes a touch more alpha so the beam reads as bright as the classic
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
.wr-spotlight-card {
|
|
11
11
|
--wr-spotlight-x: 50%;
|
|
12
12
|
--wr-spotlight-y: 50%;
|
|
13
|
+
// What `[spotlightColor]` writes on the host, which the inline value beats. Unset here
|
|
14
|
+
// so a card projected inside another one does not inherit its colour.
|
|
15
|
+
--wr-spotlight-input-color: initial;
|
|
13
16
|
--wr-spotlight-color: light-dark(
|
|
14
17
|
color-mix(in srgb, var(--wr-color-on-surface) 15%, transparent),
|
|
15
18
|
color-mix(in srgb, var(--wr-color-on-surface) 22%, transparent)
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
inset: 0;
|
|
34
37
|
background: radial-gradient(
|
|
35
38
|
circle at var(--wr-spotlight-x) var(--wr-spotlight-y),
|
|
36
|
-
var(--wr-spotlight-color),
|
|
39
|
+
var(--wr-spotlight-input-color, var(--wr-spotlight-color)),
|
|
37
40
|
transparent var(--wr-spotlight-radius, 80%)
|
|
38
41
|
);
|
|
39
42
|
opacity: 0;
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
// Light surfaces get a primary comet; dark flips to the classic white.
|
|
7
7
|
// `[color]` overrides both inline.
|
|
8
8
|
--wr-star-border-color: light-dark(var(--wr-color-primary), #ffffff);
|
|
9
|
+
// What `[color]` writes on the host, which the inline value beats. Unset here so an
|
|
10
|
+
// instance projected inside another one does not inherit its colour.
|
|
11
|
+
--wr-star-border-input-color: initial;
|
|
9
12
|
--wr-star-border-speed: 6s;
|
|
10
13
|
--wr-star-border-radius: 20px;
|
|
11
14
|
--wr-star-border-opacity: 1;
|
|
@@ -33,8 +36,8 @@
|
|
|
33
36
|
// there, so each scheme draws the gradient it drew as its own stop.
|
|
34
37
|
background: radial-gradient(
|
|
35
38
|
circle,
|
|
36
|
-
var(--wr-star-border-color),
|
|
37
|
-
light-dark(color-mix(in srgb, var(--wr-star-border-color) 37.5%, transparent), transparent) 10%,
|
|
39
|
+
var(--wr-star-border-input-color, var(--wr-star-border-color)),
|
|
40
|
+
light-dark(color-mix(in srgb, var(--wr-star-border-input-color, var(--wr-star-border-color)) 37.5%, transparent), transparent) 10%,
|
|
38
41
|
transparent 16%
|
|
39
42
|
);
|
|
40
43
|
animation: wr-star-border-bottom var(--wr-star-border-speed) linear infinite alternate;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
inset: 0;
|
|
44
44
|
background-image: repeating-linear-gradient(
|
|
45
45
|
to bottom,
|
|
46
|
-
var(--wr-threads-color) 0 var(--wr-threads-line-width),
|
|
46
|
+
var(--wr-threads-input-color, var(--wr-threads-color)) 0 var(--wr-threads-line-width),
|
|
47
47
|
transparent var(--wr-threads-line-width)
|
|
48
48
|
calc((100% - var(--wr-threads-line-width)) / max(1, var(--wr-threads-count) - 1))
|
|
49
49
|
);
|
|
@@ -65,4 +65,12 @@
|
|
|
65
65
|
width: 100%;
|
|
66
66
|
height: 100%;
|
|
67
67
|
}
|
|
68
|
+
|
|
69
|
+
// The adjust inherits to the colour probe inside the canvas, which would otherwise
|
|
70
|
+
// read the forced colour. A still frame drawn then keeps it after the mode ends.
|
|
71
|
+
@media (forced-colors: active) {
|
|
72
|
+
&__canvas {
|
|
73
|
+
forced-color-adjust: none;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
68
76
|
}
|
|
@@ -43,5 +43,12 @@
|
|
|
43
43
|
width: 100%;
|
|
44
44
|
height: 100%;
|
|
45
45
|
}
|
|
46
|
-
}
|
|
47
46
|
|
|
47
|
+
// The adjust inherits to the colour probe inside the canvas, which would otherwise
|
|
48
|
+
// read the forced colour. A still frame drawn then keeps it after the mode ends.
|
|
49
|
+
@media (forced-colors: active) {
|
|
50
|
+
&__canvas {
|
|
51
|
+
forced-color-adjust: none;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -160,11 +160,11 @@ $-body: calc(100% - $-upper - $-lower);
|
|
|
160
160
|
pointer-events: none;
|
|
161
161
|
|
|
162
162
|
&--increase {
|
|
163
|
-
color: var(--wr-candlestick-chart-increase-color);
|
|
163
|
+
color: var(--wr-candlestick-chart-input-increase-color, var(--wr-candlestick-chart-increase-color));
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
&--decrease {
|
|
167
|
-
color: var(--wr-candlestick-chart-decrease-color);
|
|
167
|
+
color: var(--wr-candlestick-chart-input-decrease-color, var(--wr-candlestick-chart-decrease-color));
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
// The wicks: above the body and below it, never through it, so a hollow body is
|
package/fesm2022/ngwr-affix.mjs
CHANGED
|
@@ -129,7 +129,7 @@ var WrAffix = class WrAffix {
|
|
|
129
129
|
}
|
|
130
130
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
131
131
|
minVersion: "12.0.0",
|
|
132
|
-
version: "22.2.
|
|
132
|
+
version: "22.2.4",
|
|
133
133
|
ngImport: i0,
|
|
134
134
|
type: WrAffix,
|
|
135
135
|
deps: [],
|
|
@@ -137,7 +137,7 @@ var WrAffix = class WrAffix {
|
|
|
137
137
|
});
|
|
138
138
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
139
139
|
minVersion: "17.1.0",
|
|
140
|
-
version: "22.2.
|
|
140
|
+
version: "22.2.4",
|
|
141
141
|
type: WrAffix,
|
|
142
142
|
isStandalone: true,
|
|
143
143
|
selector: "[wrAffix]",
|
|
@@ -161,7 +161,7 @@ var WrAffix = class WrAffix {
|
|
|
161
161
|
};
|
|
162
162
|
i0.ɵɵngDeclareClassMetadata({
|
|
163
163
|
minVersion: "12.0.0",
|
|
164
|
-
version: "22.2.
|
|
164
|
+
version: "22.2.4",
|
|
165
165
|
ngImport: i0,
|
|
166
166
|
type: WrAffix,
|
|
167
167
|
decorators: [{
|
package/fesm2022/ngwr-alert.mjs
CHANGED
|
@@ -54,7 +54,7 @@ var WrAlert = class WrAlert {
|
|
|
54
54
|
}
|
|
55
55
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
56
56
|
minVersion: "12.0.0",
|
|
57
|
-
version: "22.2.
|
|
57
|
+
version: "22.2.4",
|
|
58
58
|
ngImport: i0,
|
|
59
59
|
type: WrAlert,
|
|
60
60
|
deps: [],
|
|
@@ -62,7 +62,7 @@ var WrAlert = class WrAlert {
|
|
|
62
62
|
});
|
|
63
63
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
64
64
|
minVersion: "17.0.0",
|
|
65
|
-
version: "22.2.
|
|
65
|
+
version: "22.2.4",
|
|
66
66
|
type: WrAlert,
|
|
67
67
|
isStandalone: true,
|
|
68
68
|
selector: "wr-alert",
|
|
@@ -137,7 +137,7 @@ var WrAlert = class WrAlert {
|
|
|
137
137
|
};
|
|
138
138
|
i0.ɵɵngDeclareClassMetadata({
|
|
139
139
|
minVersion: "12.0.0",
|
|
140
|
-
version: "22.2.
|
|
140
|
+
version: "22.2.4",
|
|
141
141
|
ngImport: i0,
|
|
142
142
|
type: WrAlert,
|
|
143
143
|
decorators: [{
|
package/fesm2022/ngwr-anchor.mjs
CHANGED
|
@@ -84,7 +84,7 @@ var WrAnchor = class WrAnchor {
|
|
|
84
84
|
}
|
|
85
85
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
86
86
|
minVersion: "12.0.0",
|
|
87
|
-
version: "22.2.
|
|
87
|
+
version: "22.2.4",
|
|
88
88
|
ngImport: i0,
|
|
89
89
|
type: WrAnchor,
|
|
90
90
|
deps: [],
|
|
@@ -92,7 +92,7 @@ var WrAnchor = class WrAnchor {
|
|
|
92
92
|
});
|
|
93
93
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
94
94
|
minVersion: "17.0.0",
|
|
95
|
-
version: "22.2.
|
|
95
|
+
version: "22.2.4",
|
|
96
96
|
type: WrAnchor,
|
|
97
97
|
isStandalone: true,
|
|
98
98
|
selector: "wr-anchor",
|
|
@@ -138,7 +138,7 @@ var WrAnchor = class WrAnchor {
|
|
|
138
138
|
};
|
|
139
139
|
i0.ɵɵngDeclareClassMetadata({
|
|
140
140
|
minVersion: "12.0.0",
|
|
141
|
-
version: "22.2.
|
|
141
|
+
version: "22.2.4",
|
|
142
142
|
ngImport: i0,
|
|
143
143
|
type: WrAnchor,
|
|
144
144
|
decorators: [{
|
package/fesm2022/ngwr-avatar.mjs
CHANGED
|
@@ -64,7 +64,7 @@ var WrAvatar = class WrAvatar {
|
|
|
64
64
|
}
|
|
65
65
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
66
66
|
minVersion: "12.0.0",
|
|
67
|
-
version: "22.2.
|
|
67
|
+
version: "22.2.4",
|
|
68
68
|
ngImport: i0,
|
|
69
69
|
type: WrAvatar,
|
|
70
70
|
deps: [],
|
|
@@ -72,7 +72,7 @@ var WrAvatar = class WrAvatar {
|
|
|
72
72
|
});
|
|
73
73
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
74
74
|
minVersion: "17.0.0",
|
|
75
|
-
version: "22.2.
|
|
75
|
+
version: "22.2.4",
|
|
76
76
|
type: WrAvatar,
|
|
77
77
|
isStandalone: true,
|
|
78
78
|
selector: "wr-avatar",
|
|
@@ -132,7 +132,7 @@ var WrAvatar = class WrAvatar {
|
|
|
132
132
|
};
|
|
133
133
|
i0.ɵɵngDeclareClassMetadata({
|
|
134
134
|
minVersion: "12.0.0",
|
|
135
|
-
version: "22.2.
|
|
135
|
+
version: "22.2.4",
|
|
136
136
|
ngImport: i0,
|
|
137
137
|
type: WrAvatar,
|
|
138
138
|
decorators: [{
|
|
@@ -46,7 +46,7 @@ var WrBackTop = class WrBackTop {
|
|
|
46
46
|
}
|
|
47
47
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
48
48
|
minVersion: "12.0.0",
|
|
49
|
-
version: "22.2.
|
|
49
|
+
version: "22.2.4",
|
|
50
50
|
ngImport: i0,
|
|
51
51
|
type: WrBackTop,
|
|
52
52
|
deps: [],
|
|
@@ -54,7 +54,7 @@ var WrBackTop = class WrBackTop {
|
|
|
54
54
|
});
|
|
55
55
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
56
56
|
minVersion: "17.1.0",
|
|
57
|
-
version: "22.2.
|
|
57
|
+
version: "22.2.4",
|
|
58
58
|
type: WrBackTop,
|
|
59
59
|
isStandalone: true,
|
|
60
60
|
selector: "wr-back-top",
|
|
@@ -93,7 +93,7 @@ var WrBackTop = class WrBackTop {
|
|
|
93
93
|
};
|
|
94
94
|
i0.ɵɵngDeclareClassMetadata({
|
|
95
95
|
minVersion: "12.0.0",
|
|
96
|
-
version: "22.2.
|
|
96
|
+
version: "22.2.4",
|
|
97
97
|
ngImport: i0,
|
|
98
98
|
type: WrBackTop,
|
|
99
99
|
decorators: [{
|
package/fesm2022/ngwr-badge.mjs
CHANGED
|
@@ -30,7 +30,7 @@ var WrBadge = class WrBadge {
|
|
|
30
30
|
}, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
31
31
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
32
32
|
minVersion: "12.0.0",
|
|
33
|
-
version: "22.2.
|
|
33
|
+
version: "22.2.4",
|
|
34
34
|
ngImport: i0,
|
|
35
35
|
type: WrBadge,
|
|
36
36
|
deps: [],
|
|
@@ -38,7 +38,7 @@ var WrBadge = class WrBadge {
|
|
|
38
38
|
});
|
|
39
39
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
40
40
|
minVersion: "17.1.0",
|
|
41
|
-
version: "22.2.
|
|
41
|
+
version: "22.2.4",
|
|
42
42
|
type: WrBadge,
|
|
43
43
|
isStandalone: true,
|
|
44
44
|
selector: "wr-badge",
|
|
@@ -81,7 +81,7 @@ var WrBadge = class WrBadge {
|
|
|
81
81
|
};
|
|
82
82
|
i0.ɵɵngDeclareClassMetadata({
|
|
83
83
|
minVersion: "12.0.0",
|
|
84
|
-
version: "22.2.
|
|
84
|
+
version: "22.2.4",
|
|
85
85
|
ngImport: i0,
|
|
86
86
|
type: WrBadge,
|
|
87
87
|
decorators: [{
|
|
@@ -172,7 +172,7 @@ var WrTag = class WrTag {
|
|
|
172
172
|
}, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
173
173
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
174
174
|
minVersion: "12.0.0",
|
|
175
|
-
version: "22.2.
|
|
175
|
+
version: "22.2.4",
|
|
176
176
|
ngImport: i0,
|
|
177
177
|
type: WrTag,
|
|
178
178
|
deps: [],
|
|
@@ -180,7 +180,7 @@ var WrTag = class WrTag {
|
|
|
180
180
|
});
|
|
181
181
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
182
182
|
minVersion: "17.0.0",
|
|
183
|
-
version: "22.2.
|
|
183
|
+
version: "22.2.4",
|
|
184
184
|
type: WrTag,
|
|
185
185
|
isStandalone: true,
|
|
186
186
|
selector: "wr-tag",
|
|
@@ -261,7 +261,7 @@ var WrTag = class WrTag {
|
|
|
261
261
|
};
|
|
262
262
|
i0.ɵɵngDeclareClassMetadata({
|
|
263
263
|
minVersion: "12.0.0",
|
|
264
|
-
version: "22.2.
|
|
264
|
+
version: "22.2.4",
|
|
265
265
|
ngImport: i0,
|
|
266
266
|
type: WrTag,
|
|
267
267
|
decorators: [{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { Component, DestroyRef, ElementRef, NgZone, PLATFORM_ID, ViewEncapsulation, afterNextRender, effect, inject, input, signal, viewChild } from "@angular/core";
|
|
3
3
|
import { isPlatformBrowser } from "@angular/common";
|
|
4
|
-
import { numAttr,
|
|
4
|
+
import { numAttr, resolveCssColorChannels, watchColorScheme } from "ngwr/utils";
|
|
5
5
|
import { WrPlatform } from "ngwr/platform";
|
|
6
6
|
/**
|
|
7
7
|
* @license
|
|
@@ -133,24 +133,6 @@ const STOP_HOOKS = [
|
|
|
133
133
|
"var(--wr-aurora-stop-2)",
|
|
134
134
|
"var(--wr-aurora-stop-3)"
|
|
135
135
|
];
|
|
136
|
-
function toRgb01(color) {
|
|
137
|
-
const value = color.trim().toLowerCase();
|
|
138
|
-
const fn = /^(rgba?|color)\(\s*(srgb\s+)?([^)]*)\)$/.exec(value);
|
|
139
|
-
if (fn && (fn[1] !== "color" || fn[2] !== void 0)) {
|
|
140
|
-
const scale = fn[1] === "color" ? 1 : 255;
|
|
141
|
-
const channels = fn[3].split(/[\s,/]+/).slice(0, 3).map((part) => part === "none" ? 0 : Number.parseFloat(part) / scale);
|
|
142
|
-
if (channels.length !== 3 || !channels.every(Number.isFinite)) return null;
|
|
143
|
-
return channels.map((channel) => Math.min(1, Math.max(0, channel)));
|
|
144
|
-
}
|
|
145
|
-
const hex = /^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/.exec(value)?.[1];
|
|
146
|
-
if (hex === void 0) return null;
|
|
147
|
-
const full = hex.length <= 4 ? [...hex].map((digit) => digit + digit).join("") : hex;
|
|
148
|
-
return [
|
|
149
|
-
0,
|
|
150
|
-
2,
|
|
151
|
-
4
|
|
152
|
-
].map((at) => Number.parseInt(full.slice(at, at + 2), 16) / 255);
|
|
153
|
-
}
|
|
154
136
|
var WrAurora = class WrAurora {
|
|
155
137
|
colorStops = input(null, ...ngDevMode ? [{ debugName: "colorStops" }] : /* istanbul ignore next */ []);
|
|
156
138
|
amplitude = input(1, {
|
|
@@ -174,8 +156,10 @@ var WrAurora = class WrAurora {
|
|
|
174
156
|
gl = null;
|
|
175
157
|
uniforms = {};
|
|
176
158
|
rafId = 0;
|
|
159
|
+
time = 0;
|
|
177
160
|
booted = signal(false, ...ngDevMode ? [{ debugName: "booted" }] : /* istanbul ignore next */ []);
|
|
178
161
|
onScreen = signal(true, ...ngDevMode ? [{ debugName: "onScreen" }] : /* istanbul ignore next */ []);
|
|
162
|
+
hasBox = signal(false, ...ngDevMode ? [{ debugName: "hasBox" }] : /* istanbul ignore next */ []);
|
|
179
163
|
constructor() {
|
|
180
164
|
if (!this.isBrowser) return;
|
|
181
165
|
afterNextRender(() => this.zone.runOutsideAngular(() => this.boot()));
|
|
@@ -193,7 +177,7 @@ var WrAurora = class WrAurora {
|
|
|
193
177
|
this.draw(0);
|
|
194
178
|
});
|
|
195
179
|
effect((onCleanup) => {
|
|
196
|
-
if (!this.booted() || !this.onScreen() || this.platform.prefersReducedMotion()) return;
|
|
180
|
+
if (!this.booted() || !this.onScreen() || !this.hasBox() || this.platform.prefersReducedMotion()) return;
|
|
197
181
|
const loop = (t) => {
|
|
198
182
|
this.rafId = requestAnimationFrame(loop);
|
|
199
183
|
this.pushUniforms();
|
|
@@ -247,22 +231,31 @@ var WrAurora = class WrAurora {
|
|
|
247
231
|
const position = gl.getAttribLocation(program, "position");
|
|
248
232
|
gl.enableVertexAttribArray(position);
|
|
249
233
|
gl.vertexAttribPointer(position, 2, gl.FLOAT, false, 0, 0);
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
234
|
+
const hostEl = this.host.nativeElement;
|
|
235
|
+
const fit = () => {
|
|
236
|
+
const width = hostEl.clientWidth;
|
|
237
|
+
const height = hostEl.clientHeight;
|
|
238
|
+
this.hasBox.set(width > 0 && height > 0);
|
|
239
|
+
canvas.width = Math.max(1, width);
|
|
240
|
+
canvas.height = Math.max(1, height);
|
|
254
241
|
gl.viewport(0, 0, canvas.width, canvas.height);
|
|
255
242
|
gl.uniform2f(this.uniforms["uResolution"], canvas.width, canvas.height);
|
|
256
|
-
|
|
243
|
+
};
|
|
244
|
+
const resize = () => {
|
|
245
|
+
fit();
|
|
246
|
+
this.draw(this.platform.prefersReducedMotion() ? 0 : this.time);
|
|
257
247
|
};
|
|
258
248
|
window.addEventListener("resize", resize);
|
|
259
249
|
const ro = new ResizeObserver(resize);
|
|
260
|
-
ro.observe(
|
|
261
|
-
|
|
250
|
+
ro.observe(hostEl);
|
|
251
|
+
fit();
|
|
262
252
|
this.pushUniforms();
|
|
263
253
|
this.draw(0);
|
|
264
|
-
const io = typeof IntersectionObserver === "undefined" ? null : new IntersectionObserver((entries) =>
|
|
265
|
-
|
|
254
|
+
const io = typeof IntersectionObserver === "undefined" ? null : new IntersectionObserver((entries) => {
|
|
255
|
+
const { isIntersecting, intersectionRatio } = entries[entries.length - 1];
|
|
256
|
+
this.onScreen.set(isIntersecting && intersectionRatio > 0);
|
|
257
|
+
}, { threshold: [0, 1e-9] });
|
|
258
|
+
io?.observe(canvas);
|
|
266
259
|
this.destroyRef.onDestroy(() => {
|
|
267
260
|
window.removeEventListener("resize", resize);
|
|
268
261
|
ro.disconnect();
|
|
@@ -283,20 +276,19 @@ var WrAurora = class WrAurora {
|
|
|
283
276
|
const explicit = this.colorStops();
|
|
284
277
|
const fallback = DEFAULT_STOPS[index];
|
|
285
278
|
const expression = explicit === null ? STOP_HOOKS[index] : explicit[Math.min(index, explicit.length - 1)] ?? fallback;
|
|
286
|
-
|
|
287
|
-
const resolved = resolveCssColor(canvas, expression, fallback);
|
|
288
|
-
return toRgb01(resolved) ?? toRgb01(resolveCssColor(canvas, `color-mix(in srgb, ${resolved} 100%, transparent)`, fallback)) ?? toRgb01(fallback);
|
|
279
|
+
return resolveCssColorChannels(this.canvasRef().nativeElement, expression, fallback);
|
|
289
280
|
}
|
|
290
281
|
draw(time) {
|
|
291
282
|
const gl = this.gl;
|
|
292
|
-
if (!gl) return;
|
|
283
|
+
if (!gl || !this.hasBox()) return;
|
|
284
|
+
this.time = time;
|
|
293
285
|
gl.uniform1f(this.uniforms["uTime"], time);
|
|
294
286
|
gl.clear(gl.COLOR_BUFFER_BIT);
|
|
295
287
|
gl.drawArrays(gl.TRIANGLES, 0, 3);
|
|
296
288
|
}
|
|
297
289
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
298
290
|
minVersion: "12.0.0",
|
|
299
|
-
version: "22.2.
|
|
291
|
+
version: "22.2.4",
|
|
300
292
|
ngImport: i0,
|
|
301
293
|
type: WrAurora,
|
|
302
294
|
deps: [],
|
|
@@ -304,7 +296,7 @@ var WrAurora = class WrAurora {
|
|
|
304
296
|
});
|
|
305
297
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
306
298
|
minVersion: "17.2.0",
|
|
307
|
-
version: "22.2.
|
|
299
|
+
version: "22.2.4",
|
|
308
300
|
type: WrAurora,
|
|
309
301
|
isStandalone: true,
|
|
310
302
|
selector: "wr-aurora",
|
|
@@ -349,13 +341,13 @@ var WrAurora = class WrAurora {
|
|
|
349
341
|
ngImport: i0,
|
|
350
342
|
template: "<canvas #canvas class=\"wr-aurora__canvas\" aria-hidden=\"true\"></canvas>",
|
|
351
343
|
isInline: true,
|
|
352
|
-
styles: [".wr-aurora{--wr-aurora-stop-1: light-dark(#6366f1, #5227ff);--wr-aurora-stop-2: light-dark(#10b981, #7cff67);--wr-aurora-stop-3: light-dark(#6366f1, #5227ff);position:absolute;inset:0;display:block;overflow:hidden;pointer-events:none;z-index:0}.wr-aurora__canvas{display:block;width:100%;height:100%}\n"],
|
|
344
|
+
styles: [".wr-aurora{--wr-aurora-stop-1: light-dark(#6366f1, #5227ff);--wr-aurora-stop-2: light-dark(#10b981, #7cff67);--wr-aurora-stop-3: light-dark(#6366f1, #5227ff);position:absolute;inset:0;display:block;overflow:hidden;pointer-events:none;z-index:0}.wr-aurora__canvas{display:block;width:100%;height:100%}@media(forced-colors:active){.wr-aurora__canvas{display:none;forced-color-adjust:none}}\n"],
|
|
353
345
|
encapsulation: i0.ViewEncapsulation.None
|
|
354
346
|
});
|
|
355
347
|
};
|
|
356
348
|
i0.ɵɵngDeclareClassMetadata({
|
|
357
349
|
minVersion: "12.0.0",
|
|
358
|
-
version: "22.2.
|
|
350
|
+
version: "22.2.4",
|
|
359
351
|
ngImport: i0,
|
|
360
352
|
type: WrAurora,
|
|
361
353
|
decorators: [{
|
|
@@ -365,7 +357,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
365
357
|
template: "<canvas #canvas class=\"wr-aurora__canvas\" aria-hidden=\"true\"></canvas>",
|
|
366
358
|
encapsulation: ViewEncapsulation.None,
|
|
367
359
|
host: { class: "wr-aurora" },
|
|
368
|
-
styles: [".wr-aurora{--wr-aurora-stop-1: light-dark(#6366f1, #5227ff);--wr-aurora-stop-2: light-dark(#10b981, #7cff67);--wr-aurora-stop-3: light-dark(#6366f1, #5227ff);position:absolute;inset:0;display:block;overflow:hidden;pointer-events:none;z-index:0}.wr-aurora__canvas{display:block;width:100%;height:100%}\n"]
|
|
360
|
+
styles: [".wr-aurora{--wr-aurora-stop-1: light-dark(#6366f1, #5227ff);--wr-aurora-stop-2: light-dark(#10b981, #7cff67);--wr-aurora-stop-3: light-dark(#6366f1, #5227ff);position:absolute;inset:0;display:block;overflow:hidden;pointer-events:none;z-index:0}.wr-aurora__canvas{display:block;width:100%;height:100%}@media(forced-colors:active){.wr-aurora__canvas{display:none;forced-color-adjust:none}}\n"]
|
|
369
361
|
}]
|
|
370
362
|
}],
|
|
371
363
|
ctorParameters: () => [],
|