solid-js 1.7.7 → 1.7.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/dist/dev.cjs +24 -13
- package/dist/dev.js +24 -13
- package/dist/server.cjs +3 -3
- package/dist/server.js +3 -3
- package/dist/solid.cjs +24 -13
- package/dist/solid.js +24 -13
- package/h/jsx-runtime/types/jsx.d.ts +127 -100
- package/package.json +1 -1
- package/types/jsx.d.ts +7 -6
- package/types/render/hydration.d.ts +3 -0
- package/web/dist/server.cjs +4 -4
- package/web/dist/server.js +4 -4
package/dist/dev.cjs
CHANGED
|
@@ -880,7 +880,18 @@ function runUserEffects(queue) {
|
|
|
880
880
|
const e = queue[i];
|
|
881
881
|
if (!e.user) runTop(e);else queue[userLength++] = e;
|
|
882
882
|
}
|
|
883
|
-
if (sharedConfig.context)
|
|
883
|
+
if (sharedConfig.context) {
|
|
884
|
+
if (sharedConfig.count) {
|
|
885
|
+
sharedConfig.effects || (sharedConfig.effects = []);
|
|
886
|
+
sharedConfig.effects.push(...queue.slice(0, userLength));
|
|
887
|
+
return;
|
|
888
|
+
} else if (sharedConfig.effects) {
|
|
889
|
+
queue = [...sharedConfig.effects, ...queue];
|
|
890
|
+
userLength += sharedConfig.effects.length;
|
|
891
|
+
delete sharedConfig.effects;
|
|
892
|
+
}
|
|
893
|
+
setHydrateContext();
|
|
894
|
+
}
|
|
884
895
|
for (i = 0; i < userLength; i++) runTop(queue[i]);
|
|
885
896
|
}
|
|
886
897
|
function lookUpstream(node, ignore) {
|
|
@@ -958,26 +969,23 @@ function castError(err) {
|
|
|
958
969
|
cause: err
|
|
959
970
|
});
|
|
960
971
|
}
|
|
972
|
+
function runErrors(err, fns, owner) {
|
|
973
|
+
try {
|
|
974
|
+
for (const f of fns) f(err);
|
|
975
|
+
} catch (e) {
|
|
976
|
+
handleError(e, owner && owner.owner || null);
|
|
977
|
+
}
|
|
978
|
+
}
|
|
961
979
|
function handleError(err, owner = Owner) {
|
|
962
980
|
const fns = ERROR && lookup(owner, ERROR);
|
|
963
981
|
const error = castError(err);
|
|
964
982
|
if (!fns) throw error;
|
|
965
983
|
if (Effects) Effects.push({
|
|
966
984
|
fn() {
|
|
967
|
-
|
|
968
|
-
for (const f of fns) f(error);
|
|
969
|
-
} catch (e) {
|
|
970
|
-
handleError(e, owner?.owner || null);
|
|
971
|
-
}
|
|
985
|
+
runErrors(error, fns, owner);
|
|
972
986
|
},
|
|
973
987
|
state: STALE
|
|
974
|
-
});else
|
|
975
|
-
try {
|
|
976
|
-
for (const f of fns) f(error);
|
|
977
|
-
} catch (e) {
|
|
978
|
-
handleError(e, owner?.owner || null);
|
|
979
|
-
}
|
|
980
|
-
}
|
|
988
|
+
});else runErrors(error, fns, owner);
|
|
981
989
|
}
|
|
982
990
|
function lookup(owner, key) {
|
|
983
991
|
return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
|
|
@@ -1399,8 +1407,11 @@ function lazy(fn) {
|
|
|
1399
1407
|
const ctx = sharedConfig.context;
|
|
1400
1408
|
if (ctx) {
|
|
1401
1409
|
const [s, set] = createSignal();
|
|
1410
|
+
sharedConfig.count || (sharedConfig.count = 0);
|
|
1411
|
+
sharedConfig.count++;
|
|
1402
1412
|
(p || (p = fn())).then(mod => {
|
|
1403
1413
|
setHydrateContext(ctx);
|
|
1414
|
+
sharedConfig.count--;
|
|
1404
1415
|
set(() => mod.default);
|
|
1405
1416
|
setHydrateContext();
|
|
1406
1417
|
});
|
package/dist/dev.js
CHANGED
|
@@ -878,7 +878,18 @@ function runUserEffects(queue) {
|
|
|
878
878
|
const e = queue[i];
|
|
879
879
|
if (!e.user) runTop(e);else queue[userLength++] = e;
|
|
880
880
|
}
|
|
881
|
-
if (sharedConfig.context)
|
|
881
|
+
if (sharedConfig.context) {
|
|
882
|
+
if (sharedConfig.count) {
|
|
883
|
+
sharedConfig.effects || (sharedConfig.effects = []);
|
|
884
|
+
sharedConfig.effects.push(...queue.slice(0, userLength));
|
|
885
|
+
return;
|
|
886
|
+
} else if (sharedConfig.effects) {
|
|
887
|
+
queue = [...sharedConfig.effects, ...queue];
|
|
888
|
+
userLength += sharedConfig.effects.length;
|
|
889
|
+
delete sharedConfig.effects;
|
|
890
|
+
}
|
|
891
|
+
setHydrateContext();
|
|
892
|
+
}
|
|
882
893
|
for (i = 0; i < userLength; i++) runTop(queue[i]);
|
|
883
894
|
}
|
|
884
895
|
function lookUpstream(node, ignore) {
|
|
@@ -956,26 +967,23 @@ function castError(err) {
|
|
|
956
967
|
cause: err
|
|
957
968
|
});
|
|
958
969
|
}
|
|
970
|
+
function runErrors(err, fns, owner) {
|
|
971
|
+
try {
|
|
972
|
+
for (const f of fns) f(err);
|
|
973
|
+
} catch (e) {
|
|
974
|
+
handleError(e, owner && owner.owner || null);
|
|
975
|
+
}
|
|
976
|
+
}
|
|
959
977
|
function handleError(err, owner = Owner) {
|
|
960
978
|
const fns = ERROR && lookup(owner, ERROR);
|
|
961
979
|
const error = castError(err);
|
|
962
980
|
if (!fns) throw error;
|
|
963
981
|
if (Effects) Effects.push({
|
|
964
982
|
fn() {
|
|
965
|
-
|
|
966
|
-
for (const f of fns) f(error);
|
|
967
|
-
} catch (e) {
|
|
968
|
-
handleError(e, owner?.owner || null);
|
|
969
|
-
}
|
|
983
|
+
runErrors(error, fns, owner);
|
|
970
984
|
},
|
|
971
985
|
state: STALE
|
|
972
|
-
});else
|
|
973
|
-
try {
|
|
974
|
-
for (const f of fns) f(error);
|
|
975
|
-
} catch (e) {
|
|
976
|
-
handleError(e, owner?.owner || null);
|
|
977
|
-
}
|
|
978
|
-
}
|
|
986
|
+
});else runErrors(error, fns, owner);
|
|
979
987
|
}
|
|
980
988
|
function lookup(owner, key) {
|
|
981
989
|
return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
|
|
@@ -1397,8 +1405,11 @@ function lazy(fn) {
|
|
|
1397
1405
|
const ctx = sharedConfig.context;
|
|
1398
1406
|
if (ctx) {
|
|
1399
1407
|
const [s, set] = createSignal();
|
|
1408
|
+
sharedConfig.count || (sharedConfig.count = 0);
|
|
1409
|
+
sharedConfig.count++;
|
|
1400
1410
|
(p || (p = fn())).then(mod => {
|
|
1401
1411
|
setHydrateContext(ctx);
|
|
1412
|
+
sharedConfig.count--;
|
|
1402
1413
|
set(() => mod.default);
|
|
1403
1414
|
setHydrateContext();
|
|
1404
1415
|
});
|
package/dist/server.cjs
CHANGED
|
@@ -19,7 +19,7 @@ function handleError(err, owner = Owner) {
|
|
|
19
19
|
try {
|
|
20
20
|
for (const f of fns) f(error);
|
|
21
21
|
} catch (e) {
|
|
22
|
-
handleError(e, owner
|
|
22
|
+
handleError(e, owner && owner.owner || null);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
const UNOWNED = {
|
|
@@ -424,7 +424,7 @@ function ErrorBoundary(props) {
|
|
|
424
424
|
if (error) return displayFallback();
|
|
425
425
|
sync = false;
|
|
426
426
|
return {
|
|
427
|
-
t:
|
|
427
|
+
t: `<!--!$e${id}-->${resolveSSRNode(res)}<!--!$/e${id}-->`
|
|
428
428
|
};
|
|
429
429
|
}
|
|
430
430
|
const SuspenseContext = createContext();
|
|
@@ -635,7 +635,7 @@ function Suspense(props) {
|
|
|
635
635
|
noHydrate: true
|
|
636
636
|
});
|
|
637
637
|
const res = {
|
|
638
|
-
t: `<template id="pl-${id}"></template>${resolveSSRNode(props.fallback)}
|
|
638
|
+
t: `<template id="pl-${id}"></template>${resolveSSRNode(props.fallback)}<!--pl-${id}-->`
|
|
639
639
|
};
|
|
640
640
|
setHydrateContext(ctx);
|
|
641
641
|
return res;
|
package/dist/server.js
CHANGED
|
@@ -17,7 +17,7 @@ function handleError(err, owner = Owner) {
|
|
|
17
17
|
try {
|
|
18
18
|
for (const f of fns) f(error);
|
|
19
19
|
} catch (e) {
|
|
20
|
-
handleError(e, owner
|
|
20
|
+
handleError(e, owner && owner.owner || null);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
const UNOWNED = {
|
|
@@ -422,7 +422,7 @@ function ErrorBoundary(props) {
|
|
|
422
422
|
if (error) return displayFallback();
|
|
423
423
|
sync = false;
|
|
424
424
|
return {
|
|
425
|
-
t:
|
|
425
|
+
t: `<!--!$e${id}-->${resolveSSRNode(res)}<!--!$/e${id}-->`
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
428
|
const SuspenseContext = createContext();
|
|
@@ -633,7 +633,7 @@ function Suspense(props) {
|
|
|
633
633
|
noHydrate: true
|
|
634
634
|
});
|
|
635
635
|
const res = {
|
|
636
|
-
t: `<template id="pl-${id}"></template>${resolveSSRNode(props.fallback)}
|
|
636
|
+
t: `<template id="pl-${id}"></template>${resolveSSRNode(props.fallback)}<!--pl-${id}-->`
|
|
637
637
|
};
|
|
638
638
|
setHydrateContext(ctx);
|
|
639
639
|
return res;
|
package/dist/solid.cjs
CHANGED
|
@@ -840,7 +840,18 @@ function runUserEffects(queue) {
|
|
|
840
840
|
const e = queue[i];
|
|
841
841
|
if (!e.user) runTop(e);else queue[userLength++] = e;
|
|
842
842
|
}
|
|
843
|
-
if (sharedConfig.context)
|
|
843
|
+
if (sharedConfig.context) {
|
|
844
|
+
if (sharedConfig.count) {
|
|
845
|
+
sharedConfig.effects || (sharedConfig.effects = []);
|
|
846
|
+
sharedConfig.effects.push(...queue.slice(0, userLength));
|
|
847
|
+
return;
|
|
848
|
+
} else if (sharedConfig.effects) {
|
|
849
|
+
queue = [...sharedConfig.effects, ...queue];
|
|
850
|
+
userLength += sharedConfig.effects.length;
|
|
851
|
+
delete sharedConfig.effects;
|
|
852
|
+
}
|
|
853
|
+
setHydrateContext();
|
|
854
|
+
}
|
|
844
855
|
for (i = 0; i < userLength; i++) runTop(queue[i]);
|
|
845
856
|
}
|
|
846
857
|
function lookUpstream(node, ignore) {
|
|
@@ -917,26 +928,23 @@ function castError(err) {
|
|
|
917
928
|
cause: err
|
|
918
929
|
});
|
|
919
930
|
}
|
|
931
|
+
function runErrors(err, fns, owner) {
|
|
932
|
+
try {
|
|
933
|
+
for (const f of fns) f(err);
|
|
934
|
+
} catch (e) {
|
|
935
|
+
handleError(e, owner && owner.owner || null);
|
|
936
|
+
}
|
|
937
|
+
}
|
|
920
938
|
function handleError(err, owner = Owner) {
|
|
921
939
|
const fns = ERROR && lookup(owner, ERROR);
|
|
922
940
|
const error = castError(err);
|
|
923
941
|
if (!fns) throw error;
|
|
924
942
|
if (Effects) Effects.push({
|
|
925
943
|
fn() {
|
|
926
|
-
|
|
927
|
-
for (const f of fns) f(error);
|
|
928
|
-
} catch (e) {
|
|
929
|
-
handleError(e, owner?.owner || null);
|
|
930
|
-
}
|
|
944
|
+
runErrors(error, fns, owner);
|
|
931
945
|
},
|
|
932
946
|
state: STALE
|
|
933
|
-
});else
|
|
934
|
-
try {
|
|
935
|
-
for (const f of fns) f(error);
|
|
936
|
-
} catch (e) {
|
|
937
|
-
handleError(e, owner?.owner || null);
|
|
938
|
-
}
|
|
939
|
-
}
|
|
947
|
+
});else runErrors(error, fns, owner);
|
|
940
948
|
}
|
|
941
949
|
function lookup(owner, key) {
|
|
942
950
|
return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
|
|
@@ -1354,8 +1362,11 @@ function lazy(fn) {
|
|
|
1354
1362
|
const ctx = sharedConfig.context;
|
|
1355
1363
|
if (ctx) {
|
|
1356
1364
|
const [s, set] = createSignal();
|
|
1365
|
+
sharedConfig.count || (sharedConfig.count = 0);
|
|
1366
|
+
sharedConfig.count++;
|
|
1357
1367
|
(p || (p = fn())).then(mod => {
|
|
1358
1368
|
setHydrateContext(ctx);
|
|
1369
|
+
sharedConfig.count--;
|
|
1359
1370
|
set(() => mod.default);
|
|
1360
1371
|
setHydrateContext();
|
|
1361
1372
|
});
|
package/dist/solid.js
CHANGED
|
@@ -838,7 +838,18 @@ function runUserEffects(queue) {
|
|
|
838
838
|
const e = queue[i];
|
|
839
839
|
if (!e.user) runTop(e);else queue[userLength++] = e;
|
|
840
840
|
}
|
|
841
|
-
if (sharedConfig.context)
|
|
841
|
+
if (sharedConfig.context) {
|
|
842
|
+
if (sharedConfig.count) {
|
|
843
|
+
sharedConfig.effects || (sharedConfig.effects = []);
|
|
844
|
+
sharedConfig.effects.push(...queue.slice(0, userLength));
|
|
845
|
+
return;
|
|
846
|
+
} else if (sharedConfig.effects) {
|
|
847
|
+
queue = [...sharedConfig.effects, ...queue];
|
|
848
|
+
userLength += sharedConfig.effects.length;
|
|
849
|
+
delete sharedConfig.effects;
|
|
850
|
+
}
|
|
851
|
+
setHydrateContext();
|
|
852
|
+
}
|
|
842
853
|
for (i = 0; i < userLength; i++) runTop(queue[i]);
|
|
843
854
|
}
|
|
844
855
|
function lookUpstream(node, ignore) {
|
|
@@ -915,26 +926,23 @@ function castError(err) {
|
|
|
915
926
|
cause: err
|
|
916
927
|
});
|
|
917
928
|
}
|
|
929
|
+
function runErrors(err, fns, owner) {
|
|
930
|
+
try {
|
|
931
|
+
for (const f of fns) f(err);
|
|
932
|
+
} catch (e) {
|
|
933
|
+
handleError(e, owner && owner.owner || null);
|
|
934
|
+
}
|
|
935
|
+
}
|
|
918
936
|
function handleError(err, owner = Owner) {
|
|
919
937
|
const fns = ERROR && lookup(owner, ERROR);
|
|
920
938
|
const error = castError(err);
|
|
921
939
|
if (!fns) throw error;
|
|
922
940
|
if (Effects) Effects.push({
|
|
923
941
|
fn() {
|
|
924
|
-
|
|
925
|
-
for (const f of fns) f(error);
|
|
926
|
-
} catch (e) {
|
|
927
|
-
handleError(e, owner?.owner || null);
|
|
928
|
-
}
|
|
942
|
+
runErrors(error, fns, owner);
|
|
929
943
|
},
|
|
930
944
|
state: STALE
|
|
931
|
-
});else
|
|
932
|
-
try {
|
|
933
|
-
for (const f of fns) f(error);
|
|
934
|
-
} catch (e) {
|
|
935
|
-
handleError(e, owner?.owner || null);
|
|
936
|
-
}
|
|
937
|
-
}
|
|
945
|
+
});else runErrors(error, fns, owner);
|
|
938
946
|
}
|
|
939
947
|
function lookup(owner, key) {
|
|
940
948
|
return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
|
|
@@ -1352,8 +1360,11 @@ function lazy(fn) {
|
|
|
1352
1360
|
const ctx = sharedConfig.context;
|
|
1353
1361
|
if (ctx) {
|
|
1354
1362
|
const [s, set] = createSignal();
|
|
1363
|
+
sharedConfig.count || (sharedConfig.count = 0);
|
|
1364
|
+
sharedConfig.count++;
|
|
1355
1365
|
(p || (p = fn())).then(mod => {
|
|
1356
1366
|
setHydrateContext(ctx);
|
|
1367
|
+
sharedConfig.count--;
|
|
1357
1368
|
set(() => mod.default);
|
|
1358
1369
|
setHydrateContext();
|
|
1359
1370
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as csstype from
|
|
1
|
+
import * as csstype from "csstype";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Based on JSX types for Surplus and Inferno and adapted for `dom-expressions`.
|
|
@@ -9,7 +9,7 @@ import * as csstype from 'csstype';
|
|
|
9
9
|
type DOMElement = Element;
|
|
10
10
|
|
|
11
11
|
export namespace JSX {
|
|
12
|
-
type FunctionMaybe<T = unknown> =
|
|
12
|
+
type FunctionMaybe<T = unknown> = { (): T } | T;
|
|
13
13
|
type Element =
|
|
14
14
|
| Node
|
|
15
15
|
| ArrayElement
|
|
@@ -61,7 +61,7 @@ export namespace JSX {
|
|
|
61
61
|
};
|
|
62
62
|
$ServerOnly?: boolean;
|
|
63
63
|
}
|
|
64
|
-
type Accessor<T> = () => T
|
|
64
|
+
type Accessor<T> = () => T;
|
|
65
65
|
interface Directives {}
|
|
66
66
|
interface DirectiveFunctions {
|
|
67
67
|
[x: string]: (el: Element, accessor: Accessor<any>) => void;
|
|
@@ -74,7 +74,9 @@ export namespace JSX {
|
|
|
74
74
|
[Key in keyof Directives as `use:${Key}`]?: Directives[Key];
|
|
75
75
|
};
|
|
76
76
|
type DirectiveFunctionAttributes<T> = {
|
|
77
|
-
[K in keyof DirectiveFunctions as string extends K
|
|
77
|
+
[K in keyof DirectiveFunctions as string extends K
|
|
78
|
+
? never
|
|
79
|
+
: `use:${K}`]?: DirectiveFunctions[K] extends (
|
|
78
80
|
el: infer E, // will be unknown if not provided
|
|
79
81
|
...rest: infer R // use rest so that we can check whether it's provided or not
|
|
80
82
|
) => void
|
|
@@ -95,13 +97,23 @@ export namespace JSX {
|
|
|
95
97
|
};
|
|
96
98
|
type OnAttributes<T> = {
|
|
97
99
|
[Key in keyof CustomEvents as `on:${Key}`]?: EventHandler<T, CustomEvents[Key]>;
|
|
98
|
-
}
|
|
100
|
+
};
|
|
99
101
|
type OnCaptureAttributes<T> = {
|
|
100
|
-
[Key in keyof CustomCaptureEvents as `oncapture:${Key}`]?: EventHandler<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
[Key in keyof CustomCaptureEvents as `oncapture:${Key}`]?: EventHandler<
|
|
103
|
+
T,
|
|
104
|
+
CustomCaptureEvents[Key]
|
|
105
|
+
>;
|
|
106
|
+
};
|
|
107
|
+
interface DOMAttributes<T>
|
|
108
|
+
extends CustomAttributes<T>,
|
|
109
|
+
DirectiveAttributes,
|
|
110
|
+
DirectiveFunctionAttributes<T>,
|
|
111
|
+
PropAttributes,
|
|
112
|
+
AttrAttributes,
|
|
113
|
+
OnAttributes<T>,
|
|
114
|
+
OnCaptureAttributes<T>,
|
|
115
|
+
CustomEventHandlersCamelCase<T>,
|
|
116
|
+
CustomEventHandlersLowerCase<T> {
|
|
105
117
|
children?: Element;
|
|
106
118
|
innerHTML?: string;
|
|
107
119
|
innerText?: string | number;
|
|
@@ -187,7 +199,8 @@ export namespace JSX {
|
|
|
187
199
|
onProgress?: EventHandlerUnion<T, Event>;
|
|
188
200
|
onRateChange?: EventHandlerUnion<T, Event>;
|
|
189
201
|
onReset?: EventHandlerUnion<T, Event>;
|
|
190
|
-
onScroll?: EventHandlerUnion<T,
|
|
202
|
+
onScroll?: EventHandlerUnion<T, Event>;
|
|
203
|
+
onScrollEnd?: EventHandlerUnion<T, Event>;
|
|
191
204
|
onSeeked?: EventHandlerUnion<T, Event>;
|
|
192
205
|
onSeeking?: EventHandlerUnion<T, Event>;
|
|
193
206
|
onSelect?: EventHandlerUnion<T, UIEvent>;
|
|
@@ -204,7 +217,10 @@ export namespace JSX {
|
|
|
204
217
|
onTouchEnd?: EventHandlerUnion<T, TouchEvent>;
|
|
205
218
|
onTouchMove?: EventHandlerUnion<T, TouchEvent>;
|
|
206
219
|
onTouchStart?: EventHandlerUnion<T, TouchEvent>;
|
|
220
|
+
onTransitionStart?: EventHandlerUnion<T, TransitionEvent>;
|
|
207
221
|
onTransitionEnd?: EventHandlerUnion<T, TransitionEvent>;
|
|
222
|
+
onTransitionRun?: EventHandlerUnion<T, TransitionEvent>;
|
|
223
|
+
onTransitionCancel?: EventHandlerUnion<T, TransitionEvent>;
|
|
208
224
|
onVolumeChange?: EventHandlerUnion<T, Event>;
|
|
209
225
|
onWaiting?: EventHandlerUnion<T, Event>;
|
|
210
226
|
onWheel?: EventHandlerUnion<T, WheelEvent>;
|
|
@@ -270,7 +286,8 @@ export namespace JSX {
|
|
|
270
286
|
onprogress?: EventHandlerUnion<T, Event>;
|
|
271
287
|
onratechange?: EventHandlerUnion<T, Event>;
|
|
272
288
|
onreset?: EventHandlerUnion<T, Event>;
|
|
273
|
-
onscroll?: EventHandlerUnion<T,
|
|
289
|
+
onscroll?: EventHandlerUnion<T, Event>;
|
|
290
|
+
onscrollend?: EventHandlerUnion<T, Event>;
|
|
274
291
|
onseeked?: EventHandlerUnion<T, Event>;
|
|
275
292
|
onseeking?: EventHandlerUnion<T, Event>;
|
|
276
293
|
onselect?: EventHandlerUnion<T, UIEvent>;
|
|
@@ -287,7 +304,10 @@ export namespace JSX {
|
|
|
287
304
|
ontouchend?: EventHandlerUnion<T, TouchEvent>;
|
|
288
305
|
ontouchmove?: EventHandlerUnion<T, TouchEvent>;
|
|
289
306
|
ontouchstart?: EventHandlerUnion<T, TouchEvent>;
|
|
307
|
+
ontransitionstart?: EventHandlerUnion<T, TransitionEvent>;
|
|
290
308
|
ontransitionend?: EventHandlerUnion<T, TransitionEvent>;
|
|
309
|
+
ontransitionrun?: EventHandlerUnion<T, TransitionEvent>;
|
|
310
|
+
ontransitioncancel?: EventHandlerUnion<T, TransitionEvent>;
|
|
291
311
|
onvolumechange?: EventHandlerUnion<T, Event>;
|
|
292
312
|
onwaiting?: EventHandlerUnion<T, Event>;
|
|
293
313
|
onwheel?: EventHandlerUnion<T, WheelEvent>;
|
|
@@ -295,7 +315,7 @@ export namespace JSX {
|
|
|
295
315
|
|
|
296
316
|
interface CSSProperties extends csstype.PropertiesHyphen {
|
|
297
317
|
// Override
|
|
298
|
-
[key: `-${string}`]: string | number | undefined
|
|
318
|
+
[key: `-${string}`]: string | number | undefined;
|
|
299
319
|
}
|
|
300
320
|
|
|
301
321
|
type HTMLAutocapitalize = "off" | "none" | "on" | "sentences" | "words" | "characters";
|
|
@@ -538,76 +558,77 @@ export namespace JSX {
|
|
|
538
558
|
/** Defines the human readable text alternative of aria-valuenow for a range widget. */
|
|
539
559
|
"aria-valuetext"?: string;
|
|
540
560
|
role?: FunctionMaybe<
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
561
|
+
| "alert"
|
|
562
|
+
| "alertdialog"
|
|
563
|
+
| "application"
|
|
564
|
+
| "article"
|
|
565
|
+
| "banner"
|
|
566
|
+
| "button"
|
|
567
|
+
| "cell"
|
|
568
|
+
| "checkbox"
|
|
569
|
+
| "columnheader"
|
|
570
|
+
| "combobox"
|
|
571
|
+
| "complementary"
|
|
572
|
+
| "contentinfo"
|
|
573
|
+
| "definition"
|
|
574
|
+
| "dialog"
|
|
575
|
+
| "directory"
|
|
576
|
+
| "document"
|
|
577
|
+
| "feed"
|
|
578
|
+
| "figure"
|
|
579
|
+
| "form"
|
|
580
|
+
| "grid"
|
|
581
|
+
| "gridcell"
|
|
582
|
+
| "group"
|
|
583
|
+
| "heading"
|
|
584
|
+
| "img"
|
|
585
|
+
| "link"
|
|
586
|
+
| "list"
|
|
587
|
+
| "listbox"
|
|
588
|
+
| "listitem"
|
|
589
|
+
| "log"
|
|
590
|
+
| "main"
|
|
591
|
+
| "marquee"
|
|
592
|
+
| "math"
|
|
593
|
+
| "menu"
|
|
594
|
+
| "menubar"
|
|
595
|
+
| "menuitem"
|
|
596
|
+
| "menuitemcheckbox"
|
|
597
|
+
| "menuitemradio"
|
|
598
|
+
| "meter"
|
|
599
|
+
| "navigation"
|
|
600
|
+
| "none"
|
|
601
|
+
| "note"
|
|
602
|
+
| "option"
|
|
603
|
+
| "presentation"
|
|
604
|
+
| "progressbar"
|
|
605
|
+
| "radio"
|
|
606
|
+
| "radiogroup"
|
|
607
|
+
| "region"
|
|
608
|
+
| "row"
|
|
609
|
+
| "rowgroup"
|
|
610
|
+
| "rowheader"
|
|
611
|
+
| "scrollbar"
|
|
612
|
+
| "search"
|
|
613
|
+
| "searchbox"
|
|
614
|
+
| "separator"
|
|
615
|
+
| "slider"
|
|
616
|
+
| "spinbutton"
|
|
617
|
+
| "status"
|
|
618
|
+
| "switch"
|
|
619
|
+
| "tab"
|
|
620
|
+
| "table"
|
|
621
|
+
| "tablist"
|
|
622
|
+
| "tabpanel"
|
|
623
|
+
| "term"
|
|
624
|
+
| "textbox"
|
|
625
|
+
| "timer"
|
|
626
|
+
| "toolbar"
|
|
627
|
+
| "tooltip"
|
|
628
|
+
| "tree"
|
|
629
|
+
| "treegrid"
|
|
630
|
+
| "treeitem"
|
|
631
|
+
>;
|
|
611
632
|
}
|
|
612
633
|
|
|
613
634
|
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
|
@@ -643,7 +664,9 @@ export namespace JSX {
|
|
|
643
664
|
itemref?: FunctionMaybe<string>;
|
|
644
665
|
part?: FunctionMaybe<string>;
|
|
645
666
|
exportparts?: FunctionMaybe<string>;
|
|
646
|
-
inputmode?: FunctionMaybe<
|
|
667
|
+
inputmode?: FunctionMaybe<
|
|
668
|
+
"none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search"
|
|
669
|
+
>;
|
|
647
670
|
contentEditable?: FunctionMaybe<boolean | "inherit">;
|
|
648
671
|
contextMenu?: FunctionMaybe<string>;
|
|
649
672
|
tabIndex?: FunctionMaybe<number | string>;
|
|
@@ -654,7 +677,9 @@ export namespace JSX {
|
|
|
654
677
|
itemId?: FunctionMaybe<string>;
|
|
655
678
|
itemRef?: FunctionMaybe<string>;
|
|
656
679
|
exportParts?: FunctionMaybe<string>;
|
|
657
|
-
inputMode?: FunctionMaybe<
|
|
680
|
+
inputMode?: FunctionMaybe<
|
|
681
|
+
"none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search"
|
|
682
|
+
>;
|
|
658
683
|
}
|
|
659
684
|
interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
660
685
|
download?: FunctionMaybe<any>;
|
|
@@ -741,7 +766,7 @@ export namespace JSX {
|
|
|
741
766
|
name?: FunctionMaybe<string>;
|
|
742
767
|
}
|
|
743
768
|
interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
744
|
-
|
|
769
|
+
"accept-charset"?: FunctionMaybe<string>;
|
|
745
770
|
action?: FunctionMaybe<string>;
|
|
746
771
|
autocomplete?: FunctionMaybe<string>;
|
|
747
772
|
encoding?: FunctionMaybe<HTMLFormEncType>;
|
|
@@ -750,7 +775,6 @@ export namespace JSX {
|
|
|
750
775
|
name?: FunctionMaybe<string>;
|
|
751
776
|
novalidate?: FunctionMaybe<boolean>;
|
|
752
777
|
target?: FunctionMaybe<string>;
|
|
753
|
-
acceptCharset?: FunctionMaybe<string>;
|
|
754
778
|
noValidate?: FunctionMaybe<boolean>;
|
|
755
779
|
}
|
|
756
780
|
interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
@@ -885,9 +909,8 @@ export namespace JSX {
|
|
|
885
909
|
interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
886
910
|
charset?: FunctionMaybe<string>;
|
|
887
911
|
content?: FunctionMaybe<string>;
|
|
888
|
-
|
|
912
|
+
"http-equiv"?: FunctionMaybe<string>;
|
|
889
913
|
name?: FunctionMaybe<string>;
|
|
890
|
-
httpEquiv?: FunctionMaybe<string>;
|
|
891
914
|
}
|
|
892
915
|
interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
893
916
|
form?: FunctionMaybe<string>;
|
|
@@ -1017,7 +1040,7 @@ export namespace JSX {
|
|
|
1017
1040
|
rowspan?: FunctionMaybe<number | string>;
|
|
1018
1041
|
colSpan?: FunctionMaybe<number | string>;
|
|
1019
1042
|
rowSpan?: FunctionMaybe<number | string>;
|
|
1020
|
-
scope?: FunctionMaybe<
|
|
1043
|
+
scope?: FunctionMaybe<"col" | "row" | "rowgroup" | "colgroup">;
|
|
1021
1044
|
}
|
|
1022
1045
|
interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1023
1046
|
datetime?: FunctionMaybe<string>;
|
|
@@ -1223,26 +1246,30 @@ export namespace JSX {
|
|
|
1223
1246
|
| "stroke"
|
|
1224
1247
|
| "all"
|
|
1225
1248
|
| "none"
|
|
1226
|
-
| "inherit"
|
|
1227
|
-
|
|
1249
|
+
| "inherit"
|
|
1250
|
+
>;
|
|
1251
|
+
"shape-rendering"?: FunctionMaybe<
|
|
1252
|
+
"auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision" | "inherit"
|
|
1253
|
+
>;
|
|
1228
1254
|
"stop-color"?: FunctionMaybe<string>;
|
|
1229
1255
|
"stop-opacity"?: FunctionMaybe<number | string | "inherit">;
|
|
1230
1256
|
stroke?: FunctionMaybe<string>;
|
|
1231
1257
|
"stroke-dasharray"?: FunctionMaybe<string>;
|
|
1232
1258
|
"stroke-dashoffset"?: FunctionMaybe<number | string>;
|
|
1233
1259
|
"stroke-linecap"?: FunctionMaybe<"butt" | "round" | "square" | "inherit">;
|
|
1234
|
-
"stroke-linejoin"?: FunctionMaybe<
|
|
1260
|
+
"stroke-linejoin"?: FunctionMaybe<
|
|
1261
|
+
"arcs" | "bevel" | "miter" | "miter-clip" | "round" | "inherit"
|
|
1262
|
+
>;
|
|
1235
1263
|
"stroke-miterlimit"?: FunctionMaybe<number | string | "inherit">;
|
|
1236
1264
|
"stroke-opacity"?: FunctionMaybe<number | string | "inherit">;
|
|
1237
1265
|
"stroke-width"?: FunctionMaybe<number | string>;
|
|
1238
1266
|
"text-anchor"?: FunctionMaybe<"start" | "middle" | "end" | "inherit">;
|
|
1239
|
-
"text-decoration"?: FunctionMaybe<
|
|
1267
|
+
"text-decoration"?: FunctionMaybe<
|
|
1268
|
+
"none" | "underline" | "overline" | "line-through" | "blink" | "inherit"
|
|
1269
|
+
>;
|
|
1240
1270
|
"text-rendering"?: FunctionMaybe<
|
|
1241
|
-
| "
|
|
1242
|
-
|
|
1243
|
-
| "optimizeLegibility"
|
|
1244
|
-
| "geometricPrecision"
|
|
1245
|
-
| "inherit">;
|
|
1271
|
+
"auto" | "optimizeSpeed" | "optimizeLegibility" | "geometricPrecision" | "inherit"
|
|
1272
|
+
>;
|
|
1246
1273
|
"unicode-bidi"?: FunctionMaybe<string>;
|
|
1247
1274
|
visibility?: FunctionMaybe<"visible" | "hidden" | "collapse" | "inherit">;
|
|
1248
1275
|
"word-spacing"?: FunctionMaybe<number | string>;
|
|
@@ -1293,7 +1320,7 @@ export namespace JSX {
|
|
|
1293
1320
|
gradientUnits?: FunctionMaybe<SVGUnits>;
|
|
1294
1321
|
gradientTransform?: FunctionMaybe<string>;
|
|
1295
1322
|
spreadMethod?: FunctionMaybe<"pad" | "reflect" | "repeat">;
|
|
1296
|
-
href?: FunctionMaybe<string
|
|
1323
|
+
href?: FunctionMaybe<string>;
|
|
1297
1324
|
}
|
|
1298
1325
|
interface GraphicsElementSVGAttributes<T>
|
|
1299
1326
|
extends CoreSVGAttributes<T>,
|
package/package.json
CHANGED
package/types/jsx.d.ts
CHANGED
|
@@ -266,7 +266,8 @@ export namespace JSX {
|
|
|
266
266
|
onProgress?: EventHandlerUnion<T, Event>;
|
|
267
267
|
onRateChange?: EventHandlerUnion<T, Event>;
|
|
268
268
|
onReset?: EventHandlerUnion<T, Event>;
|
|
269
|
-
onScroll?: EventHandlerUnion<T,
|
|
269
|
+
onScroll?: EventHandlerUnion<T, Event>;
|
|
270
|
+
onScrollEnd?: EventHandlerUnion<T, Event>;
|
|
270
271
|
onSeeked?: EventHandlerUnion<T, Event>;
|
|
271
272
|
onSeeking?: EventHandlerUnion<T, Event>;
|
|
272
273
|
onSelect?: EventHandlerUnion<T, UIEvent>;
|
|
@@ -352,7 +353,8 @@ export namespace JSX {
|
|
|
352
353
|
onprogress?: EventHandlerUnion<T, Event>;
|
|
353
354
|
onratechange?: EventHandlerUnion<T, Event>;
|
|
354
355
|
onreset?: EventHandlerUnion<T, Event>;
|
|
355
|
-
onscroll?: EventHandlerUnion<T,
|
|
356
|
+
onscroll?: EventHandlerUnion<T, Event>;
|
|
357
|
+
onscrollend?: EventHandlerUnion<T, Event>;
|
|
356
358
|
onseeked?: EventHandlerUnion<T, Event>;
|
|
357
359
|
onseeking?: EventHandlerUnion<T, Event>;
|
|
358
360
|
onselect?: EventHandlerUnion<T, UIEvent>;
|
|
@@ -839,7 +841,7 @@ export namespace JSX {
|
|
|
839
841
|
name?: string;
|
|
840
842
|
}
|
|
841
843
|
interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
842
|
-
|
|
844
|
+
"accept-charset"?: string;
|
|
843
845
|
action?: string;
|
|
844
846
|
autocomplete?: string;
|
|
845
847
|
encoding?: HTMLFormEncType;
|
|
@@ -848,7 +850,6 @@ export namespace JSX {
|
|
|
848
850
|
name?: string;
|
|
849
851
|
novalidate?: boolean;
|
|
850
852
|
target?: string;
|
|
851
|
-
acceptCharset?: string;
|
|
852
853
|
noValidate?: boolean;
|
|
853
854
|
}
|
|
854
855
|
interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
@@ -989,9 +990,8 @@ export namespace JSX {
|
|
|
989
990
|
interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
990
991
|
charset?: string;
|
|
991
992
|
content?: string;
|
|
992
|
-
|
|
993
|
+
"http-equiv"?: string;
|
|
993
994
|
name?: string;
|
|
994
|
-
httpEquiv?: string;
|
|
995
995
|
}
|
|
996
996
|
interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
997
997
|
form?: string;
|
|
@@ -1101,6 +1101,7 @@ export namespace JSX {
|
|
|
1101
1101
|
cols?: number | string;
|
|
1102
1102
|
dirname?: string;
|
|
1103
1103
|
disabled?: boolean;
|
|
1104
|
+
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
1104
1105
|
form?: string;
|
|
1105
1106
|
maxlength?: number | string;
|
|
1106
1107
|
minlength?: number | string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Computation } from "../reactive/signal";
|
|
1
2
|
export type HydrationContext = {
|
|
2
3
|
id: string;
|
|
3
4
|
count: number;
|
|
@@ -11,6 +12,8 @@ type SharedConfig = {
|
|
|
11
12
|
gather?: (key: string) => void;
|
|
12
13
|
registry?: Map<string, Element>;
|
|
13
14
|
done?: boolean;
|
|
15
|
+
count?: number;
|
|
16
|
+
effects?: Computation<any, any>[];
|
|
14
17
|
};
|
|
15
18
|
export declare const sharedConfig: SharedConfig;
|
|
16
19
|
export declare function setHydrateContext(context?: HydrationContext): void;
|
package/web/dist/server.cjs
CHANGED
|
@@ -124,10 +124,10 @@ function renderToStream(code, options = {}) {
|
|
|
124
124
|
},
|
|
125
125
|
replace(id, payloadFn) {
|
|
126
126
|
if (firstFlushed) return;
|
|
127
|
-
const placeholder =
|
|
127
|
+
const placeholder = `<!--!$${id}-->`;
|
|
128
128
|
const first = html.indexOf(placeholder);
|
|
129
129
|
if (first === -1) return;
|
|
130
|
-
const last = html.indexOf(
|
|
130
|
+
const last = html.indexOf(`<!--!$/${id}-->`, first + placeholder.length);
|
|
131
131
|
html = html.replace(html.slice(first, last + placeholder.length + 1), resolveSSRNode(payloadFn()));
|
|
132
132
|
},
|
|
133
133
|
writeResource(id, p, error, wait) {
|
|
@@ -197,7 +197,7 @@ function renderToStream(code, options = {}) {
|
|
|
197
197
|
fn(tmp);
|
|
198
198
|
}
|
|
199
199
|
if (onCompleteAll) {
|
|
200
|
-
ogComplete = onCompleteAll;
|
|
200
|
+
let ogComplete = onCompleteAll;
|
|
201
201
|
onCompleteAll = options => {
|
|
202
202
|
ogComplete(options);
|
|
203
203
|
complete();
|
|
@@ -462,7 +462,7 @@ function serializeSet(registry, key, value) {
|
|
|
462
462
|
}
|
|
463
463
|
function replacePlaceholder(html, key, value) {
|
|
464
464
|
const marker = `<template id="pl-${key}">`;
|
|
465
|
-
const close =
|
|
465
|
+
const close = `<!--pl-${key}-->`;
|
|
466
466
|
const first = html.indexOf(marker);
|
|
467
467
|
if (first === -1) return html;
|
|
468
468
|
const last = html.indexOf(close, first + marker.length);
|
package/web/dist/server.js
CHANGED
|
@@ -123,10 +123,10 @@ function renderToStream(code, options = {}) {
|
|
|
123
123
|
},
|
|
124
124
|
replace(id, payloadFn) {
|
|
125
125
|
if (firstFlushed) return;
|
|
126
|
-
const placeholder =
|
|
126
|
+
const placeholder = `<!--!$${id}-->`;
|
|
127
127
|
const first = html.indexOf(placeholder);
|
|
128
128
|
if (first === -1) return;
|
|
129
|
-
const last = html.indexOf(
|
|
129
|
+
const last = html.indexOf(`<!--!$/${id}-->`, first + placeholder.length);
|
|
130
130
|
html = html.replace(html.slice(first, last + placeholder.length + 1), resolveSSRNode(payloadFn()));
|
|
131
131
|
},
|
|
132
132
|
writeResource(id, p, error, wait) {
|
|
@@ -196,7 +196,7 @@ function renderToStream(code, options = {}) {
|
|
|
196
196
|
fn(tmp);
|
|
197
197
|
}
|
|
198
198
|
if (onCompleteAll) {
|
|
199
|
-
ogComplete = onCompleteAll;
|
|
199
|
+
let ogComplete = onCompleteAll;
|
|
200
200
|
onCompleteAll = options => {
|
|
201
201
|
ogComplete(options);
|
|
202
202
|
complete();
|
|
@@ -461,7 +461,7 @@ function serializeSet(registry, key, value) {
|
|
|
461
461
|
}
|
|
462
462
|
function replacePlaceholder(html, key, value) {
|
|
463
463
|
const marker = `<template id="pl-${key}">`;
|
|
464
|
-
const close =
|
|
464
|
+
const close = `<!--pl-${key}-->`;
|
|
465
465
|
const first = html.indexOf(marker);
|
|
466
466
|
if (first === -1) return html;
|
|
467
467
|
const last = html.indexOf(close, first + marker.length);
|