@solidjs/h 2.0.0-beta.13 → 2.0.0-beta.15
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,9 +219,14 @@ export namespace JSX {
|
|
|
219
219
|
>;
|
|
220
220
|
// end event handlers
|
|
221
221
|
|
|
222
|
-
type
|
|
222
|
+
export type ClassValue =
|
|
223
|
+
| string
|
|
224
|
+
| number
|
|
225
|
+
| boolean
|
|
226
|
+
| null
|
|
227
|
+
| undefined
|
|
223
228
|
| Record<string, boolean>
|
|
224
|
-
|
|
|
229
|
+
| ClassValue[];
|
|
225
230
|
|
|
226
231
|
const SERIALIZABLE: unique symbol;
|
|
227
232
|
interface SerializableAttributeValue {
|
|
@@ -264,11 +269,6 @@ export namespace JSX {
|
|
|
264
269
|
|
|
265
270
|
// TODO: Should we allow this?
|
|
266
271
|
// 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
272
|
|
|
273
273
|
// BOOLEAN
|
|
274
274
|
|
|
@@ -850,6 +850,20 @@ export namespace JSX {
|
|
|
850
850
|
: never)
|
|
851
851
|
| (string & {});
|
|
852
852
|
|
|
853
|
+
type ExtractEventType<T> = {
|
|
854
|
+
[K in keyof T as K extends `on${infer Name}` ? Name : never]: T[K] extends EventHandlerUnion<
|
|
855
|
+
Element,
|
|
856
|
+
infer E
|
|
857
|
+
>
|
|
858
|
+
? E
|
|
859
|
+
: never;
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
// EventType["click"] = MouseEvent
|
|
863
|
+
|
|
864
|
+
type EventType = ExtractEventType<EventHandlersElement<Element>> &
|
|
865
|
+
ExtractEventType<EventHandlersWindow<Element>>;
|
|
866
|
+
|
|
853
867
|
// GLOBAL ATTRIBUTES
|
|
854
868
|
|
|
855
869
|
/**
|
|
@@ -881,7 +895,7 @@ export namespace JSX {
|
|
|
881
895
|
* with reactive values directly; manually-built strings re-run the whole
|
|
882
896
|
* concatenation on every change instead of toggling the affected classes.
|
|
883
897
|
*/
|
|
884
|
-
class?: FunctionMaybe<
|
|
898
|
+
class?: FunctionMaybe<ClassValue | RemoveAttribute>;
|
|
885
899
|
elementtiming?: FunctionMaybe<string | RemoveAttribute>;
|
|
886
900
|
id?: FunctionMaybe<string | RemoveAttribute>;
|
|
887
901
|
nonce?: FunctionMaybe<string | RemoveAttribute>;
|
|
@@ -1528,6 +1542,10 @@ export namespace JSX {
|
|
|
1528
1542
|
src?: FunctionMaybe<string | RemoveAttribute>;
|
|
1529
1543
|
|
|
1530
1544
|
onEncrypted?: EventHandlerUnion<T, MediaEncryptedEvent> | undefined;
|
|
1545
|
+
onWaitingForKey?: EventHandlerUnion<T, Event> | undefined;
|
|
1546
|
+
|
|
1547
|
+
/** @deprecated */
|
|
1548
|
+
mediagroup?: FunctionMaybe<string | RemoveAttribute>;
|
|
1531
1549
|
|
|
1532
1550
|
// special cases locked to properties
|
|
1533
1551
|
|
|
@@ -1866,6 +1884,11 @@ export namespace JSX {
|
|
|
1866
1884
|
width?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
1867
1885
|
|
|
1868
1886
|
onEnterPictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
1887
|
+
onLeavePictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1891
|
+
allowpopups?: FunctionMaybe<BooleanAttribute | RemoveAttribute>;
|
|
1869
1892
|
disableblinkfeatures?: FunctionMaybe<string | RemoveAttribute>;
|
|
1870
1893
|
disablewebsecurity?: FunctionMaybe<BooleanAttribute | RemoveAttribute>;
|
|
1871
1894
|
enableblinkfeatures?: FunctionMaybe<string | RemoveAttribute>;
|
|
@@ -1968,7 +1991,7 @@ export namespace JSX {
|
|
|
1968
1991
|
* with reactive values directly; manually-built strings re-run the whole
|
|
1969
1992
|
* concatenation on every change instead of toggling the affected classes.
|
|
1970
1993
|
*/
|
|
1971
|
-
class?: FunctionMaybe<
|
|
1994
|
+
class?: FunctionMaybe<ClassValue | RemoveAttribute>;
|
|
1972
1995
|
style?: FunctionMaybe<CSSProperties | string | RemoveAttribute>;
|
|
1973
1996
|
}
|
|
1974
1997
|
interface TransformableSVGAttributes {
|
|
@@ -2142,6 +2165,29 @@ export namespace JSX {
|
|
|
2142
2165
|
interface AnimationElementSVGAttributes<T>
|
|
2143
2166
|
extends SVGAttributes<T>, ExternalResourceSVGAttributes, ConditionalProcessingSVGAttributes {
|
|
2144
2167
|
onBegin?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2168
|
+
onEnd?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2169
|
+
onRepeat?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
interface ContainerElementSVGAttributes<T>
|
|
2173
|
+
extends
|
|
2174
|
+
SVGAttributes<T>,
|
|
2175
|
+
ShapeElementSVGAttributes<T>,
|
|
2176
|
+
Pick<
|
|
2177
|
+
PresentationSVGAttributes,
|
|
2178
|
+
| "clip-path"
|
|
2179
|
+
| "mask"
|
|
2180
|
+
| "cursor"
|
|
2181
|
+
| "opacity"
|
|
2182
|
+
| "filter"
|
|
2183
|
+
| "enable-background"
|
|
2184
|
+
| "color-interpolation"
|
|
2185
|
+
| "color-rendering"
|
|
2186
|
+
> {}
|
|
2187
|
+
|
|
2188
|
+
interface FilterPrimitiveElementSVGAttributes<T>
|
|
2189
|
+
extends SVGAttributes<T>, Pick<PresentationSVGAttributes, "color-interpolation-filters"> {
|
|
2190
|
+
height?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
2145
2191
|
result?: FunctionMaybe<string | RemoveAttribute>;
|
|
2146
2192
|
width?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
2147
2193
|
x?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
@@ -219,9 +219,14 @@ export namespace JSX {
|
|
|
219
219
|
>;
|
|
220
220
|
// end event handlers
|
|
221
221
|
|
|
222
|
-
type
|
|
222
|
+
export type ClassValue =
|
|
223
|
+
| string
|
|
224
|
+
| number
|
|
225
|
+
| boolean
|
|
226
|
+
| null
|
|
227
|
+
| undefined
|
|
223
228
|
| Record<string, boolean>
|
|
224
|
-
|
|
|
229
|
+
| ClassValue[];
|
|
225
230
|
|
|
226
231
|
const SERIALIZABLE: unique symbol;
|
|
227
232
|
interface SerializableAttributeValue {
|
|
@@ -264,11 +269,6 @@ export namespace JSX {
|
|
|
264
269
|
|
|
265
270
|
// TODO: Should we allow this?
|
|
266
271
|
// 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
272
|
|
|
273
273
|
// BOOLEAN
|
|
274
274
|
|
|
@@ -850,6 +850,20 @@ export namespace JSX {
|
|
|
850
850
|
: never)
|
|
851
851
|
| (string & {});
|
|
852
852
|
|
|
853
|
+
type ExtractEventType<T> = {
|
|
854
|
+
[K in keyof T as K extends `on${infer Name}` ? Name : never]: T[K] extends EventHandlerUnion<
|
|
855
|
+
Element,
|
|
856
|
+
infer E
|
|
857
|
+
>
|
|
858
|
+
? E
|
|
859
|
+
: never;
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
// EventType["click"] = MouseEvent
|
|
863
|
+
|
|
864
|
+
type EventType = ExtractEventType<EventHandlersElement<Element>> &
|
|
865
|
+
ExtractEventType<EventHandlersWindow<Element>>;
|
|
866
|
+
|
|
853
867
|
// GLOBAL ATTRIBUTES
|
|
854
868
|
|
|
855
869
|
/**
|
|
@@ -881,7 +895,7 @@ export namespace JSX {
|
|
|
881
895
|
* with reactive values directly; manually-built strings re-run the whole
|
|
882
896
|
* concatenation on every change instead of toggling the affected classes.
|
|
883
897
|
*/
|
|
884
|
-
class?: FunctionMaybe<
|
|
898
|
+
class?: FunctionMaybe<ClassValue | RemoveAttribute>;
|
|
885
899
|
elementtiming?: FunctionMaybe<string | RemoveAttribute>;
|
|
886
900
|
id?: FunctionMaybe<string | RemoveAttribute>;
|
|
887
901
|
nonce?: FunctionMaybe<string | RemoveAttribute>;
|
|
@@ -1528,6 +1542,10 @@ export namespace JSX {
|
|
|
1528
1542
|
src?: FunctionMaybe<string | RemoveAttribute>;
|
|
1529
1543
|
|
|
1530
1544
|
onEncrypted?: EventHandlerUnion<T, MediaEncryptedEvent> | undefined;
|
|
1545
|
+
onWaitingForKey?: EventHandlerUnion<T, Event> | undefined;
|
|
1546
|
+
|
|
1547
|
+
/** @deprecated */
|
|
1548
|
+
mediagroup?: FunctionMaybe<string | RemoveAttribute>;
|
|
1531
1549
|
|
|
1532
1550
|
// special cases locked to properties
|
|
1533
1551
|
|
|
@@ -1866,6 +1884,11 @@ export namespace JSX {
|
|
|
1866
1884
|
width?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
1867
1885
|
|
|
1868
1886
|
onEnterPictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
1887
|
+
onLeavePictureInPicture?: EventHandlerUnion<T, PictureInPictureEvent> | undefined;
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1891
|
+
allowpopups?: FunctionMaybe<BooleanAttribute | RemoveAttribute>;
|
|
1869
1892
|
disableblinkfeatures?: FunctionMaybe<string | RemoveAttribute>;
|
|
1870
1893
|
disablewebsecurity?: FunctionMaybe<BooleanAttribute | RemoveAttribute>;
|
|
1871
1894
|
enableblinkfeatures?: FunctionMaybe<string | RemoveAttribute>;
|
|
@@ -1968,7 +1991,7 @@ export namespace JSX {
|
|
|
1968
1991
|
* with reactive values directly; manually-built strings re-run the whole
|
|
1969
1992
|
* concatenation on every change instead of toggling the affected classes.
|
|
1970
1993
|
*/
|
|
1971
|
-
class?: FunctionMaybe<
|
|
1994
|
+
class?: FunctionMaybe<ClassValue | RemoveAttribute>;
|
|
1972
1995
|
style?: FunctionMaybe<CSSProperties | string | RemoveAttribute>;
|
|
1973
1996
|
}
|
|
1974
1997
|
interface TransformableSVGAttributes {
|
|
@@ -2142,6 +2165,29 @@ export namespace JSX {
|
|
|
2142
2165
|
interface AnimationElementSVGAttributes<T>
|
|
2143
2166
|
extends SVGAttributes<T>, ExternalResourceSVGAttributes, ConditionalProcessingSVGAttributes {
|
|
2144
2167
|
onBegin?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2168
|
+
onEnd?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2169
|
+
onRepeat?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
interface ContainerElementSVGAttributes<T>
|
|
2173
|
+
extends
|
|
2174
|
+
SVGAttributes<T>,
|
|
2175
|
+
ShapeElementSVGAttributes<T>,
|
|
2176
|
+
Pick<
|
|
2177
|
+
PresentationSVGAttributes,
|
|
2178
|
+
| "clip-path"
|
|
2179
|
+
| "mask"
|
|
2180
|
+
| "cursor"
|
|
2181
|
+
| "opacity"
|
|
2182
|
+
| "filter"
|
|
2183
|
+
| "enable-background"
|
|
2184
|
+
| "color-interpolation"
|
|
2185
|
+
| "color-rendering"
|
|
2186
|
+
> {}
|
|
2187
|
+
|
|
2188
|
+
interface FilterPrimitiveElementSVGAttributes<T>
|
|
2189
|
+
extends SVGAttributes<T>, Pick<PresentationSVGAttributes, "color-interpolation-filters"> {
|
|
2190
|
+
height?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
2145
2191
|
result?: FunctionMaybe<string | RemoveAttribute>;
|
|
2146
2192
|
width?: FunctionMaybe<number | string | RemoveAttribute>;
|
|
2147
2193
|
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.15",
|
|
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.15"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"
|
|
70
|
-
"
|
|
69
|
+
"solid-js": "2.0.0-beta.15",
|
|
70
|
+
"@solidjs/web": "2.0.0-beta.15"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "npm-run-all -nl build:clean types:copy build:js",
|