nuclo 0.3.27 → 0.3.28

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuclo",
3
3
  "private": false,
4
- "version": "0.3.27",
4
+ "version": "0.3.28",
5
5
  "description": "Lightweight, type-safe DOM library with plain mutable state and explicit updates — global tag builders, SSR, hydration, and typed CSS, no virtual DOM, no compiler.",
6
6
  "license": "MIT",
7
7
  "author": "Danilo Celestino de Castro (https://github.com/dan2dev)",
@@ -24,6 +24,8 @@ declare global {
24
24
  transform?: SVGAttributeValue<string>;
25
25
  className?: SVGAttributeValue<string>;
26
26
  id?: SVGAttributeValue<string>;
27
+ // Inline style, as on HTML elements: an object, or a function returning one
28
+ style?: ValueOrFactory<CSSStyleObject>;
27
29
 
28
30
  // Path attributes
29
31
  d?: SVGAttributeValue<string>;
@@ -71,9 +73,10 @@ declare global {
71
73
  mask?: SVGAttributeValue<string>;
72
74
 
73
75
  // Allow any other string attributes (including state-dependent functions)
74
- // Using a more restrictive type to maintain type safety
76
+ // Using a more restrictive type to maintain type safety. Every key above
77
+ // must also satisfy this signature, so it admits the style type too.
75
78
  } & SVGEventAttributes<TTagName> & {
76
- [K in string]?: SVGAttributeValue | SVGEventAttributes<TTagName>[keyof SVGEventAttributes<TTagName>];
79
+ [K in string]?: SVGAttributeValue | ValueOrFactory<CSSStyleObject> | SVGEventAttributes<TTagName>[keyof SVGEventAttributes<TTagName>];
77
80
  };
78
81
 
79
82
  // SVG element modifier types