@nethesis/phone-island 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js.map +1 -1
- package/dist/components/AlertView/index.js.map +1 -1
- package/dist/components/AudioBars.js.map +1 -1
- package/dist/components/AudioPlayerView/PlayerFooterActions.js +1 -1
- package/dist/components/AudioPlayerView/PlayerFooterActions.js.map +1 -1
- package/dist/components/AudioPlayerView/Progress.js.map +1 -1
- package/dist/components/AudioPlayerView/index.js +1 -1
- package/dist/components/AudioPlayerView/index.js.map +1 -1
- package/dist/components/CallView/Actions.js +1 -1
- package/dist/components/CallView/Actions.js.map +1 -1
- package/dist/components/CallView/BackCall.js +1 -1
- package/dist/components/CallView/BackCall.js.map +1 -1
- package/dist/components/CallView/DeviceIcon.js +1 -1
- package/dist/components/CallView/DeviceIcon.js.map +1 -1
- package/dist/components/CallView/DisplayName.js +1 -1
- package/dist/components/CallView/DisplayName.js.map +1 -1
- package/dist/components/CallView/DisplayNameUtils.js.map +1 -1
- package/dist/components/CallView/Number.js +1 -1
- package/dist/components/CallView/Number.js.map +1 -1
- package/dist/components/CallView/NumberPopover.js +1 -1
- package/dist/components/CallView/NumberPopover.js.map +1 -1
- package/dist/components/CallView/index.js +1 -1
- package/dist/components/CallView/index.js.map +1 -1
- package/dist/components/ConferenceView/ConferenceUsersList.js +1 -1
- package/dist/components/ConferenceView/ConferenceUsersList.js.map +1 -1
- package/dist/components/ConferenceView/index.js +1 -1
- package/dist/components/ConferenceView/index.js.map +1 -1
- package/dist/components/ContactView/ContactListView.js +1 -1
- package/dist/components/ContactView/ContactListView.js.map +1 -1
- package/dist/components/ContactView/SelectContactNumberView.js +1 -1
- package/dist/components/ContactView/SelectContactNumberView.js.map +1 -1
- package/dist/components/ContactView/TransferActions.js +1 -1
- package/dist/components/ContactView/TransferActions.js.map +1 -1
- package/dist/components/Hangup.js +1 -1
- package/dist/components/Hangup.js.map +1 -1
- package/dist/components/KeypadView/index.js +1 -1
- package/dist/components/KeypadView/index.js.map +1 -1
- package/dist/components/OperatorBusyView/index.js +1 -1
- package/dist/components/OperatorBusyView/index.js.map +1 -1
- package/dist/components/PhysicalRecorderView/index.js +1 -1
- package/dist/components/PhysicalRecorderView/index.js.map +1 -1
- package/dist/components/RecorderView/Actions.js +1 -1
- package/dist/components/RecorderView/Actions.js.map +1 -1
- package/dist/components/RecorderView/BarsGroup.js.map +1 -1
- package/dist/components/RecorderView/index.js +1 -1
- package/dist/components/RecorderView/index.js.map +1 -1
- package/dist/components/SettingsView/AudioView.js +1 -1
- package/dist/components/SettingsView/AudioView.js.map +1 -1
- package/dist/components/SettingsView/MicrophoneView.js +1 -1
- package/dist/components/SettingsView/MicrophoneView.js.map +1 -1
- package/dist/components/SettingsView/SettingsHeader.js +1 -1
- package/dist/components/SettingsView/SettingsHeader.js.map +1 -1
- package/dist/components/SettingsView/ThemeView.js +1 -1
- package/dist/components/SettingsView/ThemeView.js.map +1 -1
- package/dist/components/SettingsView/index.js +1 -1
- package/dist/components/SettingsView/index.js.map +1 -1
- package/dist/components/SideView/SideView.js +1 -1
- package/dist/components/SideView/SideView.js.map +1 -1
- package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
- package/dist/components/Socket.js.map +1 -1
- package/dist/components/SwitchDeviceView/index.js +1 -1
- package/dist/components/SwitchDeviceView/index.js.map +1 -1
- package/dist/components/SwitchInputView/DropdownContent.js +1 -1
- package/dist/components/SwitchInputView/DropdownContent.js.map +1 -1
- package/dist/components/SwitchInputView/Index.js +1 -1
- package/dist/components/TextScroll.js +1 -1
- package/dist/components/TextScroll.js.map +1 -1
- package/dist/components/TranscriptionView/TranscriptionView.js +1 -1
- package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
- package/dist/components/VideoStreamingEmptyState/index.js +1 -1
- package/dist/components/VideoStreamingEmptyState/index.js.map +1 -1
- package/dist/components/VideoStreamingSkeleton/index.js +1 -1
- package/dist/components/VideoStreamingSkeleton/index.js.map +1 -1
- package/dist/components/VideoView/index.js.map +1 -1
- package/dist/components/WebRTC.js.map +1 -1
- package/dist/events/SocketEvents.js.map +1 -1
- package/dist/lib/i18n.js +1 -1
- package/dist/lib/i18n.js.map +1 -1
- package/dist/lib/phone/call.js +1 -1
- package/dist/lib/phone/call.js.map +1 -1
- package/dist/lib/phone/counterpartDevice.js.map +1 -1
- package/dist/lib/phone/video.js.map +1 -1
- package/dist/lib/player/audio.js.map +1 -1
- package/dist/lib/user/default_device.js.map +1 -1
- package/dist/lib/user/extensions.js.map +1 -1
- package/dist/models/currentCall.js.map +1 -1
- package/dist/models/island.js.map +1 -1
- package/dist/models/player.js +1 -1
- package/dist/models/player.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js.map +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.js +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
- package/dist/node_modules/js-base64/base64.mjs.js +1 -1
- package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/is-ref-object.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/context.js +1 -1
- package/dist/node_modules/react-i18next/dist/es/context.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/defaults.js +1 -1
- package/dist/node_modules/react-i18next/dist/es/defaults.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +1 -1
- package/dist/node_modules/react-i18next/dist/es/i18nInstance.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +1 -1
- package/dist/node_modules/react-i18next/dist/es/initReactI18next.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/unescape.js +1 -1
- package/dist/node_modules/react-i18next/dist/es/unescape.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/utils.js +1 -1
- package/dist/node_modules/react-i18next/dist/es/utils.js.map +1 -1
- package/dist/package.json.js +1 -1
- package/dist/services/astproxy.js +1 -1
- package/dist/services/astproxy.js.map +1 -1
- package/dist/services/phonebook.js +1 -1
- package/dist/services/phonebook.js.map +1 -1
- package/dist/utils/customHooks/useLocalStorage.js.map +1 -1
- package/dist/utils/deviceUtils.js.map +1 -1
- package/package.json +10 -5
- package/dist/_virtual/arrayLikeToArray.js +0 -2
- package/dist/_virtual/arrayLikeToArray.js.map +0 -1
- package/dist/_virtual/arrayWithHoles.js +0 -2
- package/dist/_virtual/arrayWithHoles.js.map +0 -1
- package/dist/_virtual/classCallCheck.js +0 -2
- package/dist/_virtual/classCallCheck.js.map +0 -1
- package/dist/_virtual/createClass.js +0 -2
- package/dist/_virtual/createClass.js.map +0 -1
- package/dist/_virtual/defineProperty.js +0 -2
- package/dist/_virtual/defineProperty.js.map +0 -1
- package/dist/_virtual/iterableToArrayLimit.js +0 -2
- package/dist/_virtual/iterableToArrayLimit.js.map +0 -1
- package/dist/_virtual/nonIterableRest.js +0 -2
- package/dist/_virtual/nonIterableRest.js.map +0 -1
- package/dist/_virtual/objectWithoutProperties.js +0 -2
- package/dist/_virtual/objectWithoutProperties.js.map +0 -1
- package/dist/_virtual/objectWithoutPropertiesLoose.js +0 -2
- package/dist/_virtual/objectWithoutPropertiesLoose.js.map +0 -1
- package/dist/_virtual/slicedToArray.js +0 -2
- package/dist/_virtual/slicedToArray.js.map +0 -1
- package/dist/_virtual/toPrimitive.js +0 -2
- package/dist/_virtual/toPrimitive.js.map +0 -1
- package/dist/_virtual/toPropertyKey.js +0 -2
- package/dist/_virtual/toPropertyKey.js.map +0 -1
- package/dist/_virtual/typeof.js +0 -2
- package/dist/_virtual/typeof.js.map +0 -1
- package/dist/_virtual/unsupportedIterableToArray.js +0 -2
- package/dist/_virtual/unsupportedIterableToArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/createClass.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/createClass.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/defineProperty.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/defineProperty.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/typeof.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/typeof.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -2
- package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.js.map +0 -1
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js +0 -2
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js.map +0 -1
- package/dist/node_modules/void-elements/index.js +0 -2
- package/dist/node_modules/void-elements/index.js.map +0 -1
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/is-ref-object.mjs.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"player.js","sources":["../../src/models/player.ts"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { createModel } from '@rematch/core'\nimport type { RootModel } from '.'\nimport { updateAudioPlayerSource } from '../lib/phone/audio'\nimport { dispatchAudioPlayerStarted } from '../events/PlayerEvents'\nimport { type TypeTypes } from '../types'\nimport { RefObject } from 'react'\n\nconst defaultState: PlayerTypes = {\n audioPlayer: null,\n audioPlayerPlaying: false,\n audioPlayerPaused: false,\n audioPlayerLoop: false,\n audioPlayerTrackType: null,\n audioPlayerTrackName: null,\n audioPlayerTrackDuration: null,\n localAudio: null,\n remoteAudio: null,\n localVideo: null,\n largeRemoteVideo: null,\n smallRemoteVideo: null,\n localScreen: null,\n remoteScreen: null,\n}\n\nexport const player = createModel<RootModel>()({\n state: defaultState,\n reducers: {\n updatePlayer: (state, payload: PlayerTypes) => {\n return {\n ...state,\n ...payload,\n }\n },\n updateAudioPlayerTrackDuration: (state, payload: number) => {\n return {\n ...state,\n audioPlayerTrackDuration: payload,\n }\n },\n updateAudioPlayerSrc: (state, payload: string) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.src = payload\n }\n return state\n },\n stopAudioPlayer: (state) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n // Pause audio\n state.audioPlayer.current.pause()\n state.audioPlayer.current.currentTime = 0\n \n // Reset audio output device to default to avoid affecting other sounds\n if (typeof (state.audioPlayer.current as any).setSinkId === 'function') {\n (state.audioPlayer.current as any).setSinkId('default').catch((err: any) => {\n console.warn('Failed to reset audio output device to default:', err)\n })\n }\n \n return {\n ...state,\n audioPlayerPlaying: false,\n }\n }\n },\n emergencyStopAudioPlayer: (state) => {\n // Emergency stop: force reset everything audio-related\n if (state.audioPlayer && state.audioPlayer.current) {\n try {\n state.audioPlayer.current.pause()\n state.audioPlayer.current.currentTime = 0\n state.audioPlayer.current.src = ''\n \n // Reset audio output device to default\n if (typeof (state.audioPlayer.current as any).setSinkId === 'function') {\n (state.audioPlayer.current as any).setSinkId('default').catch((err: any) => {\n console.warn('Failed to reset audio output device to default:', err)\n })\n }\n } catch (err) {\n console.error('Error in emergency stop audio player:', err)\n }\n }\n \n return {\n ...state,\n audioPlayerPlaying: false,\n audioPlayerPaused: false,\n audioPlayerLoop: false,\n audioPlayerTrackType: null,\n audioPlayerTrackName: null,\n }\n },\n pauseAudioPlayer: (state) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.pause()\n return {\n ...state,\n audioPlayerPaused: true,\n audioPlayerPlaying: false,\n }\n }\n },\n setAudioPlayerPaused: (state, payload: boolean) => {\n return {\n ...state,\n audioPlayerPaused: payload,\n }\n },\n setAudioPlayerLoop: (state, payload: boolean) => ({\n ...state,\n audioPlayerLoop: payload,\n }),\n setAudioPlayerType: (state, payload: TypeTypes) => ({\n ...state,\n audioPlayerTrackType: payload,\n }),\n setAudioPlayerPlaying: (state, payload: boolean) => ({\n ...state,\n audioPlayerPlaying: payload,\n }),\n resetAudioPlayerType: (state) => ({\n ...state,\n audioPlayerTrackType: null,\n }),\n setAudioPlayerTrackName: (state, payload: string) => ({\n ...state,\n audioPlayerTrackName: payload,\n }),\n playRemoteAudio: (state) => {\n state.remoteAudio && state.remoteAudio.current?.play()\n },\n pauseRemoteAudio: (state) => {\n state.remoteAudio && state.remoteAudio.current?.pause()\n },\n setAudioPlayerCurrentTime: (state, payload: number) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.currentTime = payload\n }\n },\n reset: () => {\n return defaultState\n },\n },\n effects: (dispatch) => ({\n startAudioPlayer: (endedEventCallback: () => void, rootState) => {\n if (rootState.player.audioPlayer && rootState.player.audioPlayer.current) {\n // Check if is playing\n if (rootState.player.audioPlayerPlaying) {\n rootState.player.audioPlayer.current.pause()\n rootState.player.audioPlayer.current.currentTime = 0\n }\n const endedCallback = () => {\n dispatch.player.setAudioPlayerPlaying(false)\n rootState.player!.audioPlayer!.current!.removeEventListener('ended', endedCallback)\n endedEventCallback()\n }\n // Handle playing ended event\n rootState.player.audioPlayer.current.addEventListener('ended', endedCallback)\n // Play the audio\n rootState.player.audioPlayer.current.play()\n dispatch.player.setAudioPlayerPlaying(true)\n dispatch.player.setAudioPlayerPaused(false)\n // Dispatch the event\n if (rootState.island.view === 'player') {\n dispatchAudioPlayerStarted()\n }\n }\n },\n // This function is recommended for playing audio with base64 sources\n // Set useRingtoneOutput=true only for incoming call ringtones and previews\n updateStartAudioPlayer: async (\n { src, loop = false, useRingtoneOutput = false }: { src: string; loop?: boolean; useRingtoneOutput?: boolean },\n rootState,\n ) => {\n dispatch.player.setAudioPlayerLoop(loop)\n\n // Apply ringtone output device ONLY when explicitly requested (incoming calls & previews)\n const ringtoneOutputDeviceId = useRingtoneOutput ? rootState.ringtones?.outputDeviceId : null\n if (\n ringtoneOutputDeviceId &&\n rootState.player.audioPlayer?.current &&\n typeof (rootState.player.audioPlayer.current as any).setSinkId === 'function'\n ) {\n try {\n await (rootState.player.audioPlayer.current as any).setSinkId(ringtoneOutputDeviceId)\n console.info('Ringtone output device applied:', ringtoneOutputDeviceId)\n } catch (err) {\n console.warn('Failed to set ringtone output device, trying fallback to default:', err)\n // Fallback to default device if the saved device is not available\n try {\n await (rootState.player.audioPlayer.current as any).setSinkId('default')\n console.info('Ringtone output fallback to default successful')\n // Update store to reflect the fallback\n dispatch.ringtones.setOutputDeviceId('default')\n } catch (fallbackErr) {\n console.error('Even default device failed for ringtone:', fallbackErr)\n }\n }\n }\n\n // Update the audio source\n await updateAudioPlayerSource(`data:audio/ogg;base64, ${src}`)\n // Play the outgoing ringtone when ready\n dispatch.player.startAudioPlayer(() => {})\n },\n }),\n})\n\ninterface PlayerTypes {\n audioPlayer?: RefObject<HTMLAudioElement> | null\n audioPlayerPlaying?: boolean\n audioPlayerPaused?: boolean\n audioPlayerLoop?: boolean\n audioPlayerTrackType?: TypeTypes | null\n audioPlayerTrackName?: string | null\n audioPlayerTrackDuration?: number | null\n localAudio?: RefObject<HTMLAudioElement> | null\n remoteAudio?: RefObject<HTMLAudioElement> | null\n localVideo?: RefObject<HTMLVideoElement> | null\n largeRemoteVideo?: RefObject<HTMLVideoElement> | null\n smallRemoteVideo?: RefObject<HTMLVideoElement> | null\n localScreen?: RefObject<HTMLVideoElement> | null\n remoteScreen?: RefObject<HTMLVideoElement> | null\n}\n"],"names":["defaultState","audioPlayer","audioPlayerPlaying","audioPlayerPaused","audioPlayerLoop","audioPlayerTrackType","audioPlayerTrackName","audioPlayerTrackDuration","localAudio","remoteAudio","localVideo","largeRemoteVideo","smallRemoteVideo","localScreen","remoteScreen","player","createModel","state","reducers","updatePlayer","payload","__assign","updateAudioPlayerTrackDuration","updateAudioPlayerSrc","current","src","stopAudioPlayer","pause","currentTime","setSinkId","catch","err","console","warn","emergencyStopAudioPlayer","error","pauseAudioPlayer","setAudioPlayerPaused","setAudioPlayerLoop","setAudioPlayerType","setAudioPlayerPlaying","resetAudioPlayerType","setAudioPlayerTrackName","playRemoteAudio","_a","play","pauseRemoteAudio","setAudioPlayerCurrentTime","reset","effects","dispatch","startAudioPlayer","endedEventCallback","rootState","endedCallback_1","removeEventListener","addEventListener","island","view","dispatchAudioPlayerStarted","updateStartAudioPlayer","_b","loop","_c","useRingtoneOutput","ringtoneOutputDeviceId","_d","ringtones","outputDeviceId","_e","_f","sent","info","err_1","setOutputDeviceId","fallbackErr_1","updateAudioPlayerSource","concat"],"mappings":"8PAUMA,EAA4B,CAChCC,YAAa,KACbC,oBAAoB,EACpBC,mBAAmB,EACnBC,iBAAiB,EACjBC,qBAAsB,KACtBC,qBAAsB,KACtBC,yBAA0B,KAC1BC,WAAY,KACZC,YAAa,KACbC,WAAY,KACZC,iBAAkB,KAClBC,iBAAkB,KAClBC,YAAa,KACbC,aAAc,MAGHC,EAASC,EAAWA,aAAXA,CAAyB,CAC7CC,MAAOjB,EACPkB,SAAU,CACRC,aAAc,SAACF,EAAOG,GACpB,OACKC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,GACAG,EAEN,EACDE,+BAAgC,SAACL,EAAOG,GACtC,OAAAC,EAAAA,SAAAA,EAAAA,SAAA,GACKJ,GAAK,CACRV,yBAA0Ba,GAE7B,EACDG,qBAAsB,SAACN,EAAOG,GAI5B,OAHIH,EAAMhB,aAAegB,EAAMhB,YAAYuB,UACzCP,EAAMhB,YAAYuB,QAAQC,IAAML,GAE3BH,CACR,EACDS,gBAAiB,SAACT,GAChB,GAAIA,EAAMhB,aAAegB,EAAMhB,YAAYuB,QAYzC,OAVAP,EAAMhB,YAAYuB,QAAQG,QAC1BV,EAAMhB,YAAYuB,QAAQI,YAAc,EAGoB,mBAAhDX,EAAMhB,YAAYuB,QAAgBK,WAC3CZ,EAAMhB,YAAYuB,QAAgBK,UAAU,WAAWC,MAAM,SAACC,GAC7DC,QAAQC,KAAK,kDAAmDF,EAClE,GAGFV,EAAAA,SAAAA,EAAAA,SAAA,GACKJ,GAAK,CACRf,oBAAoB,GAGzB,EACDgC,yBAA0B,SAACjB,GAEzB,GAAIA,EAAMhB,aAAegB,EAAMhB,YAAYuB,QACzC,IACEP,EAAMhB,YAAYuB,QAAQG,QAC1BV,EAAMhB,YAAYuB,QAAQI,YAAc,EACxCX,EAAMhB,YAAYuB,QAAQC,IAAM,GAG4B,mBAAhDR,EAAMhB,YAAYuB,QAAgBK,WAC3CZ,EAAMhB,YAAYuB,QAAgBK,UAAU,WAAWC,MAAM,SAACC,GAC7DC,QAAQC,KAAK,kDAAmDF,EAClE,EAEH,CAAC,MAAOA,GACPC,QAAQG,MAAM,wCAAyCJ,EACxD,CAGH,OACKV,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHf,oBAAoB,EACpBC,mBAAmB,EACnBC,iBAAiB,EACjBC,qBAAsB,KACtBC,qBAAsB,MAEzB,EACD8B,iBAAkB,SAACnB,GACjB,GAAIA,EAAMhB,aAAegB,EAAMhB,YAAYuB,QAEzC,OADAP,EAAMhB,YAAYuB,QAAQG,QAErBN,WAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHd,mBAAmB,EACnBD,oBAAoB,GAGzB,EACDmC,qBAAsB,SAACpB,EAAOG,GAC5B,OAAAC,EAAAA,SAAAA,EAAAA,SAAA,GACKJ,GAAK,CACRd,kBAAmBiB,GAEtB,EACDkB,mBAAoB,SAACrB,EAAOG,GAAqB,OAC5CC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHb,gBAAiBgB,GACjB,EACFmB,mBAAoB,SAACtB,EAAOG,GAAuB,OAC9CC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHZ,qBAAsBe,GACtB,EACFoB,sBAAuB,SAACvB,EAAOG,GAAqB,OAC/CC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHf,mBAAoBkB,GACpB,EACFqB,qBAAsB,SAACxB,GAAU,OAAAI,EAAAA,SAAAA,EAAAA,SAAA,GAC5BJ,GAAK,CACRZ,qBAAsB,MACtB,EACFqC,wBAAyB,SAACzB,EAAOG,GAAoB,OAChDC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHX,qBAAsBc,GACtB,EACFuB,gBAAiB,SAAC1B,SAChBA,EAAMR,cAAwC,QAAzBmC,EAAA3B,EAAMR,YAAYe,eAAO,IAAAoB,GAAAA,EAAEC,OACjD,EACDC,iBAAkB,SAAC7B,SACjBA,EAAMR,cAAwC,QAAzBmC,EAAA3B,EAAMR,YAAYe,eAAO,IAAAoB,GAAAA,EAAEjB,QACjD,EACDoB,0BAA2B,SAAC9B,EAAOG,GAC7BH,EAAMhB,aAAegB,EAAMhB,YAAYuB,UACzCP,EAAMhB,YAAYuB,QAAQI,YAAcR,EAE3C,EACD4B,MAAO,WACL,OAAOhD,CACR,GAEHiD,QAAS,SAACC,GAAa,MAAC,CACtBC,iBAAkB,SAACC,EAAgCC,GACjD,GAAIA,EAAUtC,OAAOd,aAAeoD,EAAUtC,OAAOd,YAAYuB,QAAS,CAEpE6B,EAAUtC,OAAOb,qBACnBmD,EAAUtC,OAAOd,YAAYuB,QAAQG,QACrC0B,EAAUtC,OAAOd,YAAYuB,QAAQI,YAAc,GAErD,IAAM0B,EAAgB,WACpBJ,EAASnC,OAAOyB,uBAAsB,GACtCa,EAAUtC,OAAQd,YAAauB,QAAS+B,oBAAoB,QAASD,GACrEF,GACF,EAEAC,EAAUtC,OAAOd,YAAYuB,QAAQgC,iBAAiB,QAASF,GAE/DD,EAAUtC,OAAOd,YAAYuB,QAAQqB,OACrCK,EAASnC,OAAOyB,uBAAsB,GACtCU,EAASnC,OAAOsB,sBAAqB,GAEP,WAA1BgB,EAAUI,OAAOC,MACnBC,EAAAA,4BAEH,CACF,EAGDC,uBAAwB,SACtBhB,EACAS,GADE,IAAA5B,EAAGmB,EAAAnB,IAAEoC,EAAYjB,EAAAkB,KAAZA,OAAO,IAAAD,GAAKA,EAAEE,EAAyBnB,EAAAoB,kBAAzBA,OAAiB,IAAAD,GAAQA,gIAQ5C,GALFb,EAASnC,OAAOuB,mBAAmBwB,KAG7BG,EAAyBD,UAAoBE,EAAAb,EAAUc,gCAAWC,eAAiB,SAG3D,QAA5BC,EAAAhB,EAAUtC,OAAOd,mBAAW,IAAAoE,OAAA,EAAAA,EAAE7C,UACqC,mBAA3D6B,EAAUtC,OAAOd,YAAYuB,QAAgBK,UAFrD,MAE6E,CAAA,EAAA,oBAG3E,6BAAA,CAAA,EAAOwB,EAAUtC,OAAOd,YAAYuB,QAAgBK,UAAUoC,kBAA9DK,EAAAC,OACAvC,QAAQwC,KAAK,kCAAmCP,2BAEhDjC,QAAQC,KAAK,oEAAqEwC,oBAGhF,6BAAA,CAAA,EAAOpB,EAAUtC,OAAOd,YAAYuB,QAAgBK,UAAU,0BAA9DyC,EAAAC,OACAvC,QAAQwC,KAAK,kDAEbtB,EAASiB,UAAUO,kBAAkB,0CAErC1C,QAAQG,MAAM,2CAA4CwC,mCAMhE,MAAA,CAAA,EAAMC,EAAuBA,wBAAC,0BAA0BC,OAAApD,mBAAxD6C,EAAAC,OAEArB,EAASnC,OAAOoC,iBAAiB,WAAQ,WAC1C,EACD"}
|
|
1
|
+
{"version":3,"file":"player.js","sources":["../../src/models/player.ts"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { createModel } from '@rematch/core'\nimport type { RootModel } from '.'\nimport { updateAudioPlayerSource } from '../lib/phone/audio'\nimport { dispatchAudioPlayerStarted } from '../events/PlayerEvents'\nimport { type TypeTypes } from '../types'\nimport { RefObject } from 'react'\n\nconst defaultState: PlayerTypes = {\n audioPlayer: null,\n audioPlayerPlaying: false,\n audioPlayerPaused: false,\n audioPlayerLoop: false,\n audioPlayerTrackType: null,\n audioPlayerTrackName: null,\n audioPlayerTrackDuration: null,\n localAudio: null,\n remoteAudio: null,\n localVideo: null,\n largeRemoteVideo: null,\n smallRemoteVideo: null,\n localScreen: null,\n remoteScreen: null,\n}\n\nexport const player = createModel<RootModel>()({\n state: defaultState,\n reducers: {\n updatePlayer: (state, payload: PlayerTypes) => {\n return {\n ...state,\n ...payload,\n }\n },\n updateAudioPlayerTrackDuration: (state, payload: number) => {\n return {\n ...state,\n audioPlayerTrackDuration: payload,\n }\n },\n updateAudioPlayerSrc: (state, payload: string) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.src = payload\n }\n return state\n },\n stopAudioPlayer: (state) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n // Pause audio\n state.audioPlayer.current.pause()\n state.audioPlayer.current.currentTime = 0\n \n // Reset audio output device to default to avoid affecting other sounds\n if (typeof (state.audioPlayer.current as any).setSinkId === 'function') {\n (state.audioPlayer.current as any).setSinkId('default').catch((err: any) => {\n console.warn('Failed to reset audio output device to default:', err)\n })\n }\n \n return {\n ...state,\n audioPlayerPlaying: false,\n }\n }\n },\n emergencyStopAudioPlayer: (state) => {\n // Emergency stop: force reset everything audio-related\n if (state.audioPlayer && state.audioPlayer.current) {\n try {\n state.audioPlayer.current.pause()\n state.audioPlayer.current.currentTime = 0\n state.audioPlayer.current.src = ''\n \n // Reset audio output device to default\n if (typeof (state.audioPlayer.current as any).setSinkId === 'function') {\n (state.audioPlayer.current as any).setSinkId('default').catch((err: any) => {\n console.warn('Failed to reset audio output device to default:', err)\n })\n }\n } catch (err) {\n console.error('Error in emergency stop audio player:', err)\n }\n }\n \n return {\n ...state,\n audioPlayerPlaying: false,\n audioPlayerPaused: false,\n audioPlayerLoop: false,\n audioPlayerTrackType: null,\n audioPlayerTrackName: null,\n }\n },\n pauseAudioPlayer: (state) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.pause()\n return {\n ...state,\n audioPlayerPaused: true,\n audioPlayerPlaying: false,\n }\n }\n },\n setAudioPlayerPaused: (state, payload: boolean) => {\n return {\n ...state,\n audioPlayerPaused: payload,\n }\n },\n setAudioPlayerLoop: (state, payload: boolean) => ({\n ...state,\n audioPlayerLoop: payload,\n }),\n setAudioPlayerType: (state, payload: TypeTypes) => ({\n ...state,\n audioPlayerTrackType: payload,\n }),\n setAudioPlayerPlaying: (state, payload: boolean) => ({\n ...state,\n audioPlayerPlaying: payload,\n }),\n resetAudioPlayerType: (state) => ({\n ...state,\n audioPlayerTrackType: null,\n }),\n setAudioPlayerTrackName: (state, payload: string) => ({\n ...state,\n audioPlayerTrackName: payload,\n }),\n playRemoteAudio: (state) => {\n state.remoteAudio && state.remoteAudio.current?.play()\n },\n pauseRemoteAudio: (state) => {\n state.remoteAudio && state.remoteAudio.current?.pause()\n },\n setAudioPlayerCurrentTime: (state, payload: number) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.currentTime = payload\n }\n },\n reset: () => {\n return defaultState\n },\n },\n effects: (dispatch) => ({\n startAudioPlayer: (endedEventCallback: () => void, rootState) => {\n if (rootState.player.audioPlayer && rootState.player.audioPlayer.current) {\n // Check if is playing\n if (rootState.player.audioPlayerPlaying) {\n rootState.player.audioPlayer.current.pause()\n rootState.player.audioPlayer.current.currentTime = 0\n }\n const endedCallback = () => {\n dispatch.player.setAudioPlayerPlaying(false)\n rootState.player!.audioPlayer!.current!.removeEventListener('ended', endedCallback)\n endedEventCallback()\n }\n // Handle playing ended event\n rootState.player.audioPlayer.current.addEventListener('ended', endedCallback)\n // Play the audio\n rootState.player.audioPlayer.current.play()\n dispatch.player.setAudioPlayerPlaying(true)\n dispatch.player.setAudioPlayerPaused(false)\n // Dispatch the event\n if (rootState.island.view === 'player') {\n dispatchAudioPlayerStarted()\n }\n }\n },\n // This function is recommended for playing audio with base64 sources\n // Set useRingtoneOutput=true only for incoming call ringtones and previews\n updateStartAudioPlayer: async (\n { src, loop = false, useRingtoneOutput = false }: { src: string; loop?: boolean; useRingtoneOutput?: boolean },\n rootState,\n ) => {\n dispatch.player.setAudioPlayerLoop(loop)\n\n // Apply ringtone output device ONLY when explicitly requested (incoming calls & previews)\n const ringtoneOutputDeviceId = useRingtoneOutput ? rootState.ringtones?.outputDeviceId : null\n if (\n ringtoneOutputDeviceId &&\n rootState.player.audioPlayer?.current &&\n typeof (rootState.player.audioPlayer.current as any).setSinkId === 'function'\n ) {\n try {\n await (rootState.player.audioPlayer.current as any).setSinkId(ringtoneOutputDeviceId)\n console.info('Ringtone output device applied:', ringtoneOutputDeviceId)\n } catch (err) {\n console.warn('Failed to set ringtone output device, trying fallback to default:', err)\n // Fallback to default device if the saved device is not available\n try {\n await (rootState.player.audioPlayer.current as any).setSinkId('default')\n console.info('Ringtone output fallback to default successful')\n // Update store to reflect the fallback\n dispatch.ringtones.setOutputDeviceId('default')\n } catch (fallbackErr) {\n console.error('Even default device failed for ringtone:', fallbackErr)\n }\n }\n }\n\n // Update the audio source\n await updateAudioPlayerSource(`data:audio/ogg;base64, ${src}`)\n // Play the outgoing ringtone when ready\n dispatch.player.startAudioPlayer(() => {})\n },\n }),\n})\n\ninterface PlayerTypes {\n audioPlayer?: RefObject<HTMLAudioElement> | null\n audioPlayerPlaying?: boolean\n audioPlayerPaused?: boolean\n audioPlayerLoop?: boolean\n audioPlayerTrackType?: TypeTypes | null\n audioPlayerTrackName?: string | null\n audioPlayerTrackDuration?: number | null\n localAudio?: RefObject<HTMLAudioElement> | null\n remoteAudio?: RefObject<HTMLAudioElement> | null\n localVideo?: RefObject<HTMLVideoElement> | null\n largeRemoteVideo?: RefObject<HTMLVideoElement> | null\n smallRemoteVideo?: RefObject<HTMLVideoElement> | null\n localScreen?: RefObject<HTMLVideoElement> | null\n remoteScreen?: RefObject<HTMLVideoElement> | null\n}\n"],"names":["defaultState","audioPlayer","audioPlayerPlaying","audioPlayerPaused","audioPlayerLoop","audioPlayerTrackType","audioPlayerTrackName","audioPlayerTrackDuration","localAudio","remoteAudio","localVideo","largeRemoteVideo","smallRemoteVideo","localScreen","remoteScreen","player","createModel","state","reducers","updatePlayer","payload","__assign","updateAudioPlayerTrackDuration","updateAudioPlayerSrc","current","src","stopAudioPlayer","pause","currentTime","setSinkId","catch","err","console","warn","emergencyStopAudioPlayer","error","pauseAudioPlayer","setAudioPlayerPaused","setAudioPlayerLoop","setAudioPlayerType","setAudioPlayerPlaying","resetAudioPlayerType","setAudioPlayerTrackName","playRemoteAudio","_a","play","pauseRemoteAudio","setAudioPlayerCurrentTime","reset","effects","dispatch","startAudioPlayer","endedEventCallback","rootState","endedCallback_1","removeEventListener","addEventListener","island","view","dispatchAudioPlayerStarted","updateStartAudioPlayer","rootState_1","__awaiter","_b","_e","loop","_f","useRingtoneOutput","ringtoneOutputDeviceId","_c","ringtones","outputDeviceId","_d","_g","sent","info","err_1","setOutputDeviceId","fallbackErr_1","updateAudioPlayerSource","concat"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../motion-utils/dist/es/errors.mjs.js"),t=require("../../../../../motion-dom/dist/es/animation/interfaces/visual-element.mjs.js"),r=require("../../../../../motion-dom/dist/es/render/utils/setters.mjs.js");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../motion-utils/dist/es/errors.mjs.js"),t=require("../../../../../motion-dom/dist/es/animation/interfaces/visual-element.mjs.js"),r=require("../../../../../motion-dom/dist/es/render/utils/setters.mjs.js");function o(e,t){[...t].reverse().forEach(s=>{const n=e.getVariant(s);n&&r.setTarget(e,n),e.variantChildren&&e.variantChildren.forEach(e=>{o(e,t)})})}function s(e,t){return Array.isArray(t)?o(e,t):"string"==typeof t?o(e,[t]):void r.setTarget(e,t)}exports.animationControls=function(){let r=!1;const o=new Set,n={subscribe:e=>(o.add(e),()=>{o.delete(e)}),start(s,n){"production"!==process.env.NODE_ENV&&e.invariant(r,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const i=[];return o.forEach(e=>{i.push(t.animateVisualElement(e,s,{transitionOverride:n}))}),Promise.all(i)},set:t=>("production"!==process.env.NODE_ENV&&e.invariant(r,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),o.forEach(e=>{s(e,t)})),stop(){o.forEach(e=>{!function(e){e.values.forEach(e=>e.stop())}(e)})},mount:()=>(r=!0,()=>{r=!1,n.stop()})};return n},exports.setValues=s;
|
|
2
2
|
//# sourceMappingURL=animation-controls.mjs.js.map
|
package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation-controls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs"],"sourcesContent":["import { animateVisualElement, setTarget } from 'motion-dom';\nimport { invariant } from 'motion-utils';\n\nfunction stopAnimation(visualElement) {\n visualElement.values.forEach((value) => value.stop());\n}\nfunction setVariants(visualElement, variantLabels) {\n const reversedLabels = [...variantLabels].reverse();\n reversedLabels.forEach((key) => {\n const variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n if (visualElement.variantChildren) {\n visualElement.variantChildren.forEach((child) => {\n setVariants(child, variantLabels);\n });\n }\n });\n}\nfunction setValues(visualElement, definition) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition);\n }\n else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition]);\n }\n else {\n setTarget(visualElement, definition);\n }\n}\n/**\n * @public\n */\nfunction animationControls() {\n /**\n * Track whether the host component has mounted.\n */\n let hasMounted = false;\n /**\n * A collection of linked component animation controls.\n */\n const subscribers = new Set();\n const controls = {\n subscribe(visualElement) {\n subscribers.add(visualElement);\n return () => void subscribers.delete(visualElement);\n },\n start(definition, transitionOverride) {\n invariant(hasMounted, \"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n const animations = [];\n subscribers.forEach((visualElement) => {\n animations.push(animateVisualElement(visualElement, definition, {\n transitionOverride,\n }));\n });\n return Promise.all(animations);\n },\n set(definition) {\n invariant(hasMounted, \"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n return subscribers.forEach((visualElement) => {\n setValues(visualElement, definition);\n });\n },\n stop() {\n subscribers.forEach((visualElement) => {\n stopAnimation(visualElement);\n });\n },\n mount() {\n hasMounted = true;\n return () => {\n hasMounted = false;\n controls.stop();\n };\n },\n };\n return controls;\n}\n\nexport { animationControls, setValues };\n//# sourceMappingURL=animation-controls.mjs.map\n"],"names":["setVariants","visualElement","variantLabels","reverse","forEach","key","variant","getVariant","setTarget","variantChildren","child","setValues","definition","Array","isArray","animationControls","hasMounted","subscribers","Set","controls","subscribe","add","delete","start","transitionOverride","invariant","animations","push","animateVisualElement","Promise","all","set","stop","values","value","stopAnimation","mount"],"mappings":"4SAaA,SAASA,EAAYC,EAA8BC,GACxB,IAAIA,GAAeC,UAE3BC,QAASC,IACpB,MAAMC,EAAUL,EAAcM,WAAWF,GACzCC,GAAWE,EAASA,UAACP,EAAeK,GAEhCL,EAAcQ,iBACdR,EAAcQ,gBAAgBL,QAASM,IACnCV,EAAYU,EAAOR,MAInC,CAEM,SAAUS,EACZV,EACAW,GAEA,OAAIC,MAAMC,QAAQF,GACPZ,EAAYC,EAAeW,GACL,iBAAfA,EACPZ,EAAYC,EAAe,CAACW,SAEnCJ,YAAUP,EAAeW,EAEjC,2BAKgBG,WAIZ,IAAIC,GAAa,EAKjB,MAAMC,EAAc,IAAIC,IAElBC,EAAoC,CACtCC,UAAUnB,IACNgB,EAAYI,IAAIpB,GACT,KAAWgB,EAAYK,OAAOrB,KAGzCsB,KAAAA,CAAMX,EAAYY,
|
|
1
|
+
{"version":3,"file":"animation-controls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs"],"sourcesContent":["import { animateVisualElement, setTarget } from 'motion-dom';\nimport { invariant } from 'motion-utils';\n\nfunction stopAnimation(visualElement) {\n visualElement.values.forEach((value) => value.stop());\n}\nfunction setVariants(visualElement, variantLabels) {\n const reversedLabels = [...variantLabels].reverse();\n reversedLabels.forEach((key) => {\n const variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n if (visualElement.variantChildren) {\n visualElement.variantChildren.forEach((child) => {\n setVariants(child, variantLabels);\n });\n }\n });\n}\nfunction setValues(visualElement, definition) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition);\n }\n else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition]);\n }\n else {\n setTarget(visualElement, definition);\n }\n}\n/**\n * @public\n */\nfunction animationControls() {\n /**\n * Track whether the host component has mounted.\n */\n let hasMounted = false;\n /**\n * A collection of linked component animation controls.\n */\n const subscribers = new Set();\n const controls = {\n subscribe(visualElement) {\n subscribers.add(visualElement);\n return () => void subscribers.delete(visualElement);\n },\n start(definition, transitionOverride) {\n process.env.NODE_ENV !== \"production\" &&\n invariant(hasMounted, \"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n const animations = [];\n subscribers.forEach((visualElement) => {\n animations.push(animateVisualElement(visualElement, definition, {\n transitionOverride,\n }));\n });\n return Promise.all(animations);\n },\n set(definition) {\n process.env.NODE_ENV !== \"production\" &&\n invariant(hasMounted, \"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n return subscribers.forEach((visualElement) => {\n setValues(visualElement, definition);\n });\n },\n stop() {\n subscribers.forEach((visualElement) => {\n stopAnimation(visualElement);\n });\n },\n mount() {\n hasMounted = true;\n return () => {\n hasMounted = false;\n controls.stop();\n };\n },\n };\n return controls;\n}\n\nexport { animationControls, setValues };\n//# sourceMappingURL=animation-controls.mjs.map\n"],"names":["setVariants","visualElement","variantLabels","reverse","forEach","key","variant","getVariant","setTarget","variantChildren","child","setValues","definition","Array","isArray","animationControls","hasMounted","subscribers","Set","controls","subscribe","add","delete","start","transitionOverride","process","env","NODE_ENV","invariant","animations","push","animateVisualElement","Promise","all","set","stop","values","value","stopAnimation","mount"],"mappings":"4SAaA,SAASA,EAAYC,EAA8BC,GACxB,IAAIA,GAAeC,UAE3BC,QAASC,IACpB,MAAMC,EAAUL,EAAcM,WAAWF,GACzCC,GAAWE,EAASA,UAACP,EAAeK,GAEhCL,EAAcQ,iBACdR,EAAcQ,gBAAgBL,QAASM,IACnCV,EAAYU,EAAOR,MAInC,CAEM,SAAUS,EACZV,EACAW,GAEA,OAAIC,MAAMC,QAAQF,GACPZ,EAAYC,EAAeW,GACL,iBAAfA,EACPZ,EAAYC,EAAe,CAACW,SAEnCJ,YAAUP,EAAeW,EAEjC,2BAKgBG,WAIZ,IAAIC,GAAa,EAKjB,MAAMC,EAAc,IAAIC,IAElBC,EAAoC,CACtCC,UAAUnB,IACNgB,EAAYI,IAAIpB,GACT,KAAWgB,EAAYK,OAAOrB,KAGzCsB,KAAAA,CAAMX,EAAYY,GACW,eAAzBC,QAAQC,IAAIC,UACRC,EAAAA,UACIZ,EACA,mHAGR,MAAMa,EAAkC,GASxC,OARAZ,EAAYb,QAASH,IACjB4B,EAAWC,KACPC,uBAAqB9B,EAAeW,EAAY,CAC5CY,0BAKLQ,QAAQC,IAAIJ,EACtB,EAEDK,IAAItB,IACyB,eAAzBa,QAAQC,IAAIC,UACRC,EAAAA,UACIZ,EACA,iHAGDC,EAAYb,QAASH,IACxBU,EAAUV,EAAeW,MAIjCuB,IAAAA,GACIlB,EAAYb,QAASH,KApFjC,SAAuBA,GACnBA,EAAcmC,OAAOhC,QAASiC,GAAUA,EAAMF,OAClD,CAmFgBG,CAAcrC,IAErB,EAEDsC,MAAKA,KACDvB,GAAa,EAEN,KACHA,GAAa,EACbG,EAASgB,UAKrB,OAAOhB,CACX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var t=require("react"),e=require("../../context/MotionConfigContext.mjs.js"),o=require("../../utils/use-composed-ref.mjs.js"),r=require("../../../../../motion-dom/dist/es/frameloop/microtask.mjs.js"),n=require("../../../../../motion-dom/dist/es/utils/is-html-element.mjs.js"),i=require("../../../../../../_virtual/jsx-runtime.js");function s(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}}),e.default=t,Object.freeze(e)}var p=s(t);const c=t=>{const{width:e,height:o}=t?.getBoundingClientRect()||{};return[e/t?.offsetWidth||1,o/t?.offsetHeight||1]},u=t=>{let{left:e,top:o}=t.getBoundingClientRect(),r=t;for(;r=r.parentElement||r.parentNode?.host;){const{scrollLeft:t,scrollTop:n}=r;if(t||n){const[i,s]=c(r);e+=t*i,o+=n*s}if("fixed"===getComputedStyle(r).position)break}const[n,i]=c(t.offsetParent);return[e/n,o/i]};class l extends p.Component{getSnapshotBeforeUpdate(t){const e=this.props.getElement();if(n.isHTMLElement(e)&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const t=e.offsetParent,o=n.isHTMLElement(t)&&t.offsetWidth||0,r=n.isHTMLElement(t)&&t.offsetHeight||0,i=getComputedStyle(e),s=this.props.sizeRef.current;s.height=parseFloat(i.height),s.width=parseFloat(i.width),s.top=e.offsetTop,s.left=e.offsetLeft,s.right=o-s.width-s.left,s.bottom=r-s.height-s.top,s.direction=i.direction,s.point=u(e)}return null}componentDidUpdate(){}render(){return this.props.children}}exports.PopChild=function({children:n,isPresent:s,anchorX:c,anchorY:f,root:d,pop:h,popNode:a}){const m=t.useId(),g=t.useRef(null),j=t.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:b}=t.useContext(e.MotionConfigContext),x=!1!==h?n.props?.ref??n?.ref:void 0,C=o.useComposedRefs(g,x),P=()=>g.current||a?.current?.current,$=t=>{const{width:e,height:o,top:r,left:n,right:i,bottom:s,direction:p}=j.current,u="rtl"===p,l="left"===c?u?`right:${i}`:`left:${n}`:u?`left:${n}`:`right:${i}`,d="bottom"===f?`bottom:${s}`:`top:${r}`;t?.insertRule(`[data-motion-pop-id="${m}"]{position:absolute!important;width:${e}px!important;height:${o}px!important;${l}px!important;${d}px!important}`)};return t.useInsertionEffect(()=>{const{width:t,height:e}=j.current,o=P();if(s||!1===h||!o||!t||!e)return;o.dataset.motionPopId=m;const n=o.ownerDocument,i=n.createElement("style");b&&(i.nonce=b);const p=d??n.head;p.appendChild(i),$(i.sheet);let c=0,l=0;return r.microtask.setup(()=>{const[t,e]=u(o);c=j.current.point[0]-t,l=j.current.point[1]-e}),r.microtask.read(()=>{const{sheet:t}=i;if(!t||!c&&!l)return;const e=j.current;e.left+=c,e.right-=c,e.top+=l,e.bottom-=l,t.deleteRule(0),$(t)}),()=>{o.removeAttribute("data-motion-pop-id"),p.contains(i)&&p.removeChild(i)}},[s]),i.exports.jsx(l,{isPresent:s,getElement:P,sizeRef:j,pop:h,children:!1===h?n:p.cloneElement(n,{ref:C})})};
|
|
2
2
|
//# sourceMappingURL=PopChild.mjs.js.map
|
package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopChild.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { isHTMLElement } from 'motion-dom';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { useComposedRefs } from '../../utils/use-composed-ref.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.getElement();\n if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {\n const parent = element.offsetParent;\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0;\n const parentHeight = isHTMLElement(parent)\n ? parent.offsetHeight || 0\n : 0;\n const computedStyle = getComputedStyle(element);\n const size = this.props.sizeRef.current;\n size.height = parseFloat(computedStyle.height);\n size.width = parseFloat(computedStyle.width);\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n size.right = parentWidth - size.width - size.left;\n size.bottom = parentHeight - size.height - size.top;\n size.direction = computedStyle.direction;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent, anchorX, anchorY, root, pop, popNode }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n direction: \"ltr\",\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * In React 19, refs are passed via props.ref instead of element.ref.\n * We check props.ref first (React 19) and fall back to element.ref (React 18).\n *\n * The composed ref is only used when popping the child out (pop !== false),\n * so we avoid reading children.props.ref otherwise. In React 18.3 that read\n * triggers a spurious \"`ref` is not a prop\" warning getter (#3745).\n */\n const childRef = pop !== false\n ? (children.props?.ref ??\n children?.ref)\n : undefined;\n const composedRef = useComposedRefs(ref, childRef);\n /**\n * The child's element: the one our ref reached or, if the child can't\n * be given a ref (for instance a function component that doesn't\n * forward it), its outermost motion component's element (#2503).\n */\n const getElement = () => ref.current || popNode?.current?.current;\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left, right, bottom, direction } = size.current;\n const element = getElement();\n if (isPresent || pop === false || !element || !width || !height)\n return;\n const isRTL = direction === \"rtl\";\n const x = anchorX === \"left\"\n ? (isRTL ? `right: ${right}` : `left: ${left}`)\n : (isRTL ? `left: ${left}` : `right: ${right}`);\n const y = anchorY === \"bottom\" ? `bottom: ${bottom}` : `top: ${top}`;\n element.dataset.motionPopId = id;\n /**\n * Use the element's own document so this works when rendering\n * into another window or iframe (e.g. via window.open()).\n */\n const doc = element.ownerDocument;\n const style = doc.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n const parent = root ?? doc.head;\n parent.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n ${x}px !important;\n ${y}px !important;\n }\n `);\n }\n return () => {\n element.removeAttribute(\"data-motion-pop-id\");\n if (parent.contains(style)) {\n parent.removeChild(style);\n }\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, getElement: getElement, sizeRef: size, pop: pop, children: pop === false\n ? children\n : React.cloneElement(children, { ref: composedRef }) }));\n}\n\nexport { PopChild };\n//# sourceMappingURL=PopChild.mjs.map\n"],"names":["PopChildMeasure","React","Component","getSnapshotBeforeUpdate","prevProps","parent","element","offsetParent","parentWidth","isHTMLElement","offsetWidth","parentHeight","offsetHeight","computedStyle","getComputedStyle","size","top","offsetTop","left","offsetLeft","right","width","bottom","height","direction","componentDidUpdate","props","children","id","useId","ref","useRef","childRef","pop","getElement","current","popNode","isPresent","isRTL","x","anchorX","y","anchorY","dataset","motionPopId","doc","ownerDocument","nonce","style","root","head","appendChild","sheet","insertRule","removeAttribute","contains","removeChild","cloneElement","composedRef"],"mappings":"4pBAsCA,MAAAA,UAAAC,EAAAC,UACIC,uBAAAA,CAAAC,mHAGQ,MAAAC,EAAAC,EAAAC,aACAC,EAAAC,EAAAA,cAAAJ,IACIA,EAAAK,eAEJC,EAAAF,EAAAA,cAAAJ,IACIA,EAAAO,gBAGJC,EAAAC,iBAAAR,0FAIAS,EAAAC,IAAAV,EAAAW,UACAF,EAAAG,KAAAZ,EAAAa,WACAJ,EAAAK,MAAAZ,EAAAO,EAAAM,MAAAN,EAAAG,KACAH,EAAAO,OAAAX,EAAAI,EAAAQ,OAAAR,EAAAC,IACAD,EAAAS,UAAAX,EAAAW,UAGJ,OAAA,KAMJC,kBAAAA,GAAA,UAGI,OAAAC,KAAAA,MAAAC,yGAKJ,MAAAC,EAAAC,EAAAA,QACAC,EAAAC,SAAA,kBAEIV,MAAA,EACAE,OAAA,EACAP,IAAA,EACAE,KAAA,EACAE,MAAA,EACAE,OAAA,EACAE,UAAA,sDAWJQ,GAAA,IAAAC,EAEQN,EAAAD,OAAAI,4CAURI,EAAAA,IAAAJ,EAAAK,SAAAC,GAAAD,SAAAA,yCAaI,MAAAd,MAAAA,EAAAE,OAAAA,EAAAP,IAAAA,EAAAE,KAAAA,EAAAE,MAAAA,EAAAE,OAAAA,EAAAE,UAAAA,GAAAT,EAAAoB,QACA7B,EAAA4B,IACA,GAAAG,IAAA,IAAAJ,IAAA3B,IAAAe,IAAAE,SAEA,MAAAe,EAAA,QAAAd,EACAe,EAAA,SAAAC,EACIF,EAAAlB,UAAAA,IAAAF,SAAAA,IACAoB,EAAApB,SAAAA,cAAAE,IACJqB,EAAAnB,WAAAoB,EAAApB,WAAAA,YAAAN,IAEAV,EAAAqC,QAAAC,YAAAhB,EAMA,MAAAiB,EAAAvC,EAAAwC,yCAEAC,IAAWC,EAAAD,MAAAA,GAEX,MAAA1C,EAAA4C,GAAAJ,EAAAK,KAeA,OAdA7C,EAAA8C,YAAAH,GAEAA,EAAAI,OACIJ,EAAAI,MAAAC,WAAA,+PAWJ,KACI/C,EAAAgD,gBAAA,sBACAjD,EAAAkD,SAAAP,IACI3C,EAAAmD,YAAAR,KAGZ,CAAAX,8DAKYV,UAAAA,IAAAA,EAAAA,EACA1B,EAAAwD,aAAA9B,EAAA,CAAAG,IAAA4B,KAGhB"}
|
|
1
|
+
{"version":3,"file":"PopChild.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { microtask, isHTMLElement } from 'motion-dom';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { useComposedRefs } from '../../utils/use-composed-ref.mjs';\n\n/**\n * How much an element's transforms, and its ancestors', scale it on screen.\n */\nconst measureScale = (element) => {\n const { width, height } = element?.getBoundingClientRect() || {};\n return [\n width / element?.offsetWidth || 1,\n height / element?.offsetHeight || 1,\n ];\n};\n/**\n * The element's position in the space it scrolls in, as the projection\n * system measures it (see measurePageBox and removeElementScroll): its\n * viewport position, plus its scroll containers' scroll (across shadow\n * roots), plus the window's (the root's) scroll. Like checkIsScrollRoot, a\n * fixed ancestor is a scroll root: it doesn't scroll with anything above it,\n * so a fixed container is measured relative to the viewport.\n *\n * So a scroll position clamped by content shrinking reads as the element\n * moving only if it doesn't scroll with that content.\n *\n * Scroll offsets are in their container's coordinate space, so are scaled\n * onto the screen, and the result is returned in the offsetParent's\n * coordinate space, which the pop rule's offsets are in.\n */\nconst measurePoint = (element) => {\n let { left, top } = element.getBoundingClientRect();\n let node = element;\n while ((node = (node.parentElement ||\n node.parentNode?.host))) {\n const { scrollLeft, scrollTop } = node;\n if (scrollLeft || scrollTop) {\n const [x, y] = measureScale(node);\n left += scrollLeft * x;\n top += scrollTop * y;\n }\n if (getComputedStyle(node).position === \"fixed\")\n break;\n }\n const [x, y] = measureScale(element.offsetParent);\n return [left / x, top / y];\n};\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.getElement();\n if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {\n const parent = element.offsetParent;\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0;\n const parentHeight = isHTMLElement(parent)\n ? parent.offsetHeight || 0\n : 0;\n const computedStyle = getComputedStyle(element);\n const size = this.props.sizeRef.current;\n size.height = parseFloat(computedStyle.height);\n size.width = parseFloat(computedStyle.width);\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n size.right = parentWidth - size.width - size.left;\n size.bottom = parentHeight - size.height - size.top;\n size.direction = computedStyle.direction;\n size.point = measurePoint(element);\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent, anchorX, anchorY, root, pop, popNode }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n direction: \"ltr\",\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * In React 19, refs are passed via props.ref instead of element.ref.\n * We check props.ref first (React 19) and fall back to element.ref (React 18).\n *\n * The composed ref is only used when popping the child out (pop !== false),\n * so we avoid reading children.props.ref otherwise. In React 18.3 that read\n * triggers a spurious \"`ref` is not a prop\" warning getter (#3745).\n */\n const childRef = pop !== false\n ? (children.props?.ref ??\n children?.ref)\n : undefined;\n const composedRef = useComposedRefs(ref, childRef);\n /**\n * The child's element: the one our ref reached or, if the child can't\n * be given a ref (for instance a function component that doesn't\n * forward it), its outermost motion component's element (#2503).\n */\n const getElement = () => ref.current || popNode?.current?.current;\n const insertPopRule = (sheet) => {\n const { width, height, top, left, right, bottom, direction } = size.current;\n const isRTL = direction === \"rtl\";\n const x = anchorX === \"left\"\n ? (isRTL ? `right:${right}` : `left:${left}`)\n : (isRTL ? `left:${left}` : `right:${right}`);\n const y = anchorY === \"bottom\" ? `bottom:${bottom}` : `top:${top}`;\n sheet?.insertRule(`[data-motion-pop-id=\"${id}\"]{position:absolute!important;width:${width}px!important;height:${height}px!important;${x}px!important;${y}px!important}`);\n };\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height } = size.current;\n const element = getElement();\n if (isPresent || pop === false || !element || !width || !height)\n return;\n element.dataset.motionPopId = id;\n /**\n * Use the element's own document so this works when rendering\n * into another window or iframe (e.g. via window.open()).\n */\n const doc = element.ownerDocument;\n const style = doc.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n const parent = root ?? doc.head;\n parent.appendChild(style);\n insertPopRule(style.sheet);\n /**\n * Popping the element out of the layout can move its offsetParent,\n * which we've pinned it to. For instance, a bottom-anchored or\n * centred container shrinks around its remaining children (#2348).\n * So once the whole commit is in the DOM, measure how far the\n * element moved and offset it back.\n *\n * This runs on the microtask frameloop, so before paint even if\n * this commit happens within an animation frame. Every popped\n * element is measured in its first step, then corrected at the\n * start of the read step: before the projection system, which\n * schedules its layout measurement there from layout effects, so\n * layout animations see the corrected position.\n */\n let dx = 0;\n let dy = 0;\n microtask.setup(() => {\n const [x, y] = measurePoint(element);\n dx = size.current.point[0] - x;\n dy = size.current.point[1] - y;\n });\n microtask.read(() => {\n /**\n * The style has no sheet if it's been removed since, because\n * the element is present again.\n */\n const { sheet } = style;\n if (!sheet || (!dx && !dy))\n return;\n const s = size.current;\n s.left += dx;\n s.right -= dx;\n s.top += dy;\n s.bottom -= dy;\n sheet.deleteRule(0);\n insertPopRule(sheet);\n });\n return () => {\n element.removeAttribute(\"data-motion-pop-id\");\n if (parent.contains(style)) {\n parent.removeChild(style);\n }\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, getElement: getElement, sizeRef: size, pop: pop, children: pop === false\n ? children\n : React.cloneElement(children, { ref: composedRef }) }));\n}\n\nexport { PopChild };\n//# sourceMappingURL=PopChild.mjs.map\n"],"names":["measureScale","element","width","height","getBoundingClientRect","offsetWidth","offsetHeight","measurePoint","node","parentElement","parentNode","host","scrollLeft","scrollTop","left","x","top","y","getComputedStyle","position","offsetParent","PopChildMeasure","React","Component","getSnapshotBeforeUpdate","prevProps","parent","parentWidth","isHTMLElement","parentHeight","computedStyle","size","offsetTop","offsetLeft","right","bottom","direction","point","componentDidUpdate","props","children","id","useId","ref","useRef","childRef","pop","getElement","current","popNode","insertPopRule","sheet","isRTL","anchorX","anchorY","insertRule","isPresent","dataset","motionPopId","doc","ownerDocument","nonce","style","root","head","appendChild","microtask","setup","read","s","dx","dy","deleteRule","removeAttribute","contains","removeChild","cloneElement","composedRef"],"mappings":"suBAsCA,MAAAA,EAAAC,IACI,MAAAC,MAAAA,EAAAC,OAAAA,GAAAF,GAAAG,yBAAA,UAGIF,EAAAD,GAAAI,aAAA,EACAF,EAAAF,GAAAK,kBAmBRC,EAAAN,oDAGI,KAAAO,EAAAA,EAAAC,eAESD,EAAAE,YAAAC,MAAA,CAEL,MAAAC,WAAAA,EAAAC,UAAAA,GAAAL,EACA,GAAAI,GAAAC,EAAA,iBAEIC,GAAAF,EAAAG,EACAC,GAAAH,EAAAI,EAEJ,aAAAC,iBAAAV,GAAAW,eAEJ,MAAAJ,EAAAE,GAAAjB,EAAAC,EAAAmB,+BAQJ,MAAAC,UAAAC,EAAAC,UACIC,uBAAAA,CAAAC,mHAGQ,MAAAC,EAAAzB,EAAAmB,aACAO,EAAAC,EAAAA,cAAAF,IACIA,EAAArB,eAEJwB,EAAAD,EAAAA,cAAAF,IACIA,EAAApB,gBAGJwB,EAAAZ,iBAAAjB,0FAIA8B,EAAAf,IAAAf,EAAA+B,UACAD,EAAAjB,KAAAb,EAAAgC,WACAF,EAAAG,MAAAP,EAAAI,EAAA7B,MAAA6B,EAAAjB,KACAiB,EAAAI,OAAAN,EAAAE,EAAA5B,OAAA4B,EAAAf,IACAe,EAAAK,UAAAN,EAAAM,UACAL,EAAAM,MAAA9B,EAAAN,GAGJ,OAAA,KAMJqC,kBAAAA,GAAA,UAGI,OAAAC,KAAAA,MAAAC,yGAKJ,MAAAC,EAAAC,EAAAA,QACAC,EAAAC,SAAA,kBAEI1C,MAAA,EACAC,OAAA,EACAa,IAAA,EACAF,KAAA,EACAoB,MAAA,EACAC,OAAA,EACAC,UAAA,sDAWJS,GAAA,IAAAC,EAEQN,EAAAD,OAAAI,4CAURI,EAAAA,IAAAJ,EAAAK,SAAAC,GAAAD,SAAAA,QAGAE,EAAAC,IACI,MAAAjD,MAAAA,EAAAC,OAAAA,EAAAa,IAAAA,EAAAF,KAAAA,EAAAoB,MAAAA,EAAAC,OAAAA,EAAAC,UAAAA,GAAAL,EAAAiB,QACAI,EAAA,QAAAhB,EACArB,EAAA,SAAAsC,EACID,EAAAlB,SAAAA,IAAApB,QAAAA,IACAsC,EAAAtC,QAAAA,aAAAoB,IACJjB,EAAAkB,WAAAmB,EAAAnB,UAAAA,WAAAnB,IAEAmC,GAAAI,WAAA,wBAAAd,yCAAAvC,wBAAAC,iBAAAY,iBAAAE,sFAgBAhB,EAAA8C,IACA,GAAAS,IAAA,IAAAV,IAAA7C,IAAAC,IAAAC,SAEAF,EAAAwD,QAAAC,YAAAjB,EAMA,MAAAkB,EAAA1D,EAAA2D,yCAEAC,IAAWC,EAAAD,MAAAA,GAEX,MAAAnC,EAAAqC,GAAAJ,EAAAK,KACAtC,EAAAuC,YAAAH,GAEAZ,EAAAY,EAAAX,mBAuCA,OArBAe,EAAAA,UAAAC,MAAA,qEAKAD,EAAAA,UAAAE,KAAA,KAKI,MAAAjB,MAAAA,GAAAW,uBAEA,MAAAO,EAAAtC,EAAAiB,QACAqB,EAAAvD,MAAAwD,EACAD,EAAAnC,OAAAoC,EACAD,EAAArD,KAAAuD,EACAF,EAAAlC,QAAAoC,EACApB,EAAAqB,WAAA,UAIJ,KACIvE,EAAAwE,gBAAA,sBACA/C,EAAAgD,SAAAZ,IACIpC,EAAAiD,YAAAb,KAGZ,CAAAN,8DAKYhB,UAAAA,IAAAA,EAAAA,EACAlB,EAAAsD,aAAApC,EAAA,CAAAG,IAAAkC,KAGhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),t=require("../../../../motion-dom/dist/es/gestures/hover.mjs.js"),o=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),s=require("../../../../motion-dom/dist/es/events/event-info.mjs.js");function r(e,t,r){const{props:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),t=require("../../../../motion-dom/dist/es/gestures/hover.mjs.js"),o=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),s=require("../../../../motion-dom/dist/es/events/event-info.mjs.js");function r(e,t,r,n,i){const{props:m}=e,u="while"+r;!i&&e.animationState&&m[u]&&e.animationState.setActive(u,"Start"===n);const a=m["on"+r+n];a&&o.frame.postRender(()=>a(t,s.extractEventInfo(t)))}class n extends e.Feature{mount(){const{current:e}=this.node;e&&(this.unmount=t.hover(e,(e,t)=>(r(this.node,t,"Hover","Start"),e=>r(this.node,e,"Hover","End"))))}unmount(){}}exports.HoverGesture=n,exports.handleGestureEvent=r;
|
|
2
2
|
//# sourceMappingURL=hover.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/hover.mjs"],"sourcesContent":["import { Feature, hover, frame, extractEventInfo } from 'motion-dom';\n\nfunction
|
|
1
|
+
{"version":3,"file":"hover.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/hover.mjs"],"sourcesContent":["import { Feature, hover, frame, extractEventInfo } from 'motion-dom';\n\n/**\n * Toggle `while{gesture}` and fire `on{gesture}{lifecycle}`, e.g.\n * `onHoverStart` or, with an empty lifecycle, `onTap`. A repeat fires the\n * callback but leaves `while{gesture}` active.\n */\nfunction handleGestureEvent(node, event, gesture, lifecycle, isRepeat) {\n const { props } = node;\n const whileKey = (\"while\" + gesture);\n if (!isRepeat && node.animationState && props[whileKey]) {\n node.animationState.setActive(whileKey, lifecycle === \"Start\");\n }\n const callback = props[(\"on\" + gesture + lifecycle)];\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, (_element, startEvent) => {\n handleGestureEvent(this.node, startEvent, \"Hover\", \"Start\");\n return (endEvent) => handleGestureEvent(this.node, endEvent, \"Hover\", \"End\");\n });\n }\n unmount() { }\n}\n\nexport { HoverGesture, handleGestureEvent };\n//# sourceMappingURL=hover.mjs.map\n"],"names":["handleGestureEvent","node","event","gesture","lifecycle","isRepeat","props","whileKey","animationState","setActive","callback","frame","postRender","extractEventInfo","HoverGesture","Feature","mount","current","this","unmount","hover","_element","startEvent","endEvent"],"mappings":"oVAaM,SAAUA,EACZC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,MAAEA,GAAUL,EACZM,EAAY,QAAUJ,GAEvBE,GAAYJ,EAAKO,gBAAkBF,EAAMC,IAC1CN,EAAKO,eAAeC,UAAUF,EAAwB,UAAdH,GAG5C,MAAMM,EAAWJ,EAAO,KAAOH,EAAUC,GAGrCM,GACAC,EAAKA,MAACC,WAAW,IAAMF,EAASR,EAAOW,mBAAiBX,IAEhE,CAEM,MAAOY,UAAqBC,EAAAA,QAC9BC,KAAAA,GACI,MAAMC,QAAEA,GAAYC,KAAKjB,KACpBgB,IAELC,KAAKC,QAAUC,EAAKA,MAACH,EAAS,CAACI,EAAUC,KACrCtB,EAAmBkB,KAAKjB,KAAMqB,EAAY,QAAS,SAE3CC,GACJvB,EAAmBkB,KAAKjB,KAAMsB,EAAU,QAAS,SAE7D,CAEAJ,OAAAA,GAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../motion-dom/dist/es/render/Feature.mjs.js"),n=require("../../../../../motion-utils/dist/es/noop.mjs.js"),t=require("../../../../../motion-dom/dist/es/gestures/pan/PanSession.mjs.js"),s=require("../../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),o=require("../../../../../motion-dom/dist/es/events/add-pointer-event.mjs.js");const r=e=>(n,t)=>{e&&s.frame.update(()=>e(n,t),!1,!0)};class i extends e.Feature{constructor(){super(...arguments),this.removePointerDownListener=n.noop}onPointerDown(e){this.session=new t.PanSession(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:t,onPanEnd:o}=this.node.getProps();return{onSessionStart:r(e),onStart:r(n),onMove:r(t),onEnd:(e,n)=>{delete this.session,o&&s.frame.postRender(()=>o(e,n))}}}mount(){this.removePointerDownListener=o.addPointerEvent(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}}exports.PanGesture=i;
|
|
2
2
|
//# sourceMappingURL=index.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs"],"sourcesContent":["import { Feature, PanSession, frame, addPointerEvent } from 'motion-dom';\nimport { noop } from 'motion-utils';\
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs"],"sourcesContent":["import { Feature, PanSession, frame, addPointerEvent } from 'motion-dom';\nimport { noop } from 'motion-utils';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.update(() => handler(event, info), false, true);\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 // Fixes https://github.com/motiondivision/motion/issues/2270\n contextWindow: this.node.current?.ownerDocument.defaultView,\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: asyncHandler(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?.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session?.end();\n }\n}\n\nexport { PanGesture };\n//# sourceMappingURL=index.mjs.map\n"],"names":["asyncHandler","handler","event","info","frame","update","PanGesture","Feature","constructor","this","removePointerDownListener","noop","onPointerDown","pointerDownEvent","session","PanSession","createPanHandlers","transformPagePoint","node","getTransformPagePoint","contextWindow","current","ownerDocument","defaultView","onPanSessionStart","onPanStart","onPan","onPanEnd","getProps","onSessionStart","onStart","onMove","onEnd","postRender","mount","addPointerEvent","updateHandlers","unmount","end"],"mappings":"6aAUA,MAAMA,EACDC,GAA8B,CAACC,EAAqBC,KAC7CF,GACAG,QAAMC,OAAO,IAAMJ,EAAQC,EAAOC,IAAO,GAAO,IAItD,MAAOG,UAAmBC,EAAAA,QAAhCC,WAAAA,uBAGYC,KAAAC,0BAAsCC,MA+ClD,CA7CIC,aAAAA,CAAcC,GACVJ,KAAKK,QAAU,IAAIC,EAAAA,WACfF,EACAJ,KAAKO,oBACL,CACIC,mBAAoBR,KAAKS,KAAKC,wBAE9BC,cAAeX,KAAKS,KAAKG,SAASC,cAAcC,aAG5D,CAEAP,iBAAAA,GACI,MAAMQ,kBAAEA,EAAiBC,WAAEA,EAAUC,MAAEA,EAAKC,SAAEA,GAC1ClB,KAAKS,KAAKU,WAEd,MAAO,CACHC,eAAgB7B,EAAawB,GAC7BM,QAAS9B,EAAayB,GACtBM,OAAQ/B,EAAa0B,GACrBM,MAAOA,CAAC9B,EAAqBC,YAClBM,KAAKK,QACRa,GACAvB,EAAKA,MAAC6B,WAAW,IAAMN,EAASzB,EAAOC,KAIvD,CAEA+B,KAAAA,GACIzB,KAAKC,0BAA4ByB,kBAC7B1B,KAAKS,KAAKG,QACV,cACCnB,GAAwBO,KAAKG,cAAcV,GAEpD,CAEAG,MAAAA,GACII,KAAKK,SAASsB,eAAe3B,KAAKO,oBACtC,CAEAqB,OAAAA,GACI5B,KAAKC,4BACLD,KAAKK,SAASwB,KAClB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./hover.mjs.js"),t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),s=require("../../../../motion-dom/dist/es/gestures/press/index.mjs.js");function o(t,s,o,n){t.current instanceof HTMLButtonElement&&t.current.disabled||e.handleGestureEvent(t,s,"Tap",o,n)}class n extends t.Feature{constructor(){super(...arguments),this.options={}}mount(){const{current:e}=this.node;e&&(this.update(),this.unmount=s.press(e,(e,t)=>(o(this.node,t,"Start"),{onComplete:(e,{success:t})=>o(this.node,e,t?"":"Cancel"),onRepeat:()=>o(this.node,t,"",!0)}),this.options))}update(){const{options:e,node:t}=this,{globalTapTarget:s,propagate:o,tap:n}=t.props;for(const t in e)delete e[t];Object.assign(e,n,{useGlobalTarget:s,stopPropagation:!1===o?.tap})}unmount(){}}exports.PressGesture=n;
|
|
2
2
|
//# sourceMappingURL=press.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"press.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/press.mjs"],"sourcesContent":["import { Feature, press
|
|
1
|
+
{"version":3,"file":"press.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/press.mjs"],"sourcesContent":["import { Feature, press } from 'motion-dom';\nimport { handleGestureEvent } from './hover.mjs';\n\nfunction handlePressEvent(node, event, lifecycle, isRepeat) {\n if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n return;\n }\n handleGestureEvent(node, event, \"Tap\", lifecycle, isRepeat);\n}\nclass PressGesture extends Feature {\n constructor() {\n super(...arguments);\n /**\n * press() reads its options on each press, so this object is kept\n * and updated in place when props change.\n */\n this.options = {};\n }\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.update();\n this.unmount = press(current, (_element, startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\");\n return {\n onComplete: (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"\" : \"Cancel\"),\n onRepeat: () => handlePressEvent(this.node, startEvent, \"\", true),\n };\n }, this.options);\n }\n update() {\n const { options, node } = this;\n const { globalTapTarget, propagate, tap } = node.props;\n for (const key in options)\n delete options[key];\n Object.assign(options, tap, {\n useGlobalTarget: globalTapTarget,\n stopPropagation: propagate?.tap === false,\n });\n }\n unmount() { }\n}\n\nexport { PressGesture };\n//# sourceMappingURL=press.mjs.map\n"],"names":["handlePressEvent","node","event","lifecycle","isRepeat","current","HTMLButtonElement","disabled","handleGestureEvent","PressGesture","Feature","constructor","this","options","mount","update","unmount","press","_element","startEvent","onComplete","endEvent","success","onRepeat","globalTapTarget","propagate","tap","props","key","Object","assign","useGlobalTarget","stopPropagation"],"mappings":"8OAQA,SAASA,EACLC,EACAC,EACAC,EACAC,GAEIH,EAAKI,mBAAmBC,mBAAqBL,EAAKI,QAAQE,UAI9DC,EAAkBA,mBAACP,EAAMC,EAAO,MAAOC,EAAWC,EACtD,CAEM,MAAOK,UAAqBC,EAAAA,QAAlCC,WAAAA,uBAKYC,KAAAC,QAA+B,EAyC3C,CAvCIC,KAAAA,GACI,MAAMT,QAAEA,GAAYO,KAAKX,KACpBI,IAELO,KAAKG,SAELH,KAAKI,QAAUC,EAAKA,MAChBZ,EACA,CAACa,EAAUC,KACPnB,EAAiBY,KAAKX,KAAMkB,EAAY,SAEjC,CACHC,WAAYA,CAACC,GAAYC,aACrBtB,EACIY,KAAKX,KACLoB,EACAC,EAAU,GAAK,UAEvBC,SAAUA,IACNvB,EAAiBY,KAAKX,KAAMkB,EAAY,IAAI,KAGxDP,KAAKC,SAEb,CAEAE,MAAAA,GACI,MAAMF,QAAEA,EAAOZ,KAAEA,GAASW,MACpBY,gBAAEA,EAAeC,UAAEA,EAASC,IAAEA,GAAQzB,EAAK0B,MAEjD,IAAK,MAAMC,KAAOf,SAAgBA,EAAQe,GAE1CC,OAAOC,OAAOjB,EAASa,EAAK,CACxBK,gBAAiBP,EACjBQ,iBAAoC,IAAnBP,GAAWC,KAEpC,CAEAV,OAAAA,GAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../../motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js");let i=0;class s extends t.Feature{constructor(){super(...arguments),this.id=i++}update(){const{presenceContext:t,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../../motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js");let i=0;class s extends t.Feature{constructor(){super(...arguments),this.id=i++}update(){const{presenceContext:t,animationState:i}=this.node;if(!t||!i)return;const{isPresent:s,onExitComplete:n}=t;if(s===!this.exit)return;if(s){if(!0===this.exit){const{initial:t}=this.node.getProps();if(t&&!Array.isArray(t)){const{transition:i,transitionEnd:s,...n}=e.resolveVariant(this.node,t)||{};for(const t in n)this.node.getValue(t)?.jump(n[t])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);return void(this.exit=void 0)}const o=this.exit=i.setActive("exit",!0);n&&o.then(()=>{this.exit===o&&(this.exit=!0,n(this.id))})}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id,this.node)),this.update()}unmount(){}}exports.ExitAnimationFeature=s;
|
|
2
2
|
//# sourceMappingURL=exit.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exit.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs"],"sourcesContent":["import { Feature, resolveVariant } from 'motion-dom';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n }\n update() {\n const { presenceContext,
|
|
1
|
+
{"version":3,"file":"exit.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs"],"sourcesContent":["import { Feature, resolveVariant } from 'motion-dom';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n }\n update() {\n const { presenceContext, animationState } = this.node;\n if (!presenceContext || !animationState)\n return;\n const { isPresent, onExitComplete } = presenceContext;\n /**\n * Compare presence with our own exit, not the previous presence\n * context. An element can mount already exiting, for instance when\n * Suspense reveals it in the render that removed it, and then both\n * contexts have isPresent: false (#4049).\n */\n if (isPresent === !this.exit)\n return;\n if (isPresent) {\n /**\n * When re-entering after the exit completed (element is at\n * rest), replay the enter animation from initial.\n */\n if (this.exit === true) {\n const { initial } = this.node.getProps();\n if (initial && !Array.isArray(initial)) {\n const { transition, transitionEnd, ...target } = resolveVariant(this.node, initial) || {};\n for (const key in target) {\n this.node\n .getValue(key)\n ?.jump(target[key]);\n }\n }\n /**\n * A re-entering element is no longer an initial child, so\n * AnimatePresence's initial={false} mustn't block its enter.\n */\n this.node.blockInitialAnimation = false;\n animationState.reset();\n animationState.animateChanges();\n }\n else {\n animationState.setActive(\"exit\", false);\n }\n this.exit = undefined;\n return;\n }\n const exit = (this.exit = animationState.setActive(\"exit\", true));\n if (onExitComplete) {\n exit.then(() => {\n /**\n * An exit can resolve after the element has re-entered, e.g.\n * when its final tick lands in the stop() of the enter.\n */\n if (this.exit !== exit)\n return;\n this.exit = true;\n onExitComplete(this.id);\n });\n }\n }\n mount() {\n const { register } = this.node.presenceContext || {};\n if (register) {\n this.unmount = register(this.id, this.node);\n }\n // Start the exit of an element that mounts already exiting\n this.update();\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n//# sourceMappingURL=exit.mjs.map\n"],"names":["id","ExitAnimationFeature","Feature","constructor","this","update","presenceContext","animationState","node","isPresent","onExitComplete","exit","initial","getProps","Array","isArray","transition","transitionEnd","target","resolveVariant","key","getValue","jump","blockInitialAnimation","reset","animateChanges","setActive","undefined","then","mount","register","unmount"],"mappings":"+OAEA,IAAIA,EAAK,EAEH,MAAOC,UAA6BC,EAAAA,QAA1CC,WAAAA,uBACYC,KAAAJ,GAAaA,GAmFzB,CA5EIK,MAAAA,GACI,MAAMC,gBAAEA,EAAeC,eAAEA,GAAmBH,KAAKI,KAEjD,IAAKF,IAAoBC,EAAgB,OAEzC,MAAME,UAAEA,EAASC,eAAEA,GAAmBJ,EAQtC,GAAIG,KAAeL,KAAKO,KAAM,OAE9B,GAAIF,EAAW,CAKX,IAAkB,IAAdL,KAAKO,KAAe,CACpB,MAAMC,QAAEA,GAAYR,KAAKI,KAAKK,WAE9B,GAAID,IAAYE,MAAMC,QAAQH,GAAU,CACpC,MAAMI,WAAEA,EAAUC,cAAEA,KAAkBC,GAClCC,EAAcA,eAACf,KAAKI,KAAMI,IAAmB,CAAA,EAEjD,IAAK,MAAMQ,KAAOF,EACdd,KAAKI,KACAa,SAASD,IACRE,KAAKJ,EAAOE,GAE1B,CAMAhB,KAAKI,KAAKe,uBAAwB,EAClChB,EAAeiB,QACfjB,EAAekB,sBAEflB,EAAemB,UAAU,QAAQ,GAIrC,YADAtB,KAAKO,UAAOgB,EAEhB,CAEA,MAAMhB,EAAQP,KAAKO,KAAOJ,EAAemB,UAAU,QAAQ,GAEvDhB,GACAC,EAAKiB,KAAK,KAKFxB,KAAKO,OAASA,IAClBP,KAAKO,MAAO,EACZD,EAAeN,KAAKJ,MAGhC,CAEA6B,KAAAA,GACI,MAAMC,SAAEA,GAAa1B,KAAKI,KAAKF,iBAAmB,GAE9CwB,IACA1B,KAAK2B,QAAUD,EAAS1B,KAAKJ,GAAII,KAAKI,OAI1CJ,KAAKC,QACT,CAEA0B,OAAAA,GAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../../motion-dom/dist/es/render/utils/animation-state.mjs.js"),n=require("../../../../../../motion-dom/dist/es/render/utils/is-animation-controls.mjs.js");class
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../../motion-dom/dist/es/render/utils/animation-state.mjs.js"),n=require("../../../../../../motion-dom/dist/es/render/utils/is-animation-controls.mjs.js");class i extends t.Feature{constructor(t){super(t),t.animationState||(t.animationState=e.createAnimationState(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();n.isAnimationControls(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}exports.AnimationFeature=i;
|
|
2
2
|
//# sourceMappingURL=index.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/index.mjs"],"sourcesContent":["import { Feature, createAnimationState, isAnimationControls } from 'motion-dom';\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
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/index.mjs"],"sourcesContent":["import { Feature, createAnimationState, isAnimationControls } from 'motion-dom';\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 if (this.node.getProps().animate !== this.node.prevProps?.animate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() {\n this.node.animationState.reset();\n this.unmountControls?.();\n }\n}\n\nexport { AnimationFeature };\n//# sourceMappingURL=index.mjs.map\n"],"names":["AnimationFeature","Feature","constructor","node","super","animationState","createAnimationState","updateAnimationControlsSubscription","animate","this","getProps","isAnimationControls","unmountControls","subscribe","mount","update","prevProps","unmount","reset"],"mappings":"kUAOM,MAAOA,UAAyBC,EAAAA,QAQlCC,WAAAA,CAAYC,GACRC,MAAMD,GACNA,EAAKE,iBAALF,EAAKE,eAAmBC,EAAoBA,qBAACH,GACjD,CAEAI,mCAAAA,GACI,MAAMC,QAAEA,GAAYC,KAAKN,KAAKO,WAC1BC,EAAAA,oBAAoBH,KACpBC,KAAKG,gBAAkBJ,EAAQK,UAAUJ,KAAKN,MAEtD,CAKAW,KAAAA,GACIL,KAAKF,qCACT,CAEAQ,MAAAA,GACQN,KAAKN,KAAKO,WAAWF,UAAYC,KAAKN,KAAKa,WAAWR,SACtDC,KAAKF,qCAEb,CAEAU,OAAAA,GACIR,KAAKN,KAAKE,eAAgBa,QAC1BT,KAAKG,mBACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../motion-dom/dist/es/render/VisualElement.mjs.js");const n={animation:["
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../motion-dom/dist/es/render/utils/variant-props.mjs.js"),t=require("../../../../../motion-dom/dist/es/render/VisualElement.mjs.js");const n={animation:["variants",...e.variantPriorityOrder],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let i=!1;function o(){if(i)return;const e={};for(const t in n)e[t]={isEnabled:e=>n[t].some(t=>!!e[t])};t.setFeatureDefinitions(e),i=!0}exports.getInitializedFeatureDefinitions=function(){return o(),t.getFeatureDefinitions()},exports.initFeatureDefinitions=o;
|
|
2
2
|
//# sourceMappingURL=definitions.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/features/definitions.mjs"],"sourcesContent":["import { getFeatureDefinitions, setFeatureDefinitions } from 'motion-dom';\n\nconst featureProps = {\n animation: [\
|
|
1
|
+
{"version":3,"file":"definitions.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/features/definitions.mjs"],"sourcesContent":["import { getFeatureDefinitions, variantPriorityOrder, setFeatureDefinitions } from 'motion-dom';\n\nconst featureProps = {\n animation: [\"variants\", ...variantPriorityOrder],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nlet isInitialized = false;\n/**\n * Initialize feature definitions with isEnabled checks.\n * This must be called before any motion components are rendered.\n */\nfunction initFeatureDefinitions() {\n if (isInitialized)\n return;\n const initialFeatureDefinitions = {};\n for (const key in featureProps) {\n initialFeatureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n }\n setFeatureDefinitions(initialFeatureDefinitions);\n isInitialized = true;\n}\n/**\n * Get the current feature definitions, initializing if needed.\n */\nfunction getInitializedFeatureDefinitions() {\n initFeatureDefinitions();\n return getFeatureDefinitions();\n}\n\nexport { getInitializedFeatureDefinitions, initFeatureDefinitions };\n//# sourceMappingURL=definitions.mjs.map\n"],"names":["featureProps","animation","variantPriorityOrder","exit","drag","focus","hover","tap","pan","inView","layout","isInitialized","initFeatureDefinitions","initialFeatureDefinitions","key","isEnabled","props","some","name","setFeatureDefinitions","getInitializedFeatureDefinitions","getFeatureDefinitions"],"mappings":"oOAQA,MAAMA,EAAe,CACjBC,UAAW,CAAC,cAAeC,wBAC3BC,KAAM,CAAC,QACPC,KAAM,CAAC,OAAQ,gBACfC,MAAO,CAAC,cACRC,MAAO,CAAC,aAAc,eAAgB,cACtCC,IAAK,CAAC,WAAY,QAAS,aAAc,eACzCC,IAAK,CAAC,QAAS,aAAc,oBAAqB,YAClDC,OAAQ,CAAC,cAAe,kBAAmB,mBAC3CC,OAAQ,CAAC,SAAU,aAGvB,IAAIC,GAAgB,EAMJC,SAAAA,IACZ,GAAID,EAAe,OAEnB,MAAME,EAAyD,CAAA,EAE/D,IAAK,MAAMC,KAAOd,EACda,EACIC,GACA,CACAC,UAAYC,GACRhB,EAAac,GAAkCG,KAC1CC,KAAmBF,EAAME,KAK1CC,EAAqBA,sBAACN,GACtBF,GAAgB,CACpB,0CAKgBS,WAEZ,OADAR,IACOS,EAAqBA,uBAChC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../../react/jsx-runtime.js");var e=require("react"),t=require("../../../components/AnimatePresence/use-presence.mjs.js"),o=require("../../../context/LayoutGroupContext.mjs.js"),s=require("../../../context/SwitchLayoutGroupContext.mjs.js"),r=require("../../../../../../motion-dom/dist/es/projection/node/state.mjs.js"),n=require("../../../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),i=require("../../../../../../motion-dom/dist/es/frameloop/microtask.mjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../../react/jsx-runtime.js");var e=require("react"),t=require("../../../components/AnimatePresence/use-presence.mjs.js"),o=require("../../../context/LayoutGroupContext.mjs.js"),s=require("../../../context/SwitchLayoutGroupContext.mjs.js"),r=require("../../../../../../motion-dom/dist/es/projection/node/state.mjs.js"),n=require("../../../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),i=require("../../../../../../motion-dom/dist/es/frameloop/microtask.mjs.js"),a=require("../../../../../../../_virtual/jsx-runtime.js");let u=!1;const p=({layout:e,layoutDependency:t,layoutAnchor:o})=>({layout:e,layoutDependency:t,layoutAnchor:o,animationType:"string"==typeof e?e:"both"}),m=(e,t)=>{const{snapshot:o}=e,s=e.getStack();s?.remove(e);const r=s?.lead;if(s?.prevLead===e&&r.resumeFrom===e&&(r.resumeFrom=r.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,t)return e.root.registerSharedNode(t,e),()=>{const{resumeFrom:t}=e;!1!==t?.isPresent&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=o)};e.needsShow=!0};class d extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:o,layoutId:s}=this.props,{projection:n}=e;n&&(t.group?.add(n),s&&o?.register?.(n),u&&n.root.didUpdate(),n.options.layoutId!==s&&m(n,s)?.(),n.addEventListener("animationComplete",()=>this.safeToRemove()),n.setOptions({...n.options,...p(this.props),onExitComplete:()=>this.safeToRemove()})),r.globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,layoutId:o,visualElement:s,drag:r,isPresent:i}=this.props,{projection:a}=s;return a?(a.isPresent=i,this.takeOver=e.layoutId!==o?(a.willUpdate(),m(a,o)):void 0,a.setOptions({...a.options,...p(this.props)}),u=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||n.frame.postRender(()=>{a.getStack()?.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),i.microtask.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:o}=this.props,{projection:s}=e;u=!0,s&&(s.scheduleCheckAfterUnmount(),t.group?.remove(s),o?.deregister?.(s))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}}exports.MeasureLayout=function(r){const[n,i]=t.usePresence(),u=e.useContext(o.LayoutGroupContext);return a.exports.jsx(d,{...r,layoutGroup:u,switchLayoutGroup:e.useContext(s.SwitchLayoutGroupContext),isPresent:n,safeToRemove:i})};
|
|
2
2
|
//# sourceMappingURL=MeasureLayout.mjs.js.map
|
package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeasureLayout.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { globalProjectionState, frame, microtask } from 'motion-dom';\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';\n\n/**\n * Track whether we've taken any snapshots yet. If not,\n * we can safely skip notification of didUpdate.\n *\n * Difficult to capture in a test but to prevent flickering\n * we must set this to true either on update or unmount.\n * Running `next-env/layout-id` in Safari will show this behaviour if broken.\n */\nlet hasTakenAnySnapshot = false;\n/**\n * The projection node is created with the props from the component's first\n * render, so keep these in sync as
|
|
1
|
+
{"version":3,"file":"MeasureLayout.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { globalProjectionState, frame, microtask } from 'motion-dom';\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';\n\n/**\n * Track whether we've taken any snapshots yet. If not,\n * we can safely skip notification of didUpdate.\n *\n * Difficult to capture in a test but to prevent flickering\n * we must set this to true either on update or unmount.\n * Running `next-env/layout-id` in Safari will show this behaviour if broken.\n */\nlet hasTakenAnySnapshot = false;\n/**\n * The projection node is created with the props from the component's first\n * render, so keep these in sync as they can change (or be enabled) later.\n */\nconst layoutOptions = ({ layout, layoutDependency, layoutAnchor, }) => ({\n layout,\n layoutDependency,\n layoutAnchor,\n animationType: typeof layout === \"string\" ? layout : \"both\",\n});\n/**\n * Move a mounted node to its new layoutId's stack, as an unmount and remount\n * would. Returns a takeover to run once every node in the commit has had the\n * chance to change its layoutId.\n */\nconst switchLayoutId = (projection, layoutId) => {\n const { snapshot } = projection;\n const stack = projection.getStack();\n stack?.remove(projection);\n /**\n * If this node led the old stack (so remove() made it the prevLead of\n * the new lead), the new lead animates from this node's snapshot, which\n * it now holds. Unlike a node that unmounts, this one stays mounted, so\n * unlink them: the new lead mustn't read this node's snapshot after it\n * changes, or stop or share its animation.\n */\n const lead = stack?.lead;\n if (stack?.prevLead === projection && lead.resumeFrom === projection)\n lead.resumeFrom = lead.currentAnimation = projection.resumingFrom =\n undefined;\n projection.options.layoutId = layoutId;\n /**\n * A node that followed another no longer does, so clear the styles\n * that hid it.\n */\n if (!layoutId) {\n projection.needsShow = true;\n return;\n }\n projection.root.registerSharedNode(layoutId, projection);\n /**\n * Like a mounting node, this one animates from the lead it replaces.\n * But if that lead is still on screen with this layoutId (e.g. an open\n * card moving to another thumbnail), this node is already on screen\n * too, so it takes over instantly: it keeps its own snapshot, and the\n * lead is hidden, as at the end of a crossfade. A lead that left the\n * stack in this commit (e.g. layoutId={selected ? \"x\" : undefined})\n * is animated from, as is one that's exiting.\n */\n return () => {\n const { resumeFrom } = projection;\n if (resumeFrom?.isPresent !== false &&\n projection.getStack().members.includes(resumeFrom)) {\n resumeFrom.hide();\n projection.resumeFrom = undefined;\n projection.snapshot = snapshot;\n }\n };\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 if (projection) {\n layoutGroup.group?.add(projection);\n layoutId && switchLayoutGroup?.register?.(projection);\n if (hasTakenAnySnapshot) {\n projection.root.didUpdate();\n }\n /**\n * Without `layout` or `drag`, this only renders while there's a\n * layoutId, so a mounted node can gain one here.\n */\n if (projection.options.layoutId !== layoutId)\n switchLayoutId(projection, layoutId)?.();\n projection.addEventListener(\"animationComplete\", () => this.safeToRemove());\n projection.setOptions({\n ...projection.options,\n ...layoutOptions(this.props),\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, layoutId, visualElement, drag, isPresent } = this.props;\n const { projection } = visualElement;\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 this.takeOver =\n prevProps.layoutId !== layoutId\n ? (projection.willUpdate(), switchLayoutId(projection, layoutId))\n : undefined;\n projection.setOptions({\n ...projection.options,\n ...layoutOptions(this.props),\n });\n hasTakenAnySnapshot = true;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined ||\n prevProps.isPresent !== isPresent) {\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 projection.getStack()?.members.length || this.safeToRemove();\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { projection } = this.props.visualElement;\n if (projection) {\n this.takeOver?.();\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 hasTakenAnySnapshot = true;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n layoutGroup.group?.remove(projection);\n promoteContext?.deregister?.(projection);\n }\n }\n safeToRemove() {\n this.props.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}\n\nexport { MeasureLayout };\n//# sourceMappingURL=MeasureLayout.mjs.map\n"],"names":["hasTakenAnySnapshot","layoutOptions","layout","layoutDependency","layoutAnchor","animationType","switchLayoutId","projection","layoutId","snapshot","stack","getStack","remove","lead","undefined","options","resumeFrom","isPresent","needsShow","MeasureLayoutWithContext","Component","visualElement","layoutGroup","switchLayoutGroup","this","props","group","add","root","didUpdate","addEventListener","safeToRemove","onExitComplete","globalProjectionState","hasEverUpdated","getSnapshotBeforeUpdate","prevProps","drag","takeOver","willUpdate","relegate","frame","postRender","members","length","microtask","promoteContext","deregister","useContext","LayoutGroupContext"],"mappings":"umBAoCA,IAAAA,GAAA,EAMA,MAAAC,EAAAA,EAAAC,SAAAC,mBAAAC,mBAAA,4CAQIC,cAAA,iBAAAH,EAAAA,EAAA,SAQJI,EAAAA,CAAAC,EAAAC,KACI,MAAAC,SAAAA,GAAAF,EACAG,EAAAH,EAAAI,WACAD,GAAAE,OAAAL,GAQA,MAAAM,EAAAH,GAAAG,gGAGQC,GACRP,EAAAQ,QAAAP,SAAAA,IAqBA,sCAAA,KACI,MAAAQ,WAAAA,GAAAT,OACAS,GAAAC,uDAKIV,EAAAS,gBAAAF,EACAP,EAAAE,SAAAA,IAtBJF,EAAAW,WAAA,GA2BR,MAAAC,UAAAC,EAAAA,8BASQ,MAAAC,cAAAA,EAAAC,YAAAA,EAAAC,kBAAAA,EAAAf,SAAAA,GAAAgB,KAAAC,OAEAlB,WAAAA,GAAAc,MAGIC,EAAAI,OAAAC,IAAApB,0BAIIA,EAAAqB,KAAAC,YAOJtB,EAAAQ,QAAAP,WAAAA,GACIF,EAAAC,EAAAC,EAAAF,KAEJC,EAAAuB,iBAAA,oBAAA,IAAAN,KAAAO,8CAKI9B,OAAAwB,OACAO,eAAAA,IAAAR,KAAAO,kBAIRE,EAAAA,sBAAAC,gBAAA,EAGJC,uBAAAA,CAAAC,GACI,MAAAjC,iBAAAA,EAAAK,SAAAA,EAAAa,cAAAA,EAAAgB,KAAAA,EAAApB,UAAAA,GAAAO,KAAAC,OAEAlB,WAAAA,GAAAc,EAEA,OAAAd,GASAA,EAAAU,UAAAA,EAEAO,KAAAc,WAEQ/B,WAAAA,GAAAA,EAAAgC,aAAAjC,EAAAC,EAAAC,yCAKJP,OAAAwB,cAKJY,gCAGIvB,IAAAX,GACAiC,EAAAnB,YAAAA,qCAOJmB,EAAAnB,YAAAA,kBAGWV,EAAAiC,YAMHC,EAAAA,MAAAC,WAAA,KACInC,EAAAI,YAAAgC,QAAAC,aAAAb,kBAKZ,MAjDiB,2EAuDbP,KAAAc,aACA/B,EAAAqB,KAAAC,YAEAgB,EAAAA,UAAAH,WAAA,oFASJ,MAAArB,cAAAA,EAAAC,YAAAA,EAAAC,kBAAAuB,GAAAtB,KAAAC,OAKAlB,WAAAA,GAAAc,yCAMIC,EAAAI,OAAAd,OAAAL,GACAuC,GAAAC,aAAAxC,mBAKJiB,KAAAC,MAAAM,0BAIA,OAAA,4BAIF,SAAAN,8BAIFH,EAAA0B,aAAAC,EAAAA,sJAWJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../react/jsx-runtime.js");var e=require("react"),t=require("../context/LayoutGroupContext.mjs.js"),o=require("../context/LazyContext.mjs.js"),s=require("../context/MotionConfigContext.mjs.js"),n=require("../context/MotionContext/index.mjs.js"),r=require("../context/MotionContext/create.mjs.js"),i=require("../render/dom/use-render.mjs.js"),u=require("../render/dom/utils/is-svg-component.mjs.js"),a=require("../render/html/use-html-visual-state.mjs.js"),l=require("../render/svg/use-svg-visual-state.mjs.js"),m=require("../utils/use-constant.mjs.js"),d=require("./features/definitions.mjs.js"),c=require("./features/load-features.mjs.js"),j=require("./utils/symbol.mjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../react/jsx-runtime.js");var e=require("react"),t=require("../context/LayoutGroupContext.mjs.js"),o=require("../context/LazyContext.mjs.js"),s=require("../context/MotionConfigContext.mjs.js"),n=require("../context/MotionContext/index.mjs.js"),r=require("../context/MotionContext/create.mjs.js"),i=require("../render/dom/use-render.mjs.js"),u=require("../render/dom/utils/is-svg-component.mjs.js"),a=require("../render/html/use-html-visual-state.mjs.js"),l=require("../render/svg/use-svg-visual-state.mjs.js"),m=require("../utils/use-constant.mjs.js"),d=require("./features/definitions.mjs.js"),c=require("./features/load-features.mjs.js"),j=require("./utils/symbol.mjs.js"),p=require("./utils/use-motion-ref.mjs.js"),x=require("./utils/use-visual-element.mjs.js"),f=require("../../../../motion-dom/dist/es/projection/node/root.mjs.js"),v=require("../../../../../_virtual/jsx-runtime.js"),y=require("../../../../motion-utils/dist/es/warn-once.mjs.js"),q=require("../../../../motion-utils/dist/es/errors.mjs.js");exports.createMotionComponent=function(C,{forwardMotionProps:M=!1,type:E}={},g,L){g&&c.loadFeatures(g);const N=E?"svg"===E:u.isSVGComponent(C),b=N?l.useSVGVisualState:a.useHTMLVisualState;function h(u,a){let l;const c=function({layoutId:o}){const s=e.useContext(t.LayoutGroupContext).id;return s&&void 0!==o?s+"-"+o:o}(u);m.useConstant(()=>!!f.rootProjectionNode.current?.sharedNodes.get(c)?.lead&&u.initial)&&(u={...u,initial:!1});const j={...e.useContext(s.MotionConfigContext),...u,layoutId:c},{isStatic:E,isValidProp:h}=j,w=r.useCreateMotionContext(u),P=b(u,E);if(!E&&"undefined"!=typeof window){!function(t,s){const n=e.useContext(o.LazyContext).strict;if("production"!==process.env.NODE_ENV&&s&&n){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead";t.ignoreStrict?y.warnOnce(!1,e+'. For Reorder, import it from "motion/react-m"',"lazy-strict-mode"):q.invariant(!1,e,"lazy-strict-mode")}}(j,g);const t=function(e){const t=d.getInitializedFeatureDefinitions(),{drag:o,layout:s}=t;if(!o&&!s)return{};const n={...o,...s};return{MeasureLayout:n.MeasureLayout,isEnabled:o?.isEnabled(e)||s?.isEnabled(e),ProjectionNode:n.ProjectionNode}}(j);w.visualElement=x.useVisualElement(C,P,j,L,t.ProjectionNode,N),(t.isEnabled||w.visualElement?.projection?.options.layoutId)&&(l=t.MeasureLayout)}return v.exports.jsxs(n.MotionContext.Provider,{value:w,children:[l&&w.visualElement?v.exports.jsx(l,{visualElement:w.visualElement,...j}):null,i.useRender(C,u,p.useMotionRef(P,w.visualElement,a),P,E,M,N,h)]})}h.displayName=`motion.${"string"==typeof C?C:`create(${C.displayName??C.name??""})`}`;const w=e.forwardRef(h);return w[j.motionComponentSymbol]=C,w};
|
|
2
2
|
//# sourceMappingURL=index.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/motion/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { rootProjectionNode } from 'motion-dom';\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/motion/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { rootProjectionNode } from 'motion-dom';\nimport { warnOnce, 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 { useRender } from '../render/dom/use-render.mjs';\nimport { isSVGComponent } from '../render/dom/utils/is-svg-component.mjs';\nimport { useHTMLVisualState } from '../render/html/use-html-visual-state.mjs';\nimport { useSVGVisualState } from '../render/svg/use-svg-visual-state.mjs';\nimport { useConstant } from '../utils/use-constant.mjs';\nimport { getInitializedFeatureDefinitions } 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 createMotionComponent(Component, { forwardMotionProps = false, type } = {}, preloadedFeatures, createVisualElement) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n /**\n * Determine whether to use SVG or HTML rendering based on:\n * 1. Explicit `type` option (highest priority)\n * 2. Auto-detection via `isSVGComponent`\n */\n const isSVG = type ? type === \"svg\" : isSVGComponent(Component);\n const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState;\n function MotionDOMComponent(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 layoutId = useLayoutId(props);\n /**\n * An element that mounts with the layoutId of one that's already\n * rendered takes over from it with a shared layout animation, so\n * visually it has already entered. Mount it as if initial={false}\n * rather than replaying its entrance.\n *\n * Only when it has an initial: without one there's no entrance to\n * skip, and initial={false} would make its animate values its base\n * values, so removing them later wouldn't return it to its defaults.\n */\n if (useConstant(() => !!rootProjectionNode.current?.sharedNodes.get(layoutId)\n ?.lead && props.initial)) {\n props = { ...props, initial: false };\n }\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId,\n };\n const { isStatic, isValidProp } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && typeof window !== \"undefined\") {\n useStrictMode(configAndProps, preloadedFeatures);\n const layoutProjection = getProjectionFunctionality(configAndProps);\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, isSVG);\n /**\n * Keep measuring for the render that removes a layoutId, so the\n * node can leave its stack.\n */\n if (layoutProjection.isEnabled ||\n context.visualElement?.projection?.options.layoutId)\n MeasureLayout = layoutProjection.MeasureLayout;\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, forwardMotionProps, isSVG, isValidProp)] }));\n }\n MotionDOMComponent.displayName = `motion.${typeof Component === \"string\"\n ? Component\n : `create(${Component.displayName ?? Component.name ?? \"\"})`}`;\n const ForwardRefMotionComponent = forwardRef(MotionDOMComponent);\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 /**\n * `ignoreStrict` is set by the main `Reorder`, which renders `motion`\n * on every render of every item, so warn once and point to the\n * `Reorder` that renders `m`.\n */\n configAndProps.ignoreStrict\n ? warnOnce(false, strictMessage +\n '. For Reorder, import it from \"motion/react-m\"', \"lazy-strict-mode\")\n : invariant(false, strictMessage, \"lazy-strict-mode\");\n }\n}\nfunction getProjectionFunctionality(props) {\n const featureDefinitions = getInitializedFeatureDefinitions();\n const { drag, layout } = featureDefinitions;\n if (!drag && !layout)\n return {};\n const combined = { ...drag, ...layout };\n return {\n MeasureLayout: combined.MeasureLayout,\n isEnabled: drag?.isEnabled(props) || layout?.isEnabled(props),\n ProjectionNode: combined.ProjectionNode,\n };\n}\n\nexport { createMotionComponent };\n//# sourceMappingURL=index.mjs.map\n"],"names":["preloadedFeatures","loadFeatures","isSVG","type","isSVGComponent","Component","MotionDOMComponent","props","externalRef","MeasureLayout","layoutId","layoutGroupId","undefined","useLayoutId","useConstant","rootProjectionNode","current","sharedNodes","get","lead","initial","configAndProps","isStatic","isValidProp","context","useCreateMotionContext","process","env","NODE_ENV","isStrict","ignoreStrict","warnOnce","strictMessage","useStrictMode","layoutProjection","featureDefinitions","getInitializedFeatureDefinitions","drag","layout","isEnabled","getProjectionFunctionality","visualElement","useVisualElement","visualState","createVisualElement","ProjectionNode","projection","options","jsxs","exports","MotionContext","Provider","value","children","jsx","useRender","useMotionRef","forwardMotionProps","displayName","name","ForwardRefMotionComponent","forwardRef","motionComponentSymbol"],"mappings":"4pCAiFIA,GAAAC,EAAAA,aAAAD,GAOA,MAAAE,EAAAC,EAAAC,QAAAD,EAAAC,EAAAA,eAAAC,gDAGA,SAAAC,EAAAC,EAAAC,GAQI,IAAAC,EAEA,MAAAC,EA0GR,UAAAA,SAAAA,kDAEI,OAAAC,QAAAC,IAAAF,EACIC,EAAAD,IAAAA,GAER,CA/GQG,CAAAN,GAYAO,cAAAC,MAAAA,EAAAA,mBAAAC,SAAAC,YAAAC,IAAAR,IAIgBS,MAAAZ,EAAAa,gCAMhB,MAAAC,EAAA,2CAEId,eAIJe,SAAAA,EAAAC,YAAAA,GAAAF,EAEAG,EAAAC,yBAAAlB,gDAmFR,SAAAc,EAAArB,8CAUI,GAAA,eAAA0B,QAAAC,IAAAC,aAGIC,EAAA,2JAUAR,EAAAS,aACIC,YAAA,EAAAC,4GAQZ,CA9GYC,CAAAZ,EAAArB,GAEA,MAAAkC,EA8GZ,SAAA3B,GACI,MAAA4B,EAAAC,EAAAA,oCACAC,KAAAA,EAAAC,OAAAA,GAAAH,EAEA,IAAAE,IAAAC,EAAsB,MAAA,CAAA,2DAMlBC,UAAAF,GAAAE,UAAAhC,IAAA+B,GAAAC,UAAAhC,mCAGR,CA3HYiC,CAAAnB,GAQAG,EAAAiB,cAAAC,mBAAArC,EAAAsC,EAAAtB,EAAAuB,EAAAV,EAAAW,eAAA3C,IAeIsB,EAAAA,WAAAA,EAAAiB,eAAAK,YAAAC,QAAArC,YAEAD,EAAAyB,EAAAzB,eAOR,OAAAuC,EAAAC,QAAAD,KAAAE,EAAAA,cAAAC,SAAA,CAAAC,MAAA5B,EAAA6B,SAAA,CAAA5C,GAAAe,EAAAiB,cAAAa,EAAAA,QAAAA,IAAA7C,EAAA,CAAAgC,cAAAjB,EAAAiB,iBAAApB,IAAAkC,KAAAA,EAAAA,UAAAlD,EAAAE,EAAAiD,EAAAA,aAAAb,EAAAnB,EAAAiB,cAAAjC,GAAAmC,EAAArB,EAAAmC,EAAAvD,EAAAqB,MAyBJjB,EAAAoD,YAAArD,2BAAAA,EAEQA,EACA,UAAAA,EAAAqD,aAAArD,EAAAsD,MAAA,QAGR,MAAAC,EAAAC,aAAAvD,GAGA,OAFEsD,EAAAE,EAAAA,uBAAAzD,EAEFuD,CACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../../context/LazyContext.mjs.js"),n=require("../../context/MotionConfigContext.mjs.js"),o=require("../../context/MotionContext/index.mjs.js"),i=require("../../context/PresenceContext.mjs.js"),r=require("../../context/SwitchLayoutGroupContext.mjs.js"),s=require("../../utils/use-isomorphic-effect.mjs.js"),a=require("../../../../../motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js");exports.useVisualElement=function(u,c,m,d,p,C){const{visualElement:f}=e.useContext(o.MotionContext),x=e.useContext(t.LazyContext),l=e.useContext(i.PresenceContext),j=e.useContext(n.MotionConfigContext),M=j.reducedMotion,h=j.skipAnimations,w=e.useRef(null),y=e.useRef(!1);d=d||x.renderer,!w.current&&d&&(w.current=d(u,{visualState:c,parent:f,props:m,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:M,skipAnimations:h,isSVG:C}),y.current&&w.current&&(w.current.manuallyAnimateOnMount=!0));const g=w.current,q=e.useContext(r.SwitchLayoutGroupContext);!g||g.projection||!p||"html"!==g.type&&"svg"!==g.type||p.create(g,m,q),e.useInsertionEffect(()=>{g&&g.props!==m&&g.update(m,l)});const S=m[a.optimizedAppearDataAttribute],A=e.useRef(Boolean(S)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(S)&&window.MotionHasOptimisedAnimation?.(S));return s.useIsomorphicLayoutEffect(()=>{y.current&&g&&(g.animationState?.animateChanges(),g.enteringChildren=void 0)},[]),s.useIsomorphicLayoutEffect(()=>{y.current=!0,g&&(window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),A.current&&g.animationState&&g.animationState.animateChanges())}),e.useEffect(()=>{g&&(!A.current&&g.animationState&&g.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(S)}),A.current=!1),g.enteringChildren=void 0)}),g};
|
|
2
2
|
//# sourceMappingURL=use-visual-element.mjs.js.map
|