@nyuccl/smile 0.2.0-beta.4 → 0.2.0-beta.41

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.
Files changed (310) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +109 -21
  3. package/dist/runtime/components/builtins/AdvertisementView.d.vue.ts +13 -1
  4. package/dist/runtime/components/builtins/AdvertisementView.vue +7 -3
  5. package/dist/runtime/components/builtins/AdvertisementView.vue.d.ts +13 -1
  6. package/dist/runtime/components/builtins/DebriefView.vue +3 -1
  7. package/dist/runtime/components/builtins/DemographicSurveyView.vue +8 -6
  8. package/dist/runtime/components/builtins/DeviceSurveyView.vue +5 -3
  9. package/dist/runtime/components/builtins/ExpView.vue +4 -2
  10. package/dist/runtime/components/builtins/ExperimentStatusBar.vue +3 -0
  11. package/dist/runtime/components/builtins/FavoriteColor.vue +3 -1
  12. package/dist/runtime/components/builtins/FavoriteNumber.vue +3 -1
  13. package/dist/runtime/components/builtins/InformedConsentModal.vue +5 -3
  14. package/dist/runtime/components/builtins/InformedConsentView.vue +3 -2
  15. package/dist/runtime/components/builtins/InstructionsQuiz.vue +7 -5
  16. package/dist/runtime/components/builtins/InstructionsView.vue +5 -3
  17. package/dist/runtime/components/builtins/LocalDevBanner.vue +16 -0
  18. package/dist/runtime/components/builtins/MTurkRecruitView.vue +4 -3
  19. package/dist/runtime/components/builtins/PresentationModeView.vue +9 -8
  20. package/dist/runtime/components/builtins/StatusBar.vue +7 -4
  21. package/dist/runtime/components/builtins/StudyPreviewText.vue +12 -10
  22. package/dist/runtime/components/builtins/TaskFeedbackSurveyView.vue +3 -1
  23. package/dist/runtime/components/builtins/ThanksView.vue +22 -21
  24. package/dist/runtime/components/builtins/WindowSizerView.vue +5 -3
  25. package/dist/runtime/components/builtins/WithdrawModal.vue +9 -7
  26. package/dist/runtime/components/builtins/WithdrawView.vue +4 -2
  27. package/dist/runtime/components/dev/RecruitmentChooserView.vue +532 -224
  28. package/dist/runtime/components/dev/ResponsiveDeviceContainer.vue +17 -8
  29. package/dist/runtime/components/dev/SmileDevPresentationView.vue +83 -0
  30. package/dist/runtime/components/dev/console/ConfigList.vue +14 -11
  31. package/dist/runtime/components/dev/console/ConsoleConfigPanel.vue +28 -7
  32. package/dist/runtime/components/dev/console/ConsoleDatabaseBrowsePanel.vue +6 -4
  33. package/dist/runtime/components/dev/console/ConsoleLogPanel.vue +68 -23
  34. package/dist/runtime/components/dev/console/DatabaseList.vue +9 -7
  35. package/dist/runtime/components/dev/console/SmileDevConsole.vue +7 -5
  36. package/dist/runtime/components/dev/devicePresets.d.ts +4 -4
  37. package/dist/runtime/components/dev/devicePresets.js +4 -4
  38. package/dist/runtime/components/dev/menu/DevConfigPanel.vue +3 -1
  39. package/dist/runtime/components/dev/menu/ResponsiveDeviceSelect.vue +1 -0
  40. package/dist/runtime/components/dev/menu/SmileDevAppMenu.vue +27 -24
  41. package/dist/runtime/components/dev/navbar/ColorModeButton.vue +5 -3
  42. package/dist/runtime/components/dev/navbar/DatabaseButtonGroup.vue +8 -6
  43. package/dist/runtime/components/dev/navbar/FullScreenButton.vue +4 -2
  44. package/dist/runtime/components/dev/navbar/KeyCommandNotification.vue +1 -1
  45. package/dist/runtime/components/dev/navbar/PanelButtonGroup.d.vue.ts +3 -0
  46. package/dist/runtime/components/dev/navbar/PanelButtonGroup.vue +79 -0
  47. package/dist/runtime/components/dev/navbar/PanelButtonGroup.vue.d.ts +3 -0
  48. package/dist/runtime/components/dev/navbar/ReloadButton.vue +3 -1
  49. package/dist/runtime/components/dev/navbar/ResetButton.vue +3 -1
  50. package/dist/runtime/components/dev/navbar/RouteJumper.vue +9 -5
  51. package/dist/runtime/components/dev/navbar/SmileDevNavBar.vue +19 -27
  52. package/dist/runtime/components/dev/navbar/StepInfoButtonGroup.vue +5 -3
  53. package/dist/runtime/components/dev/navbar/ViewInfoButtonGroup.vue +13 -10
  54. package/dist/runtime/components/dev/presentation/DarkModeButton.vue +5 -3
  55. package/dist/runtime/components/dev/presentation/LogoutButton.vue +2 -1
  56. package/dist/runtime/components/dev/presentation/PresentationModeResetButton.vue +11 -2
  57. package/dist/runtime/components/dev/presentation/PresentationNavBar.d.vue.ts +13 -1
  58. package/dist/runtime/components/dev/presentation/PresentationNavBar.vue +13 -6
  59. package/dist/runtime/components/dev/presentation/PresentationNavBar.vue.d.ts +13 -1
  60. package/dist/runtime/components/dev/presentation/QRCodeButton.vue +4 -2
  61. package/dist/runtime/components/dev/sidebar/AppProgressPanel.vue +23 -21
  62. package/dist/runtime/components/dev/sidebar/ConfigurationVariablesPanel.vue +7 -5
  63. package/dist/runtime/components/dev/sidebar/DatabaseStatusInfoPanel.vue +27 -7
  64. package/dist/runtime/components/dev/sidebar/RandomizationSidebarPanel.vue +9 -5
  65. package/dist/runtime/components/dev/sidebar/SmileDevSideBar.vue +12 -5
  66. package/dist/runtime/components/dev/sidebar/StepDataViewer.d.vue.ts +2 -2
  67. package/dist/runtime/components/dev/sidebar/StepDataViewer.vue +1 -1
  68. package/dist/runtime/components/dev/sidebar/StepDataViewer.vue.d.ts +2 -2
  69. package/dist/runtime/components/dev/sidebar/StepExplorerPanel.vue +13 -8
  70. package/dist/runtime/components/dev/sidebar/StepNode.vue +7 -5
  71. package/dist/runtime/components/dev/sidebar/StudyInfoPanel.vue +3 -2
  72. package/dist/runtime/components/forms/MonthYearDayPicker.vue +1 -0
  73. package/dist/runtime/components/layouts/ConstrainedPage.d.vue.ts +1 -1
  74. package/dist/runtime/components/layouts/ConstrainedPage.vue.d.ts +1 -1
  75. package/dist/runtime/components/layouts/ConstrainedTaskWindow.d.vue.ts +2 -2
  76. package/dist/runtime/components/layouts/ConstrainedTaskWindow.vue +1 -1
  77. package/dist/runtime/components/layouts/ConstrainedTaskWindow.vue.d.ts +2 -2
  78. package/dist/runtime/components/layouts/TitleTwoCol.d.vue.ts +1 -1
  79. package/dist/runtime/components/layouts/TitleTwoCol.vue.d.ts +1 -1
  80. package/dist/runtime/components/layouts/TwoCol.d.vue.ts +1 -1
  81. package/dist/runtime/components/layouts/TwoCol.vue.d.ts +1 -1
  82. package/dist/runtime/components/ui/avatar/Avatar.vue +1 -0
  83. package/dist/runtime/components/ui/avatar/AvatarFallback.vue +1 -0
  84. package/dist/runtime/components/ui/badge/Badge.vue +1 -0
  85. package/dist/runtime/components/ui/badge/index.d.ts +1 -1
  86. package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue +1 -0
  87. package/dist/runtime/components/ui/breadcrumb/BreadcrumbItem.vue +1 -0
  88. package/dist/runtime/components/ui/breadcrumb/BreadcrumbLink.vue +1 -0
  89. package/dist/runtime/components/ui/breadcrumb/BreadcrumbList.vue +1 -0
  90. package/dist/runtime/components/ui/breadcrumb/BreadcrumbPage.vue +1 -0
  91. package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue +1 -0
  92. package/dist/runtime/components/ui/button/Button.vue +1 -0
  93. package/dist/runtime/components/ui/button/index.d.ts +2 -2
  94. package/dist/runtime/components/ui/button-group/ButtonGroup.vue +1 -0
  95. package/dist/runtime/components/ui/button-group/ButtonGroupItem.vue +1 -0
  96. package/dist/runtime/components/ui/calendar/Calendar.vue +1 -0
  97. package/dist/runtime/components/ui/calendar/CalendarCell.vue +1 -0
  98. package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue +1 -0
  99. package/dist/runtime/components/ui/calendar/CalendarGrid.vue +1 -0
  100. package/dist/runtime/components/ui/calendar/CalendarGridRow.vue +1 -0
  101. package/dist/runtime/components/ui/calendar/CalendarHeadCell.vue +1 -0
  102. package/dist/runtime/components/ui/calendar/CalendarHeader.vue +1 -0
  103. package/dist/runtime/components/ui/calendar/CalendarHeading.vue +1 -0
  104. package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +1 -0
  105. package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +1 -0
  106. package/dist/runtime/components/ui/card/Card.vue +1 -0
  107. package/dist/runtime/components/ui/card/CardAction.vue +1 -0
  108. package/dist/runtime/components/ui/card/CardContent.vue +1 -0
  109. package/dist/runtime/components/ui/card/CardDescription.vue +1 -0
  110. package/dist/runtime/components/ui/card/CardFooter.vue +1 -0
  111. package/dist/runtime/components/ui/card/CardHeader.vue +1 -0
  112. package/dist/runtime/components/ui/card/CardTitle.vue +1 -0
  113. package/dist/runtime/components/ui/checkbox/Checkbox.d.vue.ts +6 -6
  114. package/dist/runtime/components/ui/checkbox/Checkbox.vue +1 -0
  115. package/dist/runtime/components/ui/checkbox/Checkbox.vue.d.ts +6 -6
  116. package/dist/runtime/components/ui/checkbox/index.d.ts +2 -2
  117. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.d.vue.ts +4 -4
  118. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +1 -0
  119. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +4 -4
  120. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.d.vue.ts +3 -3
  121. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue +1 -0
  122. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +3 -3
  123. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.d.vue.ts +1 -1
  124. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -0
  125. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +1 -1
  126. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue +1 -0
  127. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +1 -0
  128. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.vue +1 -0
  129. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.vue +1 -0
  130. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.d.vue.ts +3 -3
  131. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue +1 -0
  132. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +3 -3
  133. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +1 -0
  134. package/dist/runtime/components/ui/input/Input.d.vue.ts +4 -4
  135. package/dist/runtime/components/ui/input/Input.vue +1 -0
  136. package/dist/runtime/components/ui/input/Input.vue.d.ts +4 -4
  137. package/dist/runtime/components/ui/label/Label.vue +1 -0
  138. package/dist/runtime/components/ui/multiselect/MultiSelect.d.vue.ts +1 -1
  139. package/dist/runtime/components/ui/multiselect/MultiSelect.vue +1 -0
  140. package/dist/runtime/components/ui/multiselect/MultiSelect.vue.d.ts +1 -1
  141. package/dist/runtime/components/ui/pagination/Pagination.vue +1 -0
  142. package/dist/runtime/components/ui/pagination/PaginationContent.vue +1 -0
  143. package/dist/runtime/components/ui/pagination/PaginationEllipsis.vue +1 -0
  144. package/dist/runtime/components/ui/pagination/PaginationFirst.vue +1 -0
  145. package/dist/runtime/components/ui/pagination/PaginationItem.vue +1 -0
  146. package/dist/runtime/components/ui/pagination/PaginationLast.vue +1 -0
  147. package/dist/runtime/components/ui/pagination/PaginationNext.vue +1 -0
  148. package/dist/runtime/components/ui/pagination/PaginationPrevious.vue +1 -0
  149. package/dist/runtime/components/ui/popover/PopoverContent.d.vue.ts +2 -2
  150. package/dist/runtime/components/ui/popover/PopoverContent.vue +1 -0
  151. package/dist/runtime/components/ui/popover/PopoverContent.vue.d.ts +2 -2
  152. package/dist/runtime/components/ui/progress/Progress.vue +1 -0
  153. package/dist/runtime/components/ui/resizable/ResizableHandle.vue +1 -0
  154. package/dist/runtime/components/ui/resizable/ResizablePanel.d.vue.ts +1 -1
  155. package/dist/runtime/components/ui/resizable/ResizablePanel.vue.d.ts +1 -1
  156. package/dist/runtime/components/ui/resizable/ResizablePanelGroup.vue +1 -0
  157. package/dist/runtime/components/ui/select/Select.d.vue.ts +1 -1
  158. package/dist/runtime/components/ui/select/Select.vue.d.ts +1 -1
  159. package/dist/runtime/components/ui/select/SelectContent.d.vue.ts +2 -2
  160. package/dist/runtime/components/ui/select/SelectContent.vue +1 -0
  161. package/dist/runtime/components/ui/select/SelectContent.vue.d.ts +2 -2
  162. package/dist/runtime/components/ui/select/SelectItem.vue +1 -0
  163. package/dist/runtime/components/ui/select/SelectLabel.vue +1 -0
  164. package/dist/runtime/components/ui/select/SelectScrollDownButton.vue +1 -0
  165. package/dist/runtime/components/ui/select/SelectScrollUpButton.vue +1 -0
  166. package/dist/runtime/components/ui/select/SelectSeparator.vue +1 -0
  167. package/dist/runtime/components/ui/select/SelectTrigger.vue +1 -0
  168. package/dist/runtime/components/ui/separator/Separator.vue +1 -0
  169. package/dist/runtime/components/ui/sheet/SheetContent.d.vue.ts +1 -1
  170. package/dist/runtime/components/ui/sheet/SheetContent.vue +1 -0
  171. package/dist/runtime/components/ui/sheet/SheetContent.vue.d.ts +1 -1
  172. package/dist/runtime/components/ui/sheet/SheetDescription.vue +1 -0
  173. package/dist/runtime/components/ui/sheet/SheetFooter.vue +1 -0
  174. package/dist/runtime/components/ui/sheet/SheetHeader.vue +1 -0
  175. package/dist/runtime/components/ui/sheet/SheetOverlay.vue +1 -0
  176. package/dist/runtime/components/ui/sheet/SheetTitle.vue +1 -0
  177. package/dist/runtime/components/ui/sidebar/Sidebar.d.vue.ts +1 -1
  178. package/dist/runtime/components/ui/sidebar/Sidebar.vue +1 -0
  179. package/dist/runtime/components/ui/sidebar/Sidebar.vue.d.ts +1 -1
  180. package/dist/runtime/components/ui/sidebar/SidebarContent.vue +1 -0
  181. package/dist/runtime/components/ui/sidebar/SidebarFooter.vue +1 -0
  182. package/dist/runtime/components/ui/sidebar/SidebarGroup.vue +1 -0
  183. package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue +1 -0
  184. package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue +1 -0
  185. package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue +1 -0
  186. package/dist/runtime/components/ui/sidebar/SidebarHeader.vue +1 -0
  187. package/dist/runtime/components/ui/sidebar/SidebarInput.vue +1 -0
  188. package/dist/runtime/components/ui/sidebar/SidebarInset.vue +1 -0
  189. package/dist/runtime/components/ui/sidebar/SidebarMenu.vue +1 -0
  190. package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue +1 -0
  191. package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue +1 -0
  192. package/dist/runtime/components/ui/sidebar/SidebarMenuButton.d.vue.ts +1 -1
  193. package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue.d.ts +1 -1
  194. package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.d.vue.ts +1 -1
  195. package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue +1 -0
  196. package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +1 -1
  197. package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue +1 -0
  198. package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue +1 -0
  199. package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue +1 -0
  200. package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue +1 -0
  201. package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue +1 -0
  202. package/dist/runtime/components/ui/sidebar/SidebarProvider.vue +1 -0
  203. package/dist/runtime/components/ui/sidebar/SidebarRail.vue +1 -0
  204. package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue +1 -0
  205. package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +1 -0
  206. package/dist/runtime/components/ui/sidebar/index.d.ts +1 -1
  207. package/dist/runtime/components/ui/skeleton/Skeleton.vue +1 -0
  208. package/dist/runtime/components/ui/sonner/Sonner.d.vue.ts +4 -4
  209. package/dist/runtime/components/ui/sonner/Sonner.vue.d.ts +4 -4
  210. package/dist/runtime/components/ui/stepper/Stepper.vue +1 -0
  211. package/dist/runtime/components/ui/stepper/StepperDescription.vue +1 -0
  212. package/dist/runtime/components/ui/stepper/StepperIndicator.vue +1 -0
  213. package/dist/runtime/components/ui/stepper/StepperItem.d.vue.ts +1 -1
  214. package/dist/runtime/components/ui/stepper/StepperItem.vue +1 -0
  215. package/dist/runtime/components/ui/stepper/StepperItem.vue.d.ts +1 -1
  216. package/dist/runtime/components/ui/stepper/StepperSeparator.vue +1 -0
  217. package/dist/runtime/components/ui/stepper/StepperTitle.vue +1 -0
  218. package/dist/runtime/components/ui/stepper/StepperTrigger.vue +1 -0
  219. package/dist/runtime/components/ui/switch/Switch.d.vue.ts +2 -2
  220. package/dist/runtime/components/ui/switch/Switch.vue +1 -0
  221. package/dist/runtime/components/ui/switch/Switch.vue.d.ts +2 -2
  222. package/dist/runtime/components/ui/switch/index.d.ts +2 -2
  223. package/dist/runtime/components/ui/table/Table.vue +1 -0
  224. package/dist/runtime/components/ui/table/TableBody.vue +1 -0
  225. package/dist/runtime/components/ui/table/TableCaption.vue +1 -0
  226. package/dist/runtime/components/ui/table/TableCell.vue +1 -0
  227. package/dist/runtime/components/ui/table/TableEmpty.vue +1 -0
  228. package/dist/runtime/components/ui/table/TableFooter.vue +1 -0
  229. package/dist/runtime/components/ui/table/TableHead.vue +1 -0
  230. package/dist/runtime/components/ui/table/TableHeader.vue +1 -0
  231. package/dist/runtime/components/ui/table/TableRow.vue +1 -0
  232. package/dist/runtime/components/ui/tabs/Tabs.vue +1 -0
  233. package/dist/runtime/components/ui/tabs/TabsContent.d.vue.ts +2 -2
  234. package/dist/runtime/components/ui/tabs/TabsContent.vue +1 -0
  235. package/dist/runtime/components/ui/tabs/TabsContent.vue.d.ts +2 -2
  236. package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +1 -1
  237. package/dist/runtime/components/ui/tabs/TabsList.vue +1 -0
  238. package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +1 -1
  239. package/dist/runtime/components/ui/tabs/TabsTrigger.d.vue.ts +2 -2
  240. package/dist/runtime/components/ui/tabs/TabsTrigger.vue +1 -0
  241. package/dist/runtime/components/ui/tabs/TabsTrigger.vue.d.ts +2 -2
  242. package/dist/runtime/components/ui/tags-input/TagsInput.d.vue.ts +3 -3
  243. package/dist/runtime/components/ui/tags-input/TagsInput.vue +1 -0
  244. package/dist/runtime/components/ui/tags-input/TagsInput.vue.d.ts +3 -3
  245. package/dist/runtime/components/ui/tags-input/TagsInputInput.vue +1 -0
  246. package/dist/runtime/components/ui/tags-input/TagsInputItem.d.vue.ts +2 -2
  247. package/dist/runtime/components/ui/tags-input/TagsInputItem.vue +1 -0
  248. package/dist/runtime/components/ui/tags-input/TagsInputItem.vue.d.ts +2 -2
  249. package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.vue +1 -0
  250. package/dist/runtime/components/ui/tags-input/TagsInputItemText.vue +1 -0
  251. package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +4 -4
  252. package/dist/runtime/components/ui/textarea/Textarea.vue +1 -0
  253. package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +4 -4
  254. package/dist/runtime/components/ui/toggle/Toggle.d.vue.ts +2 -2
  255. package/dist/runtime/components/ui/toggle/Toggle.vue +1 -0
  256. package/dist/runtime/components/ui/toggle/Toggle.vue.d.ts +2 -2
  257. package/dist/runtime/components/ui/toggle/index.d.ts +1 -1
  258. package/dist/runtime/components/ui/toggle-group/ToggleGroup.d.vue.ts +2 -2
  259. package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue +1 -0
  260. package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue.d.ts +2 -2
  261. package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.vue +1 -0
  262. package/dist/runtime/components/ui/tooltip/TooltipContent.d.vue.ts +2 -2
  263. package/dist/runtime/components/ui/tooltip/TooltipContent.vue +1 -0
  264. package/dist/runtime/components/ui/tooltip/TooltipContent.vue.d.ts +2 -2
  265. package/dist/runtime/composables/useAPI.d.ts +2 -2
  266. package/dist/runtime/composables/useAPI.js +6 -11
  267. package/dist/runtime/composables/useViewAPI.d.ts +1 -0
  268. package/dist/runtime/composables/useViewAPI.js +20 -4
  269. package/dist/runtime/composables/useWindowSizer.d.ts +14 -0
  270. package/dist/runtime/composables/useWindowSizer.js +48 -0
  271. package/dist/runtime/core/config.d.ts +78 -48
  272. package/dist/runtime/core/config.js +21 -27
  273. package/dist/runtime/core/stepper/Stepper.d.ts +13 -10
  274. package/dist/runtime/core/stepper/Stepper.js +70 -55
  275. package/dist/runtime/core/stepper/StepperSerializer.js +32 -14
  276. package/dist/runtime/core/timeline/Timeline.js +1 -2
  277. package/dist/runtime/css/main.css +1 -1
  278. package/dist/runtime/css/smile.css +1 -1
  279. package/dist/runtime/layouts/development.vue +38 -78
  280. package/dist/runtime/layouts/experiment.d.vue.ts +7 -10
  281. package/dist/runtime/layouts/experiment.vue +13 -0
  282. package/dist/runtime/layouts/experiment.vue.d.ts +7 -10
  283. package/dist/runtime/layouts/presentation.vue +24 -3
  284. package/dist/runtime/middleware/timeline.global.js +2 -4
  285. package/dist/runtime/pages/[...slug].vue +2 -0
  286. package/dist/runtime/pages/dev/[...slug].vue +2 -0
  287. package/dist/runtime/pages/dev-login.vue +5 -3
  288. package/dist/runtime/pages/presentation/[...slug].vue +2 -0
  289. package/dist/runtime/plugins/dev-sync.client.js +0 -2
  290. package/dist/runtime/plugins/seed.client.js +1 -3
  291. package/dist/runtime/plugins/store-sync.client.js +8 -10
  292. package/dist/runtime/public/images/helpus.png +0 -0
  293. package/dist/runtime/public/images/smile.svg +78 -0
  294. package/dist/runtime/public/images/universitylogo.png +0 -0
  295. package/dist/runtime/server/api/auth/login.post.js +11 -2
  296. package/dist/runtime/server/api/db-info.get.d.ts +5 -0
  297. package/dist/runtime/server/api/db-info.get.js +10 -0
  298. package/dist/runtime/server/api/qr.get.js +1 -2
  299. package/dist/runtime/server/middleware/dev-auth.js +10 -5
  300. package/dist/runtime/stores/log.js +4 -7
  301. package/dist/runtime/stores/smilestore.d.ts +161 -1014
  302. package/dist/runtime/stores/smilestore.js +39 -7
  303. package/dist/runtime/utils/utils.js +7 -0
  304. package/package.json +5 -3
  305. package/dist/runtime/components/dev/navbar/ViewButton.vue +0 -159
  306. package/dist/runtime/pages/info.vue +0 -462
  307. /package/dist/runtime/components/{dev/navbar/ViewButton.d.vue.ts → builtins/LocalDevBanner.d.vue.ts} +0 -0
  308. /package/dist/runtime/components/{dev/navbar/ViewButton.vue.d.ts → builtins/LocalDevBanner.vue.d.ts} +0 -0
  309. /package/dist/runtime/{pages/info.d.vue.ts → components/dev/SmileDevPresentationView.d.vue.ts} +0 -0
  310. /package/dist/runtime/{pages/info.vue.d.ts → components/dev/SmileDevPresentationView.vue.d.ts} +0 -0
@@ -1,6 +1,25 @@
1
1
  <script setup>
2
- import { computed } from "vue";
2
+ import { ArrowLeft, ArrowRight, Info, Copy, Check, Dices } from "lucide-vue-next";
3
+ import { ref, computed } from "vue";
4
+ import useViewAPI from "../../composables/useViewAPI";
5
+ import useSmileStore from "../../stores/smilestore";
3
6
  const api = useViewAPI();
7
+ const store = useSmileStore();
8
+ const config = store.config;
9
+ const dbInfo = ref(null);
10
+ if (import.meta.client) {
11
+ fetch("/api/db-info").then((r) => r.json()).then((data) => {
12
+ dbInfo.value = data;
13
+ }).catch(() => {
14
+ });
15
+ }
16
+ const selectedService = ref(null);
17
+ const baseUrl = computed(() => {
18
+ if (config.deployURL) return config.deployURL.replace(/\/$/, "");
19
+ if (import.meta.client) return window.location.origin;
20
+ return "https://your-app.vercel.app";
21
+ });
22
+ const isDeployed = computed(() => !!config.deployURL);
4
23
  const devUrls = computed(() => {
5
24
  const urls = {};
6
25
  for (const [key, value] of Object.entries(api.urls)) {
@@ -8,251 +27,540 @@ const devUrls = computed(() => {
8
27
  }
9
28
  return urls;
10
29
  });
30
+ const copied = ref("");
31
+ async function copyToClipboard(text, label) {
32
+ try {
33
+ await navigator.clipboard.writeText(text);
34
+ copied.value = label;
35
+ copied.value = label;
36
+ setTimeout(() => {
37
+ copied.value = "";
38
+ }, 2e3);
39
+ } catch {
40
+ const el = document.createElement("textarea");
41
+ el.value = text;
42
+ document.body.appendChild(el);
43
+ el.select();
44
+ document.execCommand("copy");
45
+ document.body.removeChild(el);
46
+ copied.value = label;
47
+ setTimeout(() => {
48
+ copied.value = "";
49
+ }, 2e3);
50
+ }
51
+ }
52
+ const services = {
53
+ prolific: {
54
+ name: "Prolific",
55
+ buttonLabel: "Prolific",
56
+ buttonClass: "is-blue",
57
+ description: "Prolific.co is a dedicated platform for online behavioral research with high-quality participants.",
58
+ link: "https://www.prolific.co",
59
+ urlNote: 'Prolific appends query parameters automatically. Use the "Study URL" below as your study link in Prolific.',
60
+ studyUrl: computed(() => `${baseUrl.value}/welcome/prolific`),
61
+ setupSteps: [
62
+ 'Go to <a href="https://app.prolific.co" target="_blank" class="underline font-medium">app.prolific.co</a> and create a new study.',
63
+ "Set the <strong>Study URL</strong> to the Prolific URL shown below. Prolific will automatically append <code>PROLIFIC_PID</code>, <code>STUDY_ID</code>, and <code>SESSION_ID</code> query parameters.",
64
+ `Under <strong>Study completion</strong>, select "I'll redirect them using a URL". Set the completion URL to: <code>https://app.prolific.co/submissions/complete?cc=YOUR_CODE</code> (SMILE handles this automatically via the Thanks page).`,
65
+ "Set your <strong>Audience</strong> filters (country, language, demographics, etc.).",
66
+ "Set the estimated <strong>completion time</strong> and <strong>reward</strong>. Prolific requires fair pay (currently min ~$8/hr equivalent).",
67
+ "Click <strong>Preview</strong> to test the external study link opens correctly, then <strong>Publish</strong> when ready."
68
+ ]
69
+ },
70
+ cloudresearch: {
71
+ name: "CloudResearch",
72
+ buttonLabel: "CR",
73
+ buttonClass: "is-pink",
74
+ description: "CloudResearch recruits from several sources, including Mechanical Turk but includes some screening for bots and server farms.",
75
+ link: "https://www.cloudresearch.com/",
76
+ urlNote: "CloudResearch appends <code>assignmentId</code>, <code>hitId</code>, <code>turkSubmitTo</code>, and <code>workerId</code> as query parameters.",
77
+ studyUrl: computed(() => `${baseUrl.value}/welcome/cloudresearch`),
78
+ setupSteps: [
79
+ 'Go to <a href="https://app.cloudresearch.com" target="_blank" class="underline font-medium">app.cloudresearch.com</a> and create a new study.',
80
+ 'Choose <strong>"Survey / External Link"</strong> as your study type.',
81
+ "Set the <strong>Survey URL</strong> to the CloudResearch URL shown below.",
82
+ 'Under <strong>Completion Code Settings</strong>, choose "I will generate a unique code". SMILE auto-generates a completion code on the Thanks page that participants copy back.',
83
+ "Configure your <strong>participant requirements</strong> (approval rate, location, etc.).",
84
+ "Set <strong>payment</strong> and <strong>number of participants</strong>.",
85
+ "Use the <strong>Preview</strong> button to verify the link works, then <strong>Launch</strong>."
86
+ ]
87
+ },
88
+ mturk: {
89
+ name: "Mechanical Turk",
90
+ buttonLabel: "AMT",
91
+ buttonClass: "is-yellow",
92
+ extraButtons: true,
93
+ // has AMT Preview Mode button
94
+ description: "Amazon Mechanical Turk is the original wild-west of online crowd labor markets.",
95
+ link: "https://mturk.com",
96
+ urlNote: "MTurk uses an ExternalQuestion HIT type. The URL must be HTTPS. MTurk appends <code>assignmentId</code>, <code>hitId</code>, <code>turkSubmitTo</code>, and <code>workerId</code>.",
97
+ studyUrl: computed(() => `${baseUrl.value}/mturk`),
98
+ setupSteps: [
99
+ `You'll need the <strong>AWS CLI</strong> or a tool like <a href="https://github.com/Mechanical-Turk-Requester" target="_blank" class="underline font-medium">Boto3 (Python)</a> to create ExternalQuestion HITs.`,
100
+ 'Create an ExternalQuestion XML pointing to the MTurk URL shown below: <pre class="mt-1 p-2 bg-muted rounded text-xs overflow-x-auto">&lt;ExternalQuestion xmlns="..."&gt;\n &lt;ExternalURL&gt;YOUR_MTURK_URL&lt;/ExternalURL&gt;\n &lt;FrameHeight&gt;800&lt;/FrameHeight&gt;\n&lt;/ExternalQuestion&gt;</pre>',
101
+ "Create the HIT using <code>create_hit_type</code> and <code>create_hit_with_hit_type</code> (or equivalent).",
102
+ "SMILE handles the MTurk form submission automatically \u2014 when participants finish, the Thanks page posts their completion to <code>turkSubmitTo</code>.",
103
+ "For testing, use the <strong>MTurk Sandbox</strong> (<code>https://workersandbox.mturk.com</code>) before publishing to production.",
104
+ 'Monitor HITs via the <a href="https://requester.mturk.com" target="_blank" class="underline font-medium">Requester dashboard</a>.'
105
+ ]
106
+ },
107
+ citizensci: {
108
+ name: "Citizen Science",
109
+ buttonLabel: "CitizenSci",
110
+ buttonClass: "is-green",
111
+ description: "Citizen Science is a stand-in for a possible future platform run by the lab.",
112
+ urlNote: "Parameters <code>CITIZEN_ID</code>, <code>CITIZEN_STUDY_ID</code>, and <code>CITIZEN_SESSION_ID</code> are appended by the referring portal.",
113
+ studyUrl: computed(() => `${baseUrl.value}/welcome/citizensci`),
114
+ setupSteps: [
115
+ "Configure your citizen science portal to link to the URL shown below.",
116
+ "The portal should append <code>CITIZEN_ID</code>, <code>CITIZEN_STUDY_ID</code>, and <code>CITIZEN_SESSION_ID</code> as query parameters to identify participants.",
117
+ "SMILE will read these parameters and store them in the participant's recruitment info.",
118
+ "On completion, participants see a standard Thanks page. Configure your portal to accept the SMILE completion code if needed."
119
+ ]
120
+ },
121
+ sona: {
122
+ name: "SONA",
123
+ buttonLabel: "SONA",
124
+ buttonClass: "is-orange",
125
+ description: 'SONA is a platform for running experiments from the university "for credit" pool of students.',
126
+ urlNote: "SONA appends a <code>survey_code</code> query parameter that is used to grant credit upon completion.",
127
+ studyUrl: computed(() => `${baseUrl.value}/welcome/sona/?survey_code=%SURVEY_CODE%`),
128
+ setupSteps: [
129
+ "Log in to your university's SONA system and create a new <strong>Online External Study</strong>.",
130
+ "Set the <strong>Study URL</strong> to the SONA URL shown below. SONA will automatically replace <code>%SURVEY_CODE%</code> with the participant's unique code.",
131
+ "Under <strong>Study Information</strong>, set the estimated duration and number of credits.",
132
+ "Set your <strong>Participant Restrictions</strong> (prerequisites, disqualifiers, etc.).",
133
+ "Configure the following environment variables in your deployment: <code>VITE_SONA_URL</code> (your SONA domain), <code>VITE_SONA_EXPERIMENT_ID</code>, and <code>VITE_SONA_CREDIT_TOKEN</code>.",
134
+ "SMILE automatically redirects participants back to SONA to grant credit upon completion."
135
+ ]
136
+ },
137
+ sona_paid: {
138
+ name: "SONA Paid",
139
+ buttonLabel: "SONA Paid",
140
+ buttonClass: "is-teal",
141
+ description: "SONA Paid is a platform for running paid experiments from the university pool.",
142
+ urlNote: "Same as SONA credit but uses separate config for paid study completion.",
143
+ studyUrl: computed(() => `${baseUrl.value}/welcome/sona_paid/?survey_code=%SURVEY_CODE%`),
144
+ setupSteps: [
145
+ "Log in to your university's SONA system and create a new <strong>Online External Study</strong> (paid type).",
146
+ "Set the <strong>Study URL</strong> to the SONA Paid URL shown below.",
147
+ "Configure payment amount and study duration.",
148
+ "Configure the following environment variables: <code>VITE_SONA_PAID_URL</code>, <code>VITE_SONA_PAID_EXPERIMENT_ID</code>, and <code>VITE_SONA_PAID_CREDIT_TOKEN</code>.",
149
+ "SMILE automatically redirects participants back to SONA for payment upon completion."
150
+ ]
151
+ },
152
+ spark: {
153
+ name: "SPARK",
154
+ buttonLabel: "SPARK",
155
+ buttonClass: "is-red",
156
+ description: "SPARK is a recruitment service from the Hartley Lab for adolescent participants of various ages.",
157
+ urlNote: "SPARK appends <code>subject_ID</code>, <code>participant_ID</code>, <code>age</code>, and <code>gender</code> as query parameters.",
158
+ studyUrl: computed(() => `${baseUrl.value}/welcome/spark`),
159
+ setupSteps: [
160
+ "Coordinate with the SPARK platform team to register your study.",
161
+ "Provide the SPARK URL shown below as the study link.",
162
+ "SPARK will append participant demographic information (subject ID, participant ID, age, gender) as query parameters.",
163
+ "Upon completion, SMILE redirects participants back to the SPARK completion endpoint."
164
+ ]
165
+ },
166
+ panda: {
167
+ name: "PANDA",
168
+ buttonLabel: "PANDA",
169
+ buttonClass: "is-coral",
170
+ description: "PANDA (Princeton and NYU Discoveries in Action) is a recruitment platform for younger participants.",
171
+ link: "https://www.discoveriesinaction.org",
172
+ urlNote: "PANDA appends an <code>ID</code> query parameter to identify the participant.",
173
+ studyUrl: computed(() => `${baseUrl.value}/welcome/panda`),
174
+ setupSteps: [
175
+ 'Register your study with the <a href="https://www.discoveriesinaction.org" target="_blank" class="underline font-medium">PANDA platform</a>.',
176
+ "Provide the PANDA URL shown below as the study link.",
177
+ "PANDA loads studies in dual iframes (mobile/desktop). SMILE automatically detects and handles the hidden iframe.",
178
+ "Note: PANDA clears localStorage on each session start to support families running the study multiple times.",
179
+ "Upon completion, participants see a generic thanks message. No redirect is performed."
180
+ ]
181
+ },
182
+ web: {
183
+ name: "Anonymous Web User",
184
+ buttonLabel: "Anon Web",
185
+ buttonClass: "is-purple",
186
+ description: "Anonymous web user is not referred by any recruitment service.",
187
+ urlNote: "No special query parameters. Share this URL directly.",
188
+ studyUrl: computed(() => `${baseUrl.value}/welcome`),
189
+ setupSteps: [
190
+ "Share the URL shown below via email, social media, QR code, or any other channel.",
191
+ "Participants are assigned a random anonymous ID. No recruitment service metadata is collected.",
192
+ "Since there is no external payment system, you'll need to arrange compensation separately if applicable.",
193
+ "This mode is useful for pilot testing, demos, or unpaid studies."
194
+ ]
195
+ }
196
+ };
197
+ const currentService = computed(() => services[selectedService.value]);
11
198
  </script>
12
199
 
13
200
  <template>
14
- <!-- Main container with responsive padding -->
15
201
  <div class="px-4 md:px-8 lg:px-12 pt-10 pb-10 bg-background text-foreground global-color-mode">
16
- <!-- Header section with title and description -->
17
- <div class="mb-8">
18
- <h1 class="text-3xl font-bold mb-4">
19
- Welcome to Smile Developer Mode
20
- </h1>
21
- <p class="text-lg mb-6">
22
- You can use this to test your application, read the docs, QA your data, and recruit participants through
23
- multiple platforms.
24
- </p>
25
- </div>
202
+ <!-- Detail view for selected service -->
203
+ <template v-if="selectedService && currentService">
204
+ <!-- Back button -->
205
+ <button
206
+ class="inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground mb-6 transition-colors"
207
+ @click="selectedService = null"
208
+ >
209
+ <ArrowLeft class="size-4" />
210
+ Back to all services
211
+ </button>
26
212
 
27
- <!-- Divider line -->
28
- <hr class="my-4">
213
+ <!-- Service header -->
214
+ <div class="mb-6">
215
+ <h1 class="text-2xl font-bold mb-1">
216
+ {{ currentService.name }}
217
+ </h1>
218
+ <p class="text-muted-foreground">
219
+ {{ currentService.description }}
220
+ </p>
221
+ </div>
29
222
 
30
- <!-- Grid of recruitment platform cards -->
31
- <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
32
- <!-- Prolific Platform Card -->
33
- <Card class="flex flex-col">
34
- <CardHeader>
35
- <CardTitle>Prolific</CardTitle>
36
- <CardDescription>
37
- <a href="https://www.prolific.co">Prolific.ac</a> is a platform for online experiments.
38
- </CardDescription>
39
- </CardHeader>
40
- <CardContent class="flex justify-end flex-1 items-end">
41
- <Button
42
- id="prolific_tester"
43
- as-child
44
- variant="default"
45
- size="xs"
46
- class="is-blue"
47
- >
48
- <a :href="devUrls['prolific']"><i-lucide-dices /> Prolific User
49
- <i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
50
- </a>
51
- </Button>
52
- </CardContent>
53
- </Card>
223
+ <!-- Test as user button -->
224
+ <div class="mb-6">
225
+ <Button
226
+ as-child
227
+ variant="default"
228
+ size="sm"
229
+ :class="currentService.buttonClass"
230
+ >
231
+ <a :href="devUrls[selectedService]">
232
+ <Dices class="size-4" />
233
+ Test as {{ currentService.name }}
234
+ <ArrowRight class="size-4" />
235
+ </a>
236
+ </Button>
237
+ </div>
54
238
 
55
- <!-- CloudResearch Platform Card -->
56
- <Card class="flex flex-col">
57
- <CardHeader>
58
- <CardTitle>CloudResearch</CardTitle>
59
- <CardDescription>
60
- <a href="https://www.cloudresearch.com/">CloudResearch</a> is a platform that recruits from several
61
- sources, including Mechanical Turk but includes some screening for bots and server farms.
62
- </CardDescription>
63
- </CardHeader>
64
- <CardContent class="flex justify-end flex-1 items-end">
239
+ <!-- Study URL -->
240
+ <div :class="['mb-6 p-4 rounded-md border', isDeployed ? 'bg-muted/50' : 'bg-destructive/5 border-destructive/30']">
241
+ <div class="flex items-center gap-2 mb-1">
242
+ <h3 class="font-semibold">
243
+ Study URL
244
+ </h3>
245
+ </div>
246
+ <template v-if="!isDeployed">
247
+ <p class="text-sm font-medium text-destructive mb-2">
248
+ This is a local development URL and cannot be shared with participants. Deploy your study and navigate to /dev to get a shareable recruitment URL.
249
+ </p>
250
+ </template>
251
+ <p
252
+ class="text-sm text-muted-foreground mb-2"
253
+ v-html="currentService.urlNote"
254
+ />
255
+ <div class="flex items-center gap-2">
256
+ <code :class="['flex-1 text-sm px-3 py-2 rounded break-all', isDeployed ? 'bg-muted select-all' : 'bg-muted/50 select-none text-muted-foreground line-through']">
257
+ {{ currentService.studyUrl.value }}
258
+ </code>
65
259
  <Button
66
- id="cloudresearch_tester"
67
- as-child
68
- variant="default"
69
- size="xs"
70
- class="is-pink"
260
+ v-if="isDeployed"
261
+ variant="outline"
262
+ size="sm"
263
+ @click="copyToClipboard(currentService.studyUrl.value, `study-${selectedService}`)"
71
264
  >
72
- <a :href="devUrls['cloudresearch']"><i-lucide-dices /> CR User
73
- <i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
74
- </a>
265
+ <Check
266
+ v-if="copied === `study-${selectedService}`"
267
+ class="size-3.5"
268
+ />
269
+ <Copy
270
+ v-else
271
+ class="size-3.5"
272
+ />
273
+ {{ copied === `study-${selectedService}` ? 'Copied!' : 'Copy' }}
75
274
  </Button>
76
- </CardContent>
77
- </Card>
275
+ </div>
276
+ </div>
78
277
 
79
- <!-- Mechanical Turk Platform Card -->
80
- <Card class="flex flex-col">
81
- <CardHeader>
82
- <CardTitle>Mechanical Turk</CardTitle>
83
- <CardDescription>
84
- <a href="https://mturk.com">Amazon Mechanical Turk</a> is the original wild-west of online crowd labor
85
- markets.
86
- </CardDescription>
87
- </CardHeader>
88
- <CardContent class="flex justify-end space-y-2 flex-1 items-end flex-col">
89
- <Button
90
- id="amt_tester_preview"
91
- as-child
92
- variant="secondary"
93
- size="xs"
94
- class="is-light-yellow"
278
+ <!-- Setup Instructions -->
279
+ <h3 class="font-semibold mb-3">
280
+ Setup Instructions
281
+ </h3>
282
+ <ol class="list-decimal list-outside ml-5 space-y-3 text-base text-muted-foreground">
283
+ <li
284
+ v-for="(step, i) in currentService.setupSteps"
285
+ :key="i"
286
+ class="leading-relaxed"
287
+ v-html="step"
288
+ />
289
+ </ol>
290
+ </template>
291
+
292
+ <!-- Card grid view -->
293
+ <template v-else>
294
+ <div class="mb-6 flex items-start gap-6">
295
+ <!-- Left column: logo + QR -->
296
+ <div class="shrink-0 flex flex-col items-end gap-3">
297
+ <img
298
+ src="/_smile/images/smile.svg"
299
+ alt="SMILE"
300
+ class="w-52"
95
301
  >
302
+ <template v-if="isDeployed">
96
303
  <a
97
- href="/dev/mturk?assignmentId=ASSIGNMENT_ID_NOT_AVAILABLE&hitId=123RVWYBAZW00EXAMPLE&turkSubmitTo=https://www.mturk.com/&workerId=AZ3456EXAMPLE"
98
- >AMT Preview Mode
99
- <i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
304
+ :href="`/api/qr?url=${encodeURIComponent(baseUrl)}`"
305
+ download="qr.svg"
306
+ title="Download QR code"
307
+ >
308
+ <img
309
+ :src="`/api/qr?url=${encodeURIComponent(baseUrl)}`"
310
+ alt="QR Code"
311
+ class="w-24 h-24"
312
+ >
100
313
  </a>
101
- </Button>
102
- <Button
103
- id="amt_tester"
104
- as-child
105
- variant="default"
106
- size="xs"
107
- class="is-yellow"
108
- >
109
- <a :href="devUrls['mturk']"><i-lucide-dices /> AMT User
110
- <i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
111
- </a>
112
- </Button>
113
- </CardContent>
114
- </Card>
314
+ <p class="text-xs text-muted-foreground text-right">
315
+ Share this QR code with participants. Click to download.
316
+ </p>
317
+ </template>
318
+ </div>
115
319
 
116
- <!-- Citizen Science Platform Card -->
117
- <Card class="flex flex-col">
118
- <CardHeader>
119
- <CardTitle>Citizen Science</CardTitle>
120
- <CardDescription>
121
- Citizen Science is a stand-in for a possible future platform run by the lab.
122
- </CardDescription>
123
- </CardHeader>
124
- <CardContent class="flex justify-end flex-1 items-end">
125
- <Button
126
- id="citizen_tester"
127
- as-child
128
- variant="default"
129
- size="xs"
130
- class="is-green"
131
- >
132
- <a :href="devUrls['citizensci']"><i-lucide-dices /> Citizen Sci User
133
- <i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
134
- </a>
135
- </Button>
136
- </CardContent>
137
- </Card>
320
+ <!-- Right column: text + details -->
321
+ <div>
322
+ <h1 class="text-3xl font-bold mb-2">
323
+ Welcome to Smile Developer Mode
324
+ </h1>
325
+ <p class="text-lg mb-4">
326
+ You can use this to test your application, read the docs, QA your data, and recruit participants through
327
+ multiple platforms.
328
+ </p>
138
329
 
139
- <!-- SONA Platform Card -->
140
- <Card class="flex flex-col">
141
- <CardHeader>
142
- <CardTitle>SONA</CardTitle>
143
- <CardDescription>
144
- SONA is a platform for running experiments from the university "for credit" pool of students.
145
- </CardDescription>
146
- </CardHeader>
147
- <CardContent class="flex justify-end flex-1 items-end">
148
- <Button
149
- id="sona_tester"
150
- as-child
151
- variant="default"
152
- size="xs"
153
- class="is-orange"
154
- >
155
- <a :href="devUrls['sona']"><i-lucide-dices /> SONA User
156
- <i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
157
- </a>
158
- </Button>
159
- </CardContent>
160
- </Card>
330
+ <!-- Experiment Details -->
331
+ <div class="min-w-0">
332
+ <dl class="grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-sm">
333
+ <dt class="text-muted-foreground/60">
334
+ Project
335
+ </dt>
336
+ <dd class="font-mono flex items-center gap-1">
337
+ {{ config.projectName || config.projectRef || '(not set)' }}
338
+ <button
339
+ class="text-muted-foreground hover:text-foreground transition-colors"
340
+ @click="copyToClipboard(config.projectName || config.projectRef || '', 'project')"
341
+ >
342
+ <Check
343
+ v-if="copied === 'project'"
344
+ class="size-3"
345
+ /><Copy
346
+ v-else
347
+ class="size-3"
348
+ />
349
+ </button>
350
+ </dd>
161
351
 
162
- <!-- SONA Paid Platform Card -->
163
- <Card class="flex flex-col">
164
- <CardHeader>
165
- <CardTitle>SONA Paid</CardTitle>
166
- <CardDescription>
167
- SONA Paid is a platform for running paid experiments from the university pool.
168
- </CardDescription>
169
- </CardHeader>
170
- <CardContent class="flex justify-end flex-1 items-end">
171
- <Button
172
- id="sona_paid_tester"
173
- as-child
174
- variant="default"
175
- size="xs"
176
- class="is-teal"
177
- >
178
- <a :href="devUrls['sona_paid']"><i-lucide-dices /> SONA Paid User
179
- <i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
180
- </a>
181
- </Button>
182
- </CardContent>
183
- </Card>
352
+ <dt class="text-muted-foreground/60">
353
+ Code Name
354
+ </dt>
355
+ <dd class="font-mono flex items-center gap-1">
356
+ {{ config.codeName || '(not set)' }}
357
+ <button
358
+ class="text-muted-foreground hover:text-foreground transition-colors"
359
+ @click="copyToClipboard(config.codeName || '', 'codename')"
360
+ >
361
+ <Check
362
+ v-if="copied === 'codename'"
363
+ class="size-3"
364
+ /><Copy
365
+ v-else
366
+ class="size-3"
367
+ />
368
+ </button>
369
+ </dd>
184
370
 
185
- <!-- SPARK Platform Card -->
186
- <Card class="flex flex-col">
187
- <CardHeader>
188
- <CardTitle>SPARK</CardTitle>
189
- <CardDescription>
190
- SPARK is a recruitment service from the Hartley Lab for adolescent participants of various ages.
191
- </CardDescription>
192
- </CardHeader>
193
- <CardContent class="flex justify-end flex-1 items-end">
194
- <Button
195
- id="spark_tester"
196
- as-child
197
- variant="default"
198
- size="xs"
199
- class="is-red"
200
- >
201
- <a :href="devUrls['spark']"><i-lucide-dices /> SPARK User
202
- <i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
203
- </a>
204
- </Button>
205
- </CardContent>
206
- </Card>
371
+ <dt class="text-muted-foreground/60">
372
+ Version
373
+ </dt>
374
+ <dd class="font-mono flex items-center gap-1">
375
+ {{ config.smileVersion || '(not set)' }}
376
+ <button
377
+ class="text-muted-foreground hover:text-foreground transition-colors"
378
+ @click="copyToClipboard(config.smileVersion || '', 'version')"
379
+ >
380
+ <Check
381
+ v-if="copied === 'version'"
382
+ class="size-3"
383
+ /><Copy
384
+ v-else
385
+ class="size-3"
386
+ />
387
+ </button>
388
+ </dd>
207
389
 
208
- <!-- PANDA Platform Card -->
209
- <Card class="flex flex-col">
210
- <CardHeader>
211
- <CardTitle>PANDA</CardTitle>
212
- <CardDescription>
213
- <a href="https://www.discoveriesinaction.org">PANDA</a> (Princeton and NYU Discoveries in Action) is a
214
- recruitment platform for younger participants.
215
- </CardDescription>
216
- </CardHeader>
217
- <CardContent class="flex justify-end flex-1 items-end">
218
- <Button
219
- id="panda_tester"
220
- as-child
221
- variant="default"
222
- size="xs"
223
- class="is-coral"
224
- >
225
- <a :href="devUrls['panda']"><i-lucide-dices /> PANDA User
226
- <i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
227
- </a>
228
- </Button>
229
- </CardContent>
230
- </Card>
390
+ <template v-if="dbInfo">
391
+ <dt class="text-muted-foreground/60">
392
+ Database
393
+ </dt>
394
+ <dd class="font-mono flex items-center gap-1">
395
+ <span class="text-xs">{{ dbInfo.type }}</span>
396
+ <code class="text-xs text-muted-foreground">{{ dbInfo.url }}</code>
397
+ </dd>
398
+ </template>
231
399
 
232
- <!-- Anonymous Web User Card -->
233
- <Card class="flex flex-col">
234
- <CardHeader>
235
- <CardTitle>Anonymous Web User</CardTitle>
236
- <CardDescription>Anonymous web user is not referred by any recruitment service.</CardDescription>
237
- </CardHeader>
238
- <CardContent class="flex justify-end flex-1 items-end">
239
- <Button
240
- id="web_tester"
241
- as-child
242
- variant="default"
243
- size="xs"
244
- class="is-purple"
245
- >
246
- <a :href="devUrls['web']"><i-lucide-dices /> Anon Web User
247
- <i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
248
- </a>
249
- </Button>
250
- </CardContent>
251
- </Card>
252
- </div>
400
+ <template v-if="config.github?.repoName">
401
+ <dt class="text-muted-foreground/60">
402
+ Repo
403
+ </dt>
404
+ <dd class="font-mono flex items-center gap-1">
405
+ <a
406
+ :href="`https://github.com/${config.github.owner}/${config.github.repoName}`"
407
+ target="_blank"
408
+ class="text-[var(--link-button-foreground)] underline"
409
+ >{{ config.github.owner }}/{{ config.github.repoName }}</a>
410
+ <span class="text-muted-foreground">({{ config.github.branch || '?' }})</span>
411
+ <button
412
+ class="text-muted-foreground hover:text-foreground transition-colors"
413
+ @click="copyToClipboard(`https://github.com/${config.github.owner}/${config.github.repoName}`, 'repo')"
414
+ >
415
+ <Check
416
+ v-if="copied === 'repo'"
417
+ class="size-3"
418
+ /><Copy
419
+ v-else
420
+ class="size-3"
421
+ />
422
+ </button>
423
+ </dd>
424
+
425
+ <dt class="text-muted-foreground/60">
426
+ Commit
427
+ </dt>
428
+ <dd class="font-mono flex items-start gap-1">
429
+ <a
430
+ v-if="config.github.lastCommitHash"
431
+ :href="config.github.commitURL"
432
+ target="_blank"
433
+ class="text-[var(--link-button-foreground)] underline text-xs"
434
+ >{{ config.github.lastCommitHash }}</a>
435
+ <span
436
+ v-if="config.github.lastCommitMsg"
437
+ class="text-muted-foreground text-xs"
438
+ >{{ config.github.lastCommitMsg }}
439
+ <button
440
+ v-if="config.github.lastCommitHash"
441
+ class="inline-flex align-middle text-muted-foreground hover:text-foreground transition-colors ml-1"
442
+ @click="copyToClipboard(config.github.lastCommitHash, 'commit')"
443
+ >
444
+ <Check
445
+ v-if="copied === 'commit'"
446
+ class="size-3"
447
+ /><Copy
448
+ v-else
449
+ class="size-3"
450
+ />
451
+ </button>
452
+ </span>
453
+ </dd>
454
+ </template>
455
+ </dl>
456
+
457
+ <!-- Mode URLs -->
458
+ <div :class="['flex flex-col gap-1 mt-2 pt-2 border-t text-xs', { 'opacity-50': !isDeployed }]">
459
+ <div
460
+ v-for="{ label, suffix, key } in [
461
+ { label: 'Dev', suffix: '/dev/', key: 'dev' },
462
+ { label: 'Production', suffix: '/', key: 'prod' },
463
+ { label: 'Presentation', suffix: '/presentation/', key: 'pres' },
464
+ ]"
465
+ :key="key"
466
+ class="flex items-center gap-1"
467
+ >
468
+ <span class="text-muted-foreground/60 w-20">{{ label }}:</span>
469
+ <code class="bg-muted px-1.5 py-0.5 rounded">{{ baseUrl }}{{ suffix }}</code>
470
+ <button
471
+ :disabled="!isDeployed"
472
+ :class="['transition-colors', isDeployed ? 'text-muted-foreground hover:text-foreground' : 'text-muted-foreground/30 cursor-not-allowed']"
473
+ @click="isDeployed && copyToClipboard(`${baseUrl}${suffix}`, key)"
474
+ >
475
+ <Check
476
+ v-if="copied === key"
477
+ class="size-3"
478
+ />
479
+ <Copy
480
+ v-else
481
+ class="size-3"
482
+ />
483
+ </button>
484
+ </div>
485
+ </div>
486
+ <p
487
+ v-if="!isDeployed"
488
+ class="text-xs italic mt-1"
489
+ >
490
+ Deploy your study to get shareable URLs.
491
+ </p>
492
+ </div>
493
+ </div>
494
+ </div>
495
+
496
+ <hr class="my-4">
497
+
498
+ <div class="grid grid-cols-2 @3xl:grid-cols-3 gap-4">
499
+ <Card
500
+ v-for="(svc, key) in services"
501
+ :key="key"
502
+ class="flex flex-col"
503
+ >
504
+ <CardHeader>
505
+ <div class="flex items-center justify-between gap-2">
506
+ <CardTitle>{{ svc.name }}</CardTitle>
507
+ <TooltipProvider>
508
+ <Tooltip>
509
+ <TooltipTrigger as-child>
510
+ <button
511
+ class="shrink-0 text-muted-foreground hover:text-foreground hover:bg-accent transition-all p-1 rounded"
512
+ @click="selectedService = key"
513
+ >
514
+ <Info class="size-3.5" />
515
+ </button>
516
+ </TooltipTrigger>
517
+ <TooltipContent>
518
+ <p>How to use {{ svc.name }}</p>
519
+ </TooltipContent>
520
+ </Tooltip>
521
+ </TooltipProvider>
522
+ </div>
523
+ <CardDescription>{{ svc.description }}</CardDescription>
524
+ </CardHeader>
525
+ <CardContent class="flex justify-end flex-1 items-end gap-2">
526
+ <div class="flex items-end gap-2">
527
+ <template v-if="key === 'mturk'">
528
+ <Button
529
+ as-child
530
+ variant="secondary"
531
+ size="xs"
532
+ class="is-light-yellow"
533
+ >
534
+ <a href="/dev/mturk?assignmentId=ASSIGNMENT_ID_NOT_AVAILABLE&hitId=123RVWYBAZW00EXAMPLE&turkSubmitTo=https://www.mturk.com/&workerId=AZ3456EXAMPLE">
535
+ Preview
536
+ <ArrowRight class="inline-block ml-1 w-4 h-4" />
537
+ </a>
538
+ </Button>
539
+ </template>
540
+ <Button
541
+ as-child
542
+ variant="default"
543
+ size="xs"
544
+ :class="svc.buttonClass"
545
+ >
546
+ <a :href="devUrls[key]">
547
+ <Dices />
548
+ {{ svc.buttonLabel }}
549
+ <ArrowRight class="inline-block ml-1 w-4 h-4" />
550
+ </a>
551
+ </Button>
552
+ </div>
553
+ </CardContent>
554
+ </Card>
555
+ </div>
556
+ </template>
253
557
  </div>
254
558
  </template>
255
559
 
560
+ <style>
561
+ .global-color-mode a:not([class*=is-]){color:var(--link-button-foreground)}
562
+ </style>
563
+
256
564
  <style scoped>
257
- .is-blue{background-color:#66d1ff;color:#393939}.is-red{background-color:#ff6685;color:#393939}.is-light-yellow{background-color:#f5d58a;color:#393939}.is-yellow{background-color:#ffb70f;color:#393939}.is-pink{background-color:pink;color:#393939}.is-green{background-color:#5be4a6;color:#393939}.is-orange{background-color:#ffb366;color:#393939}.is-teal{background-color:#66d9cc;color:#393939}.is-coral{background-color:#ff8c82;color:#393939}.is-purple{background-color:#ebaeff;border:none;color:#393939}@media screen and (max-width:599px){.text-4xl{font-size:1.5em}}@media screen and (max-width:418px){.text-4xl{display:none}}
565
+ .is-blue{background-color:var(--recruit-blue)}.is-blue,.is-red{color:var(--recruit-text)}.is-red{background-color:var(--recruit-red)}.is-light-yellow{background-color:var(--recruit-yellow-light);color:var(--recruit-text)}.is-yellow{background-color:var(--recruit-yellow)}.is-pink,.is-yellow{color:var(--recruit-text)}.is-pink{background-color:var(--recruit-pink)}.is-green{background-color:var(--recruit-green)}.is-green,.is-orange{color:var(--recruit-text)}.is-orange{background-color:var(--recruit-orange)}.is-teal{background-color:var(--recruit-teal)}.is-coral,.is-teal{color:var(--recruit-text)}.is-coral{background-color:var(--recruit-coral)}.is-purple{background-color:var(--recruit-purple);border:none;color:var(--recruit-text)}@media screen and (max-width:599px){.text-4xl{font-size:1.5em}}@media screen and (max-width:418px){.text-4xl{display:none}}
258
566
  </style>