@adriansteffan/reactive 0.1.28 → 0.1.29
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/.playwright-mcp/console-2026-04-07T14-22-59-060Z.log +1 -0
- package/dist/{mod-qzwQpchZ.js → mod-B1ELalrV.js} +1069 -1064
- package/dist/mod.d.ts +8 -4
- package/dist/reactive.es.js +1 -1
- package/dist/reactive.umd.js +29 -29
- package/dist/{web-C5T4uDJE.js → web-BTwvRGCD.js} +1 -1
- package/dist/{web-DeAZ9qXG.js → web-CCfG4if-.js} +1 -1
- package/package.json +1 -1
- package/src/components/enterfullscreen.tsx +3 -0
- package/src/components/prolificending.tsx +3 -2
- package/src/components/text.tsx +4 -2
- package/src/components/upload.tsx +3 -1
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ export default function EnterFullscreen({
|
|
|
16
16
|
buttonText,
|
|
17
17
|
className,
|
|
18
18
|
containerClass,
|
|
19
|
+
centered,
|
|
19
20
|
animate,
|
|
20
21
|
next,
|
|
21
22
|
data,
|
|
@@ -27,6 +28,7 @@ export default function EnterFullscreen({
|
|
|
27
28
|
buttonText?: string;
|
|
28
29
|
className?: string;
|
|
29
30
|
containerClass?: string;
|
|
31
|
+
centered?: boolean;
|
|
30
32
|
animate?: boolean;
|
|
31
33
|
delayMs?: number;
|
|
32
34
|
} & BaseComponentProps) {
|
|
@@ -142,6 +144,7 @@ export default function EnterFullscreen({
|
|
|
142
144
|
updateStore={updateStore}
|
|
143
145
|
className={className}
|
|
144
146
|
containerClass={containerClass}
|
|
147
|
+
centered={centered}
|
|
145
148
|
animate={animate}
|
|
146
149
|
content={contentWrap}
|
|
147
150
|
buttonText={buttonText ?? 'Enter Fullscreen Mode'}
|
|
@@ -14,10 +14,11 @@ export default function ProlificEnding({
|
|
|
14
14
|
prolificCode,
|
|
15
15
|
className,
|
|
16
16
|
containerClass,
|
|
17
|
+
centered,
|
|
17
18
|
animate,
|
|
18
19
|
data,
|
|
19
20
|
updateStore
|
|
20
|
-
}: { prolificCode?: string; className?: string; containerClass?: string; animate?: boolean } & BaseComponentProps) {
|
|
21
|
+
}: { prolificCode?: string; className?: string; containerClass?: string; centered?: boolean; animate?: boolean } & BaseComponentProps) {
|
|
21
22
|
let prolificCodeUsed = prolificCode ?? getParam('cc', '', 'string') ?? null;
|
|
22
23
|
|
|
23
24
|
const content = (
|
|
@@ -40,5 +41,5 @@ export default function ProlificEnding({
|
|
|
40
41
|
</div>
|
|
41
42
|
);
|
|
42
43
|
|
|
43
|
-
return <Text data={data} updateStore={updateStore} className={className} containerClass={containerClass} animate={animate} content={content} buttonText='' next={() => {}} />;
|
|
44
|
+
return <Text data={data} updateStore={updateStore} className={className} containerClass={containerClass} centered={centered} animate={animate} content={content} buttonText='' next={() => {}} />;
|
|
44
45
|
}
|
package/src/components/text.tsx
CHANGED
|
@@ -19,9 +19,10 @@ registerSimulation('Text', (trialProps, _experimentState, simulators, participan
|
|
|
19
19
|
|
|
20
20
|
function Text({
|
|
21
21
|
content,
|
|
22
|
-
buttonText = '
|
|
22
|
+
buttonText = 'Continue',
|
|
23
23
|
className = '',
|
|
24
24
|
containerClass,
|
|
25
|
+
centered = false,
|
|
25
26
|
next,
|
|
26
27
|
animate = false,
|
|
27
28
|
allowedKeys = false,
|
|
@@ -31,6 +32,7 @@ function Text({
|
|
|
31
32
|
onButtonClick?: () => void;
|
|
32
33
|
className?: string;
|
|
33
34
|
containerClass?: string;
|
|
35
|
+
centered?: boolean;
|
|
34
36
|
animate?: boolean;
|
|
35
37
|
allowedKeys?: string[] | boolean;
|
|
36
38
|
} & BaseComponentProps) {
|
|
@@ -86,7 +88,7 @@ function Text({
|
|
|
86
88
|
};
|
|
87
89
|
|
|
88
90
|
return (
|
|
89
|
-
<div className={`min-h-screen ${containerClass ?? th.containerBg}`}>
|
|
91
|
+
<div className={`min-h-screen ${centered ? 'flex items-center justify-center' : ''} ${containerClass ?? th.containerBg}`}>
|
|
90
92
|
<div className={`max-w-prose mx-auto ${className} pt-20 pb-20 px-4 `}>
|
|
91
93
|
<article
|
|
92
94
|
className={`prose prose-2xl ${th.prose} text-xl ${th.proseLink} prose-a:underline prose-h1:text-4xl prose-h1:mb-10 prose-h1:font-bold prose-p:mb-4 prose-strong:font-bold ${th.text} leading-relaxed
|
|
@@ -231,6 +231,7 @@ export default function Upload({
|
|
|
231
231
|
androidFolderName,
|
|
232
232
|
className,
|
|
233
233
|
containerClass,
|
|
234
|
+
centered,
|
|
234
235
|
content,
|
|
235
236
|
uploadingContent,
|
|
236
237
|
errorContent,
|
|
@@ -243,6 +244,7 @@ export default function Upload({
|
|
|
243
244
|
androidFolderName?: string;
|
|
244
245
|
className?: string;
|
|
245
246
|
containerClass?: string;
|
|
247
|
+
centered?: boolean;
|
|
246
248
|
content?: React.ReactNode;
|
|
247
249
|
uploadingContent?: React.ReactNode;
|
|
248
250
|
errorContent?: React.ReactNode;
|
|
@@ -384,7 +386,7 @@ export default function Upload({
|
|
|
384
386
|
const btnClass = `cursor-pointer ${th.buttonBg} px-8 py-3 border-2 ${th.buttonBorder} font-bold ${th.buttonText} text-lg rounded-xl ${th.buttonShadow} hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-none`;
|
|
385
387
|
|
|
386
388
|
return (
|
|
387
|
-
<div className={containerClass ?? th.containerBg} style={{ position: 'fixed', inset: 0 }}>
|
|
389
|
+
<div className={`${centered ? 'flex items-center justify-center' : ''} ${containerClass ?? th.containerBg}`} style={{ position: 'fixed', inset: 0 }}>
|
|
388
390
|
<div className={`flex flex-col items-center justify-center gap-4 p-6 text-xl mt-16 px-10 h-full ${th.text} ${className ?? ''}`}>
|
|
389
391
|
{uploadState == 'initial' && !autoUpload && (
|
|
390
392
|
<>
|