@solidjs/h 2.0.0-beta.13 → 2.0.0-beta.14
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.
|
@@ -219,7 +219,8 @@ export namespace JSX {
|
|
|
219
219
|
>;
|
|
220
220
|
// end event handlers
|
|
221
221
|
|
|
222
|
-
type
|
|
222
|
+
export type ClassValue =
|
|
223
|
+
| string
|
|
223
224
|
| Record<string, boolean>
|
|
224
225
|
| Array<string | number | boolean | null | undefined | Record<string, boolean>>;
|
|
225
226
|
|
|
@@ -264,11 +265,6 @@ export namespace JSX {
|
|
|
264
265
|
|
|
265
266
|
// TODO: Should we allow this?
|
|
266
267
|
// type ClassKeys = `class:${string}`;
|
|
267
|
-
// type CSSKeys = Exclude<keyof csstype.PropertiesHyphen, `-${string}`>;
|
|
268
|
-
|
|
269
|
-
// type CSSAttributes = {
|
|
270
|
-
// [key in CSSKeys as `style:${key}`]: csstype.PropertiesHyphen[key];
|
|
271
|
-
// };
|
|
272
268
|
|
|
273
269
|
// BOOLEAN
|
|
274
270
|
|
|
@@ -850,6 +846,20 @@ export namespace JSX {
|
|
|
850
846
|
: never)
|
|
851
847
|
| (string & {});
|
|
852
848
|
|
|
849
|
+
type ExtractEventType<T> = {
|
|
850
|
+
[K in keyof T as K extends `on${infer Name}` ? Name : never]: T[K] extends EventHandlerUnion<
|
|
851
|
+
Element,
|
|
852
|
+
infer E
|
|
853
|
+
>
|
|
854
|
+
? E
|
|
855
|
+
: never;
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
// EventType["click"] = MouseEvent
|
|
859
|
+
|
|
860
|
+
type EventType = ExtractEventType<EventHandlersElement<Element>> &
|
|
861
|
+
ExtractEventType<EventHandlersWindow<Element>>;
|
|
862
|
+
|
|
853
863
|
// GLOBAL ATTRIBUTES
|
|
854
864
|
|
|
855
865
|
/**
|
|
@@ -881,7 +891,7 @@ export namespace JSX {
|
|
|
881
891
|
* with reactive values directly; manually-built strings re-run the whole
|
|
882
892
|
* concatenation on every change instead of toggling the affected classes.
|
|
883
893
|
*/
|
|
884
|
-
class?: FunctionMaybe<
|
|
894
|
+
class?: FunctionMaybe<ClassValue | RemoveAttribute>;
|
|
885
895
|
elementtiming?: FunctionMaybe<string | RemoveAttribute>;
|
|
886
896
|
id?: FunctionMaybe<string | RemoveAttribute>;
|
|
887
897
|
nonce?: FunctionMaybe<string | RemoveAttribute>;
|
|
@@ -1528,6 +1538,10 @@ export namespace JSX {
|
|
|
1528
1538
|
src?: FunctionMaybe<string | RemoveAttribute>;
|
|
1529
1539
|
|
|
1530
1540
|
onEncrypted?: EventHandlerUnion<T, MediaEncryptedEvent> | undefined;
|
|
1541
|
+
onWaitingForKey?: EventHandlerUnion<T, Event> | undefined;
|
|
1542
|
+
|
|
1543
|
+
/** @deprecated */
|
|
1544
|
+
mediagroup?: FunctionMaybe<string | RemoveAttribute>;
|
|
1531
1545
|
|
|
1532
1546
|
// special cases locked to properties
|
|
1533
1547
|
|
|
@@ -1866,6 +1880,11 @@ export namespace JSX {
|
|
|
1866
1880
|
width?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
1867
1881
|
|
|
1868
1882
|
onEnterPictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
1883
|
+
onLeavePictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1887
|
+
allowpopups?: FunctionMaybe<BooleanAttribute | RemoveAttribute>;
|
|
1869
1888
|
disableblinkfeatures?: FunctionMaybe<string | RemoveAttribute>;
|
|
1870
1889
|
disablewebsecurity?: FunctionMaybe<BooleanAttribute | RemoveAttribute>;
|
|
1871
1890
|
enableblinkfeatures?: FunctionMaybe<string | RemoveAttribute>;
|
|
@@ -1968,7 +1987,7 @@ export namespace JSX {
|
|
|
1968
1987
|
* with reactive values directly; manually-built strings re-run the whole
|
|
1969
1988
|
* concatenation on every change instead of toggling the affected classes.
|
|
1970
1989
|
*/
|
|
1971
|
-
class?: FunctionMaybe<
|
|
1990
|
+
class?: FunctionMaybe<ClassValue | RemoveAttribute>;
|
|
1972
1991
|
style?: FunctionMaybe<CSSProperties | string | RemoveAttribute>;
|
|
1973
1992
|
}
|
|
1974
1993
|
interface TransformableSVGAttributes {
|
|
@@ -2142,6 +2161,29 @@ export namespace JSX {
|
|
|
2142
2161
|
interface AnimationElementSVGAttributes<T>
|
|
2143
2162
|
extends SVGAttributes<T>, ExternalResourceSVGAttributes, ConditionalProcessingSVGAttributes {
|
|
2144
2163
|
onBegin?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2164
|
+
onEnd?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2165
|
+
onRepeat?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
interface ContainerElementSVGAttributes<T>
|
|
2169
|
+
extends
|
|
2170
|
+
SVGAttributes<T>,
|
|
2171
|
+
ShapeElementSVGAttributes<T>,
|
|
2172
|
+
Pick<
|
|
2173
|
+
PresentationSVGAttributes,
|
|
2174
|
+
| "clip-path"
|
|
2175
|
+
| "mask"
|
|
2176
|
+
| "cursor"
|
|
2177
|
+
| "opacity"
|
|
2178
|
+
| "filter"
|
|
2179
|
+
| "enable-background"
|
|
2180
|
+
| "color-interpolation"
|
|
2181
|
+
| "color-rendering"
|
|
2182
|
+
> {}
|
|
2183
|
+
|
|
2184
|
+
interface FilterPrimitiveElementSVGAttributes<T>
|
|
2185
|
+
extends SVGAttributes<T>, Pick<PresentationSVGAttributes, "color-interpolation-filters"> {
|
|
2186
|
+
height?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
2145
2187
|
result?: FunctionMaybe<string | RemoveAttribute>;
|
|
2146
2188
|
width?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
2147
2189
|
x?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
@@ -219,7 +219,8 @@ export namespace JSX {
|
|
|
219
219
|
>;
|
|
220
220
|
// end event handlers
|
|
221
221
|
|
|
222
|
-
type
|
|
222
|
+
export type ClassValue =
|
|
223
|
+
| string
|
|
223
224
|
| Record<string, boolean>
|
|
224
225
|
| Array<string | number | boolean | null | undefined | Record<string, boolean>>;
|
|
225
226
|
|
|
@@ -264,11 +265,6 @@ export namespace JSX {
|
|
|
264
265
|
|
|
265
266
|
// TODO: Should we allow this?
|
|
266
267
|
// type ClassKeys = `class:${string}`;
|
|
267
|
-
// type CSSKeys = Exclude<keyof csstype.PropertiesHyphen, `-${string}`>;
|
|
268
|
-
|
|
269
|
-
// type CSSAttributes = {
|
|
270
|
-
// [key in CSSKeys as `style:${key}`]: csstype.PropertiesHyphen[key];
|
|
271
|
-
// };
|
|
272
268
|
|
|
273
269
|
// BOOLEAN
|
|
274
270
|
|
|
@@ -850,6 +846,20 @@ export namespace JSX {
|
|
|
850
846
|
: never)
|
|
851
847
|
| (string & {});
|
|
852
848
|
|
|
849
|
+
type ExtractEventType<T> = {
|
|
850
|
+
[K in keyof T as K extends `on${infer Name}` ? Name : never]: T[K] extends EventHandlerUnion<
|
|
851
|
+
Element,
|
|
852
|
+
infer E
|
|
853
|
+
>
|
|
854
|
+
? E
|
|
855
|
+
: never;
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
// EventType["click"] = MouseEvent
|
|
859
|
+
|
|
860
|
+
type EventType = ExtractEventType<EventHandlersElement<Element>> &
|
|
861
|
+
ExtractEventType<EventHandlersWindow<Element>>;
|
|
862
|
+
|
|
853
863
|
// GLOBAL ATTRIBUTES
|
|
854
864
|
|
|
855
865
|
/**
|
|
@@ -881,7 +891,7 @@ export namespace JSX {
|
|
|
881
891
|
* with reactive values directly; manually-built strings re-run the whole
|
|
882
892
|
* concatenation on every change instead of toggling the affected classes.
|
|
883
893
|
*/
|
|
884
|
-
class?: FunctionMaybe<
|
|
894
|
+
class?: FunctionMaybe<ClassValue | RemoveAttribute>;
|
|
885
895
|
elementtiming?: FunctionMaybe<string | RemoveAttribute>;
|
|
886
896
|
id?: FunctionMaybe<string | RemoveAttribute>;
|
|
887
897
|
nonce?: FunctionMaybe<string | RemoveAttribute>;
|
|
@@ -1528,6 +1538,10 @@ export namespace JSX {
|
|
|
1528
1538
|
src?: FunctionMaybe<string | RemoveAttribute>;
|
|
1529
1539
|
|
|
1530
1540
|
onEncrypted?: EventHandlerUnion<T, MediaEncryptedEvent> | undefined;
|
|
1541
|
+
onWaitingForKey?: EventHandlerUnion<T, Event> | undefined;
|
|
1542
|
+
|
|
1543
|
+
/** @deprecated */
|
|
1544
|
+
mediagroup?: FunctionMaybe<string | RemoveAttribute>;
|
|
1531
1545
|
|
|
1532
1546
|
// special cases locked to properties
|
|
1533
1547
|
|
|
@@ -1866,6 +1880,11 @@ export namespace JSX {
|
|
|
1866
1880
|
width?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
1867
1881
|
|
|
1868
1882
|
onEnterPictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
1883
|
+
onLeavePictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1887
|
+
allowpopups?: FunctionMaybe<BooleanAttribute | RemoveAttribute>;
|
|
1869
1888
|
disableblinkfeatures?: FunctionMaybe<string | RemoveAttribute>;
|
|
1870
1889
|
disablewebsecurity?: FunctionMaybe<BooleanAttribute | RemoveAttribute>;
|
|
1871
1890
|
enableblinkfeatures?: FunctionMaybe<string | RemoveAttribute>;
|
|
@@ -1968,7 +1987,7 @@ export namespace JSX {
|
|
|
1968
1987
|
* with reactive values directly; manually-built strings re-run the whole
|
|
1969
1988
|
* concatenation on every change instead of toggling the affected classes.
|
|
1970
1989
|
*/
|
|
1971
|
-
class?: FunctionMaybe<
|
|
1990
|
+
class?: FunctionMaybe<ClassValue | RemoveAttribute>;
|
|
1972
1991
|
style?: FunctionMaybe<CSSProperties | string | RemoveAttribute>;
|
|
1973
1992
|
}
|
|
1974
1993
|
interface TransformableSVGAttributes {
|
|
@@ -2142,6 +2161,29 @@ export namespace JSX {
|
|
|
2142
2161
|
interface AnimationElementSVGAttributes<T>
|
|
2143
2162
|
extends SVGAttributes<T>, ExternalResourceSVGAttributes, ConditionalProcessingSVGAttributes {
|
|
2144
2163
|
onBegin?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2164
|
+
onEnd?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2165
|
+
onRepeat?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
interface ContainerElementSVGAttributes<T>
|
|
2169
|
+
extends
|
|
2170
|
+
SVGAttributes<T>,
|
|
2171
|
+
ShapeElementSVGAttributes<T>,
|
|
2172
|
+
Pick<
|
|
2173
|
+
PresentationSVGAttributes,
|
|
2174
|
+
| "clip-path"
|
|
2175
|
+
| "mask"
|
|
2176
|
+
| "cursor"
|
|
2177
|
+
| "opacity"
|
|
2178
|
+
| "filter"
|
|
2179
|
+
| "enable-background"
|
|
2180
|
+
| "color-interpolation"
|
|
2181
|
+
| "color-rendering"
|
|
2182
|
+
> {}
|
|
2183
|
+
|
|
2184
|
+
interface FilterPrimitiveElementSVGAttributes<T>
|
|
2185
|
+
extends SVGAttributes<T>, Pick<PresentationSVGAttributes, "color-interpolation-filters"> {
|
|
2186
|
+
height?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
2145
2187
|
result?: FunctionMaybe<string | RemoveAttribute>;
|
|
2146
2188
|
width?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
2147
2189
|
x?: FunctionMaybe<number | string | RemoveAttribute>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidjs/h",
|
|
3
3
|
"description": "Hyperscript / h() factory for Solid — write components without compiled JSX.",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.14",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://solidjs.com",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"./types/*": "./types/*"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@solidjs/web": "^2.0.0-beta.
|
|
66
|
+
"@solidjs/web": "^2.0.0-beta.14"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"
|
|
70
|
-
"
|
|
69
|
+
"solid-js": "2.0.0-beta.14",
|
|
70
|
+
"@solidjs/web": "2.0.0-beta.14"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "npm-run-all -nl build:clean types:copy build:js",
|