@nyuccl/smile 0.2.0-beta.0
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/LICENSE +21 -0
- package/README.md +50 -0
- package/dist/module.d.mts +8 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +102 -0
- package/dist/runtime/components/builtins/AdvertisementView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/AdvertisementView.vue +62 -0
- package/dist/runtime/components/builtins/AdvertisementView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/DebriefView.d.vue.ts +22 -0
- package/dist/runtime/components/builtins/DebriefView.vue +43 -0
- package/dist/runtime/components/builtins/DebriefView.vue.d.ts +22 -0
- package/dist/runtime/components/builtins/DemographicSurveyView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/DemographicSurveyView.vue +1206 -0
- package/dist/runtime/components/builtins/DemographicSurveyView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/DeviceSurveyView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/DeviceSurveyView.vue +452 -0
- package/dist/runtime/components/builtins/DeviceSurveyView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/ExpView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/ExpView.vue +39 -0
- package/dist/runtime/components/builtins/ExpView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/ExperimentStatusBar.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/ExperimentStatusBar.vue +12 -0
- package/dist/runtime/components/builtins/ExperimentStatusBar.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/FavoriteColor.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/FavoriteColor.vue +57 -0
- package/dist/runtime/components/builtins/FavoriteColor.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/FavoriteNumber.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/FavoriteNumber.vue +57 -0
- package/dist/runtime/components/builtins/FavoriteNumber.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/InformedConsentModal.d.vue.ts +28 -0
- package/dist/runtime/components/builtins/InformedConsentModal.vue +82 -0
- package/dist/runtime/components/builtins/InformedConsentModal.vue.d.ts +28 -0
- package/dist/runtime/components/builtins/InformedConsentView.d.vue.ts +13 -0
- package/dist/runtime/components/builtins/InformedConsentView.vue +127 -0
- package/dist/runtime/components/builtins/InformedConsentView.vue.d.ts +13 -0
- package/dist/runtime/components/builtins/InstructionsQuiz.d.vue.ts +36 -0
- package/dist/runtime/components/builtins/InstructionsQuiz.vue +274 -0
- package/dist/runtime/components/builtins/InstructionsQuiz.vue.d.ts +36 -0
- package/dist/runtime/components/builtins/InstructionsView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/InstructionsView.vue +58 -0
- package/dist/runtime/components/builtins/InstructionsView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/MTurkRecruitView.d.vue.ts +21 -0
- package/dist/runtime/components/builtins/MTurkRecruitView.vue +137 -0
- package/dist/runtime/components/builtins/MTurkRecruitView.vue.d.ts +21 -0
- package/dist/runtime/components/builtins/PresentationModeView.d.vue.ts +93 -0
- package/dist/runtime/components/builtins/PresentationModeView.vue +254 -0
- package/dist/runtime/components/builtins/PresentationModeView.vue.d.ts +93 -0
- package/dist/runtime/components/builtins/StatusBar.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/StatusBar.vue +128 -0
- package/dist/runtime/components/builtins/StatusBar.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/StudyPreviewText.d.vue.ts +21 -0
- package/dist/runtime/components/builtins/StudyPreviewText.vue +102 -0
- package/dist/runtime/components/builtins/StudyPreviewText.vue.d.ts +21 -0
- package/dist/runtime/components/builtins/TaskFeedbackSurveyView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/TaskFeedbackSurveyView.vue +203 -0
- package/dist/runtime/components/builtins/TaskFeedbackSurveyView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/ThanksView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/ThanksView.vue +451 -0
- package/dist/runtime/components/builtins/ThanksView.vue.d.ts +3 -0
- package/dist/runtime/components/builtins/WindowSizerView.d.vue.ts +7 -0
- package/dist/runtime/components/builtins/WindowSizerView.vue +94 -0
- package/dist/runtime/components/builtins/WindowSizerView.vue.d.ts +7 -0
- package/dist/runtime/components/builtins/WithdrawModal.d.vue.ts +56 -0
- package/dist/runtime/components/builtins/WithdrawModal.vue +208 -0
- package/dist/runtime/components/builtins/WithdrawModal.vue.d.ts +56 -0
- package/dist/runtime/components/builtins/WithdrawView.d.vue.ts +3 -0
- package/dist/runtime/components/builtins/WithdrawView.vue +99 -0
- package/dist/runtime/components/builtins/WithdrawView.vue.d.ts +3 -0
- package/dist/runtime/components/dev/RecruitmentChooserView.d.vue.ts +3 -0
- package/dist/runtime/components/dev/RecruitmentChooserView.vue +258 -0
- package/dist/runtime/components/dev/RecruitmentChooserView.vue.d.ts +3 -0
- package/dist/runtime/components/dev/ResponsiveDeviceContainer.d.vue.ts +12 -0
- package/dist/runtime/components/dev/ResponsiveDeviceContainer.vue +215 -0
- package/dist/runtime/components/dev/ResponsiveDeviceContainer.vue.d.ts +12 -0
- package/dist/runtime/components/dev/console/ConfigList.d.vue.ts +26 -0
- package/dist/runtime/components/dev/console/ConfigList.vue +106 -0
- package/dist/runtime/components/dev/console/ConfigList.vue.d.ts +26 -0
- package/dist/runtime/components/dev/console/ConsoleConfigPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/console/ConsoleConfigPanel.vue +135 -0
- package/dist/runtime/components/dev/console/ConsoleConfigPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/console/ConsoleDatabaseBrowsePanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/console/ConsoleDatabaseBrowsePanel.vue +124 -0
- package/dist/runtime/components/dev/console/ConsoleDatabaseBrowsePanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/console/ConsoleLogPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/console/ConsoleLogPanel.vue +227 -0
- package/dist/runtime/components/dev/console/ConsoleLogPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/console/DatabaseList.d.vue.ts +26 -0
- package/dist/runtime/components/dev/console/DatabaseList.vue +110 -0
- package/dist/runtime/components/dev/console/DatabaseList.vue.d.ts +26 -0
- package/dist/runtime/components/dev/console/SmileDevConsole.d.vue.ts +3 -0
- package/dist/runtime/components/dev/console/SmileDevConsole.vue +117 -0
- package/dist/runtime/components/dev/console/SmileDevConsole.vue.d.ts +3 -0
- package/dist/runtime/components/dev/devicePresets.d.ts +91 -0
- package/dist/runtime/components/dev/devicePresets.js +40 -0
- package/dist/runtime/components/dev/menu/DevConfigPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/menu/DevConfigPanel.vue +178 -0
- package/dist/runtime/components/dev/menu/DevConfigPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/menu/ResponsiveDeviceSelect.d.vue.ts +3 -0
- package/dist/runtime/components/dev/menu/ResponsiveDeviceSelect.vue +108 -0
- package/dist/runtime/components/dev/menu/ResponsiveDeviceSelect.vue.d.ts +3 -0
- package/dist/runtime/components/dev/menu/SmileDevAppMenu.d.vue.ts +62 -0
- package/dist/runtime/components/dev/menu/SmileDevAppMenu.vue +184 -0
- package/dist/runtime/components/dev/menu/SmileDevAppMenu.vue.d.ts +62 -0
- package/dist/runtime/components/dev/navbar/CircleProgress.d.vue.ts +15 -0
- package/dist/runtime/components/dev/navbar/CircleProgress.vue +26 -0
- package/dist/runtime/components/dev/navbar/CircleProgress.vue.d.ts +15 -0
- package/dist/runtime/components/dev/navbar/ColorModeButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/ColorModeButton.vue +33 -0
- package/dist/runtime/components/dev/navbar/ColorModeButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/DatabaseButtonGroup.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/DatabaseButtonGroup.vue +86 -0
- package/dist/runtime/components/dev/navbar/DatabaseButtonGroup.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/FullScreenButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/FullScreenButton.vue +35 -0
- package/dist/runtime/components/dev/navbar/FullScreenButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/KeyCommandNotification.d.vue.ts +41 -0
- package/dist/runtime/components/dev/navbar/KeyCommandNotification.vue +58 -0
- package/dist/runtime/components/dev/navbar/KeyCommandNotification.vue.d.ts +41 -0
- package/dist/runtime/components/dev/navbar/ReloadButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/ReloadButton.vue +23 -0
- package/dist/runtime/components/dev/navbar/ReloadButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/ResetButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/ResetButton.vue +23 -0
- package/dist/runtime/components/dev/navbar/ResetButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/RouteJumper.d.vue.ts +7 -0
- package/dist/runtime/components/dev/navbar/RouteJumper.vue +90 -0
- package/dist/runtime/components/dev/navbar/RouteJumper.vue.d.ts +7 -0
- package/dist/runtime/components/dev/navbar/SmileDevNavBar.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/SmileDevNavBar.vue +248 -0
- package/dist/runtime/components/dev/navbar/SmileDevNavBar.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/StepInfoButtonGroup.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/StepInfoButtonGroup.vue +63 -0
- package/dist/runtime/components/dev/navbar/StepInfoButtonGroup.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/ViewButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/ViewButton.vue +159 -0
- package/dist/runtime/components/dev/navbar/ViewButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/ViewInfoButtonGroup.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/ViewInfoButtonGroup.vue +147 -0
- package/dist/runtime/components/dev/navbar/ViewInfoButtonGroup.vue.d.ts +3 -0
- package/dist/runtime/components/dev/presentation/DarkModeButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/presentation/DarkModeButton.vue +43 -0
- package/dist/runtime/components/dev/presentation/DarkModeButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/presentation/LogoutButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/presentation/LogoutButton.vue +38 -0
- package/dist/runtime/components/dev/presentation/LogoutButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/presentation/PresentationModeResetButton.d.vue.ts +7 -0
- package/dist/runtime/components/dev/presentation/PresentationModeResetButton.vue +25 -0
- package/dist/runtime/components/dev/presentation/PresentationModeResetButton.vue.d.ts +7 -0
- package/dist/runtime/components/dev/presentation/PresentationNavBar.d.vue.ts +3 -0
- package/dist/runtime/components/dev/presentation/PresentationNavBar.vue +70 -0
- package/dist/runtime/components/dev/presentation/PresentationNavBar.vue.d.ts +3 -0
- package/dist/runtime/components/dev/presentation/QRCodeButton.d.vue.ts +3 -0
- package/dist/runtime/components/dev/presentation/QRCodeButton.vue +66 -0
- package/dist/runtime/components/dev/presentation/QRCodeButton.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/AppProgressPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/AppProgressPanel.vue +125 -0
- package/dist/runtime/components/dev/sidebar/AppProgressPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/ConfigurationVariablesPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/ConfigurationVariablesPanel.vue +219 -0
- package/dist/runtime/components/dev/sidebar/ConfigurationVariablesPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/DatabaseStatusInfoPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/DatabaseStatusInfoPanel.vue +117 -0
- package/dist/runtime/components/dev/sidebar/DatabaseStatusInfoPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/RandomizationSidebarPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/RandomizationSidebarPanel.vue +151 -0
- package/dist/runtime/components/dev/sidebar/RandomizationSidebarPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/SmileDevSideBar.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/SmileDevSideBar.vue +70 -0
- package/dist/runtime/components/dev/sidebar/SmileDevSideBar.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/StepDataViewer.d.vue.ts +22 -0
- package/dist/runtime/components/dev/sidebar/StepDataViewer.vue +82 -0
- package/dist/runtime/components/dev/sidebar/StepDataViewer.vue.d.ts +22 -0
- package/dist/runtime/components/dev/sidebar/StepExplorerPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/StepExplorerPanel.vue +318 -0
- package/dist/runtime/components/dev/sidebar/StepExplorerPanel.vue.d.ts +3 -0
- package/dist/runtime/components/dev/sidebar/StepNode.d.vue.ts +84 -0
- package/dist/runtime/components/dev/sidebar/StepNode.vue +95 -0
- package/dist/runtime/components/dev/sidebar/StepNode.vue.d.ts +84 -0
- package/dist/runtime/components/dev/sidebar/StudyInfoPanel.d.vue.ts +3 -0
- package/dist/runtime/components/dev/sidebar/StudyInfoPanel.vue +17 -0
- package/dist/runtime/components/dev/sidebar/StudyInfoPanel.vue.d.ts +3 -0
- package/dist/runtime/components/forms/MonthYearDayPicker.d.vue.ts +240 -0
- package/dist/runtime/components/forms/MonthYearDayPicker.vue +191 -0
- package/dist/runtime/components/forms/MonthYearDayPicker.vue.d.ts +240 -0
- package/dist/runtime/components/layouts/CenteredContent.d.vue.ts +22 -0
- package/dist/runtime/components/layouts/CenteredContent.vue +14 -0
- package/dist/runtime/components/layouts/CenteredContent.vue.d.ts +22 -0
- package/dist/runtime/components/layouts/ConstrainedPage.d.vue.ts +55 -0
- package/dist/runtime/components/layouts/ConstrainedPage.vue +56 -0
- package/dist/runtime/components/layouts/ConstrainedPage.vue.d.ts +55 -0
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.d.vue.ts +66 -0
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.vue +73 -0
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.vue.d.ts +66 -0
- package/dist/runtime/components/layouts/TitleTwoCol.d.vue.ts +61 -0
- package/dist/runtime/components/layouts/TitleTwoCol.vue +54 -0
- package/dist/runtime/components/layouts/TitleTwoCol.vue.d.ts +61 -0
- package/dist/runtime/components/layouts/TwoCol.d.vue.ts +59 -0
- package/dist/runtime/components/layouts/TwoCol.vue +51 -0
- package/dist/runtime/components/layouts/TwoCol.vue.d.ts +59 -0
- package/dist/runtime/components/layouts/index.d.ts +1 -0
- package/dist/runtime/components/layouts/index.js +5 -0
- package/dist/runtime/components/layouts/layoutUtils.d.ts +1 -0
- package/dist/runtime/components/layouts/layoutUtils.js +27 -0
- package/dist/runtime/components/ui/avatar/Avatar.d.vue.ts +20 -0
- package/dist/runtime/components/ui/avatar/Avatar.vue +15 -0
- package/dist/runtime/components/ui/avatar/Avatar.vue.d.ts +20 -0
- package/dist/runtime/components/ui/avatar/AvatarFallback.d.vue.ts +46 -0
- package/dist/runtime/components/ui/avatar/AvatarFallback.vue +21 -0
- package/dist/runtime/components/ui/avatar/AvatarFallback.vue.d.ts +46 -0
- package/dist/runtime/components/ui/avatar/AvatarImage.d.vue.ts +54 -0
- package/dist/runtime/components/ui/avatar/AvatarImage.vue +20 -0
- package/dist/runtime/components/ui/avatar/AvatarImage.vue.d.ts +54 -0
- package/dist/runtime/components/ui/avatar/index.d.ts +1 -0
- package/dist/runtime/components/ui/avatar/index.js +3 -0
- package/dist/runtime/components/ui/badge/Badge.d.vue.ts +46 -0
- package/dist/runtime/components/ui/badge/Badge.vue +22 -0
- package/dist/runtime/components/ui/badge/Badge.vue.d.ts +46 -0
- package/dist/runtime/components/ui/badge/index.d.ts +4 -0
- package/dist/runtime/components/ui/badge/index.js +21 -0
- package/dist/runtime/components/ui/breadcrumb/Breadcrumb.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/Breadcrumb.vue +15 -0
- package/dist/runtime/components/ui/breadcrumb/Breadcrumb.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbItem.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbItem.vue +14 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbItem.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbLink.d.vue.ts +41 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbLink.vue +19 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbLink.vue.d.ts +41 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbList.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbList.vue +14 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbList.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbPage.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbPage.vue +17 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbPage.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.d.vue.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue +19 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue.d.ts +20 -0
- package/dist/runtime/components/ui/breadcrumb/index.d.ts +1 -0
- package/dist/runtime/components/ui/breadcrumb/index.js +7 -0
- package/dist/runtime/components/ui/button/Button.d.vue.ts +57 -0
- package/dist/runtime/components/ui/button/Button.vue +22 -0
- package/dist/runtime/components/ui/button/Button.vue.d.ts +57 -0
- package/dist/runtime/components/ui/button/index.d.ts +5 -0
- package/dist/runtime/components/ui/button/index.js +60 -0
- package/dist/runtime/components/ui/button-group/ButtonGroup.d.vue.ts +85 -0
- package/dist/runtime/components/ui/button-group/ButtonGroup.vue +33 -0
- package/dist/runtime/components/ui/button-group/ButtonGroup.vue.d.ts +85 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupItem.d.vue.ts +66 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupItem.vue +38 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupItem.vue.d.ts +66 -0
- package/dist/runtime/components/ui/button-group/index.d.ts +1 -0
- package/dist/runtime/components/ui/button-group/index.js +2 -0
- package/dist/runtime/components/ui/calendar/Calendar.d.vue.ts +237 -0
- package/dist/runtime/components/ui/calendar/Calendar.vue +103 -0
- package/dist/runtime/components/ui/calendar/Calendar.vue.d.ts +237 -0
- package/dist/runtime/components/ui/calendar/CalendarCell.d.vue.ts +46 -0
- package/dist/runtime/components/ui/calendar/CalendarCell.vue +27 -0
- package/dist/runtime/components/ui/calendar/CalendarCell.vue.d.ts +46 -0
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.d.vue.ts +57 -0
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue +39 -0
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue.d.ts +57 -0
- package/dist/runtime/components/ui/calendar/CalendarGrid.d.vue.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarGrid.vue +21 -0
- package/dist/runtime/components/ui/calendar/CalendarGrid.vue.d.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarGridBody.d.vue.ts +30 -0
- package/dist/runtime/components/ui/calendar/CalendarGridBody.vue +16 -0
- package/dist/runtime/components/ui/calendar/CalendarGridBody.vue.d.ts +30 -0
- package/dist/runtime/components/ui/calendar/CalendarGridHead.d.vue.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarGridHead.vue +17 -0
- package/dist/runtime/components/ui/calendar/CalendarGridHead.vue.d.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarGridRow.d.vue.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarGridRow.vue +21 -0
- package/dist/runtime/components/ui/calendar/CalendarGridRow.vue.d.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarHeadCell.d.vue.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarHeadCell.vue +21 -0
- package/dist/runtime/components/ui/calendar/CalendarHeadCell.vue.d.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarHeader.d.vue.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarHeader.vue +21 -0
- package/dist/runtime/components/ui/calendar/CalendarHeader.vue.d.ts +38 -0
- package/dist/runtime/components/ui/calendar/CalendarHeading.d.vue.ts +35 -0
- package/dist/runtime/components/ui/calendar/CalendarHeading.vue +25 -0
- package/dist/runtime/components/ui/calendar/CalendarHeading.vue.d.ts +35 -0
- package/dist/runtime/components/ui/calendar/CalendarNextButton.d.vue.ts +46 -0
- package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +33 -0
- package/dist/runtime/components/ui/calendar/CalendarNextButton.vue.d.ts +46 -0
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.d.vue.ts +46 -0
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +33 -0
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue.d.ts +46 -0
- package/dist/runtime/components/ui/calendar/index.d.ts +12 -0
- package/dist/runtime/components/ui/calendar/index.js +12 -0
- package/dist/runtime/components/ui/card/Card.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/Card.vue +14 -0
- package/dist/runtime/components/ui/card/Card.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardAction.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardAction.vue +14 -0
- package/dist/runtime/components/ui/card/CardAction.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardContent.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardContent.vue +14 -0
- package/dist/runtime/components/ui/card/CardContent.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardDescription.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardDescription.vue +14 -0
- package/dist/runtime/components/ui/card/CardDescription.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardFooter.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardFooter.vue +14 -0
- package/dist/runtime/components/ui/card/CardFooter.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardHeader.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardHeader.vue +19 -0
- package/dist/runtime/components/ui/card/CardHeader.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/CardTitle.d.vue.ts +20 -0
- package/dist/runtime/components/ui/card/CardTitle.vue +14 -0
- package/dist/runtime/components/ui/card/CardTitle.vue.d.ts +20 -0
- package/dist/runtime/components/ui/card/index.d.ts +1 -0
- package/dist/runtime/components/ui/card/index.js +7 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.d.vue.ts +122 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.vue +51 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.vue.d.ts +122 -0
- package/dist/runtime/components/ui/checkbox/index.d.ts +5 -0
- package/dist/runtime/components/ui/checkbox/index.js +35 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenu.d.vue.ts +52 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenu.vue +20 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +52 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.d.vue.ts +69 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +36 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +69 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.d.vue.ts +195 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue +46 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +195 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuGroup.d.vue.ts +30 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuGroup.vue +16 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +30 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.d.vue.ts +75 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue +32 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +75 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.d.vue.ts +47 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +47 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioGroup.d.vue.ts +42 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +19 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +42 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.d.vue.ts +67 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +36 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +67 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.d.vue.ts +31 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.vue +18 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +31 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.d.vue.ts +20 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.vue +14 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +20 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSub.d.vue.ts +35 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSub.vue +18 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +35 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.d.vue.ts +180 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue +50 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +180 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.d.vue.ts +64 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +64 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuTrigger.d.vue.ts +39 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuTrigger.vue +18 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +39 -0
- package/dist/runtime/components/ui/dropdown-menu/index.d.ts +1 -0
- package/dist/runtime/components/ui/dropdown-menu/index.js +16 -0
- package/dist/runtime/components/ui/input/Input.d.vue.ts +33 -0
- package/dist/runtime/components/ui/input/Input.vue +28 -0
- package/dist/runtime/components/ui/input/Input.vue.d.ts +33 -0
- package/dist/runtime/components/ui/input/index.d.ts +1 -0
- package/dist/runtime/components/ui/input/index.js +1 -0
- package/dist/runtime/components/ui/label/Label.d.vue.ts +46 -0
- package/dist/runtime/components/ui/label/Label.vue +26 -0
- package/dist/runtime/components/ui/label/Label.vue.d.ts +46 -0
- package/dist/runtime/components/ui/label/index.d.ts +1 -0
- package/dist/runtime/components/ui/label/index.js +1 -0
- package/dist/runtime/components/ui/multiselect/MultiSelect.d.vue.ts +80 -0
- package/dist/runtime/components/ui/multiselect/MultiSelect.vue +98 -0
- package/dist/runtime/components/ui/multiselect/MultiSelect.vue.d.ts +80 -0
- package/dist/runtime/components/ui/multiselect/index.d.ts +1 -0
- package/dist/runtime/components/ui/multiselect/index.js +1 -0
- package/dist/runtime/components/ui/pagination/Pagination.d.vue.ts +103 -0
- package/dist/runtime/components/ui/pagination/Pagination.vue +30 -0
- package/dist/runtime/components/ui/pagination/Pagination.vue.d.ts +103 -0
- package/dist/runtime/components/ui/pagination/PaginationContent.d.vue.ts +45 -0
- package/dist/runtime/components/ui/pagination/PaginationContent.vue +21 -0
- package/dist/runtime/components/ui/pagination/PaginationContent.vue.d.ts +45 -0
- package/dist/runtime/components/ui/pagination/PaginationEllipsis.d.vue.ts +38 -0
- package/dist/runtime/components/ui/pagination/PaginationEllipsis.vue +24 -0
- package/dist/runtime/components/ui/pagination/PaginationEllipsis.vue.d.ts +38 -0
- package/dist/runtime/components/ui/pagination/PaginationFirst.d.vue.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationFirst.vue +27 -0
- package/dist/runtime/components/ui/pagination/PaginationFirst.vue.d.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationItem.d.vue.ts +66 -0
- package/dist/runtime/components/ui/pagination/PaginationItem.vue +32 -0
- package/dist/runtime/components/ui/pagination/PaginationItem.vue.d.ts +66 -0
- package/dist/runtime/components/ui/pagination/PaginationLast.d.vue.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationLast.vue +27 -0
- package/dist/runtime/components/ui/pagination/PaginationLast.vue.d.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationNext.d.vue.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationNext.vue +27 -0
- package/dist/runtime/components/ui/pagination/PaginationNext.vue.d.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationPrevious.d.vue.ts +49 -0
- package/dist/runtime/components/ui/pagination/PaginationPrevious.vue +27 -0
- package/dist/runtime/components/ui/pagination/PaginationPrevious.vue.d.ts +49 -0
- package/dist/runtime/components/ui/pagination/index.d.ts +1 -0
- package/dist/runtime/components/ui/pagination/index.js +8 -0
- package/dist/runtime/components/ui/popover/Popover.d.vue.ts +44 -0
- package/dist/runtime/components/ui/popover/Popover.vue +19 -0
- package/dist/runtime/components/ui/popover/Popover.vue.d.ts +44 -0
- package/dist/runtime/components/ui/popover/PopoverAnchor.d.vue.ts +38 -0
- package/dist/runtime/components/ui/popover/PopoverAnchor.vue +17 -0
- package/dist/runtime/components/ui/popover/PopoverAnchor.vue.d.ts +38 -0
- package/dist/runtime/components/ui/popover/PopoverContent.d.vue.ts +200 -0
- package/dist/runtime/components/ui/popover/PopoverContent.vue +56 -0
- package/dist/runtime/components/ui/popover/PopoverContent.vue.d.ts +200 -0
- package/dist/runtime/components/ui/popover/PopoverTrigger.d.vue.ts +30 -0
- package/dist/runtime/components/ui/popover/PopoverTrigger.vue +16 -0
- package/dist/runtime/components/ui/popover/PopoverTrigger.vue.d.ts +30 -0
- package/dist/runtime/components/ui/popover/index.d.ts +1 -0
- package/dist/runtime/components/ui/popover/index.js +4 -0
- package/dist/runtime/components/ui/progress/Progress.d.vue.ts +66 -0
- package/dist/runtime/components/ui/progress/Progress.vue +28 -0
- package/dist/runtime/components/ui/progress/Progress.vue.d.ts +66 -0
- package/dist/runtime/components/ui/progress/index.d.ts +1 -0
- package/dist/runtime/components/ui/progress/index.js +1 -0
- package/dist/runtime/components/ui/resizable/ResizableHandle.d.vue.ts +77 -0
- package/dist/runtime/components/ui/resizable/ResizableHandle.vue +37 -0
- package/dist/runtime/components/ui/resizable/ResizableHandle.vue.d.ts +77 -0
- package/dist/runtime/components/ui/resizable/ResizablePanel.d.vue.ts +101 -0
- package/dist/runtime/components/ui/resizable/ResizablePanel.vue +50 -0
- package/dist/runtime/components/ui/resizable/ResizablePanel.vue.d.ts +101 -0
- package/dist/runtime/components/ui/resizable/ResizablePanelGroup.d.vue.ts +82 -0
- package/dist/runtime/components/ui/resizable/ResizablePanelGroup.vue +27 -0
- package/dist/runtime/components/ui/resizable/ResizablePanelGroup.vue.d.ts +82 -0
- package/dist/runtime/components/ui/resizable/index.d.ts +1 -0
- package/dist/runtime/components/ui/resizable/index.js +3 -0
- package/dist/runtime/components/ui/select/Select.d.vue.ts +112 -0
- package/dist/runtime/components/ui/select/Select.vue +27 -0
- package/dist/runtime/components/ui/select/Select.vue.d.ts +112 -0
- package/dist/runtime/components/ui/select/SelectContent.d.vue.ts +199 -0
- package/dist/runtime/components/ui/select/SelectContent.vue +65 -0
- package/dist/runtime/components/ui/select/SelectContent.vue.d.ts +199 -0
- package/dist/runtime/components/ui/select/SelectGroup.d.vue.ts +30 -0
- package/dist/runtime/components/ui/select/SelectGroup.vue +16 -0
- package/dist/runtime/components/ui/select/SelectGroup.vue.d.ts +30 -0
- package/dist/runtime/components/ui/select/SelectItem.d.vue.ts +63 -0
- package/dist/runtime/components/ui/select/SelectItem.vue +38 -0
- package/dist/runtime/components/ui/select/SelectItem.vue.d.ts +63 -0
- package/dist/runtime/components/ui/select/SelectItemText.d.vue.ts +30 -0
- package/dist/runtime/components/ui/select/SelectItemText.vue +16 -0
- package/dist/runtime/components/ui/select/SelectItemText.vue.d.ts +30 -0
- package/dist/runtime/components/ui/select/SelectLabel.d.vue.ts +46 -0
- package/dist/runtime/components/ui/select/SelectLabel.vue +18 -0
- package/dist/runtime/components/ui/select/SelectLabel.vue.d.ts +46 -0
- package/dist/runtime/components/ui/select/SelectScrollDownButton.d.vue.ts +38 -0
- package/dist/runtime/components/ui/select/SelectScrollDownButton.vue +24 -0
- package/dist/runtime/components/ui/select/SelectScrollDownButton.vue.d.ts +38 -0
- package/dist/runtime/components/ui/select/SelectScrollUpButton.d.vue.ts +38 -0
- package/dist/runtime/components/ui/select/SelectScrollUpButton.vue +24 -0
- package/dist/runtime/components/ui/select/SelectScrollUpButton.vue.d.ts +38 -0
- package/dist/runtime/components/ui/select/SelectSeparator.d.vue.ts +31 -0
- package/dist/runtime/components/ui/select/SelectSeparator.vue +18 -0
- package/dist/runtime/components/ui/select/SelectSeparator.vue.d.ts +31 -0
- package/dist/runtime/components/ui/select/SelectTrigger.d.vue.ts +66 -0
- package/dist/runtime/components/ui/select/SelectTrigger.vue +34 -0
- package/dist/runtime/components/ui/select/SelectTrigger.vue.d.ts +66 -0
- package/dist/runtime/components/ui/select/SelectValue.d.vue.ts +38 -0
- package/dist/runtime/components/ui/select/SelectValue.vue +17 -0
- package/dist/runtime/components/ui/select/SelectValue.vue.d.ts +38 -0
- package/dist/runtime/components/ui/select/index.d.ts +11 -0
- package/dist/runtime/components/ui/select/index.js +11 -0
- package/dist/runtime/components/ui/separator/Separator.d.vue.ts +53 -0
- package/dist/runtime/components/ui/separator/Separator.vue +25 -0
- package/dist/runtime/components/ui/separator/Separator.vue.d.ts +53 -0
- package/dist/runtime/components/ui/separator/index.d.ts +1 -0
- package/dist/runtime/components/ui/separator/index.js +1 -0
- package/dist/runtime/components/ui/sheet/Sheet.d.vue.ts +44 -0
- package/dist/runtime/components/ui/sheet/Sheet.vue +19 -0
- package/dist/runtime/components/ui/sheet/Sheet.vue.d.ts +44 -0
- package/dist/runtime/components/ui/sheet/SheetClose.d.vue.ts +30 -0
- package/dist/runtime/components/ui/sheet/SheetClose.vue +16 -0
- package/dist/runtime/components/ui/sheet/SheetClose.vue.d.ts +30 -0
- package/dist/runtime/components/ui/sheet/SheetContent.d.vue.ts +90 -0
- package/dist/runtime/components/ui/sheet/SheetContent.vue +61 -0
- package/dist/runtime/components/ui/sheet/SheetContent.vue.d.ts +90 -0
- package/dist/runtime/components/ui/sheet/SheetDescription.d.vue.ts +38 -0
- package/dist/runtime/components/ui/sheet/SheetDescription.vue +20 -0
- package/dist/runtime/components/ui/sheet/SheetDescription.vue.d.ts +38 -0
- package/dist/runtime/components/ui/sheet/SheetFooter.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sheet/SheetFooter.vue +14 -0
- package/dist/runtime/components/ui/sheet/SheetFooter.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sheet/SheetHeader.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sheet/SheetHeader.vue +14 -0
- package/dist/runtime/components/ui/sheet/SheetHeader.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sheet/SheetOverlay.d.vue.ts +47 -0
- package/dist/runtime/components/ui/sheet/SheetOverlay.vue +26 -0
- package/dist/runtime/components/ui/sheet/SheetOverlay.vue.d.ts +47 -0
- package/dist/runtime/components/ui/sheet/SheetTitle.d.vue.ts +38 -0
- package/dist/runtime/components/ui/sheet/SheetTitle.vue +20 -0
- package/dist/runtime/components/ui/sheet/SheetTitle.vue.d.ts +38 -0
- package/dist/runtime/components/ui/sheet/SheetTrigger.d.vue.ts +30 -0
- package/dist/runtime/components/ui/sheet/SheetTrigger.vue +16 -0
- package/dist/runtime/components/ui/sheet/SheetTrigger.vue.d.ts +30 -0
- package/dist/runtime/components/ui/sheet/index.d.ts +1 -0
- package/dist/runtime/components/ui/sheet/index.js +8 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.d.vue.ts +58 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.vue +97 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.vue.d.ts +58 -0
- package/dist/runtime/components/ui/sidebar/SidebarContent.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarContent.vue +17 -0
- package/dist/runtime/components/ui/sidebar/SidebarContent.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarFooter.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarFooter.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarFooter.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroup.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroup.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroup.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupAction.d.vue.ts +38 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue +27 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue.d.ts +38 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupContent.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.d.vue.ts +38 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue +26 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +38 -0
- package/dist/runtime/components/ui/sidebar/SidebarHeader.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarHeader.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarHeader.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarInput.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarInput.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarInput.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarInset.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarInset.vue +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarInset.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenu.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenu.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenu.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.d.vue.ts +50 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue +33 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue.d.ts +50 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue +25 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.d.vue.ts +82 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue +49 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue.d.ts +82 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.d.vue.ts +72 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue +27 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +72 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuItem.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.d.vue.ts +23 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue +30 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue.d.ts +23 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSub.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue +21 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.d.vue.ts +61 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue +33 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +61 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarProvider.d.vue.ts +47 -0
- package/dist/runtime/components/ui/sidebar/SidebarProvider.vue +67 -0
- package/dist/runtime/components/ui/sidebar/SidebarProvider.vue.d.ts +47 -0
- package/dist/runtime/components/ui/sidebar/SidebarRail.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarRail.vue +31 -0
- package/dist/runtime/components/ui/sidebar/SidebarRail.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarSeparator.d.vue.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue +15 -0
- package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue.d.ts +20 -0
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.d.vue.ts +13 -0
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +22 -0
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue.d.ts +13 -0
- package/dist/runtime/components/ui/sidebar/index.d.ts +28 -0
- package/dist/runtime/components/ui/sidebar/index.js +49 -0
- package/dist/runtime/components/ui/sidebar/utils.d.ts +8 -0
- package/dist/runtime/components/ui/sidebar/utils.js +10 -0
- package/dist/runtime/components/ui/skeleton/Skeleton.d.vue.ts +13 -0
- package/dist/runtime/components/ui/skeleton/Skeleton.vue +12 -0
- package/dist/runtime/components/ui/skeleton/Skeleton.vue.d.ts +13 -0
- package/dist/runtime/components/ui/skeleton/index.d.ts +1 -0
- package/dist/runtime/components/ui/skeleton/index.js +1 -0
- package/dist/runtime/components/ui/sonner/Sonner.d.vue.ts +162 -0
- package/dist/runtime/components/ui/sonner/Sonner.vue +36 -0
- package/dist/runtime/components/ui/sonner/Sonner.vue.d.ts +162 -0
- package/dist/runtime/components/ui/sonner/index.d.ts +1 -0
- package/dist/runtime/components/ui/sonner/index.js +1 -0
- package/dist/runtime/components/ui/stepper/Stepper.d.vue.ts +95 -0
- package/dist/runtime/components/ui/stepper/Stepper.vue +27 -0
- package/dist/runtime/components/ui/stepper/Stepper.vue.d.ts +95 -0
- package/dist/runtime/components/ui/stepper/StepperDescription.d.vue.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperDescription.vue +21 -0
- package/dist/runtime/components/ui/stepper/StepperDescription.vue.d.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperIndicator.d.vue.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperIndicator.vue +31 -0
- package/dist/runtime/components/ui/stepper/StepperIndicator.vue.d.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperItem.d.vue.ts +78 -0
- package/dist/runtime/components/ui/stepper/StepperItem.vue +42 -0
- package/dist/runtime/components/ui/stepper/StepperItem.vue.d.ts +78 -0
- package/dist/runtime/components/ui/stepper/StepperSeparator.d.vue.ts +48 -0
- package/dist/runtime/components/ui/stepper/StepperSeparator.vue +29 -0
- package/dist/runtime/components/ui/stepper/StepperSeparator.vue.d.ts +48 -0
- package/dist/runtime/components/ui/stepper/StepperTitle.d.vue.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperTitle.vue +20 -0
- package/dist/runtime/components/ui/stepper/StepperTitle.vue.d.ts +38 -0
- package/dist/runtime/components/ui/stepper/StepperTrigger.d.vue.ts +48 -0
- package/dist/runtime/components/ui/stepper/StepperTrigger.vue +37 -0
- package/dist/runtime/components/ui/stepper/StepperTrigger.vue.d.ts +48 -0
- package/dist/runtime/components/ui/stepper/index.d.ts +1 -0
- package/dist/runtime/components/ui/stepper/index.js +7 -0
- package/dist/runtime/components/ui/switch/Switch.d.vue.ts +123 -0
- package/dist/runtime/components/ui/switch/Switch.vue +69 -0
- package/dist/runtime/components/ui/switch/Switch.vue.d.ts +123 -0
- package/dist/runtime/components/ui/switch/index.d.ts +5 -0
- package/dist/runtime/components/ui/switch/index.js +33 -0
- package/dist/runtime/components/ui/table/Table.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/Table.vue +19 -0
- package/dist/runtime/components/ui/table/Table.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableBody.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableBody.vue +14 -0
- package/dist/runtime/components/ui/table/TableBody.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableCaption.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableCaption.vue +14 -0
- package/dist/runtime/components/ui/table/TableCaption.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableCell.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableCell.vue +19 -0
- package/dist/runtime/components/ui/table/TableCell.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableEmpty.d.vue.ts +32 -0
- package/dist/runtime/components/ui/table/TableEmpty.vue +23 -0
- package/dist/runtime/components/ui/table/TableEmpty.vue.d.ts +32 -0
- package/dist/runtime/components/ui/table/TableFooter.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableFooter.vue +14 -0
- package/dist/runtime/components/ui/table/TableFooter.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableHead.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableHead.vue +19 -0
- package/dist/runtime/components/ui/table/TableHead.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableHeader.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableHeader.vue +14 -0
- package/dist/runtime/components/ui/table/TableHeader.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/TableRow.d.vue.ts +20 -0
- package/dist/runtime/components/ui/table/TableRow.vue +14 -0
- package/dist/runtime/components/ui/table/TableRow.vue.d.ts +20 -0
- package/dist/runtime/components/ui/table/index.d.ts +1 -0
- package/dist/runtime/components/ui/table/index.js +9 -0
- package/dist/runtime/components/ui/table/utils.d.ts +1 -0
- package/dist/runtime/components/ui/table/utils.js +3 -0
- package/dist/runtime/components/ui/tabs/Tabs.d.vue.ts +91 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue +28 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue.d.ts +91 -0
- package/dist/runtime/components/ui/tabs/TabsContent.d.vue.ts +55 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue +22 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue.d.ts +55 -0
- package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +47 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue +26 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +47 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.d.vue.ts +55 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue +28 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue.d.ts +55 -0
- package/dist/runtime/components/ui/tabs/index.d.ts +1 -0
- package/dist/runtime/components/ui/tabs/index.js +4 -0
- package/dist/runtime/components/ui/tags-input/TagsInput.d.vue.ts +174 -0
- package/dist/runtime/components/ui/tags-input/TagsInput.vue +41 -0
- package/dist/runtime/components/ui/tags-input/TagsInput.vue.d.ts +174 -0
- package/dist/runtime/components/ui/tags-input/TagsInputInput.d.vue.ts +56 -0
- package/dist/runtime/components/ui/tags-input/TagsInputInput.vue +21 -0
- package/dist/runtime/components/ui/tags-input/TagsInputInput.vue.d.ts +56 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItem.d.vue.ts +55 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItem.vue +27 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItem.vue.d.ts +55 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.d.vue.ts +38 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.vue +23 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.vue.d.ts +38 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemText.d.vue.ts +31 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemText.vue +18 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemText.vue.d.ts +31 -0
- package/dist/runtime/components/ui/tags-input/index.d.ts +1 -0
- package/dist/runtime/components/ui/tags-input/index.js +5 -0
- package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +33 -0
- package/dist/runtime/components/ui/textarea/Textarea.vue +26 -0
- package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +33 -0
- package/dist/runtime/components/ui/textarea/index.d.ts +1 -0
- package/dist/runtime/components/ui/textarea/index.js +1 -0
- package/dist/runtime/components/ui/toggle/Toggle.d.vue.ts +114 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue +31 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue.d.ts +114 -0
- package/dist/runtime/components/ui/toggle/index.d.ts +5 -0
- package/dist/runtime/components/ui/toggle/index.js +24 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.d.vue.ts +144 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue +42 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue.d.ts +144 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.d.vue.ts +76 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.vue +40 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.vue.d.ts +76 -0
- package/dist/runtime/components/ui/toggle-group/index.d.ts +1 -0
- package/dist/runtime/components/ui/toggle-group/index.js +2 -0
- package/dist/runtime/components/ui/tooltip/Tooltip.d.vue.ts +79 -0
- package/dist/runtime/components/ui/tooltip/Tooltip.vue +23 -0
- package/dist/runtime/components/ui/tooltip/Tooltip.vue.d.ts +79 -0
- package/dist/runtime/components/ui/tooltip/TooltipContent.d.vue.ts +162 -0
- package/dist/runtime/components/ui/tooltip/TooltipContent.vue +50 -0
- package/dist/runtime/components/ui/tooltip/TooltipContent.vue.d.ts +162 -0
- package/dist/runtime/components/ui/tooltip/TooltipProvider.d.vue.ts +68 -0
- package/dist/runtime/components/ui/tooltip/TooltipProvider.vue +17 -0
- package/dist/runtime/components/ui/tooltip/TooltipProvider.vue.d.ts +68 -0
- package/dist/runtime/components/ui/tooltip/TooltipTrigger.d.vue.ts +38 -0
- package/dist/runtime/components/ui/tooltip/TooltipTrigger.vue +17 -0
- package/dist/runtime/components/ui/tooltip/TooltipTrigger.vue.d.ts +38 -0
- package/dist/runtime/components/ui/tooltip/index.d.ts +1 -0
- package/dist/runtime/components/ui/tooltip/index.js +4 -0
- package/dist/runtime/composables/useAPI.d.ts +463 -0
- package/dist/runtime/composables/useAPI.js +991 -0
- package/dist/runtime/composables/useColorMode.d.ts +19 -0
- package/dist/runtime/composables/useColorMode.js +292 -0
- package/dist/runtime/composables/useStepper.d.ts +19 -0
- package/dist/runtime/composables/useStepper.js +71 -0
- package/dist/runtime/composables/useTimeline.d.ts +6 -0
- package/dist/runtime/composables/useTimeline.js +188 -0
- package/dist/runtime/composables/useViewAPI.d.ts +513 -0
- package/dist/runtime/composables/useViewAPI.js +965 -0
- package/dist/runtime/core/config.d.ts +166 -0
- package/dist/runtime/core/config.js +118 -0
- package/dist/runtime/core/stepper/StepState.d.ts +332 -0
- package/dist/runtime/core/stepper/StepState.js +775 -0
- package/dist/runtime/core/stepper/Stepper.d.ts +165 -0
- package/dist/runtime/core/stepper/Stepper.js +618 -0
- package/dist/runtime/core/stepper/StepperProxy.d.ts +21 -0
- package/dist/runtime/core/stepper/StepperProxy.js +57 -0
- package/dist/runtime/core/stepper/StepperSerializer.d.ts +29 -0
- package/dist/runtime/core/stepper/StepperSerializer.js +234 -0
- package/dist/runtime/core/timeline/Timeline.d.ts +101 -0
- package/dist/runtime/core/timeline/Timeline.js +495 -0
- package/dist/runtime/css/main.css +1 -0
- package/dist/runtime/css/smile.css +1 -0
- package/dist/runtime/layouts/development.d.vue.ts +10 -0
- package/dist/runtime/layouts/development.vue +189 -0
- package/dist/runtime/layouts/development.vue.d.ts +10 -0
- package/dist/runtime/layouts/experiment.d.vue.ts +13 -0
- package/dist/runtime/layouts/experiment.vue +10 -0
- package/dist/runtime/layouts/experiment.vue.d.ts +13 -0
- package/dist/runtime/layouts/presentation.d.vue.ts +10 -0
- package/dist/runtime/layouts/presentation.vue +45 -0
- package/dist/runtime/layouts/presentation.vue.d.ts +10 -0
- package/dist/runtime/lib/utils.d.ts +1 -0
- package/dist/runtime/lib/utils.js +6 -0
- package/dist/runtime/middleware/timeline.global.d.ts +21 -0
- package/dist/runtime/middleware/timeline.global.js +422 -0
- package/dist/runtime/pages/[...slug].d.vue.ts +3 -0
- package/dist/runtime/pages/[...slug].vue +40 -0
- package/dist/runtime/pages/[...slug].vue.d.ts +3 -0
- package/dist/runtime/pages/dev/[...slug].d.vue.ts +3 -0
- package/dist/runtime/pages/dev/[...slug].vue +53 -0
- package/dist/runtime/pages/dev/[...slug].vue.d.ts +3 -0
- package/dist/runtime/pages/dev-login.d.vue.ts +3 -0
- package/dist/runtime/pages/dev-login.vue +56 -0
- package/dist/runtime/pages/dev-login.vue.d.ts +3 -0
- package/dist/runtime/pages/info.d.vue.ts +3 -0
- package/dist/runtime/pages/info.vue +462 -0
- package/dist/runtime/pages/info.vue.d.ts +3 -0
- package/dist/runtime/pages/presentation/[...slug].d.vue.ts +3 -0
- package/dist/runtime/pages/presentation/[...slug].vue +65 -0
- package/dist/runtime/pages/presentation/[...slug].vue.d.ts +3 -0
- package/dist/runtime/plugins/dev-sync.client.d.ts +2 -0
- package/dist/runtime/plugins/dev-sync.client.js +26 -0
- package/dist/runtime/plugins/seed.client.d.ts +2 -0
- package/dist/runtime/plugins/seed.client.js +44 -0
- package/dist/runtime/plugins/store-sync.client.d.ts +2 -0
- package/dist/runtime/plugins/store-sync.client.js +74 -0
- package/dist/runtime/plugins/timeline.client.d.ts +6 -0
- package/dist/runtime/plugins/timeline.client.js +10 -0
- package/dist/runtime/server/api/auth/login.post.d.ts +2 -0
- package/dist/runtime/server/api/auth/login.post.js +29 -0
- package/dist/runtime/server/api/auth/logout.post.d.ts +2 -0
- package/dist/runtime/server/api/auth/logout.post.js +12 -0
- package/dist/runtime/server/api/auth/session.get.d.ts +2 -0
- package/dist/runtime/server/api/auth/session.get.js +15 -0
- package/dist/runtime/server/api/participants/[id]/private.patch.d.ts +2 -0
- package/dist/runtime/server/api/participants/[id]/private.patch.js +20 -0
- package/dist/runtime/server/api/participants/[id]/private.post.d.ts +2 -0
- package/dist/runtime/server/api/participants/[id]/private.post.js +21 -0
- package/dist/runtime/server/api/participants/[id].get.d.ts +2 -0
- package/dist/runtime/server/api/participants/[id].get.js +15 -0
- package/dist/runtime/server/api/participants/[id].patch.d.ts +2 -0
- package/dist/runtime/server/api/participants/[id].patch.js +20 -0
- package/dist/runtime/server/api/participants/index.post.d.ts +2 -0
- package/dist/runtime/server/api/participants/index.post.js +17 -0
- package/dist/runtime/server/api/qr.get.d.ts +2 -0
- package/dist/runtime/server/api/qr.get.js +19 -0
- package/dist/runtime/server/database/schema.d.ts +235 -0
- package/dist/runtime/server/database/schema.js +19 -0
- package/dist/runtime/server/middleware/dev-auth.d.ts +2 -0
- package/dist/runtime/server/middleware/dev-auth.js +32 -0
- package/dist/runtime/server/plugins/migrate.d.ts +2 -0
- package/dist/runtime/server/plugins/migrate.js +30 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/server/utils/db.d.ts +3 -0
- package/dist/runtime/server/utils/db.js +21 -0
- package/dist/runtime/stores/log.d.ts +37 -0
- package/dist/runtime/stores/log.js +211 -0
- package/dist/runtime/stores/smilestore.d.ts +8234 -0
- package/dist/runtime/stores/smilestore.js +577 -0
- package/dist/runtime/utils/randomization.d.ts +57 -0
- package/dist/runtime/utils/randomization.js +189 -0
- package/dist/runtime/utils/utils.d.ts +19 -0
- package/dist/runtime/utils/utils.js +147 -0
- package/dist/types.d.mts +3 -0
- package/package.json +107 -0
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Global navigation middleware for SMILE experiments.
|
|
3
|
+
* Ported from src/core/router.js beforeEach + beforeResolve guards.
|
|
4
|
+
*
|
|
5
|
+
* In Nuxt with a catch-all route, all experiment URLs hit the same Vue Router
|
|
6
|
+
* route (`/:slug(.*)*`). So we look up route metadata from $timeline.routes
|
|
7
|
+
* instead of Vue Router's to.meta / from.meta.
|
|
8
|
+
*/
|
|
9
|
+
import seedrandom from 'seedrandom'
|
|
10
|
+
import { v4 as uuidv4 } from 'uuid'
|
|
11
|
+
import { defineNuxtRouteMiddleware, useNuxtApp, navigateTo } from '#imports'
|
|
12
|
+
import useSmileStore from '../stores/smilestore.js'
|
|
13
|
+
import useLog from '../stores/log.js'
|
|
14
|
+
import { getQueryParams, processQuery, initService } from '../utils/utils.js'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Core guard logic extracted for testability.
|
|
18
|
+
* Returns the guard decision, then runs post-guard logic if navigation is allowed.
|
|
19
|
+
*
|
|
20
|
+
* @param {object} to - Nuxt route location (to)
|
|
21
|
+
* @param {object} from - Nuxt route location (from)
|
|
22
|
+
* @param {object} deps - Injected dependencies
|
|
23
|
+
* @param {object} deps.timeline - Timeline instance ($timeline)
|
|
24
|
+
* @param {object} deps.store - SmileStore (Pinia)
|
|
25
|
+
* @param {object} deps.log - Log store
|
|
26
|
+
* @param {object} deps.api - API-like object with methods guards need
|
|
27
|
+
* @returns {undefined | object} undefined = allow, navigateTo() result = redirect
|
|
28
|
+
*/
|
|
29
|
+
export async function executeGuards(to, from, { timeline, store, log, api, skipBlockingGuards = false }) {
|
|
30
|
+
const result = await _runGuards(to, from, { timeline, store, log, api, skipBlockingGuards })
|
|
31
|
+
|
|
32
|
+
// If navigation is allowed (result is undefined), run post-guard logic
|
|
33
|
+
if (result === undefined) {
|
|
34
|
+
const toConfig = timeline.getViewForPath(to.path)
|
|
35
|
+
const toName = toConfig?.name || to.name
|
|
36
|
+
_postGuard({ timeline, store, log, api, toName, toPath: to.path })
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return result
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Runs all 22 guards in order. Returns undefined to allow, or a navigateTo result to redirect.
|
|
44
|
+
*/
|
|
45
|
+
async function _runGuards(to, from, { timeline, store, log, api, skipBlockingGuards = false }) {
|
|
46
|
+
// --- Helper: resolve a route name to its path for navigateTo ---
|
|
47
|
+
// Falls back to welcome_anonymous if the name isn't a valid timeline route
|
|
48
|
+
// (prevents infinite redirect when lastRoute is e.g. 'recruit' which isn't in the timeline)
|
|
49
|
+
const welcomePath = timeline.getRouteByName('welcome_anonymous')?.path || '/welcome'
|
|
50
|
+
function resolveNameToPath(name) {
|
|
51
|
+
const r = timeline.getRouteByName(name)
|
|
52
|
+
return r ? r.path : welcomePath
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Look up experiment route meta from timeline (not Vue Router meta)
|
|
56
|
+
const toConfig = timeline.getViewForPath(to.path)
|
|
57
|
+
const fromConfig = timeline.getViewForPath(from.path)
|
|
58
|
+
const toMeta = toConfig?.meta || {}
|
|
59
|
+
const fromMeta = fromConfig?.meta || {}
|
|
60
|
+
const toName = toConfig?.name || to.name
|
|
61
|
+
const fromName = fromConfig?.name || from.name
|
|
62
|
+
|
|
63
|
+
// --- Guard 0: Unknown path (not in timeline at all) ---
|
|
64
|
+
// Paths not registered in the timeline (e.g. /foo, /recruit) should redirect
|
|
65
|
+
// to welcome for unknown users or lastRoute for known users.
|
|
66
|
+
// In dev/presentation mode, allow unknown paths (the dev page handles its own resolution).
|
|
67
|
+
if (!toConfig) {
|
|
68
|
+
if (skipBlockingGuards) {
|
|
69
|
+
return // allow — dev/presentation pages handle their own route resolution
|
|
70
|
+
}
|
|
71
|
+
log.warn('ROUTER GUARD: Path ' + to.path + ' is not in the timeline')
|
|
72
|
+
if (store.isKnownUser) {
|
|
73
|
+
const target = resolveNameToPath(store.lastRoute)
|
|
74
|
+
if (target !== to.path) {
|
|
75
|
+
return navigateTo(target, { replace: true })
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// Unknown user at unknown path → send to welcome
|
|
79
|
+
if (to.path !== welcomePath) {
|
|
80
|
+
return navigateTo(welcomePath, { replace: true })
|
|
81
|
+
}
|
|
82
|
+
return // allow (we're already at welcome)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// --- Guard 1: App reset check ---
|
|
86
|
+
if (api.isResetApp()) {
|
|
87
|
+
log.warn('ROUTER GUARD: Resetting app')
|
|
88
|
+
api.resetLocalState()
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// --- Guard 2: Set consented on leaving ---
|
|
92
|
+
if (fromMeta.setConsented) {
|
|
93
|
+
await api.completeConsent()
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// --- Guard 3: Set done on leaving ---
|
|
97
|
+
if (fromMeta.setDone) {
|
|
98
|
+
api.setDone()
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// --- Guard 4: Reset app flag on target ---
|
|
102
|
+
if (toMeta.resetApp) {
|
|
103
|
+
api.resetApp()
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// --- Guard 5: Dev mode pinned route ---
|
|
107
|
+
// Runs before skipBlockingGuards so pinning works in dev mode
|
|
108
|
+
if (store.dev?.pinnedRoute) {
|
|
109
|
+
// If pinned route doesn't exist in timeline, clear it
|
|
110
|
+
if (!timeline.getRouteByName(store.dev.pinnedRoute)) {
|
|
111
|
+
store.dev.pinnedRoute = null
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
await api.connectDB()
|
|
115
|
+
if (toName === store.dev.pinnedRoute) {
|
|
116
|
+
return // allow
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
log.error('ROUTER GUARD: Pinned route, redirecting to ' + store.dev.pinnedRoute)
|
|
120
|
+
return navigateTo(resolveNameToPath(store.dev.pinnedRoute), { replace: true })
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// In dev/presentation mode, skip blocking guards (free navigation)
|
|
126
|
+
// but state-setting guards (1-4), pin guard (5), and _postGuard still run.
|
|
127
|
+
if (skipBlockingGuards) {
|
|
128
|
+
return // allow — postGuard runs via executeGuards
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// --- Guard 6: Query parameter merge ---
|
|
132
|
+
const newQueries = {
|
|
133
|
+
...from.query,
|
|
134
|
+
...to.query,
|
|
135
|
+
...getQueryParams(),
|
|
136
|
+
}
|
|
137
|
+
to.query = newQueries
|
|
138
|
+
|
|
139
|
+
// --- Guard 7: Load data for known user ---
|
|
140
|
+
if (store.isKnownUser && !store.isDataLoaded) {
|
|
141
|
+
await store.loadData()
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// --- Guard 8: Allow-always routes ---
|
|
145
|
+
if (toMeta.allowAlways) {
|
|
146
|
+
log.log(`ROUTER GUARD: Requested navigation (${toName}) is always allowed, so allowing it.`)
|
|
147
|
+
store.setLastRoute(toName)
|
|
148
|
+
store.recordRoute(toName)
|
|
149
|
+
return // allow
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// --- Guard 9: Withdraw route access ---
|
|
153
|
+
if (toMeta.requiresWithdraw && store.isWithdrawn) {
|
|
154
|
+
log.warn('ROUTER GUARD: Requested withdraw route and is withdrawn so allowing it')
|
|
155
|
+
store.setLastRoute(toName)
|
|
156
|
+
store.recordRoute(toName)
|
|
157
|
+
return // allow
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// --- Guard 10: User withdrawn block ---
|
|
161
|
+
if (store.isWithdrawn) {
|
|
162
|
+
log.warn('ROUTER GUARD: User has withdrawn, redirecting to withdraw page')
|
|
163
|
+
return navigateTo(resolveNameToPath('withdraw'), { replace: true })
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// --- Guard 11: Force navigate flag (dev builds) ---
|
|
167
|
+
// In development builds, forceNavigate allows out-of-order navigation
|
|
168
|
+
// (e.g., api.goToView() calls). Presentation/dev prefix routes already
|
|
169
|
+
// skip blocking guards and never reach here.
|
|
170
|
+
if (store.config.mode === 'development' && store.browserEphemeral.forceNavigate) {
|
|
171
|
+
log.warn(
|
|
172
|
+
'ROUTER GUARD: Allowing direct, out-of-order navigation to /'
|
|
173
|
+
+ toName
|
|
174
|
+
+ '. This is allowed in development mode but not in production.',
|
|
175
|
+
)
|
|
176
|
+
store.setLastRoute(toName)
|
|
177
|
+
store.recordRoute(toName)
|
|
178
|
+
return // allow
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// --- Guard 12: Force navigate flag ---
|
|
182
|
+
if (store.browserEphemeral.forceNavigate) {
|
|
183
|
+
log.warn(
|
|
184
|
+
'ROUTER GUARD: Allowing direct, out-of-order navigation to /'
|
|
185
|
+
+ toName
|
|
186
|
+
+ '. This is being forced by api.goToView().',
|
|
187
|
+
)
|
|
188
|
+
store.setLastRoute(toName)
|
|
189
|
+
store.recordRoute(toName)
|
|
190
|
+
return // allow
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// --- Guard 13: Consent required ---
|
|
194
|
+
if (toMeta.requiresConsent && !store.isConsented) {
|
|
195
|
+
log.error(
|
|
196
|
+
`ROUTER GUARD: This route (${toName}) requires consent, but the user has not consented (${store.isConsented}).`
|
|
197
|
+
+ ` Redirecting to the last route visited. (${store.lastRoute})`,
|
|
198
|
+
)
|
|
199
|
+
return navigateTo(resolveNameToPath(store.lastRoute), { replace: true })
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// --- Guard 14: Done required ---
|
|
203
|
+
if (toMeta.requiresDone && !store.isDone) {
|
|
204
|
+
log.error(
|
|
205
|
+
`ROUTER GUARD: This route (${toName}) requires being marked as done, but the user is not done.`
|
|
206
|
+
+ ` Redirecting to the last route visited. (${store.lastRoute})`,
|
|
207
|
+
)
|
|
208
|
+
return navigateTo(resolveNameToPath(store.lastRoute), { replace: true })
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// --- Guard 15: Next route with currentViewDone=true ---
|
|
212
|
+
if (fromMeta.next === toName && store.browserEphemeral.currentViewDone) {
|
|
213
|
+
log.log(
|
|
214
|
+
'ROUTER GUARD: You are trying to go to the next route from '
|
|
215
|
+
+ fromName
|
|
216
|
+
+ ' to '
|
|
217
|
+
+ toName
|
|
218
|
+
+ ' and the current page is done so allowing it.',
|
|
219
|
+
)
|
|
220
|
+
store.setLastRoute(toName)
|
|
221
|
+
store.recordRoute(toName)
|
|
222
|
+
return // allow
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// --- Guard 16: Next route with currentViewDone=false ---
|
|
226
|
+
if (fromMeta.next === toName && !store.browserEphemeral.currentViewDone) {
|
|
227
|
+
log.error(
|
|
228
|
+
'ROUTER GUARD: You are trying to go to the next route from '
|
|
229
|
+
+ fromName
|
|
230
|
+
+ ' to '
|
|
231
|
+
+ toName
|
|
232
|
+
+ ' but the current page is not marked as done, so returning you to the current page.',
|
|
233
|
+
)
|
|
234
|
+
return navigateTo(resolveNameToPath(store.lastRoute), { replace: true })
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// --- Guard 17: Same route as lastRoute ---
|
|
238
|
+
if (store.lastRoute === toName) {
|
|
239
|
+
log.log(
|
|
240
|
+
'ROUTER GUARD: You\'re trying to go to the same route as lastRoute ('
|
|
241
|
+
+ store.lastRoute
|
|
242
|
+
+ '), so allowing it.',
|
|
243
|
+
)
|
|
244
|
+
return // allow
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// --- Guard 18: Known user not going to next route ---
|
|
248
|
+
if (fromMeta.next !== toName && store.isKnownUser) {
|
|
249
|
+
log.error(
|
|
250
|
+
`ROUTER GUARD: You are known and trying to access a route (${toName}) which is not 'next' `
|
|
251
|
+
+ `on the timeline. Returning you to the last route you were on (${store.lastRoute}).`,
|
|
252
|
+
)
|
|
253
|
+
return navigateTo(resolveNameToPath(store.lastRoute), { replace: true })
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// --- Guard 19: Known user fallback ---
|
|
257
|
+
if (store.isKnownUser) {
|
|
258
|
+
log.error(
|
|
259
|
+
'ROUTER GUARD: You are known and trying to access a route you can\'t see yet. lastRoute: '
|
|
260
|
+
+ store.lastRoute,
|
|
261
|
+
)
|
|
262
|
+
return navigateTo(resolveNameToPath(store.lastRoute), { replace: true })
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// --- Guard 20: Unknown user at landing ---
|
|
266
|
+
if (!store.isKnownUser && toName === 'landing') {
|
|
267
|
+
log.error('ROUTER GUARD: Unknown user trying to go to landing page')
|
|
268
|
+
return navigateTo(resolveNameToPath('welcome_anonymous'), { replace: true })
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// --- Guard 21: Unknown user at non-entry route ---
|
|
272
|
+
// Allow unknown users to reach any route that doesn't require consent
|
|
273
|
+
// (e.g., welcome pages). Block everything else.
|
|
274
|
+
if (toMeta.requiresConsent !== false) {
|
|
275
|
+
log.error('ROUTER GUARD: Unknown user blocked trying to go to ' + toName)
|
|
276
|
+
return navigateTo(resolveNameToPath(store.lastRoute), { replace: true })
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// --- Guard 22: Default allow ---
|
|
280
|
+
return // allow (fall through)
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Post-guard logic ported from router.beforeResolve.
|
|
285
|
+
* Handles seed setup and view state reset.
|
|
286
|
+
* Runs only when navigation is allowed (guard returned undefined).
|
|
287
|
+
*/
|
|
288
|
+
// eslint-disable-next-line no-unused-vars
|
|
289
|
+
function _postGuard({ timeline: _timeline, store, log, api, toName, toPath }) {
|
|
290
|
+
store.setLastRoute(toName)
|
|
291
|
+
store.recordRoute(toName)
|
|
292
|
+
|
|
293
|
+
// --- Recruitment service detection ---
|
|
294
|
+
// Extract service name from /welcome/:service paths and call processQuery
|
|
295
|
+
// to set the recruitment service and store participant info from URL params.
|
|
296
|
+
const serviceMatch = toPath?.match(/\/welcome\/(\w+)/)
|
|
297
|
+
if (serviceMatch) {
|
|
298
|
+
const service = serviceMatch[1]
|
|
299
|
+
if (initService(service)) {
|
|
300
|
+
const query = getQueryParams()
|
|
301
|
+
processQuery(query, service)
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
api.removeAutofill()
|
|
305
|
+
|
|
306
|
+
if (store.localState.useSeed) {
|
|
307
|
+
const seedID = store.getSeedID
|
|
308
|
+
const seed = `${seedID}-${toName}`
|
|
309
|
+
seedrandom(seed, { global: true })
|
|
310
|
+
log.log('ROUTER GUARD: Seed set to ' + seed)
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
api.randomSeed()
|
|
314
|
+
log.log('ROUTER GUARD: Not using participant-specific seed; seed set randomly')
|
|
315
|
+
}
|
|
316
|
+
log.clearPageHistory()
|
|
317
|
+
if (store.dev) store.dev.viewProvidesStepper = false
|
|
318
|
+
store.browserEphemeral.currentViewDone = false
|
|
319
|
+
log.log('ROUTER GUARD: Router navigated to /' + toName)
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export default defineNuxtRouteMiddleware(async (to, from) => {
|
|
323
|
+
// Skip on server — timeline plugin is client-only
|
|
324
|
+
if (import.meta.server) return
|
|
325
|
+
|
|
326
|
+
const nuxtApp = useNuxtApp()
|
|
327
|
+
const timeline = nuxtApp.$timeline
|
|
328
|
+
if (!timeline) {
|
|
329
|
+
console.warn('[SMILE middleware] $timeline not available yet, skipping guards')
|
|
330
|
+
return
|
|
331
|
+
}
|
|
332
|
+
// Skip guards for standalone pages that aren't part of the experiment timeline
|
|
333
|
+
if (to.path === '/info' || to.path === '/dev-login') {
|
|
334
|
+
return
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// Debug logging only in development mode
|
|
338
|
+
if (import.meta.dev) {
|
|
339
|
+
console.log(`[SMILE middleware] ${from.path} → ${to.path}`)
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// --- Dev/Presentation mode: prefix preservation ---
|
|
343
|
+
// If FROM a prefixed route TO a non-prefixed route, redirect to preserve prefix.
|
|
344
|
+
// This catches goNextView() navigations that use unprefixed paths like '/consent'.
|
|
345
|
+
const hasDevPrefix = p => p.startsWith('/dev/') || p === '/dev'
|
|
346
|
+
const hasPresentationPrefix = p => p.startsWith('/presentation/') || p === '/presentation'
|
|
347
|
+
|
|
348
|
+
if (hasDevPrefix(from.path) && !hasDevPrefix(to.path)) {
|
|
349
|
+
return navigateTo('/dev' + to.path, { replace: true })
|
|
350
|
+
}
|
|
351
|
+
if (hasPresentationPrefix(from.path) && !hasPresentationPrefix(to.path)) {
|
|
352
|
+
return navigateTo('/presentation' + to.path, { replace: true })
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
const isDevOrPresentation = hasDevPrefix(to.path) || hasPresentationPrefix(to.path)
|
|
356
|
+
|
|
357
|
+
const store = useSmileStore()
|
|
358
|
+
const log = useLog()
|
|
359
|
+
|
|
360
|
+
// Build a lightweight api-like object with the methods guards need.
|
|
361
|
+
// We avoid calling useAPI() here because it pulls in useRoute()/useRouter()
|
|
362
|
+
// which can cause issues in middleware context. Instead, proxy only the
|
|
363
|
+
// methods actually used by the guards.
|
|
364
|
+
const api = {
|
|
365
|
+
isResetApp: () => store.localState.reset,
|
|
366
|
+
resetLocalState: () => {
|
|
367
|
+
// Clear persistence then hard-navigate. Don't touch the store —
|
|
368
|
+
// watchers would re-write defaults back to storage before navigation.
|
|
369
|
+
if (typeof localStorage !== 'undefined') {
|
|
370
|
+
localStorage.removeItem(store.config.localStorageKey)
|
|
371
|
+
}
|
|
372
|
+
if (typeof document !== 'undefined') {
|
|
373
|
+
const prefix = `smile_${store.config.codeName}_`
|
|
374
|
+
const cookieKeys = ['knownUser', 'lastRoute', 'docRef', 'completionCode', 'consented', 'withdrawn', 'done', 'seedID', 'seedSet']
|
|
375
|
+
cookieKeys.forEach((key) => {
|
|
376
|
+
document.cookie = `${prefix}${key}=; path=/; max-age=0; SameSite=Lax`
|
|
377
|
+
})
|
|
378
|
+
}
|
|
379
|
+
if (typeof window !== 'undefined') {
|
|
380
|
+
const path = window.location.pathname
|
|
381
|
+
let targetPath = '/'
|
|
382
|
+
if (path.startsWith('/dev/') || path === '/dev') targetPath = '/dev/'
|
|
383
|
+
else if (path.startsWith('/presentation/') || path === '/presentation') targetPath = '/presentation/'
|
|
384
|
+
window.location.href = window.location.origin + targetPath
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
completeConsent: async () => {
|
|
388
|
+
store.setConsented()
|
|
389
|
+
if (!store.cookieState.knownUser) {
|
|
390
|
+
await store.setKnown()
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
setDone: () => store.setDone(),
|
|
394
|
+
resetApp: () => store.resetApp(),
|
|
395
|
+
connectDB: async () => {
|
|
396
|
+
if (!store.cookieState.knownUser) {
|
|
397
|
+
await store.setKnown()
|
|
398
|
+
store.setConsented()
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
removeAutofill: () => {
|
|
402
|
+
if (import.meta.dev) {
|
|
403
|
+
store.removeAutofill()
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
randomSeed: () => {
|
|
407
|
+
seedrandom(uuidv4(), { global: true })
|
|
408
|
+
},
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// For dev/presentation routes: run state-setting guards and post-guard,
|
|
412
|
+
// but skip blocking guards (free navigation in dev/presentation mode).
|
|
413
|
+
// Strip the prefix so timeline route lookup works.
|
|
414
|
+
if (isDevOrPresentation) {
|
|
415
|
+
const stripPrefix = p => p.replace(/^\/(dev|presentation)(\/|$)/, '/') || '/'
|
|
416
|
+
const strippedTo = { ...to, path: stripPrefix(to.path) }
|
|
417
|
+
const strippedFrom = { ...from, path: stripPrefix(from.path) }
|
|
418
|
+
return executeGuards(strippedTo, strippedFrom, { timeline, store, log, api, skipBlockingGuards: true })
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
return executeGuards(to, from, { timeline, store, log, api })
|
|
422
|
+
})
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<NuxtLayout name="experiment">
|
|
3
|
+
<component
|
|
4
|
+
:is="viewConfig.component"
|
|
5
|
+
v-if="viewConfig && viewConfig.component"
|
|
6
|
+
v-bind="viewConfig.props"
|
|
7
|
+
/>
|
|
8
|
+
<div v-else-if="viewConfig === null && timelineReady">
|
|
9
|
+
<h1>Page not found</h1>
|
|
10
|
+
<p>No view registered for path: {{ route.path }}</p>
|
|
11
|
+
</div>
|
|
12
|
+
</NuxtLayout>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup>
|
|
16
|
+
const route = useRoute();
|
|
17
|
+
const nuxtApp = useNuxtApp();
|
|
18
|
+
const timelineReady = ref(false);
|
|
19
|
+
const viewConfig = computed(() => {
|
|
20
|
+
if (!timelineReady.value) return void 0;
|
|
21
|
+
const timeline = nuxtApp.$timeline;
|
|
22
|
+
if (!timeline) return void 0;
|
|
23
|
+
return timeline.getViewForPath(route.path);
|
|
24
|
+
});
|
|
25
|
+
onMounted(() => {
|
|
26
|
+
timelineReady.value = true;
|
|
27
|
+
});
|
|
28
|
+
watch(viewConfig, (config) => {
|
|
29
|
+
if (config && config.redirect) {
|
|
30
|
+
if (config.redirect.name) {
|
|
31
|
+
const target = nuxtApp.$timeline.routes.find((r) => r.name === config.redirect.name);
|
|
32
|
+
if (target) {
|
|
33
|
+
navigateTo(target.path);
|
|
34
|
+
}
|
|
35
|
+
} else if (config.redirect.path) {
|
|
36
|
+
navigateTo(config.redirect.path);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, { immediate: true });
|
|
40
|
+
</script>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<NuxtLayout name="development">
|
|
3
|
+
<!-- Dev mode landing: show RecruitmentChooserView at /dev/ -->
|
|
4
|
+
<RecruitmentChooserView v-if="isDevRoot && timelineReady" />
|
|
5
|
+
<template v-else-if="viewConfig && viewConfig.component">
|
|
6
|
+
<ExperimentStatusBar />
|
|
7
|
+
<component
|
|
8
|
+
:is="viewConfig.component"
|
|
9
|
+
v-bind="viewConfig.props"
|
|
10
|
+
/>
|
|
11
|
+
</template>
|
|
12
|
+
<div v-else-if="viewConfig === null && timelineReady">
|
|
13
|
+
<h1>Page not found</h1>
|
|
14
|
+
<p>No view registered for path: {{ experimentPath }}</p>
|
|
15
|
+
</div>
|
|
16
|
+
</NuxtLayout>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import RecruitmentChooserView from "#smile-dev/RecruitmentChooserView.vue";
|
|
21
|
+
const route = useRoute();
|
|
22
|
+
const nuxtApp = useNuxtApp();
|
|
23
|
+
const timelineReady = ref(false);
|
|
24
|
+
const experimentPath = computed(() => {
|
|
25
|
+
return route.path.replace(/^\/dev/, "") || "/";
|
|
26
|
+
});
|
|
27
|
+
const isDevRoot = computed(() => {
|
|
28
|
+
return experimentPath.value === "/";
|
|
29
|
+
});
|
|
30
|
+
const rawViewConfig = computed(() => {
|
|
31
|
+
if (!timelineReady.value) return void 0;
|
|
32
|
+
if (isDevRoot.value) return void 0;
|
|
33
|
+
const timeline = nuxtApp.$timeline;
|
|
34
|
+
if (!timeline) return void 0;
|
|
35
|
+
return timeline.getViewForPath(experimentPath.value);
|
|
36
|
+
});
|
|
37
|
+
const viewConfig = rawViewConfig;
|
|
38
|
+
onMounted(() => {
|
|
39
|
+
timelineReady.value = true;
|
|
40
|
+
});
|
|
41
|
+
watch(viewConfig, (config) => {
|
|
42
|
+
if (config && config.redirect) {
|
|
43
|
+
if (config.redirect.name) {
|
|
44
|
+
const target = nuxtApp.$timeline.routes.find((r) => r.name === config.redirect.name);
|
|
45
|
+
if (target) {
|
|
46
|
+
navigateTo("/dev" + target.path);
|
|
47
|
+
}
|
|
48
|
+
} else if (config.redirect.path) {
|
|
49
|
+
navigateTo("/dev" + config.redirect.path);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}, { immediate: true });
|
|
53
|
+
</script>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="dev-login">
|
|
3
|
+
<div class="login-card">
|
|
4
|
+
<h2>Developer Access</h2>
|
|
5
|
+
<p>Enter the dev password to access dev/presentation mode.</p>
|
|
6
|
+
<form @submit.prevent="login">
|
|
7
|
+
<input
|
|
8
|
+
v-model="password"
|
|
9
|
+
type="password"
|
|
10
|
+
placeholder="Password"
|
|
11
|
+
autofocus
|
|
12
|
+
:disabled="loading"
|
|
13
|
+
>
|
|
14
|
+
<button
|
|
15
|
+
type="submit"
|
|
16
|
+
:disabled="loading"
|
|
17
|
+
>
|
|
18
|
+
{{ loading ? 'Logging in...' : 'Login' }}
|
|
19
|
+
</button>
|
|
20
|
+
<p
|
|
21
|
+
v-if="error"
|
|
22
|
+
class="error"
|
|
23
|
+
>
|
|
24
|
+
{{ error }}
|
|
25
|
+
</p>
|
|
26
|
+
</form>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script setup>
|
|
32
|
+
import { ref } from "vue";
|
|
33
|
+
import { navigateTo } from "#imports";
|
|
34
|
+
const password = ref("");
|
|
35
|
+
const error = ref("");
|
|
36
|
+
const loading = ref(false);
|
|
37
|
+
async function login() {
|
|
38
|
+
error.value = "";
|
|
39
|
+
loading.value = true;
|
|
40
|
+
try {
|
|
41
|
+
await $fetch("/api/auth/login", {
|
|
42
|
+
method: "POST",
|
|
43
|
+
body: { password: password.value }
|
|
44
|
+
});
|
|
45
|
+
await navigateTo("/dev/", { replace: true });
|
|
46
|
+
} catch (err) {
|
|
47
|
+
error.value = err.statusCode === 401 ? "Invalid password" : "Login failed";
|
|
48
|
+
} finally {
|
|
49
|
+
loading.value = false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style scoped>
|
|
55
|
+
.dev-login{align-items:center;background:#f5f5f5;display:flex;font-family:system-ui,-apple-system,sans-serif;justify-content:center;min-height:100vh}.login-card{background:#fff;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.1);max-width:400px;padding:2rem;width:100%}.login-card h2{font-size:1.25rem;margin:0 0 .5rem}.login-card p{color:#666;font-size:.875rem;margin:0 0 1rem}form{display:flex;flex-direction:column;gap:.75rem}input{border:1px solid #ccc;border-radius:4px;padding:.5rem .75rem}button,input{font-size:1rem}button{background:#333;border:none;border-radius:4px;color:#fff;cursor:pointer;padding:.5rem 1rem}button:hover:not(:disabled){background:#555}button:disabled{cursor:not-allowed;opacity:.6}.error{color:#c00;margin:0}
|
|
56
|
+
</style>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|