@astral/ui 4.82.0 → 4.84.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/_mocks/LoggerMock/LoggerMock.d.ts +16 -0
- package/_mocks/LoggerMock/LoggerMock.js +18 -0
- package/_mocks/LoggerMock/index.d.ts +1 -0
- package/_mocks/LoggerMock/index.js +1 -0
- package/components/ConfigProvider/ConfigProvider.d.ts +7 -1
- package/components/ConfigProvider/ConfigProvider.js +14 -8
- package/components/ConfirmDialog/ConfirmDialog.js +3 -1
- package/components/ConfirmDialog/constants.d.ts +4 -0
- package/components/ConfirmDialog/constants.js +5 -0
- package/components/ConfirmDialog/index.d.ts +1 -0
- package/components/ConfirmDialog/index.js +1 -0
- package/components/ConfirmDialog/public.d.ts +1 -0
- package/components/ConfirmDialog/public.js +1 -0
- package/components/ConfirmDialog/types.d.ts +1 -1
- package/components/DashboardLayout/Header/useLogic/useLogic.d.ts +1 -1
- package/components/NewPopover/NewPopover.d.ts +1 -1
- package/components/NewPopover/NewPopover.js +14 -5
- package/components/NewPopover/constants.d.ts +7 -0
- package/components/NewPopover/constants.js +11 -0
- package/components/NewPopover/styles.d.ts +4 -0
- package/components/NewPopover/styles.js +100 -4
- package/components/NewPopover/types.d.ts +13 -0
- package/components/NewPopover/useLogic/useLogic.d.ts +7 -3
- package/components/NewPopover/useLogic/useLogic.js +15 -1
- package/components/Onboarding/Onboarding.d.ts +35 -0
- package/components/Onboarding/Onboarding.js +56 -0
- package/components/Onboarding/constants.d.ts +34 -0
- package/components/Onboarding/constants.js +34 -0
- package/components/Onboarding/core/ActiveStepStore/ActiveStepStore.d.ts +50 -0
- package/components/Onboarding/core/ActiveStepStore/ActiveStepStore.js +63 -0
- package/components/Onboarding/core/ActiveStepStore/index.d.ts +1 -0
- package/components/Onboarding/core/ActiveStepStore/index.js +1 -0
- package/components/Onboarding/core/ExitController/ExitController.d.ts +48 -0
- package/components/Onboarding/core/ExitController/ExitController.js +59 -0
- package/components/Onboarding/core/ExitController/index.d.ts +1 -0
- package/components/Onboarding/core/ExitController/index.js +1 -0
- package/components/Onboarding/core/OnboardingTour/OnboardingTour.d.ts +103 -0
- package/components/Onboarding/core/OnboardingTour/OnboardingTour.js +283 -0
- package/components/Onboarding/core/OnboardingTour/index.d.ts +1 -0
- package/components/Onboarding/core/OnboardingTour/index.js +1 -0
- package/components/Onboarding/core/ProgressStorage/ProgressStorage.d.ts +24 -0
- package/components/Onboarding/core/ProgressStorage/ProgressStorage.js +62 -0
- package/components/Onboarding/core/ProgressStorage/index.d.ts +1 -0
- package/components/Onboarding/core/ProgressStorage/index.js +1 -0
- package/components/Onboarding/core/StepNavigator/StepNavigator.d.ts +28 -0
- package/components/Onboarding/core/StepNavigator/StepNavigator.js +73 -0
- package/components/Onboarding/core/StepNavigator/index.d.ts +1 -0
- package/components/Onboarding/core/StepNavigator/index.js +1 -0
- package/components/Onboarding/core/StepResolver/StepResolver.d.ts +19 -0
- package/components/Onboarding/core/StepResolver/StepResolver.js +49 -0
- package/components/Onboarding/core/StepResolver/index.d.ts +1 -0
- package/components/Onboarding/core/StepResolver/index.js +1 -0
- package/components/Onboarding/core/StepsController/StepsController.d.ts +16 -0
- package/components/Onboarding/core/StepsController/StepsController.js +35 -0
- package/components/Onboarding/core/StepsController/index.d.ts +1 -0
- package/components/Onboarding/core/StepsController/index.js +1 -0
- package/components/Onboarding/faker.d.ts +27 -0
- package/components/Onboarding/faker.js +79 -0
- package/components/Onboarding/index.d.ts +5 -0
- package/components/Onboarding/index.js +3 -0
- package/components/Onboarding/public.d.ts +5 -0
- package/components/Onboarding/public.js +3 -0
- package/components/Onboarding/services/LocalStorageSaveStrategy/LocalStorageSaveStrategy.d.ts +20 -0
- package/components/Onboarding/services/LocalStorageSaveStrategy/LocalStorageSaveStrategy.js +24 -0
- package/components/Onboarding/services/LocalStorageSaveStrategy/index.d.ts +1 -0
- package/components/Onboarding/services/LocalStorageSaveStrategy/index.js +1 -0
- package/components/Onboarding/types/config.d.ts +18 -0
- package/components/Onboarding/types/config.js +1 -0
- package/components/Onboarding/types/index.d.ts +4 -0
- package/components/Onboarding/types/index.js +4 -0
- package/components/Onboarding/types/progress.d.ts +28 -0
- package/components/Onboarding/types/progress.js +1 -0
- package/components/Onboarding/types/step.d.ts +144 -0
- package/components/Onboarding/types/step.js +1 -0
- package/components/Onboarding/types/tour.d.ts +168 -0
- package/components/Onboarding/types/tour.js +1 -0
- package/components/Onboarding/ui/ConfirmExit/ConfirmExit.d.ts +10 -0
- package/components/Onboarding/ui/ConfirmExit/ConfirmExit.js +6 -0
- package/components/Onboarding/ui/ConfirmExit/index.d.ts +2 -0
- package/components/Onboarding/ui/ConfirmExit/index.js +1 -0
- package/components/Onboarding/ui/ConfirmExit/styles.d.ts +30 -0
- package/components/Onboarding/ui/ConfirmExit/styles.js +11 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingContainer.d.ts +12 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingContainer.js +15 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/OnboardingErrorBoundary.d.ts +22 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/OnboardingErrorBoundary.js +20 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/index.d.ts +2 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/index.js +1 -0
- package/components/Onboarding/ui/OnboardingContainer/index.d.ts +1 -0
- package/components/Onboarding/ui/OnboardingContainer/index.js +1 -0
- package/components/Onboarding/ui/OnboardingContainer/useLogic/index.d.ts +1 -0
- package/components/Onboarding/ui/OnboardingContainer/useLogic/index.js +1 -0
- package/components/Onboarding/ui/OnboardingContainer/useLogic/useLogic.d.ts +10 -0
- package/components/Onboarding/ui/OnboardingContainer/useLogic/useLogic.js +14 -0
- package/components/Onboarding/ui/Overlay/Overlay.d.ts +29 -0
- package/components/Onboarding/ui/Overlay/Overlay.js +24 -0
- package/components/Onboarding/ui/Overlay/constants.d.ts +7 -0
- package/components/Onboarding/ui/Overlay/constants.js +8 -0
- package/components/Onboarding/ui/Overlay/index.d.ts +2 -0
- package/components/Onboarding/ui/Overlay/index.js +1 -0
- package/components/Onboarding/ui/Overlay/styles.d.ts +22 -0
- package/components/Onboarding/ui/Overlay/styles.js +57 -0
- package/components/Onboarding/ui/Overlay/useLogic/index.d.ts +1 -0
- package/components/Onboarding/ui/Overlay/useLogic/index.js +1 -0
- package/components/Onboarding/ui/Overlay/useLogic/useLogic.d.ts +13 -0
- package/components/Onboarding/ui/Overlay/useLogic/useLogic.js +10 -0
- package/components/Onboarding/ui/StepStrategy/StepStrategy.d.ts +6 -0
- package/components/Onboarding/ui/StepStrategy/StepStrategy.js +17 -0
- package/components/Onboarding/ui/StepStrategy/index.d.ts +1 -0
- package/components/Onboarding/ui/StepStrategy/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/HighlightStep.d.ts +6 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/HighlightStep.js +19 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/index.d.ts +2 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.d.ts +25 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.js +56 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/index.d.ts +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/useLogic.d.ts +12 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/useLogic.js +37 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.d.ts +6 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.js +11 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/index.d.ts +2 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +13 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.js +9 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/ProgressDots.d.ts +6 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/ProgressDots.js +15 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/constants.d.ts +4 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/constants.js +5 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/index.d.ts +2 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/styles.d.ts +9 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/styles.js +34 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/StepFooter.d.ts +9 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/StepFooter.js +18 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/constants.d.ts +4 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/constants.js +4 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/index.d.ts +2 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/styles.d.ts +21 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/styles.js +28 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/index.d.ts +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/useLogic.d.ts +16 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/useLogic.js +22 -0
- package/components/Onboarding/ui/StepStrategy/steps/types.d.ts +16 -0
- package/components/Onboarding/ui/StepStrategy/steps/types.js +1 -0
- package/components/Onboarding/ui/StepStrategy/useLogic/index.d.ts +1 -0
- package/components/Onboarding/ui/StepStrategy/useLogic/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/useLogic/useLogic.d.ts +47 -0
- package/components/Onboarding/ui/StepStrategy/useLogic/useLogic.js +51 -0
- package/components/Onboarding/ui/hooks/useActiveStep/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useActiveStep/index.js +1 -0
- package/components/Onboarding/ui/hooks/useActiveStep/useActiveStep.d.ts +6 -0
- package/components/Onboarding/ui/hooks/useActiveStep/useActiveStep.js +7 -0
- package/components/Onboarding/ui/hooks/useDelayedActiveStep/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useDelayedActiveStep/index.js +1 -0
- package/components/Onboarding/ui/hooks/useDelayedActiveStep/useDelayedActiveStep.d.ts +15 -0
- package/components/Onboarding/ui/hooks/useDelayedActiveStep/useDelayedActiveStep.js +19 -0
- package/components/Onboarding/ui/hooks/useFocusTrap/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useFocusTrap/index.js +1 -0
- package/components/Onboarding/ui/hooks/useFocusTrap/useFocusTrap.d.ts +6 -0
- package/components/Onboarding/ui/hooks/useFocusTrap/useFocusTrap.js +33 -0
- package/components/Onboarding/ui/hooks/useKeyboardNav/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useKeyboardNav/index.js +1 -0
- package/components/Onboarding/ui/hooks/useKeyboardNav/useKeyboardNav.d.ts +11 -0
- package/components/Onboarding/ui/hooks/useKeyboardNav/useKeyboardNav.js +62 -0
- package/components/Onboarding/ui/hooks/useStepTransition/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useStepTransition/index.js +1 -0
- package/components/Onboarding/ui/hooks/useStepTransition/useStepTransition.d.ts +30 -0
- package/components/Onboarding/ui/hooks/useStepTransition/useStepTransition.js +46 -0
- package/components/Onboarding/ui/hooks/useTargetAnchor/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useTargetAnchor/index.js +1 -0
- package/components/Onboarding/ui/hooks/useTargetAnchor/useTargetAnchor.d.ts +37 -0
- package/components/Onboarding/ui/hooks/useTargetAnchor/useTargetAnchor.js +56 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/index.js +1 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.d.ts +5 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.js +43 -0
- package/components/Onboarding/ui/hooks/useViewportSize/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useViewportSize/index.js +1 -0
- package/components/Onboarding/ui/hooks/useViewportSize/useViewportSize.d.ts +5 -0
- package/components/Onboarding/ui/hooks/useViewportSize/useViewportSize.js +14 -0
- package/components/Onboarding/ui/styles.d.ts +5 -0
- package/components/Onboarding/ui/styles.js +15 -0
- package/components/Onboarding/utils/createVirtualAnchor/createVirtualAnchor.d.ts +12 -0
- package/components/Onboarding/utils/createVirtualAnchor/createVirtualAnchor.js +6 -0
- package/components/Onboarding/utils/createVirtualAnchor/index.d.ts +1 -0
- package/components/Onboarding/utils/createVirtualAnchor/index.js +1 -0
- package/components/Onboarding/utils/geometry/index.d.ts +4 -0
- package/components/Onboarding/utils/geometry/index.js +4 -0
- package/components/Onboarding/utils/geometry/overlayPath/index.d.ts +1 -0
- package/components/Onboarding/utils/geometry/overlayPath/index.js +1 -0
- package/components/Onboarding/utils/geometry/overlayPath/overlayPath.d.ts +6 -0
- package/components/Onboarding/utils/geometry/overlayPath/overlayPath.js +29 -0
- package/components/Onboarding/utils/geometry/parseOffset/index.d.ts +1 -0
- package/components/Onboarding/utils/geometry/parseOffset/index.js +1 -0
- package/components/Onboarding/utils/geometry/parseOffset/parseOffset.d.ts +4 -0
- package/components/Onboarding/utils/geometry/parseOffset/parseOffset.js +5 -0
- package/components/Onboarding/utils/geometry/rect/index.d.ts +2 -0
- package/components/Onboarding/utils/geometry/rect/index.js +1 -0
- package/components/Onboarding/utils/geometry/rect/rect.d.ts +34 -0
- package/components/Onboarding/utils/geometry/rect/rect.js +60 -0
- package/components/Onboarding/utils/geometry/viewport/index.d.ts +2 -0
- package/components/Onboarding/utils/geometry/viewport/index.js +1 -0
- package/components/Onboarding/utils/geometry/viewport/viewport.d.ts +14 -0
- package/components/Onboarding/utils/geometry/viewport/viewport.js +10 -0
- package/components/Onboarding/utils/getScrollParents/getScrollParents.d.ts +7 -0
- package/components/Onboarding/utils/getScrollParents/getScrollParents.js +24 -0
- package/components/Onboarding/utils/getScrollParents/index.d.ts +1 -0
- package/components/Onboarding/utils/getScrollParents/index.js +1 -0
- package/components/Onboarding/utils/getTargetElement/getTargetElement.d.ts +4 -0
- package/components/Onboarding/utils/getTargetElement/getTargetElement.js +9 -0
- package/components/Onboarding/utils/getTargetElement/index.d.ts +1 -0
- package/components/Onboarding/utils/getTargetElement/index.js +1 -0
- package/components/Onboarding/utils/observeRemoval/index.d.ts +1 -0
- package/components/Onboarding/utils/observeRemoval/index.js +1 -0
- package/components/Onboarding/utils/observeRemoval/observeRemoval.d.ts +4 -0
- package/components/Onboarding/utils/observeRemoval/observeRemoval.js +13 -0
- package/components/Onboarding/utils/scrollIntoView/index.d.ts +1 -0
- package/components/Onboarding/utils/scrollIntoView/index.js +1 -0
- package/components/Onboarding/utils/scrollIntoView/scrollIntoView.d.ts +13 -0
- package/components/Onboarding/utils/scrollIntoView/scrollIntoView.js +85 -0
- package/components/Onboarding/utils/waitForElement/index.d.ts +2 -0
- package/components/Onboarding/utils/waitForElement/index.js +1 -0
- package/components/Onboarding/utils/waitForElement/waitForElement.d.ts +21 -0
- package/components/Onboarding/utils/waitForElement/waitForElement.js +45 -0
- package/components/Onboarding/validation/index.d.ts +1 -0
- package/components/Onboarding/validation/index.js +1 -0
- package/components/Onboarding/validation/validateTourConfig/index.d.ts +1 -0
- package/components/Onboarding/validation/validateTourConfig/index.js +1 -0
- package/components/Onboarding/validation/validateTourConfig/validateTourConfig.d.ts +12 -0
- package/components/Onboarding/validation/validateTourConfig/validateTourConfig.js +52 -0
- package/node/_mocks/LoggerMock/LoggerMock.d.ts +16 -0
- package/node/_mocks/LoggerMock/LoggerMock.js +23 -0
- package/node/_mocks/LoggerMock/index.d.ts +1 -0
- package/node/_mocks/LoggerMock/index.js +17 -0
- package/node/components/ConfigProvider/ConfigProvider.d.ts +7 -1
- package/node/components/ConfigProvider/ConfigProvider.js +13 -7
- package/node/components/ConfirmDialog/ConfirmDialog.js +3 -1
- package/node/components/ConfirmDialog/constants.d.ts +4 -0
- package/node/components/ConfirmDialog/constants.js +8 -0
- package/node/components/ConfirmDialog/index.d.ts +1 -0
- package/node/components/ConfirmDialog/index.js +3 -0
- package/node/components/ConfirmDialog/public.d.ts +1 -0
- package/node/components/ConfirmDialog/public.js +3 -0
- package/node/components/ConfirmDialog/types.d.ts +1 -1
- package/node/components/DashboardLayout/Header/useLogic/useLogic.d.ts +1 -1
- package/node/components/NewPopover/NewPopover.d.ts +1 -1
- package/node/components/NewPopover/NewPopover.js +12 -3
- package/node/components/NewPopover/constants.d.ts +7 -0
- package/node/components/NewPopover/constants.js +12 -1
- package/node/components/NewPopover/styles.d.ts +4 -0
- package/node/components/NewPopover/styles.js +101 -5
- package/node/components/NewPopover/types.d.ts +13 -0
- package/node/components/NewPopover/useLogic/useLogic.d.ts +7 -3
- package/node/components/NewPopover/useLogic/useLogic.js +15 -1
- package/node/components/Onboarding/Onboarding.d.ts +35 -0
- package/node/components/Onboarding/Onboarding.js +61 -0
- package/node/components/Onboarding/constants.d.ts +34 -0
- package/node/components/Onboarding/constants.js +37 -0
- package/node/components/Onboarding/core/ActiveStepStore/ActiveStepStore.d.ts +50 -0
- package/node/components/Onboarding/core/ActiveStepStore/ActiveStepStore.js +67 -0
- package/node/components/Onboarding/core/ActiveStepStore/index.d.ts +1 -0
- package/node/components/Onboarding/core/ActiveStepStore/index.js +17 -0
- package/node/components/Onboarding/core/ExitController/ExitController.d.ts +48 -0
- package/node/components/Onboarding/core/ExitController/ExitController.js +63 -0
- package/node/components/Onboarding/core/ExitController/index.d.ts +1 -0
- package/node/components/Onboarding/core/ExitController/index.js +17 -0
- package/node/components/Onboarding/core/OnboardingTour/OnboardingTour.d.ts +103 -0
- package/node/components/Onboarding/core/OnboardingTour/OnboardingTour.js +287 -0
- package/node/components/Onboarding/core/OnboardingTour/index.d.ts +1 -0
- package/node/components/Onboarding/core/OnboardingTour/index.js +5 -0
- package/node/components/Onboarding/core/ProgressStorage/ProgressStorage.d.ts +24 -0
- package/node/components/Onboarding/core/ProgressStorage/ProgressStorage.js +66 -0
- package/node/components/Onboarding/core/ProgressStorage/index.d.ts +1 -0
- package/node/components/Onboarding/core/ProgressStorage/index.js +17 -0
- package/node/components/Onboarding/core/StepNavigator/StepNavigator.d.ts +28 -0
- package/node/components/Onboarding/core/StepNavigator/StepNavigator.js +77 -0
- package/node/components/Onboarding/core/StepNavigator/index.d.ts +1 -0
- package/node/components/Onboarding/core/StepNavigator/index.js +17 -0
- package/node/components/Onboarding/core/StepResolver/StepResolver.d.ts +19 -0
- package/node/components/Onboarding/core/StepResolver/StepResolver.js +53 -0
- package/node/components/Onboarding/core/StepResolver/index.d.ts +1 -0
- package/node/components/Onboarding/core/StepResolver/index.js +17 -0
- package/node/components/Onboarding/core/StepsController/StepsController.d.ts +16 -0
- package/node/components/Onboarding/core/StepsController/StepsController.js +39 -0
- package/node/components/Onboarding/core/StepsController/index.d.ts +1 -0
- package/node/components/Onboarding/core/StepsController/index.js +17 -0
- package/node/components/Onboarding/faker.d.ts +27 -0
- package/node/components/Onboarding/faker.js +88 -0
- package/node/components/Onboarding/index.d.ts +5 -0
- package/node/components/Onboarding/index.js +9 -0
- package/node/components/Onboarding/public.d.ts +5 -0
- package/node/components/Onboarding/public.js +9 -0
- package/node/components/Onboarding/services/LocalStorageSaveStrategy/LocalStorageSaveStrategy.d.ts +20 -0
- package/node/components/Onboarding/services/LocalStorageSaveStrategy/LocalStorageSaveStrategy.js +29 -0
- package/node/components/Onboarding/services/LocalStorageSaveStrategy/index.d.ts +1 -0
- package/node/components/Onboarding/services/LocalStorageSaveStrategy/index.js +17 -0
- package/node/components/Onboarding/types/config.d.ts +18 -0
- package/node/components/Onboarding/types/config.js +2 -0
- package/node/components/Onboarding/types/index.d.ts +4 -0
- package/node/components/Onboarding/types/index.js +20 -0
- package/node/components/Onboarding/types/progress.d.ts +28 -0
- package/node/components/Onboarding/types/progress.js +2 -0
- package/node/components/Onboarding/types/step.d.ts +144 -0
- package/node/components/Onboarding/types/step.js +2 -0
- package/node/components/Onboarding/types/tour.d.ts +168 -0
- package/node/components/Onboarding/types/tour.js +2 -0
- package/node/components/Onboarding/ui/ConfirmExit/ConfirmExit.d.ts +10 -0
- package/node/components/Onboarding/ui/ConfirmExit/ConfirmExit.js +10 -0
- package/node/components/Onboarding/ui/ConfirmExit/index.d.ts +2 -0
- package/node/components/Onboarding/ui/ConfirmExit/index.js +5 -0
- package/node/components/Onboarding/ui/ConfirmExit/styles.d.ts +30 -0
- package/node/components/Onboarding/ui/ConfirmExit/styles.js +14 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingContainer.d.ts +12 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingContainer.js +19 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/OnboardingErrorBoundary.d.ts +22 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/OnboardingErrorBoundary.js +24 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/index.d.ts +2 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/index.js +5 -0
- package/node/components/Onboarding/ui/OnboardingContainer/index.d.ts +1 -0
- package/node/components/Onboarding/ui/OnboardingContainer/index.js +5 -0
- package/node/components/Onboarding/ui/OnboardingContainer/useLogic/index.d.ts +1 -0
- package/node/components/Onboarding/ui/OnboardingContainer/useLogic/index.js +5 -0
- package/node/components/Onboarding/ui/OnboardingContainer/useLogic/useLogic.d.ts +10 -0
- package/node/components/Onboarding/ui/OnboardingContainer/useLogic/useLogic.js +18 -0
- package/node/components/Onboarding/ui/Overlay/Overlay.d.ts +29 -0
- package/node/components/Onboarding/ui/Overlay/Overlay.js +28 -0
- package/node/components/Onboarding/ui/Overlay/constants.d.ts +7 -0
- package/node/components/Onboarding/ui/Overlay/constants.js +11 -0
- package/node/components/Onboarding/ui/Overlay/index.d.ts +2 -0
- package/node/components/Onboarding/ui/Overlay/index.js +5 -0
- package/node/components/Onboarding/ui/Overlay/styles.d.ts +22 -0
- package/node/components/Onboarding/ui/Overlay/styles.js +60 -0
- package/node/components/Onboarding/ui/Overlay/useLogic/index.d.ts +1 -0
- package/node/components/Onboarding/ui/Overlay/useLogic/index.js +5 -0
- package/node/components/Onboarding/ui/Overlay/useLogic/useLogic.d.ts +13 -0
- package/node/components/Onboarding/ui/Overlay/useLogic/useLogic.js +14 -0
- package/node/components/Onboarding/ui/StepStrategy/StepStrategy.d.ts +6 -0
- package/node/components/Onboarding/ui/StepStrategy/StepStrategy.js +21 -0
- package/node/components/Onboarding/ui/StepStrategy/index.d.ts +1 -0
- package/node/components/Onboarding/ui/StepStrategy/index.js +17 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/HighlightStep.d.ts +6 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/HighlightStep.js +23 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/index.d.ts +2 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.d.ts +25 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.js +59 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/index.d.ts +1 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/useLogic.d.ts +12 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/useLogic.js +41 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.d.ts +6 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.js +15 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/index.d.ts +2 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +13 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.js +12 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/ProgressDots.d.ts +6 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/ProgressDots.js +19 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/constants.d.ts +4 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/constants.js +8 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/index.d.ts +2 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/styles.d.ts +9 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/styles.js +37 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/StepFooter.d.ts +9 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/StepFooter.js +22 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/constants.d.ts +4 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/constants.js +7 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/index.d.ts +2 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/styles.d.ts +21 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/styles.js +31 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/index.d.ts +1 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/useLogic.d.ts +16 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/useLogic.js +26 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/types.d.ts +16 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/types.js +2 -0
- package/node/components/Onboarding/ui/StepStrategy/useLogic/index.d.ts +1 -0
- package/node/components/Onboarding/ui/StepStrategy/useLogic/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/useLogic/useLogic.d.ts +47 -0
- package/node/components/Onboarding/ui/StepStrategy/useLogic/useLogic.js +55 -0
- package/node/components/Onboarding/ui/hooks/useActiveStep/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useActiveStep/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useActiveStep/useActiveStep.d.ts +6 -0
- package/node/components/Onboarding/ui/hooks/useActiveStep/useActiveStep.js +11 -0
- package/node/components/Onboarding/ui/hooks/useDelayedActiveStep/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useDelayedActiveStep/index.js +17 -0
- package/node/components/Onboarding/ui/hooks/useDelayedActiveStep/useDelayedActiveStep.d.ts +15 -0
- package/node/components/Onboarding/ui/hooks/useDelayedActiveStep/useDelayedActiveStep.js +23 -0
- package/node/components/Onboarding/ui/hooks/useFocusTrap/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useFocusTrap/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useFocusTrap/useFocusTrap.d.ts +6 -0
- package/node/components/Onboarding/ui/hooks/useFocusTrap/useFocusTrap.js +37 -0
- package/node/components/Onboarding/ui/hooks/useKeyboardNav/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useKeyboardNav/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useKeyboardNav/useKeyboardNav.d.ts +11 -0
- package/node/components/Onboarding/ui/hooks/useKeyboardNav/useKeyboardNav.js +66 -0
- package/node/components/Onboarding/ui/hooks/useStepTransition/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useStepTransition/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useStepTransition/useStepTransition.d.ts +30 -0
- package/node/components/Onboarding/ui/hooks/useStepTransition/useStepTransition.js +50 -0
- package/node/components/Onboarding/ui/hooks/useTargetAnchor/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useTargetAnchor/index.js +17 -0
- package/node/components/Onboarding/ui/hooks/useTargetAnchor/useTargetAnchor.d.ts +37 -0
- package/node/components/Onboarding/ui/hooks/useTargetAnchor/useTargetAnchor.js +60 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.d.ts +5 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.js +47 -0
- package/node/components/Onboarding/ui/hooks/useViewportSize/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useViewportSize/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useViewportSize/useViewportSize.d.ts +5 -0
- package/node/components/Onboarding/ui/hooks/useViewportSize/useViewportSize.js +18 -0
- package/node/components/Onboarding/ui/styles.d.ts +5 -0
- package/node/components/Onboarding/ui/styles.js +19 -0
- package/node/components/Onboarding/utils/createVirtualAnchor/createVirtualAnchor.d.ts +12 -0
- package/node/components/Onboarding/utils/createVirtualAnchor/createVirtualAnchor.js +10 -0
- package/node/components/Onboarding/utils/createVirtualAnchor/index.d.ts +1 -0
- package/node/components/Onboarding/utils/createVirtualAnchor/index.js +17 -0
- package/node/components/Onboarding/utils/geometry/index.d.ts +4 -0
- package/node/components/Onboarding/utils/geometry/index.js +20 -0
- package/node/components/Onboarding/utils/geometry/overlayPath/index.d.ts +1 -0
- package/node/components/Onboarding/utils/geometry/overlayPath/index.js +5 -0
- package/node/components/Onboarding/utils/geometry/overlayPath/overlayPath.d.ts +6 -0
- package/node/components/Onboarding/utils/geometry/overlayPath/overlayPath.js +33 -0
- package/node/components/Onboarding/utils/geometry/parseOffset/index.d.ts +1 -0
- package/node/components/Onboarding/utils/geometry/parseOffset/index.js +5 -0
- package/node/components/Onboarding/utils/geometry/parseOffset/parseOffset.d.ts +4 -0
- package/node/components/Onboarding/utils/geometry/parseOffset/parseOffset.js +9 -0
- package/node/components/Onboarding/utils/geometry/rect/index.d.ts +2 -0
- package/node/components/Onboarding/utils/geometry/rect/index.js +9 -0
- package/node/components/Onboarding/utils/geometry/rect/rect.d.ts +34 -0
- package/node/components/Onboarding/utils/geometry/rect/rect.js +69 -0
- package/node/components/Onboarding/utils/geometry/viewport/index.d.ts +2 -0
- package/node/components/Onboarding/utils/geometry/viewport/index.js +5 -0
- package/node/components/Onboarding/utils/geometry/viewport/viewport.d.ts +14 -0
- package/node/components/Onboarding/utils/geometry/viewport/viewport.js +14 -0
- package/node/components/Onboarding/utils/getScrollParents/getScrollParents.d.ts +7 -0
- package/node/components/Onboarding/utils/getScrollParents/getScrollParents.js +28 -0
- package/node/components/Onboarding/utils/getScrollParents/index.d.ts +1 -0
- package/node/components/Onboarding/utils/getScrollParents/index.js +5 -0
- package/node/components/Onboarding/utils/getTargetElement/getTargetElement.d.ts +4 -0
- package/node/components/Onboarding/utils/getTargetElement/getTargetElement.js +13 -0
- package/node/components/Onboarding/utils/getTargetElement/index.d.ts +1 -0
- package/node/components/Onboarding/utils/getTargetElement/index.js +5 -0
- package/node/components/Onboarding/utils/observeRemoval/index.d.ts +1 -0
- package/node/components/Onboarding/utils/observeRemoval/index.js +17 -0
- package/node/components/Onboarding/utils/observeRemoval/observeRemoval.d.ts +4 -0
- package/node/components/Onboarding/utils/observeRemoval/observeRemoval.js +17 -0
- package/node/components/Onboarding/utils/scrollIntoView/index.d.ts +1 -0
- package/node/components/Onboarding/utils/scrollIntoView/index.js +5 -0
- package/node/components/Onboarding/utils/scrollIntoView/scrollIntoView.d.ts +13 -0
- package/node/components/Onboarding/utils/scrollIntoView/scrollIntoView.js +89 -0
- package/node/components/Onboarding/utils/waitForElement/index.d.ts +2 -0
- package/node/components/Onboarding/utils/waitForElement/index.js +5 -0
- package/node/components/Onboarding/utils/waitForElement/waitForElement.d.ts +21 -0
- package/node/components/Onboarding/utils/waitForElement/waitForElement.js +49 -0
- package/node/components/Onboarding/validation/index.d.ts +1 -0
- package/node/components/Onboarding/validation/index.js +6 -0
- package/node/components/Onboarding/validation/validateTourConfig/index.d.ts +1 -0
- package/node/components/Onboarding/validation/validateTourConfig/index.js +6 -0
- package/node/components/Onboarding/validation/validateTourConfig/validateTourConfig.d.ts +12 -0
- package/node/components/Onboarding/validation/validateTourConfig/validateTourConfig.js +80 -0
- package/node/services/Logger/Logger.d.ts +45 -0
- package/node/services/Logger/Logger.js +72 -0
- package/node/services/Logger/index.d.ts +10 -0
- package/node/services/Logger/index.js +17 -0
- package/package.json +3 -2
- package/services/Logger/Logger.d.ts +45 -0
- package/services/Logger/Logger.js +68 -0
- package/services/Logger/index.d.ts +10 -0
- package/services/Logger/index.js +12 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG-путь скруглённой области (по часовой стрелке).
|
|
3
|
+
*/
|
|
4
|
+
const roundedRectPath = (rect, radius) => {
|
|
5
|
+
const r = Math.max(0, Math.min(radius, rect.width / 2, rect.height / 2));
|
|
6
|
+
const { x, y, width, height } = rect;
|
|
7
|
+
return [
|
|
8
|
+
`M${x + r},${y}`,
|
|
9
|
+
`H${x + width - r}`,
|
|
10
|
+
`A${r},${r} 0 0 1 ${x + width},${y + r}`,
|
|
11
|
+
`V${y + height - r}`,
|
|
12
|
+
`A${r},${r} 0 0 1 ${x + width - r},${y + height}`,
|
|
13
|
+
`H${x + r}`,
|
|
14
|
+
`A${r},${r} 0 0 1 ${x},${y + height - r}`,
|
|
15
|
+
`V${y + r}`,
|
|
16
|
+
`A${r},${r} 0 0 1 ${x + r},${y}`,
|
|
17
|
+
'Z',
|
|
18
|
+
].join(' ');
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* SVG-путь overlay: viewport + hole-отверстие.
|
|
22
|
+
*/
|
|
23
|
+
export const buildOverlayPath = (viewport, hole, radius) => {
|
|
24
|
+
const outer = `M0,0 H${viewport.width} V${viewport.height} H0 Z`;
|
|
25
|
+
if (!hole) {
|
|
26
|
+
return outer;
|
|
27
|
+
}
|
|
28
|
+
return `${outer} ${roundedRectPath(hole, radius)}`;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { parseOffset } from './parseOffset';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { parseOffset } from './parseOffset';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { clampToScrollParents, clampToViewport, inflateRect, isSameRect, rectFromDomRect, } from './rect';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type Viewport } from '../viewport';
|
|
2
|
+
/**
|
|
3
|
+
* Область hole/элемента в координатах viewport.
|
|
4
|
+
*/
|
|
5
|
+
export type Rect = {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Приводит нативный `DOMRect` к нашему `Rect` (только позиция и размеры).
|
|
13
|
+
*/
|
|
14
|
+
export declare const rectFromDomRect: (domRect: DOMRect) => Rect;
|
|
15
|
+
/**
|
|
16
|
+
* Равны ли области покомпонентно.
|
|
17
|
+
*/
|
|
18
|
+
export declare const isSameRect: (a: Rect | null, b: Rect) => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Расширяет область на padding во все стороны.
|
|
21
|
+
*/
|
|
22
|
+
export declare const inflateRect: (rect: Rect, padding: number) => Rect;
|
|
23
|
+
/**
|
|
24
|
+
* Обрезает область hole по границам viewport.
|
|
25
|
+
*/
|
|
26
|
+
export declare const clampToViewport: (rect: Rect, viewport: Viewport) => Rect;
|
|
27
|
+
export declare const isViewportSizedRect: (rect: Rect, viewport: Viewport) => boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Обрезает область элемента видимой областью каждого scroll-предка.
|
|
30
|
+
* Если элемент лежит во вложенном scroll-контейнере и частично уехал за его
|
|
31
|
+
* границу — и hole overlay, и якорь popover считаются уже по видимой
|
|
32
|
+
* части, а не по полной области элемента.
|
|
33
|
+
*/
|
|
34
|
+
export declare const clampToScrollParents: (rect: Rect, scrollParents: readonly Rect[], viewport: Viewport) => Rect;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Приводит нативный `DOMRect` к нашему `Rect` (только позиция и размеры).
|
|
3
|
+
*/
|
|
4
|
+
export const rectFromDomRect = (domRect) => ({
|
|
5
|
+
x: domRect.left,
|
|
6
|
+
y: domRect.top,
|
|
7
|
+
width: domRect.width,
|
|
8
|
+
height: domRect.height,
|
|
9
|
+
});
|
|
10
|
+
/**
|
|
11
|
+
* Равны ли области покомпонентно.
|
|
12
|
+
*/
|
|
13
|
+
export const isSameRect = (a, b) => a !== null &&
|
|
14
|
+
a.x === b.x &&
|
|
15
|
+
a.y === b.y &&
|
|
16
|
+
a.width === b.width &&
|
|
17
|
+
a.height === b.height;
|
|
18
|
+
/**
|
|
19
|
+
* Расширяет область на padding во все стороны.
|
|
20
|
+
*/
|
|
21
|
+
export const inflateRect = (rect, padding) => ({
|
|
22
|
+
x: rect.x - padding,
|
|
23
|
+
y: rect.y - padding,
|
|
24
|
+
width: rect.width + padding * 2,
|
|
25
|
+
height: rect.height + padding * 2,
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Пересечение двух областей. Не пересекаются — ширина/высота 0.
|
|
29
|
+
*/
|
|
30
|
+
const intersectRect = (a, b) => {
|
|
31
|
+
const x = Math.max(a.x, b.x);
|
|
32
|
+
const y = Math.max(a.y, b.y);
|
|
33
|
+
const right = Math.min(a.x + a.width, b.x + b.width);
|
|
34
|
+
const bottom = Math.min(a.y + a.height, b.y + b.height);
|
|
35
|
+
return {
|
|
36
|
+
x,
|
|
37
|
+
y,
|
|
38
|
+
width: Math.max(0, right - x),
|
|
39
|
+
height: Math.max(0, bottom - y),
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Обрезает область hole по границам viewport.
|
|
44
|
+
*/
|
|
45
|
+
export const clampToViewport = (rect, viewport) => intersectRect(rect, {
|
|
46
|
+
x: 0,
|
|
47
|
+
y: 0,
|
|
48
|
+
width: viewport.width,
|
|
49
|
+
height: viewport.height,
|
|
50
|
+
});
|
|
51
|
+
export const isViewportSizedRect = (rect, viewport) => rect.width >= viewport.width - 1 && rect.height >= viewport.height - 1;
|
|
52
|
+
/**
|
|
53
|
+
* Обрезает область элемента видимой областью каждого scroll-предка.
|
|
54
|
+
* Если элемент лежит во вложенном scroll-контейнере и частично уехал за его
|
|
55
|
+
* границу — и hole overlay, и якорь popover считаются уже по видимой
|
|
56
|
+
* части, а не по полной области элемента.
|
|
57
|
+
*/
|
|
58
|
+
export const clampToScrollParents = (rect, scrollParents, viewport) => scrollParents
|
|
59
|
+
.filter((parent) => !isViewportSizedRect(parent, viewport))
|
|
60
|
+
.reduce(intersectRect, rect);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getViewport } from './viewport';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Размеры viewport.
|
|
3
|
+
*/
|
|
4
|
+
export type Viewport = {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Текущие размеры viewport.
|
|
10
|
+
*
|
|
11
|
+
* Именно `documentElement.clientWidth/Height`, а не `window.innerWidth/Height`:
|
|
12
|
+
* inner-размеры включают полосы прокрутки окна.
|
|
13
|
+
*/
|
|
14
|
+
export declare const getViewport: () => Viewport;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Текущие размеры viewport.
|
|
3
|
+
*
|
|
4
|
+
* Именно `documentElement.clientWidth/Height`, а не `window.innerWidth/Height`:
|
|
5
|
+
* inner-размеры включают полосы прокрутки окна.
|
|
6
|
+
*/
|
|
7
|
+
export const getViewport = () => ({
|
|
8
|
+
width: document.documentElement.clientWidth,
|
|
9
|
+
height: document.documentElement.clientHeight,
|
|
10
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Возвращает цепочку scroll-предков элемента (от ближайшего к корню).
|
|
3
|
+
*
|
|
4
|
+
* Нужна, чтобы прокручивать вложенные контейнеры и слушать их `scroll`
|
|
5
|
+
* для синхронизации hole overlay.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getScrollParents: (element: Element | null) => HTMLElement[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Является ли элемент scroll-контейнером.
|
|
3
|
+
*/
|
|
4
|
+
const isScrollable = (element) => {
|
|
5
|
+
const { overflow, overflowX, overflowY } = getComputedStyle(element);
|
|
6
|
+
return /(auto|scroll|overlay)/.test(`${overflow}${overflowX}${overflowY}`);
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Возвращает цепочку scroll-предков элемента (от ближайшего к корню).
|
|
10
|
+
*
|
|
11
|
+
* Нужна, чтобы прокручивать вложенные контейнеры и слушать их `scroll`
|
|
12
|
+
* для синхронизации hole overlay.
|
|
13
|
+
*/
|
|
14
|
+
export const getScrollParents = (element) => {
|
|
15
|
+
const parents = [];
|
|
16
|
+
let node = element?.parentElement ?? null;
|
|
17
|
+
while (node && node !== document.body && node !== document.documentElement) {
|
|
18
|
+
if (isScrollable(node)) {
|
|
19
|
+
parents.push(node);
|
|
20
|
+
}
|
|
21
|
+
node = node.parentElement;
|
|
22
|
+
}
|
|
23
|
+
return parents;
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getScrollParents } from './getScrollParents';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getScrollParents } from './getScrollParents';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TOUR_ID_ATTR } from '../../constants';
|
|
2
|
+
/**
|
|
3
|
+
* Экранирует значение для безопасной подстановки в CSS-селектор атрибута.
|
|
4
|
+
*/
|
|
5
|
+
const escapeAttrValue = (value) => value.replace(/["\\]/g, '\\$&');
|
|
6
|
+
/**
|
|
7
|
+
* Находит элемент highlight-шага по `[data-tour-id="<stepName>"]`.
|
|
8
|
+
*/
|
|
9
|
+
export const getTargetElement = (stepName, root = document) => root.querySelector(`[${TOUR_ID_ATTR}="${escapeAttrValue(stepName)}"]`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getTargetElement } from './getTargetElement';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getTargetElement } from './getTargetElement';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './observeRemoval';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './observeRemoval';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Следит за удалением элемента из DOM (размонтирование, условный render).
|
|
3
|
+
*/
|
|
4
|
+
export const observeRemoval = (element, onRemoved) => {
|
|
5
|
+
const observer = new MutationObserver(() => {
|
|
6
|
+
if (!element.isConnected) {
|
|
7
|
+
observer.disconnect();
|
|
8
|
+
onRemoved();
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
12
|
+
return () => observer.disconnect();
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { scrollIntoView } from './scrollIntoView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { scrollIntoView } from './scrollIntoView';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Доводит элемент highlight-шага до центра viewport и ждёт, пока прокрутка
|
|
3
|
+
* реально доедет.
|
|
4
|
+
*
|
|
5
|
+
* Зачем: цель может быть за пределами экрана или внутри прокрученного
|
|
6
|
+
* контейнера — её надо показать, прежде чем подсвечивать. Нативный
|
|
7
|
+
* `scrollIntoView` сам прокручивает всю цепочку вложенных scroll-контейнеров.
|
|
8
|
+
*
|
|
9
|
+
* Почему ждём: прокрутка плавная (анимированная), позиция элемента меняется
|
|
10
|
+
* кадр за кадром. Дожидаемся её стабилизации, чтобы hole overlay и popover встали
|
|
11
|
+
* по финальной позиции, а не по промежуточной «едущей».
|
|
12
|
+
*/
|
|
13
|
+
export declare const scrollIntoView: (element: HTMLElement, behavior?: ScrollBehavior) => Promise<void>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { SCROLL_BEHAVIOR } from '../../constants';
|
|
2
|
+
import { getViewport } from '../geometry';
|
|
3
|
+
import { getScrollParents } from '../getScrollParents';
|
|
4
|
+
/**
|
|
5
|
+
* Сколько кадров подряд позиция не меняется, чтобы счесть прокрутку стабилизировавшейся.
|
|
6
|
+
*/
|
|
7
|
+
const STABLE_FRAMES = 3;
|
|
8
|
+
/**
|
|
9
|
+
* Предохранитель: если позиция так и не стабилизировалась (постоянные
|
|
10
|
+
* layout-сдвиги), делаем resolve по тайм-ауту, чтобы Promise не завис и тур не застрял.
|
|
11
|
+
*/
|
|
12
|
+
const SETTLE_TIMEOUT_MS = 1000;
|
|
13
|
+
/**
|
|
14
|
+
* Дожидается окончания плавной прокрутки.
|
|
15
|
+
*
|
|
16
|
+
* У браузера нет надёжного сигнала «плавная прокрутка доехала».
|
|
17
|
+
* Поэтому отслеживаем позицию элемента покадрово и считаем прокрутку
|
|
18
|
+
* законченной, когда `top` перестаёт меняться 3 кадра
|
|
19
|
+
* подряд — либо когда срабатывает предохранитель 1000мс.
|
|
20
|
+
*/
|
|
21
|
+
const waitForScrollSettle = (element) => new Promise((resolve) => {
|
|
22
|
+
let raf = 0;
|
|
23
|
+
let stableFrames = 0;
|
|
24
|
+
let prevTop = Number.NaN;
|
|
25
|
+
const timer = setTimeout(() => {
|
|
26
|
+
cancelAnimationFrame(raf);
|
|
27
|
+
resolve();
|
|
28
|
+
}, SETTLE_TIMEOUT_MS);
|
|
29
|
+
const tick = () => {
|
|
30
|
+
const { top } = element.getBoundingClientRect();
|
|
31
|
+
// Позиция не изменилась за кадр — копим «стабильные» кадры; дёрнулась —
|
|
32
|
+
// сбрасываем счётчик и запоминаем новую позицию.
|
|
33
|
+
if (top === prevTop) {
|
|
34
|
+
stableFrames += 1;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
stableFrames = 0;
|
|
38
|
+
prevTop = top;
|
|
39
|
+
}
|
|
40
|
+
// Достаточно кадров без движения → анимация закончилась.
|
|
41
|
+
if (stableFrames >= STABLE_FRAMES) {
|
|
42
|
+
clearTimeout(timer);
|
|
43
|
+
resolve();
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
raf = requestAnimationFrame(tick);
|
|
47
|
+
};
|
|
48
|
+
raf = requestAnimationFrame(tick);
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* Элемент целиком видим: помещается и во viewport, и в рамки каждого своего
|
|
52
|
+
* scroll-предка.
|
|
53
|
+
*/
|
|
54
|
+
const isFullyVisible = (element) => {
|
|
55
|
+
const rect = element.getBoundingClientRect();
|
|
56
|
+
const { width, height } = getViewport();
|
|
57
|
+
const viewport = new DOMRect(0, 0, width, height);
|
|
58
|
+
const frames = [
|
|
59
|
+
viewport,
|
|
60
|
+
...getScrollParents(element).map((parent) => parent.getBoundingClientRect()),
|
|
61
|
+
];
|
|
62
|
+
return frames.every((frame) => rect.top >= frame.top &&
|
|
63
|
+
rect.left >= frame.left &&
|
|
64
|
+
rect.bottom <= frame.bottom &&
|
|
65
|
+
rect.right <= frame.right);
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Доводит элемент highlight-шага до центра viewport и ждёт, пока прокрутка
|
|
69
|
+
* реально доедет.
|
|
70
|
+
*
|
|
71
|
+
* Зачем: цель может быть за пределами экрана или внутри прокрученного
|
|
72
|
+
* контейнера — её надо показать, прежде чем подсвечивать. Нативный
|
|
73
|
+
* `scrollIntoView` сам прокручивает всю цепочку вложенных scroll-контейнеров.
|
|
74
|
+
*
|
|
75
|
+
* Почему ждём: прокрутка плавная (анимированная), позиция элемента меняется
|
|
76
|
+
* кадр за кадром. Дожидаемся её стабилизации, чтобы hole overlay и popover встали
|
|
77
|
+
* по финальной позиции, а не по промежуточной «едущей».
|
|
78
|
+
*/
|
|
79
|
+
export const scrollIntoView = async (element, behavior = SCROLL_BEHAVIOR) => {
|
|
80
|
+
if (isFullyVisible(element)) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
element.scrollIntoView({ behavior, block: 'center', inline: 'center' });
|
|
84
|
+
await waitForScrollSettle(element);
|
|
85
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { waitForElement } from './waitForElement';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type WaitForElementOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* Тайм-аут ожидания, мс. `0` — не ждём: проверяем DOM синхронно и, если
|
|
4
|
+
* элемента нет, сразу делаем reject.
|
|
5
|
+
* @default 0
|
|
6
|
+
*/
|
|
7
|
+
timeout?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Корень для поиска и наблюдения за DOM.
|
|
10
|
+
* @default document
|
|
11
|
+
*/
|
|
12
|
+
root?: Document | HTMLElement;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Дожидается появления элемента highlight-шага в DOM.
|
|
16
|
+
*
|
|
17
|
+
* Если элемент уже есть — синхронный resolve. При `timeout <= 0` ожидание
|
|
18
|
+
* отключено. Иначе подписывается через MutationObserver и resolve при появлении,
|
|
19
|
+
* либо reject по тайм-ауту.
|
|
20
|
+
*/
|
|
21
|
+
export declare const waitForElement: (stepName: string, { timeout, root, }?: WaitForElementOptions) => Promise<HTMLElement>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { DEFAULT_WAIT_ELEMENT_TIMEOUT_MS, TOUR_ID_ATTR } from '../../constants';
|
|
2
|
+
import { getTargetElement } from '../getTargetElement';
|
|
3
|
+
/**
|
|
4
|
+
* Дожидается появления элемента highlight-шага в DOM.
|
|
5
|
+
*
|
|
6
|
+
* Если элемент уже есть — синхронный resolve. При `timeout <= 0` ожидание
|
|
7
|
+
* отключено. Иначе подписывается через MutationObserver и resolve при появлении,
|
|
8
|
+
* либо reject по тайм-ауту.
|
|
9
|
+
*/
|
|
10
|
+
export const waitForElement = (stepName, { timeout = DEFAULT_WAIT_ELEMENT_TIMEOUT_MS, root = document, } = {}) => new Promise((resolve, reject) => {
|
|
11
|
+
const existing = getTargetElement(stepName, root);
|
|
12
|
+
if (existing) {
|
|
13
|
+
resolve(existing);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
// Ожидание отключено (по умолчанию): элемента в DOM нет — ждать нечего,
|
|
17
|
+
// делаем reject сразу, не подписываясь на мутации.
|
|
18
|
+
if (timeout <= 0) {
|
|
19
|
+
reject(new Error(`Элемент шага "${stepName}" не найден в DOM, а ожидание отключено (waitForTimeout=0). Навесьте data-tour-id через getHighlightProps() либо задайте waitForTimeout, если элемент появляется асинхронно.`));
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const observeRoot = root instanceof Document ? root.body : root;
|
|
23
|
+
let timer;
|
|
24
|
+
const observer = new MutationObserver(() => {
|
|
25
|
+
const element = getTargetElement(stepName, root);
|
|
26
|
+
if (element) {
|
|
27
|
+
cleanup();
|
|
28
|
+
resolve(element);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const cleanup = () => {
|
|
32
|
+
observer.disconnect();
|
|
33
|
+
clearTimeout(timer);
|
|
34
|
+
};
|
|
35
|
+
observer.observe(observeRoot, {
|
|
36
|
+
childList: true,
|
|
37
|
+
subtree: true,
|
|
38
|
+
attributes: true,
|
|
39
|
+
attributeFilter: [TOUR_ID_ATTR],
|
|
40
|
+
});
|
|
41
|
+
timer = setTimeout(() => {
|
|
42
|
+
cleanup();
|
|
43
|
+
reject(new Error(`Элемент шага "${stepName}" не найден за ${timeout}мс. Убедитесь, что на нём навешен data-tour-id через getHighlightProps().`));
|
|
44
|
+
}, timeout);
|
|
45
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { validateTourConfig, OnboardingConfigError, } from './validateTourConfig';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { validateTourConfig, OnboardingConfigError, } from './validateTourConfig';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { validateTourConfig, OnboardingConfigError, } from './validateTourConfig';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { validateTourConfig, OnboardingConfigError, } from './validateTourConfig';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type OnboardingTourConfig, type Step } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Ошибка конфигурации тура
|
|
4
|
+
*/
|
|
5
|
+
export declare class OnboardingConfigError extends Error {
|
|
6
|
+
constructor(errors: unknown);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Проверяет конфигурацию тура и бросает ошибку при нарушениях.
|
|
10
|
+
* Вызывается при создании тура (в `createTour`).
|
|
11
|
+
*/
|
|
12
|
+
export declare const validateTourConfig: <TSteps extends readonly Step[]>(config: OnboardingTourConfig<TSteps>) => void;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as v from '@astral/validations';
|
|
2
|
+
/**
|
|
3
|
+
* Имя шага в camelCase.
|
|
4
|
+
* Гарантирует доступ `tour.steps.stepName` и чистый `data-tour-id`.
|
|
5
|
+
*/
|
|
6
|
+
const CAMEL_CASE = /^[a-z][a-zA-Z0-9]*$/;
|
|
7
|
+
/**
|
|
8
|
+
* Правило: имена шагов уникальны в рамках тура.
|
|
9
|
+
*/
|
|
10
|
+
const uniqueStepName = () => v.createRule((steps, ctx) => {
|
|
11
|
+
const seenNames = new Set();
|
|
12
|
+
for (const { name } of steps) {
|
|
13
|
+
if (seenNames.has(name)) {
|
|
14
|
+
return ctx.createError({
|
|
15
|
+
code: 'DUPLICATE_STEP_NAME',
|
|
16
|
+
message: `Имя шага «${name}» не уникально`,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
seenNames.add(name);
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* Схема валидации конфигурации тура.
|
|
25
|
+
*/
|
|
26
|
+
const tourConfigSchema = v.object({
|
|
27
|
+
name: v.string(v.min(1)),
|
|
28
|
+
steps: v.array(v.min(1), v.arrayItem(v.object({
|
|
29
|
+
name: v.string(v.min(1), v.pattern(CAMEL_CASE, {
|
|
30
|
+
message: 'Имя шага должно быть в camelCase',
|
|
31
|
+
})),
|
|
32
|
+
})), uniqueStepName()),
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* Ошибка конфигурации тура
|
|
36
|
+
*/
|
|
37
|
+
export class OnboardingConfigError extends Error {
|
|
38
|
+
constructor(errors) {
|
|
39
|
+
super(`Некорректная конфигурация тура:\n${JSON.stringify(errors, null, 2)}`);
|
|
40
|
+
this.name = 'OnboardingConfigError';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Проверяет конфигурацию тура и бросает ошибку при нарушениях.
|
|
45
|
+
* Вызывается при создании тура (в `createTour`).
|
|
46
|
+
*/
|
|
47
|
+
export const validateTourConfig = (config) => {
|
|
48
|
+
const errors = tourConfigSchema(config);
|
|
49
|
+
if (errors) {
|
|
50
|
+
throw new OnboardingConfigError(v.toPrettyError(errors));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Logger } from '../../services/Logger';
|
|
2
|
+
/**
|
|
3
|
+
* Mock логгера для тестов
|
|
4
|
+
*/
|
|
5
|
+
export declare class LoggerMock {
|
|
6
|
+
configure: Logger['configure'];
|
|
7
|
+
child: Logger['child'];
|
|
8
|
+
isLevelEnabled: Logger['isLevelEnabled'];
|
|
9
|
+
success: Logger['success'];
|
|
10
|
+
info: Logger['info'];
|
|
11
|
+
warn: Logger['warn'];
|
|
12
|
+
debug: Logger['debug'];
|
|
13
|
+
error: Logger['error'];
|
|
14
|
+
constructor();
|
|
15
|
+
}
|
|
16
|
+
export declare const createLoggerMock: () => Logger;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createLoggerMock = exports.LoggerMock = void 0;
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
/**
|
|
6
|
+
* Mock логгера для тестов
|
|
7
|
+
*/
|
|
8
|
+
class LoggerMock {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.configure = vitest_1.vi.fn(() => vitest_1.vi.fn());
|
|
11
|
+
this.child = vitest_1.vi.fn();
|
|
12
|
+
this.isLevelEnabled = vitest_1.vi.fn(() => false);
|
|
13
|
+
this.success = vitest_1.vi.fn();
|
|
14
|
+
this.info = vitest_1.vi.fn();
|
|
15
|
+
this.warn = vitest_1.vi.fn();
|
|
16
|
+
this.debug = vitest_1.vi.fn();
|
|
17
|
+
this.error = vitest_1.vi.fn();
|
|
18
|
+
vitest_1.vi.mocked(this.child).mockReturnValue(this);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.LoggerMock = LoggerMock;
|
|
22
|
+
const createLoggerMock = () => new LoggerMock();
|
|
23
|
+
exports.createLoggerMock = createLoggerMock;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LoggerMock';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./LoggerMock"), exports);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
import { type LogThreshold } from '../../services/Logger';
|
|
2
3
|
import { type LanguageMap } from '../DatePicker/types';
|
|
3
4
|
import { type PlaceholderImageProps } from '../placeholders/Placeholder/Image';
|
|
4
5
|
import { type CaptureException } from '../services/ErrorService';
|
|
@@ -138,7 +139,12 @@ export type ConfigProviderProps = Partial<ConfigContextProps> & {
|
|
|
138
139
|
* Переданный в компонент флаг напрямую имеет приоритет выше
|
|
139
140
|
*/
|
|
140
141
|
nextFeatureFlags?: NextFeatureFlagsContextProps;
|
|
142
|
+
/**
|
|
143
|
+
* Порог логов ui-kit в консоли. По умолчанию: prod → `error`, dev → `warn`,
|
|
144
|
+
* test → `silent`. `silent` — выключить полностью.
|
|
145
|
+
*/
|
|
146
|
+
logLevel?: LogThreshold;
|
|
141
147
|
};
|
|
142
148
|
export declare const ConfigContext: import("react").Context<ConfigContextProps>;
|
|
143
|
-
export declare const ConfigProvider: ({ children, language, datePickerLanguageMap, captureException: captureExceptionProp, emptySymbol, imagesMap, techSup, hidePersonalData, hidePersonalDataClassname, hidePersonalInputDataClassname, components: propsComponents, nextFeatureFlags, }: Partial<ConfigProviderProps>) => import("react/jsx-runtime").JSX.Element;
|
|
149
|
+
export declare const ConfigProvider: ({ children, language, datePickerLanguageMap, captureException: captureExceptionProp, emptySymbol, imagesMap, techSup, hidePersonalData, hidePersonalDataClassname, hidePersonalInputDataClassname, components: propsComponents, nextFeatureFlags, logLevel, }: Partial<ConfigProviderProps>) => import("react/jsx-runtime").JSX.Element;
|
|
144
150
|
export {};
|