-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from Watts-Lab/kimberly-render-delib-empirica
Render delib empirica
- Loading branch information
Showing
15 changed files
with
9,766 additions
and
4,646 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "deliberation-empirica"] | ||
path = deliberation-empirica | ||
url = https://github.com/Watts-Lab/deliberation-empirica.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
export function usePlayer() { | ||
// This is a mock function that returns a mock player object | ||
console.log("loaded usePlayer() from react-mocks.js"); | ||
const player = { | ||
isMock: true, | ||
introDone: true, | ||
exitStep: 0, //TODO, | ||
position: 0, //TODO - set with toggle | ||
get: function (varName) { | ||
return this[varName]; | ||
}, | ||
set: function (varName, value) { | ||
this[varName] = value; | ||
}, | ||
}; | ||
|
||
return player; | ||
} | ||
|
||
export function useGame() { | ||
// This is a mock function that returns a mock game object | ||
const game = { | ||
isMock: true, | ||
ended: false, | ||
get: function (varName) { | ||
return this[varName]; | ||
}, | ||
set: function (varName, value) { | ||
this[varName] = value; | ||
}, | ||
}; | ||
|
||
return game; | ||
} | ||
|
||
export function useStageTimer() { | ||
//TODO implement? | ||
// This is a mock function that returns a mock stage timer object | ||
const stageTimer = { | ||
isMock: true, | ||
}; | ||
|
||
return stageTimer; | ||
} | ||
|
||
export function useStage() { | ||
// This is a mock function that returns a mock stage object | ||
const stage = { | ||
isMock: true, | ||
index: 0, //TODO | ||
get: function (varName) { | ||
return this[varName]; | ||
}, | ||
set: function (varName, value) { | ||
this[varName] = value; | ||
}, | ||
}; | ||
|
||
return stage; | ||
} | ||
|
||
export function usePlayers() { | ||
// This is a mock function that returns a mock players object | ||
const players = { | ||
isMock: true, | ||
get: function (varName) { | ||
return this[varName]; | ||
}, | ||
set: function (varName, value) { | ||
this[varName] = value; | ||
}, | ||
}; | ||
|
||
return players; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
{ | ||
"name": "@empirica/core", | ||
"version": "1.9.6", | ||
"description": "Empirica Core", | ||
"author": "Nicolas Paton <nicolas.paton@gmail.com>", | ||
"license": "Apache-2.0", | ||
"homepage": "https://github.com/empiricaly/empirica#readme", | ||
"bugs": { | ||
"url": "https://github.com/empiricaly/empirica/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/empiricaly/empirica.git" | ||
}, | ||
"keywords": [ | ||
"empirica", | ||
"experiment", | ||
"research", | ||
"multiplayer", | ||
"real-time", | ||
"behavioral", | ||
"social-science", | ||
"psychology" | ||
], | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js" | ||
}, | ||
"./console": { | ||
"types": "./dist/console.d.ts", | ||
"import": "./dist/console.js", | ||
"require": "./dist/console.cjs" | ||
}, | ||
"./player": { | ||
"types": "./dist/player.d.ts", | ||
"import": "./dist/player.js", | ||
"require": "./dist/player.cjs" | ||
}, | ||
"./player/react": { | ||
"import": "./react-mocks.js" | ||
}, | ||
"./player/classic": { | ||
"types": "./dist/player-classic.d.ts", | ||
"import": "./dist/player-classic.js", | ||
"require": "./dist/player-classic.cjs" | ||
}, | ||
"./player/classic/react": { | ||
"import": "./mocks.js" | ||
}, | ||
"./user": { | ||
"types": "./dist/user.d.ts", | ||
"import": "./dist/user.js", | ||
"require": "./dist/user.cjs" | ||
}, | ||
"./admin": { | ||
"types": "./dist/admin.d.ts", | ||
"import": "./dist/admin.js", | ||
"require": "./dist/admin.cjs" | ||
}, | ||
"./admin/classic": { | ||
"types": "./dist/admin-classic.d.ts", | ||
"import": "./dist/admin-classic.js", | ||
"require": "./dist/admin-classic.cjs" | ||
} | ||
}, | ||
"types": "dist/index.d.ts", | ||
"main": "dist/index.js", | ||
"player": "dist/player.js", | ||
"player-react": "dist/player-react.js", | ||
"player-classic": "dist/player-classic.js", | ||
"player-classic-react": "dist/player-classic-react.js", | ||
"admin": "dist/admin.js", | ||
"admin-classic": "dist/admin-classic.js", | ||
"console": "dist/console.js", | ||
"targets": { | ||
"main": { | ||
"source": "src/index.ts", | ||
"isLibrary": true, | ||
"outputFormat": "esmodule", | ||
"sourceMap": true | ||
}, | ||
"player": { | ||
"source": "src/player/index.ts", | ||
"isLibrary": true, | ||
"outputFormat": "esmodule", | ||
"sourceMap": true | ||
}, | ||
"player-react": { | ||
"source": "src/player/react/index.ts", | ||
"isLibrary": true, | ||
"outputFormat": "esmodule", | ||
"sourceMap": true | ||
}, | ||
"player-classic": { | ||
"source": "src/player/classic/index.ts", | ||
"isLibrary": true, | ||
"outputFormat": "esmodule", | ||
"sourceMap": true | ||
}, | ||
"player-classic-react": { | ||
"source": "src/player/classic/react/index.ts", | ||
"isLibrary": true, | ||
"outputFormat": "esmodule", | ||
"sourceMap": true | ||
}, | ||
"admin": { | ||
"source": "src/admin/index.ts", | ||
"isLibrary": true, | ||
"outputFormat": "esmodule", | ||
"sourceMap": true | ||
}, | ||
"admin-classic": { | ||
"source": "src/admin/classic/index.ts", | ||
"isLibrary": true, | ||
"outputFormat": "esmodule", | ||
"sourceMap": true | ||
}, | ||
"console": { | ||
"source": "src/utils/console.ts", | ||
"isLibrary": true, | ||
"outputFormat": "esmodule", | ||
"sourceMap": true | ||
} | ||
}, | ||
"volta": { | ||
"node": "20.10.0", | ||
"npm": "10.2.3" | ||
}, | ||
"engines": { | ||
"node": ">= 16.17.0" | ||
}, | ||
"browserslist": "> 0.5%, last 2 versions, not dead", | ||
"ava": { | ||
"files": [ | ||
"src/**/*_test.ts", | ||
"src/**/*_test.tsx" | ||
], | ||
"extensions": { | ||
"ts": "module", | ||
"tsx": "module" | ||
}, | ||
"nodeArguments": [ | ||
"--loader=ts-node/esm", | ||
"--experimental-specifier-resolution=node" | ||
] | ||
}, | ||
"files": [ | ||
"dist/*" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"build": "tsup", | ||
"check": "tsc --noEmit", | ||
"test:real": "NODE_NO_WARNINGS=1 TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true c8 -r lcov -r html ava -v", | ||
"test": "echo 'tests temporarily disabled'", | ||
"test:watch": "NODE_NO_WARNINGS=1 TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true ava --watch -v", | ||
"prerelease:legacy": "npm run build", | ||
"prepublish": "npm run build" | ||
}, | ||
"devDependencies": { | ||
"@julr/unocss-preset-forms": "0.0.5", | ||
"@testing-library/react": "13.3.0", | ||
"@types/archiver": "5.3.1", | ||
"@types/node": "18.0.0", | ||
"@types/react": "18.0.14", | ||
"@types/sinon": "10.0.11", | ||
"@types/stream-buffers": "3.0.4", | ||
"@types/tmp": "0.2.3", | ||
"@unocss/postcss": "0.51.4", | ||
"ava": "4.3.0", | ||
"c8": "7.11.3", | ||
"global-jsdom": "8.4.0", | ||
"jsdom": "20.0.0", | ||
"postcss": "8.4.21", | ||
"prettier": "2.7.1", | ||
"sinon": "14.0.0", | ||
"tmp": "0.2.1", | ||
"ts-node": "10.8.1", | ||
"tsup": "6.7.0", | ||
"typedoc": "0.24.6", | ||
"typedoc-plugin-markdown": "4.0.0-next.10", | ||
"typescript": "4.7.4", | ||
"unocss": "0.51.4" | ||
}, | ||
"dependencies": { | ||
"@empirica/tajriba": "1.6.0", | ||
"@swc/helpers": "0.4.2", | ||
"@unocss/reset": "^0.51.4", | ||
"archiver": "5.3.1", | ||
"async-mutex": "0.4.1", | ||
"rxjs": "7.5.5", | ||
"stream-buffers": "3.0.2", | ||
"zod": "3.17.3" | ||
}, | ||
"peerDependencies": { | ||
"react": "18.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "@empirica/core", | ||
"version": "1.9.6", | ||
"description": "Empirica Core MOCK", | ||
"type": "module", | ||
"exports": { | ||
"./player/react": { | ||
"import": "./react-mocks.js" | ||
}, | ||
"./player/classic/react": { | ||
"import": "./mocks.js" | ||
} | ||
}, | ||
"scripts": {}, | ||
"devDependencies": {}, | ||
"dependencies": {}, | ||
"peerDependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export function useGlobal() { | ||
// This is a mock function that returns a mock global object | ||
const global = { | ||
isMock: true, | ||
recruitingBatchConfig: undefined, //TODO | ||
get: function (varName) {return this[varName]} | ||
|
||
}; | ||
|
||
return global; | ||
} | ||
|
||
export function Loading() { | ||
return "Loading..."; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.