@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.
@@ -1,4 +1,4 @@
1
- import { W as e } from "./mod-BbekIh7x.js";
1
+ import { W as e } from "./mod-CnN_S4je.js";
2
2
  class s extends e {
3
3
  async enable() {
4
4
  console.log("Immersive mode is only available on Android");
@@ -1,4 +1,4 @@
1
- import { W as P, b as x, E } from "./mod-BbekIh7x.js";
1
+ import { W as P, b as x, E } from "./mod-CnN_S4je.js";
2
2
  function m(w) {
3
3
  const e = w.split("/").filter((t) => t !== "."), r = [];
4
4
  return e.forEach((t) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adriansteffan/reactive",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -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={!!disableHybridSimulation}>
35
+ <HybridSimulationContext.Provider value={parseBooleanProp(disableHybridSimulation)}>
27
36
  {children}
28
37
  </HybridSimulationContext.Provider>
29
38
  <ToastContainer