@scbt-ecom/ui 0.92.0 → 0.94.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/README.md +1 -1
- package/dist/lib/configs/tailwindConfigBase.js.map +1 -1
- package/dist/lib/configs/tailwindPresets/resetPreset.js.map +1 -1
- package/dist/lib/next/utils/hasWidget.js.map +1 -1
- package/dist/lib/next/utils/hideWidgetsWithQueryParams.js.map +1 -1
- package/dist/lib/next/utils/orderWidgetWithQueryParams.js.map +1 -1
- package/dist/lib/shared/api/apiInstance.js.map +1 -1
- package/dist/lib/shared/hooks/useClickOutside.js.map +1 -1
- package/dist/lib/shared/hooks/useDebounce.js.map +1 -1
- package/dist/lib/shared/hooks/useDevice.js.map +1 -1
- package/dist/lib/shared/hooks/useFieldsProgress.js.map +1 -1
- package/dist/lib/shared/hooks/useFloating.js.map +1 -1
- package/dist/lib/shared/hooks/useObserverWidgets.js.map +1 -1
- package/dist/lib/shared/hooks/useOverflow.js.map +1 -1
- package/dist/lib/shared/ui/accordion/Accordion.js.map +1 -1
- package/dist/lib/shared/ui/calendar/Calendar.js.map +1 -1
- package/dist/lib/shared/ui/calendar/ui/MonthCaption.js.map +1 -1
- package/dist/lib/shared/ui/calendar/ui/Navigation.js.map +1 -1
- package/dist/lib/shared/ui/calendar/ui/selectDate/SelectDate.js.map +1 -1
- package/dist/lib/shared/ui/calendar/ui/selectDate/ui/SelectList.js.map +1 -1
- package/dist/lib/shared/ui/carousel/CarouselNative.js.map +1 -1
- package/dist/lib/shared/ui/carousel/model/hooks/useArrowNavigation.js.map +1 -1
- package/dist/lib/shared/ui/carousel/model/hooks/useCarousel.js.map +1 -1
- package/dist/lib/shared/ui/carousel/model/hooks/useDotsNavigation.js.map +1 -1
- package/dist/lib/shared/ui/carousel/ui/CarouselContent.js.map +1 -1
- package/dist/lib/shared/ui/dialog/Dialog.js.map +1 -1
- package/dist/lib/shared/ui/dropdownList/DropdownList.js.map +1 -1
- package/dist/lib/shared/ui/dropdownList/hooks/useKeyboardNavigation.js.map +1 -1
- package/dist/lib/shared/ui/dropdownList/ui/dropdownItem/DropdownItem.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/combobox/ComboboxControl.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/dadata/address/query.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/dadata/auto/query.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/dadata/country/query.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/dadata/fio/query.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/dadata/party/query.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/dayPickerControl/model/utils.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/dayPickerControl/range.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/dayPickerControl/single.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/editor/model/config.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/editor/ui/Editor.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/editor/ui/commands/setCustomLink.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/inputCurrency/InputCurrencyControl.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/inputCurrency/model/useInputCurrency.js.map +1 -1
- package/dist/lib/shared/ui/formElements/controlled/select/SelectControl.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/autocomplete/Autocomplete.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/checkbox/Checkbox.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/combobox/combobox.js +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/combobox/combobox.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/combobox/hooks/useCombobox.js +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/combobox/hooks/useCombobox.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/dayPicker/DayPicker.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/input/Input.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/inputOtp/InputOtpBase.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/radio/RadioGroup.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/radio/ui/RadioItem.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/select/Select.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/select/hooks/useSelectController.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/select/ui/Chip.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/select/ui/SelectItem.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/slider/model/useLogarithmic.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/slider/ui/Slider.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/slider/ui/sliderAlgorithmic/SliderAlgorithmic.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/slider/ui/sliderAlgorithmic/hooks/useSliderAlgorithmic.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/slider/ui/sliderMarks/SliderMarks.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/slider/ui/sliderMarks/hooks/useSliderMarks.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/slider/ui/sliderStep/SliderStep.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/slider/ui/sliderStep/hooks/useSliderStep.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/switch/Switch.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/textarea/Textarea.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/uploader/UploaderBase.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/uploader/model/hooks/useUploader.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/uploader/ui/UploaderInput.js.map +1 -1
- package/dist/lib/shared/ui/modal/Modal.js.map +1 -1
- package/dist/lib/shared/ui/modal/ui/IframeModalContent.js.map +1 -1
- package/dist/lib/shared/ui/pagination/Pagination.js.map +1 -1
- package/dist/lib/shared/ui/providers/NotificationProvider.js.map +1 -1
- package/dist/lib/shared/ui/slot/Slot.js.map +1 -1
- package/dist/lib/shared/ui/slot/model/mergeProps.js.map +1 -1
- package/dist/lib/shared/ui/slot/ui/SlotClone.js.map +1 -1
- package/dist/lib/shared/ui/tabSwitcher/ui/TabContent.js.map +1 -1
- package/dist/lib/shared/ui/table/Mobile.js.map +1 -1
- package/dist/lib/shared/ui/table/model/TableUtils.js.map +1 -1
- package/dist/lib/shared/ui/table/ui/editableCell/EditableCell.js.map +1 -1
- package/dist/lib/shared/utils/localStorageActions.js.map +1 -1
- package/dist/lib/shared/utils/mergeRefs.js.map +1 -1
- package/dist/lib/shared/utils/scrollToElement.js.map +1 -1
- package/dist/lib/shared/utils/sessionStorage.js.map +1 -1
- package/dist/lib/shared/utils/typeGuards.js.map +1 -1
- package/dist/lib/shared/validation/base/base.constants.js.map +1 -1
- package/dist/lib/shared/validation/base/date.validators.js.map +1 -1
- package/dist/lib/shared/validation/base/phone.validators.js.map +1 -1
- package/dist/lib/shared/validation/base/select.validators.js.map +1 -1
- package/dist/lib/shared/validation/dadata/fio.validators.js.map +1 -1
- package/dist/lib/shared/validation/utils/zodUtils.js.map +1 -1
- package/dist/lib/widgets/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/lib/widgets/buttonWithHandlers/model/useButtonHandler.js.map +1 -1
- package/dist/lib/widgets/calculator/CalculatorView.js.map +1 -1
- package/dist/lib/widgets/calculator/ui/calculatorFields/hooks/useAdditionalSlider.js.map +1 -1
- package/dist/lib/widgets/dynamicForm/DynamicForm.js.map +1 -1
- package/dist/lib/widgets/dynamicFormDialog/DynamicFormDialog.js.map +1 -1
- package/dist/lib/widgets/fieldMapper/FieldMapper.js.map +1 -1
- package/dist/lib/widgets/footer/ui/Ligal.js.map +1 -1
- package/dist/lib/widgets/htmlParser/baseHtmlParser.js.map +1 -1
- package/dist/lib/widgets/htmlParser/htmlParser.js.map +1 -1
- package/dist/lib/widgets/htmlParser/reactHtmlParser.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/CategoriesDesktop.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/CategoryTabs.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/rootTab/RootTab.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/tab/ui/content/TabContent.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/mobile/menu/Menu.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/mobile/menu/MenuItem.js.map +1 -1
- package/dist/lib/widgets/userFeedback/model/hooks/useRating.js.map +1 -1
- package/dist/lib/widgets/userFeedback/ui/FeedbackTrigger.js.map +1 -1
- package/dist/lib/widgets/userFeedback/ui/UserReview.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +1 -1
- package/dist/node_modules/@date-fns/tz/date/index.js.map +1 -1
- package/dist/node_modules/@date-fns/tz/date/mini.js.map +1 -1
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js.map +1 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js.map +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/floating.js.map +1 -1
- package/dist/node_modules/@headlessui/react/node_modules/@floating-ui/react/dist/floating-ui.react.js.map +1 -1
- package/dist/node_modules/@headlessui/react/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js.map +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -1
- package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useHover.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/utils.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/focusManager.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/mutation.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/mutationCache.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/notifyManager.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/onlineManager.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/query.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/queryCache.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/queryClient.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/queryObserver.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/removable.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/retryer.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/subscribable.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/thenable.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/suspense.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -1
- package/dist/node_modules/@tanstack/react-table/build/lib/index.js.map +1 -1
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js.map +1 -1
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js.map +1 -1
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js.map +1 -1
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js.map +1 -1
- package/dist/node_modules/@tiptap/core/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-bullet-list/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-character-count/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-color/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-dropcursor/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-gapcursor/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-history/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-list-item/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-ordered-list/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-text-style/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/react/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -1
- package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -1
- package/dist/node_modules/classnames/index.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/format/formatters.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js.map +1 -1
- package/dist/node_modules/date-fns/format.js.map +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -1
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -1
- package/dist/node_modules/date-fns/locale/ru/_lib/formatRelative.js.map +1 -1
- package/dist/node_modules/date-fns/max.js.map +1 -1
- package/dist/node_modules/date-fns/min.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/Parser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/Setter.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +1 -1
- package/dist/node_modules/date-fns/parse/_lib/utils.js.map +1 -1
- package/dist/node_modules/date-fns/parse.js.map +1 -1
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js.map +1 -1
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js.map +1 -1
- package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js.map +1 -1
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js.map +1 -1
- package/dist/node_modules/file-selector/dist/es2015/file-selector.js.map +1 -1
- package/dist/node_modules/file-selector/dist/es2015/file.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animators/AcceleratedAnimation.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animators/MainThreadAnimation.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/generators/inertia.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/generators/spring/find.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/generators/spring/index.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/easing/utils/map.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/frameloop/batcher.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/frameloop/render-step.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/frameloop/sync-time.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/Feature.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/animation/mix-values.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/node/create-projection-node.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/projection/styles/transform.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/VisualElement.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/create-factory.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/make-none-animatable.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/config-motion.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/KeyframesResolver.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/animation-state.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/flat-tree.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/get-variant-context.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/motion-values.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/resolve-variants.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/setters.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/delay.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/interpolate.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/mix/complex.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/offsets/fill.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/subscription-manager.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/value/index.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/value/types/complex/filter.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/value/types/complex/index.js.map +1 -1
- package/dist/node_modules/linkifyjs/dist/linkify.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/controls/BaseGroup.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/controls/Group.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js.map +1 -1
- package/dist/node_modules/orderedmap/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-commands/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-history/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-keymap/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-model/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-state/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-transform/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-view/dist/index.js.map +1 -1
- package/dist/node_modules/rc-slider/es/Handles/Handle.js.map +1 -1
- package/dist/node_modules/rc-slider/es/Handles/index.js.map +1 -1
- package/dist/node_modules/rc-slider/es/Marks/Mark.js.map +1 -1
- package/dist/node_modules/rc-slider/es/Marks/index.js.map +1 -1
- package/dist/node_modules/rc-slider/es/Slider.js.map +1 -1
- package/dist/node_modules/rc-slider/es/Steps/index.js.map +1 -1
- package/dist/node_modules/rc-slider/es/Tracks/Track.js.map +1 -1
- package/dist/node_modules/rc-slider/es/Tracks/index.js.map +1 -1
- package/dist/node_modules/rc-slider/es/hooks/useDrag.js.map +1 -1
- package/dist/node_modules/rc-slider/es/hooks/useOffset.js.map +1 -1
- package/dist/node_modules/rc-slider/es/hooks/useRange.js.map +1 -1
- package/dist/node_modules/rc-util/es/hooks/useEvent.js.map +1 -1
- package/dist/node_modules/rc-util/es/hooks/useLayoutEffect.js.map +1 -1
- package/dist/node_modules/rc-util/es/hooks/useMergedState.js.map +1 -1
- package/dist/node_modules/rc-util/es/hooks/useState.js.map +1 -1
- package/dist/node_modules/rc-util/es/isEqual.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js.map +1 -1
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js.map +1 -1
- package/dist/node_modules/react-dropzone/dist/es/index.js.map +1 -1
- package/dist/node_modules/react-dropzone/dist/es/utils/index.js.map +1 -1
- package/dist/node_modules/react-hook-form/dist/index.esm.js +1 -1
- package/dist/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
- package/dist/node_modules/react-number-format/dist/react-number-format.es.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -1
- package/dist/node_modules/rope-sequence/dist/index.js.map +1 -1
- package/dist/node_modules/tailwindcss/lib/public/create-plugin.js.map +1 -1
- package/dist/node_modules/tailwindcss/lib/util/createPlugin.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/zod/v3/ZodError.js.map +1 -1
- package/dist/node_modules/zod/v3/helpers/parseUtil.js.map +1 -1
- package/dist/node_modules/zod/v3/helpers/util.js.map +1 -1
- package/dist/node_modules/zod/v3/types.js.map +1 -1
- package/dist/src/shared/utils/getDynamicSchema.js.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types/lib/shared/ui/dropdownList/DropdownList.d.ts +1 -1
- package/dist/types/lib/shared/ui/formElements/uncontrolled/combobox/combobox.d.ts +12 -1
- package/dist/types/lib/shared/ui/formElements/uncontrolled/combobox/hooks/useCombobox.d.ts +2 -0
- package/dist/types/lib/shared/ui/formElements/uncontrolled/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-presence.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs"],"sourcesContent":["import { useContext, useId, useEffect, useCallback } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence(subscribe = true) {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => {\n if (subscribe)\n register(id);\n }, [subscribe]);\n const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]);\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n"],"names":["usePresence","subscribe","context","useContext","PresenceContext","isPresent","onExitComplete","register","id","useId","useEffect","safeToRemove","useCallback"],"mappings":"iJA0BA,SAASA,EAAYC,EAAY,GAAM,CACnC,MAAMC,EAAUC,EAAWC,CAAe,EAC1C,GAAIF,IAAY,KACZ,MAAO,CAAC,GAAM,IAAI,EACtB,KAAM,CAAE,UAAAG,EAAW,eAAAC,EAAgB,SAAAC,CAAQ,EAAKL,EAG1CM,EAAKC,EAAK,EAChBC,EAAU,IAAM,CACRT,GACAM,EAASC,CAAE,
|
|
1
|
+
{"version":3,"file":"use-presence.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs"],"sourcesContent":["import { useContext, useId, useEffect, useCallback } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence(subscribe = true) {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => {\n if (subscribe)\n register(id);\n }, [subscribe]);\n const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]);\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n"],"names":["usePresence","subscribe","context","useContext","PresenceContext","isPresent","onExitComplete","register","id","useId","useEffect","safeToRemove","useCallback"],"mappings":"iJA0BA,SAASA,EAAYC,EAAY,GAAM,CACnC,MAAMC,EAAUC,EAAWC,CAAe,EAC1C,GAAIF,IAAY,KACZ,MAAO,CAAC,GAAM,IAAI,EACtB,KAAM,CAAE,UAAAG,EAAW,eAAAC,EAAgB,SAAAC,CAAQ,EAAKL,EAG1CM,EAAKC,EAAK,EAChBC,EAAU,IAAM,CACRT,GACAM,EAASC,CAAE,CACnB,EAAG,CAACP,CAAS,CAAC,EACd,MAAMU,EAAeC,EAAY,IAAMX,GAAaK,GAAkBA,EAAeE,CAAE,EAAG,CAACA,EAAIF,EAAgBL,CAAS,CAAC,EACzH,MAAO,CAACI,GAAaC,EAAiB,CAAC,GAAOK,CAAY,EAAI,CAAC,EAAI,CACvE","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs"],"sourcesContent":["import { Children, isValidElement } from 'react';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n\nexport { getChildKey, onlyElements };\n"],"names":["getChildKey","child","onlyElements","children","filtered","Children","isValidElement"],"mappings":"qDAEK,MAACA,EAAeC,GAAUA,EAAM,KAAO,GAC5C,SAASC,EAAaC,EAAU,CAC5B,MAAMC,EAAW,CAAA,EAEjB,OAAAC,EAAS,QAAQF,EAAWF,GAAU,CAC9BK,EAAeL,CAAK,GACpBG,EAAS,KAAKH,CAAK,
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs"],"sourcesContent":["import { Children, isValidElement } from 'react';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n\nexport { getChildKey, onlyElements };\n"],"names":["getChildKey","child","onlyElements","children","filtered","Children","isValidElement"],"mappings":"qDAEK,MAACA,EAAeC,GAAUA,EAAM,KAAO,GAC5C,SAASC,EAAaC,EAAU,CAC5B,MAAMC,EAAW,CAAA,EAEjB,OAAAC,EAAS,QAAQF,EAAWF,GAAU,CAC9BK,EAAeL,CAAK,GACpBG,EAAS,KAAKH,CAAK,CAC3B,CAAC,EACMG,CACX","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs"],"sourcesContent":["import { isVariantLabel } from '../../render/utils/is-variant-label.mjs';\nimport { isControllingVariants } from '../../render/utils/is-controlling-variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate } = props;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n"],"names":["getCurrentTreeVariants","props","context","isControllingVariants","initial","animate","isVariantLabel"],"mappings":"8JAGA,SAASA,EAAuBC,EAAOC,EAAS,CAC5C,GAAIC,EAAsBF,CAAK,EAAG,CAC9B,KAAM,CAAE,QAAAG,EAAS,QAAAC,CAAO,EAAKJ,EAC7B,MAAO,CACH,QAASG,IAAY,IAASE,EAAeF,CAAO,EAC9CA,EACA,OACN,QAASE,EAAeD,CAAO,EAAIA,EAAU,MACzD,CACA,
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs"],"sourcesContent":["import { isVariantLabel } from '../../render/utils/is-variant-label.mjs';\nimport { isControllingVariants } from '../../render/utils/is-controlling-variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate } = props;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n"],"names":["getCurrentTreeVariants","props","context","isControllingVariants","initial","animate","isVariantLabel"],"mappings":"8JAGA,SAASA,EAAuBC,EAAOC,EAAS,CAC5C,GAAIC,EAAsBF,CAAK,EAAG,CAC9B,KAAM,CAAE,QAAAG,EAAS,QAAAC,CAAO,EAAKJ,EAC7B,MAAO,CACH,QAASG,IAAY,IAASE,EAAeF,CAAO,EAC9CA,EACA,OACN,QAASE,EAAeD,CAAO,EAAIA,EAAU,MACzD,CACI,CACA,OAAOJ,EAAM,UAAY,GAAQC,EAAU,CAAA,CAC/C","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/easing/utils/map.mjs"],"sourcesContent":["import { isBezierDefinition } from 'motion-dom';\nimport { invariant, noop } from 'motion-utils';\nimport { anticipate } from '../anticipate.mjs';\nimport { backIn, backInOut, backOut } from '../back.mjs';\nimport { circIn, circInOut, circOut } from '../circ.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { easeIn, easeInOut, easeOut } from '../ease.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst easingDefinitionToFunction = (definition) => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (typeof definition === \"string\") {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`);\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n"],"names":["easingLookup","noop","easeIn","easeInOut","easeOut","circIn","circInOut","circOut","backIn","backInOut","backOut","anticipate","easingDefinitionToFunction","definition","isBezierDefinition","invariant","x1","y1","x2","y2","cubicBezier"],"mappings":"ihBAQA,MAAMA,EAAe,CACjB,OAAQC,EACR,OAAAC,EACA,UAAAC,EACA,QAAAC,EACA,OAAAC,EACA,UAAAC,EACA,QAAAC,EACA,OAAAC,EACA,UAAAC,EACA,QAAAC,EACA,WAAAC,CACJ,EACMC,EAA8BC,GAAe,CAC/C,GAAIC,EAAmBD,CAAU,EAAG,CAEhCE,EAAUF,EAAW,SAAW,CAA4D,EAC5F,KAAM,CAACG,EAAIC,EAAIC,EAAIC,CAAE,EAAIN,EACzB,OAAOO,EAAYJ,EAAIC,EAAIC,EAAIC,CAAE,
|
|
1
|
+
{"version":3,"file":"map.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/easing/utils/map.mjs"],"sourcesContent":["import { isBezierDefinition } from 'motion-dom';\nimport { invariant, noop } from 'motion-utils';\nimport { anticipate } from '../anticipate.mjs';\nimport { backIn, backInOut, backOut } from '../back.mjs';\nimport { circIn, circInOut, circOut } from '../circ.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { easeIn, easeInOut, easeOut } from '../ease.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst easingDefinitionToFunction = (definition) => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (typeof definition === \"string\") {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`);\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n"],"names":["easingLookup","noop","easeIn","easeInOut","easeOut","circIn","circInOut","circOut","backIn","backInOut","backOut","anticipate","easingDefinitionToFunction","definition","isBezierDefinition","invariant","x1","y1","x2","y2","cubicBezier"],"mappings":"ihBAQA,MAAMA,EAAe,CACjB,OAAQC,EACR,OAAAC,EACA,UAAAC,EACA,QAAAC,EACA,OAAAC,EACA,UAAAC,EACA,QAAAC,EACA,OAAAC,EACA,UAAAC,EACA,QAAAC,EACA,WAAAC,CACJ,EACMC,EAA8BC,GAAe,CAC/C,GAAIC,EAAmBD,CAAU,EAAG,CAEhCE,EAAUF,EAAW,SAAW,CAA4D,EAC5F,KAAM,CAACG,EAAIC,EAAIC,EAAIC,CAAE,EAAIN,EACzB,OAAOO,EAAYJ,EAAIC,EAAIC,EAAIC,CAAE,CACrC,SACS,OAAON,GAAe,SAG3B,OAAOb,EAAaa,CAAU,EAElC,OAAOA,CACX","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batcher.js","sources":["../../../../../../node_modules/framer-motion/dist/es/frameloop/batcher.mjs"],"sourcesContent":["import { MotionGlobalConfig } from '../utils/GlobalConfig.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst stepsOrder = [\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame);\n return acc;\n }, {});\n const { read, resolveKeyframes, update, preRender, render, postRender } = steps;\n const processBatch = () => {\n const timestamp = MotionGlobalConfig.useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n read.process(state);\n resolveKeyframes.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher, stepsOrder };\n"],"names":["stepsOrder","maxElapsed","createRenderBatcher","scheduleNextBatch","allowKeepAlive","runNextFrame","useDefaultElapsed","state","flagRunNextFrame","steps","acc","key","createRenderStep","read","resolveKeyframes","update","preRender","render","postRender","processBatch","timestamp","wake","step","process","keepAlive","immediate","i"],"mappings":"oDAGK,MAACA,EAAa,CACf,OACA,mBACA,SACA,YACA,SACA,YACJ,EACMC,EAAa,GACnB,SAASC,EAAoBC,EAAmBC,EAAgB,CAC5D,IAAIC,EAAe,GACfC,EAAoB,GACxB,MAAMC,EAAQ,CACV,MAAO,EACP,UAAW,EACX,aAAc,EACtB,EACUC,EAAmB,IAAOH,EAAe,GACzCI,EAAQT,EAAW,OAAO,CAACU,EAAKC,KAClCD,EAAIC,CAAG,EAAIC,EAAiBJ,CAAgB,EACrCE,GACR,
|
|
1
|
+
{"version":3,"file":"batcher.js","sources":["../../../../../../node_modules/framer-motion/dist/es/frameloop/batcher.mjs"],"sourcesContent":["import { MotionGlobalConfig } from '../utils/GlobalConfig.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst stepsOrder = [\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame);\n return acc;\n }, {});\n const { read, resolveKeyframes, update, preRender, render, postRender } = steps;\n const processBatch = () => {\n const timestamp = MotionGlobalConfig.useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n read.process(state);\n resolveKeyframes.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher, stepsOrder };\n"],"names":["stepsOrder","maxElapsed","createRenderBatcher","scheduleNextBatch","allowKeepAlive","runNextFrame","useDefaultElapsed","state","flagRunNextFrame","steps","acc","key","createRenderStep","read","resolveKeyframes","update","preRender","render","postRender","processBatch","timestamp","wake","step","process","keepAlive","immediate","i"],"mappings":"oDAGK,MAACA,EAAa,CACf,OACA,mBACA,SACA,YACA,SACA,YACJ,EACMC,EAAa,GACnB,SAASC,EAAoBC,EAAmBC,EAAgB,CAC5D,IAAIC,EAAe,GACfC,EAAoB,GACxB,MAAMC,EAAQ,CACV,MAAO,EACP,UAAW,EACX,aAAc,EACtB,EACUC,EAAmB,IAAOH,EAAe,GACzCI,EAAQT,EAAW,OAAO,CAACU,EAAKC,KAClCD,EAAIC,CAAG,EAAIC,EAAiBJ,CAAgB,EACrCE,GACR,CAAA,CAAE,EACC,CAAE,KAAAG,EAAM,iBAAAC,EAAkB,OAAAC,EAAQ,UAAAC,EAAW,OAAAC,EAAQ,WAAAC,CAAU,EAAKT,EACpEU,EAAe,IAAM,CACvB,MAAMC,EAEA,YAAY,IAAG,EACrBf,EAAe,GACfE,EAAM,MAAQD,EACR,IAAO,GACP,KAAK,IAAI,KAAK,IAAIc,EAAYb,EAAM,UAAWN,CAAU,EAAG,CAAC,EACnEM,EAAM,UAAYa,EAClBb,EAAM,aAAe,GAErBM,EAAK,QAAQN,CAAK,EAClBO,EAAiB,QAAQP,CAAK,EAC9BQ,EAAO,QAAQR,CAAK,EACpBS,EAAU,QAAQT,CAAK,EACvBU,EAAO,QAAQV,CAAK,EACpBW,EAAW,QAAQX,CAAK,EACxBA,EAAM,aAAe,GACjBF,GAAgBD,IAChBE,EAAoB,GACpBH,EAAkBgB,CAAY,EAEtC,EACME,EAAO,IAAM,CACfhB,EAAe,GACfC,EAAoB,GACfC,EAAM,cACPJ,EAAkBgB,CAAY,CAEtC,EAeA,MAAO,CAAE,SAdQnB,EAAW,OAAO,CAACU,EAAKC,IAAQ,CAC7C,MAAMW,EAAOb,EAAME,CAAG,EACtB,OAAAD,EAAIC,CAAG,EAAI,CAACY,EAASC,EAAY,GAAOC,EAAY,MAC3CpB,GACDgB,EAAI,EACDC,EAAK,SAASC,EAASC,EAAWC,CAAS,GAE/Cf,CACX,EAAG,CAAA,CAAE,EAMc,OALHa,GAAY,CACxB,QAASG,EAAI,EAAGA,EAAI1B,EAAW,OAAQ0B,IACnCjB,EAAMT,EAAW0B,CAAC,CAAC,EAAE,OAAOH,CAAO,CAE3C,EAC2B,MAAAhB,EAAO,MAAAE,CAAK,CAC3C","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-step.js","sources":["../../../../../../node_modules/framer-motion/dist/es/frameloop/render-step.mjs"],"sourcesContent":["function createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (!queue.has(callback))\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [thisFrame, nextFrame] = [nextFrame, thisFrame];\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n"],"names":["createRenderStep","runNextFrame","thisFrame","nextFrame","isProcessing","flushNextFrame","toKeepAlive","latestFrameData","triggerCallback","callback","step","keepAlive","immediate","queue","frameData"],"mappings":"AAAA,SAASA,EAAiBC,EAAc,CAKpC,IAAIC,EAAY,IAAI,IAChBC,EAAY,IAAI,IAKhBC,EAAe,GACfC,EAAiB,GAIrB,MAAMC,EAAc,IAAI,QACxB,IAAIC,EAAkB,CAClB,MAAO,EACP,UAAW,EACX,aAAc,EACtB,EACI,SAASC,EAAgBC,EAAU,CAC3BH,EAAY,IAAIG,CAAQ,IACxBC,EAAK,SAASD,CAAQ,EACtBR,EAAY,GAEhBQ,EAASF,CAAe,
|
|
1
|
+
{"version":3,"file":"render-step.js","sources":["../../../../../../node_modules/framer-motion/dist/es/frameloop/render-step.mjs"],"sourcesContent":["function createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (!queue.has(callback))\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [thisFrame, nextFrame] = [nextFrame, thisFrame];\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n"],"names":["createRenderStep","runNextFrame","thisFrame","nextFrame","isProcessing","flushNextFrame","toKeepAlive","latestFrameData","triggerCallback","callback","step","keepAlive","immediate","queue","frameData"],"mappings":"AAAA,SAASA,EAAiBC,EAAc,CAKpC,IAAIC,EAAY,IAAI,IAChBC,EAAY,IAAI,IAKhBC,EAAe,GACfC,EAAiB,GAIrB,MAAMC,EAAc,IAAI,QACxB,IAAIC,EAAkB,CAClB,MAAO,EACP,UAAW,EACX,aAAc,EACtB,EACI,SAASC,EAAgBC,EAAU,CAC3BH,EAAY,IAAIG,CAAQ,IACxBC,EAAK,SAASD,CAAQ,EACtBR,EAAY,GAEhBQ,EAASF,CAAe,CAC5B,CACA,MAAMG,EAAO,CAIT,SAAU,CAACD,EAAUE,EAAY,GAAOC,EAAY,KAAU,CAE1D,MAAMC,EADoBD,GAAaR,EACLF,EAAYC,EAC9C,OAAIQ,GACAL,EAAY,IAAIG,CAAQ,EACvBI,EAAM,IAAIJ,CAAQ,GACnBI,EAAM,IAAIJ,CAAQ,EACfA,CACX,EAIA,OAASA,GAAa,CAClBN,EAAU,OAAOM,CAAQ,EACzBH,EAAY,OAAOG,CAAQ,CAC/B,EAIA,QAAUK,GAAc,CAOpB,GANAP,EAAkBO,EAMdV,EAAc,CACdC,EAAiB,GACjB,MACJ,CACAD,EAAe,GACf,CAACF,EAAWC,CAAS,EAAI,CAACA,EAAWD,CAAS,EAE9CA,EAAU,QAAQM,CAAe,EAGjCN,EAAU,MAAK,EACfE,EAAe,GACXC,IACAA,EAAiB,GACjBK,EAAK,QAAQI,CAAS,EAE9B,CACR,EACI,OAAOJ,CACX","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-time.js","sources":["../../../../../../node_modules/framer-motion/dist/es/frameloop/sync-time.mjs"],"sourcesContent":["import { MotionGlobalConfig } from '../utils/GlobalConfig.mjs';\nimport { frameData } from './frame.mjs';\n\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nconst time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n\nexport { time };\n"],"names":["now","clearTime","time","frameData","MotionGlobalConfig","newTime"],"mappings":"qGAGA,IAAIA,EACJ,SAASC,GAAY,CACjBD,EAAM,MACV,CASK,MAACE,EAAO,CACT,IAAK,KACGF,IAAQ,QACRE,EAAK,IAAIC,EAAU,cAAgBC,EAAmB,gBAChDD,EAAU,UACV,YAAY,IAAG,CAAE,EAEpBH,GAEX,IAAMK,GAAY,CACdL,EAAMK,EACN,eAAeJ,CAAS,
|
|
1
|
+
{"version":3,"file":"sync-time.js","sources":["../../../../../../node_modules/framer-motion/dist/es/frameloop/sync-time.mjs"],"sourcesContent":["import { MotionGlobalConfig } from '../utils/GlobalConfig.mjs';\nimport { frameData } from './frame.mjs';\n\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nconst time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n\nexport { time };\n"],"names":["now","clearTime","time","frameData","MotionGlobalConfig","newTime"],"mappings":"qGAGA,IAAIA,EACJ,SAASC,GAAY,CACjBD,EAAM,MACV,CASK,MAACE,EAAO,CACT,IAAK,KACGF,IAAQ,QACRE,EAAK,IAAIC,EAAU,cAAgBC,EAAmB,gBAChDD,EAAU,UACV,YAAY,IAAG,CAAE,EAEpBH,GAEX,IAAMK,GAAY,CACdL,EAAMK,EACN,eAAeJ,CAAS,CAC5B,CACJ","x_google_ignoreList":[0]}
|
package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualElementDragControls.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs"],"sourcesContent":["import { invariant } from 'motion-utils';\nimport { setDragLock } from 'motion-dom';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { animateMotionValue } from '../../animation/interfaces/motion-value.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { addValueToWillChange } from '../../value/use-will-change/add-will-change.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: PointerEvent\nclass VisualElementDragControls {\n constructor(visualElement) {\n this.openDragLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n const { dragSnapToOrigin } = this.getProps();\n // Stop or pause any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n dragSnapToOrigin ? this.pauseAnimation() : this.stopAnimation();\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point);\n }\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openDragLock)\n this.openDragLock();\n this.openDragLock = setDragLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock)\n return;\n }\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.postRender(() => onDragStart(event, info));\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n // latestPointerEvent = event\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag && onDrag(event, info);\n };\n const onSessionEnd = (event, info) => this.stop(event, info);\n const resumeAnimation = () => eachAxis((axis) => {\n var _a;\n return this.getAnimationState(axis) === \"paused\" &&\n ((_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.play());\n });\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n contextWindow: getContextWindow(this.visualElement),\n });\n }\n stop(event, info) {\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n const { velocity } = info;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(event, info));\n }\n }\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock();\n this.openDragLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n var _a;\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : (_a = this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n if (prevConstraints !== this.constraints &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n pauseAnimation() {\n eachAxis((axis) => { var _a; return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.pause(); });\n }\n getAnimationState(axis) {\n var _a;\n return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.state;\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (props.initial\n ? props.initial[axis]\n : undefined) || 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n axisValue.set(point[axis] - mixNumber(min, max, 0.5));\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n drag && dragListener && this.start(event);\n });\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n"],"names":["elementDragControls","VisualElementDragControls","visualElement","createBox","originEvent","snapToCursor","presenceContext","onSessionStart","event","dragSnapToOrigin","extractEventInfo","onStart","info","drag","dragPropagation","onDragStart","setDragLock","eachAxis","axis","current","percent","projection","measuredAxis","calcLength","frame","addValueToWillChange","animationState","onMove","dragDirectionLock","onDirectionLock","onDrag","offset","getCurrentDirection","onSessionEnd","resumeAnimation","_a","PanSession","getContextWindow","isDragging","velocity","onDragEnd","_point","shouldDrag","axisValue","next","applyConstraints","dragConstraints","dragElastic","layout","prevConstraints","isRefObject","calcRelativeConstraints","resolveDragElastic","rebaseAxisConstraints","constraints","onMeasureDragConstraints","constraintsElement","constraintsBox","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","convertBoundingBoxToBox","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","transition","bounceStiffness","bounceDamping","inertia","animateMotionValue","dragKey","props","externalMotionValue","point","min","max","mixNumber","boxProgress","latest","calcOrigin","transformTemplate","element","stopPointerListener","addPointerEvent","dragListener","measureDragConstraints","stopMeasureLayoutListener","stopResizeListener","addDomEvent","stopLayoutUpdateListener","delta","hasLayoutChanged","motionValue","defaultElastic","direction","currentDirection","lockThreshold"],"mappings":"61CAoBK,MAACA,EAAsB,IAAI,QAKhC,MAAMC,EAA0B,CAC5B,YAAYC,EAAe,CACvB,KAAK,aAAe,KACpB,KAAK,WAAa,GAClB,KAAK,iBAAmB,KACxB,KAAK,YAAc,CAAE,EAAG,EAAG,EAAG,CAA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AAKF,EAAM3E,CAAI,EAAE,SAAS,EAC7E,CAAiB,EACD,KAAK,cAAc,OAAM,EAEzC,CAAS,EACD,MAAO,IAAM,CACTwE,EAAkB,EAClBL,EAAmB,EACnBI,EAAyB,EACzBG,GAA4BA,EAAwB,CAChE,CACA,CACI,UAAW,CACP,MAAMlB,EAAQ,KAAK,cAAc,SAAQ,EACnC,CAAE,KAAA7D,EAAO,GAAO,kBAAAe,EAAoB,GAAO,gBAAAd,EAAkB,GAAO,gBAAAgC,EAAkB,GAAO,YAAAC,EAAciD,EAAgB,aAAAhC,EAAe,EAAI,EAAMU,EAC1J,MAAO,CACH,GAAGA,EACH,KAAA7D,EACA,kBAAAe,EACA,gBAAAd,EACA,gBAAAgC,EACA,YAAAC,EACA,aAAAiB,CACZ,CACA,CACA,CACA,SAAStB,EAAWuD,EAAWpF,EAAMqF,EAAkB,CACnD,OAASrF,IAAS,IAAQA,IAASoF,KAC9BC,IAAqB,MAAQA,IAAqBD,EAC3D,CAQA,SAASjE,EAAoBD,EAAQoE,EAAgB,GAAI,CACrD,IAAIF,EAAY,KAChB,OAAI,KAAK,IAAIlE,EAAO,CAAC,EAAIoE,EACrBF,EAAY,IAEP,KAAK,IAAIlE,EAAO,CAAC,EAAIoE,IAC1BF,EAAY,KAETA,CACX","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"VisualElementDragControls.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs"],"sourcesContent":["import { invariant } from 'motion-utils';\nimport { setDragLock } from 'motion-dom';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { animateMotionValue } from '../../animation/interfaces/motion-value.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { addValueToWillChange } from '../../value/use-will-change/add-will-change.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: PointerEvent\nclass VisualElementDragControls {\n constructor(visualElement) {\n this.openDragLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n const { dragSnapToOrigin } = this.getProps();\n // Stop or pause any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n dragSnapToOrigin ? this.pauseAnimation() : this.stopAnimation();\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point);\n }\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openDragLock)\n this.openDragLock();\n this.openDragLock = setDragLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock)\n return;\n }\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.postRender(() => onDragStart(event, info));\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n // latestPointerEvent = event\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag && onDrag(event, info);\n };\n const onSessionEnd = (event, info) => this.stop(event, info);\n const resumeAnimation = () => eachAxis((axis) => {\n var _a;\n return this.getAnimationState(axis) === \"paused\" &&\n ((_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.play());\n });\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n contextWindow: getContextWindow(this.visualElement),\n });\n }\n stop(event, info) {\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n const { velocity } = info;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(event, info));\n }\n }\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock();\n this.openDragLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n var _a;\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : (_a = this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n if (prevConstraints !== this.constraints &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n pauseAnimation() {\n eachAxis((axis) => { var _a; return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.pause(); });\n }\n getAnimationState(axis) {\n var _a;\n return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.state;\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (props.initial\n ? props.initial[axis]\n : undefined) || 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n axisValue.set(point[axis] - mixNumber(min, max, 0.5));\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n drag && dragListener && this.start(event);\n });\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n"],"names":["elementDragControls","VisualElementDragControls","visualElement","createBox","originEvent","snapToCursor","presenceContext","onSessionStart","event","dragSnapToOrigin","extractEventInfo","onStart","info","drag","dragPropagation","onDragStart","setDragLock","eachAxis","axis","current","percent","projection","measuredAxis","calcLength","frame","addValueToWillChange","animationState","onMove","dragDirectionLock","onDirectionLock","onDrag","offset","getCurrentDirection","onSessionEnd","resumeAnimation","_a","PanSession","getContextWindow","isDragging","velocity","onDragEnd","_point","shouldDrag","axisValue","next","applyConstraints","dragConstraints","dragElastic","layout","prevConstraints","isRefObject","calcRelativeConstraints","resolveDragElastic","rebaseAxisConstraints","constraints","onMeasureDragConstraints","constraintsElement","constraintsBox","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","convertBoundingBoxToBox","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","transition","bounceStiffness","bounceDamping","inertia","animateMotionValue","dragKey","props","externalMotionValue","point","min","max","mixNumber","boxProgress","latest","calcOrigin","transformTemplate","element","stopPointerListener","addPointerEvent","dragListener","measureDragConstraints","stopMeasureLayoutListener","stopResizeListener","addDomEvent","stopLayoutUpdateListener","delta","hasLayoutChanged","motionValue","defaultElastic","direction","currentDirection","lockThreshold"],"mappings":"61CAoBK,MAACA,EAAsB,IAAI,QAKhC,MAAMC,EAA0B,CAC5B,YAAYC,EAAe,CACvB,KAAK,aAAe,KACpB,KAAK,WAAa,GAClB,KAAK,iBAAmB,KACxB,KAAK,YAAc,CAAE,EAAG,EAAG,EAAG,CAAC,EAI/B,KAAK,YAAc,GACnB,KAAK,sBAAwB,GAI7B,KAAK,QAAUC,EAAS,EACxB,KAAK,cAAgBD,CACzB,CACA,MAAME,EAAa,CAAE,aAAAC,EAAe,EAAK,EAAK,CAAA,EAAI,CAI9C,KAAM,CAAE,gBAAAC,GAAoB,KAAK,cACjC,GAAIA,GAAmBA,EAAgB,YAAc,GACjD,OACJ,MAAMC,EAAkBC,GAAU,CAC9B,KAAM,CAAE,iBAAAC,CAAgB,EAAK,KAAK,SAAQ,EAG1CA,EAAmB,KAAK,iBAAmB,KAAK,cAAa,EACzDJ,GACA,KAAK,aAAaK,EAAiBF,CAAK,EAAE,KAAK,CAEvD,EACMG,E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d,EACA,gBAAAgC,EACA,YAAAC,EACA,aAAAiB,CACZ,CACI,CACJ,CACA,SAAStB,EAAWuD,EAAWpF,EAAMqF,EAAkB,CACnD,OAASrF,IAAS,IAAQA,IAASoF,KAC9BC,IAAqB,MAAQA,IAAqBD,EAC3D,CAQA,SAASjE,EAAoBD,EAAQoE,EAAgB,GAAI,CACrD,IAAIF,EAAY,KAChB,OAAI,KAAK,IAAIlE,EAAO,CAAC,EAAIoE,EACrBF,EAAY,IAEP,KAAK,IAAIlE,EAAO,CAAC,EAAIoE,IAC1BF,EAAY,KAETA,CACX","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/index.mjs"],"sourcesContent":["import { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from 'motion-utils';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n }\n}\n\nexport { DragGesture };\n"],"names":["DragGesture","Feature","node","noop","VisualElementDragControls","dragControls"],"mappings":"yMAIA,MAAMA,UAAoBC,CAAQ,CAC9B,YAAYC,EAAM,CACd,MAAMA,CAAI,EACV,KAAK,oBAAsBC,EAC3B,KAAK,gBAAkBA,EACvB,KAAK,SAAW,IAAIC,EAA0BF,CAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/index.mjs"],"sourcesContent":["import { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from 'motion-utils';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n }\n}\n\nexport { DragGesture };\n"],"names":["DragGesture","Feature","node","noop","VisualElementDragControls","dragControls"],"mappings":"yMAIA,MAAMA,UAAoBC,CAAQ,CAC9B,YAAYC,EAAM,CACd,MAAMA,CAAI,EACV,KAAK,oBAAsBC,EAC3B,KAAK,gBAAkBA,EACvB,KAAK,SAAW,IAAIC,EAA0BF,CAAI,CACtD,CACA,OAAQ,CAGJ,KAAM,CAAE,aAAAG,CAAY,EAAK,KAAK,KAAK,SAAQ,EACvCA,IACA,KAAK,oBAAsBA,EAAa,UAAU,KAAK,QAAQ,GAEnE,KAAK,gBAAkB,KAAK,SAAS,aAAY,GAAMF,CAC3D,CACA,SAAU,CACN,KAAK,oBAAmB,EACxB,KAAK,gBAAe,CACxB,CACJ","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/focus.mjs"],"sourcesContent":["import { addDomEvent } from '../events/add-dom-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n"],"names":["FocusGesture","Feature","isFocusVisible","pipe","addDomEvent"],"mappings":"yJAIA,MAAMA,UAAqBC,CAAQ,CAC/B,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,SAAW,
|
|
1
|
+
{"version":3,"file":"focus.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/focus.mjs"],"sourcesContent":["import { addDomEvent } from '../events/add-dom-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n"],"names":["FocusGesture","Feature","isFocusVisible","pipe","addDomEvent"],"mappings":"yJAIA,MAAMA,UAAqBC,CAAQ,CAC/B,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,SAAW,EACpB,CACA,SAAU,CACN,IAAIC,EAAiB,GAOrB,GAAI,CACAA,EAAiB,KAAK,KAAK,QAAQ,QAAQ,gBAAgB,CAC/D,MACU,CACNA,EAAiB,EACrB,CACI,CAACA,GAAkB,CAAC,KAAK,KAAK,iBAElC,KAAK,KAAK,eAAe,UAAU,aAAc,EAAI,EACrD,KAAK,SAAW,GACpB,CACA,QAAS,CACD,CAAC,KAAK,UAAY,CAAC,KAAK,KAAK,iBAEjC,KAAK,KAAK,eAAe,UAAU,aAAc,EAAK,EACtD,KAAK,SAAW,GACpB,CACA,OAAQ,CACJ,KAAK,QAAUC,EAAKC,EAAY,KAAK,KAAK,QAAS,QAAS,IAAM,KAAK,QAAO,CAAE,EAAGA,EAAY,KAAK,KAAK,QAAS,OAAQ,IAAM,KAAK,OAAM,CAAE,CAAC,CAClJ,CACA,SAAU,CAAE,CAChB","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/hover.mjs"],"sourcesContent":["import { Feature } from '../motion/features/Feature.mjs';\nimport { hover } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction handleHoverEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", lifecycle === \"Start\");\n }\n const eventName = (\"onHover\" + lifecycle);\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass HoverGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = hover(current, (startEvent) => {\n handleHoverEvent(this.node, startEvent, \"Start\");\n return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\");\n });\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n"],"names":["handleHoverEvent","node","event","lifecycle","props","eventName","callback","frame","extractEventInfo","HoverGesture","Feature","current","hover","startEvent","endEvent"],"mappings":"0OAKA,SAASA,EAAiBC,EAAMC,EAAOC,EAAW,CAC9C,KAAM,CAAE,MAAAC,CAAK,EAAKH,EACdA,EAAK,gBAAkBG,EAAM,YAC7BH,EAAK,eAAe,UAAU,aAAcE,IAAc,OAAO,EAErE,MAAME,EAAa,UAAYF,EACzBG,EAAWF,EAAMC,CAAS,EAC5BC,GACAC,EAAM,WAAW,IAAMD,EAASJ,EAAOM,EAAiBN,CAAK,CAAC,CAAC,CAEvE,CACA,MAAMO,UAAqBC,CAAQ,CAC/B,OAAQ,CACJ,KAAM,CAAE,QAAAC,GAAY,KAAK,KACpBA,IAEL,KAAK,QAAUC,EAAMD,EAAUE,IAC3Bb,EAAiB,KAAK,KAAMa,EAAY,OAAO,EACvCC,GAAad,EAAiB,KAAK,KAAMc,EAAU,KAAK,EACnE,
|
|
1
|
+
{"version":3,"file":"hover.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/hover.mjs"],"sourcesContent":["import { Feature } from '../motion/features/Feature.mjs';\nimport { hover } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction handleHoverEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", lifecycle === \"Start\");\n }\n const eventName = (\"onHover\" + lifecycle);\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass HoverGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = hover(current, (startEvent) => {\n handleHoverEvent(this.node, startEvent, \"Start\");\n return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\");\n });\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n"],"names":["handleHoverEvent","node","event","lifecycle","props","eventName","callback","frame","extractEventInfo","HoverGesture","Feature","current","hover","startEvent","endEvent"],"mappings":"0OAKA,SAASA,EAAiBC,EAAMC,EAAOC,EAAW,CAC9C,KAAM,CAAE,MAAAC,CAAK,EAAKH,EACdA,EAAK,gBAAkBG,EAAM,YAC7BH,EAAK,eAAe,UAAU,aAAcE,IAAc,OAAO,EAErE,MAAME,EAAa,UAAYF,EACzBG,EAAWF,EAAMC,CAAS,EAC5BC,GACAC,EAAM,WAAW,IAAMD,EAASJ,EAAOM,EAAiBN,CAAK,CAAC,CAAC,CAEvE,CACA,MAAMO,UAAqBC,CAAQ,CAC/B,OAAQ,CACJ,KAAM,CAAE,QAAAC,GAAY,KAAK,KACpBA,IAEL,KAAK,QAAUC,EAAMD,EAAUE,IAC3Bb,EAAiB,KAAK,KAAMa,EAAY,OAAO,EACvCC,GAAad,EAAiB,KAAK,KAAMc,EAAU,KAAK,EACnE,EACL,CACA,SAAU,CAAE,CAChB","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanSession.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs"],"sourcesContent":["import { isPrimaryPointer } from 'motion-dom';\nimport { secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\nimport { pipe } from '../../utils/pipe.mjs';\nimport { frame, cancelFrame, frameData } from '../../frameloop/frame.mjs';\n\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint, contextWindow, dragSnapToOrigin = false, } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n /**\n * @internal\n */\n this.contextWindow = window;\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n if (this.dragSnapToOrigin)\n resumeAnimation && resumeAnimation();\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp));\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n"],"names":["PanSession","event","handlers","transformPagePoint","contextWindow","dragSnapToOrigin","info","getPanInfo","isPanStarted","isDistancePastThreshold","distance2D","point","timestamp","frameData","onStart","onMove","transformPoint","frame","onEnd","onSessionEnd","resumeAnimation","panInfo","isPrimaryPointer","extractEventInfo","initialInfo","onSessionStart","pipe","addPointerEvent","cancelFrame","subtractPoint","a","b","history","lastDevicePoint","startDevicePoint","getVelocity","timeDelta","i","timestampedPoint","lastPoint","secondsToMilliseconds","time","millisecondsToSeconds","currentVelocity"],"mappings":"uhBAWA,MAAMA,CAAW,CACb,YAAYC,EAAOC,EAAU,CAAE,mBAAAC,EAAoB,cAAAC,EAAe,iBAAAC,EAAmB,EAAK,EAAM,GAAI,CAgEhG,GA5DA,KAAK,WAAa,KAIlB,KAAK,cAAgB,KAIrB,KAAK,kBAAoB,KAIzB,KAAK,SAAW,CAAA,EAIhB,KAAK,cAAgB,OACrB,KAAK,YAAc,IAAM,CACrB,GAAI,EAAE,KAAK,eAAiB,KAAK,mBAC7B,OACJ,MAAMC,EAAOC,EAAW,KAAK,kBAAmB,KAAK,OAAO,EACtDC,EAAe,KAAK,aAAe,KAInCC,EAA0BC,EAAWJ,EAAK,OAAQ,CAAE,EAAG,EAAG,EAAG,CAAC,CAAE,GAAK,EAC3E,GAAI,CAACE,GAAgB,CAACC,EAClB,OACJ,KAAM,CAAE,MAAAE,CAAK,EAAKL,EACZ,CAAE,UAAAM,CAAS,EAAKC,EACtB,KAAK,QAAQ,KAAK,CAAE,GAAGF,EAAO,UAAAC,CAAS,CAAE,EACzC,KAAM,CAAE,QAAAE,EAAS,OAAAC,CAAM,EAAK,KAAK,SAC5BP,IACDM,GAAWA,EAAQ,KAAK,cAAeR,CAAI,EAC3C,KAAK,WAAa,KAAK,eAE3BS,GAAUA,EAAO,KAAK,cAAeT,CAAI,
|
|
1
|
+
{"version":3,"file":"PanSession.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs"],"sourcesContent":["import { isPrimaryPointer } from 'motion-dom';\nimport { secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\nimport { pipe } from '../../utils/pipe.mjs';\nimport { frame, cancelFrame, frameData } from '../../frameloop/frame.mjs';\n\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint, contextWindow, dragSnapToOrigin = false, } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n /**\n * @internal\n */\n this.contextWindow = window;\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n if (this.dragSnapToOrigin)\n resumeAnimation && resumeAnimation();\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp));\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n"],"names":["PanSession","event","handlers","transformPagePoint","contextWindow","dragSnapToOrigin","info","getPanInfo","isPanStarted","isDistancePastThreshold","distance2D","point","timestamp","frameData","onStart","onMove","transformPoint","frame","onEnd","onSessionEnd","resumeAnimation","panInfo","isPrimaryPointer","extractEventInfo","initialInfo","onSessionStart","pipe","addPointerEvent","cancelFrame","subtractPoint","a","b","history","lastDevicePoint","startDevicePoint","getVelocity","timeDelta","i","timestampedPoint","lastPoint","secondsToMilliseconds","time","millisecondsToSeconds","currentVelocity"],"mappings":"uhBAWA,MAAMA,CAAW,CACb,YAAYC,EAAOC,EAAU,CAAE,mBAAAC,EAAoB,cAAAC,EAAe,iBAAAC,EAAmB,EAAK,EAAM,GAAI,CAgEhG,GA5DA,KAAK,WAAa,KAIlB,KAAK,cAAgB,KAIrB,KAAK,kBAAoB,KAIzB,KAAK,SAAW,CAAA,EAIhB,KAAK,cAAgB,OACrB,KAAK,YAAc,IAAM,CACrB,GAAI,EAAE,KAAK,eAAiB,KAAK,mBAC7B,OACJ,MAAMC,EAAOC,EAAW,KAAK,kBAAmB,KAAK,OAAO,EACtDC,EAAe,KAAK,aAAe,KAInCC,EAA0BC,EAAWJ,EAAK,OAAQ,CAAE,EAAG,EAAG,EAAG,CAAC,CAAE,GAAK,EAC3E,GAAI,CAACE,GAAgB,CAACC,EAClB,OACJ,KAAM,CAAE,MAAAE,CAAK,EAAKL,EACZ,CAAE,UAAAM,CAAS,EAAKC,EACtB,KAAK,QAAQ,KAAK,CAAE,GAAGF,EAAO,UAAAC,CAAS,CAAE,EACzC,KAAM,CAAE,QAAAE,EAAS,OAAAC,CAAM,EAAK,KAAK,SAC5BP,IACDM,GAAWA,EAAQ,KAAK,cAAeR,CAAI,EAC3C,KAAK,WAAa,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AKG,EACxC,GAAIF,EAAU,EAAID,EAAiB,GAAKG,CAChD,EACI,OAAIE,EAAgB,IAAM,MACtBA,EAAgB,EAAI,GAEpBA,EAAgB,IAAM,MACtBA,EAAgB,EAAI,GAEjBA,CACX","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs"],"sourcesContent":["import { PanSession } from './PanSession.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from 'motion-utils';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.postRender(() => handler(event, info));\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: onPan,\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n"],"names":["asyncHandler","handler","event","info","frame","PanGesture","Feature","noop","pointerDownEvent","PanSession","getContextWindow","onPanSessionStart","onPanStart","onPan","onPanEnd","addPointerEvent"],"mappings":"qWAOA,MAAMA,EAAgBC,GAAY,CAACC,EAAOC,IAAS,CAC3CF,GACAG,EAAM,WAAW,IAAMH,EAAQC,EAAOC,CAAI,CAAC,CAEnD,EACA,MAAME,UAAmBC,CAAQ,CAC7B,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,0BAA4BC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs"],"sourcesContent":["import { PanSession } from './PanSession.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from 'motion-utils';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.postRender(() => handler(event, info));\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: onPan,\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n"],"names":["asyncHandler","handler","event","info","frame","PanGesture","Feature","noop","pointerDownEvent","PanSession","getContextWindow","onPanSessionStart","onPanStart","onPan","onPanEnd","addPointerEvent"],"mappings":"qWAOA,MAAMA,EAAgBC,GAAY,CAACC,EAAOC,IAAS,CAC3CF,GACAG,EAAM,WAAW,IAAMH,EAAQC,EAAOC,CAAI,CAAC,CAEnD,EACA,MAAME,UAAmBC,CAAQ,CAC7B,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,0BAA4BC,CACrC,CACA,cAAcC,EAAkB,CAC5B,KAAK,QAAU,IAAIC,EAAWD,EAAkB,KAAK,oBAAqB,CACtE,mBAAoB,KAAK,KAAK,sBAAqB,EACnD,cAAeE,EAAiB,KAAK,IAAI,CACrD,CAAS,CACL,CACA,mBAAoB,CAChB,KAAM,CAAE,kBAAAC,EAAmB,WAAAC,EAAY,MAAAC,EAAO,SAAAC,CAAQ,EAAK,KAAK,KAAK,SAAQ,EAC7E,MAAO,CACH,eAAgBd,EAAaW,CAAiB,EAC9C,QAASX,EAAaY,CAAU,EAChC,OAAQC,EACR,MAAO,CAACX,EAAOC,IAAS,CACpB,OAAO,KAAK,QACRW,GACAV,EAAM,WAAW,IAAMU,EAASZ,EAAOC,CAAI,CAAC,CAEpD,CACZ,CACI,CACA,OAAQ,CACJ,KAAK,0BAA4BY,EAAgB,KAAK,KAAK,QAAS,cAAgBb,GAAU,KAAK,cAAcA,CAAK,CAAC,CAC3H,CACA,QAAS,CACL,KAAK,SAAW,KAAK,QAAQ,eAAe,KAAK,mBAAmB,CACxE,CACA,SAAU,CACN,KAAK,0BAAyB,EAC9B,KAAK,SAAW,KAAK,QAAQ,IAAG,CACpC,CACJ","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"press.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/press.mjs"],"sourcesContent":["import { Feature } from '../motion/features/Feature.mjs';\nimport { press } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction handlePressEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.animationState && props.whileTap) {\n node.animationState.setActive(\"whileTap\", lifecycle === \"Start\");\n }\n const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle));\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass PressGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = press(current, (startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\");\n return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"End\" : \"Cancel\");\n }, { useGlobalTarget: this.node.props.globalTapTarget });\n }\n unmount() { }\n}\n\nexport { PressGesture };\n"],"names":["handlePressEvent","node","event","lifecycle","props","eventName","callback","frame","extractEventInfo","PressGesture","Feature","current","press","startEvent","endEvent","success"],"mappings":"gPAKA,SAASA,EAAiBC,EAAMC,EAAOC,EAAW,CAC9C,KAAM,CAAE,MAAAC,CAAK,EAAKH,EACdA,EAAK,gBAAkBG,EAAM,UAC7BH,EAAK,eAAe,UAAU,WAAYE,IAAc,OAAO,EAEnE,MAAME,EAAa,SAAWF,IAAc,MAAQ,GAAKA,GACnDG,EAAWF,EAAMC,CAAS,EAC5BC,GACAC,EAAM,WAAW,IAAMD,EAASJ,EAAOM,EAAiBN,CAAK,CAAC,CAAC,CAEvE,CACA,MAAMO,UAAqBC,CAAQ,CAC/B,OAAQ,CACJ,KAAM,CAAE,QAAAC,GAAY,KAAK,KACpBA,IAEL,KAAK,QAAUC,EAAMD,EAAUE,IAC3Bb,EAAiB,KAAK,KAAMa,EAAY,OAAO,EACxC,CAACC,EAAU,CAAE,QAAAC,CAAO,IAAOf,EAAiB,KAAK,KAAMc,EAAUC,EAAU,MAAQ,QAAQ,GACnG,CAAE,gBAAiB,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"press.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/press.mjs"],"sourcesContent":["import { Feature } from '../motion/features/Feature.mjs';\nimport { press } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction handlePressEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.animationState && props.whileTap) {\n node.animationState.setActive(\"whileTap\", lifecycle === \"Start\");\n }\n const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle));\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass PressGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = press(current, (startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\");\n return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"End\" : \"Cancel\");\n }, { useGlobalTarget: this.node.props.globalTapTarget });\n }\n unmount() { }\n}\n\nexport { PressGesture };\n"],"names":["handlePressEvent","node","event","lifecycle","props","eventName","callback","frame","extractEventInfo","PressGesture","Feature","current","press","startEvent","endEvent","success"],"mappings":"gPAKA,SAASA,EAAiBC,EAAMC,EAAOC,EAAW,CAC9C,KAAM,CAAE,MAAAC,CAAK,EAAKH,EACdA,EAAK,gBAAkBG,EAAM,UAC7BH,EAAK,eAAe,UAAU,WAAYE,IAAc,OAAO,EAEnE,MAAME,EAAa,SAAWF,IAAc,MAAQ,GAAKA,GACnDG,EAAWF,EAAMC,CAAS,EAC5BC,GACAC,EAAM,WAAW,IAAMD,EAASJ,EAAOM,EAAiBN,CAAK,CAAC,CAAC,CAEvE,CACA,MAAMO,UAAqBC,CAAQ,CAC/B,OAAQ,CACJ,KAAM,CAAE,QAAAC,GAAY,KAAK,KACpBA,IAEL,KAAK,QAAUC,EAAMD,EAAUE,IAC3Bb,EAAiB,KAAK,KAAMa,EAAY,OAAO,EACxC,CAACC,EAAU,CAAE,QAAAC,CAAO,IAAOf,EAAiB,KAAK,KAAMc,EAAUC,EAAU,MAAQ,QAAQ,GACnG,CAAE,gBAAiB,KAAK,KAAK,MAAM,gBAAiB,EAC3D,CACA,SAAU,CAAE,CAChB","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/features/Feature.mjs"],"sourcesContent":["class Feature {\n constructor(node) {\n this.isMounted = false;\n this.node = node;\n }\n update() { }\n}\n\nexport { Feature };\n"],"names":["Feature","node"],"mappings":"AAAA,MAAMA,CAAQ,CACV,YAAYC,EAAM,CACd,KAAK,UAAY,GACjB,KAAK,KAAOA,
|
|
1
|
+
{"version":3,"file":"Feature.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/features/Feature.mjs"],"sourcesContent":["class Feature {\n constructor(node) {\n this.isMounted = false;\n this.node = node;\n }\n update() { }\n}\n\nexport { Feature };\n"],"names":["Feature","node"],"mappings":"AAAA,MAAMA,CAAQ,CACV,YAAYC,EAAM,CACd,KAAK,UAAY,GACjB,KAAK,KAAOA,CAChB,CACA,QAAS,CAAE,CACf","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exit.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs"],"sourcesContent":["import { Feature } from '../Feature.mjs';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent);\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => onExitComplete(this.id));\n }\n }\n mount() {\n const { register } = this.node.presenceContext || {};\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n"],"names":["id","ExitAnimationFeature","Feature","isPresent","onExitComplete","prevIsPresent","exitAnimation","register"],"mappings":"wCAEA,IAAIA,EAAK,EACT,MAAMC,UAA6BC,CAAQ,CACvC,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,GAAKF,
|
|
1
|
+
{"version":3,"file":"exit.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs"],"sourcesContent":["import { Feature } from '../Feature.mjs';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent);\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => onExitComplete(this.id));\n }\n }\n mount() {\n const { register } = this.node.presenceContext || {};\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n"],"names":["id","ExitAnimationFeature","Feature","isPresent","onExitComplete","prevIsPresent","exitAnimation","register"],"mappings":"wCAEA,IAAIA,EAAK,EACT,MAAMC,UAA6BC,CAAQ,CACvC,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,GAAKF,GACd,CACA,QAAS,CACL,GAAI,CAAC,KAAK,KAAK,gBACX,OACJ,KAAM,CAAE,UAAAG,EAAW,eAAAC,CAAc,EAAK,KAAK,KAAK,gBAC1C,CAAE,UAAWC,CAAa,EAAK,KAAK,KAAK,qBAAuB,CAAA,EACtE,GAAI,CAAC,KAAK,KAAK,gBAAkBF,IAAcE,EAC3C,OAEJ,MAAMC,EAAgB,KAAK,KAAK,eAAe,UAAU,OAAQ,CAACH,CAAS,EACvEC,GAAkB,CAACD,GACnBG,EAAc,KAAK,IAAMF,EAAe,KAAK,EAAE,CAAC,CAExD,CACA,OAAQ,CACJ,KAAM,CAAE,SAAAG,CAAQ,EAAK,KAAK,KAAK,iBAAmB,CAAA,EAC9CA,IACA,KAAK,QAAUA,EAAS,KAAK,EAAE,EAEvC,CACA,SAAU,CAAE,CAChB","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/index.mjs"],"sourcesContent":["import { isAnimationControls } from '../../../animation/utils/is-animation-controls.mjs';\nimport { createAnimationState } from '../../../render/utils/animation-state.mjs';\nimport { Feature } from '../Feature.mjs';\n\nclass AnimationFeature extends Feature {\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps();\n if (isAnimationControls(animate)) {\n this.unmountControls = animate.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() {\n var _a;\n this.node.animationState.reset();\n (_a = this.unmountControls) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n}\n\nexport { AnimationFeature };\n"],"names":["AnimationFeature","Feature","node","createAnimationState","animate","isAnimationControls","prevAnimate","_a"],"mappings":"gNAIA,MAAMA,UAAyBC,CAAQ,CAMnC,YAAYC,EAAM,CACd,MAAMA,CAAI,EACVA,EAAK,iBAAmBA,EAAK,eAAiBC,EAAqBD,CAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/index.mjs"],"sourcesContent":["import { isAnimationControls } from '../../../animation/utils/is-animation-controls.mjs';\nimport { createAnimationState } from '../../../render/utils/animation-state.mjs';\nimport { Feature } from '../Feature.mjs';\n\nclass AnimationFeature extends Feature {\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps();\n if (isAnimationControls(animate)) {\n this.unmountControls = animate.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() {\n var _a;\n this.node.animationState.reset();\n (_a = this.unmountControls) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n}\n\nexport { AnimationFeature };\n"],"names":["AnimationFeature","Feature","node","createAnimationState","animate","isAnimationControls","prevAnimate","_a"],"mappings":"gNAIA,MAAMA,UAAyBC,CAAQ,CAMnC,YAAYC,EAAM,CACd,MAAMA,CAAI,EACVA,EAAK,iBAAmBA,EAAK,eAAiBC,EAAqBD,CAAI,EAC3E,CACA,qCAAsC,CAClC,KAAM,CAAE,QAAAE,CAAO,EAAK,KAAK,KAAK,SAAQ,EAClCC,EAAoBD,CAAO,IAC3B,KAAK,gBAAkBA,EAAQ,UAAU,KAAK,IAAI,EAE1D,CAIA,OAAQ,CACJ,KAAK,oCAAmC,CAC5C,CACA,QAAS,CACL,KAAM,CAAE,QAAAA,CAAO,EAAK,KAAK,KAAK,SAAQ,EAChC,CAAE,QAASE,CAAW,EAAK,KAAK,KAAK,WAAa,CAAA,EACpDF,IAAYE,GACZ,KAAK,oCAAmC,CAEhD,CACA,SAAU,CACN,IAAIC,EACJ,KAAK,KAAK,eAAe,MAAK,GAC7BA,EAAK,KAAK,mBAAqB,MAAQA,IAAO,QAAkBA,EAAG,KAAK,IAAI,CACjF,CACJ","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeasureLayout.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { useContext, Component } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\nimport { globalProjectionState } from '../../../projection/node/state.mjs';\nimport { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';\nimport { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';\nimport { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';\nimport { microtask } from '../../../frameloop/microtask.mjs';\nimport { frame } from '../../../frameloop/frame.mjs';\n\nclass MeasureLayoutWithContext extends Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props;\n const projection = visualElement.projection;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { projection } = this.props.visualElement;\n if (projection) {\n projection.root.didUpdate();\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n}\nfunction MeasureLayout(props) {\n const [isPresent, safeToRemove] = usePresence();\n const layoutGroup = useContext(LayoutGroupContext);\n return (jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));\n}\nconst defaultScaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n"],"names":["MeasureLayoutWithContext","Component","visualElement","layoutGroup","switchLayoutGroup","layoutId","projection","addScaleCorrector","defaultScaleCorrectors","globalProjectionState","prevProps","layoutDependency","drag","isPresent","frame","stack","microtask","promoteContext","safeToRemove","MeasureLayout","props","usePresence","useContext","LayoutGroupContext","jsx","SwitchLayoutGroupContext","correctBorderRadius","correctBoxShadow"],"mappings":"uwBAaA,MAAMA,UAAiCC,CAAU,CAM7C,mBAAoB,CAChB,KAAM,CAAE,cAAAC,EAAe,YAAAC,EAAa,kBAAAC,EAAmB,SAAAC,CAAQ,EAAK,KAAK,MACnE,CAAE,WAAAC,CAAU,EAAKJ,EACvBK,EAAkBC,CAAsB,EACpCF,IACIH,EAAY,OACZA,EAAY,MAAM,IAAIG,CAAU,EAChCF,GAAqBA,EAAkB,UAAYC,GACnDD,EAAkB,SAASE,CAAU,EAEzCA,EAAW,KAAK,UAAS,EACzBA,EAAW,iBAAiB,oBAAqB,IAAM,CACnD,KAAK,aAAY,
|
|
1
|
+
{"version":3,"file":"MeasureLayout.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { useContext, Component } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\nimport { globalProjectionState } from '../../../projection/node/state.mjs';\nimport { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';\nimport { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';\nimport { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';\nimport { microtask } from '../../../frameloop/microtask.mjs';\nimport { frame } from '../../../frameloop/frame.mjs';\n\nclass MeasureLayoutWithContext extends Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props;\n const projection = visualElement.projection;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { projection } = this.props.visualElement;\n if (projection) {\n projection.root.didUpdate();\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n}\nfunction MeasureLayout(props) {\n const [isPresent, safeToRemove] = usePresence();\n const layoutGroup = useContext(LayoutGroupContext);\n return (jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));\n}\nconst defaultScaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n"],"names":["MeasureLayoutWithContext","Component","visualElement","layoutGroup","switchLayoutGroup","layoutId","projection","addScaleCorrector","defaultScaleCorrectors","globalProjectionState","prevProps","layoutDependency","drag","isPresent","frame","stack","microtask","promoteContext","safeToRemove","MeasureLayout","props","usePresence","useContext","LayoutGroupContext","jsx","SwitchLayoutGroupContext","correctBorderRadius","correctBoxShadow"],"mappings":"uwBAaA,MAAMA,UAAiCC,CAAU,CAM7C,mBAAoB,CAChB,KAAM,CAAE,cAAAC,EAAe,YAAAC,EAAa,kBAAAC,EAAmB,SAAAC,CAAQ,EAAK,KAAK,MACnE,CAAE,WAAAC,CAAU,EAAKJ,EACvBK,EAAkBC,CAAsB,EACpCF,IACIH,EAAY,OACZA,EAAY,MAAM,IAAIG,CAAU,EAChCF,GAAqBA,EAAkB,UAAYC,GACnDD,EAAkB,SAASE,CAAU,EAEzCA,EAAW,KAAK,UAAS,EACzBA,EAAW,iBAAiB,oBAAqB,IAAM,CACnD,KAAK,aAAY,CACrB,CAAC,EACDA,EAAW,WAAW,CAClB,GAAGA,EAAW,QACd,eAAgB,IAAM,KAAK,a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AWG,CAAwB,EAAG,UAAWZ,EAAW,aAAcK,CAAY,CAAE,CAC3L,CACA,MAAMV,EAAyB,CAC3B,aAAc,CACV,GAAGkB,EACH,QAAS,CACL,sBACA,uBACA,yBACA,yBACZ,CACA,EACI,oBAAqBA,EACrB,qBAAsBA,EACtB,uBAAwBA,EACxB,wBAAyBA,EACzB,UAAWC,CACf","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs"],"sourcesContent":["import { Feature } from '../Feature.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n};\nclass InViewFeature extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.unmount();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting)\n return;\n this.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n return observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() { }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n\nexport { InViewFeature };\n"],"names":["thresholdNames","InViewFeature","Feature","viewport","root","rootMargin","amount","once","options","onIntersectionUpdate","entry","isIntersecting","onViewportEnter","onViewportLeave","callback","observeIntersection","props","prevProps","hasViewportOptionChanged","prevViewport","name"],"mappings":"6FAGA,MAAMA,EAAiB,CACnB,KAAM,EACN,IAAK,CACT,EACA,MAAMC,UAAsBC,CAAQ,CAChC,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,eAAiB,GACtB,KAAK,SAAW,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs"],"sourcesContent":["import { Feature } from '../Feature.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n};\nclass InViewFeature extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.unmount();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting)\n return;\n this.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n return observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() { }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n\nexport { InViewFeature };\n"],"names":["thresholdNames","InViewFeature","Feature","viewport","root","rootMargin","amount","once","options","onIntersectionUpdate","entry","isIntersecting","onViewportEnter","onViewportLeave","callback","observeIntersection","props","prevProps","hasViewportOptionChanged","prevViewport","name"],"mappings":"6FAGA,MAAMA,EAAiB,CACnB,KAAM,EACN,IAAK,CACT,EACA,MAAMC,UAAsBC,CAAQ,CAChC,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,eAAiB,GACtB,KAAK,SAAW,EACpB,CACA,eAAgB,CACZ,KAAK,QAAO,EACZ,KAAM,CAAE,SAAAC,EAAW,CAAA,CAAE,EAAK,KAAK,KAAK,SAAQ,EACtC,CAAE,KAAAC,EAAM,OAAQC,EAAY,OAAAC,EAAS,OAAQ,KAAAC,CAAI,EAAKJ,EACtDK,EAAU,CACZ,KAAMJ,EAAOA,EAAK,QAAU,OAC5B,WAAAC,EACA,UAAW,OAAOC,GAAW,SAAWA,EAASN,EAAeM,CAAM,CAClF,EACcG,EAAwBC,GAAU,CACpC,KAAM,CAAE,eAAAC,CAAc,EAAKD,EAW3B,GAPI,KAAK,WAAaC,IAEtB,KAAK,SAAWA,EAKZJ,GAAQ,CAACI,GAAkB,KAAK,gBAChC,OAEKA,IACL,KAAK,eAAiB,IAEtB,KAAK,KAAK,gBACV,KAAK,KAAK,eAAe,UAAU,cAAeA,CAAc,EAMpE,KAAM,CAAE,gBAAAC,EAAiB,gBAAAC,CAAe,EAAK,KAAK,KAAK,SAAQ,EACzDC,EAAWH,EAAiBC,EAAkBC,EACpDC,GAAYA,EAASJ,CAAK,CAC9B,EACA,OAAOK,EAAoB,KAAK,KAAK,QAASP,EAASC,CAAoB,CAC/E,CACA,OAAQ,CACJ,KAAK,cAAa,CACtB,CACA,QAAS,CACL,GAAI,OAAO,qBAAyB,IAChC,OACJ,KAAM,CAAE,MAAAO,EAAO,UAAAC,CAAS,EAAK,KAAK,KACR,CAAC,SAAU,SAAU,MAAM,EAAE,KAAKC,EAAyBF,EAAOC,CAAS,CAAC,GAElG,KAAK,cAAa,CAE1B,CACA,SAAU,CAAE,CAChB,CACA,SAASC,EAAyB,CAAE,SAAAf,EAAW,EAAE,EAAI,CAAE,SAAUgB,EAAe,EAAE,EAAK,GAAI,CACvF,OAAQC,GAASjB,EAASiB,CAAI,IAAMD,EAAaC,CAAI,CACzD","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observers.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs"],"sourcesContent":["/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n const rootObservers = observers.get(lookupRoot);\n const key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n"],"names":["observerCallbacks","observers","fireObserverCallback","entry","callback","fireAllObserverCallbacks","entries","initIntersectionObserver","root","options","lookupRoot","rootObservers","key","observeIntersection","element","rootInteresectionObserver"],"mappings":"AAKA,MAAMA,EAAoB,IAAI,QAMxBC,EAAY,IAAI,QAChBC,EAAwBC,GAAU,CACpC,MAAMC,EAAWJ,EAAkB,IAAIG,EAAM,MAAM,EACnDC,GAAYA,EAASD,CAAK,CAC9B,EACME,EAA4BC,GAAY,CAC1CA,EAAQ,QAAQJ,CAAoB,CACxC,EACA,SAASK,EAAyB,CAAE,KAAAC,EAAM,GAAGC,GAAW,CACpD,MAAMC,EAAaF,GAAQ,SAItBP,EAAU,IAAIS,CAAU,GACzBT,EAAU,IAAIS,EAAY,EAAE,EAEhC,MAAMC,EAAgBV,EAAU,IAAIS,CAAU,EACxCE,EAAM,KAAK,UAAUH,CAAO,EAKlC,OAAKE,EAAcC,CAAG,IAClBD,EAAcC,CAAG,EAAI,IAAI,qBAAqBP,EAA0B,CAAE,KAAAG,EAAM,GAAGC,EAAS,GAEzFE,EAAcC,CAAG,CAC5B,CACA,SAASC,EAAoBC,EAASL,EAASL,EAAU,CACrD,MAAMW,EAA4BR,EAAyBE,CAAO,EAClE,OAAAT,EAAkB,IAAIc,EAASV,CAAQ,EACvCW,EAA0B,QAAQD,CAAO,EAClC,IAAM,CACTd,EAAkB,OAAOc,CAAO,EAChCC,EAA0B,UAAUD,CAAO,
|
|
1
|
+
{"version":3,"file":"observers.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs"],"sourcesContent":["/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n const rootObservers = observers.get(lookupRoot);\n const key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n"],"names":["observerCallbacks","observers","fireObserverCallback","entry","callback","fireAllObserverCallbacks","entries","initIntersectionObserver","root","options","lookupRoot","rootObservers","key","observeIntersection","element","rootInteresectionObserver"],"mappings":"AAKA,MAAMA,EAAoB,IAAI,QAMxBC,EAAY,IAAI,QAChBC,EAAwBC,GAAU,CACpC,MAAMC,EAAWJ,EAAkB,IAAIG,EAAM,MAAM,EACnDC,GAAYA,EAASD,CAAK,CAC9B,EACME,EAA4BC,GAAY,CAC1CA,EAAQ,QAAQJ,CAAoB,CACxC,EACA,SAASK,EAAyB,CAAE,KAAAC,EAAM,GAAGC,GAAW,CACpD,MAAMC,EAAaF,GAAQ,SAItBP,EAAU,IAAIS,CAAU,GACzBT,EAAU,IAAIS,EAAY,EAAE,EAEhC,MAAMC,EAAgBV,EAAU,IAAIS,CAAU,EACxCE,EAAM,KAAK,UAAUH,CAAO,EAKlC,OAAKE,EAAcC,CAAG,IAClBD,EAAcC,CAAG,EAAI,IAAI,qBAAqBP,EAA0B,CAAE,KAAAG,EAAM,GAAGC,EAAS,GAEzFE,EAAcC,CAAG,CAC5B,CACA,SAASC,EAAoBC,EAASL,EAASL,EAAU,CACrD,MAAMW,EAA4BR,EAAyBE,CAAO,EAClE,OAAAT,EAAkB,IAAIc,EAASV,CAAQ,EACvCW,EAA0B,QAAQD,CAAO,EAClC,IAAM,CACTd,EAAkB,OAAOc,CAAO,EAChCC,EAA0B,UAAUD,CAAO,CAC/C,CACJ","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/framer-motion/dist/es/motion/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { warning, invariant } from 'motion-utils';\nimport { forwardRef, useContext } from 'react';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { LazyContext } from '../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { featureDefinitions } from './features/definitions.mjs';\nimport { loadFeatures } from './features/load-features.mjs';\nimport { motionComponentSymbol } from './utils/symbol.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createRendererMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component, }) {\n var _a, _b;\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && isBrowser) {\n useStrictMode(configAndProps, preloadedFeatures);\n const layoutProjection = getProjectionFunctionality(configAndProps);\n MeasureLayout = layoutProjection.MeasureLayout;\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] }));\n }\n MotionComponent.displayName = `motion.${typeof Component === \"string\"\n ? Component\n : `create(${(_b = (_a = Component.displayName) !== null && _a !== void 0 ? _a : Component.name) !== null && _b !== void 0 ? _b : \"\"})`}`;\n const ForwardRefMotionComponent = forwardRef(MotionComponent);\n ForwardRefMotionComponent[motionComponentSymbol] = Component;\n return ForwardRefMotionComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\nfunction useStrictMode(configAndProps, preloadedFeatures) {\n const isStrict = useContext(LazyContext).strict;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n configAndProps.ignoreStrict\n ? warning(false, strictMessage)\n : invariant(false, strictMessage);\n }\n}\nfunction getProjectionFunctionality(props) {\n const { drag, layout } = featureDefinitions;\n if (!drag && !layout)\n return {};\n const combined = { ...drag, ...layout };\n return {\n MeasureLayout: (drag === null || drag === void 0 ? void 0 : drag.isEnabled(props)) || (layout === null || layout === void 0 ? void 0 : layout.isEnabled(props))\n ? combined.MeasureLayout\n : undefined,\n ProjectionNode: combined.ProjectionNode,\n };\n}\n\nexport { createRendererMotionComponent };\n"],"names":["createRendererMotionComponent","preloadedFeatures","createVisualElement","useRender","useVisualState","Component","_a","_b","loadFeatures","MotionComponent","props","externalRef","MeasureLayout","configAndProps","useContext","MotionConfigContext","useLayoutId","isStatic","context","useCreateMotionContext","visualState","isBrowser","useStrictMode","layoutProjection","getProjectionFunctionality","useVisualElement","jsxs","MotionContext","jsx","useMotionRef","ForwardRefMotionComponent","forwardRef","motionComponentSymbol","layoutId","layoutGroupId","LayoutGroupContext","LazyContext","drag","layout","featureDefinitions","combined"],"mappings":"0xBAyBA,SAASA,EAA8B,CAAE,kBAAAC,EAAmB,oBAAAC,EAAqB,UAAAC,EAAW,eAAAC,EAAgB,UAAAC,GAAc,CACtH,IAAIC,EAAIC,EACRN,GAAqBO,EAAaP,CAAiB,EACnD,SAASQ,EAAgBC,EAAOC,EAAa,CAKzC,IAAIC,EACJ,MAAMC,EAAiB,CACnB,GAAGC,EAAWC,CAAmB,EACjC,GAAGL,EACH,SAAUM,EAAYN,CAAK,CAAA,EAEzB,CAAE,SAAAO,GAAaJ,EACfK,EAAUC,EAAuBT,CAAK,EACtCU,EAAchB,EAAeM,EAAOO,CAAQ,EAClD,GAAI,CAACA,GAAYI,EAAW,CACxBC,EAA+C,EAC/C,MAAMC,EAAmBC,EAA2BX,CAAc,EAClED,EAAgBW,EAAiB,cAOjCL,EAAQ,cAAgBO,EAAiBpB,EAAWe,EAAaP,EAAgBX,EAAqBqB,EAAiB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/framer-motion/dist/es/motion/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { warning, invariant } from 'motion-utils';\nimport { forwardRef, useContext } from 'react';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { LazyContext } from '../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { featureDefinitions } from './features/definitions.mjs';\nimport { loadFeatures } from './features/load-features.mjs';\nimport { motionComponentSymbol } from './utils/symbol.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createRendererMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component, }) {\n var _a, _b;\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && isBrowser) {\n useStrictMode(configAndProps, preloadedFeatures);\n const layoutProjection = getProjectionFunctionality(configAndProps);\n MeasureLayout = layoutProjection.MeasureLayout;\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] }));\n }\n MotionComponent.displayName = `motion.${typeof Component === \"string\"\n ? Component\n : `create(${(_b = (_a = Component.displayName) !== null && _a !== void 0 ? _a : Component.name) !== null && _b !== void 0 ? _b : \"\"})`}`;\n const ForwardRefMotionComponent = forwardRef(MotionComponent);\n ForwardRefMotionComponent[motionComponentSymbol] = Component;\n return ForwardRefMotionComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\nfunction useStrictMode(configAndProps, preloadedFeatures) {\n const isStrict = useContext(LazyContext).strict;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n configAndProps.ignoreStrict\n ? warning(false, strictMessage)\n : invariant(false, strictMessage);\n }\n}\nfunction getProjectionFunctionality(props) {\n const { drag, layout } = featureDefinitions;\n if (!drag && !layout)\n return {};\n const combined = { ...drag, ...layout };\n return {\n MeasureLayout: (drag === null || drag === void 0 ? void 0 : drag.isEnabled(props)) || (layout === null || layout === void 0 ? void 0 : layout.isEnabled(props))\n ? combined.MeasureLayout\n : undefined,\n ProjectionNode: combined.ProjectionNode,\n };\n}\n\nexport { createRendererMotionComponent };\n"],"names":["createRendererMotionComponent","preloadedFeatures","createVisualElement","useRender","useVisualState","Component","_a","_b","loadFeatures","MotionComponent","props","externalRef","MeasureLayout","configAndProps","useContext","MotionConfigContext","useLayoutId","isStatic","context","useCreateMotionContext","visualState","isBrowser","useStrictMode","layoutProjection","getProjectionFunctionality","useVisualElement","jsxs","MotionContext","jsx","useMotionRef","ForwardRefMotionComponent","forwardRef","motionComponentSymbol","layoutId","layoutGroupId","LayoutGroupContext","LazyContext","drag","layout","featureDefinitions","combined"],"mappings":"0xBAyBA,SAASA,EAA8B,CAAE,kBAAAC,EAAmB,oBAAAC,EAAqB,UAAAC,EAAW,eAAAC,EAAgB,UAAAC,GAAc,CACtH,IAAIC,EAAIC,EACRN,GAAqBO,EAAaP,CAAiB,EACnD,SAASQ,EAAgBC,EAAOC,EAAa,CAKzC,IAAIC,EACJ,MAAMC,EAAiB,CACnB,GAAGC,EAAWC,CAAmB,EACjC,GAAGL,EACH,SAAUM,EAAYN,CAAK,CAAA,EAEzB,CAAE,SAAAO,GAAaJ,EACfK,EAAUC,EAAuBT,CAAK,EACtCU,EAAchB,EAAeM,EAAOO,CAAQ,EAClD,GAAI,CAACA,GAAYI,EAAW,CACxBC,EAA+C,EAC/C,MAAMC,EAAmBC,EAA2BX,CAAc,EAClED,EAAgBW,EAAiB,cAOjCL,EAAQ,cAAgBO,EAAiBpB,EAAWe,EAAaP,EAAgBX,EAAqBqB,EAAiB,cAAc,CACzI,CAKA,OAAQ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