ngwr 13.0.0 → 13.0.1

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 (47) hide show
  1. package/fesm2022/ngwr-border-glow.mjs +12 -3
  2. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  3. package/fesm2022/ngwr-breadcrumbs.mjs +14 -3
  4. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  5. package/fesm2022/ngwr-context-menu.mjs +6 -2
  6. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  7. package/fesm2022/ngwr-dialog.mjs +22 -16
  8. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  9. package/fesm2022/ngwr-directives.mjs +5 -2
  10. package/fesm2022/ngwr-directives.mjs.map +1 -1
  11. package/fesm2022/ngwr-drawer.mjs +24 -18
  12. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  13. package/fesm2022/ngwr-dropdown.mjs +6 -2
  14. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  15. package/fesm2022/ngwr-fuzzy-text.mjs +21 -4
  16. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  17. package/fesm2022/ngwr-gradient-text.mjs +9 -2
  18. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  19. package/fesm2022/ngwr-icon-adapters-feather.mjs +11 -0
  20. package/fesm2022/ngwr-icon-adapters-feather.mjs.map +1 -1
  21. package/fesm2022/ngwr-icon-adapters-lucide.mjs +22 -2
  22. package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
  23. package/fesm2022/ngwr-icon.mjs +474 -37
  24. package/fesm2022/ngwr-icon.mjs.map +1 -1
  25. package/fesm2022/ngwr-markdown.mjs +63 -11
  26. package/fesm2022/ngwr-markdown.mjs.map +1 -1
  27. package/fesm2022/ngwr-overlay.mjs +36 -7
  28. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  29. package/fesm2022/ngwr-qr.mjs +38 -1
  30. package/fesm2022/ngwr-qr.mjs.map +1 -1
  31. package/fesm2022/ngwr-shiny-text.mjs +10 -3
  32. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  33. package/fesm2022/ngwr-tabs.mjs +6 -2
  34. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  35. package/fesm2022/ngwr-utils.mjs +107 -1
  36. package/fesm2022/ngwr-utils.mjs.map +1 -1
  37. package/fesm2022/ngwr-version.mjs +1 -1
  38. package/fesm2022/ngwr-version.mjs.map +1 -1
  39. package/llms-full.txt +1 -1
  40. package/package.json +3 -3
  41. package/types/ngwr-breadcrumbs.d.ts +1 -0
  42. package/types/ngwr-fuzzy-text.d.ts +5 -0
  43. package/types/ngwr-icon-adapters-feather.d.ts +11 -0
  44. package/types/ngwr-icon.d.ts +42 -1
  45. package/types/ngwr-shiny-text.d.ts +1 -0
  46. package/types/ngwr-utils.d.ts +47 -1
  47. package/types/ngwr-version.d.ts +1 -1
@@ -158,6 +158,52 @@ declare function round(value: number, decimals?: number): number;
158
158
  */
159
159
  declare const numAttr: (fallback: number) => (value: unknown) => number;
160
160
 
161
+ /**
162
+ * @license
163
+ *
164
+ * Use of this source code is governed by an MIT-style license that can be
165
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
166
+ */
167
+ /**
168
+ * Answers whether a value can be composed **into** a larger CSS expression
169
+ * without escaping the slot it was given — a colour inside a `linear-gradient()`
170
+ * the component builds, an entry the component joins into a custom property a
171
+ * stylesheet then substitutes.
172
+ *
173
+ * It is a containment check, not a colour parser. It says the value cannot
174
+ * terminate the construct the library wrapped around it; it says nothing about
175
+ * whether the value is a colour a browser will accept, and a rejected value
176
+ * should fall back to the component's own default rather than be repaired.
177
+ *
178
+ * **A value bound straight to `[style.background]` needs none of this.** There
179
+ * is nothing to break out of there, and Angular applies style values through
180
+ * CSSOM by design — validating those would amount to refusing style values in a
181
+ * style binding.
182
+ *
183
+ * Rejected, and each one is a way out of the slot:
184
+ *
185
+ * - a `)` the value never opened — `red), url(…), linear-gradient(red` is the
186
+ * shape that turns a colour into an extra background layer the browser fetches;
187
+ * - a top-level `,` — a `<color>` is one value, so a comma at depth 0 means the
188
+ * payload has reached the slot next to the one it was handed;
189
+ * - `;` `{` `}` a quote, a backslash, `!`, or a CSS comment delimiter;
190
+ * - any function outside {@link ALLOWED_FUNCTIONS} — `url()` above all.
191
+ *
192
+ * Top-level whitespace is allowed: `red 20%` is a legitimate gradient stop, and
193
+ * without a comma or a bare `)` it cannot reach anything.
194
+ *
195
+ * @example
196
+ * ```ts
197
+ * isSafeCssValue('var(--wr-color-primary)'); // true
198
+ * isSafeCssValue('color-mix(in srgb, red 50%, blue)'); // true
199
+ * isSafeCssValue('red), url("https://x.test/beacon"), linear-gradient(red'); // false
200
+ * ```
201
+ *
202
+ * @param value Raw value handed to the component.
203
+ * @returns `true` when the value stays inside its slot.
204
+ */
205
+ declare function isSafeCssValue(value: string): boolean;
206
+
161
207
  /**
162
208
  * @license
163
209
  *
@@ -446,5 +492,5 @@ declare function isPrintableKey(event: KeyboardEvent): boolean;
446
492
  */
447
493
  declare function badgeLog(badgeText: string, color: string, message: unknown): void;
448
494
 
449
- export { KEYS, badgeLog, clamp, debounce, getFocusableElements, getRootFontSize, hasModifier, isDefined, isNonEmptyArray, isObservable, isPrintableKey, noop, numAttr, randomId, resolveCssSize, round, throttle, trapFocus };
495
+ export { KEYS, badgeLog, clamp, debounce, getFocusableElements, getRootFontSize, hasModifier, isDefined, isNonEmptyArray, isObservable, isPrintableKey, isSafeCssValue, noop, numAttr, randomId, resolveCssSize, round, throttle, trapFocus };
450
496
  export type { Maybe, ResolveCssSizeOptions, ResolvedCssSize, SafeAny, WrDebouncedFn, WrKey, WrThrottledFn };
@@ -16,7 +16,7 @@ import { InjectionToken } from '@angular/core';
16
16
  * Distinct from `Version` exported by `@angular/core`, which reports the
17
17
  * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.
18
18
  */
19
- declare const NGWR_VERSION = "13.0.0";
19
+ declare const NGWR_VERSION = "13.0.1";
20
20
 
21
21
  /**
22
22
  * @license