ngwr 15.0.0 → 15.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/anchor/styles/_index.scss +13 -2
  2. package/bits/dot-grid/dot-grid.scss +1 -0
  3. package/bits/dot-grid/styles/_index.scss +8 -0
  4. package/bits/dot-grid/styles/_rules.scss +46 -0
  5. package/bits/ripple-grid/ripple-grid.scss +1 -0
  6. package/bits/ripple-grid/styles/_index.scss +8 -0
  7. package/bits/ripple-grid/styles/_rules.scss +55 -0
  8. package/bits/threads/styles/_index.scss +8 -0
  9. package/bits/threads/styles/_rules.scss +68 -0
  10. package/bits/threads/threads.scss +1 -0
  11. package/charts/bar-chart/styles/_index.scss +607 -7
  12. package/charts/boxplot-chart/styles/_index.scss +297 -0
  13. package/charts/bullet-chart/styles/_index.scss +268 -0
  14. package/charts/calendar-heatmap/styles/_index.scss +25 -3
  15. package/charts/candlestick-chart/styles/_index.scss +307 -0
  16. package/charts/chart-legend/styles/_index.scss +143 -0
  17. package/charts/core/styles/_index.scss +30 -0
  18. package/charts/donut-chart/styles/_index.scss +39 -3
  19. package/charts/funnel-chart/styles/_index.scss +237 -0
  20. package/charts/gauge/styles/_index.scss +4 -2
  21. package/charts/heatmap-chart/styles/_index.scss +329 -0
  22. package/charts/line-chart/styles/_index.scss +141 -8
  23. package/charts/meter-group/styles/_index.scss +44 -13
  24. package/charts/radar-chart/styles/_index.scss +206 -0
  25. package/charts/scatter-chart/styles/_index.scss +245 -0
  26. package/charts/sparkline/styles/_index.scss +10 -1
  27. package/charts/treemap-chart/styles/_index.scss +215 -0
  28. package/charts/waterfall-chart/styles/_index.scss +321 -0
  29. package/collapse/styles/_index.scss +6 -1
  30. package/fesm2022/ngwr-bits-dot-grid-testing.mjs +40 -0
  31. package/fesm2022/ngwr-bits-dot-grid-testing.mjs.map +1 -0
  32. package/fesm2022/ngwr-bits-dot-grid.mjs +479 -0
  33. package/fesm2022/ngwr-bits-dot-grid.mjs.map +1 -0
  34. package/fesm2022/ngwr-bits-ripple-grid-testing.mjs +40 -0
  35. package/fesm2022/ngwr-bits-ripple-grid-testing.mjs.map +1 -0
  36. package/fesm2022/ngwr-bits-ripple-grid.mjs +808 -0
  37. package/fesm2022/ngwr-bits-ripple-grid.mjs.map +1 -0
  38. package/fesm2022/ngwr-bits-threads-testing.mjs +41 -0
  39. package/fesm2022/ngwr-bits-threads-testing.mjs.map +1 -0
  40. package/fesm2022/ngwr-bits-threads.mjs +477 -0
  41. package/fesm2022/ngwr-bits-threads.mjs.map +1 -0
  42. package/fesm2022/ngwr-bits-waves-testing.mjs.map +1 -1
  43. package/fesm2022/ngwr-bits-waves.mjs +49 -34
  44. package/fesm2022/ngwr-bits-waves.mjs.map +1 -1
  45. package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
  46. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  47. package/fesm2022/ngwr-cascader.mjs +2 -2
  48. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  49. package/fesm2022/ngwr-charts-bar-chart-testing.mjs +127 -3
  50. package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
  51. package/fesm2022/ngwr-charts-bar-chart.mjs +680 -46
  52. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  53. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +161 -0
  54. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -0
  55. package/fesm2022/ngwr-charts-boxplot-chart.mjs +517 -0
  56. package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -0
  57. package/fesm2022/ngwr-charts-bullet-chart-testing.mjs +68 -0
  58. package/fesm2022/ngwr-charts-bullet-chart-testing.mjs.map +1 -0
  59. package/fesm2022/ngwr-charts-bullet-chart.mjs +459 -0
  60. package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -0
  61. package/fesm2022/ngwr-charts-calendar-heatmap-testing.mjs +27 -0
  62. package/fesm2022/ngwr-charts-calendar-heatmap-testing.mjs.map +1 -1
  63. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +93 -14
  64. package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
  65. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +107 -0
  66. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -0
  67. package/fesm2022/ngwr-charts-candlestick-chart.mjs +508 -0
  68. package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -0
  69. package/fesm2022/ngwr-charts-chart-legend-testing.mjs +126 -0
  70. package/fesm2022/ngwr-charts-chart-legend-testing.mjs.map +1 -0
  71. package/fesm2022/ngwr-charts-chart-legend.mjs +251 -0
  72. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -0
  73. package/fesm2022/ngwr-charts-core.mjs +383 -0
  74. package/fesm2022/ngwr-charts-core.mjs.map +1 -0
  75. package/fesm2022/ngwr-charts-donut-chart-testing.mjs +10 -1
  76. package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
  77. package/fesm2022/ngwr-charts-donut-chart.mjs +184 -28
  78. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  79. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +100 -0
  80. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -0
  81. package/fesm2022/ngwr-charts-funnel-chart.mjs +415 -0
  82. package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -0
  83. package/fesm2022/ngwr-charts-gauge-testing.mjs +9 -3
  84. package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
  85. package/fesm2022/ngwr-charts-gauge.mjs +6 -12
  86. package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
  87. package/fesm2022/ngwr-charts-heatmap-chart-testing.mjs +120 -0
  88. package/fesm2022/ngwr-charts-heatmap-chart-testing.mjs.map +1 -0
  89. package/fesm2022/ngwr-charts-heatmap-chart.mjs +519 -0
  90. package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -0
  91. package/fesm2022/ngwr-charts-line-chart-testing.mjs +43 -1
  92. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  93. package/fesm2022/ngwr-charts-line-chart.mjs +433 -119
  94. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  95. package/fesm2022/ngwr-charts-meter-group-testing.mjs +14 -2
  96. package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
  97. package/fesm2022/ngwr-charts-meter-group.mjs +98 -29
  98. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  99. package/fesm2022/ngwr-charts-radar-chart-testing.mjs +98 -0
  100. package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -0
  101. package/fesm2022/ngwr-charts-radar-chart.mjs +720 -0
  102. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -0
  103. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +132 -0
  104. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -0
  105. package/fesm2022/ngwr-charts-scatter-chart.mjs +545 -0
  106. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -0
  107. package/fesm2022/ngwr-charts-sparkline-testing.mjs.map +1 -1
  108. package/fesm2022/ngwr-charts-sparkline.mjs +11 -13
  109. package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
  110. package/fesm2022/ngwr-charts-treemap-chart-testing.mjs +103 -0
  111. package/fesm2022/ngwr-charts-treemap-chart-testing.mjs.map +1 -0
  112. package/fesm2022/ngwr-charts-treemap-chart.mjs +535 -0
  113. package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -0
  114. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +131 -0
  115. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -0
  116. package/fesm2022/ngwr-charts-waterfall-chart.mjs +462 -0
  117. package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -0
  118. package/fesm2022/ngwr-i18n-ar.mjs +90 -4
  119. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  120. package/fesm2022/ngwr-i18n-cs.mjs +90 -4
  121. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  122. package/fesm2022/ngwr-i18n-de.mjs +90 -4
  123. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  124. package/fesm2022/ngwr-i18n-en.mjs +90 -4
  125. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  126. package/fesm2022/ngwr-i18n-es.mjs +90 -4
  127. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  128. package/fesm2022/ngwr-i18n-fr.mjs +90 -4
  129. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  130. package/fesm2022/ngwr-i18n-he.mjs +90 -4
  131. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  132. package/fesm2022/ngwr-i18n-hi.mjs +90 -4
  133. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  134. package/fesm2022/ngwr-i18n-id.mjs +90 -4
  135. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  136. package/fesm2022/ngwr-i18n-it.mjs +90 -4
  137. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  138. package/fesm2022/ngwr-i18n-ja.mjs +90 -4
  139. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  140. package/fesm2022/ngwr-i18n-ko.mjs +90 -4
  141. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  142. package/fesm2022/ngwr-i18n-nl.mjs +90 -4
  143. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  144. package/fesm2022/ngwr-i18n-pl.mjs +90 -4
  145. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  146. package/fesm2022/ngwr-i18n-pt.mjs +90 -4
  147. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  148. package/fesm2022/ngwr-i18n-ru.mjs +90 -4
  149. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  150. package/fesm2022/ngwr-i18n-sv.mjs +90 -4
  151. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  152. package/fesm2022/ngwr-i18n-tr.mjs +90 -4
  153. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  154. package/fesm2022/ngwr-i18n-uk.mjs +90 -4
  155. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  156. package/fesm2022/ngwr-i18n-vi.mjs +90 -4
  157. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  158. package/fesm2022/ngwr-i18n-zh-tw.mjs +90 -4
  159. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  160. package/fesm2022/ngwr-i18n-zh.mjs +90 -4
  161. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  162. package/fesm2022/ngwr-lightbox.mjs +2 -2
  163. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  164. package/fesm2022/ngwr-list.mjs +2 -2
  165. package/fesm2022/ngwr-list.mjs.map +1 -1
  166. package/fesm2022/ngwr-popover.mjs +31 -8
  167. package/fesm2022/ngwr-popover.mjs.map +1 -1
  168. package/fesm2022/ngwr-sortable-list.mjs +2 -2
  169. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  170. package/fesm2022/ngwr-toast-testing.mjs +2 -1
  171. package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
  172. package/fesm2022/ngwr-toast.mjs +25 -6
  173. package/fesm2022/ngwr-toast.mjs.map +1 -1
  174. package/fesm2022/ngwr-version.mjs +1 -1
  175. package/fesm2022/ngwr-version.mjs.map +1 -1
  176. package/fesm2022/ngwr-window-testing.mjs +61 -5
  177. package/fesm2022/ngwr-window-testing.mjs.map +1 -1
  178. package/fesm2022/ngwr-window.mjs +1526 -883
  179. package/fesm2022/ngwr-window.mjs.map +1 -1
  180. package/fesm2022/ngwr.mjs.map +1 -1
  181. package/i18n/ar.json +84 -4
  182. package/i18n/cs.json +84 -4
  183. package/i18n/de.json +84 -4
  184. package/i18n/en.json +84 -4
  185. package/i18n/es.json +84 -4
  186. package/i18n/fr.json +84 -4
  187. package/i18n/he.json +84 -4
  188. package/i18n/hi.json +84 -4
  189. package/i18n/id.json +84 -4
  190. package/i18n/it.json +84 -4
  191. package/i18n/ja.json +84 -4
  192. package/i18n/ko.json +84 -4
  193. package/i18n/nl.json +84 -4
  194. package/i18n/pl.json +84 -4
  195. package/i18n/pt.json +84 -4
  196. package/i18n/ru.json +84 -4
  197. package/i18n/sv.json +84 -4
  198. package/i18n/tr.json +84 -4
  199. package/i18n/uk.json +84 -4
  200. package/i18n/vi.json +84 -4
  201. package/i18n/zh-TW.json +84 -4
  202. package/i18n/zh.json +84 -4
  203. package/llms-full.txt +254 -8
  204. package/llms.txt +31 -8
  205. package/mcp/api.js +69 -1
  206. package/mcp/catalog.js +10 -1
  207. package/mcp/tools.js +119 -23
  208. package/package.json +129 -7
  209. package/popover/styles/_index.scss +75 -7
  210. package/schematics/component-style/index.js +3 -0
  211. package/schematics/migrations/v15/index.js +8 -28
  212. package/schematics/ng-add/index.js +1 -1
  213. package/schematics/use/symbol-map.json +13 -0
  214. package/schematics/utility/global-styles.js +19 -4
  215. package/schematics/utility/v15-moves.js +55 -0
  216. package/skills/ngwr/SKILL.md +8 -2
  217. package/skills/ngwr/references/catalog.md +26 -0
  218. package/skills/ngwr/references/setup.md +5 -4
  219. package/theme/styles/_focus.scss +8 -0
  220. package/toast/styles/_index.scss +103 -12
  221. package/types/ngwr-bits-dot-grid-testing.d.ts +92 -0
  222. package/types/ngwr-bits-dot-grid.d.ts +153 -0
  223. package/types/ngwr-bits-ripple-grid-testing.d.ts +96 -0
  224. package/types/ngwr-bits-ripple-grid.d.ts +297 -0
  225. package/types/ngwr-bits-threads-testing.d.ts +97 -0
  226. package/types/ngwr-bits-threads.d.ts +213 -0
  227. package/types/ngwr-bits-waves-testing.d.ts +1 -1
  228. package/types/ngwr-bits-waves.d.ts +16 -2
  229. package/types/ngwr-charts-bar-chart-testing.d.ts +193 -14
  230. package/types/ngwr-charts-bar-chart.d.ts +546 -38
  231. package/types/ngwr-charts-boxplot-chart-testing.d.ts +165 -0
  232. package/types/ngwr-charts-boxplot-chart.d.ts +308 -0
  233. package/types/ngwr-charts-bullet-chart-testing.d.ts +99 -0
  234. package/types/ngwr-charts-bullet-chart.d.ts +262 -0
  235. package/types/ngwr-charts-calendar-heatmap-testing.d.ts +32 -1
  236. package/types/ngwr-charts-calendar-heatmap.d.ts +55 -6
  237. package/types/ngwr-charts-candlestick-chart-testing.d.ts +135 -0
  238. package/types/ngwr-charts-candlestick-chart.d.ts +361 -0
  239. package/types/ngwr-charts-chart-legend-testing.d.ts +84 -0
  240. package/types/ngwr-charts-chart-legend.d.ts +178 -0
  241. package/types/ngwr-charts-core.d.ts +401 -0
  242. package/types/ngwr-charts-donut-chart-testing.d.ts +28 -5
  243. package/types/ngwr-charts-donut-chart.d.ts +124 -12
  244. package/types/ngwr-charts-funnel-chart-testing.d.ts +130 -0
  245. package/types/ngwr-charts-funnel-chart.d.ts +296 -0
  246. package/types/ngwr-charts-gauge-testing.d.ts +5 -0
  247. package/types/ngwr-charts-gauge.d.ts +6 -4
  248. package/types/ngwr-charts-heatmap-chart-testing.d.ts +148 -0
  249. package/types/ngwr-charts-heatmap-chart.d.ts +359 -0
  250. package/types/ngwr-charts-line-chart-testing.d.ts +72 -11
  251. package/types/ngwr-charts-line-chart.d.ts +291 -67
  252. package/types/ngwr-charts-meter-group-testing.d.ts +16 -2
  253. package/types/ngwr-charts-meter-group.d.ts +71 -11
  254. package/types/ngwr-charts-radar-chart-testing.d.ts +162 -0
  255. package/types/ngwr-charts-radar-chart.d.ts +461 -0
  256. package/types/ngwr-charts-scatter-chart-testing.d.ts +147 -0
  257. package/types/ngwr-charts-scatter-chart.d.ts +396 -0
  258. package/types/ngwr-charts-sparkline-testing.d.ts +4 -1
  259. package/types/ngwr-charts-sparkline.d.ts +8 -6
  260. package/types/ngwr-charts-treemap-chart-testing.d.ts +131 -0
  261. package/types/ngwr-charts-treemap-chart.d.ts +295 -0
  262. package/types/ngwr-charts-waterfall-chart-testing.d.ts +149 -0
  263. package/types/ngwr-charts-waterfall-chart.d.ts +338 -0
  264. package/types/ngwr-popover.d.ts +29 -2
  265. package/types/ngwr-toast-testing.d.ts +6 -1
  266. package/types/ngwr-version.d.ts +1 -1
  267. package/types/ngwr-window-testing.d.ts +65 -7
  268. package/types/ngwr-window.d.ts +885 -205
  269. package/types/ngwr.d.ts +1 -0
  270. package/window/styles/_index.scss +528 -82
@@ -1,5 +1,10 @@
1
1
  @use '../../theme/styles' as theme;
2
2
 
3
+ // One level of indent: the host's own, and again for a nested list. The active
4
+ // bar reaches back across every indent its link sits behind, so the two are one
5
+ // number.
6
+ $indent: 0.875rem;
7
+
3
8
  .wr-anchor {
4
9
  --wr-anchor-font-family: var(--wr-font-family-base);
5
10
  --wr-anchor-border: var(--wr-border-base);
@@ -20,7 +25,7 @@
20
25
  // the 1.5px bar lands at -0.5px and overlaps the rail it replaces. The
21
26
  // scale's nearest step is 16px, which paints the bar at 1.5px and opens a
22
27
  // gap between the marker and the rail at every nesting level.
23
- padding-inline-start: 0.875rem;
28
+ padding-inline-start: $indent;
24
29
 
25
30
  &__list {
26
31
  list-style: none;
@@ -32,7 +37,13 @@
32
37
 
33
38
  &--nested {
34
39
  margin-top: var(--wr-anchor-list-nested-margin-top);
35
- padding-inline-start: 0.875rem;
40
+ padding-inline-start: $indent;
41
+
42
+ // A nested link sits one indent further from the rail, so its bar reaches
43
+ // back that much further to land on the rail rather than float beside it.
44
+ .wr-anchor__link::before {
45
+ inset-inline-start: calc(-1rem - #{$indent});
46
+ }
36
47
  }
37
48
  }
38
49
 
@@ -0,0 +1 @@
1
+ @forward './styles/rules';
@@ -0,0 +1,8 @@
1
+ // Public Sass entry for `@use 'ngwr/bits/dot-grid'`.
2
+ //
3
+ // `dot-grid.scss` — the component's `styleUrl` — forwards `_rules` and nothing
4
+ // else, so the compiled component styles carry this component's own CSS and no
5
+ // second copy of the theme layer.
6
+ @use '../../../theme/styles';
7
+
8
+ @forward 'rules';
@@ -0,0 +1,46 @@
1
+ // Dot-grid background. The host fills its nearest positioned ancestor and the
2
+ // dots are drawn on a 2D canvas. A canvas reads neither a `var()` nor a
3
+ // `light-dark()`, so `dot-grid.ts` resolves both colour hooks through
4
+ // `resolveCssColor` before it fills with them.
5
+
6
+ .wr-dot-grid {
7
+ --wr-dot-grid-dot-color: var(--wr-border-strong);
8
+ --wr-dot-grid-active-color: var(--wr-color-primary);
9
+ // Mirror the `gap` and `dotSize` inputs; the component publishes both so the
10
+ // stand-in below lands on the canvas's own pitch.
11
+ --wr-dot-grid-gap: 24px;
12
+ --wr-dot-grid-dot-size: 3px;
13
+
14
+ position: absolute;
15
+ inset: 0;
16
+ z-index: 0;
17
+ display: block;
18
+ overflow: hidden;
19
+ // The pointer is followed on the parent, so the layer itself never takes a
20
+ // click or a hover from what sits behind or around it.
21
+ pointer-events: none;
22
+
23
+ // Stand-in grid, shown until the canvas has painted.
24
+ //
25
+ // A canvas cannot be prerendered, so on an SSR'd page the host is blank until
26
+ // the bundle has loaded and hydrated. These are the resting dots at the same
27
+ // colour, size and pitch, centred the way `placeDots()` centres the canvas grid,
28
+ // so the handover moves nothing.
29
+ background-image: radial-gradient(
30
+ circle,
31
+ var(--wr-dot-grid-dot-color) calc(var(--wr-dot-grid-dot-size) / 2 - 0.25px),
32
+ transparent calc(var(--wr-dot-grid-dot-size) / 2 + 0.25px)
33
+ );
34
+ background-position: center;
35
+ background-size: var(--wr-dot-grid-gap) var(--wr-dot-grid-gap);
36
+
37
+ &--painted {
38
+ background-image: none;
39
+ }
40
+
41
+ &__canvas {
42
+ display: block;
43
+ width: 100%;
44
+ height: 100%;
45
+ }
46
+ }
@@ -0,0 +1 @@
1
+ @forward './styles/rules';
@@ -0,0 +1,8 @@
1
+ // Public Sass entry for `@use 'ngwr/bits/ripple-grid'`.
2
+ //
3
+ // `ripple-grid.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,55 @@
1
+ // Ripple-grid background. The host fills its nearest positioned ancestor and
2
+ // the lines are drawn on a 2D canvas. A canvas reads neither a `var()` nor a
3
+ // `light-dark()`, so `ripple-grid.ts` resolves both colour hooks through
4
+ // `resolveCssColor` before it strokes with them.
5
+
6
+ .wr-ripple-grid {
7
+ --wr-ripple-grid-line-color: var(--wr-border-base);
8
+ --wr-ripple-grid-ripple-color: var(--wr-color-primary);
9
+ // Mirror the `cellSize` and `lineWidth` inputs; the component publishes both
10
+ // so the stand-in below lands on the canvas's own lines.
11
+ --wr-ripple-grid-cell-size: 40px;
12
+ --wr-ripple-grid-line-width: 1px;
13
+
14
+ position: absolute;
15
+ inset: 0;
16
+ z-index: 0;
17
+ display: block;
18
+ overflow: hidden;
19
+ // The pointer is followed on the parent, so the layer itself never takes a
20
+ // click or a hover from what sits behind or around it.
21
+ pointer-events: none;
22
+
23
+ // Stand-in grid, shown until the canvas has painted.
24
+ //
25
+ // A canvas cannot be prerendered, so on an SSR'd page the host is blank until
26
+ // the bundle has loaded and hydrated. These are the resting lines at the same
27
+ // colour, width and cell. The tiles are centred, which puts a cell on the
28
+ // centre of the box the way `draw()` lays the canvas grid out, and moved back
29
+ // by half a line so each line sits centred on its position the way a stroke
30
+ // does. The canvas then moves each line by up to half a device pixel so its
31
+ // edges land on whole pixels, which is all the handover moves.
32
+ background-image:
33
+ linear-gradient(
34
+ to right,
35
+ var(--wr-ripple-grid-line-color) var(--wr-ripple-grid-line-width),
36
+ transparent var(--wr-ripple-grid-line-width)
37
+ ),
38
+ linear-gradient(
39
+ to bottom,
40
+ var(--wr-ripple-grid-line-color) var(--wr-ripple-grid-line-width),
41
+ transparent var(--wr-ripple-grid-line-width)
42
+ );
43
+ background-position: calc(50% - var(--wr-ripple-grid-line-width) / 2) calc(50% - var(--wr-ripple-grid-line-width) / 2);
44
+ background-size: var(--wr-ripple-grid-cell-size) var(--wr-ripple-grid-cell-size);
45
+
46
+ &--painted {
47
+ background-image: none;
48
+ }
49
+
50
+ &__canvas {
51
+ display: block;
52
+ width: 100%;
53
+ height: 100%;
54
+ }
55
+ }
@@ -0,0 +1,8 @@
1
+ // Public Sass entry for `@use 'ngwr/bits/threads'`.
2
+ //
3
+ // `threads.scss` — the component's `styleUrl` — forwards `_rules` and nothing
4
+ // else, so the compiled component styles carry this component's own CSS and no
5
+ // second copy of the theme layer.
6
+ @use '../../../theme/styles';
7
+
8
+ @forward 'rules';
@@ -0,0 +1,68 @@
1
+ // Threads background. A 2D canvas fills the nearest positioned ancestor; the
2
+ // colour is theme-aware via `--wr-threads-color` unless `[color]` overrides it.
3
+ // A canvas cannot read a `light-dark()` or a `var()`, so `threads.ts` resolves
4
+ // the colour through `resolveCssColor` before it strokes with it.
5
+
6
+ .wr-threads {
7
+ // A soft wash of the primary intent. On the dark canvas the base reads too
8
+ // deep for a hairline to carry, so the dark side washes its `-lighter` shade.
9
+ --wr-threads-color: light-dark(
10
+ color-mix(in srgb, var(--wr-color-primary) 60%, transparent),
11
+ color-mix(in srgb, var(--wr-color-primary-lighter) 60%, transparent)
12
+ );
13
+ // Mirrors of the `lineCount`, `spread` and `lineWidth` inputs. The component
14
+ // publishes each on the host, so the stand-in below draws where the canvas will.
15
+ --wr-threads-count: 18;
16
+ --wr-threads-spread: 0.4;
17
+ --wr-threads-line-width: 1px;
18
+
19
+ position: absolute;
20
+ inset: 0;
21
+ z-index: 0;
22
+ display: block;
23
+ margin: 0;
24
+ padding: 0;
25
+ overflow: hidden;
26
+ pointer-events: none;
27
+
28
+ // Stand-in threads, shown until the canvas has painted.
29
+ //
30
+ // A canvas cannot be prerendered, so on an SSR'd or prerendered page the
31
+ // element is blank until the bundle has loaded and hydrated. These are the
32
+ // threads at rest — straight, evenly spaced across the band at its widest, in
33
+ // the same colour and width — so the handover reads as the threads starting to
34
+ // move rather than as content appearing. The image is the band's height plus
35
+ // one stroke, so the last line lands on its lower edge rather than outside it,
36
+ // and the mask over the same box fades the outer lines the way the canvas
37
+ // fades its outer threads, from the full colour in the middle to 40% at the
38
+ // edges. On a pseudo-element rather than the host, so the mask cannot reach a
39
+ // background an app gives the host.
40
+ &::before {
41
+ content: '';
42
+ position: absolute;
43
+ inset: 0;
44
+ background-image: repeating-linear-gradient(
45
+ to bottom,
46
+ var(--wr-threads-color) 0 var(--wr-threads-line-width),
47
+ transparent var(--wr-threads-line-width)
48
+ calc((100% - var(--wr-threads-line-width)) / max(1, var(--wr-threads-count) - 1))
49
+ );
50
+ background-position: center;
51
+ background-repeat: no-repeat;
52
+ background-size: 100% calc(var(--wr-threads-spread) * 100% + var(--wr-threads-line-width));
53
+ mask-image: linear-gradient(to bottom, rgb(0 0 0 / 40%), #000, rgb(0 0 0 / 40%));
54
+ mask-position: center;
55
+ mask-repeat: no-repeat;
56
+ mask-size: 100% calc(var(--wr-threads-spread) * 100% + var(--wr-threads-line-width));
57
+ }
58
+
59
+ &--painted::before {
60
+ content: none;
61
+ }
62
+
63
+ &__canvas {
64
+ display: block;
65
+ width: 100%;
66
+ height: 100%;
67
+ }
68
+ }
@@ -0,0 +1 @@
1
+ @forward './styles/rules';