@cuemath/leap 2.9.10 → 2.9.12-j1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +3 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/illustrations/loader-1.svg.js +6 -0
- package/dist/assets/illustrations/loader-1.svg.js.map +1 -0
- package/dist/assets/line-icons/icons/apple-icon.js +48 -0
- package/dist/assets/line-icons/icons/apple-icon.js.map +1 -0
- package/dist/assets/line-icons/icons/google-icon.js +42 -0
- package/dist/assets/line-icons/icons/google-icon.js.map +1 -0
- package/dist/assets/lottie/lottie.js +12 -1
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector-styled.js +37 -0
- package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -0
- package/dist/features/auth/account-selector/account-selector.js +90 -0
- package/dist/features/auth/account-selector/account-selector.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +12 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +11 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -0
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +17 -0
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +1 -0
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js +20 -0
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js.map +1 -0
- package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js +29 -0
- package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js.map +1 -0
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js +8 -0
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js.map +1 -0
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js +25 -0
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js.map +1 -0
- package/dist/features/auth/comps/resend-otp/resend-otp.js +38 -0
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -0
- package/dist/features/auth/comps/tabs/tabs-styled.js +23 -0
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -0
- package/dist/features/auth/comps/tabs/tabs.js +23 -0
- package/dist/features/auth/comps/tabs/tabs.js.map +1 -0
- package/dist/features/auth/forgot-password/forgot-password-styled.js +12 -0
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -0
- package/dist/features/auth/forgot-password/otp-form/otp-form.js +67 -0
- package/dist/features/auth/forgot-password/otp-form/otp-form.js.map +1 -0
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js +89 -0
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js.map +1 -0
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js +60 -0
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js.map +1 -0
- package/dist/features/auth/login/login-constants.js +12 -0
- package/dist/features/auth/login/login-constants.js.map +1 -0
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +31 -0
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +1 -0
- package/dist/features/auth/login/social-login-methods/social-login-methods.js +46 -0
- package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +1 -0
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +50 -0
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +1 -0
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +129 -0
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -0
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js +27 -0
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js.map +1 -0
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js +76 -0
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js +38 -0
- package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +85 -0
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input-styled.js +86 -0
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input-styled.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js +58 -0
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input-styled.js +31 -0
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input-styled.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input.js +30 -0
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper-styled.js +11 -0
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper-styled.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js +33 -0
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-code-button.js +33 -0
- package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-code-button.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-list-menu.js +28 -0
- package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-list-menu.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/phone-input/phone-input-styled.js +29 -0
- package/dist/features/auth/signup/custom-input-field/phone-input/phone-input-styled.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/phone-input/phone-input.js +67 -0
- package/dist/features/auth/signup/custom-input-field/phone-input/phone-input.js.map +1 -0
- package/dist/features/auth/signup/signup-constants.js +1022 -0
- package/dist/features/auth/signup/signup-constants.js.map +1 -0
- package/dist/features/auth/signup/signup-methods/signup-methods.js +68 -0
- package/dist/features/auth/signup/signup-methods/signup-methods.js.map +1 -0
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js +19 -0
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js.map +1 -0
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js +61 -0
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js.map +1 -0
- package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js +24 -0
- package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js.map +1 -0
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js +87 -0
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js.map +1 -0
- package/dist/features/post-game-stats/digital-meter/constants.js +10 -9
- package/dist/features/post-game-stats/digital-meter/constants.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js +15 -16
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter.js +88 -86
- package/dist/features/post-game-stats/digital-meter/digital-meter.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/helper.js +3 -13
- package/dist/features/post-game-stats/digital-meter/helper.js.map +1 -1
- package/dist/features/ui/animated-arc/animated-arc-constants.js +5 -0
- package/dist/features/ui/animated-arc/animated-arc-constants.js.map +1 -0
- package/dist/features/ui/animated-arc/animated-arc-helpers.js +14 -0
- package/dist/features/ui/animated-arc/animated-arc-helpers.js.map +1 -0
- package/dist/features/ui/animated-arc/animated-arc-styled.js +33 -0
- package/dist/features/ui/animated-arc/animated-arc-styled.js.map +1 -0
- package/dist/features/ui/animated-arc/animated-arc.js +49 -0
- package/dist/features/ui/animated-arc/animated-arc.js.map +1 -0
- package/dist/features/ui/context-menu/context-menu.js +28 -18
- package/dist/features/ui/context-menu/context-menu.js.map +1 -1
- package/dist/features/ui/image/image.js +12 -12
- package/dist/features/ui/image/image.js.map +1 -1
- package/dist/features/ui/inputs/base-input/base-input-styled.js +77 -67
- package/dist/features/ui/inputs/base-input/base-input-styled.js.map +1 -1
- package/dist/features/ui/inputs/base-input/base-input.js +49 -47
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +14 -12
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +37 -28
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/text/text.js +29 -27
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/button.js +17 -0
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/features/ui/theme/input.js +67 -14
- package/dist/features/ui/theme/input.js.map +1 -1
- package/dist/index.d.ts +267 -2
- package/dist/index.js +523 -477
- package/dist/index.js.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +332 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +370 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js +252 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js.map +1 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +24 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js.map +1 -0
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +192 -0
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +19 -0
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +129 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +129 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/date-fns/subYears.js +9 -0
- package/dist/node_modules/date-fns/subYears.js.map +1 -0
- package/dist/node_modules/react-datepicker/dist/index.es.js +2700 -0
- package/dist/node_modules/react-datepicker/dist/index.es.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js +8 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js +8 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js +518 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js +60 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js +53 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +19 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js +21 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js +21 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js +17 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js +15 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js +23 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js +60 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js +13 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js +16 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js +13 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js +18 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js +8 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js +15 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js +15 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js +13 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +19 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js +32 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +16 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +71 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js +34 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js +156 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js +111 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js +22 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js +15 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js +15 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js +23 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js +42 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js +62 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +52 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js +46 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js +31 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +22 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +23 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +33 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +33 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +34 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +34 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +100 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +49 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +49 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +41 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +75 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +49 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +70 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +33 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +72 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +71 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +33 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +75 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +72 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +71 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +23 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +23 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js +68 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js +104 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js +88 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js +123 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js +13 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js +19 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js.map +1 -0
- package/dist/static/avatar-selected.860ee923.json +1 -0
- package/dist/static/circle-cuemath-logo-white.e9fafb91.svg +1 -0
- package/dist/static/cuemath-app-qr-code.ba6cc09b.svg +1 -0
- package/dist/static/cuemath-app-qr-code.d0912fc7.png +0 -0
- package/dist/static/dob.9ce3c15b.json +1 -0
- package/dist/static/error.cbe1ddde.json +1 -0
- package/dist/static/grade.b3730524.json +1 -0
- package/dist/static/key.d6846476.json +1 -0
- package/dist/static/mail.c30e8708.json +1 -0
- package/dist/static/otp.2d08f874.json +1 -0
- package/dist/static/otp.a3029760.json +1 -0
- package/dist/static/parent-avatar.772d53e0.json +1 -0
- package/dist/static/phone-number.0be312ea.json +1 -0
- package/dist/static/phone-number.84f55562.json +1 -0
- package/dist/static/student-avatar.524226bd.json +1 -0
- package/dist/static/user-type-selector-grid-bg.3c9c8ad6.svg +1 -0
- package/dist/static/user-type-selector-grid-bg.3ce8142d.svg +1 -0
- package/dist/static/user-type-selector-grid-bg.aad0b059.svg +1 -0
- package/dist/static/username.9e034d51.json +1 -0
- package/package.json +3 -2
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc-styled.js +0 -17
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc-styled.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc.js +0 -50
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/constants.js +0 -6
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/constants.js.map +0 -1
@@ -1,154 +1,156 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import
|
3
|
-
import { LOTTIE as
|
1
|
+
import { jsxs as o, jsx as r, Fragment as k } from "react/jsx-runtime";
|
2
|
+
import w, { memo as Y, useState as B, useCallback as K, useEffect as P } from "react";
|
3
|
+
import { LOTTIE as j } from "../../../assets/lottie/lottie.js";
|
4
4
|
import { GAME_LAUNCHER_SIZE as c, GAME_LAUNCHER_SIZE_LARGE as d } from "../../circle-games/game-launcher/comps/card-container/constants.js";
|
5
|
-
import { useCircleSounds as
|
5
|
+
import { useCircleSounds as Z } from "../../circle-games/hooks/use-circle-sounds/use-circle-sounds.js";
|
6
6
|
import { CircleSoundKey as m } from "../../circle-games/hooks/use-circle-sounds/use-circle-sounds-enums.js";
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import {
|
13
|
-
import { TARGET_ACHIEVED_DELAY as
|
14
|
-
import { DigitalMeter as
|
15
|
-
const
|
7
|
+
import I from "../../ui/animated-arc/animated-arc.js";
|
8
|
+
import $ from "../../ui/layout/flex-view.js";
|
9
|
+
import X from "../../ui/lottie-animation/lottie-animation.js";
|
10
|
+
import g from "../../ui/separator/separator.js";
|
11
|
+
import D from "../../ui/text/text.js";
|
12
|
+
import { NumberCountAnimation as q } from "../number-count-animation/number-count-animation.js";
|
13
|
+
import { TARGET_ACHIEVED_DELAY as G, TOTAL_ARC_AVAILABLE as h, STROKE_WIDTH as C, ARC_RADIUS as L, ANIMATED_ARC_START_ANGLE as p, PROGRESS_FILL_DURATION as f, PROGRESS_FILL_DELAY as b, TOTAL_ANIMATION_DURATION as z } from "./constants.js";
|
14
|
+
import { DigitalMeter as J, ContentContainer as Q, NumberCountContainer as v, RainboxColorText as N, LineMarking as M, MarkingContainer as H, MarkingText as u, BottomAbsoluteView as O, HelperTextPrimary as x, HelperTextSecondary as V } from "./digital-meter-styled.js";
|
15
|
+
const Er = Y(
|
16
16
|
({
|
17
|
-
show:
|
17
|
+
show: R,
|
18
18
|
value: T,
|
19
|
-
maxValue:
|
20
|
-
targetValue:
|
21
|
-
displayText:
|
19
|
+
maxValue: n,
|
20
|
+
targetValue: t = 0,
|
21
|
+
displayText: F,
|
22
22
|
progressType: s,
|
23
|
-
helperTextPrimary:
|
24
|
-
helperTextSecondary:
|
23
|
+
helperTextPrimary: W,
|
24
|
+
helperTextSecondary: y,
|
25
25
|
onComplete: S,
|
26
26
|
actAsTimer: a
|
27
27
|
}) => {
|
28
|
-
const [
|
29
|
-
(i) =>
|
30
|
-
[
|
28
|
+
const [l, U] = B(!1), { play: E } = Z(), _ = K(
|
29
|
+
(i) => t ? a ? i <= t : i >= t : !1,
|
30
|
+
[t, a]
|
31
31
|
);
|
32
|
-
return
|
32
|
+
return P(() => {
|
33
33
|
let i, e;
|
34
|
-
const
|
35
|
-
return
|
36
|
-
E(a ? m.TIME_TARGET : m.ACCURACY_TARGET),
|
37
|
-
},
|
34
|
+
const A = _(T);
|
35
|
+
return R && (E(a ? m.TIME_INTRO : m.ACCURACY_INTRO), E(m.METER_FILL), A && (i = setTimeout(() => {
|
36
|
+
E(a ? m.TIME_TARGET : m.ACCURACY_TARGET), U(!0);
|
37
|
+
}, G * 1e3)), e = setTimeout(() => {
|
38
38
|
S();
|
39
|
-
}, (
|
39
|
+
}, (A ? z : G) * 1e3)), () => {
|
40
40
|
i && clearTimeout(i), e && clearTimeout(e);
|
41
41
|
};
|
42
|
-
}, [
|
42
|
+
}, [R, T, S, _, a, E]), R ? /* @__PURE__ */ o(J, { $isTargetAchieved: l, children: [
|
43
43
|
/* @__PURE__ */ r(
|
44
|
-
|
44
|
+
I,
|
45
45
|
{
|
46
46
|
targetAngle: h,
|
47
47
|
strokeWidth: C,
|
48
48
|
color: "BLACK_5",
|
49
|
-
radius:
|
50
|
-
duration: 0
|
49
|
+
radius: L,
|
50
|
+
duration: 0,
|
51
|
+
startAngle: -p
|
51
52
|
}
|
52
53
|
),
|
53
|
-
/* @__PURE__ */ r(
|
54
|
-
/* @__PURE__ */
|
55
|
-
/* @__PURE__ */ r(
|
56
|
-
|
54
|
+
/* @__PURE__ */ r(Q, { children: /* @__PURE__ */ o($, { $flexDirection: "column", $alignItems: "center", children: [
|
55
|
+
/* @__PURE__ */ o($, { $flexDirection: "row", $alignItems: "flex-end", children: [
|
56
|
+
/* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(
|
57
|
+
N,
|
57
58
|
{
|
58
59
|
$renderAs: c === d ? "ah1" : "ah2",
|
59
60
|
$color: "GREEN_4",
|
60
|
-
$isTargetAchieved:
|
61
|
+
$isTargetAchieved: l,
|
61
62
|
children: /* @__PURE__ */ r(
|
62
|
-
|
63
|
+
q,
|
63
64
|
{
|
64
65
|
initialValue: 0,
|
65
66
|
targetValue: Math.floor(T),
|
66
67
|
durationInSec: f,
|
67
|
-
delayInSec:
|
68
|
+
delayInSec: b
|
68
69
|
}
|
69
70
|
)
|
70
71
|
}
|
71
72
|
) }),
|
72
|
-
s === "stepper" && /* @__PURE__ */
|
73
|
-
|
73
|
+
s === "stepper" && /* @__PURE__ */ o(
|
74
|
+
D,
|
74
75
|
{
|
75
76
|
$renderAs: c === d ? "ah4" : "ab1",
|
76
77
|
$color: "WHITE",
|
77
78
|
children: [
|
78
79
|
"/",
|
79
|
-
|
80
|
+
n
|
80
81
|
]
|
81
82
|
}
|
82
83
|
)
|
83
84
|
] }),
|
84
|
-
/* @__PURE__ */ r(
|
85
|
+
/* @__PURE__ */ r(g, { height: 8 }),
|
85
86
|
/* @__PURE__ */ r(
|
86
|
-
|
87
|
+
D,
|
87
88
|
{
|
88
89
|
$renderAs: c === d ? "ac3-black" : "ac4-black",
|
89
90
|
$color: "WHITE_T_60",
|
90
|
-
children:
|
91
|
+
children: F
|
91
92
|
}
|
92
93
|
)
|
93
94
|
] }) }),
|
94
95
|
s === "stepper" && Array.from({ length: T }, (i, e) => {
|
95
|
-
const
|
96
|
+
const A = h / n;
|
96
97
|
return /* @__PURE__ */ r(
|
97
|
-
|
98
|
+
I,
|
98
99
|
{
|
99
|
-
startAngle:
|
100
|
-
targetAngle:
|
100
|
+
startAngle: -p + A * e,
|
101
|
+
targetAngle: A,
|
101
102
|
strokeWidth: C,
|
102
103
|
color: "GREEN_4",
|
103
|
-
radius:
|
104
|
+
radius: L,
|
104
105
|
mode: "fade",
|
105
|
-
duration: f /
|
106
|
-
delay:
|
107
|
-
|
106
|
+
duration: f / n,
|
107
|
+
delay: b + f / n * e,
|
108
|
+
showAnimatedRainbowArc: l
|
108
109
|
},
|
109
110
|
e
|
110
111
|
);
|
111
112
|
}),
|
112
|
-
s === "stepper" && Array.from({ length:
|
113
|
-
const
|
114
|
-
return /* @__PURE__ */
|
115
|
-
/* @__PURE__ */ r(
|
116
|
-
/* @__PURE__ */ r(H, { $angle:
|
117
|
-
|
113
|
+
s === "stepper" && Array.from({ length: n + 1 }, (i, e) => {
|
114
|
+
const A = h / n;
|
115
|
+
return /* @__PURE__ */ o(w.Fragment, { children: [
|
116
|
+
/* @__PURE__ */ r(M, { $angle: A * e }),
|
117
|
+
/* @__PURE__ */ r(H, { $angle: A * e, children: /* @__PURE__ */ r(u, { $angle: A * e, children: /* @__PURE__ */ r(
|
118
|
+
N,
|
118
119
|
{
|
119
120
|
$renderAs: c === d ? "ac3-black" : "ac4-black",
|
120
|
-
$color:
|
121
|
-
$isTargetAchieved:
|
121
|
+
$color: t && t === e ? "GREEN_4" : "WHITE_T_60",
|
122
|
+
$isTargetAchieved: t === e && _(e) && l,
|
122
123
|
children: e
|
123
124
|
}
|
124
125
|
) }) }, e)
|
125
126
|
] }, e);
|
126
127
|
}),
|
127
|
-
s === "linear" && /* @__PURE__ */
|
128
|
+
s === "linear" && /* @__PURE__ */ o(k, { children: [
|
128
129
|
/* @__PURE__ */ r(
|
129
|
-
|
130
|
+
I,
|
130
131
|
{
|
131
|
-
targetAngle: T * h /
|
132
|
+
targetAngle: T * h / n,
|
132
133
|
strokeWidth: C,
|
133
134
|
color: "GREEN_4",
|
134
|
-
radius:
|
135
|
+
radius: L,
|
135
136
|
duration: f,
|
136
|
-
delay:
|
137
|
-
|
137
|
+
delay: b,
|
138
|
+
showAnimatedRainbowArc: l,
|
139
|
+
startAngle: -p
|
138
140
|
}
|
139
141
|
),
|
140
|
-
/* @__PURE__ */
|
141
|
-
|
142
|
-
Array.from(/* @__PURE__ */ new Set([0,
|
142
|
+
/* @__PURE__ */ o(k, { children: [
|
143
|
+
t && /* @__PURE__ */ r(M, { $angle: t * h / n }),
|
144
|
+
Array.from(/* @__PURE__ */ new Set([0, t, n])).map((i, e) => /* @__PURE__ */ r(
|
143
145
|
H,
|
144
146
|
{
|
145
|
-
$angle: i * h /
|
146
|
-
children: /* @__PURE__ */ r(
|
147
|
-
|
147
|
+
$angle: i * h / n,
|
148
|
+
children: /* @__PURE__ */ r(u, { $angle: i * h / n, children: /* @__PURE__ */ r(
|
149
|
+
N,
|
148
150
|
{
|
149
151
|
$renderAs: c === d ? "ac3-black" : "ac4-black",
|
150
|
-
$color:
|
151
|
-
$isTargetAchieved:
|
152
|
+
$color: t && t === i ? "GREEN_4" : "WHITE_T_60",
|
153
|
+
$isTargetAchieved: t === i && l && _(i),
|
152
154
|
children: i
|
153
155
|
}
|
154
156
|
) })
|
@@ -157,27 +159,27 @@ const sr = w(
|
|
157
159
|
))
|
158
160
|
] })
|
159
161
|
] }),
|
160
|
-
|
161
|
-
!
|
162
|
-
/* @__PURE__ */ r(
|
163
|
-
/* @__PURE__ */
|
164
|
-
/* @__PURE__ */
|
165
|
-
|
162
|
+
l && /* @__PURE__ */ r(O, { top: c, children: /* @__PURE__ */ r(X, { src: j.TARGET_ACHIEVED_TEXT }) }),
|
163
|
+
!l && /* @__PURE__ */ o(O, { top: c, children: [
|
164
|
+
/* @__PURE__ */ r(g, { height: 25 }),
|
165
|
+
/* @__PURE__ */ o($, { $flexDirection: "column", $alignItems: "center", children: [
|
166
|
+
/* @__PURE__ */ o(
|
167
|
+
x,
|
166
168
|
{
|
167
169
|
$renderAs: c === d ? "ac3-black" : "ac4-black",
|
168
170
|
$color: "WHITE_T_60",
|
169
171
|
children: [
|
170
|
-
|
171
|
-
/* @__PURE__ */ r(
|
172
|
+
W,
|
173
|
+
/* @__PURE__ */ r(g, { height: c * 0.03 })
|
172
174
|
]
|
173
175
|
}
|
174
176
|
),
|
175
177
|
/* @__PURE__ */ r(
|
176
|
-
|
178
|
+
V,
|
177
179
|
{
|
178
180
|
$renderAs: c === d ? "ah4" : "ab1",
|
179
181
|
$color: "WHITE",
|
180
|
-
children:
|
182
|
+
children: y
|
181
183
|
}
|
182
184
|
)
|
183
185
|
] })
|
@@ -186,6 +188,6 @@ const sr = w(
|
|
186
188
|
}
|
187
189
|
);
|
188
190
|
export {
|
189
|
-
|
191
|
+
Er as DigitalMeter
|
190
192
|
};
|
191
193
|
//# sourceMappingURL=digital-meter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"digital-meter.js","sources":["../../../../src/features/post-game-stats/digital-meter/digital-meter.tsx"],"sourcesContent":["import type { IDigitalMeterProps } from './digital-meter-types';\nimport type { FC } from 'react';\n\nimport React, { memo, useCallback, useEffect, useState } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport {\n GAME_LAUNCHER_SIZE,\n GAME_LAUNCHER_SIZE_LARGE,\n} from '../../circle-games/game-launcher/comps/card-container/constants';\nimport { useCircleSounds } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds';\nimport { CircleSoundKey } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds-enums';\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { NumberCountAnimation } from '../number-count-animation/number-count-animation';\nimport { AnimatedArc } from './comp/animated-arc/animated-arc';\nimport {\n ARC_RADIUS,\n PROGRESS_FILL_DELAY,\n PROGRESS_FILL_DURATION,\n STROKE_WIDTH,\n TARGET_ACHIEVED_DELAY,\n TOTAL_ANIMATION_DURATION,\n TOTAL_ARC_AVAILABLE,\n} from './constants';\nimport * as Styled from './digital-meter-styled';\n\nexport const DigitalMeter: FC<IDigitalMeterProps> = memo(\n ({\n show,\n value,\n maxValue,\n targetValue = 0,\n displayText,\n progressType,\n helperTextPrimary,\n helperTextSecondary,\n onComplete,\n actAsTimer,\n }) => {\n const [isTargetAchieved, setIsTargetAchieved] = useState(false);\n const { play } = useCircleSounds();\n\n const isTargetValueAchieved = useCallback(\n (valueToCompare: number) => {\n if (targetValue) {\n if (actAsTimer) {\n return valueToCompare <= targetValue;\n }\n\n return valueToCompare >= targetValue;\n }\n\n return false;\n },\n [targetValue, actAsTimer],\n );\n\n useEffect(() => {\n let timer: ReturnType<typeof setTimeout>;\n let timerForAnimationComplete: ReturnType<typeof setTimeout>;\n const isTargetAchievedFlag = isTargetValueAchieved(value);\n\n if (show) {\n play(actAsTimer ? CircleSoundKey.TIME_INTRO : CircleSoundKey.ACCURACY_INTRO);\n play(CircleSoundKey.METER_FILL);\n if (isTargetAchievedFlag) {\n timer = setTimeout(() => {\n play(actAsTimer ? CircleSoundKey.TIME_TARGET : CircleSoundKey.ACCURACY_TARGET);\n setIsTargetAchieved(true);\n }, TARGET_ACHIEVED_DELAY * 1000);\n }\n\n const timeToFinishAnimation = isTargetAchievedFlag\n ? TOTAL_ANIMATION_DURATION\n : TARGET_ACHIEVED_DELAY;\n\n timerForAnimationComplete = setTimeout(() => {\n onComplete();\n }, timeToFinishAnimation * 1000);\n }\n\n return () => {\n timer && clearTimeout(timer);\n timerForAnimationComplete && clearTimeout(timerForAnimationComplete);\n };\n }, [show, value, onComplete, isTargetValueAchieved, actAsTimer, play]);\n\n if (!show) return null;\n\n return (\n <Styled.DigitalMeter $isTargetAchieved={isTargetAchieved}>\n {/* complete arc area to be filled */}\n <AnimatedArc\n targetAngle={TOTAL_ARC_AVAILABLE}\n strokeWidth={STROKE_WIDTH}\n color=\"BLACK_5\"\n radius={ARC_RADIUS}\n duration={0}\n />\n\n {/* center area for the content */}\n <Styled.ContentContainer>\n <FlexView $flexDirection=\"column\" $alignItems=\"center\">\n <FlexView $flexDirection=\"row\" $alignItems=\"flex-end\">\n <Styled.NumberCountContainer>\n <Styled.RainboxColorText\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah1' : 'ah2'}\n $color=\"GREEN_4\"\n $isTargetAchieved={isTargetAchieved}\n >\n <NumberCountAnimation\n initialValue={0}\n targetValue={Math.floor(value)}\n durationInSec={PROGRESS_FILL_DURATION}\n delayInSec={PROGRESS_FILL_DELAY}\n />\n </Styled.RainboxColorText>\n </Styled.NumberCountContainer>\n {progressType === 'stepper' && (\n <Text\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah4' : 'ab1'}\n $color=\"WHITE\"\n >\n /{maxValue}\n </Text>\n )}\n </FlexView>\n <Separator height={8} />\n <Text\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color=\"WHITE_T_60\"\n >\n {displayText}\n </Text>\n </FlexView>\n </Styled.ContentContainer>\n\n {/* stepper animation */}\n {progressType === 'stepper' &&\n Array.from({ length: value }, (_, index) => {\n const arcLength = TOTAL_ARC_AVAILABLE / maxValue;\n\n return (\n <AnimatedArc\n key={index}\n startAngle={arcLength * index}\n targetAngle={arcLength}\n strokeWidth={STROKE_WIDTH}\n color=\"GREEN_4\"\n radius={ARC_RADIUS}\n mode=\"fade\"\n duration={PROGRESS_FILL_DURATION / maxValue}\n delay={PROGRESS_FILL_DELAY + (PROGRESS_FILL_DURATION / maxValue) * index}\n playRainbowColors={isTargetAchieved}\n />\n );\n })}\n\n {/* numbers with markings */}\n {progressType === 'stepper' &&\n Array.from({ length: maxValue + 1 }, (_, index) => {\n const arcLength = TOTAL_ARC_AVAILABLE / maxValue;\n\n return (\n <React.Fragment key={index}>\n <Styled.LineMarking $angle={arcLength * index} />\n <Styled.MarkingContainer key={index} $angle={arcLength * index}>\n <Styled.MarkingText $angle={arcLength * index}>\n <Styled.RainboxColorText\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color={targetValue && targetValue === index ? 'GREEN_4' : 'WHITE_T_60'}\n $isTargetAchieved={\n targetValue === index && isTargetValueAchieved(index) && isTargetAchieved\n }\n >\n {index}\n </Styled.RainboxColorText>\n </Styled.MarkingText>\n </Styled.MarkingContainer>\n </React.Fragment>\n );\n })}\n\n {/* progress of linear */}\n {progressType === 'linear' && (\n <>\n <AnimatedArc\n targetAngle={(value * TOTAL_ARC_AVAILABLE) / maxValue}\n strokeWidth={STROKE_WIDTH}\n color=\"GREEN_4\"\n radius={ARC_RADIUS}\n duration={PROGRESS_FILL_DURATION}\n delay={PROGRESS_FILL_DELAY}\n playRainbowColors={isTargetAchieved}\n />\n <>\n {/* target line marking */}\n {targetValue && (\n <Styled.LineMarking $angle={(targetValue * TOTAL_ARC_AVAILABLE) / maxValue} />\n )}\n\n {/* all markings */}\n {Array.from(new Set([0, targetValue, maxValue])).map((val, index) => (\n <Styled.MarkingContainer\n key={index}\n $angle={(val * TOTAL_ARC_AVAILABLE) / maxValue}\n >\n <Styled.MarkingText $angle={(val * TOTAL_ARC_AVAILABLE) / maxValue}>\n <Styled.RainboxColorText\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color={targetValue && targetValue === val ? 'GREEN_4' : 'WHITE_T_60'}\n $isTargetAchieved={\n targetValue === val && isTargetAchieved && isTargetValueAchieved(val)\n }\n >\n {val}\n </Styled.RainboxColorText>\n </Styled.MarkingText>\n </Styled.MarkingContainer>\n ))}\n </>\n </>\n )}\n\n {/* helper text below the animation */}\n {isTargetAchieved && (\n <Styled.BottomAbsoluteView top={GAME_LAUNCHER_SIZE}>\n <LottieAnimation src={LOTTIE.TARGET_ACHIEVED_TEXT} />\n </Styled.BottomAbsoluteView>\n )}\n {!isTargetAchieved && (\n <Styled.BottomAbsoluteView top={GAME_LAUNCHER_SIZE}>\n <Separator height={25} />\n <FlexView $flexDirection=\"column\" $alignItems=\"center\">\n <Styled.HelperTextPrimary\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color=\"WHITE_T_60\"\n >\n {helperTextPrimary}\n <Separator height={GAME_LAUNCHER_SIZE * 0.03} />\n </Styled.HelperTextPrimary>\n <Styled.HelperTextSecondary\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah4' : 'ab1'}\n $color=\"WHITE\"\n >\n {helperTextSecondary}\n </Styled.HelperTextSecondary>\n </FlexView>\n </Styled.BottomAbsoluteView>\n )}\n </Styled.DigitalMeter>\n );\n },\n);\n"],"names":["DigitalMeter","memo","show","value","maxValue","targetValue","displayText","progressType","helperTextPrimary","helperTextSecondary","onComplete","actAsTimer","isTargetAchieved","setIsTargetAchieved","useState","play","useCircleSounds","isTargetValueAchieved","useCallback","valueToCompare","useEffect","timer","timerForAnimationComplete","isTargetAchievedFlag","CircleSoundKey","TARGET_ACHIEVED_DELAY","TOTAL_ANIMATION_DURATION","jsxs","Styled.DigitalMeter","jsx","AnimatedArc","TOTAL_ARC_AVAILABLE","STROKE_WIDTH","ARC_RADIUS","Styled.ContentContainer","FlexView","Styled.NumberCountContainer","Styled.RainboxColorText","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_SIZE_LARGE","NumberCountAnimation","PROGRESS_FILL_DURATION","PROGRESS_FILL_DELAY","Text","Separator","_","index","arcLength","React","Styled.LineMarking","Styled.MarkingContainer","Styled.MarkingText","Fragment","val","Styled.BottomAbsoluteView","LottieAnimation","LOTTIE","Styled.HelperTextPrimary","Styled.HelperTextSecondary"],"mappings":";;;;;;;;;;;;;;AA6BO,MAAMA,KAAuCC;AAAA,EAClD,CAAC;AAAA,IACC,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,MACI;AACJ,UAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GACxD,EAAE,MAAAC,MAASC,KAEXC,IAAwBC;AAAA,MAC5B,CAACC,MACKd,IACEM,IACKQ,KAAkBd,IAGpBc,KAAkBd,IAGpB;AAAA,MAET,CAACA,GAAaM,CAAU;AAAA,IAAA;AAiCtB,WA9BJS,EAAU,MAAM;AACV,UAAAC,GACAC;AACE,YAAAC,IAAuBN,EAAsBd,CAAK;AAExD,aAAID,MACFa,EAAKJ,IAAaa,EAAe,aAAaA,EAAe,cAAc,GAC3ET,EAAKS,EAAe,UAAU,GAC1BD,MACFF,IAAQ,WAAW,MAAM;AACvB,QAAAN,EAAKJ,IAAaa,EAAe,cAAcA,EAAe,eAAe,GAC7EX,EAAoB,EAAI;AAAA,MAAA,GACvBY,IAAwB,GAAI,IAOjCH,IAA4B,WAAW,MAAM;AAChC,QAAAZ;MAAA,IALiBa,IAC1BG,IACAD,KAIuB,GAAI,IAG1B,MAAM;AACX,QAAAJ,KAAS,aAAaA,CAAK,GAC3BC,KAA6B,aAAaA,CAAyB;AAAA,MAAA;AAAA,IACrE,GACC,CAACpB,GAAMC,GAAOO,GAAYO,GAAuBN,GAAYI,CAAI,CAAC,GAEhEb,IAGF,gBAAAyB,EAAAC,GAAA,EAAoB,mBAAmBhB,GAEtC,UAAA;AA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QAAO;AAAA,cAEN,UAAA;AAAA,gBAAA/B;AAAA,gBACA,gBAAAqB,EAAAe,GAAA,EAAU,QAAQN,IAAqB,KAAM,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAChD;AAAA,UACA,gBAAAT;AAAA,YAAC6B;AAAAA,YAAA;AAAA,cACC,WAAWpB,MAAuBC,IAA2B,QAAQ;AAAA,cACrE,QAAO;AAAA,cAEN,UAAA9B;AAAA,YAAA;AAAA,UACH;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,IAEJ,EAAA,CAAA,IA3KgB;AAAA,EA6KpB;AACF;"}
|
1
|
+
{"version":3,"file":"digital-meter.js","sources":["../../../../src/features/post-game-stats/digital-meter/digital-meter.tsx"],"sourcesContent":["import type { IDigitalMeterProps } from './digital-meter-types';\nimport type { FC } from 'react';\n\nimport React, { memo, useCallback, useEffect, useState } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport {\n GAME_LAUNCHER_SIZE,\n GAME_LAUNCHER_SIZE_LARGE,\n} from '../../circle-games/game-launcher/comps/card-container/constants';\nimport { useCircleSounds } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds';\nimport { CircleSoundKey } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds-enums';\nimport AnimatedArc from '../../ui/animated-arc/animated-arc';\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { NumberCountAnimation } from '../number-count-animation/number-count-animation';\nimport {\n ANIMATED_ARC_START_ANGLE,\n ARC_RADIUS,\n PROGRESS_FILL_DELAY,\n PROGRESS_FILL_DURATION,\n STROKE_WIDTH,\n TARGET_ACHIEVED_DELAY,\n TOTAL_ANIMATION_DURATION,\n TOTAL_ARC_AVAILABLE,\n} from './constants';\nimport * as Styled from './digital-meter-styled';\n\nexport const DigitalMeter: FC<IDigitalMeterProps> = memo(\n ({\n show,\n value,\n maxValue,\n targetValue = 0,\n displayText,\n progressType,\n helperTextPrimary,\n helperTextSecondary,\n onComplete,\n actAsTimer,\n }) => {\n const [isTargetAchieved, setIsTargetAchieved] = useState(false);\n const { play } = useCircleSounds();\n\n const isTargetValueAchieved = useCallback(\n (valueToCompare: number) => {\n if (targetValue) {\n if (actAsTimer) {\n return valueToCompare <= targetValue;\n }\n\n return valueToCompare >= targetValue;\n }\n\n return false;\n },\n [targetValue, actAsTimer],\n );\n\n useEffect(() => {\n let timer: ReturnType<typeof setTimeout>;\n let timerForAnimationComplete: ReturnType<typeof setTimeout>;\n const isTargetAchievedFlag = isTargetValueAchieved(value);\n\n if (show) {\n play(actAsTimer ? CircleSoundKey.TIME_INTRO : CircleSoundKey.ACCURACY_INTRO);\n play(CircleSoundKey.METER_FILL);\n if (isTargetAchievedFlag) {\n timer = setTimeout(() => {\n play(actAsTimer ? CircleSoundKey.TIME_TARGET : CircleSoundKey.ACCURACY_TARGET);\n setIsTargetAchieved(true);\n }, TARGET_ACHIEVED_DELAY * 1000);\n }\n\n const timeToFinishAnimation = isTargetAchievedFlag\n ? TOTAL_ANIMATION_DURATION\n : TARGET_ACHIEVED_DELAY;\n\n timerForAnimationComplete = setTimeout(() => {\n onComplete();\n }, timeToFinishAnimation * 1000);\n }\n\n return () => {\n timer && clearTimeout(timer);\n timerForAnimationComplete && clearTimeout(timerForAnimationComplete);\n };\n }, [show, value, onComplete, isTargetValueAchieved, actAsTimer, play]);\n\n if (!show) return null;\n\n return (\n <Styled.DigitalMeter $isTargetAchieved={isTargetAchieved}>\n {/* complete arc area to be filled */}\n <AnimatedArc\n targetAngle={TOTAL_ARC_AVAILABLE}\n strokeWidth={STROKE_WIDTH}\n color=\"BLACK_5\"\n radius={ARC_RADIUS}\n duration={0}\n startAngle={-ANIMATED_ARC_START_ANGLE}\n />\n\n {/* center area for the content */}\n <Styled.ContentContainer>\n <FlexView $flexDirection=\"column\" $alignItems=\"center\">\n <FlexView $flexDirection=\"row\" $alignItems=\"flex-end\">\n <Styled.NumberCountContainer>\n <Styled.RainboxColorText\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah1' : 'ah2'}\n $color=\"GREEN_4\"\n $isTargetAchieved={isTargetAchieved}\n >\n <NumberCountAnimation\n initialValue={0}\n targetValue={Math.floor(value)}\n durationInSec={PROGRESS_FILL_DURATION}\n delayInSec={PROGRESS_FILL_DELAY}\n />\n </Styled.RainboxColorText>\n </Styled.NumberCountContainer>\n {progressType === 'stepper' && (\n <Text\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah4' : 'ab1'}\n $color=\"WHITE\"\n >\n /{maxValue}\n </Text>\n )}\n </FlexView>\n <Separator height={8} />\n <Text\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color=\"WHITE_T_60\"\n >\n {displayText}\n </Text>\n </FlexView>\n </Styled.ContentContainer>\n\n {/* stepper animation */}\n {progressType === 'stepper' &&\n Array.from({ length: value }, (_, index) => {\n const arcLength = TOTAL_ARC_AVAILABLE / maxValue;\n\n return (\n <AnimatedArc\n key={index}\n startAngle={-ANIMATED_ARC_START_ANGLE + arcLength * index}\n targetAngle={arcLength}\n strokeWidth={STROKE_WIDTH}\n color=\"GREEN_4\"\n radius={ARC_RADIUS}\n mode=\"fade\"\n duration={PROGRESS_FILL_DURATION / maxValue}\n delay={PROGRESS_FILL_DELAY + (PROGRESS_FILL_DURATION / maxValue) * index}\n showAnimatedRainbowArc={isTargetAchieved}\n />\n );\n })}\n\n {/* numbers with markings */}\n {progressType === 'stepper' &&\n Array.from({ length: maxValue + 1 }, (_, index) => {\n const arcLength = TOTAL_ARC_AVAILABLE / maxValue;\n\n return (\n <React.Fragment key={index}>\n <Styled.LineMarking $angle={arcLength * index} />\n <Styled.MarkingContainer key={index} $angle={arcLength * index}>\n <Styled.MarkingText $angle={arcLength * index}>\n <Styled.RainboxColorText\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color={targetValue && targetValue === index ? 'GREEN_4' : 'WHITE_T_60'}\n $isTargetAchieved={\n targetValue === index && isTargetValueAchieved(index) && isTargetAchieved\n }\n >\n {index}\n </Styled.RainboxColorText>\n </Styled.MarkingText>\n </Styled.MarkingContainer>\n </React.Fragment>\n );\n })}\n\n {/* progress of linear */}\n {progressType === 'linear' && (\n <>\n <AnimatedArc\n targetAngle={(value * TOTAL_ARC_AVAILABLE) / maxValue}\n strokeWidth={STROKE_WIDTH}\n color=\"GREEN_4\"\n radius={ARC_RADIUS}\n duration={PROGRESS_FILL_DURATION}\n delay={PROGRESS_FILL_DELAY}\n showAnimatedRainbowArc={isTargetAchieved}\n startAngle={-ANIMATED_ARC_START_ANGLE}\n />\n <>\n {/* target line marking */}\n {targetValue && (\n <Styled.LineMarking $angle={(targetValue * TOTAL_ARC_AVAILABLE) / maxValue} />\n )}\n\n {/* all markings */}\n {Array.from(new Set([0, targetValue, maxValue])).map((val, index) => (\n <Styled.MarkingContainer\n key={index}\n $angle={(val * TOTAL_ARC_AVAILABLE) / maxValue}\n >\n <Styled.MarkingText $angle={(val * TOTAL_ARC_AVAILABLE) / maxValue}>\n <Styled.RainboxColorText\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color={targetValue && targetValue === val ? 'GREEN_4' : 'WHITE_T_60'}\n $isTargetAchieved={\n targetValue === val && isTargetAchieved && isTargetValueAchieved(val)\n }\n >\n {val}\n </Styled.RainboxColorText>\n </Styled.MarkingText>\n </Styled.MarkingContainer>\n ))}\n </>\n </>\n )}\n\n {/* helper text below the animation */}\n {isTargetAchieved && (\n <Styled.BottomAbsoluteView top={GAME_LAUNCHER_SIZE}>\n <LottieAnimation src={LOTTIE.TARGET_ACHIEVED_TEXT} />\n </Styled.BottomAbsoluteView>\n )}\n {!isTargetAchieved && (\n <Styled.BottomAbsoluteView top={GAME_LAUNCHER_SIZE}>\n <Separator height={25} />\n <FlexView $flexDirection=\"column\" $alignItems=\"center\">\n <Styled.HelperTextPrimary\n $renderAs={\n GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ac4-black'\n }\n $color=\"WHITE_T_60\"\n >\n {helperTextPrimary}\n <Separator height={GAME_LAUNCHER_SIZE * 0.03} />\n </Styled.HelperTextPrimary>\n <Styled.HelperTextSecondary\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ah4' : 'ab1'}\n $color=\"WHITE\"\n >\n {helperTextSecondary}\n </Styled.HelperTextSecondary>\n </FlexView>\n </Styled.BottomAbsoluteView>\n )}\n </Styled.DigitalMeter>\n );\n },\n);\n"],"names":["DigitalMeter","memo","show","value","maxValue","targetValue","displayText","progressType","helperTextPrimary","helperTextSecondary","onComplete","actAsTimer","isTargetAchieved","setIsTargetAchieved","useState","play","useCircleSounds","isTargetValueAchieved","useCallback","valueToCompare","useEffect","timer","timerForAnimationComplete","isTargetAchievedFlag","CircleSoundKey","TARGET_ACHIEVED_DELAY","TOTAL_ANIMATION_DURATION","jsxs","Styled.DigitalMeter","jsx","AnimatedArc","TOTAL_ARC_AVAILABLE","STROKE_WIDTH","ARC_RADIUS","ANIMATED_ARC_START_ANGLE","Styled.ContentContainer","FlexView","Styled.NumberCountContainer","Styled.RainboxColorText","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_SIZE_LARGE","NumberCountAnimation","PROGRESS_FILL_DURATION","PROGRESS_FILL_DELAY","Text","Separator","_","index","arcLength","React","Styled.LineMarking","Styled.MarkingContainer","Styled.MarkingText","Fragment","val","Styled.BottomAbsoluteView","LottieAnimation","LOTTIE","Styled.HelperTextPrimary","Styled.HelperTextSecondary"],"mappings":";;;;;;;;;;;;;;AA8BO,MAAMA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;AAAA,cAAA;AAAA,YAAA;AAAA,UAChD;AAAA,UACA,gBAAAV;AAAA,YAAC8B;AAAAA,YAAA;AAAA,cACC,WAAWpB,MAAuBC,IAA2B,QAAQ;AAAA,cACrE,QAAO;AAAA,cAEN,UAAA/B;AAAA,YAAA;AAAA,UACH;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,IAEJ,EAAA,CAAA,IA7KgB;AAAA,EA+KpB;AACF;"}
|
@@ -1,14 +1,5 @@
|
|
1
|
-
import { keyframes as
|
2
|
-
const
|
3
|
-
const t = (n - 90) * (Math.PI / 180);
|
4
|
-
return {
|
5
|
-
x: r + o * Math.cos(t),
|
6
|
-
y: F + o * Math.sin(t)
|
7
|
-
};
|
8
|
-
}, $ = (r, F, o, n, t) => {
|
9
|
-
const e = n + t, s = a(r, F, o, n), c = a(r, F, o, e), l = t > 180 ? 1 : 0;
|
10
|
-
return `M ${s.x} ${s.y} A ${o} ${o} 0 ${l} 1 ${c.x} ${c.y}`;
|
11
|
-
}, k = C`
|
1
|
+
import { keyframes as o } from "styled-components";
|
2
|
+
const r = o`
|
12
3
|
0% {
|
13
4
|
stroke: #FFB700;
|
14
5
|
color: #FFB700;
|
@@ -27,7 +18,6 @@ const a = (r, F, o, n) => {
|
|
27
18
|
}
|
28
19
|
`;
|
29
20
|
export {
|
30
|
-
|
31
|
-
k as rainbowColorAnimation
|
21
|
+
r as rainbowColorAnimation
|
32
22
|
};
|
33
23
|
//# sourceMappingURL=helper.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helper.js","sources":["../../../../src/features/post-game-stats/digital-meter/helper.ts"],"sourcesContent":["import { keyframes } from 'styled-components';\n\nconst polarToCartesian = (cx: number, cy: number, r: number, angleDeg: number) => {\n const angleRad = (angleDeg - 90) * (Math.PI / 180);\n\n return {\n x: cx + r * Math.cos(angleRad),\n y: cy + r * Math.sin(angleRad),\n };\n};\n\nexport const describeArc = (\n cx: number,\n cy: number,\n r: number,\n startAngle: number,\n sweepAngle: number,\n) => {\n const endAngle = startAngle + sweepAngle;\n const start = polarToCartesian(cx, cy, r, startAngle);\n const end = polarToCartesian(cx, cy, r, endAngle);\n const largeArcFlag = sweepAngle > 180 ? 1 : 0;\n\n return `M ${start.x} ${start.y} A ${r} ${r} 0 ${largeArcFlag} 1 ${end.x} ${end.y}`;\n};\n\nexport const rainbowColorAnimation = keyframes`\n 0% {\n stroke: #FFB700;\n color: #FFB700;\n }\n 33% {\n stroke: #FF884C;\n color: #FF884C;\n }\n 66% {\n stroke: #FF80F4;\n color: #FF80F4;\n }\n 100% {\n stroke: #33CCFF;\n color: #33CCFF;\n }\n`;\n"],"names":["
|
1
|
+
{"version":3,"file":"helper.js","sources":["../../../../src/features/post-game-stats/digital-meter/helper.ts"],"sourcesContent":["import { keyframes } from 'styled-components';\n\nconst polarToCartesian = (cx: number, cy: number, r: number, angleDeg: number) => {\n const angleRad = (angleDeg - 90) * (Math.PI / 180);\n\n return {\n x: cx + r * Math.cos(angleRad),\n y: cy + r * Math.sin(angleRad),\n };\n};\n\nexport const describeArc = (\n cx: number,\n cy: number,\n r: number,\n startAngle: number,\n sweepAngle: number,\n) => {\n const endAngle = startAngle + sweepAngle;\n const start = polarToCartesian(cx, cy, r, startAngle);\n const end = polarToCartesian(cx, cy, r, endAngle);\n const largeArcFlag = sweepAngle > 180 ? 1 : 0;\n\n return `M ${start.x} ${start.y} A ${r} ${r} 0 ${largeArcFlag} 1 ${end.x} ${end.y}`;\n};\n\nexport const rainbowColorAnimation = keyframes`\n 0% {\n stroke: #FFB700;\n color: #FFB700;\n }\n 33% {\n stroke: #FF884C;\n color: #FF884C;\n }\n 66% {\n stroke: #FF80F4;\n color: #FF80F4;\n }\n 100% {\n stroke: #33CCFF;\n color: #33CCFF;\n }\n`;\n"],"names":["rainbowColorAnimation","keyframes"],"mappings":";AA0BO,MAAMA,IAAwBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"animated-arc-constants.js","sources":["../../../../src/features/ui/animated-arc/animated-arc-constants.ts"],"sourcesContent":["export const RAINBOW_COLOR_ANIMATION_DURATION = 43 / 30; // 43 frames;\n"],"names":["RAINBOW_COLOR_ANIMATION_DURATION"],"mappings":"AAAO,MAAMA,IAAmC;"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
const r = (o, a, t, s) => {
|
2
|
+
const n = (s - 90) * (Math.PI / 180);
|
3
|
+
return {
|
4
|
+
x: o + t * Math.cos(n),
|
5
|
+
y: a + t * Math.sin(n)
|
6
|
+
};
|
7
|
+
}, M = (o, a, t, s, n) => {
|
8
|
+
const $ = s + n, c = r(o, a, t, s), e = r(o, a, t, $), d = n > 180 ? 1 : 0;
|
9
|
+
return `M ${c.x} ${c.y} A ${t} ${t} 0 ${d} 1 ${e.x} ${e.y}`;
|
10
|
+
};
|
11
|
+
export {
|
12
|
+
M as describeArc
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=animated-arc-helpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"animated-arc-helpers.js","sources":["../../../../src/features/ui/animated-arc/animated-arc-helpers.ts"],"sourcesContent":["const polarToCartesian = (cx: number, cy: number, r: number, angleDeg: number) => {\n const angleRad = (angleDeg - 90) * (Math.PI / 180);\n\n return {\n x: cx + r * Math.cos(angleRad),\n y: cy + r * Math.sin(angleRad),\n };\n};\n\nexport const describeArc = (\n cx: number,\n cy: number,\n r: number,\n startAngle: number,\n sweepAngle: number,\n) => {\n const endAngle = startAngle + sweepAngle;\n const start = polarToCartesian(cx, cy, r, startAngle);\n const end = polarToCartesian(cx, cy, r, endAngle);\n const largeArcFlag = sweepAngle > 180 ? 1 : 0;\n\n return `M ${start.x} ${start.y} A ${r} ${r} 0 ${largeArcFlag} 1 ${end.x} ${end.y}`;\n};\n"],"names":["polarToCartesian","cx","cy","r","angleDeg","angleRad","describeArc","startAngle","sweepAngle","endAngle","start","end","largeArcFlag"],"mappings":"AAAA,MAAMA,IAAmB,CAACC,GAAYC,GAAYC,GAAWC,MAAqB;AAChF,QAAMC,KAAYD,IAAW,OAAO,KAAK,KAAK;AAEvC,SAAA;AAAA,IACL,GAAGH,IAAKE,IAAI,KAAK,IAAIE,CAAQ;AAAA,IAC7B,GAAGH,IAAKC,IAAI,KAAK,IAAIE,CAAQ;AAAA,EAAA;AAEjC,GAEaC,IAAc,CACzBL,GACAC,GACAC,GACAI,GACAC,MACG;AACH,QAAMC,IAAWF,IAAaC,GACxBE,IAAQV,EAAiBC,GAAIC,GAAIC,GAAGI,CAAU,GAC9CI,IAAMX,EAAiBC,GAAIC,GAAIC,GAAGM,CAAQ,GAC1CG,IAAeJ,IAAa,MAAM,IAAI;AAE5C,SAAO,KAAKE,EAAM,CAAC,IAAIA,EAAM,CAAC,MAAMP,CAAC,IAAIA,CAAC,MAAMS,CAAY,MAAMD,EAAI,CAAC,IAAIA,EAAI,CAAC;AAClF;"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import r, { keyframes as e } from "styled-components";
|
2
|
+
import { RAINBOW_COLOR_ANIMATION_DURATION as n } from "./animated-arc-constants.js";
|
3
|
+
const s = e`
|
4
|
+
0% {
|
5
|
+
stroke: #FFB700;
|
6
|
+
color: #FFB700;
|
7
|
+
}
|
8
|
+
33% {
|
9
|
+
stroke: #FF884C;
|
10
|
+
color: #FF884C;
|
11
|
+
}
|
12
|
+
66% {
|
13
|
+
stroke: #FF80F4;
|
14
|
+
color: #FF80F4;
|
15
|
+
}
|
16
|
+
100% {
|
17
|
+
stroke: #33CCFF;
|
18
|
+
color: #33CCFF;
|
19
|
+
}
|
20
|
+
`, a = r.svg`
|
21
|
+
position: absolute;
|
22
|
+
z-index: 1;
|
23
|
+
pointer-events: none;
|
24
|
+
`, c = r.path`
|
25
|
+
stroke: ${({ theme: o, stroke: t }) => o.colors[t]};
|
26
|
+
animation: ${({ $showAnimatedRainbowArc: o }) => o ? s : "undefined"}
|
27
|
+
${n}s ease infinite forwards;
|
28
|
+
`;
|
29
|
+
export {
|
30
|
+
c as Path,
|
31
|
+
a as Svg
|
32
|
+
};
|
33
|
+
//# sourceMappingURL=animated-arc-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"animated-arc-styled.js","sources":["../../../../src/features/ui/animated-arc/animated-arc-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../types';\n\nimport styled, { keyframes } from 'styled-components';\n\nimport { RAINBOW_COLOR_ANIMATION_DURATION } from './animated-arc-constants';\n\nconst rainbowColorAnimation = keyframes`\n 0% {\n stroke: #FFB700;\n color: #FFB700;\n }\n 33% {\n stroke: #FF884C;\n color: #FF884C;\n }\n 66% {\n stroke: #FF80F4;\n color: #FF80F4;\n }\n 100% {\n stroke: #33CCFF;\n color: #33CCFF;\n }\n`;\n\nexport const Svg = styled.svg`\n position: absolute;\n z-index: 1;\n pointer-events: none;\n`;\n\nexport const Path = styled.path<{ stroke: TColorNames; $showAnimatedRainbowArc: boolean }>`\n stroke: ${({ theme, stroke }) => theme.colors[stroke]};\n animation: ${({ $showAnimatedRainbowArc }) =>\n $showAnimatedRainbowArc ? rainbowColorAnimation : 'undefined'}\n ${RAINBOW_COLOR_ANIMATION_DURATION}s ease infinite forwards;\n`;\n"],"names":["rainbowColorAnimation","keyframes","Svg","styled","Path","theme","stroke","$showAnimatedRainbowArc","RAINBOW_COLOR_ANIMATION_DURATION"],"mappings":";;AAMA,MAAMA,IAAwBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAmBjBC,IAAMC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMbC,IAAOD,EAAO;AAAA,YACf,CAAC,EAAE,OAAAE,GAAO,QAAAC,EAAA,MAAaD,EAAM,OAAOC,CAAM,CAAC;AAAA,eACxC,CAAC,EAAE,yBAAAC,EAAA,MACZA,IAA0BP,IAAwB,WAAW;AAAA,MAC7DQ,CAAgC;AAAA;"}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
2
|
+
import { useRef as u, useMemo as A, useLayoutEffect as g } from "react";
|
3
|
+
import { describeArc as w } from "./animated-arc-helpers.js";
|
4
|
+
import { Svg as R, Path as k } from "./animated-arc-styled.js";
|
5
|
+
const b = ({
|
6
|
+
radius: e,
|
7
|
+
strokeWidth: i,
|
8
|
+
color: y,
|
9
|
+
targetAngle: a,
|
10
|
+
startAngle: c = 0,
|
11
|
+
duration: o = 2,
|
12
|
+
mode: s = "draw",
|
13
|
+
delay: n = 0,
|
14
|
+
showAnimatedRainbowArc: $ = !1
|
15
|
+
}) => {
|
16
|
+
const f = u(null), r = e, l = e - i / 2, h = A(
|
17
|
+
() => w(r, r, l, c, a),
|
18
|
+
[a, c, l, r]
|
19
|
+
);
|
20
|
+
return g(() => {
|
21
|
+
const t = f.current;
|
22
|
+
if (t) {
|
23
|
+
if (s === "draw") {
|
24
|
+
const m = t.getTotalLength();
|
25
|
+
t.style.strokeDasharray = `${m}`, t.style.strokeDashoffset = `${m}`, t.getBoundingClientRect(), requestAnimationFrame(() => {
|
26
|
+
t.style.transition = `stroke-dashoffset ${o}s linear ${n}s`, t.style.strokeDashoffset = "0";
|
27
|
+
});
|
28
|
+
}
|
29
|
+
s === "fade" && (t.style.opacity = "0", t.getBoundingClientRect(), requestAnimationFrame(() => {
|
30
|
+
t.style.transition = `opacity ${o} ease-in-out ${n}s`, t.style.opacity = "1";
|
31
|
+
}));
|
32
|
+
}
|
33
|
+
}, [h, s, o, n]), /* @__PURE__ */ p(R, { width: 2 * e, height: 2 * e, viewBox: `0 0 ${2 * e} ${2 * e}`, children: /* @__PURE__ */ p(
|
34
|
+
k,
|
35
|
+
{
|
36
|
+
ref: f,
|
37
|
+
d: h,
|
38
|
+
fill: "none",
|
39
|
+
stroke: y,
|
40
|
+
strokeWidth: i,
|
41
|
+
strokeLinecap: "butt",
|
42
|
+
$showAnimatedRainbowArc: $
|
43
|
+
}
|
44
|
+
) });
|
45
|
+
}, L = b;
|
46
|
+
export {
|
47
|
+
L as default
|
48
|
+
};
|
49
|
+
//# sourceMappingURL=animated-arc.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"animated-arc.js","sources":["../../../../src/features/ui/animated-arc/animated-arc.tsx"],"sourcesContent":["import type { IAnimatedArcProps } from './animated-arc-types';\n\nimport React, { useRef, useLayoutEffect, useMemo } from 'react';\n\nimport { describeArc } from './animated-arc-helpers';\nimport * as Styled from './animated-arc-styled';\n\nconst AnimatedArc: React.FC<IAnimatedArcProps> = ({\n radius,\n strokeWidth,\n color,\n targetAngle,\n startAngle = 0,\n duration = 2,\n mode = 'draw',\n delay = 0,\n showAnimatedRainbowArc = false,\n}) => {\n const pathRef = useRef<SVGPathElement>(null);\n\n const center = radius;\n const arcRadius = radius - strokeWidth / 2; // draw arc inside the visible bounds\n const arcPath = useMemo(\n () => describeArc(center, center, arcRadius, startAngle, targetAngle),\n [targetAngle, startAngle, arcRadius, center],\n );\n\n useLayoutEffect(() => {\n const path = pathRef.current;\n\n if (!path) return;\n\n if (mode === 'draw') {\n const length = path.getTotalLength();\n\n path.style.strokeDasharray = `${length}`;\n path.style.strokeDashoffset = `${length}`;\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `stroke-dashoffset ${duration}s linear ${delay}s`;\n path.style.strokeDashoffset = '0';\n });\n }\n\n if (mode === 'fade') {\n path.style.opacity = '0';\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `opacity ${duration} ease-in-out ${delay}s`;\n path.style.opacity = '1';\n });\n }\n }, [arcPath, mode, duration, delay]);\n\n return (\n <Styled.Svg width={2 * radius} height={2 * radius} viewBox={`0 0 ${2 * radius} ${2 * radius}`}>\n <Styled.Path\n ref={pathRef}\n d={arcPath}\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"butt\"\n $showAnimatedRainbowArc={showAnimatedRainbowArc}\n />\n </Styled.Svg>\n );\n};\n\nexport default AnimatedArc;\n"],"names":["AnimatedArc","radius","strokeWidth","color","targetAngle","startAngle","duration","mode","delay","showAnimatedRainbowArc","pathRef","useRef","center","arcRadius","arcPath","useMemo","describeArc","useLayoutEffect","path","length","Styled.Svg","jsx","Styled.Path","AnimatedArc$1"],"mappings":";;;;AAOA,MAAMA,IAA2C,CAAC;AAAA,EAChD,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,wBAAAC,IAAyB;AAC3B,MAAM;AACE,QAAAC,IAAUC,EAAuB,IAAI,GAErCC,IAASX,GACTY,IAAYZ,IAASC,IAAc,GACnCY,IAAUC;AAAA,IACd,MAAMC,EAAYJ,GAAQA,GAAQC,GAAWR,GAAYD,CAAW;AAAA,IACpE,CAACA,GAAaC,GAAYQ,GAAWD,CAAM;AAAA,EAAA;AAG7C,SAAAK,EAAgB,MAAM;AACpB,UAAMC,IAAOR,EAAQ;AAErB,QAAKQ,GAEL;AAAA,UAAIX,MAAS,QAAQ;AACb,cAAAY,IAASD,EAAK;AAEf,QAAAA,EAAA,MAAM,kBAAkB,GAAGC,CAAM,IACjCD,EAAA,MAAM,mBAAmB,GAAGC,CAAM,IACvCD,EAAK,sBAAsB,GAE3B,sBAAsB,MAAM;AAC1B,UAAAA,EAAK,MAAM,aAAa,qBAAqBZ,CAAQ,YAAYE,CAAK,KACtEU,EAAK,MAAM,mBAAmB;AAAA,QAAA,CAC/B;AAAA,MACH;AAEA,MAAIX,MAAS,WACXW,EAAK,MAAM,UAAU,KACrBA,EAAK,sBAAsB,GAE3B,sBAAsB,MAAM;AAC1B,QAAAA,EAAK,MAAM,aAAa,WAAWZ,CAAQ,gBAAgBE,CAAK,KAChEU,EAAK,MAAM,UAAU;AAAA,MAAA,CACtB;AAAA;AAAA,KAEF,CAACJ,GAASP,GAAMD,GAAUE,CAAK,CAAC,qBAGhCY,GAAA,EAAW,OAAO,IAAInB,GAAQ,QAAQ,IAAIA,GAAQ,SAAS,OAAO,IAAIA,CAAM,IAAI,IAAIA,CAAM,IACzF,UAAA,gBAAAoB;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,KAAKZ;AAAA,MACL,GAAGI;AAAA,MACH,MAAK;AAAA,MACL,QAAQX;AAAA,MACR,aAAAD;AAAA,MACA,eAAc;AAAA,MACd,yBAAyBO;AAAA,IAAA;AAAA,EAE7B,EAAA,CAAA;AAEJ,GAEAc,IAAevB;"}
|
@@ -1,27 +1,37 @@
|
|
1
|
-
import { jsxs as u, jsx as
|
2
|
-
import { memo as
|
1
|
+
import { jsxs as u, jsx as m } from "react/jsx-runtime";
|
2
|
+
import { memo as x, useRef as $, useEffect as d } from "react";
|
3
3
|
import a from "../hooks/use-context-menu-click-handler.js";
|
4
|
-
import { TargetElementWrapper as
|
5
|
-
const
|
6
|
-
({
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
import { TargetElementWrapper as k, OptionsMenuWrapper as E, MenuElementWrapper as W } from "./context-menu-styled.js";
|
5
|
+
const j = x(
|
6
|
+
({
|
7
|
+
targetElement: n,
|
8
|
+
menuElement: p,
|
9
|
+
menuOffset: c,
|
10
|
+
startLeft: f,
|
11
|
+
menuZIndex: s,
|
12
|
+
placeTop: t,
|
13
|
+
onMenuVisibilityChange: e
|
14
|
+
}) => {
|
15
|
+
const o = $(null), { menuVisible: r, onMenuClick: l } = a(o);
|
16
|
+
return d(() => {
|
17
|
+
e == null || e(r);
|
18
|
+
}, [r, e]), /* @__PURE__ */ u(k, { ref: o, onClick: l, children: [
|
19
|
+
n,
|
20
|
+
/* @__PURE__ */ m(
|
21
|
+
E,
|
12
22
|
{
|
13
|
-
$menuOffset:
|
14
|
-
$visible:
|
15
|
-
$startLeft:
|
16
|
-
$menuZIndex:
|
17
|
-
$placeTop:
|
18
|
-
children: /* @__PURE__ */
|
23
|
+
$menuOffset: c,
|
24
|
+
$visible: r,
|
25
|
+
$startLeft: f,
|
26
|
+
$menuZIndex: s,
|
27
|
+
$placeTop: t,
|
28
|
+
children: /* @__PURE__ */ m(W, { $placeTop: t, children: p })
|
19
29
|
}
|
20
30
|
)
|
21
31
|
] });
|
22
32
|
}
|
23
|
-
),
|
33
|
+
), C = j;
|
24
34
|
export {
|
25
|
-
|
35
|
+
C as default
|
26
36
|
};
|
27
37
|
//# sourceMappingURL=context-menu.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({
|
1
|
+
{"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useEffect, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({\n targetElement,\n menuElement,\n menuOffset,\n startLeft,\n menuZIndex,\n placeTop,\n onMenuVisibilityChange,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n useEffect(() => {\n onMenuVisibilityChange?.(menuVisible);\n }, [menuVisible, onMenuVisibilityChange]);\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {targetElement}\n\n <Styled.OptionsMenuWrapper\n $menuOffset={menuOffset}\n $visible={menuVisible}\n $startLeft={startLeft}\n $menuZIndex={menuZIndex}\n $placeTop={placeTop}\n >\n <Styled.MenuElementWrapper $placeTop={placeTop}>{menuElement}</Styled.MenuElementWrapper>\n </Styled.OptionsMenuWrapper>\n </Styled.TargetElementWrapper>\n );\n },\n);\n\nexport default ContextMenu;\n"],"names":["ContextMenu","memo","targetElement","menuElement","menuOffset","startLeft","menuZIndex","placeTop","onMenuVisibilityChange","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","useEffect","Styled.TargetElementWrapper","jsx","Styled.OptionsMenuWrapper","Styled.MenuElementWrapper","ContextMenu$1"],"mappings":";;;;AAQA,MAAMA,IAAqCC;AAAA,EACzC,CAAC;AAAA,IACC,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,wBAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAeC,EAAuB,IAAI,GAC1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAA2BJ,CAAY;AAE5E,WAAAK,EAAU,MAAM;AACd,MAAAN,KAAA,QAAAA,EAAyBG;AAAA,IAAW,GACnC,CAACA,GAAaH,CAAsB,CAAC,qBAGrCO,GAAA,EAA4B,KAAKN,GAAc,SAASG,GACtD,UAAA;AAAA,MAAAV;AAAA,MAED,gBAAAc;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAab;AAAA,UACb,UAAUO;AAAA,UACV,YAAYN;AAAA,UACZ,aAAaC;AAAA,UACb,WAAWC;AAAA,UAEX,4BAACW,GAAA,EAA0B,WAAWX,GAAW,UAAYJ,GAAA;AAAA,QAAA;AAAA,MAC/D;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAgB,IAAenB;"}
|