@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,991 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module useAPI
|
|
3
|
+
* @description Creates and returns a reactive SmileAPI instance that provides core functionality for SMILE experiments.
|
|
4
|
+
* Combines access to:
|
|
5
|
+
* - Store management (Pinia store)
|
|
6
|
+
* - Logging capabilities
|
|
7
|
+
* - Routing and navigation
|
|
8
|
+
* - Timeline management
|
|
9
|
+
* - Randomization utilities
|
|
10
|
+
*
|
|
11
|
+
* This composable serves as the main entry point for components to interact with the SMILE framework's
|
|
12
|
+
* core functionality. It initializes all required dependencies and returns a reactive API object
|
|
13
|
+
* that maintains reactivity when used in components.
|
|
14
|
+
*
|
|
15
|
+
* @returns {object} A reactive SmileAPI instance with all core framework capabilities
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { reactive } from 'vue'
|
|
19
|
+
import { useRoute, useRouter, useRuntimeConfig, useNuxtApp } from '#imports'
|
|
20
|
+
import useSmileStore from '../stores/smilestore.js'
|
|
21
|
+
import useLog from '../stores/log.js'
|
|
22
|
+
import useTimeline from './useTimeline.js'
|
|
23
|
+
import seedrandom from 'seedrandom'
|
|
24
|
+
import { v4 as uuidv4 } from 'uuid'
|
|
25
|
+
import sha256 from 'crypto-js/sha256'
|
|
26
|
+
import Base64url from 'crypto-js/enc-base64'
|
|
27
|
+
import stringify from 'json-stable-stringify'
|
|
28
|
+
|
|
29
|
+
import {
|
|
30
|
+
randomInt,
|
|
31
|
+
shuffle,
|
|
32
|
+
sampleWithReplacement,
|
|
33
|
+
sampleWithoutReplacement,
|
|
34
|
+
fakerDistributions,
|
|
35
|
+
} from '../utils/randomization.js'
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* SmileAPI class provides core functionality for SMILE experiments
|
|
39
|
+
* @class
|
|
40
|
+
* @description Main API class that provides access to store data, logging, routing, timeline management,
|
|
41
|
+
* and other core functionality needed for running SMILE experiments. It serves as the primary interface
|
|
42
|
+
* between experiment components and the underlying application infrastructure.
|
|
43
|
+
*
|
|
44
|
+
* @property {object} store - Smile store instance containing application state
|
|
45
|
+
* @property {object} logStore - Logging store for application logging
|
|
46
|
+
* @property {object} route - Vue Router route object for current route
|
|
47
|
+
* @property {object} router - Vue Router instance for navigation
|
|
48
|
+
* @property {object} timeline - Timeline instance for managing view sequence
|
|
49
|
+
* @property {object} config - Application configuration from store
|
|
50
|
+
* @property {object} data - Application data from store
|
|
51
|
+
* @property {object} private - Private data from store
|
|
52
|
+
* @property {object} all_data - Combined private and public data
|
|
53
|
+
* @property {object} all_config - Combined bro, dev, github and main configs
|
|
54
|
+
* @property {Object} urls - Global URL configurations
|
|
55
|
+
* @property {Object} log - Logging methods interface
|
|
56
|
+
*/
|
|
57
|
+
export class SmileAPI {
|
|
58
|
+
/**
|
|
59
|
+
* Creates a new SmileAPI instance
|
|
60
|
+
* @param {object} store - The Smile store instance containing application state
|
|
61
|
+
* @param {object} logStore - The logging store for application logging
|
|
62
|
+
* @param {object} route - Vue Router route object for current route
|
|
63
|
+
* @param {object} router - Vue Router instance for navigation
|
|
64
|
+
* @param {object} timeline - Timeline instance for managing view sequence
|
|
65
|
+
* @param {object} runtimeConfig - Nuxt runtime config object
|
|
66
|
+
*/
|
|
67
|
+
constructor(store, logStore, route, router, timeline, runtimeConfig) {
|
|
68
|
+
this.store = store
|
|
69
|
+
this.logStore = logStore
|
|
70
|
+
this.route = route
|
|
71
|
+
this.router = router
|
|
72
|
+
this.timeline = timeline
|
|
73
|
+
this.runtimeConfig = runtimeConfig
|
|
74
|
+
|
|
75
|
+
// Store data access
|
|
76
|
+
this.config = store.config
|
|
77
|
+
this.data = store.data
|
|
78
|
+
this.private = store.private
|
|
79
|
+
this.all_data = { private: store.private, data: store.data }
|
|
80
|
+
this.all_config = {
|
|
81
|
+
browserPersisted: store.browserPersisted, // compatibility getter (read-only merge of both tiers)
|
|
82
|
+
dev: store.dev,
|
|
83
|
+
code: store.config.github,
|
|
84
|
+
config: store.config,
|
|
85
|
+
}
|
|
86
|
+
this.urls = store.browserEphemeral.urls
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Logging methods
|
|
90
|
+
/**
|
|
91
|
+
* Logging methods for the application
|
|
92
|
+
* @property {object} log - Object containing logging methods
|
|
93
|
+
* @property {Function} log.debug - Log debug level messages
|
|
94
|
+
* @property {Function} log.log - Log standard messages
|
|
95
|
+
* @property {Function} log.warn - Log warning messages
|
|
96
|
+
* @property {Function} log.error - Log error messages
|
|
97
|
+
* @property {Function} log.success - Log success messages
|
|
98
|
+
* @property {Function} log.clearPageHistory - Clear the page history log
|
|
99
|
+
* @property {Function} log.addToHistory - Add an entry to the page history log
|
|
100
|
+
*/
|
|
101
|
+
log = {
|
|
102
|
+
debug: (...args) => this.logStore.debug(...args),
|
|
103
|
+
log: (...args) => this.logStore.log(...args),
|
|
104
|
+
warn: (...args) => this.logStore.warn(...args),
|
|
105
|
+
error: (...args) => this.logStore.error(...args),
|
|
106
|
+
success: (...args) => this.logStore.success(...args),
|
|
107
|
+
clearPageHistory: () => this.logStore.clearPageHistory(),
|
|
108
|
+
addToHistory: (...args) => this.logStore.addToHistory(...args),
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Router related methods
|
|
112
|
+
/**
|
|
113
|
+
* Navigate to the next view in the timeline sequence
|
|
114
|
+
* @param {boolean} [resetScroll] - Whether to reset scroll position to top after navigation
|
|
115
|
+
* @returns {void}
|
|
116
|
+
* @memberof SmileAPI
|
|
117
|
+
* @instance
|
|
118
|
+
*/
|
|
119
|
+
goNextView = (resetScroll = true) => {
|
|
120
|
+
this.timeline.goNextView(() => {
|
|
121
|
+
if (resetScroll) {
|
|
122
|
+
this.scrollToTop()
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Navigate to the previous view in the timeline sequence
|
|
129
|
+
* @param {boolean} [resetScroll] - Whether to reset scroll position to top after navigation
|
|
130
|
+
* @returns {void}
|
|
131
|
+
* @memberof SmileAPI
|
|
132
|
+
* @instance
|
|
133
|
+
*/
|
|
134
|
+
goPrevView = (resetScroll = true) => {
|
|
135
|
+
this.timeline.goPrevView(() => {
|
|
136
|
+
if (resetScroll) {
|
|
137
|
+
this.scrollToTop()
|
|
138
|
+
}
|
|
139
|
+
})
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Navigate to a specific view in the application
|
|
144
|
+
* @param {string} view - The name of the view to navigate to
|
|
145
|
+
* @param {boolean} [force] - Whether to force navigation by temporarily disabling navigation guards
|
|
146
|
+
* @param {boolean} [resetScroll] - Whether to reset scroll position to top after navigation
|
|
147
|
+
* @returns {Promise<void>}
|
|
148
|
+
* @memberof SmileAPI
|
|
149
|
+
* @instance
|
|
150
|
+
*/
|
|
151
|
+
goToView = async (view, force = true, resetScroll = true) => {
|
|
152
|
+
// Use the useTimeline composable's goToView which resolves name→path
|
|
153
|
+
await this.timeline.goToView(view, force)
|
|
154
|
+
if (resetScroll) {
|
|
155
|
+
this.scrollToTop()
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Check if there is a next view available in the sequential navigation
|
|
161
|
+
* @returns {boolean} True if there is a next view and sequential navigation is enabled
|
|
162
|
+
*/
|
|
163
|
+
hasNextView = () => {
|
|
164
|
+
const nv = this.timeline.nextView()
|
|
165
|
+
return !!nv
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Check if there is a previous view available in the sequential navigation
|
|
170
|
+
* @returns {boolean} True if there is a previous view and sequential navigation is enabled
|
|
171
|
+
*/
|
|
172
|
+
hasPrevView = () => {
|
|
173
|
+
const pv = this.timeline.prevView()
|
|
174
|
+
return !!pv
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Get the next view in the navigation sequence
|
|
179
|
+
* @returns {object | null} Route object with name and query params, or null if no next view
|
|
180
|
+
*/
|
|
181
|
+
nextView = () => this.timeline.nextView()
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Get the previous view in the navigation sequence
|
|
185
|
+
* @returns {object | null} Route object with name and query params, or null if no previous view
|
|
186
|
+
*/
|
|
187
|
+
prevView = () => this.timeline.prevView()
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Scrolls the main content container to the top
|
|
191
|
+
* @returns {void}
|
|
192
|
+
*/
|
|
193
|
+
scrollToTop() {
|
|
194
|
+
if (typeof document === 'undefined') return
|
|
195
|
+
const mainContent = document.querySelector('.device-container')
|
|
196
|
+
if (mainContent) {
|
|
197
|
+
mainContent.scrollTop = 0
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Randomization utilities
|
|
202
|
+
/**
|
|
203
|
+
* Collection of faker distributions for generating random data
|
|
204
|
+
* @type {object} fakerDistributions
|
|
205
|
+
*/
|
|
206
|
+
faker = fakerDistributions
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Generate a random integer between min and max (inclusive)
|
|
210
|
+
* @param {number} min - The minimum value
|
|
211
|
+
* @param {number} max - The maximum value
|
|
212
|
+
* @returns {number} A random integer between min and max
|
|
213
|
+
*/
|
|
214
|
+
randomInt = randomInt
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Randomly reorder elements in an array
|
|
218
|
+
* @param {Array} array - The array to shuffle
|
|
219
|
+
* @returns {Array} A new array with elements in random order
|
|
220
|
+
*/
|
|
221
|
+
shuffle = shuffle
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Sample elements from an array with replacement
|
|
225
|
+
* @param {Array} array - The array to sample from
|
|
226
|
+
* @param {number} n - Number of elements to sample
|
|
227
|
+
* @returns {Array} Array of n randomly sampled elements
|
|
228
|
+
*/
|
|
229
|
+
sampleWithReplacement = sampleWithReplacement
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Sample elements from an array without replacement
|
|
233
|
+
* @param {Array} array - The array to sample from
|
|
234
|
+
* @param {number} n - Number of elements to sample
|
|
235
|
+
* @returns {Array} Array of n unique randomly sampled elements
|
|
236
|
+
*/
|
|
237
|
+
sampleWithoutReplacement = sampleWithoutReplacement
|
|
238
|
+
|
|
239
|
+
// URL helpers
|
|
240
|
+
|
|
241
|
+
// TODO: Asset loading via import.meta.glob() needs rework for Nuxt module.
|
|
242
|
+
// In the SPA, these paths were relative to the source file location.
|
|
243
|
+
// In the Nuxt module, user assets live in the consuming app, not the module.
|
|
244
|
+
// These will be addressed in Phase 4 (User Layer) or Phase M (Build & Publish).
|
|
245
|
+
// For now, the glob imports will resolve to empty objects (no matching files).
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Eagerly import all user assets using Vite's glob import
|
|
249
|
+
* This allows dynamic path resolution for nested directories
|
|
250
|
+
* @private
|
|
251
|
+
*/
|
|
252
|
+
// TODO: Asset loading via import.meta.glob needs rework for Nuxt module context.
|
|
253
|
+
// These paths are relative to the module, not the consuming app.
|
|
254
|
+
#userAssets = {}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Eagerly import all core assets using Vite's glob import
|
|
258
|
+
* This allows dynamic path resolution for nested directories
|
|
259
|
+
* @private
|
|
260
|
+
*/
|
|
261
|
+
#coreAssets = {}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Get the URL for a public asset using the deployment base path
|
|
265
|
+
* @param {string} name - The name/path of the public asset
|
|
266
|
+
* @returns {string} The complete URL for the public asset
|
|
267
|
+
*/
|
|
268
|
+
getPublicUrl = name => (this.runtimeConfig?.public?.deployBasePath || '/') + name
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Get the URL for a core static asset from the core assets directory
|
|
272
|
+
* @param {string} name - The name/path of the core static asset
|
|
273
|
+
* @returns {string} The complete URL for the core static asset
|
|
274
|
+
*/
|
|
275
|
+
getCoreStaticUrl = (name) => {
|
|
276
|
+
const assetKey = `../../assets/${name}`
|
|
277
|
+
if (this.#coreAssets[assetKey]) {
|
|
278
|
+
return this.#coreAssets[assetKey]
|
|
279
|
+
}
|
|
280
|
+
// Fallback to original method if glob doesn't find it
|
|
281
|
+
console.warn(`Core asset not found in glob imports: ${name}`)
|
|
282
|
+
return new URL(`../../assets/${name}`, import.meta.url).href
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Get the URL for a user static asset from the user assets directory
|
|
287
|
+
* @param {string} name - The name/path of the user static asset
|
|
288
|
+
* @returns {string} The complete URL for the user static asset
|
|
289
|
+
*/
|
|
290
|
+
getStaticUrl = (name) => {
|
|
291
|
+
const assetKey = `../../user/assets/${name}`
|
|
292
|
+
if (this.#userAssets[assetKey]) {
|
|
293
|
+
return this.#userAssets[assetKey]
|
|
294
|
+
}
|
|
295
|
+
// Fallback to original method if glob doesn't find it
|
|
296
|
+
console.warn(`User asset not found in glob imports: ${name}`)
|
|
297
|
+
return new URL(`../../user/assets/${name}`, import.meta.url).href
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Reset the entire application state
|
|
302
|
+
* @returns {void}
|
|
303
|
+
*/
|
|
304
|
+
resetApp = () => this.store.resetApp()
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Check if the application is in reset state
|
|
308
|
+
* @returns {boolean} True if app is reset, false otherwise
|
|
309
|
+
*/
|
|
310
|
+
isResetApp = () => this.store.localState.reset
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Reset just the store state
|
|
314
|
+
* @returns {void}
|
|
315
|
+
*/
|
|
316
|
+
resetStore = () => this.store.resetLocal()
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Reset local storage state and reload the application
|
|
320
|
+
* Removes local storage data, resets store state, and refreshes page
|
|
321
|
+
* @returns {void}
|
|
322
|
+
*/
|
|
323
|
+
resetLocalState() {
|
|
324
|
+
// Clear all persistence, then hard-navigate to reload with a clean slate.
|
|
325
|
+
// We do NOT call store.resetLocal() / $reset() because that would trigger
|
|
326
|
+
// the store-sync watchers which re-write default values back to cookies
|
|
327
|
+
// and localStorage, undoing our cleanup.
|
|
328
|
+
if (typeof localStorage !== 'undefined') {
|
|
329
|
+
localStorage.removeItem(this.config.localStorageKey)
|
|
330
|
+
}
|
|
331
|
+
if (typeof document !== 'undefined') {
|
|
332
|
+
const prefix = `smile_${this.config.codeName}_`
|
|
333
|
+
const cookieKeys = ['knownUser', 'lastRoute', 'docRef', 'completionCode', 'consented', 'withdrawn', 'done', 'seedID', 'seedSet']
|
|
334
|
+
cookieKeys.forEach((key) => {
|
|
335
|
+
document.cookie = `${prefix}${key}=; path=/; max-age=0; SameSite=Lax`
|
|
336
|
+
})
|
|
337
|
+
}
|
|
338
|
+
if (typeof window !== 'undefined') {
|
|
339
|
+
const path = window.location.pathname
|
|
340
|
+
let targetPath = '/'
|
|
341
|
+
if (path.startsWith('/dev/') || path === '/dev') targetPath = '/dev/'
|
|
342
|
+
else if (path.startsWith('/presentation/') || path === '/presentation') targetPath = '/presentation/'
|
|
343
|
+
window.location.href = window.location.origin + targetPath
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Reloads the current browser window/page
|
|
349
|
+
* Forces a fresh reload of the current page by calling window.location.reload()
|
|
350
|
+
* @returns {void}
|
|
351
|
+
*/
|
|
352
|
+
reloadBrowser() {
|
|
353
|
+
if (typeof window !== 'undefined') {
|
|
354
|
+
window.location.reload()
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// App component management
|
|
359
|
+
/**
|
|
360
|
+
* Set a global app component that can be accessed throughout the application
|
|
361
|
+
* @param {string} key - The key/identifier for the component
|
|
362
|
+
* @param {object} value - The component to store globally
|
|
363
|
+
* @returns {void}
|
|
364
|
+
*/
|
|
365
|
+
setAppComponent(key, value) {
|
|
366
|
+
if (!this.store.config.global_app_components) {
|
|
367
|
+
this.store.config.global_app_components = {}
|
|
368
|
+
}
|
|
369
|
+
this.store.config.global_app_components[key] = value
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Get a global app component by its key identifier
|
|
374
|
+
* @param {string} key - The key/identifier of the component to retrieve
|
|
375
|
+
* @returns {object | undefined} The component if found, undefined otherwise
|
|
376
|
+
*/
|
|
377
|
+
getAppComponent(key) {
|
|
378
|
+
if (!this.store.config.global_app_components || !(key in this.store.config.global_app_components)) {
|
|
379
|
+
this.logStore.error('SMILE API: getAppComponent() key not found:', key)
|
|
380
|
+
return undefined
|
|
381
|
+
}
|
|
382
|
+
return this.store.config.global_app_components[key]
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// Config management
|
|
386
|
+
/**
|
|
387
|
+
* Sets a runtime configuration value. If the key exists in the main config,
|
|
388
|
+
* updates it there. Otherwise stores it in the runtime config object.
|
|
389
|
+
* Also updates the smileConfig in store data without global components.
|
|
390
|
+
* @param {string} key - The configuration key to set
|
|
391
|
+
* @param {*} value - The value to set for the configuration key
|
|
392
|
+
* @returns {void}
|
|
393
|
+
*/
|
|
394
|
+
setRuntimeConfig(key, value) {
|
|
395
|
+
if (key in this.store.config) {
|
|
396
|
+
this.store.config[key] = value
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
if (!this.store.config.runtime) {
|
|
400
|
+
this.store.config.runtime = {}
|
|
401
|
+
}
|
|
402
|
+
this.store.config.runtime[key] = value
|
|
403
|
+
}
|
|
404
|
+
// eslint-disable-next-line no-unused-vars
|
|
405
|
+
const { global_app_components: _gac, ...configWithoutComponents } = this.store.config
|
|
406
|
+
this.store.data.smileConfig = configWithoutComponents
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Gets a configuration value by key, checking both main config and runtime config
|
|
411
|
+
* @param {string} key - The configuration key to retrieve
|
|
412
|
+
* @returns {*|null} The configuration value if found, null otherwise
|
|
413
|
+
*/
|
|
414
|
+
getConfig(key) {
|
|
415
|
+
if (key in this.store.config) {
|
|
416
|
+
return this.store.config[key]
|
|
417
|
+
}
|
|
418
|
+
else if (this.store.config.runtime && key in this.store.config.runtime) {
|
|
419
|
+
return this.store.config.runtime[key]
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
this.logStore.error('SMILE API: getConfig() key not found', key)
|
|
423
|
+
return null
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// User state management
|
|
428
|
+
/**
|
|
429
|
+
* Sets the user as known in the store. This is typically called when a user first visits the site.
|
|
430
|
+
* @returns {Promise<void>} A promise that resolves when the known status is set
|
|
431
|
+
*/
|
|
432
|
+
async setKnown() {
|
|
433
|
+
return await this.store.setKnown()
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Marks the current task/experiment as completed in the store
|
|
438
|
+
* @returns {void}
|
|
439
|
+
*/
|
|
440
|
+
setDone() {
|
|
441
|
+
this.store.setDone()
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Records that the user has provided consent in the store
|
|
446
|
+
* @returns {void}
|
|
447
|
+
*/
|
|
448
|
+
setConsented() {
|
|
449
|
+
this.store.setConsented()
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Ensures the user is known and consented, creating a server-side record if needed.
|
|
454
|
+
* @returns {Promise<void>}
|
|
455
|
+
*/
|
|
456
|
+
async connectDB() {
|
|
457
|
+
if (!this.store.cookieState.knownUser) {
|
|
458
|
+
await this.store.setKnown()
|
|
459
|
+
this.store.setConsented()
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Records that the user has withdrawn from the study and stores their withdrawal form info
|
|
465
|
+
* @param {object} forminfo - The withdrawal form information provided by the user
|
|
466
|
+
* @returns {void}
|
|
467
|
+
*/
|
|
468
|
+
setWithdrawn(forminfo) {
|
|
469
|
+
this.store.setWithdrawn(forminfo)
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Sets whether the browser window visibility has been verified
|
|
474
|
+
* @param {boolean} value - True if visibility is verified, false otherwise
|
|
475
|
+
* @returns {void}
|
|
476
|
+
*/
|
|
477
|
+
verifyVisibility(value) {
|
|
478
|
+
this.store.verifyVisibility(value)
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Records a form submission in the store
|
|
483
|
+
* @deprecated Use recordPageData() instead. This method will be removed in a future version.
|
|
484
|
+
* @param {string} name - The name/identifier of the form
|
|
485
|
+
* @param {*} data - The form data to store
|
|
486
|
+
* @returns {void}
|
|
487
|
+
*/
|
|
488
|
+
recordForm(name, data) {
|
|
489
|
+
this.logStore.warn('SMILE API: recordForm() is deprecated. Use recordPageData() instead.')
|
|
490
|
+
this.store.recordProperty(name, data) // Keep for backward compat
|
|
491
|
+
this.recordPageData(data) // Also record to new format
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Records a named property in the store
|
|
496
|
+
* @param {string} name - The name of the property
|
|
497
|
+
* @param {*} data - The property value to store
|
|
498
|
+
* @returns {void}
|
|
499
|
+
*/
|
|
500
|
+
recordProperty(name, data) {
|
|
501
|
+
this.store.recordProperty(name, data)
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Validates data structure for safe storage.
|
|
506
|
+
* Rejects:
|
|
507
|
+
* - Nested arrays (arrays containing arrays)
|
|
508
|
+
* - Functions or Symbols
|
|
509
|
+
* - Keys containing ".", "/", "[", "]", or "*"
|
|
510
|
+
*
|
|
511
|
+
* @param {*} value - The value to validate
|
|
512
|
+
* @param {string} [path] - Current path for error messages
|
|
513
|
+
* @returns {{valid: boolean, error: string|null}} Validation result
|
|
514
|
+
* @private
|
|
515
|
+
*/
|
|
516
|
+
validateData(value, path = '') {
|
|
517
|
+
// Null/undefined are valid
|
|
518
|
+
if (value === null || value === undefined) {
|
|
519
|
+
return { valid: true, error: null }
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// Primitives are valid
|
|
523
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || value instanceof Date) {
|
|
524
|
+
return { valid: true, error: null }
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
// Check for unsupported types
|
|
528
|
+
if (typeof value === 'function') {
|
|
529
|
+
return { valid: false, error: `Functions are not supported at path: ${path || 'root'}` }
|
|
530
|
+
}
|
|
531
|
+
if (typeof value === 'symbol') {
|
|
532
|
+
return { valid: false, error: `Symbols are not supported at path: ${path || 'root'}` }
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// Check arrays
|
|
536
|
+
if (Array.isArray(value)) {
|
|
537
|
+
for (let i = 0; i < value.length; i++) {
|
|
538
|
+
// Check for nested arrays
|
|
539
|
+
if (Array.isArray(value[i])) {
|
|
540
|
+
return {
|
|
541
|
+
valid: false,
|
|
542
|
+
error: `Nested arrays are not allowed in Firestore at path: ${path}[${i}]`,
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
// Recursively validate array elements
|
|
546
|
+
const result = this.validateData(value[i], `${path}[${i}]`)
|
|
547
|
+
if (!result.valid) {
|
|
548
|
+
return result
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
return { valid: true, error: null }
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
// Check objects
|
|
555
|
+
if (typeof value === 'object') {
|
|
556
|
+
for (const [key, val] of Object.entries(value)) {
|
|
557
|
+
// Check for invalid key characters
|
|
558
|
+
if (/[./[\]*]/.test(key)) {
|
|
559
|
+
return {
|
|
560
|
+
valid: false,
|
|
561
|
+
error: `Invalid key name "${key}" at path: ${path || 'root'}. Keys cannot contain ".", "/", "[", "]", or "*"`,
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
// Recursively validate object values
|
|
565
|
+
const result = this.validateData(val, path ? `${path}.${key}` : key)
|
|
566
|
+
if (!result.valid) {
|
|
567
|
+
return result
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
return { valid: true, error: null }
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
return { valid: false, error: `Unsupported data type at path: ${path || 'root'}` }
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Records data associated with a specific page/route.
|
|
578
|
+
* Data is organized by visit number using visit_N keys (visit_0, visit_1, etc.).
|
|
579
|
+
* Multiple calls within the same visit append to that visit's timestamps and data arrays.
|
|
580
|
+
*
|
|
581
|
+
* Note: Data must be Firestore-compatible. Arrays at the top level are not allowed
|
|
582
|
+
* because they would create nested arrays when stored. Use an object wrapper instead.
|
|
583
|
+
*
|
|
584
|
+
* @param {object} data - The data to record for this page (must be an object, not an array)
|
|
585
|
+
* @param {string} [routeName] - Optional route name override. Uses current route if not provided
|
|
586
|
+
* @returns {boolean} True if data was recorded successfully, false if validation failed
|
|
587
|
+
*
|
|
588
|
+
* @example
|
|
589
|
+
* // Record data for current page (uses current route name)
|
|
590
|
+
* api.recordPageData({ response: 'yes', rt: 1234 })
|
|
591
|
+
*
|
|
592
|
+
* // Record data with explicit route name
|
|
593
|
+
* api.recordPageData({ response: 'no' }, 'custom_page')
|
|
594
|
+
*
|
|
595
|
+
* // Data structure after multiple visits:
|
|
596
|
+
* // pageData_trial: {
|
|
597
|
+
* // visit_0: { timestamps: [...], data: [...] },
|
|
598
|
+
* // visit_1: { timestamps: [...], data: [...] }
|
|
599
|
+
* // }
|
|
600
|
+
*
|
|
601
|
+
* // WRONG: Don't pass arrays directly (will be rejected)
|
|
602
|
+
* api.recordPageData([1, 2, 3]) // Error: use { items: [1, 2, 3] } instead
|
|
603
|
+
*/
|
|
604
|
+
recordPageData(data, routeName = null) {
|
|
605
|
+
const pageName = routeName || this.currentRouteName()
|
|
606
|
+
if (!pageName) {
|
|
607
|
+
this.logStore.error('SMILE API: recordPageData() - No route name available')
|
|
608
|
+
return false
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
// Validate that data is not an array (would create nested arrays)
|
|
612
|
+
if (Array.isArray(data)) {
|
|
613
|
+
this.logStore.error(
|
|
614
|
+
'SMILE API: recordPageData() - Data cannot be an array (would create nested arrays). '
|
|
615
|
+
+ 'Wrap your array in an object, e.g., { items: [...] }',
|
|
616
|
+
)
|
|
617
|
+
return false
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// Validate Firestore compatibility
|
|
621
|
+
const validation = this.validateData(data)
|
|
622
|
+
if (!validation.valid) {
|
|
623
|
+
this.logStore.error(`SMILE API: recordPageData() - Invalid data: ${validation.error}`)
|
|
624
|
+
return false
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
const fieldName = `pageData_${pageName}`
|
|
628
|
+
|
|
629
|
+
// Calculate current visit index from routeOrder
|
|
630
|
+
const visitCount = this.store.data.routeOrder
|
|
631
|
+
? this.store.data.routeOrder.filter(entry => entry.route === pageName).length
|
|
632
|
+
: 0
|
|
633
|
+
const currentVisitIndex = Math.max(0, visitCount - 1) // -1 because current visit is already in routeOrder
|
|
634
|
+
const visitKey = `visit_${currentVisitIndex}`
|
|
635
|
+
|
|
636
|
+
// Initialize pageData field if it doesn't exist
|
|
637
|
+
if (!this.store.data[fieldName]) {
|
|
638
|
+
this.store.data[fieldName] = {}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
// Initialize visit structure if it doesn't exist
|
|
642
|
+
if (!this.store.data[fieldName][visitKey]) {
|
|
643
|
+
this.store.data[fieldName][visitKey] = {
|
|
644
|
+
timestamps: [],
|
|
645
|
+
data: [],
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
// Append timestamp and data to the current visit
|
|
650
|
+
this.store.data[fieldName][visitKey].timestamps.push(Date.now())
|
|
651
|
+
this.store.data[fieldName][visitKey].data.push(JSON.parse(JSON.stringify(data)))
|
|
652
|
+
|
|
653
|
+
this.logStore.debug(`SMILE API: recordPageData() recorded to ${fieldName}.${visitKey}`, data)
|
|
654
|
+
|
|
655
|
+
return true
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Gets whether browser window visibility has been verified
|
|
660
|
+
* @returns {boolean} True if visibility is verified, false otherwise
|
|
661
|
+
*/
|
|
662
|
+
getVerifiedVisibility() {
|
|
663
|
+
return this.store.verifiedVisibility
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
// Browser checks
|
|
667
|
+
/**
|
|
668
|
+
* Checks if the browser window dimensions are smaller than the required dimensions
|
|
669
|
+
* @param {number} width - The current width to check against minimum requirements
|
|
670
|
+
* @param {number} height - The current height to check against minimum requirements
|
|
671
|
+
* @returns {boolean} True if browser window is too small, false otherwise
|
|
672
|
+
*/
|
|
673
|
+
isBrowserTooSmall(width, height) {
|
|
674
|
+
let val = false
|
|
675
|
+
if (
|
|
676
|
+
this.store.config.windowsizerAggressive === true
|
|
677
|
+
&& this.store.data.verifiedVisibility === true
|
|
678
|
+
&& !this.store.cookieState.withdrawn
|
|
679
|
+
) {
|
|
680
|
+
val
|
|
681
|
+
= width < this.store.config.windowsizerRequest.width + 10
|
|
682
|
+
|| height < this.store.config.windowsizerRequest.height + 85 // margin for status bar
|
|
683
|
+
}
|
|
684
|
+
return val
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
// Development tools
|
|
688
|
+
/**
|
|
689
|
+
* Sets an autofill function for development mode
|
|
690
|
+
* @param {Function} autofill - The autofill function to register
|
|
691
|
+
* @returns {void}
|
|
692
|
+
*/
|
|
693
|
+
setAutofill(autofill) {
|
|
694
|
+
this.logStore.debug('SMILEAPI: registering autofill function')
|
|
695
|
+
if (import.meta.dev) this.store.setAutofill(autofill)
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Removes the registered autofill function in development mode
|
|
700
|
+
* @returns {void}
|
|
701
|
+
*/
|
|
702
|
+
removeAutofill() {
|
|
703
|
+
this.logStore.debug('SMILEAPI: removing autofill')
|
|
704
|
+
if (import.meta.dev) this.store.removeAutofill()
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
// Completion and recruitment
|
|
708
|
+
/**
|
|
709
|
+
* Sets the completion code for the study
|
|
710
|
+
* @param {string} code - The completion code to set
|
|
711
|
+
* @returns {void}
|
|
712
|
+
*/
|
|
713
|
+
setCompletionCode(code) {
|
|
714
|
+
this.store.setCompletionCode(code)
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Computes a unique completion code based on study data.
|
|
719
|
+
* Creates a hash of all pageData_* fields and appends status indicators.
|
|
720
|
+
* Falls back to studyData for backward compatibility if no pageData fields exist.
|
|
721
|
+
*
|
|
722
|
+
* @returns {string} A unique completion code with status suffix
|
|
723
|
+
*/
|
|
724
|
+
computeCompletionCode() {
|
|
725
|
+
// Collect all pageData_* fields
|
|
726
|
+
const pageDataFields = {}
|
|
727
|
+
for (const key in this.store.data) {
|
|
728
|
+
if (key.startsWith('pageData_')) {
|
|
729
|
+
pageDataFields[key] = this.store.data[key]
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
// Use pageData if available, fallback to studyData for backward compat
|
|
734
|
+
let dataToHash
|
|
735
|
+
if (Object.keys(pageDataFields).length > 0) {
|
|
736
|
+
dataToHash = stringify(pageDataFields)
|
|
737
|
+
}
|
|
738
|
+
else {
|
|
739
|
+
dataToHash = stringify(this.store.data.studyData)
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
const hashDigest = Base64url.stringify(sha256(dataToHash))
|
|
743
|
+
|
|
744
|
+
const codes = {
|
|
745
|
+
withdrew: 'xx',
|
|
746
|
+
completed: 'oo',
|
|
747
|
+
}
|
|
748
|
+
let endCode = ''
|
|
749
|
+
if (this.store.cookieState.withdrawn) {
|
|
750
|
+
endCode = codes['withdrew']
|
|
751
|
+
}
|
|
752
|
+
else if (this.store.cookieState.done) {
|
|
753
|
+
endCode = codes['completed']
|
|
754
|
+
}
|
|
755
|
+
return hashDigest.slice(0, 20) + endCode
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* Gets the recruitment service being used (e.g. Prolific, MTurk)
|
|
760
|
+
* @returns {string} The name of the recruitment service
|
|
761
|
+
*/
|
|
762
|
+
getRecruitmentService() {
|
|
763
|
+
return this.store.data.recruitmentService
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
// dev tools
|
|
767
|
+
/**
|
|
768
|
+
* Checks if an autofill function is registered
|
|
769
|
+
* @returns {boolean} True if autofill function exists, false otherwise
|
|
770
|
+
*/
|
|
771
|
+
hasAutofill() {
|
|
772
|
+
return this.store.hasAutofill
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Executes the registered autofill function
|
|
777
|
+
* @returns {*} The result of the autofill function
|
|
778
|
+
*/
|
|
779
|
+
autofill() {
|
|
780
|
+
return this.store.autofill()
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
// routes
|
|
784
|
+
/**
|
|
785
|
+
* Gets the name of the current route from the timeline.
|
|
786
|
+
* In Nuxt, Vue Router route names are catch-all names (e.g. 'dev-slug'),
|
|
787
|
+
* so we resolve the actual timeline route name from the path.
|
|
788
|
+
* @returns {string|undefined} The current timeline route name
|
|
789
|
+
*/
|
|
790
|
+
currentRouteName() {
|
|
791
|
+
// Dev root shows RecruitmentChooserView, not the landing redirect
|
|
792
|
+
if (this.route.path === '/dev' || this.route.path === '/dev/') {
|
|
793
|
+
return 'recruit'
|
|
794
|
+
}
|
|
795
|
+
const viewConfig = this._resolveTimelineRoute()
|
|
796
|
+
return viewConfig?.name
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
// routes
|
|
800
|
+
/**
|
|
801
|
+
* Gets the info of the current route
|
|
802
|
+
* @returns {object} The current route info
|
|
803
|
+
*/
|
|
804
|
+
currentRouteInfo() {
|
|
805
|
+
return this.route
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Gets the name of the current view from the timeline.
|
|
810
|
+
* @returns {string|undefined} The current view name
|
|
811
|
+
*/
|
|
812
|
+
currentViewName() {
|
|
813
|
+
return this.currentRouteName()
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* Resolves the timeline route for the current path by stripping
|
|
818
|
+
* any /dev/ or /presentation/ prefix and looking up in $timeline.
|
|
819
|
+
* @returns {object | null} The timeline route config
|
|
820
|
+
* @private
|
|
821
|
+
*/
|
|
822
|
+
_resolveTimelineRoute() {
|
|
823
|
+
if (typeof window === 'undefined') return null
|
|
824
|
+
try {
|
|
825
|
+
const nuxtApp = useNuxtApp()
|
|
826
|
+
const timeline = nuxtApp?.$timeline
|
|
827
|
+
if (!timeline) return null
|
|
828
|
+
// Strip /dev or /presentation prefix to get the experiment path
|
|
829
|
+
const path = this.route.path.replace(/^\/(dev|presentation)(\/|$)/, '/') || '/'
|
|
830
|
+
return timeline.getViewForPath(path)
|
|
831
|
+
}
|
|
832
|
+
catch {
|
|
833
|
+
return null
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* Gets a condition by its name
|
|
839
|
+
* @param {string} name - The name of the condition to get
|
|
840
|
+
* @returns {*} The condition value
|
|
841
|
+
*/
|
|
842
|
+
getConditionByName(name) {
|
|
843
|
+
return this.store.getConditionByName(name)
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Gets the browser fingerprint
|
|
848
|
+
* @returns {string} The browser fingerprint
|
|
849
|
+
*/
|
|
850
|
+
getBrowserFingerprint() {
|
|
851
|
+
return this.store.getBrowserFingerprint()
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
// Event and trial management
|
|
855
|
+
/**
|
|
856
|
+
* Records a window event
|
|
857
|
+
* @param {string} type - The type of window event
|
|
858
|
+
* @param {*} event_data - Additional event data (optional)
|
|
859
|
+
* @returns {void}
|
|
860
|
+
*/
|
|
861
|
+
recordWindowEvent(type, event_data = null) {
|
|
862
|
+
this.store.recordWindowEvent(type, event_data)
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Saves the current data
|
|
867
|
+
* @param {boolean} force - Whether to force save
|
|
868
|
+
* @returns {void}
|
|
869
|
+
*/
|
|
870
|
+
saveData(force) {
|
|
871
|
+
this.store.saveData(force)
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Records trial data and increments trial counter
|
|
876
|
+
* @deprecated Use recordPageData() instead. The studyData array will be maintained for backward compatibility but is deprecated.
|
|
877
|
+
* @param {*} data - The trial data to record
|
|
878
|
+
* @returns {void}
|
|
879
|
+
*/
|
|
880
|
+
recordData(data) {
|
|
881
|
+
this.logStore.warn('SMILE API: recordData() is deprecated. Use recordPageData() instead.')
|
|
882
|
+
this.store.data.trialNum += 1
|
|
883
|
+
this.store.recordData(data) // Keep for backward compat
|
|
884
|
+
this.recordPageData(data) // Also record to new format
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
// Randomization and conditions
|
|
888
|
+
/**
|
|
889
|
+
* Sets a random seed for the random number generator
|
|
890
|
+
* @param {string} [seed] - The seed to use, defaults to a random UUID
|
|
891
|
+
* @returns {void}
|
|
892
|
+
*/
|
|
893
|
+
randomSeed(seed = uuidv4()) {
|
|
894
|
+
seedrandom(seed, { global: true })
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* Randomly assigns a condition from a set of possible conditions
|
|
899
|
+
* @param {object} conditionObject - Object containing condition name and possible values
|
|
900
|
+
* @param {string[]} conditionObject[name] - Array of possible condition values
|
|
901
|
+
* @param {number[]} [conditionObject.weights] - Optional weights for sampling conditions
|
|
902
|
+
* @returns {string|null} The assigned condition value, or null if error
|
|
903
|
+
*/
|
|
904
|
+
randomAssignCondition(conditionObject) {
|
|
905
|
+
const keys = Object.keys(conditionObject)
|
|
906
|
+
const conditionNames = keys.filter(key => key !== 'weights')
|
|
907
|
+
|
|
908
|
+
if (conditionNames.length > 1) {
|
|
909
|
+
this.logStore.error('SMILE API: randomAssignCondition() only accepts one condition name at a time')
|
|
910
|
+
return null
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
const [name] = conditionNames
|
|
914
|
+
const currentCondition = this.store.getConditionByName(name)
|
|
915
|
+
if (currentCondition) {
|
|
916
|
+
this.logStore.debug('SMILE API: condition already assigned', name, currentCondition)
|
|
917
|
+
return currentCondition
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
const possibleConditions = conditionObject[name]
|
|
921
|
+
this.store.localState.possibleConditions[name] = possibleConditions
|
|
922
|
+
|
|
923
|
+
const hasWeights = keys.includes('weights')
|
|
924
|
+
const weights = hasWeights ? conditionObject.weights : undefined
|
|
925
|
+
|
|
926
|
+
if (hasWeights && weights.length !== possibleConditions.length) {
|
|
927
|
+
this.logStore.error(
|
|
928
|
+
'SMILE API: randomAssignCondition() weights must be the same length as the condition possibilities',
|
|
929
|
+
)
|
|
930
|
+
return null
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
const randomCondition = sampleWithReplacement(possibleConditions, 1, weights)[0]
|
|
934
|
+
this.store.setCondition(name, randomCondition)
|
|
935
|
+
this.logStore.debug('SMILE API: assigned condition', name, randomCondition)
|
|
936
|
+
return randomCondition
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* Preloads all images from the user assets directory
|
|
941
|
+
* @returns {void}
|
|
942
|
+
*/
|
|
943
|
+
preloadAllImages() {
|
|
944
|
+
// TODO: import.meta.glob paths need updating for Nuxt module context.
|
|
945
|
+
// User assets will be in the consuming app, not the module.
|
|
946
|
+
this.logStore.debug('Preloading images')
|
|
947
|
+
// TODO: import.meta.glob paths need updating for Nuxt module context.
|
|
948
|
+
// User assets live in the consuming app, not the module.
|
|
949
|
+
this.logStore.debug('Image preloading not yet implemented for Nuxt module')
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* Preloads all videos from the user assets directory
|
|
954
|
+
* @returns {void}
|
|
955
|
+
*/
|
|
956
|
+
preloadAllVideos() {
|
|
957
|
+
// TODO: import.meta.glob paths need updating for Nuxt module context.
|
|
958
|
+
// User assets will be in the consuming app, not the module.
|
|
959
|
+
this.logStore.debug('Preloading videos')
|
|
960
|
+
// TODO: import.meta.glob paths need updating for Nuxt module context.
|
|
961
|
+
// User assets live in the consuming app, not the module.
|
|
962
|
+
this.logStore.debug('Video preloading not yet implemented for Nuxt module')
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Completes the consent process by setting consented status and known user if needed
|
|
967
|
+
* @returns {Promise<void>}
|
|
968
|
+
*/
|
|
969
|
+
async completeConsent() {
|
|
970
|
+
this.setConsented()
|
|
971
|
+
if (!this.store.cookieState.knownUser) {
|
|
972
|
+
await this.setKnown()
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Creates and returns a reactive SmileAPI instance with necessary dependencies
|
|
979
|
+
* @returns {SmileAPI} A reactive SmileAPI instance with timeline, routing and store functionality
|
|
980
|
+
*/
|
|
981
|
+
export default function useAPI() {
|
|
982
|
+
const timeline = useTimeline()
|
|
983
|
+
const route = useRoute()
|
|
984
|
+
const router = useRouter()
|
|
985
|
+
const store = useSmileStore()
|
|
986
|
+
const logStore = useLog()
|
|
987
|
+
const runtimeConfig = useRuntimeConfig()
|
|
988
|
+
|
|
989
|
+
const api = new SmileAPI(store, logStore, route, router, timeline, runtimeConfig)
|
|
990
|
+
return reactive(api)
|
|
991
|
+
}
|