@adriansteffan/reactive 0.1.14 → 0.1.16
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/{mod-BbekIh7x.js → mod-CnN_S4je.js} +4057 -4045
- package/dist/mod.d.ts +3 -1
- package/dist/reactive.es.js +1 -1
- package/dist/reactive.umd.js +618 -618
- package/dist/{web-BIGX7D5n.js → web-BcQhbLeU.js} +1 -1
- package/dist/{web-DnBWu4dR.js → web-VTeCNj5V.js} +1 -1
- package/package.json +1 -1
- package/src/components/enterfullscreen.tsx +6 -0
- package/src/components/experimentprovider.tsx +12 -3
package/package.json
CHANGED
|
@@ -13,6 +13,8 @@ registerSimulation('EnterFullscreen', noopSimulate, {});
|
|
|
13
13
|
export default function EnterFullscreen({
|
|
14
14
|
content,
|
|
15
15
|
buttonText,
|
|
16
|
+
className,
|
|
17
|
+
containerClass,
|
|
16
18
|
next,
|
|
17
19
|
data,
|
|
18
20
|
updateStore,
|
|
@@ -21,6 +23,8 @@ export default function EnterFullscreen({
|
|
|
21
23
|
prolificCode?: string;
|
|
22
24
|
content?: React.ReactNode;
|
|
23
25
|
buttonText?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
containerClass?: string;
|
|
24
28
|
delayMs?: number;
|
|
25
29
|
} & BaseComponentProps) {
|
|
26
30
|
const contentWrap = (
|
|
@@ -131,6 +135,8 @@ export default function EnterFullscreen({
|
|
|
131
135
|
<Text
|
|
132
136
|
data={data}
|
|
133
137
|
updateStore={updateStore}
|
|
138
|
+
className={className}
|
|
139
|
+
containerClass={containerClass}
|
|
134
140
|
content={contentWrap}
|
|
135
141
|
buttonText={buttonText ?? 'Enter Fullscreen Mode'}
|
|
136
142
|
next={handleEnterFullscreenClick}
|
|
@@ -10,9 +10,18 @@ import { Param } from '../utils/common';
|
|
|
10
10
|
const HybridSimulationContext = createContext(false);
|
|
11
11
|
export const useHybridSimulationDisabled = () => useContext(HybridSimulationContext);
|
|
12
12
|
|
|
13
|
+
function parseBooleanProp(value: unknown): boolean {
|
|
14
|
+
if (typeof value === 'boolean') return value;
|
|
15
|
+
if (typeof value === 'string') {
|
|
16
|
+
const lower = value.trim().toLowerCase();
|
|
17
|
+
return lower !== '' && lower !== 'false' && lower !== '0';
|
|
18
|
+
}
|
|
19
|
+
return !!value;
|
|
20
|
+
}
|
|
21
|
+
|
|
13
22
|
export default function ExperimentProvider({ children, disableSettings, disableHybridSimulation }: { children: ReactNode, disableSettings?: boolean, disableHybridSimulation?: boolean }) {
|
|
14
|
-
|
|
15
|
-
if (window.location.pathname.endsWith('/settings') && !disableSettings) {
|
|
23
|
+
|
|
24
|
+
if (window.location.pathname.endsWith('/settings') && !parseBooleanProp(disableSettings)) {
|
|
16
25
|
return (
|
|
17
26
|
<SettingsScreen
|
|
18
27
|
paramRegistry={Param.getRegistry()}
|
|
@@ -23,7 +32,7 @@ export default function ExperimentProvider({ children, disableSettings, disableH
|
|
|
23
32
|
|
|
24
33
|
return (
|
|
25
34
|
<QueryClientProvider client={queryClient}>
|
|
26
|
-
<HybridSimulationContext.Provider value={
|
|
35
|
+
<HybridSimulationContext.Provider value={parseBooleanProp(disableHybridSimulation)}>
|
|
27
36
|
{children}
|
|
28
37
|
</HybridSimulationContext.Provider>
|
|
29
38
|
<ToastContainer
|