solid-js 2.0.0-beta.10 → 2.0.0-beta.11
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 +15 -8
- package/dist/dev.js +16 -8
- package/dist/server.cjs +310 -134
- package/dist/server.js +237 -39
- package/dist/solid.cjs +17 -8
- package/dist/solid.js +18 -8
- package/package.json +2 -2
- package/types/client/hydration.d.ts +14 -16
- package/types/index.d.ts +1 -3
- package/types/server/core.d.ts +0 -7
- package/types/server/index.d.ts +1 -1
- package/types/server/shared.d.ts +5 -1
- package/types/server/signals.d.ts +41 -5
- package/types-cjs/client/hydration.d.cts +14 -16
- package/types-cjs/index.d.cts +1 -3
- package/types-cjs/server/core.d.cts +0 -7
- package/types-cjs/server/index.d.cts +1 -1
- package/types-cjs/server/shared.d.cts +5 -1
- package/types-cjs/server/signals.d.cts +41 -5
package/dist/dev.cjs
CHANGED
|
@@ -24,7 +24,8 @@ function children(fn) {
|
|
|
24
24
|
});
|
|
25
25
|
const memo = signals.createMemo(() => signals.flatten(c()), {
|
|
26
26
|
name: "children",
|
|
27
|
-
lazy: true
|
|
27
|
+
lazy: true,
|
|
28
|
+
sync: true
|
|
28
29
|
} );
|
|
29
30
|
memo.toArray = () => {
|
|
30
31
|
const v = memo();
|
|
@@ -761,7 +762,9 @@ function lazy(fn, moduleUrl) {
|
|
|
761
762
|
[$DEVCOMP]: true
|
|
762
763
|
});
|
|
763
764
|
return Comp(props);
|
|
764
|
-
}) : ""
|
|
765
|
+
}) : "", {
|
|
766
|
+
sync: true
|
|
767
|
+
});
|
|
765
768
|
};
|
|
766
769
|
wrap.preload = () => p || ((p = fn()).then(mod => comp = () => mod.default), p);
|
|
767
770
|
wrap.moduleUrl = moduleUrl;
|
|
@@ -798,7 +801,8 @@ function Show(props) {
|
|
|
798
801
|
} );
|
|
799
802
|
const condition = keyed ? conditionValue : signals.createMemo(conditionValue, {
|
|
800
803
|
equals: (a, b) => !a === !b,
|
|
801
|
-
name: "condition"
|
|
804
|
+
name: "condition",
|
|
805
|
+
sync: true
|
|
802
806
|
} );
|
|
803
807
|
return signals.createMemo(() => {
|
|
804
808
|
const c = condition();
|
|
@@ -812,7 +816,8 @@ function Show(props) {
|
|
|
812
816
|
}
|
|
813
817
|
return props.fallback;
|
|
814
818
|
}, {
|
|
815
|
-
name: "value"
|
|
819
|
+
name: "value",
|
|
820
|
+
sync: true
|
|
816
821
|
} );
|
|
817
822
|
}
|
|
818
823
|
function Switch(props) {
|
|
@@ -829,11 +834,14 @@ function Switch(props) {
|
|
|
829
834
|
} );
|
|
830
835
|
const condition = mp.keyed ? conditionValue : signals.createMemo(conditionValue, {
|
|
831
836
|
equals: (a, b) => !a === !b,
|
|
832
|
-
name: "condition"
|
|
837
|
+
name: "condition",
|
|
838
|
+
sync: true
|
|
833
839
|
} );
|
|
834
840
|
func = () => prevFunc() || (condition() ? [index, conditionValue, mp] : undefined);
|
|
835
841
|
}
|
|
836
842
|
return func;
|
|
843
|
+
}, {
|
|
844
|
+
sync: true
|
|
837
845
|
});
|
|
838
846
|
return signals.createMemo(() => {
|
|
839
847
|
const sel = switchFunc()();
|
|
@@ -846,7 +854,8 @@ function Switch(props) {
|
|
|
846
854
|
return conditionValue();
|
|
847
855
|
}), "<Match>") : child;
|
|
848
856
|
}, {
|
|
849
|
-
name: "eval conditions"
|
|
857
|
+
name: "eval conditions",
|
|
858
|
+
sync: true
|
|
850
859
|
} );
|
|
851
860
|
}
|
|
852
861
|
function Match(props) {
|
|
@@ -873,7 +882,6 @@ function Reveal(props) {
|
|
|
873
882
|
}
|
|
874
883
|
|
|
875
884
|
function ssrHandleError() {}
|
|
876
|
-
function ssrRunInScope() {}
|
|
877
885
|
const DEV = signals.DEV ;
|
|
878
886
|
if (globalThis) {
|
|
879
887
|
if (!globalThis.Solid$$) globalThis.Solid$$ = true;else console.warn("You appear to have multiple instances of Solid. This can lead to unexpected behavior.");
|
|
@@ -1058,5 +1066,4 @@ exports.enableHydration = enableHydration;
|
|
|
1058
1066
|
exports.lazy = lazy;
|
|
1059
1067
|
exports.sharedConfig = sharedConfig;
|
|
1060
1068
|
exports.ssrHandleError = ssrHandleError;
|
|
1061
|
-
exports.ssrRunInScope = ssrRunInScope;
|
|
1062
1069
|
exports.useContext = useContext;
|
package/dist/dev.js
CHANGED
|
@@ -23,7 +23,8 @@ function children(fn) {
|
|
|
23
23
|
});
|
|
24
24
|
const memo = createMemo$1(() => flatten(c()), {
|
|
25
25
|
name: "children",
|
|
26
|
-
lazy: true
|
|
26
|
+
lazy: true,
|
|
27
|
+
sync: true
|
|
27
28
|
} );
|
|
28
29
|
memo.toArray = () => {
|
|
29
30
|
const v = memo();
|
|
@@ -760,7 +761,9 @@ function lazy(fn, moduleUrl) {
|
|
|
760
761
|
[$DEVCOMP]: true
|
|
761
762
|
});
|
|
762
763
|
return Comp(props);
|
|
763
|
-
}) : ""
|
|
764
|
+
}) : "", {
|
|
765
|
+
sync: true
|
|
766
|
+
});
|
|
764
767
|
};
|
|
765
768
|
wrap.preload = () => p || ((p = fn()).then(mod => comp = () => mod.default), p);
|
|
766
769
|
wrap.moduleUrl = moduleUrl;
|
|
@@ -797,7 +800,8 @@ function Show(props) {
|
|
|
797
800
|
} );
|
|
798
801
|
const condition = keyed ? conditionValue : createMemo$1(conditionValue, {
|
|
799
802
|
equals: (a, b) => !a === !b,
|
|
800
|
-
name: "condition"
|
|
803
|
+
name: "condition",
|
|
804
|
+
sync: true
|
|
801
805
|
} );
|
|
802
806
|
return createMemo$1(() => {
|
|
803
807
|
const c = condition();
|
|
@@ -811,7 +815,8 @@ function Show(props) {
|
|
|
811
815
|
}
|
|
812
816
|
return props.fallback;
|
|
813
817
|
}, {
|
|
814
|
-
name: "value"
|
|
818
|
+
name: "value",
|
|
819
|
+
sync: true
|
|
815
820
|
} );
|
|
816
821
|
}
|
|
817
822
|
function Switch(props) {
|
|
@@ -828,11 +833,14 @@ function Switch(props) {
|
|
|
828
833
|
} );
|
|
829
834
|
const condition = mp.keyed ? conditionValue : createMemo$1(conditionValue, {
|
|
830
835
|
equals: (a, b) => !a === !b,
|
|
831
|
-
name: "condition"
|
|
836
|
+
name: "condition",
|
|
837
|
+
sync: true
|
|
832
838
|
} );
|
|
833
839
|
func = () => prevFunc() || (condition() ? [index, conditionValue, mp] : undefined);
|
|
834
840
|
}
|
|
835
841
|
return func;
|
|
842
|
+
}, {
|
|
843
|
+
sync: true
|
|
836
844
|
});
|
|
837
845
|
return createMemo$1(() => {
|
|
838
846
|
const sel = switchFunc()();
|
|
@@ -845,7 +853,8 @@ function Switch(props) {
|
|
|
845
853
|
return conditionValue();
|
|
846
854
|
}), "<Match>") : child;
|
|
847
855
|
}, {
|
|
848
|
-
name: "eval conditions"
|
|
856
|
+
name: "eval conditions",
|
|
857
|
+
sync: true
|
|
849
858
|
} );
|
|
850
859
|
}
|
|
851
860
|
function Match(props) {
|
|
@@ -872,10 +881,9 @@ function Reveal(props) {
|
|
|
872
881
|
}
|
|
873
882
|
|
|
874
883
|
function ssrHandleError() {}
|
|
875
|
-
function ssrRunInScope() {}
|
|
876
884
|
const DEV = DEV$1 ;
|
|
877
885
|
if (globalThis) {
|
|
878
886
|
if (!globalThis.Solid$$) globalThis.Solid$$ = true;else console.warn("You appear to have multiple instances of Solid. This can lead to unexpected behavior.");
|
|
879
887
|
}
|
|
880
888
|
|
|
881
|
-
export { $DEVCOMP, DEV, Errored, For, Hydration, Loading, Match, NoHydrateContext, NoHydration, Repeat, Reveal, Show, Switch, children, createComponent, createContext, createEffect, createErrorBoundary, createLoadingBoundary, createMemo, createOptimistic, createOptimisticStore, createProjection, createRenderEffect, createSignal, createStore, createUniqueId, enableHydration, lazy, sharedConfig, ssrHandleError,
|
|
889
|
+
export { $DEVCOMP, DEV, Errored, For, Hydration, Loading, Match, NoHydrateContext, NoHydration, Repeat, Reveal, Show, Switch, children, createComponent, createContext, createEffect, createErrorBoundary, createLoadingBoundary, createMemo, createOptimistic, createOptimisticStore, createProjection, createRenderEffect, createSignal, createStore, createUniqueId, enableHydration, lazy, sharedConfig, ssrHandleError, useContext };
|