@nethesis/phone-island 1.0.14-dev.1 → 1.0.15
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 +1 -1
- package/dist/App.js.map +1 -1
- package/dist/components/AlertGuard.js +1 -1
- package/dist/components/AlertGuard.js.map +1 -1
- package/dist/components/AlertView/index.js +1 -1
- package/dist/components/AlertView/index.js.map +1 -1
- package/dist/components/AudioBars.js +1 -1
- package/dist/components/AudioBars.js.map +1 -1
- package/dist/components/AudioPlayerView/Avatar.js +1 -1
- package/dist/components/AudioPlayerView/Avatar.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 +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/AvatarGroup.js +1 -1
- package/dist/components/AvatarGroup.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/Avatar.js +1 -1
- package/dist/components/CallView/Avatar.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/DisplayName.js +1 -1
- package/dist/components/CallView/DisplayName.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/Timer.js +1 -1
- package/dist/components/CallView/Timer.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/ListAvatar.js +1 -1
- package/dist/components/ContactView/ListAvatar.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/CustomThemedTooltip.js +1 -1
- package/dist/components/CustomThemedTooltip.js.map +1 -1
- package/dist/components/Dropdown.js +1 -1
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/Hangup.js +1 -1
- package/dist/components/Hangup.js.map +1 -1
- package/dist/components/Island.js +1 -1
- package/dist/components/Island.js.map +1 -1
- package/dist/components/IslandDrag.js +1 -1
- package/dist/components/IslandDrag.js.map +1 -1
- package/dist/components/IslandMotion.js +1 -1
- package/dist/components/IslandMotion.js.map +1 -1
- package/dist/components/KeypadView/Actions.js +1 -1
- package/dist/components/KeypadView/Actions.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/PhysicalRecordingTimer.js +1 -1
- package/dist/components/PhysicalRecorderView/PhysicalRecordingTimer.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/Bar.js +1 -1
- package/dist/components/RecorderView/Bar.js.map +1 -1
- package/dist/components/RecorderView/BarsGroup.js +1 -1
- package/dist/components/RecorderView/BarsGroup.js.map +1 -1
- package/dist/components/RecorderView/Timer.js +1 -1
- package/dist/components/RecorderView/Timer.js.map +1 -1
- package/dist/components/RecorderView/index.js +1 -1
- package/dist/components/RecorderView/index.js.map +1 -1
- package/dist/components/RestAPI.js +1 -1
- package/dist/components/RestAPI.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/VideoInputView.js +1 -1
- package/dist/components/SettingsView/VideoInputView.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/components/SideViewButton.js +1 -1
- package/dist/components/SideView/components/SideViewButton.js.map +1 -1
- package/dist/components/SideView/hooks/useSideViewLogic.js +1 -1
- package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
- package/dist/components/Socket.js +1 -1
- package/dist/components/Socket.js.map +1 -1
- package/dist/components/StreamingAnswerView/index.js +1 -1
- package/dist/components/StreamingAnswerView/index.js.map +1 -1
- package/dist/components/StreamingImage/index.js +1 -1
- package/dist/components/StreamingImage/index.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/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/TransferButton.js +1 -1
- package/dist/components/TransferButton.js.map +1 -1
- package/dist/components/VideoView/index.js +1 -1
- package/dist/components/VideoView/index.js.map +1 -1
- package/dist/components/ViewsTransition.js +1 -1
- package/dist/components/ViewsTransition.js.map +1 -1
- package/dist/components/WebRTC.js +1 -1
- package/dist/components/WebRTC.js.map +1 -1
- package/dist/events/CallEvents.js +1 -1
- package/dist/events/CallEvents.js.map +1 -1
- package/dist/events/PlayerEvents.js +1 -1
- package/dist/events/PlayerEvents.js.map +1 -1
- package/dist/events/RecorderEvents.js +1 -1
- package/dist/events/RecorderEvents.js.map +1 -1
- package/dist/lib/avatars/avatars.js +1 -1
- package/dist/lib/avatars/avatars.js.map +1 -1
- package/dist/lib/devices/devices.js +1 -1
- package/dist/lib/devices/devices.js.map +1 -1
- package/dist/lib/phone/audio.js +1 -1
- package/dist/lib/phone/audio.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/queue.js +1 -1
- package/dist/lib/phone/queue.js.map +1 -1
- package/dist/lib/player/audio.js +1 -1
- package/dist/lib/player/audio.js.map +1 -1
- package/dist/lib/user/extensions.js +1 -1
- package/dist/lib/user/extensions.js.map +1 -1
- package/dist/lib/webrtc/janus.js +1 -1
- package/dist/lib/webrtc/janus.js.map +1 -1
- package/dist/lib/webrtc/messages.js +1 -1
- package/dist/lib/webrtc/messages.js.map +1 -1
- package/dist/models/conference.js +1 -1
- package/dist/models/conference.js.map +1 -1
- package/dist/models/currentCall.js +1 -1
- package/dist/models/currentCall.js.map +1 -1
- package/dist/models/mediaDevices.js +1 -1
- package/dist/models/mediaDevices.js.map +1 -1
- package/dist/models/player.js +1 -1
- package/dist/models/player.js.map +1 -1
- package/dist/models/queue.js +1 -1
- package/dist/models/queue.js.map +1 -1
- package/dist/models/ringtones.js +1 -1
- package/dist/models/ringtones.js.map +1 -1
- package/dist/models/streaming.js +1 -1
- package/dist/models/streaming.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js.map +1 -1
- package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +1 -1
- package/dist/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +1 -1
- package/dist/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js.map +1 -1
- package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js +1 -1
- package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js.map +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js.map +1 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.mjs.js +1 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.mjs.js.map +1 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs.js +1 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs.js.map +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs.js +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs.js.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js.map +1 -1
- package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.mjs.js +1 -1
- package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.mjs.js.map +1 -1
- package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js +1 -1
- package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/description/description.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/description/description.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/label/label.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/label/label.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/portal/portal.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/portal/portal.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-document-event.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-document-event.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-handle-toggle.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-handle-toggle.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-is-mounted.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-is-mounted.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-is-top-layer.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-is-top-layer.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-on-disappear.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-on-disappear.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-on-unmount.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-on-unmount.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-outside-click.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-outside-click.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-text-value.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-text-value.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-window-event.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-window-event.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/disabled.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/floating.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/floating.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/id.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/machine.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/machine.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/machines/stack-machine.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/machines/stack-machine.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/react-glue.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/react-glue.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/bugs.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/default-map.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/element-movement.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/element-movement.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/env.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/get-text-value.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/get-text-value.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/match.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/match.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/owner.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/render.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/render.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/store.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/store.js.map +1 -1
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js +1 -1
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js +1 -1
- package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.mjs.js +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.mjs.js +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.mjs.js +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useHover.mjs.js +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useHover.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/utils.mjs.js +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/utils.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/domHelpers.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/platform.mjs.js +1 -1
- package/dist/node_modules/@react-aria/utils/dist/platform.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/runAfterTransition.mjs.js +1 -1
- package/dist/node_modules/@react-aria/utils/dist/runAfterTransition.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useId.mjs.js +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useId.mjs.js.map +1 -1
- package/dist/node_modules/@rematch/core/dist/core.esm.js +1 -1
- package/dist/node_modules/@rematch/core/dist/core.esm.js.map +1 -1
- package/dist/node_modules/@rematch/immer/dist/immer.esm.js +1 -1
- package/dist/node_modules/@rematch/immer/dist/immer.esm.js.map +1 -1
- package/dist/node_modules/@rematch/select/dist/select.esm.js +1 -1
- package/dist/node_modules/@rematch/select/dist/select.esm.js.map +1 -1
- package/dist/node_modules/bowser/es5.js +1 -1
- package/dist/node_modules/bowser/es5.js.map +1 -1
- package/dist/node_modules/ebml-block/index.js +1 -1
- package/dist/node_modules/ebml-block/index.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/contrib/parseuri.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/contrib/parseuri.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/socket.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/socket.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/polling.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/polling.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/websocket.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/websocket.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/util.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/util.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/commons.js +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/commons.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/decodePacket.browser.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/index.js +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/index.js.map +1 -1
- package/dist/node_modules/events/events.js +1 -1
- package/dist/node_modules/events/events.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/components/AnimatePresence/PresenceChild.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.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/PanSession.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/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/features/viewport/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.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/use-visual-state.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.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/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js +1 -1
- package/dist/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js.map +1 -1
- package/dist/node_modules/immer/dist/immer.esm.mjs.js +1 -1
- package/dist/node_modules/immer/dist/immer.esm.mjs.js.map +1 -1
- package/dist/node_modules/int64-buffer/int64-buffer.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/mic-check/lib/index.js.map +1 -1
- package/dist/node_modules/mic-check/lib/requestMediaPermissions.js +1 -1
- package/dist/node_modules/mic-check/lib/requestMediaPermissions.js.map +1 -1
- package/dist/node_modules/moment/moment.js +1 -1
- package/dist/node_modules/moment/moment.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.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +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/motion-value.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.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/interfaces/visual-element-variant.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.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 +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/offsets/time.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.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/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/frameloop/batcher.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.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/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/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/shared/stack.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.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/DOMVisualElement.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +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/dom/utils/camel-to-dash.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.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/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/render/utils/is-controlling-variants.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +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/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 +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/utils/supports/linear-easing.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.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/hsla.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.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/complex/mask.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/errors.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/progress.mjs.js.map +1 -1
- package/dist/node_modules/object-assign/index.js +1 -1
- package/dist/node_modules/object-assign/index.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +1 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.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/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/node_modules/react-moment/dist/index.js +1 -1
- package/dist/node_modules/react-moment/dist/index.js.map +1 -1
- package/dist/node_modules/react-redux/es/components/Context.js +1 -1
- package/dist/node_modules/react-redux/es/components/Context.js.map +1 -1
- package/dist/node_modules/react-redux/es/components/Provider.js +1 -1
- package/dist/node_modules/react-redux/es/components/Provider.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useSelector.js.map +1 -1
- package/dist/node_modules/react-redux/es/utils/Subscription.js +1 -1
- package/dist/node_modules/react-redux/es/utils/Subscription.js.map +1 -1
- package/dist/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js +1 -1
- package/dist/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/node_modules/react-redux/es/utils/useSyncExternalStore.js.map +1 -1
- package/dist/node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/react-redux/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js +1 -1
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js.map +1 -1
- package/dist/node_modules/redux/es/redux.js +1 -1
- package/dist/node_modules/redux/es/redux.js.map +1 -1
- package/dist/node_modules/reselect/es/defaultMemoize.js +1 -1
- package/dist/node_modules/reselect/es/defaultMemoize.js.map +1 -1
- package/dist/node_modules/reselect/es/index.js +1 -1
- package/dist/node_modules/reselect/es/index.js.map +1 -1
- package/dist/node_modules/sdp/sdp.js +1 -1
- package/dist/node_modules/sdp/sdp.js.map +1 -1
- package/dist/node_modules/socket.io-client/build/esm/manager.js +1 -1
- package/dist/node_modules/socket.io-client/build/esm/manager.js.map +1 -1
- package/dist/node_modules/socket.io-client/build/esm/socket.js +1 -1
- package/dist/node_modules/socket.io-client/build/esm/socket.js.map +1 -1
- package/dist/node_modules/socket.io-parser/build/esm/is-binary.js +1 -1
- package/dist/node_modules/socket.io-parser/build/esm/is-binary.js.map +1 -1
- package/dist/node_modules/styled-components/dist/styled-components.browser.esm.js +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +1 -1
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +2 -2
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +2 -2
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLDecoder.js +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLDecoder.js.map +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLEncoder.js +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLEncoder.js.map +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLReader.js +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLReader.js.map +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/ebmlID.js.map +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/index.js.map +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/tools-ebml.js +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/tools-ebml.js.map +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/tools.js +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/tools.js.map +1 -1
- package/dist/node_modules/webm-duration-fix/lib/index.js +1 -1
- package/dist/node_modules/webm-duration-fix/lib/index.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/common_shim.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/common_shim.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/utils.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/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/history_call.js +1 -1
- package/dist/services/history_call.js.map +1 -1
- package/dist/services/offhour.js +1 -1
- package/dist/services/offhour.js.map +1 -1
- package/dist/services/phonebook.js +1 -1
- package/dist/services/phonebook.js.map +1 -1
- package/dist/services/user.js +1 -1
- package/dist/services/user.js.map +1 -1
- package/dist/services/voicemail.js +1 -1
- package/dist/services/voicemail.js.map +1 -1
- package/dist/store/index.js +1 -1
- package/dist/store/index.js.map +1 -1
- package/dist/styles/Island.styles.js +1 -1
- package/dist/styles/Island.styles.js.map +1 -1
- package/dist/utils/customHooks/useCommittedRef.js +1 -1
- package/dist/utils/customHooks/useCommittedRef.js.map +1 -1
- package/dist/utils/customHooks/useEventCallback.js +1 -1
- package/dist/utils/customHooks/useEventCallback.js.map +1 -1
- package/dist/utils/customHooks/useEventListener.js +1 -1
- package/dist/utils/customHooks/useEventListener.js.map +1 -1
- package/dist/utils/customHooks/useIntersectionObserver.js +1 -1
- package/dist/utils/customHooks/useIntersectionObserver.js.map +1 -1
- package/dist/utils/customHooks/useLocalStorage.js +1 -1
- package/dist/utils/customHooks/useLocalStorage.js.map +1 -1
- package/dist/utils/customHooks/useLongPress.js +1 -1
- package/dist/utils/customHooks/useLongPress.js.map +1 -1
- package/dist/utils/deviceUtils.js +1 -1
- package/dist/utils/deviceUtils.js.map +1 -1
- package/dist/utils/genericFunctions/checkConnection.js +1 -1
- package/dist/utils/genericFunctions/checkConnection.js.map +1 -1
- package/dist/utils/genericFunctions/isBackCallVisible.js +1 -1
- package/dist/utils/genericFunctions/isBackCallVisible.js.map +1 -1
- package/dist/utils/genericFunctions/withTimeout.js +1 -1
- package/dist/utils/genericFunctions/withTimeout.js.map +1 -1
- package/dist/utils/streaming/getStreamingSourceId.js +1 -1
- package/dist/utils/streaming/getStreamingSourceId.js.map +1 -1
- package/dist/utils/streaming/isFromStreaming.js +1 -1
- package/dist/utils/streaming/isFromStreaming.js.map +1 -1
- package/dist/utils/streaming/streamingUtils.js +1 -1
- package/dist/utils/streaming/streamingUtils.js.map +1 -1
- package/dist/workers/wake_up.js +1 -1
- package/dist/workers/wake_up.js.map +1 -1
- package/package.json +1 -1
package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scale-border-radius.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs"],"sourcesContent":["import { px } from '../../value/types/numbers/units.mjs';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n//# sourceMappingURL=scale-border-radius.mjs.map\n"],"names":["pixelsToPercent","pixels","axis","max","min","correctBorderRadius","correct","latest","node","target","px","test","parseFloat","x","y"],"mappings":"4HAIM,SAAUA,EAAgBC,EAAgBC,GAC5C,OAAIA,EAAKC,MAAQD,EAAKE,IAAY,EAC1BH,GAAUC,EAAKC,IAAMD,EAAKE,KAAQ,GAC9C,CASO,MAAMC,EAAgD,CACzDC,QAASA,CAACC,EAAQC,KACd,IAAKA,EAAKC,OAAQ,OAAOF,EAMzB,GAAsB,iBAAXA,EAAqB,CAC5B,IAAIG,EAAEA,GAACC,KAAKJ,GAGR,OAAOA,EAFPA,EAASK,WAAWL,EAI5B,CASA,MAAO,GAHGP,EAAgBO,EAAQC,EAAKC,OAAOI,OACpCb,EAAgBO,EAAQC,EAAKC,OAAOK
|
|
1
|
+
{"version":3,"file":"scale-border-radius.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs"],"sourcesContent":["import { px } from '../../value/types/numbers/units.mjs';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n//# sourceMappingURL=scale-border-radius.mjs.map\n"],"names":["pixelsToPercent","pixels","axis","max","min","correctBorderRadius","correct","latest","node","target","px","test","parseFloat","x","y"],"mappings":"4HAIM,SAAUA,EAAgBC,EAAgBC,GAC5C,OAAIA,EAAKC,MAAQD,EAAKE,IAAY,EAC1BH,GAAUC,EAAKC,IAAMD,EAAKE,KAAQ,GAC9C,CASO,MAAMC,EAAgD,CACzDC,QAASA,CAACC,EAAQC,KACd,IAAKA,EAAKC,OAAQ,OAAOF,EAMzB,GAAsB,iBAAXA,EAAqB,CAC5B,IAAIG,EAAEA,GAACC,KAAKJ,GAGR,OAAOA,EAFPA,EAASK,WAAWL,EAI5B,CASA,MAAO,GAHGP,EAAgBO,EAAQC,EAAKC,OAAOI,OACpCb,EAAgBO,EAAQC,EAAKC,OAAOK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scale-box-shadow.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs"],"sourcesContent":["import { complex } from '../../value/types/complex/index.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n//# sourceMappingURL=scale-box-shadow.mjs.map\n"],"names":["correctBoxShadow","correct","latest","_ref","treeScale","projectionDelta","original","shadow","complex","parse","length","template","createTransformer","offset","xScale","x","scale","yScale","y","averageScale","mixNumber"],"mappings":"uKAIO,MAAMA,EAA6C,CACtDC,QAASA,CAACC,EAAcC,KAAoC,IAAlCC,UAAEA,EAASC,gBAAEA,GAAiBF,EACpD,MAAMG,EAAWJ,EACXK,EAASC,EAAAA,QAAQC,MAAMP,GAG7B,GAAIK,EAAOG,OAAS,EAAG,OAAOJ,EAE9B,MAAMK,EAAWH,EAAAA,QAAQI,kBAAkBV,GACrCW,EAA8B,iBAAdN,EAAO,GAAkB,EAAI,EAG7CO,EAAST,EAAiBU,EAAEC,MAAQZ,EAAWW,EAC/CE,EAASZ,EAAiBa,EAAEF,MAAQZ,EAAWc,EAGnDX,EAAO,EAAIM,IAAsBC,EACjCP,EAAO,EAAIM,IAAsBI,EAQnC,MAAME,EAAeC,EAASA,UAACN,EAAQG,EAAQ,IAU/C,MAPkC,iBAAvBV,EAAO,EAAIM,KACjBN,EAAO,EAAIM,IAAsBM,GAGJ,iBAAvBZ,EAAO,EAAIM,KACjBN,EAAO,EAAIM,IAAsBM,GAE/BR,EAASJ
|
|
1
|
+
{"version":3,"file":"scale-box-shadow.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs"],"sourcesContent":["import { complex } from '../../value/types/complex/index.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n//# sourceMappingURL=scale-box-shadow.mjs.map\n"],"names":["correctBoxShadow","correct","latest","_ref","treeScale","projectionDelta","original","shadow","complex","parse","length","template","createTransformer","offset","xScale","x","scale","yScale","y","averageScale","mixNumber"],"mappings":"uKAIO,MAAMA,EAA6C,CACtDC,QAASA,CAACC,EAAcC,KAAoC,IAAlCC,UAAEA,EAASC,gBAAEA,GAAiBF,EACpD,MAAMG,EAAWJ,EACXK,EAASC,EAAAA,QAAQC,MAAMP,GAG7B,GAAIK,EAAOG,OAAS,EAAG,OAAOJ,EAE9B,MAAMK,EAAWH,EAAAA,QAAQI,kBAAkBV,GACrCW,EAA8B,iBAAdN,EAAO,GAAkB,EAAI,EAG7CO,EAAST,EAAiBU,EAAEC,MAAQZ,EAAWW,EAC/CE,EAASZ,EAAiBa,EAAEF,MAAQZ,EAAWc,EAGnDX,EAAO,EAAIM,IAAsBC,EACjCP,EAAO,EAAIM,IAAsBI,EAQnC,MAAME,EAAeC,EAASA,UAACN,EAAQG,EAAQ,IAU/C,MAPkC,iBAAvBV,EAAO,EAAIM,KACjBN,EAAO,EAAIM,IAAsBM,GAGJ,iBAAvBZ,EAAO,EAAIM,KACjBN,EAAO,EAAIM,IAAsBM,GAE/BR,EAASJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../animation/keyframes/KeyframesResolver.mjs.js"),t=require("../animation/NativeAnimation.mjs.js"),s=require("../animation/waapi/utils/accelerated-values.mjs.js"),i=require("../frameloop/microtask.mjs.js"),r=require("../frameloop/sync-time.mjs.js"),n=require("../projection/geometry/models.mjs.js"),o=require("../value/index.mjs.js"),a=require("../value/types/complex/index.mjs.js"),h=require("../value/types/utils/animatable-none.mjs.js"),u=require("../value/types/utils/find.mjs.js"),l=require("../value/utils/is-motion-value.mjs.js"),d=require("./store.mjs.js"),p=require("./utils/is-controlling-variants.mjs.js"),c=require("./utils/keys-transform.mjs.js"),m=require("./utils/motion-values.mjs.js"),v=require("./utils/reduced-motion/index.mjs.js"),f=require("./utils/resolve-variants.mjs.js"),V=require("./utils/reduced-motion/state.mjs.js"),g=require("../frameloop/frame.mjs.js"),j=require("../../../../motion-utils/dist/es/warn-once.mjs.js"),M=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),C=require("../../../../motion-utils/dist/es/is-numerical-string.mjs.js"),y=require("../../../../motion-utils/dist/es/is-zero-value-string.mjs.js"),S=require("../../../../motion-utils/dist/es/subscription-manager.mjs.js");const b=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let q={};exports.VisualElement=class{scrapeMotionValuesFromProps(e,t,s){return{}}constructor(t){let{parent:s,props:i,presenceContext:n,reducedMotionConfig:o,skipAnimations:a,blockInitialAnimation:h,visualState:u}=t,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=e.KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=r.time.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,g.frame.render(this.render,!1,!0))};const{latestValues:c,renderState:m}=u;this.latestValues=c,this.baseTarget={...c},this.initialValues=i.initial?{...c}:{},this.renderState=m,this.parent=s,this.props=i,this.presenceContext=n,this.depth=s?s.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=a,this.options=d,this.blockInitialAnimation=Boolean(h),this.isControllingVariants=p.isControllingVariants(i),this.isVariantNode=p.isVariantNode(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(s&&s.current);const{willChange:v,...f}=this.scrapeMotionValuesFromProps(i,{},this);for(const e in f){const t=f[e];void 0!==c[e]&&l.isMotionValue(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(const e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,d.visualElementStore.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../animation/keyframes/KeyframesResolver.mjs.js"),t=require("../animation/NativeAnimation.mjs.js"),s=require("../animation/waapi/utils/accelerated-values.mjs.js"),i=require("../frameloop/microtask.mjs.js"),r=require("../frameloop/sync-time.mjs.js"),n=require("../projection/geometry/models.mjs.js"),o=require("../value/index.mjs.js"),a=require("../value/types/complex/index.mjs.js"),h=require("../value/types/utils/animatable-none.mjs.js"),u=require("../value/types/utils/find.mjs.js"),l=require("../value/utils/is-motion-value.mjs.js"),d=require("./store.mjs.js"),p=require("./utils/is-controlling-variants.mjs.js"),c=require("./utils/keys-transform.mjs.js"),m=require("./utils/motion-values.mjs.js"),v=require("./utils/reduced-motion/index.mjs.js"),f=require("./utils/resolve-variants.mjs.js"),V=require("./utils/reduced-motion/state.mjs.js"),g=require("../frameloop/frame.mjs.js"),j=require("../../../../motion-utils/dist/es/warn-once.mjs.js"),M=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),C=require("../../../../motion-utils/dist/es/is-numerical-string.mjs.js"),y=require("../../../../motion-utils/dist/es/is-zero-value-string.mjs.js"),S=require("../../../../motion-utils/dist/es/subscription-manager.mjs.js");const b=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let q={};exports.VisualElement=class{scrapeMotionValuesFromProps(e,t,s){return{}}constructor(t){let{parent:s,props:i,presenceContext:n,reducedMotionConfig:o,skipAnimations:a,blockInitialAnimation:h,visualState:u}=t,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=e.KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=r.time.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,g.frame.render(this.render,!1,!0))};const{latestValues:c,renderState:m}=u;this.latestValues=c,this.baseTarget={...c},this.initialValues=i.initial?{...c}:{},this.renderState=m,this.parent=s,this.props=i,this.presenceContext=n,this.depth=s?s.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=a,this.options=d,this.blockInitialAnimation=Boolean(h),this.isControllingVariants=p.isControllingVariants(i),this.isVariantNode=p.isVariantNode(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(s&&s.current);const{willChange:v,...f}=this.scrapeMotionValuesFromProps(i,{},this);for(const e in f){const t=f[e];void 0!==c[e]&&l.isMotionValue(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(const e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,d.visualElementStore.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(V.hasReducedMotionListener.current||v.initPrefersReducedMotion(),this.shouldReduceMotion=V.prefersReducedMotion.current),"production"!==process.env.NODE_ENV&&j.warnOnce(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),g.cancelFrame(this.notifyUpdate),g.cancelFrame(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,i){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),i.accelerate&&s.acceleratedValues.has(e)&&this.current instanceof HTMLElement){const{factory:s,keyframes:r,times:n,ease:o,duration:a}=i.accelerate,h=new t.NativeAnimation({element:this.current,name:e,keyframes:r,times:n,ease:o,duration:M.secondsToMilliseconds(a)}),u=s(h);return void this.valueSubscriptions.set(e,()=>{u(),h.cancel()})}const r=c.transformProps.has(e);r&&this.onBindTransform&&this.onBindTransform();const n=i.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&g.frame.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,i)),this.valueSubscriptions.set(e,()=>{n(),o&&o()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in q){const t=q[e];if(!t)continue;const{isEnabled:s,Feature:i}=t;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):n.createBox()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<b.length;t++){const s=b[t];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i=e["on"+s];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=m.updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const s=this.values.get(e);t!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return void 0===s&&void 0!==t&&(s=o.motionValue(null===t?void 0:t,{owner:this}),this.addValue(e,s)),s}readValue(e,t){let s=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=s&&("string"==typeof s&&(C.isNumericalString(s)||y.isZeroValueString(s))?s=parseFloat(s):!u.findValueType(s)&&a.complex.test(t)&&(s=h.getAnimatableNone(e,t)),this.setBaseTarget(e,l.isMotionValue(s)?s.get():s)),l.isMotionValue(s)?s.get():s}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let s;if("string"==typeof t||"object"==typeof t){const i=f.resolveVariantFromProps(this.props,t,this.presenceContext?.custom);i&&(s=i[e])}if(t&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||l.isMotionValue(i)?void 0!==this.initialValues[e]&&void 0===s?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new S.SubscriptionManager),this.events[e].add(t)}notify(e){if(this.events[e]){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this.events[e].notify(...s)}}scheduleRenderMicrotask(){i.microtask.render(this.render)}},exports.getFeatureDefinitions=function(){return q},exports.setFeatureDefinitions=function(e){q=e};
|
|
2
2
|
//# sourceMappingURL=VisualElement.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualElement.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/render/VisualElement.mjs"],"sourcesContent":["import { warnOnce, secondsToMilliseconds, isNumericalString, isZeroValueString, SubscriptionManager } from 'motion-utils';\nimport { KeyframeResolver } from '../animation/keyframes/KeyframesResolver.mjs';\nimport { NativeAnimation } from '../animation/NativeAnimation.mjs';\nimport { acceleratedValues } from '../animation/waapi/utils/accelerated-values.mjs';\nimport { microtask } from '../frameloop/microtask.mjs';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { complex } from '../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../value/types/utils/animatable-none.mjs';\nimport { findValueType } from '../value/types/utils/find.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { transformProps } from './utils/keys-transform.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { initPrefersReducedMotion } from './utils/reduced-motion/index.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './utils/reduced-motion/state.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\n/**\n * Static feature definitions - can be injected by framework layer\n */\nlet featureDefinitions = {};\n/**\n * Set feature definitions for all VisualElements.\n * This should be called by the framework layer (e.g., framer-motion) during initialization.\n */\nfunction setFeatureDefinitions(definitions) {\n featureDefinitions = definitions;\n}\n/**\n * Get the current feature definitions\n */\nfunction getFeatureDefinitions() {\n return featureDefinitions;\n}\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * Decides whether animations should be skipped for this VisualElement.\n * Useful for E2E tests and visual regression testing.\n */\n this.shouldSkipAnimations = false;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n this.KeyframeResolver = KeyframeResolver;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * Track whether this element has been mounted before, to detect\n * remounts after Suspense unmount/remount cycles.\n */\n this.hasBeenMounted = false;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.renderScheduledAt = 0.0;\n this.scheduleRender = () => {\n const now = time.now();\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now;\n frame.render(this.render, false, true);\n }\n };\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.skipAnimationsConfig = skipAnimations;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key]);\n }\n }\n }\n mount(instance) {\n /**\n * If this element has been mounted before (e.g. after a Suspense\n * unmount/remount), reset motion values to their initial state\n * so animations replay correctly from initial → animate.\n */\n if (this.hasBeenMounted) {\n for (const key in this.initialValues) {\n this.values.get(key)?.jump(this.initialValues[key]);\n this.latestValues[key] = this.initialValues[key];\n }\n }\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n /**\n * Determine reduced motion preference. Only initialize the matchMedia\n * listener if we actually need the dynamic value (i.e., when config\n * is neither \"never\" nor \"always\").\n */\n if (this.reducedMotionConfig === \"never\") {\n this.shouldReduceMotion = false;\n }\n else if (this.reducedMotionConfig === \"always\") {\n this.shouldReduceMotion = true;\n }\n else {\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion = prefersReducedMotion.current;\n }\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\", \"reduced-motion-disabled\");\n }\n /**\n * Set whether animations should be skipped based on the config.\n */\n this.shouldSkipAnimations = this.skipAnimationsConfig ?? false;\n this.parent?.addChild(this);\n this.update(this.props, this.presenceContext);\n this.hasBeenMounted = true;\n }\n unmount() {\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent?.removeChild(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature) {\n feature.unmount();\n feature.isMounted = false;\n }\n }\n this.current = null;\n }\n addChild(child) {\n this.children.add(child);\n this.enteringChildren ?? (this.enteringChildren = new Set());\n this.enteringChildren.add(child);\n }\n removeChild(child) {\n this.children.delete(child);\n this.enteringChildren && this.enteringChildren.delete(child);\n }\n bindToMotionValue(key, value) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)();\n }\n if (value.accelerate &&\n acceleratedValues.has(key) &&\n this.current instanceof HTMLElement) {\n const { factory, keyframes, times, ease, duration } = value.accelerate;\n const animation = new NativeAnimation({\n element: this.current,\n name: key,\n keyframes,\n times,\n ease,\n duration: secondsToMilliseconds(duration),\n });\n const cleanup = factory(animation);\n this.valueSubscriptions.set(key, () => {\n cleanup();\n animation.cancel();\n });\n return;\n }\n const valueIsTransform = transformProps.has(key);\n if (valueIsTransform && this.onBindTransform) {\n this.onBindTransform();\n }\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n this.scheduleRender();\n });\n let removeSyncCheck;\n if (typeof window !== \"undefined\" &&\n window.MotionCheckAppearSync) {\n removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n }\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n if (removeSyncCheck)\n removeSyncCheck();\n // Defer to MotionValue.on(\"change\") auto-stop so React 19 remounts\n // can resubscribe before the animation is cancelled (#3315).\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n updateFeatures() {\n let key = \"animation\";\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key];\n if (!featureDefinition)\n continue;\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (!this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)) {\n this.features[key] = new FeatureConstructor(this);\n }\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = (\"on\" + key);\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key, target) {\n let value = this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : this.getBaseTargetFromProps(this.props, key) ??\n this.readValueFromInstance(this.current, key, this.options);\n if (value !== undefined && value !== null) {\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n scheduleRenderMicrotask() {\n microtask.render(this.render);\n }\n}\n\nexport { VisualElement, getFeatureDefinitions, setFeatureDefinitions };\n//# sourceMappingURL=VisualElement.mjs.map\n"],"names":["propEventHandlers","featureDefinitions","scrapeMotionValuesFromProps","_props","_prevProps","_visualElement","constructor","_ref","parent","props","presenceContext","reducedMotionConfig","skipAnimations","blockInitialAnimation","visualState","options","arguments","length","undefined","this","current","children","Set","isVariantNode","isControllingVariants","shouldReduceMotion","shouldSkipAnimations","values","Map","KeyframeResolver","features","valueSubscriptions","prevMotionValues","hasBeenMounted","events","propEventSubscriptions","notifyUpdate","notify","latestValues","render","triggerBuild","renderInstance","renderState","style","projection","renderScheduledAt","scheduleRender","now","time","frame","baseTarget","initialValues","initial","depth","skipAnimationsConfig","Boolean","checkIsControllingVariants","checkIsVariantNode","variantChildren","manuallyAnimateOnMount","willChange","initialMotionValues","key","value","isMotionValue","set","mount","instance","get","jump","visualElementStore","removeFromVariantTree","addVariantChild","forEach","bindToMotionValue","hasReducedMotionListener","initPrefersReducedMotion","prefersReducedMotion","process","env","NODE_ENV","warnOnce","addChild","update","unmount","cancelFrame","remove","clear","removeChild","feature","isMounted","child","add","enteringChildren","delete","has","accelerate","acceleratedValues","HTMLElement","factory","keyframes","times","ease","duration","animation","NativeAnimation","element","name","secondsToMilliseconds","cleanup","cancel","valueIsTransform","transformProps","onBindTransform","removeOnChange","on","latestValue","onUpdate","preRender","isTransformDirty","removeSyncCheck","window","MotionCheckAppearSync","sortNodePosition","other","sortInstanceNodePosition","type","updateFeatures","featureDefinition","isEnabled","Feature","FeatureConstructor","build","measureViewportBox","measureInstanceViewportBox","createBox","getStaticValue","setStaticValue","transformTemplate","prevProps","prevPresenceContext","i","listener","updateMotionValuesFromProps","handleChildMotionValue","getProps","getVariant","variants","getDefaultTransition","transition","getTransformPagePoint","transformPagePoint","getClosestVariantNode","closestVariantNode","addValue","existingValue","removeValue","unsubscribe","removeValueFromRenderState","hasValue","getValue","defaultValue","motionValue","owner","readValue","target","getBaseTargetFromProps","readValueFromInstance","isNumericalString","isZeroValueString","parseFloat","findValueType","complex","test","getAnimatableNone","setBaseTarget","getBaseTarget","valueFromInitial","variant","resolveVariantFromProps","custom","eventName","callback","SubscriptionManager","_len","args","Array","_key","scheduleRenderMicrotask","microtask","getFeatureDefinitions","definitions"],"mappings":"wyCA+CA,MAAMA,EAAoB,CACtB,iBACA,oBACA,SACA,sBACA,gBACA,uBACA,2BAMJ,IAAIC,EAAkD,CAAA,8BAgIlDC,2BAAAA,CACIC,EACAC,EACAC,GAIA,MAAO,EACX,CA4LAC,WAAAA,CAAAC,GAUgC,IAT5BC,OACIA,EAAMC,MACNA,EAAKC,gBACLA,EAAeC,oBACfA,EAAmBC,eACnBA,EAAcC,sBACdA,EAAqBC,YACrBA,GAC0CP,EAC9CQ,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAmB,CAAA,EAhMvBG,KAAAC,QAA2B,KAU3BD,KAAA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,CACJ,CAEAG,uBAAAA,GACIC,EAAAA,UAAUtJ,OAAOpB,KAAKoB,OAC1B,iCAz3BYuJ,WACZ,OAAO7L,CACX,gCAXM,SACF8L,GAEA9L,EAAqB8L,CACzB"}
|
|
1
|
+
{"version":3,"file":"VisualElement.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/render/VisualElement.mjs"],"sourcesContent":["import { warnOnce, secondsToMilliseconds, isNumericalString, isZeroValueString, SubscriptionManager } from 'motion-utils';\nimport { KeyframeResolver } from '../animation/keyframes/KeyframesResolver.mjs';\nimport { NativeAnimation } from '../animation/NativeAnimation.mjs';\nimport { acceleratedValues } from '../animation/waapi/utils/accelerated-values.mjs';\nimport { microtask } from '../frameloop/microtask.mjs';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { complex } from '../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../value/types/utils/animatable-none.mjs';\nimport { findValueType } from '../value/types/utils/find.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { transformProps } from './utils/keys-transform.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { initPrefersReducedMotion } from './utils/reduced-motion/index.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './utils/reduced-motion/state.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\n/**\n * Static feature definitions - can be injected by framework layer\n */\nlet featureDefinitions = {};\n/**\n * Set feature definitions for all VisualElements.\n * This should be called by the framework layer (e.g., framer-motion) during initialization.\n */\nfunction setFeatureDefinitions(definitions) {\n featureDefinitions = definitions;\n}\n/**\n * Get the current feature definitions\n */\nfunction getFeatureDefinitions() {\n return featureDefinitions;\n}\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * Decides whether animations should be skipped for this VisualElement.\n * Useful for E2E tests and visual regression testing.\n */\n this.shouldSkipAnimations = false;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n this.KeyframeResolver = KeyframeResolver;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * Track whether this element has been mounted before, to detect\n * remounts after Suspense unmount/remount cycles.\n */\n this.hasBeenMounted = false;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.renderScheduledAt = 0.0;\n this.scheduleRender = () => {\n const now = time.now();\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now;\n frame.render(this.render, false, true);\n }\n };\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.skipAnimationsConfig = skipAnimations;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key]);\n }\n }\n }\n mount(instance) {\n /**\n * If this element has been mounted before (e.g. after a Suspense\n * unmount/remount), reset motion values to their initial state\n * so animations replay correctly from initial → animate.\n */\n if (this.hasBeenMounted) {\n for (const key in this.initialValues) {\n this.values.get(key)?.jump(this.initialValues[key]);\n this.latestValues[key] = this.initialValues[key];\n }\n }\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n /**\n * Determine reduced motion preference. Only initialize the matchMedia\n * listener if we actually need the dynamic value (i.e., when config\n * is neither \"never\" nor \"always\").\n */\n if (this.reducedMotionConfig === \"never\") {\n this.shouldReduceMotion = false;\n }\n else if (this.reducedMotionConfig === \"always\") {\n this.shouldReduceMotion = true;\n }\n else {\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion = prefersReducedMotion.current;\n }\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\", \"reduced-motion-disabled\");\n }\n /**\n * Set whether animations should be skipped based on the config.\n */\n this.shouldSkipAnimations = this.skipAnimationsConfig ?? false;\n this.parent?.addChild(this);\n this.update(this.props, this.presenceContext);\n this.hasBeenMounted = true;\n }\n unmount() {\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent?.removeChild(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature) {\n feature.unmount();\n feature.isMounted = false;\n }\n }\n this.current = null;\n }\n addChild(child) {\n this.children.add(child);\n this.enteringChildren ?? (this.enteringChildren = new Set());\n this.enteringChildren.add(child);\n }\n removeChild(child) {\n this.children.delete(child);\n this.enteringChildren && this.enteringChildren.delete(child);\n }\n bindToMotionValue(key, value) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)();\n }\n if (value.accelerate &&\n acceleratedValues.has(key) &&\n this.current instanceof HTMLElement) {\n const { factory, keyframes, times, ease, duration } = value.accelerate;\n const animation = new NativeAnimation({\n element: this.current,\n name: key,\n keyframes,\n times,\n ease,\n duration: secondsToMilliseconds(duration),\n });\n const cleanup = factory(animation);\n this.valueSubscriptions.set(key, () => {\n cleanup();\n animation.cancel();\n });\n return;\n }\n const valueIsTransform = transformProps.has(key);\n if (valueIsTransform && this.onBindTransform) {\n this.onBindTransform();\n }\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n this.scheduleRender();\n });\n let removeSyncCheck;\n if (typeof window !== \"undefined\" &&\n window.MotionCheckAppearSync) {\n removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n }\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n if (removeSyncCheck)\n removeSyncCheck();\n // Defer to MotionValue.on(\"change\") auto-stop so React 19 remounts\n // can resubscribe before the animation is cancelled (#3315).\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n updateFeatures() {\n let key = \"animation\";\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key];\n if (!featureDefinition)\n continue;\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (!this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)) {\n this.features[key] = new FeatureConstructor(this);\n }\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = (\"on\" + key);\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key, target) {\n let value = this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : this.getBaseTargetFromProps(this.props, key) ??\n this.readValueFromInstance(this.current, key, this.options);\n if (value !== undefined && value !== null) {\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n scheduleRenderMicrotask() {\n microtask.render(this.render);\n }\n}\n\nexport { VisualElement, getFeatureDefinitions, setFeatureDefinitions };\n//# sourceMappingURL=VisualElement.mjs.map\n"],"names":["propEventHandlers","featureDefinitions","scrapeMotionValuesFromProps","_props","_prevProps","_visualElement","constructor","_ref","parent","props","presenceContext","reducedMotionConfig","skipAnimations","blockInitialAnimation","visualState","options","arguments","length","undefined","this","current","children","Set","isVariantNode","isControllingVariants","shouldReduceMotion","shouldSkipAnimations","values","Map","KeyframeResolver","features","valueSubscriptions","prevMotionValues","hasBeenMounted","events","propEventSubscriptions","notifyUpdate","notify","latestValues","render","triggerBuild","renderInstance","renderState","style","projection","renderScheduledAt","scheduleRender","now","time","frame","baseTarget","initialValues","initial","depth","skipAnimationsConfig","Boolean","checkIsControllingVariants","checkIsVariantNode","variantChildren","manuallyAnimateOnMount","willChange","initialMotionValues","key","value","isMotionValue","set","mount","instance","get","jump","visualElementStore","removeFromVariantTree","addVariantChild","forEach","bindToMotionValue","hasReducedMotionListener","initPrefersReducedMotion","prefersReducedMotion","process","env","NODE_ENV","warnOnce","addChild","update","unmount","cancelFrame","remove","clear","removeChild","feature","isMounted","child","add","enteringChildren","delete","has","accelerate","acceleratedValues","HTMLElement","factory","keyframes","times","ease","duration","animation","NativeAnimation","element","name","secondsToMilliseconds","cleanup","cancel","valueIsTransform","transformProps","onBindTransform","removeOnChange","on","latestValue","onUpdate","preRender","isTransformDirty","removeSyncCheck","window","MotionCheckAppearSync","sortNodePosition","other","sortInstanceNodePosition","type","updateFeatures","featureDefinition","isEnabled","Feature","FeatureConstructor","build","measureViewportBox","measureInstanceViewportBox","createBox","getStaticValue","setStaticValue","transformTemplate","prevProps","prevPresenceContext","i","listener","updateMotionValuesFromProps","handleChildMotionValue","getProps","getVariant","variants","getDefaultTransition","transition","getTransformPagePoint","transformPagePoint","getClosestVariantNode","closestVariantNode","addValue","existingValue","removeValue","unsubscribe","removeValueFromRenderState","hasValue","getValue","defaultValue","motionValue","owner","readValue","target","getBaseTargetFromProps","readValueFromInstance","isNumericalString","isZeroValueString","parseFloat","findValueType","complex","test","getAnimatableNone","setBaseTarget","getBaseTarget","valueFromInitial","variant","resolveVariantFromProps","custom","eventName","callback","SubscriptionManager","_len","args","Array","_key","scheduleRenderMicrotask","microtask","getFeatureDefinitions","definitions"],"mappings":"wyCA+CA,MAAMA,EAAoB,CACtB,iBACA,oBACA,SACA,sBACA,gBACA,uBACA,2BAMJ,IAAIC,EAAkD,CAAA,8BAgIlDC,2BAAAA,CACIC,EACAC,EACAC,GAIA,MAAO,EACX,CA4LAC,WAAAA,CAAAC,GAUgC,IAT5BC,OACIA,EAAMC,MACNA,EAAKC,gBACLA,EAAeC,oBACfA,EAAmBC,eACnBA,EAAcC,sBACdA,EAAqBC,YACrBA,GAC0CP,EAC9CQ,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAmB,CAAA,EAhMvBG,KAAAC,QAA2B,KAU3BD,KAAAE,SAAW,IAAIC,IA4BfH,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KoB,OAC1B,iCAz3BYuJ,WACZ,OAAO7L,CACX,gCAXM,SACF8L,GAEA9L,EAAqB8L,CACzB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../value/utils/is-motion-value.mjs.js"),t=require("../../animation/keyframes/DOMKeyframesResolver.mjs.js"),s=require("../VisualElement.mjs.js");class r extends s.VisualElement{constructor(){super(...arguments),this.KeyframeResolver=t.DOMKeyframesResolver}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const s=e.style;return s?s[t]:void 0}removeValueFromRenderState(e,t){let{vars:s,style:r}=t;delete s[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;e.isMotionValue(t)&&(this.childSubscription=t.on("change",
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../value/utils/is-motion-value.mjs.js"),t=require("../../animation/keyframes/DOMKeyframesResolver.mjs.js"),s=require("../VisualElement.mjs.js");class r extends s.VisualElement{constructor(){super(...arguments),this.KeyframeResolver=t.DOMKeyframesResolver}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const s=e.style;return s?s[t]:void 0}removeValueFromRenderState(e,t){let{vars:s,style:r}=t;delete s[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;e.isMotionValue(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}exports.DOMVisualElement=r;
|
|
2
2
|
//# sourceMappingURL=DOMVisualElement.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DOMVisualElement.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs"],"sourcesContent":["import { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { DOMKeyframesResolver } from '../../animation/keyframes/DOMKeyframesResolver.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n const style = props.style;\n return style ? style[key] : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current) {\n this.current.textContent = `${latest}`;\n }\n });\n }\n }\n}\n\nexport { DOMVisualElement };\n//# sourceMappingURL=DOMVisualElement.mjs.map\n"],"names":["DOMVisualElement","VisualElement","constructor","this","KeyframeResolver","DOMKeyframesResolver","sortInstanceNodePosition","a","b","compareDocumentPosition","getBaseTargetFromProps","props","key","style","undefined","removeValueFromRenderState","_ref","vars","handleChildMotionValue","childSubscription","children","isMotionValue","on","latest","current","textContent"],"mappings":"sOASM,MAAgBA,UAIZC,EAAAA,cAJVC,WAAAA,uBA8BIC,KAAAC,iBAAmBC,sBAkBvB,CA3CIC,wBAAAA,CAAyBC,EAAaC,GAMlC,OAAsC,EAA/BD,EAAEE,wBAAwBD,GAAS,GAAM,CACpD,CAEAE,sBAAAA,CACIC,EACAC,GAEA,MAAMC,EAASF,EAAsDE,MACrE,OAAOA,EAASA,EAAMD,QAAkBE,CAC5C,CAEAC,0BAAAA,CACIH,EAAWI,GACqB,IAAhCC,KAAEA,EAAIJ,MAAEA,GAAwBG,SAEzBC,EAAKL,UACLC,EAAMD,EACjB,CAKAM,sBAAAA,GACQf,KAAKgB,oBACLhB,KAAKgB,2BACEhB,KAAKgB,mBAGhB,MAAMC,SAAEA,GAAajB,KAAKQ,MACtBU,EAAAA,cAAcD,KACdjB,KAAKgB,kBAAoBC,EAASE,GAAG,
|
|
1
|
+
{"version":3,"file":"DOMVisualElement.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs"],"sourcesContent":["import { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { DOMKeyframesResolver } from '../../animation/keyframes/DOMKeyframesResolver.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n const style = props.style;\n return style ? style[key] : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current) {\n this.current.textContent = `${latest}`;\n }\n });\n }\n }\n}\n\nexport { DOMVisualElement };\n//# sourceMappingURL=DOMVisualElement.mjs.map\n"],"names":["DOMVisualElement","VisualElement","constructor","this","KeyframeResolver","DOMKeyframesResolver","sortInstanceNodePosition","a","b","compareDocumentPosition","getBaseTargetFromProps","props","key","style","undefined","removeValueFromRenderState","_ref","vars","handleChildMotionValue","childSubscription","children","isMotionValue","on","latest","current","textContent"],"mappings":"sOASM,MAAgBA,UAIZC,EAAAA,cAJVC,WAAAA,uBA8BIC,KAAAC,iBAAmBC,sBAkBvB,CA3CIC,wBAAAA,CAAyBC,EAAaC,GAMlC,OAAsC,EAA/BD,EAAEE,wBAAwBD,GAAS,GAAM,CACpD,CAEAE,sBAAAA,CACIC,EACAC,GAEA,MAAMC,EAASF,EAAsDE,MACrE,OAAOA,EAASA,EAAMD,QAAkBE,CAC5C,CAEAC,0BAAAA,CACIH,EAAWI,GACqB,IAAhCC,KAAEA,EAAIJ,MAAEA,GAAwBG,SAEzBC,EAAKL,UACLC,EAAMD,EACjB,CAKAM,sBAAAA,GACQf,KAAKgB,oBACLhB,KAAKgB,2BACEhB,KAAKgB,mBAGhB,MAAMC,SAAEA,GAAajB,KAAKQ,MACtBU,EAAAA,cAAcD,KACdjB,KAAKgB,kBAAoBC,EAASE,GAAG,SAAWC,IACxCpB,KAAKqB,UACLrB,KAAKqB,QAAQC,YAAc,GAAGF,OAI9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-transform.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs"],"sourcesContent":["const radToDeg = (rad) => (rad * 180) / Math.PI;\nconst rotate = (v) => {\n const angle = radToDeg(Math.atan2(v[1], v[0]));\n return rebaseAngle(angle);\n};\nconst matrix2dParsers = {\n x: 4,\n y: 5,\n translateX: 4,\n translateY: 5,\n scaleX: 0,\n scaleY: 3,\n scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n rotate,\n rotateZ: rotate,\n skewX: (v) => radToDeg(Math.atan(v[1])),\n skewY: (v) => radToDeg(Math.atan(v[2])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n};\nconst rebaseAngle = (angle) => {\n angle = angle % 360;\n if (angle < 0)\n angle += 360;\n return angle;\n};\nconst rotateZ = rotate;\nconst scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]);\nconst scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]);\nconst matrix3dParsers = {\n x: 12,\n y: 13,\n z: 14,\n translateX: 12,\n translateY: 13,\n translateZ: 14,\n scaleX,\n scaleY,\n scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n rotateZ,\n rotate: rotateZ,\n skewX: (v) => radToDeg(Math.atan(v[4])),\n skewY: (v) => radToDeg(Math.atan(v[1])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n};\nfunction defaultTransformValue(name) {\n return name.includes(\"scale\") ? 1 : 0;\n}\nfunction parseValueFromTransform(transform, name) {\n if (!transform || transform === \"none\") {\n return defaultTransformValue(name);\n }\n const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);\n let parsers;\n let match;\n if (matrix3dMatch) {\n parsers = matrix3dParsers;\n match = matrix3dMatch;\n }\n else {\n const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);\n parsers = matrix2dParsers;\n match = matrix2dMatch;\n }\n if (!match) {\n return defaultTransformValue(name);\n }\n const valueParser = parsers[name];\n const values = match[1].split(\",\").map(convertTransformToNumber);\n return typeof valueParser === \"function\"\n ? valueParser(values)\n : values[valueParser];\n}\nconst readTransformValue = (instance, name) => {\n const { transform = \"none\" } = getComputedStyle(instance);\n return parseValueFromTransform(transform, name);\n};\nfunction convertTransformToNumber(value) {\n return parseFloat(value.trim());\n}\n\nexport { defaultTransformValue, parseValueFromTransform, readTransformValue };\n//# sourceMappingURL=parse-transform.mjs.map\n"],"names":["radToDeg","rad","Math","PI","rotate","v","angle","atan2","rebaseAngle","matrix2dParsers","x","y","translateX","translateY","scaleX","scaleY","scale","abs","rotateZ","skewX","atan","skewY","skew","sqrt","matrix3dParsers","z","translateZ","rotateX","rotateY","defaultTransformValue","name","includes","parseValueFromTransform","transform","matrix3dMatch","match","parsers","matrix2dMatch","valueParser","values","split","map","convertTransformToNumber","value","parseFloat","trim","readTransformValue","instance","getComputedStyle"],"mappings":"oEAEA,MAAMA,EAAYC,GAAuB,IAANA,EAAaC,KAAKC,GAS/CC,EAAUC,IACZ,MAAMC,EAAQN,EAASE,KAAKK,MAAMF,EAAE,GAAIA,EAAE,KAC1C,OAAOG,EAAYF,
|
|
1
|
+
{"version":3,"file":"parse-transform.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs"],"sourcesContent":["const radToDeg = (rad) => (rad * 180) / Math.PI;\nconst rotate = (v) => {\n const angle = radToDeg(Math.atan2(v[1], v[0]));\n return rebaseAngle(angle);\n};\nconst matrix2dParsers = {\n x: 4,\n y: 5,\n translateX: 4,\n translateY: 5,\n scaleX: 0,\n scaleY: 3,\n scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n rotate,\n rotateZ: rotate,\n skewX: (v) => radToDeg(Math.atan(v[1])),\n skewY: (v) => radToDeg(Math.atan(v[2])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n};\nconst rebaseAngle = (angle) => {\n angle = angle % 360;\n if (angle < 0)\n angle += 360;\n return angle;\n};\nconst rotateZ = rotate;\nconst scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]);\nconst scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]);\nconst matrix3dParsers = {\n x: 12,\n y: 13,\n z: 14,\n translateX: 12,\n translateY: 13,\n translateZ: 14,\n scaleX,\n scaleY,\n scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n rotateZ,\n rotate: rotateZ,\n skewX: (v) => radToDeg(Math.atan(v[4])),\n skewY: (v) => radToDeg(Math.atan(v[1])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n};\nfunction defaultTransformValue(name) {\n return name.includes(\"scale\") ? 1 : 0;\n}\nfunction parseValueFromTransform(transform, name) {\n if (!transform || transform === \"none\") {\n return defaultTransformValue(name);\n }\n const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);\n let parsers;\n let match;\n if (matrix3dMatch) {\n parsers = matrix3dParsers;\n match = matrix3dMatch;\n }\n else {\n const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);\n parsers = matrix2dParsers;\n match = matrix2dMatch;\n }\n if (!match) {\n return defaultTransformValue(name);\n }\n const valueParser = parsers[name];\n const values = match[1].split(\",\").map(convertTransformToNumber);\n return typeof valueParser === \"function\"\n ? valueParser(values)\n : values[valueParser];\n}\nconst readTransformValue = (instance, name) => {\n const { transform = \"none\" } = getComputedStyle(instance);\n return parseValueFromTransform(transform, name);\n};\nfunction convertTransformToNumber(value) {\n return parseFloat(value.trim());\n}\n\nexport { defaultTransformValue, parseValueFromTransform, readTransformValue };\n//# sourceMappingURL=parse-transform.mjs.map\n"],"names":["radToDeg","rad","Math","PI","rotate","v","angle","atan2","rebaseAngle","matrix2dParsers","x","y","translateX","translateY","scaleX","scaleY","scale","abs","rotateZ","skewX","atan","skewY","skew","sqrt","matrix3dParsers","z","translateZ","rotateX","rotateY","defaultTransformValue","name","includes","parseValueFromTransform","transform","matrix3dMatch","match","parsers","matrix2dMatch","valueParser","values","split","map","convertTransformToNumber","value","parseFloat","trim","readTransformValue","instance","getComputedStyle"],"mappings":"oEAEA,MAAMA,EAAYC,GAAuB,IAANA,EAAaC,KAAKC,GAS/CC,EAAUC,IACZ,MAAMC,EAAQN,EAASE,KAAKK,MAAMF,EAAE,GAAIA,EAAE,KAC1C,OAAOG,EAAYF,IAGjBG,EAAiC,CACnCC,EAAG,EACHC,EAAG,EACHC,WAAY,EACZC,WAAY,EACZC,OAAQ,EACRC,OAAQ,EACRC,MAAQX,IAAOH,KAAKe,IAAIZ,EAAE,IAAMH,KAAKe,IAAIZ,EAAE,KAAO,EAClDD,SACAc,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E,CACZ,CAEA,IAAKF,EACD,OAAON,EAAsBC,GAGjC,MAAMQ,EAAcF,EAAQN,GACtBS,EAASJ,EAAM,GAAGK,MAAM,KAAKC,IAAIC,GAEvC,MAA8B,mBAAhBJ,EACRA,EAAYC,GACZA,EAAOD,EACjB,CAOA,SAASI,EAAyBC,GAC9B,OAAOC,WAAWD,EAAME,OAC5B,8FAPkCC,CAACC,EAAuBjB,KACtD,MAAMG,UAAEA,EAAY,QAAWe,iBAAiBD,GAChD,OAAOf,EAAwBC,EAAWH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.camelToDash=function(e){return e.replace(/([A-Z])/g,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.camelToDash=function(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)};
|
|
2
2
|
//# sourceMappingURL=camel-to-dash.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camel-to-dash.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs"],"sourcesContent":["function camelToDash(str) {\n return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);\n}\n\nexport { camelToDash };\n//# sourceMappingURL=camel-to-dash.mjs.map\n"],"names":["str","replace","match","toLowerCase"],"mappings":"wFAAM,SAAsBA,GACxB,OAAOA,EAAIC,QAAQ,
|
|
1
|
+
{"version":3,"file":"camel-to-dash.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs"],"sourcesContent":["function camelToDash(str) {\n return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);\n}\n\nexport { camelToDash };\n//# sourceMappingURL=camel-to-dash.mjs.map\n"],"names":["str","replace","match","toLowerCase"],"mappings":"wFAAM,SAAsBA,GACxB,OAAOA,EAAIC,QAAQ,WAAaC,GAAU,IAAIA,EAAMC,gBACxD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../animation/utils/is-css-variable.mjs.js"),r=require("../utils/keys-transform.mjs.js"),s=require("../dom/parse-transform.mjs.js"),t=require("../../projection/utils/measure.mjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../animation/utils/is-css-variable.mjs.js"),r=require("../utils/keys-transform.mjs.js"),s=require("../dom/parse-transform.mjs.js"),t=require("../../projection/utils/measure.mjs.js"),o=require("../dom/DOMVisualElement.mjs.js"),i=require("./utils/build-styles.mjs.js"),n=require("./utils/render.mjs.js"),u=require("./utils/scrape-motion-values.mjs.js"),a=require("../../../../../motion-utils/dist/es/errors.mjs.js");function m(e){return window.getComputedStyle(e)}class l extends o.DOMVisualElement{constructor(){super(...arguments),this.type="html",this.renderInstance=n.renderHTML}mount(e){a.invariant(Boolean(e.style),"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(t,o){if(r.transformProps.has(o))return this.projection?.isProjecting?s.defaultTransformValue(o):s.readTransformValue(t,o);{const r=m(t),s=(e.isCSSVariableName(o)?r.getPropertyValue(o):r[o])||0;return"string"==typeof s?s.trim():s}}measureInstanceViewportBox(e,r){let{transformPagePoint:s}=r;return t.measureViewportBox(e,s)}build(e,r,s){i.buildHTMLStyles(e,r,s.transformTemplate)}scrapeMotionValuesFromProps(e,r,s){return u.scrapeMotionValuesFromProps(e,r,s)}}exports.HTMLVisualElement=l,exports.getComputedStyle=m;
|
|
2
2
|
//# sourceMappingURL=HTMLVisualElement.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLVisualElement.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs"],"sourcesContent":["import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';\nimport { transformProps } from '../utils/keys-transform.mjs';\nimport { defaultTransformValue, readTransformValue } from '../dom/parse-transform.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"html\";\n this.renderInstance = renderHTML;\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n return this.projection?.isProjecting\n ? defaultTransformValue(key)\n : readTransformValue(instance, key);\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, props) {\n buildHTMLStyles(renderState, latestValues, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n//# sourceMappingURL=HTMLVisualElement.mjs.map\n"],"names":["getComputedStyle","element","window","HTMLVisualElement","DOMVisualElement","constructor","this","type","renderInstance","renderHTML","
|
|
1
|
+
{"version":3,"file":"HTMLVisualElement.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs"],"sourcesContent":["import { invariant } from 'motion-utils';\nimport { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';\nimport { transformProps } from '../utils/keys-transform.mjs';\nimport { defaultTransformValue, readTransformValue } from '../dom/parse-transform.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"html\";\n this.renderInstance = renderHTML;\n }\n mount(instance) {\n /**\n * If a custom component forwards its ref to something other than a\n * HTML/SVG element (a class instance, an imperative handle) there's\n * nothing for Motion to style, measure or attach gestures to. #2777\n */\n invariant(Boolean(instance.style), \"motion.create() components must forward their ref to a HTML or SVG element\", \"custom-component-ref\");\n super.mount(instance);\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n return this.projection?.isProjecting\n ? defaultTransformValue(key)\n : readTransformValue(instance, key);\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, props) {\n buildHTMLStyles(renderState, latestValues, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n//# sourceMappingURL=HTMLVisualElement.mjs.map\n"],"names":["getComputedStyle","element","window","HTMLVisualElement","DOMVisualElement","constructor","this","type","renderInstance","renderHTML","mount","instance","invariant","Boolean","style","super","readValueFromInstance","key","transformProps","has","projection","isProjecting","defaultTransformValue","readTransformValue","computedStyle","value","isCSSVariableName","getPropertyValue","trim","measureInstanceViewportBox","_ref","transformPagePoint","measureViewportBox","build","renderState","latestValues","props","buildHTMLStyles","transformTemplate","scrapeMotionValuesFromProps","prevProps","visualElement"],"mappings":"ofAmBM,SAAUA,EAAiBC,GAC7B,OAAOC,OAAOF,iBAAiBC,EACnC,CAEM,MAAOE,UAA0BC,EAAAA,iBAAvCC,WAAAA,uBAKIC,KAAAC,KAAO,OA2DPD,KAAAE,eAAiBC,YACrB,CA1DIC,KAAAA,CAAMC,GAMFC,EAASA,UACLC,QAAQF,EAASG,OACjB,6EACA,wBAGJC,MAAML,MAAMC,EAChB,CAEAK,qBAAAA,CACIL,EACAM,GAEA,GAAIC,EAAcA,eAACC,IAAIF,GACnB,OAAOX,KAAKc,YAAYC,aAClBC,EAAqBA,sBAACL,GACtBM,EAAkBA,mBAACZ,EAAUM,GAChC,CACH,MAAMO,EAAgBxB,EAAiBW,GACjCc,GACDC,oBAAkBT,GACbO,EAAcG,iBAAiBV,GAC/BO,EAAcP,KAAuC,EAE/D,MAAwB,iBAAVQ,EAAqBA,EAAMG,OAAUH,CACvD,CACJ,CAEAI,0BAAAA,CACIlB,EAAqBmB,GACwD,IAA7EC,mBAAEA,GAA2ED,EAE7E,OAAOE,EAAkBA,mBAACrB,EAAUoB,EACxC,CAEAE,KAAAA,CACIC,EACAC,EACAC,GAEAC,EAAAA,gBAAgBH,EAAaC,EAAcC,EAAME,kBACrD,CAEAC,2BAAAA,CACIH,EACAI,EACAC,GAEA,OAAOF,8BAA4BH,EAAOI,EAAWC,EACzD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../animation/interfaces/visual-element.mjs.js"),t=require("../../animation/utils/calc-child-stagger.mjs.js"),i=require("./get-variant-context.mjs.js"),n=require("./is-animation-controls.mjs.js"),r=require("./is-keyframes-target.mjs.js"),a=require("./is-variant-label.mjs.js"),s=require("./resolve-dynamic-variants.mjs.js"),o=require("./shallow-compare.mjs.js"),l=require("./variant-props.mjs.js");const c=[...l.variantPriorityOrder].reverse(),u=l.variantPriorityOrder.length;function m(t){return i=>Promise.all(i.map(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../animation/interfaces/visual-element.mjs.js"),t=require("../../animation/utils/calc-child-stagger.mjs.js"),i=require("./get-variant-context.mjs.js"),n=require("./is-animation-controls.mjs.js"),r=require("./is-keyframes-target.mjs.js"),a=require("./is-variant-label.mjs.js"),s=require("./resolve-dynamic-variants.mjs.js"),o=require("./shallow-compare.mjs.js"),l=require("./variant-props.mjs.js");const c=[...l.variantPriorityOrder].reverse(),u=l.variantPriorityOrder.length;function m(t){return i=>Promise.all(i.map(i=>{let{animation:n,options:r}=i;return e.animateVisualElement(t,n,r)}))}function v(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!o.shallowCompare(t,e)}function p(){return{isActive:arguments.length>0&&void 0!==arguments[0]&&arguments[0],protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function d(){return{animate:p(!0),whileInView:p(),whileHover:p(),whileTap:p(),whileDrag:p(),whileFocus:p(),exit:p()}}exports.checkVariantsDidChange=v,exports.createAnimationState=function(e){let l=m(e),p=d(),f=!0,y=!1;const h=t=>(i,n)=>{const r=s.resolveVariant(e,n,"exit"===t?e.presenceContext?.custom:void 0);if(r){const{transition:e,transitionEnd:t,...n}=r;i={...i,...n,...t}}return i};function g(m){const{props:d}=e,g=i.getVariantContext(e.parent)||{},A=[],j=new Set;let V={},C=1/0;for(let i=0;i<u;i++){const l=c[i],u=p[l],w=void 0!==d[l]?d[l]:g[l],P=a.isVariantLabel(w),q=l===m?u.isActive:null;!1===q&&(C=i);let x=w===g[l]&&w!==d[l]&&P;if(x&&(f||y)&&e.manuallyAnimateOnMount&&(x=!1),u.protectedKeys={...V},!u.isActive&&null===q||!w&&!u.prevProp||n.isAnimationControls(w)||"boolean"==typeof w)continue;if("exit"===l&&u.isActive&&!0!==q){u.prevResolvedValues&&(V={...V,...u.prevResolvedValues});continue}const O=v(u.prevProp,w);let S=O||l===m&&u.isActive&&!x&&P||i>C&&P,b=!1;const K=Array.isArray(w)?w:[w];let R=K.reduce(h(l),{});!1===q&&(R={});const{prevResolvedValues:E={}}=u,M={...E,...R},T=t=>{S=!0,j.has(t)&&(b=!0,j.delete(t)),u.needsAnimating[t]=!0;const i=e.getValue(t);i&&(i.liveStyle=!1)};for(const e in M){const t=R[e],i=E[e];if(V.hasOwnProperty(e))continue;let n=!1;n=r.isKeyframesTarget(t)&&r.isKeyframesTarget(i)?!o.shallowCompare(t,i)||O:t!==i,n?null!=t?T(e):j.add(e):void 0!==t&&j.has(e)?T(e):u.protectedKeys[e]=!0}u.prevProp=w,u.prevResolvedValues=R,u.isActive&&(V={...V,...R}),(f||y)&&e.blockInitialAnimation&&(S=!1);const k=x&&O;S&&(!k||b)&&A.push(...K.map(i=>{const n={type:l};if("string"==typeof i&&(f||y)&&!k&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,a=s.resolveVariant(r,i);if(r.enteringChildren&&a){const{delayChildren:i}=a.transition||{};n.delay=t.calcChildStagger(r.enteringChildren,e,i)}}return{animation:i,options:n}}))}if(j.size){const t={};if("boolean"!=typeof d.initial){const i=s.resolveVariant(e,Array.isArray(d.initial)?d.initial[0]:d.initial);i&&i.transition&&(t.transition=i.transition)}j.forEach(i=>{const n=e.getBaseTarget(i),r=e.getValue(i);r&&(r.liveStyle=!0),t[i]=n??null}),A.push({animation:t})}let w=Boolean(A.length);return!f||!1!==d.initial&&d.initial!==d.animate||e.manuallyAnimateOnMount||(w=!1),f=!1,y=!1,w?l(A):Promise.resolve()}return{animateChanges:g,setActive:function(t,i){if(p[t].isActive===i)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,i)),p[t].isActive=i;const n=g(t);for(const e in p)p[e].protectedKeys={};return n},setAnimateFunction:function(t){l=t(e)},getState:()=>p,reset:()=>{p=d(),y=!0}}};
|
|
2
2
|
//# sourceMappingURL=animation-state.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation-state.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/utils/animation-state.mjs"],"sourcesContent":["import { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';\nimport { calcChildStagger } from '../../animation/utils/calc-child-stagger.mjs';\nimport { getVariantContext } from './get-variant-context.mjs';\nimport { isAnimationControls } from './is-animation-controls.mjs';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { shallowCompare } from './shallow-compare.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\nconst numAnimationTypes = variantPriorityOrder.length;\nfunction createAnimateFunction(visualElement) {\n return (animations) => {\n return Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n };\n}\nfunction createAnimationState(visualElement) {\n let animate = createAnimateFunction(visualElement);\n let state = createState();\n let isInitialRender = true;\n /**\n * Track whether the animation state has been reset (e.g. via StrictMode\n * double-invocation or Suspense unmount/remount). On the first\n * animateChanges() call after a reset we need to behave like the initial\n * render for variant-inheritance checks, even though isInitialRender is\n * already false.\n */\n let wasReset = false;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n const buildResolvedTypeValues = (type) => (acc, definition) => {\n const resolved = resolveVariant(visualElement, definition, type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n acc = { ...acc, ...target, ...transitionEnd };\n }\n return acc;\n };\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(changedActiveType) {\n const { props } = visualElement;\n const context = getVariantContext(visualElement.parent) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n const animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n const removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n let encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n let removedVariantIndex = Infinity;\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i];\n const typeState = state[type];\n const prop = props[type] !== undefined\n ? props[type]\n : context[type];\n const propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n let isInherited = prop === context[type] &&\n prop !== props[type] &&\n propIsVariant;\n if (isInherited &&\n (isInitialRender || wasReset) &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = { ...encounteredKeys };\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n continue;\n }\n /**\n * If exit is already active and wasn't just activated, skip\n * re-processing to prevent interrupting running exit animations.\n * Re-resolving exit with a changed custom value can start new\n * value animations that stop the originals, leaving the exit\n * animation promise unresolved and the component stuck in the DOM.\n */\n if (type === \"exit\" && typeState.isActive && activeDelta !== true) {\n if (typeState.prevResolvedValues) {\n encounteredKeys = {\n ...encounteredKeys,\n ...typeState.prevResolvedValues,\n };\n }\n continue;\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n let handledRemovedValues = false;\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n const definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n const { prevResolvedValues = {} } = typeState;\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n };\n const markToAnimate = (key) => {\n shouldAnimateType = true;\n if (removedKeys.has(key)) {\n handledRemovedValues = true;\n removedKeys.delete(key);\n }\n typeState.needsAnimating[key] = true;\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = false;\n };\n for (const key in allKeys) {\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n let valueHasChanged = false;\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n valueHasChanged =\n !shallowCompare(next, prev) || variantDidChange;\n }\n else {\n valueHasChanged = next !== prev;\n }\n if (valueHasChanged) {\n if (next !== undefined && next !== null) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if ((isInitialRender || wasReset) &&\n visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to skip this animation\n * unless the inherited variants haven't changed on this render.\n */\n const willAnimateViaParent = isInherited && variantDidChange;\n const needsAnimating = !willAnimateViaParent || handledRemovedValues;\n if (shouldAnimateType && needsAnimating) {\n animations.push(...definitionList.map((animation) => {\n const options = { type };\n /**\n * If we're performing the initial animation, but we're not\n * rendering at the same time as the variant-controlling parent,\n * we want to use the parent's transition to calculate the stagger.\n */\n if (typeof animation === \"string\" &&\n (isInitialRender || wasReset) &&\n !willAnimateViaParent &&\n visualElement.manuallyAnimateOnMount &&\n visualElement.parent) {\n const { parent } = visualElement;\n const parentVariant = resolveVariant(parent, animation);\n if (parent.enteringChildren && parentVariant) {\n const { delayChildren } = parentVariant.transition || {};\n options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren);\n }\n }\n return {\n animation: animation,\n options,\n };\n }));\n }\n }\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n const fallbackAnimation = {};\n /**\n * If the initial prop contains a transition we can use that, otherwise\n * allow the animation function to use the visual element's default.\n */\n if (typeof props.initial !== \"boolean\") {\n const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial)\n ? props.initial[0]\n : props.initial);\n if (initialTransition && initialTransition.transition) {\n fallbackAnimation.transition = initialTransition.transition;\n }\n }\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key);\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = true;\n // @ts-expect-error - @mattgperry to figure if we should do something here\n fallbackAnimation[key] = fallbackTarget ?? null;\n });\n animations.push({ animation: fallbackAnimation });\n }\n let shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n (props.initial === false || props.initial === props.animate) &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n wasReset = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive) {\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive));\n state[type].isActive = isActive;\n const animations = animateChanges(type);\n for (const key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n reset: () => {\n state = createState();\n wasReset = true;\n },\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (Array.isArray(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive = false) {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n };\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n//# sourceMappingURL=animation-state.mjs.map\n"],"names":["reversePriorityOrder","variantPriorityOrder","reverse","numAnimationTypes","length","createAnimateFunction","visualElement","animations","Promise","all","map","_ref","animation","options","animateVisualElement","checkVariantsDidChange","prev","next","Array","isArray","shallowCompare","createTypeState","isActive","arguments","undefined","protectedKeys","needsAnimating","prevResolvedValues","createState","animate","whileInView","whileHover","whileTap","whileDrag","whileFocus","exit","state","isInitialRender","wasReset","buildResolvedTypeValues","type","acc","definition","resolved","resolveVariant","presenceContext","custom","transition","transitionEnd","target","animateChanges","changedActiveType","props","context","getVariantContext","parent","removedKeys","Set","encounteredKeys","removedVariantIndex","Infinity","i","typeState","prop","propIsVariant","isVariantLabel","activeDelta","isInherited","manuallyAnimateOnMount","prevProp","isAnimationControls","variantDidChange","shouldAnimateType","handledRemovedValues","definitionList","resolvedValues","reduce","allKeys","markToAnimate","key","has","delete","motionValue","getValue","liveStyle","hasOwnProperty","valueHasChanged","isKeyframesTarget","add","blockInitialAnimation","willAnimateViaParent","push","parentVariant","enteringChildren","delayChildren","delay","calcChildStagger","size","fallbackAnimation","initial","initialTransition","forEach","fallbackTarget","getBaseTarget","shouldAnimate","Boolean","resolve","setActive","variantChildren","child","animationState","setAnimateFunction","makeAnimator","getState","reset"],"mappings":"meAsCA,MAAMA,EAAuB,IAAIC,wBAAsBC,UACjDC,EAAoBF,EAAoBA,qBAACG,OAQ/C,SAASC,EAAsBC,GAC3B,OAAQC,GACGC,QAAQC,IACXF,EAAWG,KAAIC,IAAA,IAACC,UAAEA,EAASC,QAAEA,GAASF,EAAA,OAClCG,u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,UAAWsF,GACjC,CAEA,IAAIM,EAAgBC,QAAQlG,EAAWH,QAYvC,OATIiC,IACmB,IAAlBe,EAAM+C,SAAqB/C,EAAM+C,UAAY/C,EAAMvB,SACnDvB,EAAc8D,yBAEfoC,GAAgB,GAGpBnE,GAAkB,EAClBC,GAAW,EACJkE,EAAgB3E,EAAQtB,GAAcC,QAAQkG,SACzD,CAyBA,MAAO,CACHxD,iBACAyD,UAtBJ,SAAmBnE,EAAqBlB,GAEpC,GAAIc,EAAMI,GAAMlB,WAAaA,EAAU,OAAOd,QAAQkG,UAGtDpG,EAAcsG,iBAAiBP,SAASQ,GACpCA,EAAMC,gBAAgBH,UAAUnE,EAAMlB,KAG1Cc,EAAMI,GAAMlB,SAAWA,EAEvB,MAAMf,EAAa2C,EAAeV,GAElC,IAAK,MAAMuC,KAAO3C,EACdA,EAAM2C,GAA2BtD,cAAgB,GAGrD,OAAOlB,CACX,EAKIwG,mBAzXJ,SACIC,GAEAnF,EAAUmF,EAAa1G,EAC3B,EAsXI2G,SAAUA,IAAM7E,EAChB8E,MAAOA,KACH9E,EAAQR,IACRU,GAAW,CAAI,EAG3B"}
|
|
1
|
+
{"version":3,"file":"animation-state.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/utils/animation-state.mjs"],"sourcesContent":["import { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';\nimport { calcChildStagger } from '../../animation/utils/calc-child-stagger.mjs';\nimport { getVariantContext } from './get-variant-context.mjs';\nimport { isAnimationControls } from './is-animation-controls.mjs';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { shallowCompare } from './shallow-compare.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\nconst numAnimationTypes = variantPriorityOrder.length;\nfunction createAnimateFunction(visualElement) {\n return (animations) => {\n return Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n };\n}\nfunction createAnimationState(visualElement) {\n let animate = createAnimateFunction(visualElement);\n let state = createState();\n let isInitialRender = true;\n /**\n * Track whether the animation state has been reset (e.g. via StrictMode\n * double-invocation or Suspense unmount/remount). On the first\n * animateChanges() call after a reset we need to behave like the initial\n * render for variant-inheritance checks, even though isInitialRender is\n * already false.\n */\n let wasReset = false;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n const buildResolvedTypeValues = (type) => (acc, definition) => {\n const resolved = resolveVariant(visualElement, definition, type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n acc = { ...acc, ...target, ...transitionEnd };\n }\n return acc;\n };\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(changedActiveType) {\n const { props } = visualElement;\n const context = getVariantContext(visualElement.parent) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n const animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n const removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n let encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n let removedVariantIndex = Infinity;\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i];\n const typeState = state[type];\n const prop = props[type] !== undefined\n ? props[type]\n : context[type];\n const propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n let isInherited = prop === context[type] &&\n prop !== props[type] &&\n propIsVariant;\n if (isInherited &&\n (isInitialRender || wasReset) &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = { ...encounteredKeys };\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n continue;\n }\n /**\n * If exit is already active and wasn't just activated, skip\n * re-processing to prevent interrupting running exit animations.\n * Re-resolving exit with a changed custom value can start new\n * value animations that stop the originals, leaving the exit\n * animation promise unresolved and the component stuck in the DOM.\n */\n if (type === \"exit\" && typeState.isActive && activeDelta !== true) {\n if (typeState.prevResolvedValues) {\n encounteredKeys = {\n ...encounteredKeys,\n ...typeState.prevResolvedValues,\n };\n }\n continue;\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n let handledRemovedValues = false;\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n const definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n const { prevResolvedValues = {} } = typeState;\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n };\n const markToAnimate = (key) => {\n shouldAnimateType = true;\n if (removedKeys.has(key)) {\n handledRemovedValues = true;\n removedKeys.delete(key);\n }\n typeState.needsAnimating[key] = true;\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = false;\n };\n for (const key in allKeys) {\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n let valueHasChanged = false;\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n valueHasChanged =\n !shallowCompare(next, prev) || variantDidChange;\n }\n else {\n valueHasChanged = next !== prev;\n }\n if (valueHasChanged) {\n if (next !== undefined && next !== null) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if ((isInitialRender || wasReset) &&\n visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to skip this animation\n * unless the inherited variants haven't changed on this render.\n */\n const willAnimateViaParent = isInherited && variantDidChange;\n const needsAnimating = !willAnimateViaParent || handledRemovedValues;\n if (shouldAnimateType && needsAnimating) {\n animations.push(...definitionList.map((animation) => {\n const options = { type };\n /**\n * If we're performing the initial animation, but we're not\n * rendering at the same time as the variant-controlling parent,\n * we want to use the parent's transition to calculate the stagger.\n */\n if (typeof animation === \"string\" &&\n (isInitialRender || wasReset) &&\n !willAnimateViaParent &&\n visualElement.manuallyAnimateOnMount &&\n visualElement.parent) {\n const { parent } = visualElement;\n const parentVariant = resolveVariant(parent, animation);\n if (parent.enteringChildren && parentVariant) {\n const { delayChildren } = parentVariant.transition || {};\n options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren);\n }\n }\n return {\n animation: animation,\n options,\n };\n }));\n }\n }\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n const fallbackAnimation = {};\n /**\n * If the initial prop contains a transition we can use that, otherwise\n * allow the animation function to use the visual element's default.\n */\n if (typeof props.initial !== \"boolean\") {\n const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial)\n ? props.initial[0]\n : props.initial);\n if (initialTransition && initialTransition.transition) {\n fallbackAnimation.transition = initialTransition.transition;\n }\n }\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key);\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = true;\n // @ts-expect-error - @mattgperry to figure if we should do something here\n fallbackAnimation[key] = fallbackTarget ?? null;\n });\n animations.push({ animation: fallbackAnimation });\n }\n let shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n (props.initial === false || props.initial === props.animate) &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n wasReset = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive) {\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive));\n state[type].isActive = isActive;\n const animations = animateChanges(type);\n for (const key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n reset: () => {\n state = createState();\n wasReset = true;\n },\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (Array.isArray(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive = false) {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n };\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n//# sourceMappingURL=animation-state.mjs.map\n"],"names":["reversePriorityOrder","variantPriorityOrder","reverse","numAnimationTypes","length","createAnimateFunction","visualElement","animations","Promise","all","map","_ref","animation","options","animateVisualElement","checkVariantsDidChange","prev","next","Array","isArray","shallowCompare","createTypeState","isActive","arguments","undefined","protectedKeys","needsAnimating","prevResolvedValues","createState","animate","whileInView","whileHover","whileTap","whileDrag","whileFocus","exit","state","isInitialRender","wasReset","buildResolvedTypeValues","type","acc","definition","resolved","resolveVariant","presenceContext","custom","transition","transitionEnd","target","animateChanges","changedActiveType","props","context","getVariantContext","parent","removedKeys","Set","encounteredKeys","removedVariantIndex","Infinity","i","typeState","prop","propIsVariant","isVariantLabel","activeDelta","isInherited","manuallyAnimateOnMount","prevProp","isAnimationControls","variantDidChange","shouldAnimateType","handledRemovedValues","definitionList","resolvedValues","reduce","allKeys","markToAnimate","key","has","delete","motionValue","getValue","liveStyle","hasOwnProperty","valueHasChanged","isKeyframesTarget","add","blockInitialAnimation","willAnimateViaParent","push","parentVariant","enteringChildren","delayChildren","delay","calcChildStagger","size","fallbackAnimation","initial","initialTransition","forEach","fallbackTarget","getBaseTarget","shouldAnimate","Boolean","resolve","setActive","variantChildren","child","animationState","setAnimateFunction","makeAnimator","getState","reset"],"mappings":"meAsCA,MAAMA,EAAuB,IAAIC,wBAAsBC,UACjDC,EAAoBF,EAAoBA,qBAACG,OAQ/C,SAASC,EAAsBC,GAC3B,OAAQC,GACGC,QAAQC,IACXF,EAAWG,IAAIC,IAAA,IAACC,UAAEA,EAASC,QAAEA,GAASF,EAAA,OAClCG,uBAAqBR,EAAeM,EAAWC,KAI/D,CA+aM,SAAUE,EAAuBC,EAAWC,GAC9C,MAAoB,iBAATA,EACAA,IAASD,IACTE,MAAMC,QAAQF,KACbG,EAAcA,eAACH,EAAMD,EAIrC,CAUA,SAASK,IACL,MAAO,CACHC,SAFyBC,UAAAnB,OAAA,QAAAoB,IAAAD,UAAA,IAAAA,UAAA,GAGzBE,cAAe,CAAE,EACjBC,eAAgB,CAAE,EAClBC,mBAAoB,CAAA,EAE5B,CAEA,SAASC,IACL,MAAO,CACHC,QAASR,GAAgB,GACzBS,YAAaT,IACbU,WAAYV,IACZW,SAAUX,IACVY,UAAWZ,IACXa,WAAYb,IACZc,KAAMd,IAEd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B,MAAMf,EAAa2C,EAAeV,GAElC,IAAK,MAAMuC,KAAO3C,EACdA,EAAM2C,GAA2BtD,cAAgB,GAGrD,OAAOlB,CACX,EAKIwG,mBAzXJ,SACIC,GAEAnF,EAAUmF,EAAa1G,EAC3B,EAsXI2G,SAAUA,IAAM7E,EAChB8E,MAAOA,KACH9E,EAAQR,IACRU,GAAW,GAGvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./is-animation-controls.mjs.js"),i=require("./is-variant-label.mjs.js"),e=require("./variant-props.mjs.js");function s(s){return r.isAnimationControls(s.animate)||e.variantProps.some(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./is-animation-controls.mjs.js"),i=require("./is-variant-label.mjs.js"),e=require("./variant-props.mjs.js");function s(s){return r.isAnimationControls(s.animate)||e.variantProps.some(r=>i.isVariantLabel(s[r]))}exports.isControllingVariants=s,exports.isVariantNode=function(r){return Boolean(s(r)||r.variants)};
|
|
2
2
|
//# sourceMappingURL=is-controlling-variants.mjs.js.map
|
package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-controlling-variants.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs"],"sourcesContent":["import { isAnimationControls } from './is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n//# sourceMappingURL=is-controlling-variants.mjs.map\n"],"names":["isControllingVariants","props","isAnimationControls","animate","variantProps","some","name","isVariantLabel","Boolean","variants"],"mappings":"+LAKM,SAAUA,EAAsBC,GAClC,OACIC,sBAAoBD,EAAME,UAC1BC,EAAAA,aAAaC,
|
|
1
|
+
{"version":3,"file":"is-controlling-variants.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs"],"sourcesContent":["import { isAnimationControls } from './is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n//# sourceMappingURL=is-controlling-variants.mjs.map\n"],"names":["isControllingVariants","props","isAnimationControls","animate","variantProps","some","name","isVariantLabel","Boolean","variants"],"mappings":"+LAKM,SAAUA,EAAsBC,GAClC,OACIC,sBAAoBD,EAAME,UAC1BC,EAAAA,aAAaC,KAAMC,GACfC,iBAAeN,EAAMK,IAGjC,uDAEM,SAAwBL,GAC1B,OAAOO,QAAQR,EAAsBC,IAAUA,EAAMQ,SACzD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function t(t){const o=[{},{}];return t?.values.forEach((
|
|
1
|
+
"use strict";function t(t){const o=[{},{}];return t?.values.forEach((t,e)=>{o[0][e]=t.get(),o[1][e]=t.getVelocity()}),o}Object.defineProperty(exports,"__esModule",{value:!0}),exports.resolveVariantFromProps=function(o,e,n,r){if("function"==typeof e){const[s,i]=t(r);e=e(void 0!==n?n:o.custom,s,i)}if("string"==typeof e&&(e=o.variants&&o.variants[e]),"function"==typeof e){const[s,i]=t(r);e=e(void 0!==n?n:o.custom,s,i)}return e};
|
|
2
2
|
//# sourceMappingURL=resolve-variants.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-variants.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs"],"sourcesContent":["function getValueState(visualElement) {\n const state = [{}, {}];\n visualElement?.values.forEach((value, key) => {\n state[0][key] = value.get();\n state[1][key] = value.getVelocity();\n });\n return state;\n}\nfunction resolveVariantFromProps(props, definition, custom, visualElement) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n//# sourceMappingURL=resolve-variants.mjs.map\n"],"names":["getValueState","visualElement","state","values","forEach","value","key","get","getVelocity","props","definition","custom","current","velocity","undefined","variants"],"mappings":"aAQA,SAASA,EAAcC,GACnB,MAAMC,EAA0C,CAAC,GAAI,CAAA,GAOrD,OALAD,GAAeE,OAAOC,
|
|
1
|
+
{"version":3,"file":"resolve-variants.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs"],"sourcesContent":["function getValueState(visualElement) {\n const state = [{}, {}];\n visualElement?.values.forEach((value, key) => {\n state[0][key] = value.get();\n state[1][key] = value.getVelocity();\n });\n return state;\n}\nfunction resolveVariantFromProps(props, definition, custom, visualElement) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n//# sourceMappingURL=resolve-variants.mjs.map\n"],"names":["getValueState","visualElement","state","values","forEach","value","key","get","getVelocity","props","definition","custom","current","velocity","undefined","variants"],"mappings":"aAQA,SAASA,EAAcC,GACnB,MAAMC,EAA0C,CAAC,GAAI,CAAA,GAOrD,OALAD,GAAeE,OAAOC,QAAQ,CAACC,EAAYC,KACvCJ,EAAM,GAAGI,GAAOD,EAAME,MACtBL,EAAM,GAAGI,GAAOD,EAAMG,gBAGnBN,CACX,wFAcM,SACFO,EACAC,EACAC,EACAV,GAKA,GAA0B,mBAAfS,EAA2B,CAClC,MAAOE,EAASC,GAAYb,EAAcC,GAC1CS,EAAaA,OACEI,IAAXH,EAAuBA,EAASF,EAAME,OACtCC,EACAC,EAER,CAeA,GAT0B,iBAAfH,IACPA,EAAaD,EAAMM,UAAYN,EAAMM,SAASL,IAQxB,mBAAfA,EAA2B,CAClC,MAAOE,EAASC,GAAYb,EAAcC,GAC1CS,EAAaA,OACEI,IAAXH,EAAuBA,EAASF,EAAME,OACtCC,EACAC,EAER,CAEA,OAAOH,CACX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../value/index.mjs.js"),t=require("./resolve-dynamic-variants.mjs.js"),r=require("./is-keyframes-target.mjs.js");function s(t,r,s){t.hasValue(r)?t.getValue(r).set(s):t.addValue(r,e.motionValue(s))}exports.setTarget=function(e,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../value/index.mjs.js"),t=require("./resolve-dynamic-variants.mjs.js"),r=require("./is-keyframes-target.mjs.js");function s(t,r,s){t.hasValue(r)?t.getValue(r).set(s):t.addValue(r,e.motionValue(s))}function n(e){return r.isKeyframesTarget(e)?e[e.length-1]||0:e}exports.setTarget=function(e,r){const a=t.resolveVariant(e,r);let{transitionEnd:i={},transition:o={},...u}=a||{};u={...u,...i};for(const t in u){s(e,t,n(u[t]))}};
|
|
2
2
|
//# sourceMappingURL=setters.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setters.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/utils/setters.mjs"],"sourcesContent":["import { motionValue } from '../../value/index.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction resolveFinalValueInKeyframes(v) {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\n\nexport { setTarget };\n//# sourceMappingURL=setters.mjs.map\n"],"names":["setMotionValue","visualElement","key","value","hasValue","getValue","set","addValue","motionValue","
|
|
1
|
+
{"version":3,"file":"setters.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/utils/setters.mjs"],"sourcesContent":["import { motionValue } from '../../value/index.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction resolveFinalValueInKeyframes(v) {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\n\nexport { setTarget };\n//# sourceMappingURL=setters.mjs.map\n"],"names":["setMotionValue","visualElement","key","value","hasValue","getValue","set","addValue","motionValue","resolveFinalValueInKeyframes","v","isKeyframesTarget","length","definition","resolved","resolveVariant","transitionEnd","transition","target"],"mappings":"uMAeA,SAASA,EACLC,EACAC,EACAC,GAEIF,EAAcG,SAASF,GACvBD,EAAcI,SAASH,GAAMI,IAAIH,GAEjCF,EAAcM,SAASL,EAAKM,EAAAA,YAAYL,GAEhD,CAEA,SAASM,EACLC,GAGA,OAAOC,EAAiBA,kBAACD,GAAKA,EAAEA,EAAEE,OAAS,IAAM,EAAIF,CACzD,mBAEM,SACFT,EACAY,GAEA,MAAMC,EAAWC,EAAAA,eAAed,EAAeY,GAC/C,IAAIG,cAAEA,EAAgB,CAAE,EAAAC,WAAEA,EAAa,CAAE,KAAKC,GAAWJ,GAAY,CAAA,EAErEI,EAAS,IAAKA,KAAWF,GAEzB,IAAK,MAAMd,KAAOgB,EAAQ,CAItBlB,EAAeC,EAAeC,EAHhBO,EACVS,EAAOhB,IAGf,CACJ"}
|