nuclo 0.3.6 → 0.3.8
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/README.md +46 -34
- package/dist/nuclo.cjs +1 -1
- package/dist/nuclo.cjs.map +1 -1
- package/dist/nuclo.mjs +1 -1
- package/dist/nuclo.mjs.map +1 -1
- package/dist/ssr/nuclo.ssr.cjs.map +1 -1
- package/dist/ssr/nuclo.ssr.mjs.map +1 -1
- package/package.json +1 -1
- package/types/core/base.d.ts +0 -17
- package/types/core/events.d.ts +14 -0
- package/types/features/on.d.ts +1 -1
- package/types/svg/base.d.ts +7 -5
package/types/features/on.d.ts
CHANGED
package/types/svg/base.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare global {
|
|
|
6
6
|
// This is needed because SVG DOM properties like 'width' are SVGAnimatedLength,
|
|
7
7
|
// but we set them as strings using setAttribute()
|
|
8
8
|
// Supports state-dependent values (functions) for dynamic attributes
|
|
9
|
-
export type SVGAttributes = {
|
|
9
|
+
export type SVGAttributes<TTagName extends SVGTagName = SVGTagName> = {
|
|
10
10
|
// Common SVG attributes
|
|
11
11
|
width?: SVGAttributeValue<string | number>;
|
|
12
12
|
height?: SVGAttributeValue<string | number>;
|
|
@@ -72,14 +72,14 @@ declare global {
|
|
|
72
72
|
|
|
73
73
|
// Allow any other string attributes (including state-dependent functions)
|
|
74
74
|
// Using a more restrictive type to maintain type safety
|
|
75
|
-
} & {
|
|
76
|
-
[K in string]?: SVGAttributeValue;
|
|
75
|
+
} & SVGEventAttributes<TTagName> & {
|
|
76
|
+
[K in string]?: SVGAttributeValue | SVGEventAttributes<TTagName>[keyof SVGEventAttributes<TTagName>];
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
// SVG element modifier types
|
|
80
80
|
export type SVGRenderable<TTagName extends SVGTagName = SVGTagName> =
|
|
81
81
|
| Primitive
|
|
82
|
-
| SVGAttributes
|
|
82
|
+
| SVGAttributes<TTagName>
|
|
83
83
|
| SVGElementTagNameMap[TTagName]
|
|
84
84
|
| SVGElement
|
|
85
85
|
| Node;
|
|
@@ -96,7 +96,9 @@ declare global {
|
|
|
96
96
|
|
|
97
97
|
export type SVGElementModifierLike<TTagName extends SVGTagName = SVGTagName> =
|
|
98
98
|
| SVGElementModifier<TTagName>
|
|
99
|
-
| SVGElementModifierFn<TTagName
|
|
99
|
+
| SVGElementModifierFn<TTagName>
|
|
100
|
+
// on() / when() results: they only touch the parent via namespace-agnostic DOM APIs.
|
|
101
|
+
| NodeModFn;
|
|
100
102
|
|
|
101
103
|
export type DetachedSVGElementFactory<
|
|
102
104
|
TTagName extends SVGTagName = SVGTagName,
|