@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.
- package/dist/module.json +1 -1
- package/dist/module.mjs +109 -21
- package/dist/runtime/components/builtins/AdvertisementView.d.vue.ts +13 -1
- package/dist/runtime/components/builtins/AdvertisementView.vue +7 -3
- package/dist/runtime/components/builtins/AdvertisementView.vue.d.ts +13 -1
- package/dist/runtime/components/builtins/DebriefView.vue +3 -1
- package/dist/runtime/components/builtins/DemographicSurveyView.vue +8 -6
- package/dist/runtime/components/builtins/DeviceSurveyView.vue +5 -3
- package/dist/runtime/components/builtins/ExpView.vue +4 -2
- package/dist/runtime/components/builtins/ExperimentStatusBar.vue +3 -0
- package/dist/runtime/components/builtins/FavoriteColor.vue +3 -1
- package/dist/runtime/components/builtins/FavoriteNumber.vue +3 -1
- package/dist/runtime/components/builtins/InformedConsentModal.vue +5 -3
- package/dist/runtime/components/builtins/InformedConsentView.vue +3 -2
- package/dist/runtime/components/builtins/InstructionsQuiz.vue +7 -5
- package/dist/runtime/components/builtins/InstructionsView.vue +5 -3
- package/dist/runtime/components/builtins/LocalDevBanner.vue +16 -0
- package/dist/runtime/components/builtins/MTurkRecruitView.vue +4 -3
- package/dist/runtime/components/builtins/PresentationModeView.vue +9 -8
- package/dist/runtime/components/builtins/StatusBar.vue +7 -4
- package/dist/runtime/components/builtins/StudyPreviewText.vue +12 -10
- package/dist/runtime/components/builtins/TaskFeedbackSurveyView.vue +3 -1
- package/dist/runtime/components/builtins/ThanksView.vue +22 -21
- package/dist/runtime/components/builtins/WindowSizerView.vue +5 -3
- package/dist/runtime/components/builtins/WithdrawModal.vue +9 -7
- package/dist/runtime/components/builtins/WithdrawView.vue +4 -2
- package/dist/runtime/components/dev/RecruitmentChooserView.vue +532 -224
- package/dist/runtime/components/dev/ResponsiveDeviceContainer.vue +17 -8
- package/dist/runtime/components/dev/SmileDevPresentationView.vue +83 -0
- package/dist/runtime/components/dev/console/ConfigList.vue +14 -11
- package/dist/runtime/components/dev/console/ConsoleConfigPanel.vue +28 -7
- package/dist/runtime/components/dev/console/ConsoleDatabaseBrowsePanel.vue +6 -4
- package/dist/runtime/components/dev/console/ConsoleLogPanel.vue +68 -23
- package/dist/runtime/components/dev/console/DatabaseList.vue +9 -7
- package/dist/runtime/components/dev/console/SmileDevConsole.vue +7 -5
- package/dist/runtime/components/dev/devicePresets.d.ts +4 -4
- package/dist/runtime/components/dev/devicePresets.js +4 -4
- package/dist/runtime/components/dev/menu/DevConfigPanel.vue +3 -1
- package/dist/runtime/components/dev/menu/ResponsiveDeviceSelect.vue +1 -0
- package/dist/runtime/components/dev/menu/SmileDevAppMenu.vue +27 -24
- package/dist/runtime/components/dev/navbar/ColorModeButton.vue +5 -3
- package/dist/runtime/components/dev/navbar/DatabaseButtonGroup.vue +8 -6
- package/dist/runtime/components/dev/navbar/FullScreenButton.vue +4 -2
- package/dist/runtime/components/dev/navbar/KeyCommandNotification.vue +1 -1
- package/dist/runtime/components/dev/navbar/PanelButtonGroup.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/PanelButtonGroup.vue +79 -0
- package/dist/runtime/components/dev/navbar/PanelButtonGroup.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/ReloadButton.vue +3 -1
- package/dist/runtime/components/dev/navbar/ResetButton.vue +3 -1
- package/dist/runtime/components/dev/navbar/RouteJumper.vue +9 -5
- package/dist/runtime/components/dev/navbar/SmileDevNavBar.vue +19 -27
- package/dist/runtime/components/dev/navbar/StepInfoButtonGroup.vue +5 -3
- package/dist/runtime/components/dev/navbar/ViewInfoButtonGroup.vue +13 -10
- package/dist/runtime/components/dev/presentation/DarkModeButton.vue +5 -3
- package/dist/runtime/components/dev/presentation/LogoutButton.vue +2 -1
- package/dist/runtime/components/dev/presentation/PresentationModeResetButton.vue +11 -2
- package/dist/runtime/components/dev/presentation/PresentationNavBar.d.vue.ts +13 -1
- package/dist/runtime/components/dev/presentation/PresentationNavBar.vue +13 -6
- package/dist/runtime/components/dev/presentation/PresentationNavBar.vue.d.ts +13 -1
- package/dist/runtime/components/dev/presentation/QRCodeButton.vue +4 -2
- package/dist/runtime/components/dev/sidebar/AppProgressPanel.vue +23 -21
- package/dist/runtime/components/dev/sidebar/ConfigurationVariablesPanel.vue +7 -5
- package/dist/runtime/components/dev/sidebar/DatabaseStatusInfoPanel.vue +27 -7
- package/dist/runtime/components/dev/sidebar/RandomizationSidebarPanel.vue +9 -5
- package/dist/runtime/components/dev/sidebar/SmileDevSideBar.vue +12 -5
- package/dist/runtime/components/dev/sidebar/StepDataViewer.d.vue.ts +2 -2
- package/dist/runtime/components/dev/sidebar/StepDataViewer.vue +1 -1
- package/dist/runtime/components/dev/sidebar/StepDataViewer.vue.d.ts +2 -2
- package/dist/runtime/components/dev/sidebar/StepExplorerPanel.vue +13 -8
- package/dist/runtime/components/dev/sidebar/StepNode.vue +7 -5
- package/dist/runtime/components/dev/sidebar/StudyInfoPanel.vue +3 -2
- package/dist/runtime/components/forms/MonthYearDayPicker.vue +1 -0
- package/dist/runtime/components/layouts/ConstrainedPage.d.vue.ts +1 -1
- package/dist/runtime/components/layouts/ConstrainedPage.vue.d.ts +1 -1
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.d.vue.ts +2 -2
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.vue +1 -1
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.vue.d.ts +2 -2
- package/dist/runtime/components/layouts/TitleTwoCol.d.vue.ts +1 -1
- package/dist/runtime/components/layouts/TitleTwoCol.vue.d.ts +1 -1
- package/dist/runtime/components/layouts/TwoCol.d.vue.ts +1 -1
- package/dist/runtime/components/layouts/TwoCol.vue.d.ts +1 -1
- package/dist/runtime/components/ui/avatar/Avatar.vue +1 -0
- package/dist/runtime/components/ui/avatar/AvatarFallback.vue +1 -0
- package/dist/runtime/components/ui/badge/Badge.vue +1 -0
- package/dist/runtime/components/ui/badge/index.d.ts +1 -1
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue +1 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbItem.vue +1 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbLink.vue +1 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbList.vue +1 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbPage.vue +1 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue +1 -0
- package/dist/runtime/components/ui/button/Button.vue +1 -0
- package/dist/runtime/components/ui/button/index.d.ts +2 -2
- package/dist/runtime/components/ui/button-group/ButtonGroup.vue +1 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupItem.vue +1 -0
- package/dist/runtime/components/ui/calendar/Calendar.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarCell.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarGrid.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarGridRow.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarHeadCell.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarHeader.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarHeading.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +1 -0
- package/dist/runtime/components/ui/card/Card.vue +1 -0
- package/dist/runtime/components/ui/card/CardAction.vue +1 -0
- package/dist/runtime/components/ui/card/CardContent.vue +1 -0
- package/dist/runtime/components/ui/card/CardDescription.vue +1 -0
- package/dist/runtime/components/ui/card/CardFooter.vue +1 -0
- package/dist/runtime/components/ui/card/CardHeader.vue +1 -0
- package/dist/runtime/components/ui/card/CardTitle.vue +1 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.d.vue.ts +6 -6
- package/dist/runtime/components/ui/checkbox/Checkbox.vue +1 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.vue.d.ts +6 -6
- package/dist/runtime/components/ui/checkbox/index.d.ts +2 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.d.vue.ts +4 -4
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +4 -4
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.d.vue.ts +3 -3
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +3 -3
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.d.vue.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.d.vue.ts +3 -3
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +3 -3
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +1 -0
- package/dist/runtime/components/ui/input/Input.d.vue.ts +4 -4
- package/dist/runtime/components/ui/input/Input.vue +1 -0
- package/dist/runtime/components/ui/input/Input.vue.d.ts +4 -4
- package/dist/runtime/components/ui/label/Label.vue +1 -0
- package/dist/runtime/components/ui/multiselect/MultiSelect.d.vue.ts +1 -1
- package/dist/runtime/components/ui/multiselect/MultiSelect.vue +1 -0
- package/dist/runtime/components/ui/multiselect/MultiSelect.vue.d.ts +1 -1
- package/dist/runtime/components/ui/pagination/Pagination.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationContent.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationEllipsis.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationFirst.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationItem.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationLast.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationNext.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationPrevious.vue +1 -0
- package/dist/runtime/components/ui/popover/PopoverContent.d.vue.ts +2 -2
- package/dist/runtime/components/ui/popover/PopoverContent.vue +1 -0
- package/dist/runtime/components/ui/popover/PopoverContent.vue.d.ts +2 -2
- package/dist/runtime/components/ui/progress/Progress.vue +1 -0
- package/dist/runtime/components/ui/resizable/ResizableHandle.vue +1 -0
- package/dist/runtime/components/ui/resizable/ResizablePanel.d.vue.ts +1 -1
- package/dist/runtime/components/ui/resizable/ResizablePanel.vue.d.ts +1 -1
- package/dist/runtime/components/ui/resizable/ResizablePanelGroup.vue +1 -0
- package/dist/runtime/components/ui/select/Select.d.vue.ts +1 -1
- package/dist/runtime/components/ui/select/Select.vue.d.ts +1 -1
- package/dist/runtime/components/ui/select/SelectContent.d.vue.ts +2 -2
- package/dist/runtime/components/ui/select/SelectContent.vue +1 -0
- package/dist/runtime/components/ui/select/SelectContent.vue.d.ts +2 -2
- package/dist/runtime/components/ui/select/SelectItem.vue +1 -0
- package/dist/runtime/components/ui/select/SelectLabel.vue +1 -0
- package/dist/runtime/components/ui/select/SelectScrollDownButton.vue +1 -0
- package/dist/runtime/components/ui/select/SelectScrollUpButton.vue +1 -0
- package/dist/runtime/components/ui/select/SelectSeparator.vue +1 -0
- package/dist/runtime/components/ui/select/SelectTrigger.vue +1 -0
- package/dist/runtime/components/ui/separator/Separator.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetContent.d.vue.ts +1 -1
- package/dist/runtime/components/ui/sheet/SheetContent.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetContent.vue.d.ts +1 -1
- package/dist/runtime/components/ui/sheet/SheetDescription.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetFooter.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetHeader.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetOverlay.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetTitle.vue +1 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.d.vue.ts +1 -1
- package/dist/runtime/components/ui/sidebar/Sidebar.vue +1 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/runtime/components/ui/sidebar/SidebarContent.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarFooter.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroup.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarHeader.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarInput.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarInset.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenu.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.d.vue.ts +1 -1
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue.d.ts +1 -1
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.d.vue.ts +1 -1
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +1 -1
- package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarProvider.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarRail.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +1 -0
- package/dist/runtime/components/ui/sidebar/index.d.ts +1 -1
- package/dist/runtime/components/ui/skeleton/Skeleton.vue +1 -0
- package/dist/runtime/components/ui/sonner/Sonner.d.vue.ts +4 -4
- package/dist/runtime/components/ui/sonner/Sonner.vue.d.ts +4 -4
- package/dist/runtime/components/ui/stepper/Stepper.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperDescription.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperIndicator.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperItem.d.vue.ts +1 -1
- package/dist/runtime/components/ui/stepper/StepperItem.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperItem.vue.d.ts +1 -1
- package/dist/runtime/components/ui/stepper/StepperSeparator.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperTitle.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperTrigger.vue +1 -0
- package/dist/runtime/components/ui/switch/Switch.d.vue.ts +2 -2
- package/dist/runtime/components/ui/switch/Switch.vue +1 -0
- package/dist/runtime/components/ui/switch/Switch.vue.d.ts +2 -2
- package/dist/runtime/components/ui/switch/index.d.ts +2 -2
- package/dist/runtime/components/ui/table/Table.vue +1 -0
- package/dist/runtime/components/ui/table/TableBody.vue +1 -0
- package/dist/runtime/components/ui/table/TableCaption.vue +1 -0
- package/dist/runtime/components/ui/table/TableCell.vue +1 -0
- package/dist/runtime/components/ui/table/TableEmpty.vue +1 -0
- package/dist/runtime/components/ui/table/TableFooter.vue +1 -0
- package/dist/runtime/components/ui/table/TableHead.vue +1 -0
- package/dist/runtime/components/ui/table/TableHeader.vue +1 -0
- package/dist/runtime/components/ui/table/TableRow.vue +1 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue +1 -0
- package/dist/runtime/components/ui/tabs/TabsContent.d.vue.ts +2 -2
- package/dist/runtime/components/ui/tabs/TabsContent.vue +1 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue.d.ts +2 -2
- package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +1 -1
- package/dist/runtime/components/ui/tabs/TabsList.vue +1 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +1 -1
- package/dist/runtime/components/ui/tabs/TabsTrigger.d.vue.ts +2 -2
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue +1 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue.d.ts +2 -2
- package/dist/runtime/components/ui/tags-input/TagsInput.d.vue.ts +3 -3
- package/dist/runtime/components/ui/tags-input/TagsInput.vue +1 -0
- package/dist/runtime/components/ui/tags-input/TagsInput.vue.d.ts +3 -3
- package/dist/runtime/components/ui/tags-input/TagsInputInput.vue +1 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItem.d.vue.ts +2 -2
- package/dist/runtime/components/ui/tags-input/TagsInputItem.vue +1 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItem.vue.d.ts +2 -2
- package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.vue +1 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemText.vue +1 -0
- package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +4 -4
- package/dist/runtime/components/ui/textarea/Textarea.vue +1 -0
- package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +4 -4
- package/dist/runtime/components/ui/toggle/Toggle.d.vue.ts +2 -2
- package/dist/runtime/components/ui/toggle/Toggle.vue +1 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue.d.ts +2 -2
- package/dist/runtime/components/ui/toggle/index.d.ts +1 -1
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.d.vue.ts +2 -2
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue +1 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue.d.ts +2 -2
- package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.vue +1 -0
- package/dist/runtime/components/ui/tooltip/TooltipContent.d.vue.ts +2 -2
- package/dist/runtime/components/ui/tooltip/TooltipContent.vue +1 -0
- package/dist/runtime/components/ui/tooltip/TooltipContent.vue.d.ts +2 -2
- package/dist/runtime/composables/useAPI.d.ts +2 -2
- package/dist/runtime/composables/useAPI.js +6 -11
- package/dist/runtime/composables/useViewAPI.d.ts +1 -0
- package/dist/runtime/composables/useViewAPI.js +20 -4
- package/dist/runtime/composables/useWindowSizer.d.ts +14 -0
- package/dist/runtime/composables/useWindowSizer.js +48 -0
- package/dist/runtime/core/config.d.ts +78 -48
- package/dist/runtime/core/config.js +21 -27
- package/dist/runtime/core/stepper/Stepper.d.ts +13 -10
- package/dist/runtime/core/stepper/Stepper.js +70 -55
- package/dist/runtime/core/stepper/StepperSerializer.js +32 -14
- package/dist/runtime/core/timeline/Timeline.js +1 -2
- package/dist/runtime/css/main.css +1 -1
- package/dist/runtime/css/smile.css +1 -1
- package/dist/runtime/layouts/development.vue +38 -78
- package/dist/runtime/layouts/experiment.d.vue.ts +7 -10
- package/dist/runtime/layouts/experiment.vue +13 -0
- package/dist/runtime/layouts/experiment.vue.d.ts +7 -10
- package/dist/runtime/layouts/presentation.vue +24 -3
- package/dist/runtime/middleware/timeline.global.js +2 -4
- package/dist/runtime/pages/[...slug].vue +2 -0
- package/dist/runtime/pages/dev/[...slug].vue +2 -0
- package/dist/runtime/pages/dev-login.vue +5 -3
- package/dist/runtime/pages/presentation/[...slug].vue +2 -0
- package/dist/runtime/plugins/dev-sync.client.js +0 -2
- package/dist/runtime/plugins/seed.client.js +1 -3
- package/dist/runtime/plugins/store-sync.client.js +8 -10
- package/dist/runtime/public/images/helpus.png +0 -0
- package/dist/runtime/public/images/smile.svg +78 -0
- package/dist/runtime/public/images/universitylogo.png +0 -0
- package/dist/runtime/server/api/auth/login.post.js +11 -2
- package/dist/runtime/server/api/db-info.get.d.ts +5 -0
- package/dist/runtime/server/api/db-info.get.js +10 -0
- package/dist/runtime/server/api/qr.get.js +1 -2
- package/dist/runtime/server/middleware/dev-auth.js +10 -5
- package/dist/runtime/stores/log.js +4 -7
- package/dist/runtime/stores/smilestore.d.ts +161 -1014
- package/dist/runtime/stores/smilestore.js +39 -7
- package/dist/runtime/utils/utils.js +7 -0
- package/package.json +5 -3
- package/dist/runtime/components/dev/navbar/ViewButton.vue +0 -159
- package/dist/runtime/pages/info.vue +0 -462
- /package/dist/runtime/components/{dev/navbar/ViewButton.d.vue.ts → builtins/LocalDevBanner.d.vue.ts} +0 -0
- /package/dist/runtime/components/{dev/navbar/ViewButton.vue.d.ts → builtins/LocalDevBanner.vue.d.ts} +0 -0
- /package/dist/runtime/{pages/info.d.vue.ts → components/dev/SmileDevPresentationView.d.vue.ts} +0 -0
- /package/dist/runtime/{pages/info.vue.d.ts → components/dev/SmileDevPresentationView.vue.d.ts} +0 -0
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver, addServerScanDir, addServerImportsDir, addPlugin, addRouteMiddleware, addLayout, extendPages, addComponentsDir, addImports } from '@nuxt/kit';
|
|
1
|
+
import { defineNuxtModule, createResolver, addServerScanDir, addServerImportsDir, addPlugin, addRouteMiddleware, addLayout, extendPages, addComponentsDir, addImports, useLogger } from '@nuxt/kit';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
4
|
+
import { dirname, join, extname, basename } from 'node:path';
|
|
5
|
+
import { readFileSync, readdirSync, statSync } from 'node:fs';
|
|
3
6
|
import tailwindcss from '@tailwindcss/vite';
|
|
4
|
-
import Icons from 'unplugin-icons/vite';
|
|
5
|
-
import Components from 'unplugin-vue-components/vite';
|
|
6
|
-
import IconsResolver from 'unplugin-icons/resolver';
|
|
7
7
|
|
|
8
8
|
const module$1 = defineNuxtModule({
|
|
9
9
|
meta: {
|
|
@@ -15,30 +15,75 @@ const module$1 = defineNuxtModule({
|
|
|
15
15
|
setup(_options, _nuxt) {
|
|
16
16
|
const resolver = createResolver(import.meta.url);
|
|
17
17
|
const runtimeDir = fileURLToPath(new URL("./runtime", import.meta.url));
|
|
18
|
+
const _require = createRequire(import.meta.url);
|
|
18
19
|
_nuxt.options.ssr = false;
|
|
19
20
|
_nuxt.options.build.transpile.push(runtimeDir);
|
|
21
|
+
_nuxt.options.nitro = _nuxt.options.nitro || {};
|
|
22
|
+
_nuxt.options.nitro.watchOptions = _nuxt.options.nitro.watchOptions || {};
|
|
23
|
+
_nuxt.options.nitro.watchOptions.ignored = _nuxt.options.nitro.watchOptions.ignored || [];
|
|
24
|
+
if (Array.isArray(_nuxt.options.nitro.watchOptions.ignored)) {
|
|
25
|
+
_nuxt.options.nitro.watchOptions.ignored.push("**/.data/**");
|
|
26
|
+
}
|
|
27
|
+
_nuxt.options.watch = _nuxt.options.watch || {};
|
|
28
|
+
_nuxt.options.watch.exclude = _nuxt.options.watch.exclude || [];
|
|
29
|
+
_nuxt.options.watch.exclude.push(".data/**");
|
|
30
|
+
_nuxt.options.nitro.publicAssets = _nuxt.options.nitro.publicAssets || [];
|
|
31
|
+
_nuxt.options.nitro.publicAssets.push({
|
|
32
|
+
dir: resolver.resolve("./runtime/public"),
|
|
33
|
+
baseURL: "/_smile"
|
|
34
|
+
});
|
|
20
35
|
addServerScanDir(resolver.resolve("./runtime/server"));
|
|
21
36
|
addServerImportsDir(resolver.resolve("./runtime/server/utils"));
|
|
22
37
|
_nuxt.options.runtimeConfig = _nuxt.options.runtimeConfig || {};
|
|
23
38
|
_nuxt.options.runtimeConfig.smile = {
|
|
24
39
|
devPassword: process.env.SMILE_DEV_PASSWORD || "",
|
|
40
|
+
publicPresentation: process.env.SMILE_PUBLIC_PRESENTATION === "true",
|
|
25
41
|
tursoUrl: process.env.TURSO_DATABASE_URL || "",
|
|
26
42
|
tursoAuthToken: process.env.TURSO_AUTH_TOKEN || ""
|
|
27
43
|
};
|
|
28
44
|
_nuxt.options.runtimeConfig.public = _nuxt.options.runtimeConfig.public || {};
|
|
29
45
|
_nuxt.options.runtimeConfig.public.smile = {
|
|
30
|
-
codeName: process.env.VITE_CODE_NAME || "",
|
|
31
|
-
projectRef: process.env.VITE_PROJECT_REF || ""
|
|
46
|
+
codeName: process.env.VITE_CODE_NAME || "unnamed-experiment",
|
|
47
|
+
projectRef: process.env.VITE_PROJECT_REF || "local-experiment-main"
|
|
32
48
|
};
|
|
33
49
|
_nuxt.options.alias["#smile-dev"] = resolver.resolve("./runtime/components/dev");
|
|
50
|
+
_nuxt.options.alias["#smile-composables"] = resolver.resolve("./runtime/composables");
|
|
51
|
+
for (const dep of ["lucide-vue-next", "@vueuse/core", "motion", "clipboard"]) {
|
|
52
|
+
_nuxt.options.alias[dep] = dirname(_require.resolve(`${dep}/package.json`));
|
|
53
|
+
}
|
|
54
|
+
let smileVersion = "0.0.0";
|
|
55
|
+
try {
|
|
56
|
+
const pkg = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), "../package.json"), "utf-8"));
|
|
57
|
+
smileVersion = pkg.version;
|
|
58
|
+
} catch {
|
|
59
|
+
}
|
|
60
|
+
_nuxt.options.vite.define = _nuxt.options.vite.define || {};
|
|
61
|
+
_nuxt.options.vite.define["import.meta.env.VITE_SMILE_VERSION"] = JSON.stringify(smileVersion);
|
|
34
62
|
_nuxt.options.vite.plugins = _nuxt.options.vite.plugins || [];
|
|
35
63
|
_nuxt.options.vite.plugins.push(tailwindcss());
|
|
36
|
-
_nuxt.options.vite.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
64
|
+
_nuxt.options.vite.optimizeDeps = _nuxt.options.vite.optimizeDeps || {};
|
|
65
|
+
_nuxt.options.vite.optimizeDeps.include = _nuxt.options.vite.optimizeDeps.include || [];
|
|
66
|
+
_nuxt.options.vite.optimizeDeps.include.push(
|
|
67
|
+
"@nyuccl/smile > seedrandom",
|
|
68
|
+
"@nyuccl/smile > lodash",
|
|
69
|
+
"@nyuccl/smile > clipboard",
|
|
70
|
+
"@nyuccl/smile > crypto-js/sha256",
|
|
71
|
+
"@nyuccl/smile > crypto-js/enc-base64",
|
|
72
|
+
"@nyuccl/smile > json-stable-stringify",
|
|
73
|
+
"@nyuccl/smile > qrcode-svg",
|
|
74
|
+
"@nyuccl/smile > lucide-vue-next",
|
|
75
|
+
"@nyuccl/smile > reka-ui",
|
|
76
|
+
"@nyuccl/smile > reka-ui/date",
|
|
77
|
+
"@nyuccl/smile > @internationalized/date",
|
|
78
|
+
"@nyuccl/smile > vue-sonner",
|
|
79
|
+
"@nyuccl/smile > class-variance-authority",
|
|
80
|
+
"@nyuccl/smile > clsx",
|
|
81
|
+
"@nyuccl/smile > tailwind-merge",
|
|
82
|
+
"@nyuccl/smile > @vueuse/core",
|
|
83
|
+
"@nyuccl/smile > uuid",
|
|
84
|
+
"@nyuccl/smile > axios",
|
|
85
|
+
"@nyuccl/smile > motion"
|
|
86
|
+
);
|
|
42
87
|
_nuxt.options.css.push(resolver.resolve("./runtime/css/main.css"));
|
|
43
88
|
addPlugin(resolver.resolve("./runtime/plugins/store-sync.client"));
|
|
44
89
|
addPlugin(resolver.resolve("./runtime/plugins/seed.client"));
|
|
@@ -73,16 +118,41 @@ const module$1 = defineNuxtModule({
|
|
|
73
118
|
path: "/dev-login",
|
|
74
119
|
file: resolver.resolve("./runtime/pages/dev-login.vue")
|
|
75
120
|
});
|
|
76
|
-
pages.push({
|
|
77
|
-
name: "info",
|
|
78
|
-
path: "/info",
|
|
79
|
-
file: resolver.resolve("./runtime/pages/info.vue")
|
|
80
|
-
});
|
|
81
121
|
});
|
|
82
|
-
addComponentsDir({ path: resolver.resolve("./runtime/components/ui"), pathPrefix: false, global: true, extensions: ["vue"] });
|
|
83
|
-
addComponentsDir({ path: resolver.resolve("./runtime/components/forms"), pathPrefix: false, global: true, extensions: ["vue"] });
|
|
84
|
-
addComponentsDir({ path: resolver.resolve("./runtime/components/layouts"), pathPrefix: false, global: true, extensions: ["vue"] });
|
|
85
|
-
addComponentsDir({ path: resolver.resolve("./runtime/components/builtins"), pathPrefix: false, global: true, extensions: ["vue"] });
|
|
122
|
+
addComponentsDir({ path: resolver.resolve("./runtime/components/ui"), pathPrefix: false, global: true, extensions: ["vue"], priority: -1 });
|
|
123
|
+
addComponentsDir({ path: resolver.resolve("./runtime/components/forms"), pathPrefix: false, global: true, extensions: ["vue"], priority: -1 });
|
|
124
|
+
addComponentsDir({ path: resolver.resolve("./runtime/components/layouts"), pathPrefix: false, global: true, extensions: ["vue"], priority: -1 });
|
|
125
|
+
addComponentsDir({ path: resolver.resolve("./runtime/components/builtins"), pathPrefix: false, global: true, extensions: ["vue"], priority: -1 });
|
|
126
|
+
const moduleGlobalNames = /* @__PURE__ */ new Set();
|
|
127
|
+
const moduleComponentDirs = [
|
|
128
|
+
resolver.resolve("./runtime/components/ui"),
|
|
129
|
+
resolver.resolve("./runtime/components/forms"),
|
|
130
|
+
resolver.resolve("./runtime/components/layouts"),
|
|
131
|
+
resolver.resolve("./runtime/components/builtins")
|
|
132
|
+
];
|
|
133
|
+
function scanDir(dir) {
|
|
134
|
+
try {
|
|
135
|
+
for (const entry of readdirSync(dir)) {
|
|
136
|
+
const full = join(dir, entry);
|
|
137
|
+
if (statSync(full).isDirectory()) {
|
|
138
|
+
scanDir(full);
|
|
139
|
+
} else if (extname(entry) === ".vue") {
|
|
140
|
+
moduleGlobalNames.add(basename(entry, ".vue"));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
} catch {
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
for (const dir of moduleComponentDirs) {
|
|
147
|
+
scanDir(dir);
|
|
148
|
+
}
|
|
149
|
+
_nuxt.hook("components:extend", (components) => {
|
|
150
|
+
for (const c of components) {
|
|
151
|
+
if (!c.global && moduleGlobalNames.has(c.pascalName)) {
|
|
152
|
+
c.global = true;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
});
|
|
86
156
|
addImports([
|
|
87
157
|
{ name: "default", as: "useAPI", from: resolver.resolve("./runtime/composables/useAPI") },
|
|
88
158
|
{ name: "default", as: "useViewAPI", from: resolver.resolve("./runtime/composables/useViewAPI") },
|
|
@@ -96,6 +166,24 @@ const module$1 = defineNuxtModule({
|
|
|
96
166
|
{ name: "default", as: "useSmileStore", from: resolver.resolve("./runtime/stores/smilestore") },
|
|
97
167
|
{ name: "default", as: "useLog", from: resolver.resolve("./runtime/stores/log") }
|
|
98
168
|
]);
|
|
169
|
+
if (_nuxt.options.dev) {
|
|
170
|
+
const logger = useLogger("smile");
|
|
171
|
+
_nuxt.hook("listen", async (_server, listener) => {
|
|
172
|
+
const { colors } = await import('consola/utils');
|
|
173
|
+
const pkg = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), "../package.json"), "utf-8"));
|
|
174
|
+
const fmt = (url) => colors.cyan(colors.underline(url));
|
|
175
|
+
const urls = await listener.getURLs();
|
|
176
|
+
const local = urls.find((u) => u.type === "local");
|
|
177
|
+
if (local) {
|
|
178
|
+
const base = local.url.replace(/\/$/, "");
|
|
179
|
+
logger.info(``);
|
|
180
|
+
logger.info(` ${colors.bold(`SMILE ${pkg.version}`)}`);
|
|
181
|
+
logger.info(` Experiment: ${fmt(base)}`);
|
|
182
|
+
logger.info(` Dev: ${fmt(`${base}/dev/`)}`);
|
|
183
|
+
logger.info(` Presentation: ${fmt(`${base}/presentation/`)}`);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
99
187
|
}
|
|
100
188
|
});
|
|
101
189
|
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
declare const _default: typeof __VLS_export;
|
|
2
2
|
export default _default;
|
|
3
|
-
declare const __VLS_export: import("vue").DefineComponent<
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
imageWidth: {
|
|
5
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
6
|
+
default: number;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
imageWidth: {
|
|
10
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{}>, {
|
|
14
|
+
imageWidth: string | number;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { onMounted, ref, onBeforeUnmount } from "vue";
|
|
3
3
|
import { animate } from "motion";
|
|
4
|
+
import useViewAPI from "../../composables/useViewAPI";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
imageWidth: { type: [String, Number], default: 320 }
|
|
7
|
+
});
|
|
4
8
|
const api = useViewAPI();
|
|
5
9
|
let timer;
|
|
6
10
|
let clicked = false;
|
|
@@ -35,9 +39,9 @@ onBeforeUnmount(() => {
|
|
|
35
39
|
>
|
|
36
40
|
<img
|
|
37
41
|
ref="logo"
|
|
38
|
-
src="
|
|
39
|
-
width="
|
|
40
|
-
class="dark-aware-img"
|
|
42
|
+
:src="api.config.advertisementImageFn"
|
|
43
|
+
:width="props.imageWidth"
|
|
44
|
+
:class="{ 'dark-aware-img': api.config.advertisementImageInvertDark }"
|
|
41
45
|
>
|
|
42
46
|
|
|
43
47
|
<h1
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
declare const _default: typeof __VLS_export;
|
|
2
2
|
export default _default;
|
|
3
|
-
declare const __VLS_export: import("vue").DefineComponent<
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
imageWidth: {
|
|
5
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
6
|
+
default: number;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
imageWidth: {
|
|
10
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{}>, {
|
|
14
|
+
imageWidth: string | number;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ArrowRight } from "lucide-vue-next";
|
|
3
|
+
import useViewAPI from "../../composables/useViewAPI";
|
|
2
4
|
const api = useViewAPI();
|
|
3
5
|
const _props = defineProps({
|
|
4
6
|
debriefText: {
|
|
@@ -35,7 +37,7 @@ function finish() {
|
|
|
35
37
|
@click="finish()"
|
|
36
38
|
>
|
|
37
39
|
next
|
|
38
|
-
<
|
|
40
|
+
<ArrowRight />
|
|
39
41
|
</Button>
|
|
40
42
|
</div>
|
|
41
43
|
</div>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ArrowLeft, ArrowRight, CalendarIcon, User } from "lucide-vue-next";
|
|
2
3
|
import { reactive, computed, ref } from "vue";
|
|
3
|
-
import {
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
import useViewAPI from "../../composables/useViewAPI";
|
|
4
6
|
const api = useViewAPI();
|
|
5
7
|
api.steps.append([{ id: "survey_page1" }, { id: "survey_page2" }, { id: "survey_page3" }]);
|
|
6
8
|
const isPopoverOpen = ref(false);
|
|
@@ -75,7 +77,7 @@ function finish() {
|
|
|
75
77
|
<!-- Page title and description section -->
|
|
76
78
|
<template #title>
|
|
77
79
|
<h3 class="text-3xl font-bold mb-4">
|
|
78
|
-
<
|
|
80
|
+
<User class="inline mr-2" />Demographic Information
|
|
79
81
|
</h3>
|
|
80
82
|
<p class="text-lg mb-8">
|
|
81
83
|
We request some information about you which we can use to understand aggregate differences between
|
|
@@ -290,7 +292,7 @@ function finish() {
|
|
|
290
292
|
@click="api.goNextStep()"
|
|
291
293
|
>
|
|
292
294
|
Continue
|
|
293
|
-
<
|
|
295
|
+
<ArrowRight />
|
|
294
296
|
</Button>
|
|
295
297
|
</div>
|
|
296
298
|
</div>
|
|
@@ -450,7 +452,7 @@ function finish() {
|
|
|
450
452
|
variant="outline"
|
|
451
453
|
@click="api.goPrevStep()"
|
|
452
454
|
>
|
|
453
|
-
<
|
|
455
|
+
<ArrowLeft />
|
|
454
456
|
Previous
|
|
455
457
|
</Button>
|
|
456
458
|
<Button
|
|
@@ -459,7 +461,7 @@ function finish() {
|
|
|
459
461
|
@click="api.goNextStep()"
|
|
460
462
|
>
|
|
461
463
|
Continue
|
|
462
|
-
<
|
|
464
|
+
<ArrowRight />
|
|
463
465
|
</Button>
|
|
464
466
|
</div>
|
|
465
467
|
</div>
|
|
@@ -1188,7 +1190,7 @@ function finish() {
|
|
|
1188
1190
|
variant="outline"
|
|
1189
1191
|
@click="api.goPrevStep()"
|
|
1190
1192
|
>
|
|
1191
|
-
<
|
|
1193
|
+
<ArrowLeft />
|
|
1192
1194
|
Previous
|
|
1193
1195
|
</Button>
|
|
1194
1196
|
<Button
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ArrowLeft, ArrowRight, Monitor } from "lucide-vue-next";
|
|
2
3
|
import { reactive, computed } from "vue";
|
|
4
|
+
import useViewAPI from "../../composables/useViewAPI";
|
|
3
5
|
const api = useViewAPI();
|
|
4
6
|
api.steps.append([{ id: "device_page1" }, { id: "device_page2" }]);
|
|
5
7
|
if (!api.persist.isDefined("forminfo")) {
|
|
@@ -61,7 +63,7 @@ function finish() {
|
|
|
61
63
|
<!-- Title and description section -->
|
|
62
64
|
<template #title>
|
|
63
65
|
<h3 class="text-3xl font-bold mb-4">
|
|
64
|
-
<
|
|
66
|
+
<Monitor class="inline mr-2" /> Computer/Device Information
|
|
65
67
|
</h3>
|
|
66
68
|
<p class="text-lg mb-8">
|
|
67
69
|
We request some basic information about the computer you are using right now. We also can use this information
|
|
@@ -277,7 +279,7 @@ function finish() {
|
|
|
277
279
|
@click="api.goNextStep()"
|
|
278
280
|
>
|
|
279
281
|
Continue
|
|
280
|
-
<
|
|
282
|
+
<ArrowRight />
|
|
281
283
|
</Button>
|
|
282
284
|
</div>
|
|
283
285
|
</div>
|
|
@@ -434,7 +436,7 @@ function finish() {
|
|
|
434
436
|
variant="outline"
|
|
435
437
|
@click="api.goPrevStep()"
|
|
436
438
|
>
|
|
437
|
-
<
|
|
439
|
+
<ArrowLeft />
|
|
438
440
|
Previous
|
|
439
441
|
</Button>
|
|
440
442
|
<Button
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ArrowRight } from "lucide-vue-next";
|
|
3
|
+
import useViewAPI from "../../composables/useViewAPI";
|
|
2
4
|
const api = useViewAPI();
|
|
3
5
|
function finish() {
|
|
4
6
|
api.goNextView();
|
|
@@ -22,7 +24,7 @@ function finish() {
|
|
|
22
24
|
</h1>
|
|
23
25
|
|
|
24
26
|
<!-- Visual separator -->
|
|
25
|
-
<hr class="border-
|
|
27
|
+
<hr class="border-muted-foreground/30 my-4">
|
|
26
28
|
|
|
27
29
|
<!-- Navigation controls -->
|
|
28
30
|
<div class="flex justify-end">
|
|
@@ -31,7 +33,7 @@ function finish() {
|
|
|
31
33
|
@click="finish()"
|
|
32
34
|
>
|
|
33
35
|
next
|
|
34
|
-
<
|
|
36
|
+
<ArrowRight />
|
|
35
37
|
</Button>
|
|
36
38
|
</div>
|
|
37
39
|
</div>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ArrowRight } from "lucide-vue-next";
|
|
2
3
|
import { ref } from "vue";
|
|
4
|
+
import useViewAPI from "../../composables/useViewAPI";
|
|
3
5
|
const api = useViewAPI();
|
|
4
6
|
const faveColor = ref("");
|
|
5
7
|
function finish() {
|
|
@@ -48,7 +50,7 @@ function finish() {
|
|
|
48
50
|
@click="finish()"
|
|
49
51
|
>
|
|
50
52
|
next
|
|
51
|
-
<
|
|
53
|
+
<ArrowRight />
|
|
52
54
|
</Button>
|
|
53
55
|
</div>
|
|
54
56
|
</div>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ArrowRight } from "lucide-vue-next";
|
|
2
3
|
import { ref } from "vue";
|
|
4
|
+
import useViewAPI from "../../composables/useViewAPI";
|
|
3
5
|
const api = useViewAPI();
|
|
4
6
|
const faveNumber = ref("1");
|
|
5
7
|
function finish() {
|
|
@@ -48,7 +50,7 @@ function finish() {
|
|
|
48
50
|
@click="finish()"
|
|
49
51
|
>
|
|
50
52
|
next
|
|
51
|
-
<
|
|
53
|
+
<ArrowRight />
|
|
52
54
|
</Button>
|
|
53
55
|
</div>
|
|
54
56
|
</div>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { X } from "lucide-vue-next";
|
|
2
3
|
import { watch, onUnmounted } from "vue";
|
|
4
|
+
import useAPI from "../../composables/useAPI";
|
|
3
5
|
const props = defineProps({
|
|
4
6
|
show: {
|
|
5
7
|
type: Boolean,
|
|
@@ -44,11 +46,11 @@ onUnmounted(() => {
|
|
|
44
46
|
|
|
45
47
|
<!-- Close button in top-right corner -->
|
|
46
48
|
<Button
|
|
47
|
-
class="absolute top-4 right-4 text-
|
|
49
|
+
class="absolute top-4 right-4 text-muted-foreground hover:text-foreground p-2 rounded-full hover:bg-muted transition-colors"
|
|
48
50
|
aria-label="close"
|
|
49
51
|
@click="$emit('toggleConsent')"
|
|
50
52
|
>
|
|
51
|
-
<
|
|
53
|
+
<X class="text-xl" />
|
|
52
54
|
</Button>
|
|
53
55
|
|
|
54
56
|
<!-- Modal content container -->
|
|
@@ -63,7 +65,7 @@ onUnmounted(() => {
|
|
|
63
65
|
</template>
|
|
64
66
|
<!-- Error fallback if consent text component is not available -->
|
|
65
67
|
<template v-else>
|
|
66
|
-
<div class="rounded-md border border-
|
|
68
|
+
<div class="rounded-md border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive">
|
|
67
69
|
Error: Unable to load consent form text. Please contact the study administrator.
|
|
68
70
|
</div>
|
|
69
71
|
</template>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, watch, onBeforeUnmount } from "vue";
|
|
3
3
|
import { animate } from "motion";
|
|
4
|
+
import useViewAPI from "../../composables/useViewAPI";
|
|
4
5
|
const _props = defineProps({
|
|
5
6
|
informedConsentText: {
|
|
6
7
|
type: Object,
|
|
@@ -62,7 +63,7 @@ onBeforeUnmount(() => {
|
|
|
62
63
|
read the consent form (you can scroll the page).
|
|
63
64
|
</p>
|
|
64
65
|
|
|
65
|
-
<div class="border-t border-
|
|
66
|
+
<div class="border-t border-border my-4" />
|
|
66
67
|
|
|
67
68
|
<div class="flex items-center space-x-2 mb-4">
|
|
68
69
|
<Switch
|
|
@@ -83,7 +84,7 @@ onBeforeUnmount(() => {
|
|
|
83
84
|
<div class="hidden">
|
|
84
85
|
<Label
|
|
85
86
|
for="your_name"
|
|
86
|
-
class="text-sm font-medium text-
|
|
87
|
+
class="text-sm font-medium text-foreground mb-2 block"
|
|
87
88
|
>
|
|
88
89
|
Required! Please enter your name:
|
|
89
90
|
</Label>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ArrowLeft, ArrowRight, CircleAlert, SquareCheckBig } from "lucide-vue-next";
|
|
2
3
|
import { computed } from "vue";
|
|
4
|
+
import useViewAPI from "../../composables/useViewAPI";
|
|
3
5
|
const api = useViewAPI();
|
|
4
6
|
const props = defineProps({
|
|
5
7
|
questions: {
|
|
@@ -127,7 +129,7 @@ init();
|
|
|
127
129
|
>
|
|
128
130
|
<template #title>
|
|
129
131
|
<h3 class="text-3xl font-bold mb-4">
|
|
130
|
-
<
|
|
132
|
+
<SquareCheckBig class="inline mr-2" /> Did we explain things clearly?
|
|
131
133
|
</h3>
|
|
132
134
|
<p class="text-lg mb-8">
|
|
133
135
|
Using the information provided in the previous pages, please select the correct answer for each question. Do
|
|
@@ -200,7 +202,7 @@ init();
|
|
|
200
202
|
variant="outline"
|
|
201
203
|
@click="api.goPrevStep()"
|
|
202
204
|
>
|
|
203
|
-
<
|
|
205
|
+
<ArrowLeft />
|
|
204
206
|
Previous page
|
|
205
207
|
</Button>
|
|
206
208
|
<div v-else />
|
|
@@ -210,7 +212,7 @@ init();
|
|
|
210
212
|
@click="api.isLastBlockStep() ? submitQuiz() : api.goNextStep()"
|
|
211
213
|
>
|
|
212
214
|
{{ api.isLastBlockStep() ? 'Submit' : 'Next page' }}
|
|
213
|
-
<
|
|
215
|
+
<ArrowRight v-if="!api.isLastBlockStep()" />
|
|
214
216
|
</Button>
|
|
215
217
|
</div>
|
|
216
218
|
</div>
|
|
@@ -229,7 +231,7 @@ init();
|
|
|
229
231
|
<div class="text-center items-center justify-center">
|
|
230
232
|
<h3 class="text-3xl font-bold mb-4">
|
|
231
233
|
<div class="flex justify-center mb-2">
|
|
232
|
-
<
|
|
234
|
+
<SquareCheckBig class="text-[4rem]" />
|
|
233
235
|
</div>
|
|
234
236
|
Congrats! You passed.
|
|
235
237
|
</h3>
|
|
@@ -256,7 +258,7 @@ init();
|
|
|
256
258
|
<div class="text-center items-center justify-center">
|
|
257
259
|
<h3 class="text-3xl font-bold mb-4">
|
|
258
260
|
<div class="flex justify-center mb-2">
|
|
259
|
-
<
|
|
261
|
+
<CircleAlert class="text-[4rem]" />
|
|
260
262
|
</div>
|
|
261
263
|
Sorry! You did not get all the answers correct.
|
|
262
264
|
</h3>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { ArrowRight, BookOpen } from "lucide-vue-next";
|
|
2
3
|
import { computed } from "vue";
|
|
4
|
+
import useViewAPI from "../../composables/useViewAPI";
|
|
3
5
|
const api = useViewAPI();
|
|
4
6
|
const cond = api.getConditionByName("instructionsVersion");
|
|
5
7
|
const instText = computed(() => {
|
|
@@ -32,7 +34,7 @@ function finish(_goto) {
|
|
|
32
34
|
<div class="w-[80%] h-[80%]">
|
|
33
35
|
<!-- Instruction header with icon -->
|
|
34
36
|
<h1 class="text-2xl font-bold mb-4">
|
|
35
|
-
<
|
|
37
|
+
<BookOpen class="inline-block mr-2 text-3xl" /> Instructions
|
|
36
38
|
</h1>
|
|
37
39
|
|
|
38
40
|
<!-- Dynamic instruction text based on condition -->
|
|
@@ -41,7 +43,7 @@ function finish(_goto) {
|
|
|
41
43
|
</p>
|
|
42
44
|
|
|
43
45
|
<!-- Visual separator -->
|
|
44
|
-
<hr class="border-
|
|
46
|
+
<hr class="border-muted-foreground/30 my-4">
|
|
45
47
|
|
|
46
48
|
<!-- Navigation button container -->
|
|
47
49
|
<div class="flex justify-end">
|
|
@@ -50,7 +52,7 @@ function finish(_goto) {
|
|
|
50
52
|
@click="finish()"
|
|
51
53
|
>
|
|
52
54
|
next
|
|
53
|
-
<
|
|
55
|
+
<ArrowRight />
|
|
54
56
|
</Button>
|
|
55
57
|
</div>
|
|
56
58
|
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const isDev = import.meta.dev;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div
|
|
7
|
+
v-if="isDev"
|
|
8
|
+
class="local-dev-banner"
|
|
9
|
+
>
|
|
10
|
+
LOCAL DEV SERVER
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<style scoped>
|
|
15
|
+
.local-dev-banner{background:repeating-linear-gradient(-45deg,var(--dev-banner-stripe-1),var(--dev-banner-stripe-1) 10px,var(--dev-banner-stripe-2) 10px,var(--dev-banner-stripe-2) 20px);color:var(--dev-banner-text);flex-shrink:0;font-size:10px;font-weight:700;letter-spacing:.08em;padding:3px 0;text-align:center;width:100%}
|
|
16
|
+
</style>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { onMounted, ref } from "vue";
|
|
3
|
+
import useAPI from "../../composables/useAPI";
|
|
3
4
|
const api = useAPI();
|
|
4
5
|
const props = defineProps({
|
|
5
6
|
estimated_time: {
|
|
@@ -81,7 +82,7 @@ function submitForm(event) {
|
|
|
81
82
|
</p>
|
|
82
83
|
|
|
83
84
|
<!-- Visual separator -->
|
|
84
|
-
<hr class="border-
|
|
85
|
+
<hr class="border-muted-foreground/30 my-4">
|
|
85
86
|
|
|
86
87
|
<!-- Completion code submission form -->
|
|
87
88
|
<form
|
|
@@ -101,11 +102,11 @@ function submitForm(event) {
|
|
|
101
102
|
v-model="completionCode"
|
|
102
103
|
name="completioncode"
|
|
103
104
|
placeholder="Paste your completion code here"
|
|
104
|
-
:class="{ 'border-
|
|
105
|
+
:class="{ 'border-destructive': formError }"
|
|
105
106
|
/>
|
|
106
107
|
<p
|
|
107
108
|
v-if="formError"
|
|
108
|
-
class="text-
|
|
109
|
+
class="text-destructive text-sm mt-1"
|
|
109
110
|
>
|
|
110
111
|
{{ formError }}
|
|
111
112
|
</p>
|