@adriansteffan/reactive 0.0.10 → 0.0.12
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/README.md +0 -1
- package/dist/mod.d.ts +0 -8
- package/dist/preset.css +134 -0
- package/dist/{reactivepsych.es.js → reactive.es.js} +6106 -6518
- package/dist/{reactivepsych.umd.js → reactive.umd.js} +31 -42
- package/dist/style.css +2 -2
- package/package.json +6 -5
- package/postcss.config.js +1 -1
- package/src/components/experiment.tsx +1 -3
- package/src/components/text.tsx +4 -4
- package/src/components/upload.tsx +1 -1
- package/src/components/voicerecorder.tsx +1 -1
- package/src/index.css +69 -9
- package/src/mod.tsx +1 -2
- package/template/package-lock.json +1086 -1227
- package/template/package.json +6 -5
- package/template/postcss.config.js +1 -2
- package/template/src/App.tsx +1 -1
- package/template/src/index.css +3 -3
- package/template/src/main.tsx +1 -1
- package/vite.config.ts +5 -3
- package/dist/tailwind.config.js +0 -33
- package/src/components/mastermindlewrapper.tsx +0 -662
- package/tailwind.config.js +0 -33
- package/template/tailwind.config.js +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adriansteffan/reactive",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"types": "./dist/mod.d.ts"
|
|
24
24
|
},
|
|
25
25
|
"./style.css": "./dist/style.css",
|
|
26
|
-
"./
|
|
26
|
+
"./preset.css": "./dist/preset.css"
|
|
27
27
|
},
|
|
28
28
|
"author": "Adrian Steffan",
|
|
29
29
|
"license": "MIT",
|
|
@@ -42,11 +42,12 @@
|
|
|
42
42
|
"uuid": "^11.0.3"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"tailwindcss": "^
|
|
45
|
+
"tailwindcss": "^4.0.9"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@eslint/config-array": "^0.19.0",
|
|
49
49
|
"@eslint/object-schema": "^2.1.4",
|
|
50
|
+
"@tailwindcss/postcss": "^4.0.9",
|
|
50
51
|
"@types/howler": "^2.2.11",
|
|
51
52
|
"@types/node": "^22.9.2",
|
|
52
53
|
"@types/react": "^18.2.66",
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
"@typescript-eslint/eslint-plugin": "^8.16.0",
|
|
56
57
|
"@typescript-eslint/parser": "^8.16.0",
|
|
57
58
|
"@vitejs/plugin-react": "^4.2.1",
|
|
58
|
-
"autoprefixer": "^10.4.
|
|
59
|
+
"autoprefixer": "^10.4.20",
|
|
59
60
|
"concurrently": "^9.1.0",
|
|
60
61
|
"eslint": "^9.0.0",
|
|
61
62
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
"postcss": "^8.4.38",
|
|
66
67
|
"prettier": "3.2.5",
|
|
67
68
|
"rimraf": "^5.0.5",
|
|
68
|
-
"tailwindcss": "^
|
|
69
|
+
"tailwindcss": "^4.0.9",
|
|
69
70
|
"typescript": "^5.2.2",
|
|
70
71
|
"vite": "^5.2.0",
|
|
71
72
|
"vite-plugin-dts": "^4.3.0",
|
package/postcss.config.js
CHANGED
|
@@ -8,7 +8,6 @@ import { ComponentType } from 'react';
|
|
|
8
8
|
import Upload from './upload';
|
|
9
9
|
import Text from './text';
|
|
10
10
|
import Quest from './quest';
|
|
11
|
-
import MasterMindleWrapper from './mastermindlewrapper';
|
|
12
11
|
import MicrophoneCheck from './microphonecheck';
|
|
13
12
|
|
|
14
13
|
// Default Custom Questions
|
|
@@ -24,7 +23,6 @@ const defaultComponents: ComponentsMap = {
|
|
|
24
23
|
Quest,
|
|
25
24
|
Upload,
|
|
26
25
|
MicrophoneCheck,
|
|
27
|
-
MasterMindleWrapper,
|
|
28
26
|
};
|
|
29
27
|
|
|
30
28
|
const defaultCustomQuestions = {
|
|
@@ -127,7 +125,7 @@ export default function Experiment({
|
|
|
127
125
|
}
|
|
128
126
|
|
|
129
127
|
return (
|
|
130
|
-
<div className='px-4 w-
|
|
128
|
+
<div className='px-4 w-full'>
|
|
131
129
|
<div
|
|
132
130
|
className={` ${
|
|
133
131
|
config.showProgressBar ? '' : 'hidden '
|
package/src/components/text.tsx
CHANGED
|
@@ -19,20 +19,20 @@ function Text({
|
|
|
19
19
|
return (
|
|
20
20
|
<div className={`max-w-prose mx-auto ${className} mt-20 mb-20`}>
|
|
21
21
|
<article
|
|
22
|
-
className={`prose prose-2xl prose-slate text-xl prose-h1:text-
|
|
23
|
-
${animate ? 'animate-
|
|
22
|
+
className={`prose prose-2xl prose-slate text-xl prose-a:text-blue-600 prose-a:underline prose-h1:text-4xl prose-h1:mb-10 prose-h1:font-bold prose-p:mb-4 prose-strong:font-bold text-black leading-relaxed
|
|
23
|
+
${animate ? 'animate-slide-down opacity-0' : ''}`}
|
|
24
24
|
>
|
|
25
25
|
{content}
|
|
26
26
|
</article>
|
|
27
27
|
|
|
28
28
|
{buttonText && (
|
|
29
29
|
<div
|
|
30
|
-
className={`mt-16 flex justify-center ${animate ? 'animate-
|
|
30
|
+
className={`mt-16 flex justify-center ${animate ? 'animate-fade-in opacity-0' : ''}`}
|
|
31
31
|
style={animate ? { animationDelay: '1s' } : {}}
|
|
32
32
|
>
|
|
33
33
|
<button
|
|
34
34
|
onClick={handleClick}
|
|
35
|
-
className='bg-white px-8 py-3 border-2 border-black font-bold text-black text-lg rounded-xl shadow-[2px_2px_0px_rgba(0,0,0,1)] hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-none'
|
|
35
|
+
className='bg-white cursor-pointer px-8 py-3 border-2 border-black font-bold text-black text-lg rounded-xl shadow-[2px_2px_0px_rgba(0,0,0,1)] hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-none'
|
|
36
36
|
>
|
|
37
37
|
{buttonText}
|
|
38
38
|
</button>
|
|
@@ -138,7 +138,7 @@ export default function Upload({
|
|
|
138
138
|
</div>
|
|
139
139
|
<button
|
|
140
140
|
onClick={handleUpload}
|
|
141
|
-
className='px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors'
|
|
141
|
+
className='px-4 py-2 bg-blue-500 text-white rounded-sm hover:bg-blue-600 transition-colors'
|
|
142
142
|
>
|
|
143
143
|
Try Again
|
|
144
144
|
</button>
|
|
@@ -166,7 +166,7 @@ const AudioVisualizer: React.FC<AudioVisualizerProps> = ({ stream }) => {
|
|
|
166
166
|
ref={canvasRef}
|
|
167
167
|
width={300}
|
|
168
168
|
height={60}
|
|
169
|
-
className='mx-auto rounded-lg bg-white shadow-
|
|
169
|
+
className='mx-auto rounded-lg bg-white shadow-xs'
|
|
170
170
|
/>
|
|
171
171
|
);
|
|
172
172
|
};
|
package/src/index.css
CHANGED
|
@@ -1,22 +1,82 @@
|
|
|
1
|
-
@
|
|
2
|
-
@tailwind components;
|
|
3
|
-
@tailwind utilities;
|
|
1
|
+
@import 'tailwindcss';
|
|
4
2
|
|
|
3
|
+
@source '../dist/**/*.{js,ts,jsx,tsx}';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
--font
|
|
5
|
+
@theme {
|
|
6
|
+
--font-*: initial;
|
|
7
|
+
--font-sans: Atkinson Hyperlegible, sans-serif;
|
|
8
|
+
--font-atkinson: Atkinson Hyperlegible, sans-serif;
|
|
9
|
+
|
|
10
|
+
--animate-slide-down: slideDown 0.8s ease-out forwards;
|
|
11
|
+
--animate-fade-in: fadeIn 0.5s ease-out forwards;
|
|
12
|
+
|
|
13
|
+
@keyframes slideDown {
|
|
14
|
+
0% {
|
|
15
|
+
transform: translateY(-10px);
|
|
16
|
+
opacity: 0;
|
|
17
|
+
}
|
|
18
|
+
100% {
|
|
19
|
+
transform: translateY(0);
|
|
20
|
+
opacity: 1;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
@keyframes fadeIn {
|
|
24
|
+
0% {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
}
|
|
27
|
+
100% {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
8
31
|
}
|
|
9
32
|
|
|
10
|
-
|
|
11
|
-
|
|
33
|
+
|
|
34
|
+
@keyframes slideDown {
|
|
35
|
+
0% {
|
|
36
|
+
transform: translateY(-10px);
|
|
37
|
+
opacity: 0;
|
|
38
|
+
}
|
|
39
|
+
100% {
|
|
40
|
+
transform: translateY(0);
|
|
41
|
+
opacity: 1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@keyframes fadeIn {
|
|
46
|
+
0% {
|
|
47
|
+
opacity: 0;
|
|
48
|
+
}
|
|
49
|
+
100% {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
12
52
|
}
|
|
13
53
|
|
|
54
|
+
/*
|
|
55
|
+
The default border color has changed to `currentColor` in Tailwind CSS v4,
|
|
56
|
+
so we've added these compatibility styles to make sure everything still
|
|
57
|
+
looks the same as it did with Tailwind CSS v3.
|
|
58
|
+
|
|
59
|
+
If we ever want to remove these styles, we need to add an explicit border
|
|
60
|
+
color utility to any element that depends on these defaults.
|
|
61
|
+
*/
|
|
14
62
|
@layer base {
|
|
15
|
-
|
|
16
|
-
|
|
63
|
+
*,
|
|
64
|
+
::after,
|
|
65
|
+
::before,
|
|
66
|
+
::backdrop,
|
|
67
|
+
::file-selector-button {
|
|
68
|
+
border-color: var(--color-gray-200, currentColor);
|
|
17
69
|
}
|
|
18
70
|
}
|
|
19
71
|
|
|
72
|
+
:root {
|
|
73
|
+
--font-atkinson: 'Atkinson Hyperlegible', system-ui, sans-serif;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
* {
|
|
77
|
+
-webkit-touch-callout: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
20
80
|
@font-face {
|
|
21
81
|
font-family: 'Atkinson Hyperlegible';
|
|
22
82
|
src: url('/Atkinson_Hyperlegible/AtkinsonHyperlegible-Regular.ttf') format('truetype');
|
package/src/mod.tsx
CHANGED
|
@@ -6,9 +6,8 @@ import Upload from './components/upload';
|
|
|
6
6
|
import ExperimentProvider from './components/experimentprovider';
|
|
7
7
|
import Experiment from './components/experiment';
|
|
8
8
|
import { shuffle, BaseComponentProps, ExperimentConfig } from './utils/common';
|
|
9
|
-
import MasterMindleWrapper from './components/mastermindlewrapper';
|
|
10
9
|
|
|
11
|
-
export { Text, MicCheck, Quest, Upload,
|
|
10
|
+
export { Text, MicCheck, Quest, Upload, Experiment, ExperimentProvider, shuffle };
|
|
12
11
|
export type { BaseComponentProps, ExperimentConfig };
|
|
13
12
|
export * from './utils/common';
|
|
14
13
|
|