@nethesis/phone-island 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/dist/App.js.map +1 -1
  2. package/dist/components/AlertView/index.js.map +1 -1
  3. package/dist/components/AudioBars.js.map +1 -1
  4. package/dist/components/AudioPlayerView/PlayerFooterActions.js +1 -1
  5. package/dist/components/AudioPlayerView/PlayerFooterActions.js.map +1 -1
  6. package/dist/components/AudioPlayerView/Progress.js.map +1 -1
  7. package/dist/components/AudioPlayerView/index.js +1 -1
  8. package/dist/components/AudioPlayerView/index.js.map +1 -1
  9. package/dist/components/CallView/Actions.js +1 -1
  10. package/dist/components/CallView/Actions.js.map +1 -1
  11. package/dist/components/CallView/BackCall.js +1 -1
  12. package/dist/components/CallView/BackCall.js.map +1 -1
  13. package/dist/components/CallView/DeviceIcon.js +1 -1
  14. package/dist/components/CallView/DeviceIcon.js.map +1 -1
  15. package/dist/components/CallView/DisplayName.js +1 -1
  16. package/dist/components/CallView/DisplayName.js.map +1 -1
  17. package/dist/components/CallView/DisplayNameUtils.js.map +1 -1
  18. package/dist/components/CallView/Number.js +1 -1
  19. package/dist/components/CallView/Number.js.map +1 -1
  20. package/dist/components/CallView/NumberPopover.js +1 -1
  21. package/dist/components/CallView/NumberPopover.js.map +1 -1
  22. package/dist/components/CallView/index.js +1 -1
  23. package/dist/components/CallView/index.js.map +1 -1
  24. package/dist/components/ConferenceView/ConferenceUsersList.js +1 -1
  25. package/dist/components/ConferenceView/ConferenceUsersList.js.map +1 -1
  26. package/dist/components/ConferenceView/index.js +1 -1
  27. package/dist/components/ConferenceView/index.js.map +1 -1
  28. package/dist/components/ContactView/ContactListView.js +1 -1
  29. package/dist/components/ContactView/ContactListView.js.map +1 -1
  30. package/dist/components/ContactView/SelectContactNumberView.js +1 -1
  31. package/dist/components/ContactView/SelectContactNumberView.js.map +1 -1
  32. package/dist/components/ContactView/TransferActions.js +1 -1
  33. package/dist/components/ContactView/TransferActions.js.map +1 -1
  34. package/dist/components/Hangup.js +1 -1
  35. package/dist/components/Hangup.js.map +1 -1
  36. package/dist/components/KeypadView/index.js +1 -1
  37. package/dist/components/KeypadView/index.js.map +1 -1
  38. package/dist/components/OperatorBusyView/index.js +1 -1
  39. package/dist/components/OperatorBusyView/index.js.map +1 -1
  40. package/dist/components/PhysicalRecorderView/index.js +1 -1
  41. package/dist/components/PhysicalRecorderView/index.js.map +1 -1
  42. package/dist/components/RecorderView/Actions.js +1 -1
  43. package/dist/components/RecorderView/Actions.js.map +1 -1
  44. package/dist/components/RecorderView/BarsGroup.js.map +1 -1
  45. package/dist/components/RecorderView/index.js +1 -1
  46. package/dist/components/RecorderView/index.js.map +1 -1
  47. package/dist/components/SettingsView/AudioView.js +1 -1
  48. package/dist/components/SettingsView/AudioView.js.map +1 -1
  49. package/dist/components/SettingsView/MicrophoneView.js +1 -1
  50. package/dist/components/SettingsView/MicrophoneView.js.map +1 -1
  51. package/dist/components/SettingsView/SettingsHeader.js +1 -1
  52. package/dist/components/SettingsView/SettingsHeader.js.map +1 -1
  53. package/dist/components/SettingsView/ThemeView.js +1 -1
  54. package/dist/components/SettingsView/ThemeView.js.map +1 -1
  55. package/dist/components/SettingsView/index.js +1 -1
  56. package/dist/components/SettingsView/index.js.map +1 -1
  57. package/dist/components/SideView/SideView.js +1 -1
  58. package/dist/components/SideView/SideView.js.map +1 -1
  59. package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
  60. package/dist/components/Socket.js.map +1 -1
  61. package/dist/components/SwitchDeviceView/index.js +1 -1
  62. package/dist/components/SwitchDeviceView/index.js.map +1 -1
  63. package/dist/components/SwitchInputView/DropdownContent.js +1 -1
  64. package/dist/components/SwitchInputView/DropdownContent.js.map +1 -1
  65. package/dist/components/SwitchInputView/Index.js +1 -1
  66. package/dist/components/TextScroll.js +1 -1
  67. package/dist/components/TextScroll.js.map +1 -1
  68. package/dist/components/TranscriptionView/TranscriptionView.js +1 -1
  69. package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
  70. package/dist/components/VideoStreamingEmptyState/index.js +1 -1
  71. package/dist/components/VideoStreamingEmptyState/index.js.map +1 -1
  72. package/dist/components/VideoStreamingSkeleton/index.js +1 -1
  73. package/dist/components/VideoStreamingSkeleton/index.js.map +1 -1
  74. package/dist/components/VideoView/index.js.map +1 -1
  75. package/dist/components/WebRTC.js.map +1 -1
  76. package/dist/events/SocketEvents.js.map +1 -1
  77. package/dist/lib/i18n.js +1 -1
  78. package/dist/lib/i18n.js.map +1 -1
  79. package/dist/lib/phone/call.js +1 -1
  80. package/dist/lib/phone/call.js.map +1 -1
  81. package/dist/lib/phone/counterpartDevice.js.map +1 -1
  82. package/dist/lib/phone/video.js.map +1 -1
  83. package/dist/lib/player/audio.js.map +1 -1
  84. package/dist/lib/user/default_device.js.map +1 -1
  85. package/dist/lib/user/extensions.js.map +1 -1
  86. package/dist/models/currentCall.js.map +1 -1
  87. package/dist/models/island.js.map +1 -1
  88. package/dist/models/player.js +1 -1
  89. package/dist/models/player.js.map +1 -1
  90. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js +1 -1
  91. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js.map +1 -1
  92. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
  93. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
  94. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
  95. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
  96. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
  97. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
  98. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
  99. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
  100. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
  101. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
  102. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js +1 -1
  103. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js.map +1 -1
  104. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js +1 -1
  105. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js.map +1 -1
  106. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
  107. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
  108. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
  109. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
  110. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
  111. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
  112. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js +1 -1
  113. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js.map +1 -1
  114. package/dist/node_modules/i18next/dist/esm/i18next.js +1 -1
  115. package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
  116. package/dist/node_modules/js-base64/base64.mjs.js +1 -1
  117. package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
  118. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
  119. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
  120. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
  121. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
  122. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
  123. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
  124. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js +1 -1
  125. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js.map +1 -1
  126. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
  127. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
  128. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
  129. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
  130. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
  131. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
  132. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
  133. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
  134. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
  135. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
  136. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
  137. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js +1 -1
  138. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
  139. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js +1 -1
  140. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js.map +1 -1
  141. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
  142. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
  143. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js +1 -1
  144. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js.map +1 -1
  145. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
  146. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
  147. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js +1 -1
  148. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js.map +1 -1
  149. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js.map +1 -1
  150. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js +1 -1
  151. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js.map +1 -1
  152. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js +2 -0
  153. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js.map +1 -0
  154. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
  155. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
  156. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js +1 -1
  157. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
  158. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
  159. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
  160. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js +1 -1
  161. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
  162. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js +1 -1
  163. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js.map +1 -1
  164. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +1 -1
  165. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
  166. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +1 -1
  167. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -1
  168. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +1 -1
  169. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -1
  170. package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js +2 -0
  171. package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js.map +1 -0
  172. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js +1 -1
  173. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +1 -1
  174. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js +1 -1
  175. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -1
  176. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
  177. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
  178. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js +1 -1
  179. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js.map +1 -1
  180. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js +1 -1
  181. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
  182. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js +1 -1
  183. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js.map +1 -1
  184. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
  185. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
  186. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js +1 -1
  187. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
  188. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +1 -1
  189. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -1
  190. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js +1 -1
  191. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js.map +1 -1
  192. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
  193. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
  194. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js +2 -0
  195. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js.map +1 -0
  196. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
  197. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
  198. package/dist/node_modules/motion-dom/dist/es/utils/is-ref-object.mjs.js.map +1 -0
  199. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
  200. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
  201. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js +1 -1
  202. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js.map +1 -1
  203. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
  204. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
  205. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
  206. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js +1 -1
  207. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js.map +1 -1
  208. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
  209. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
  210. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js +1 -1
  211. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js.map +1 -1
  212. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js +1 -1
  213. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js.map +1 -1
  214. package/dist/node_modules/react-i18next/dist/es/context.js +1 -1
  215. package/dist/node_modules/react-i18next/dist/es/context.js.map +1 -1
  216. package/dist/node_modules/react-i18next/dist/es/defaults.js +1 -1
  217. package/dist/node_modules/react-i18next/dist/es/defaults.js.map +1 -1
  218. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +1 -1
  219. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js.map +1 -1
  220. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +1 -1
  221. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js.map +1 -1
  222. package/dist/node_modules/react-i18next/dist/es/unescape.js +1 -1
  223. package/dist/node_modules/react-i18next/dist/es/unescape.js.map +1 -1
  224. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +1 -1
  225. package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
  226. package/dist/node_modules/react-i18next/dist/es/utils.js +1 -1
  227. package/dist/node_modules/react-i18next/dist/es/utils.js.map +1 -1
  228. package/dist/package.json.js +1 -1
  229. package/dist/services/astproxy.js +1 -1
  230. package/dist/services/astproxy.js.map +1 -1
  231. package/dist/services/phonebook.js +1 -1
  232. package/dist/services/phonebook.js.map +1 -1
  233. package/dist/utils/customHooks/useLocalStorage.js.map +1 -1
  234. package/dist/utils/deviceUtils.js.map +1 -1
  235. package/package.json +10 -5
  236. package/dist/_virtual/arrayLikeToArray.js +0 -2
  237. package/dist/_virtual/arrayLikeToArray.js.map +0 -1
  238. package/dist/_virtual/arrayWithHoles.js +0 -2
  239. package/dist/_virtual/arrayWithHoles.js.map +0 -1
  240. package/dist/_virtual/classCallCheck.js +0 -2
  241. package/dist/_virtual/classCallCheck.js.map +0 -1
  242. package/dist/_virtual/createClass.js +0 -2
  243. package/dist/_virtual/createClass.js.map +0 -1
  244. package/dist/_virtual/defineProperty.js +0 -2
  245. package/dist/_virtual/defineProperty.js.map +0 -1
  246. package/dist/_virtual/iterableToArrayLimit.js +0 -2
  247. package/dist/_virtual/iterableToArrayLimit.js.map +0 -1
  248. package/dist/_virtual/nonIterableRest.js +0 -2
  249. package/dist/_virtual/nonIterableRest.js.map +0 -1
  250. package/dist/_virtual/objectWithoutProperties.js +0 -2
  251. package/dist/_virtual/objectWithoutProperties.js.map +0 -1
  252. package/dist/_virtual/objectWithoutPropertiesLoose.js +0 -2
  253. package/dist/_virtual/objectWithoutPropertiesLoose.js.map +0 -1
  254. package/dist/_virtual/slicedToArray.js +0 -2
  255. package/dist/_virtual/slicedToArray.js.map +0 -1
  256. package/dist/_virtual/toPrimitive.js +0 -2
  257. package/dist/_virtual/toPrimitive.js.map +0 -1
  258. package/dist/_virtual/toPropertyKey.js +0 -2
  259. package/dist/_virtual/toPropertyKey.js.map +0 -1
  260. package/dist/_virtual/typeof.js +0 -2
  261. package/dist/_virtual/typeof.js.map +0 -1
  262. package/dist/_virtual/unsupportedIterableToArray.js +0 -2
  263. package/dist/_virtual/unsupportedIterableToArray.js.map +0 -1
  264. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -2
  265. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js.map +0 -1
  266. package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -2
  267. package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js.map +0 -1
  268. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -2
  269. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js.map +0 -1
  270. package/dist/node_modules/@babel/runtime/helpers/createClass.js +0 -2
  271. package/dist/node_modules/@babel/runtime/helpers/createClass.js.map +0 -1
  272. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js +0 -2
  273. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js.map +0 -1
  274. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -2
  275. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +0 -1
  276. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -2
  277. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +0 -1
  278. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -2
  279. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +0 -1
  280. package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -2
  281. package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js.map +0 -1
  282. package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -2
  283. package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js.map +0 -1
  284. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -2
  285. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +0 -1
  286. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -2
  287. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +0 -1
  288. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -2
  289. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js.map +0 -1
  290. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -2
  291. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
  292. package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -2
  293. package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js.map +0 -1
  294. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -2
  295. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +0 -1
  296. package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -2
  297. package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js.map +0 -1
  298. package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -2
  299. package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js.map +0 -1
  300. package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -2
  301. package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js.map +0 -1
  302. package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -2
  303. package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js.map +0 -1
  304. package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -2
  305. package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js.map +0 -1
  306. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -2
  307. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js.map +0 -1
  308. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -2
  309. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js.map +0 -1
  310. package/dist/node_modules/@babel/runtime/helpers/typeof.js +0 -2
  311. package/dist/node_modules/@babel/runtime/helpers/typeof.js.map +0 -1
  312. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -2
  313. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +0 -1
  314. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js +0 -2
  315. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +0 -1
  316. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.js.map +0 -1
  317. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js +0 -2
  318. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js.map +0 -1
  319. package/dist/node_modules/void-elements/index.js +0 -2
  320. package/dist/node_modules/void-elements/index.js.map +0 -1
  321. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/is-ref-object.mjs.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"transform.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/styles/transform.mjs"],"sourcesContent":["function buildProjectionTransform(delta, treeScale, latestTransform) {\n let transform = \"\";\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x;\n const yTranslate = delta.y.translate / treeScale.y;\n const zTranslate = latestTransform?.z || 0;\n if (xTranslate || yTranslate || zTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `;\n }\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;\n }\n if (latestTransform) {\n const { transformPerspective, rotate, pathRotation, rotateX, rotateY, rotateZ, skewX, skewY, } = latestTransform;\n if (transformPerspective)\n transform = `perspective(${transformPerspective}px) ${transform}`;\n if (rotate)\n transform += `rotate(${rotate}deg) `;\n // Additive `rotate()` so user `rotate` isn't clobbered.\n if (pathRotation)\n transform += `rotate(${pathRotation}deg) `;\n if (rotateX)\n transform += `rotateX(${rotateX}deg) `;\n if (rotateY)\n transform += `rotateY(${rotateY}deg) `;\n if (rotateZ)\n transform += `rotateZ(${rotateZ}deg) `;\n if (skewX)\n transform += `skewX(${skewX}deg) `;\n if (skewY)\n transform += `skewY(${skewY}deg) `;\n }\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x;\n const elementScaleY = delta.y.scale * treeScale.y;\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`;\n }\n return transform || \"none\";\n}\n\nexport { buildProjectionTransform };\n//# sourceMappingURL=transform.mjs.map\n"],"names":["buildProjectionTransform","delta","treeScale","latestTransform","transform","xTranslate","x","translate","yTranslate","y","zTranslate","z","transformPerspective","rotate","pathRotation","rotateX","rotateY","rotateZ","skewX","skewY","elementScaleX","scale","elementScaleY"],"mappings":"qGAGgBA,SACZC,EACAC,EACAC,GAEA,IAAIC,EAAY,GAQhB,MAAMC,EAAaJ,EAAMK,EAAEC,UAAYL,EAAUI,EAC3CE,EAAaP,EAAMQ,EAAEF,UAAYL,EAAUO,EAC3CC,EAAaP,GAAiBQ,GAAK,EAazC,IAZIN,GAAcG,GAAcE,KAC5BN,EAAY,eAAeC,QAAiBG,QAAiBE,SAO7C,IAAhBR,EAAUI,GAA2B,IAAhBJ,EAAUO,IAC/BL,GAAa,SAAS,EAAIF,EAAUI,MAAM,EAAIJ,EAAUO,OAGxDN,EAAiB,CACjB,MAAMS,qBACFA,EAAoBC,OACpBA,EAAMC,aACNA,EAAYC,QACZA,EAAOC,QACPA,EAAOC,QACPA,EAAOC,MACPA,EAAKC,MACLA,GACAhB,EACAS,IACAR,EAAY,eAAeQ,QAA2BR,KACtDS,IAAQT,GAAa,UAAUS,UAE/BC,IAAcV,GAAa,UAAUU,UACrCC,IAASX,GAAa,WAAWW,UACjCC,IAASZ,GAAa,WAAWY,UACjCC,IAASb,GAAa,WAAWa,UACjCC,IAAOd,GAAa,SAASc,UAC7BC,IAAOf,GAAa,SAASe,SACrC,CAMA,MAAMC,EAAgBnB,EAAMK,EAAEe,MAAQnB,EAAUI,EAC1CgB,EAAgBrB,EAAMQ,EAAEY,MAAQnB,EAAUO,EAKhD,OAJsB,IAAlBW,GAAyC,IAAlBE,IACvBlB,GAAa,SAASgB,MAAkBE,MAGrClB,GAAa,MACxB"}
1
+ {"version":3,"file":"transform.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/styles/transform.mjs"],"sourcesContent":["import { angleTransforms } from '../utils/has-transform.mjs';\n\nfunction buildProjectionTransform(delta, treeScale, latestTransform) {\n let transform = \"\";\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x;\n const yTranslate = delta.y.translate / treeScale.y;\n const zTranslate = latestTransform?.z || 0;\n if (xTranslate || yTranslate || zTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `;\n }\n let angles = \"\";\n if (latestTransform) {\n const { transformPerspective } = latestTransform;\n if (transformPerspective)\n transform = `perspective(${transformPerspective}px) ${transform}`;\n for (let i = 0; i < angleTransforms.length; i++) {\n const key = angleTransforms[i];\n const value = latestTransform[key];\n if (value)\n angles += `${key}(${value}deg) `;\n // Additive `rotate()` so user `rotate` isn't clobbered.\n if (!i && latestTransform.pathRotation)\n angles += `rotate(${latestTransform.pathRotation}deg) `;\n }\n }\n if (angles) {\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;\n }\n transform += angles;\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x;\n const elementScaleY = delta.y.scale * treeScale.y;\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`;\n }\n }\n else if (delta.x.scale !== 1 || delta.y.scale !== 1) {\n /**\n * With no rotation or skew between them, the tree scale correction\n * (1 / treeScale) and the element scale (delta.scale * treeScale)\n * combine into a single scale. A shorter transform is quicker for\n * the browser to parse, which matters when it's set every frame.\n */\n transform += `scale(${delta.x.scale}, ${delta.y.scale})`;\n }\n else if (!transform && (treeScale.x !== 1 || treeScale.y !== 1)) {\n /**\n * Inside a scaled tree the transform must never be \"none\", even when\n * this element's own delta is the identity: scale correction for\n * borderRadius and boxShadow is skipped for \"none\", and the element\n * would gain and lose its stacking context as the delta snaps.\n */\n transform = \"scale(1, 1)\";\n }\n return transform || \"none\";\n}\n\nexport { buildProjectionTransform };\n//# sourceMappingURL=transform.mjs.map\n"],"names":["buildProjectionTransform","delta","treeScale","latestTransform","transform","xTranslate","x","translate","yTranslate","y","zTranslate","z","angles","transformPerspective","i","angleTransforms","length","key","value","pathRotation","elementScaleX","scale","elementScaleY"],"mappings":"oJAIgBA,SACZC,EACAC,EACAC,GAEA,IAAIC,EAAY,GAQhB,MAAMC,EAAaJ,EAAMK,EAAEC,UAAYL,EAAUI,EAC3CE,EAAaP,EAAMQ,EAAEF,UAAYL,EAAUO,EAC3CC,EAAaP,GAAiBQ,GAAK,GACrCN,GAAcG,GAAcE,KAC5BN,EAAY,eAAeC,QAAiBG,QAAiBE,SAGjE,IAAIE,EAAS,GACb,GAAIT,EAAiB,CACjB,MAAMU,qBAAEA,GAAyBV,EAC7BU,IACAT,EAAY,eAAeS,QAA2BT,KAE1D,IAAK,IAAIU,EAAI,EAAGA,EAAIC,EAAAA,gBAAgBC,OAAQF,IAAK,CAC7C,MAAMG,EAAMF,kBAAgBD,GACtBI,EAAQf,EAAgBc,GAC1BC,IAAON,GAAU,GAAGK,KAAOC,WAE1BJ,GAAKX,EAAgBgB,eACtBP,GAAU,UAAUT,EAAgBgB,oBAC5C,CACJ,CAEA,GAAIP,EAAQ,CAKY,IAAhBV,EAAUI,GAA2B,IAAhBJ,EAAUO,IAC/BL,GAAa,SAAS,EAAIF,EAAUI,MAAM,EAAIJ,EAAUO,OAG5DL,GAAaQ,EAMb,MAAMQ,EAAgBnB,EAAMK,EAAEe,MAAQnB,EAAUI,EAC1CgB,EAAgBrB,EAAMQ,EAAEY,MAAQnB,EAAUO,EAC1B,IAAlBW,GAAyC,IAAlBE,IACvBlB,GAAa,SAASgB,MAAkBE,KAEhD,MAA6B,IAAlBrB,EAAMK,EAAEe,OAAiC,IAAlBpB,EAAMQ,EAAEY,MAOtCjB,GAAa,SAASH,EAAMK,EAAEe,UAAUpB,EAAMQ,EAAEY,SACxCjB,GAA8B,IAAhBF,EAAUI,GAA2B,IAAhBJ,EAAUO,IAOrDL,EAAY,eAGhB,OAAOA,GAAa,MACxB"}
@@ -1,2 +1,2 @@
1
- "use strict";function e(e){return void 0===e||1===e}function t({scale:t,scaleX:r,scaleY:n}){return!e(t)||!e(r)||!e(n)}function r(e){return n(e.x)||n(e.y)}function n(e){return e&&"0%"!==e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.has2DTranslate=r,exports.hasScale=t,exports.hasTransform=function(e){return t(e)||r(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY};
1
+ "use strict";function t(t){return void 0===t||1===t}function e({scale:e,scaleX:r,scaleY:o}){return!t(e)||!t(r)||!t(o)}Object.defineProperty(exports,"__esModule",{value:!0});function r(t){return t.z||t.rotate||t.rotateX||t.rotateY||t.rotateZ||t.skewX||t.skewY}function o(t){return s(t.x)||s(t.y)}function s(t){return t&&"0%"!==t}exports.angleTransforms=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"],exports.has2DTranslate=o,exports.hasDistortingTransform=r,exports.hasScale=e,exports.hasTransform=function(t){return e(t)||o(t)||r(t)};
2
2
  //# sourceMappingURL=has-transform.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"has-transform.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs"],"sourcesContent":["function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale({ scale, scaleX, scaleY }) {\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n has2DTranslate(values) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY ||\n values.rotateZ ||\n values.skewX ||\n values.skewY);\n}\nfunction has2DTranslate(values) {\n return is2DTranslate(values.x) || is2DTranslate(values.y);\n}\nfunction is2DTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { has2DTranslate, hasScale, hasTransform };\n//# sourceMappingURL=has-transform.mjs.map\n"],"names":["isIdentityScale","scale","undefined","hasScale","scaleX","scaleY","has2DTranslate","values","is2DTranslate","x","y","value","z","rotate","rotateX","rotateY","rotateZ","skewX","skewY"],"mappings":"aAGA,SAASA,EAAgBC,GACrB,YAAiBC,IAAVD,GAAiC,IAAVA,CAClC,CAEM,SAAUE,GAASF,MAAEA,EAAKG,OAAEA,EAAMC,OAAEA,IACtC,OACKL,EAAgBC,KAChBD,EAAgBI,KAChBJ,EAAgBK,EAEzB,CAgBM,SAAUC,EAAeC,GAC3B,OAAOC,EAAcD,EAAOE,IAAMD,EAAcD,EAAOG,EAC3D,CAEA,SAASF,EAAcG,GACnB,OAAOA,GAAmB,OAAVA,CACpB,yHApBM,SAAuBJ,GACzB,OACIJ,EAASI,IACTD,EAAeC,IACfA,EAAOK,GACPL,EAAOM,QACPN,EAAOO,SACPP,EAAOQ,SACPR,EAAOS,SACPT,EAAOU,OACPV,EAAOW,KAEf"}
1
+ {"version":3,"file":"has-transform.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs"],"sourcesContent":["function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale({ scale, scaleX, scaleY }) {\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\n/**\n * Rotations and skews, which projection can't correct for.\n */\nconst angleTransforms = [\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skewX\",\n \"skewY\",\n];\nfunction hasTransform(values) {\n return (hasScale(values) ||\n has2DTranslate(values) ||\n hasDistortingTransform(values));\n}\nfunction hasDistortingTransform(values) {\n return (values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY ||\n values.rotateZ ||\n values.skewX ||\n values.skewY);\n}\nfunction has2DTranslate(values) {\n return is2DTranslate(values.x) || is2DTranslate(values.y);\n}\nfunction is2DTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { angleTransforms, has2DTranslate, hasDistortingTransform, hasScale, hasTransform };\n//# sourceMappingURL=has-transform.mjs.map\n"],"names":["isIdentityScale","scale","undefined","hasScale","scaleX","scaleY","hasDistortingTransform","values","z","rotate","rotateX","rotateY","rotateZ","skewX","skewY","has2DTranslate","is2DTranslate","x","y","value"],"mappings":"aAGA,SAASA,EAAgBC,GACrB,YAAiBC,IAAVD,GAAiC,IAAVA,CAClC,CAEM,SAAUE,GAASF,MAAEA,EAAKG,OAAEA,EAAMC,OAAEA,IACtC,OACKL,EAAgBC,KAChBD,EAAgBI,KAChBJ,EAAgBK,EAEzB,wDAsBM,SAAUC,EAAuBC,GACnC,OACIA,EAAOC,GACPD,EAAOE,QACPF,EAAOG,SACPH,EAAOI,SACPJ,EAAOK,SACPL,EAAOM,OACPN,EAAOO,KAEf,CAEM,SAAUC,EAAeR,GAC3B,OAAOS,EAAcT,EAAOU,IAAMD,EAAcT,EAAOW,EAC3D,CAEA,SAASF,EAAcG,GACnB,OAAOA,GAAmB,OAAVA,CACpB,yBAnC+B,CAC3B,SACA,UACA,UACA,UACA,QACA,2GAGE,SAAuBZ,GACzB,OACIJ,EAASI,IACTQ,EAAeR,IACfD,EAAuBC,EAE/B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../geometry/conversion.mjs.js"),t=require("../geometry/delta-apply.mjs.js");function o(t,o){return e.convertBoundingBoxToBox(e.transformBoxPoints(t.getBoundingClientRect(),o))}exports.measurePageBox=function(e,r,s){const n=o(e,s),{scroll:i}=r;return i&&(t.translateAxis(n.x,i.offset.x),t.translateAxis(n.y,i.offset.y)),n},exports.measureViewportBox=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../geometry/conversion.mjs.js"),o=require("../geometry/delta-apply.mjs.js");function t(o,t){return e.convertBoundingBoxToBox(e.transformBoxPoints(o.getBoundingClientRect(),t))}exports.measureDocumentScroll=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),exports.measurePageBox=function(e,r,n){const s=t(e,n),{scroll:c}=r;return c&&(o.translateAxis(s.x,c.offset.x),o.translateAxis(s.y,c.offset.y)),s},exports.measureViewportBox=t;
2
2
  //# sourceMappingURL=measure.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"measure.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/utils/measure.mjs"],"sourcesContent":["import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n//# sourceMappingURL=measure.mjs.map\n"],"names":["measureViewportBox","instance","transformPoint","convertBoundingBoxToBox","transformBoxPoints","getBoundingClientRect","measurePageBox","element","rootProjectionNode","transformPagePoint","viewportBox","scroll","translateAxis","x","offset","y"],"mappings":"+JAOM,SAAUA,EACZC,EACAC,GAEA,OAAOC,EAAAA,wBACHC,EAAAA,mBAAmBH,EAASI,wBAAyBH,GAE7D,wBAEgBI,SACZC,EACAC,EACAC,GAEA,MAAMC,EAAcV,EAAmBO,EAASE,IAC1CE,OAAEA,GAAWH,EAOnB,OALIG,IACAC,EAAaA,cAACF,EAAYG,EAAGF,EAAOG,OAAOD,GAC3CD,EAAaA,cAACF,EAAYK,EAAGJ,EAAOG,OAAOC,IAGxCL,CACX"}
1
+ {"version":3,"file":"measure.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/utils/measure.mjs"],"sourcesContent":["import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\nconst measureDocumentScroll = () => ({\n x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,\n y: document.documentElement.scrollTop || document.body?.scrollTop || 0,\n});\n\nexport { measureDocumentScroll, measurePageBox, measureViewportBox };\n//# sourceMappingURL=measure.mjs.map\n"],"names":["measureViewportBox","instance","transformPoint","convertBoundingBoxToBox","transformBoxPoints","getBoundingClientRect","measureDocumentScroll","x","document","documentElement","scrollLeft","body","y","scrollTop","measurePageBox","element","rootProjectionNode","transformPagePoint","viewportBox","scroll","translateAxis","offset"],"mappings":"+JAOM,SAAUA,EACZC,EACAC,GAEA,OAAOC,EAAAA,wBACHC,EAAAA,mBAAmBH,EAASI,wBAAyBH,GAE7D,+BAkBqCI,KAAO,CACxCC,EAAGC,SAASC,gBAAgBC,YAAcF,SAASG,MAAMD,YAAc,EACvEE,EAAGJ,SAASC,gBAAgBI,WAAaL,SAASG,MAAME,WAAa,2BAlBzDC,SACZC,EACAC,EACAC,GAEA,MAAMC,EAAclB,EAAmBe,EAASE,IAC1CE,OAAEA,GAAWH,EAOnB,OALIG,IACAC,EAAaA,cAACF,EAAYX,EAAGY,EAAOE,OAAOd,GAC3Ca,EAAaA,cAACF,EAAYN,EAAGO,EAAOE,OAAOT,IAGxCM,CACX"}
@@ -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("../animation/waapi/transforms/groups.mjs.js"),r=require("../frameloop/microtask.mjs.js"),n=require("../frameloop/sync-time.mjs.js"),o=require("../projection/geometry/models.mjs.js"),a=require("../value/index.mjs.js"),u=require("../value/types/complex/index.mjs.js"),h=require("../value/types/utils/animatable-none.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/reduced-motion/state.mjs.js"),V=require("../frameloop/frame.mjs.js"),g=require("../../../../motion-utils/dist/es/warn-once.mjs.js"),j=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),M=require("../../../../motion-utils/dist/es/is-numerical-string.mjs.js"),S=require("../../../../motion-utils/dist/es/is-zero-value-string.mjs.js"),y=require("../../../../motion-utils/dist/es/subscription-manager.mjs.js");const C=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let b={};exports.VisualElement=class{scrapeMotionValuesFromProps(e,t,s){return{}}constructor({parent:t,props:s,presenceContext:i,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:a,visualState:u},h={}){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=n.time.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,V.frame.render(this.render,!1,!0))};const{latestValues:d,renderState:c}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=s.initial?{...d}:{},this.renderState=c,this.parent=t,this.props=s,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=h,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=p.isControllingVariants(s),this.isVariantNode=p.isVariantNode(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:m,...v}=this.scrapeMotionValuesFromProps(s,{},this);for(const e in v){const t=v[e];void 0!==d[e]&&l.isMotionValue(t)&&t.set(d[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];if(this.current=e,d.visualElementStore.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do{e=!1!==e.props.inherit&&e.parent}while(e&&!e.isVariantNode);if(e){const{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(f.hasReducedMotionListener.current||v.initPrefersReducedMotion(),this.shouldReduceMotion=f.prefersReducedMotion.current),"production"!==process.env.NODE_ENV&&g.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(),V.cancelFrame(this.notifyUpdate),V.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,r){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),r.accelerate&&s.acceleratedValues.has(e)&&this.current instanceof HTMLElement){const{factory:s,keyframes:i,times:n,ease:o,duration:a}=r.accelerate,u=new t.NativeAnimation({element:this.current,name:e,keyframes:i,times:n,ease:o,duration:j.secondsToMilliseconds(a)}),h=s(u);return void this.valueSubscriptions.set(e,()=>{h(),u.cancel()})}const n=c.transformProps.has(e);n&&this.onBindTransform&&this.onBindTransform();const o=r.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&V.frame.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),i.transformGroups.get(this.current)?.check()),this.scheduleRender()});let a;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,r)),this.valueSubscriptions.set(e,()=>{o(),a&&a()})}sortNodePosition(e){return this.current&&e.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in b){const t=b[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):o.createBox()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){const{transformTemplate:s,onUpdate:r}=this.props;(e.transformTemplate||s)&&this.scheduleRender(),(e.transformTemplate&&!s||e.onUpdate&&!r)&&i.transformGroups.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<C.length;t++){const s=C[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}addValue(e,t){const s=this.values.get(e);if(t!==s){s&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);const i=t.get();void 0!==i&&(this.latestValues[e]=i)}}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=a.motionValue(t??this.getDefaultValue?.(e),{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&&(M.isNumericalString(s)||S.isZeroValueString(s))?s=parseFloat(s):"number"!=typeof s&&!u.complex.test(s)&&u.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}on(e,t){return this.events[e]||(this.events[e]=new y.SubscriptionManager),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){r.microtask.render(this.render)}},exports.getFeatureDefinitions=function(){return b},exports.setFeatureDefinitions=function(e){b=e};
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("../animation/waapi/transforms/groups.mjs.js"),n=require("../frameloop/microtask.mjs.js"),r=require("../frameloop/sync-time.mjs.js"),o=require("../projection/geometry/models.mjs.js"),a=require("../value/index.mjs.js"),u=require("../value/types/complex/index.mjs.js"),h=require("../value/types/utils/animatable-none.mjs.js"),l=require("../value/utils/is-motion-value.mjs.js"),d=require("./store.mjs.js"),c=require("./utils/is-controlling-variants.mjs.js"),p=require("./utils/keys-transform.mjs.js"),m=require("./utils/motion-values.mjs.js"),f=require("./utils/reduced-motion/index.mjs.js"),v=require("./utils/reduced-motion/state.mjs.js"),V=require("../frameloop/frame.mjs.js"),g=require("../../../../motion-utils/dist/es/warn-once.mjs.js"),j=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),M=require("../../../../motion-utils/dist/es/is-numerical-string.mjs.js"),S=require("../../../../motion-utils/dist/es/is-zero-value-string.mjs.js"),y=require("../../../../motion-utils/dist/es/subscription-manager.mjs.js");const C=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let b={};exports.VisualElement=class{scrapeMotionValuesFromProps(e,t,s){return{}}constructor({parent:t,props:s,presenceContext:i,reducedMotionConfig:n,skipAnimations:o,blockInitialAnimation:a,visualState:u},h={}){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,V.frame.render(this.render,!1,!0))};const{latestValues:d,renderState:p}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=s.initial?{...d}:{},this.renderState=p,this.parent=t,this.props=s,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=o,this.options=h,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=c.isControllingVariants(s),this.isVariantNode=c.isVariantNode(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:m,...f}=this.scrapeMotionValuesFromProps(s,{},this);for(const e in f){const t=f[e];void 0!==d[e]&&l.isMotionValue(t)&&t.set(d[e])}}mount(e){const t=this.presenceContext;if(this.hasBeenMounted&&!1!==t?.isPresent&&!t?.keepValuesOnRemount)for(const e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,d.visualElementStore.set(e,this),this.projection?.instance||this.projection?.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do{e=!1!==e.props.inherit&&e.parent}while(e&&!e.isVariantNode);if(e){const{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(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||f.initPrefersReducedMotion(),this.shouldReduceMotion=v.prefersReducedMotion.current),"production"!==process.env.NODE_ENV&&g.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?.unmount(),V.cancelFrame(this.notifyUpdate),V.cancelFrame(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),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)).add(e)}removeChild(e){this.children.delete(e),this.enteringChildren?.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.get(e)?.(),n.accelerate&&s.acceleratedValues.has(e)&&this.current instanceof HTMLElement){const{factory:s,keyframes:i,times:r,ease:o,duration:a}=n.accelerate,u=new t.NativeAnimation({element:this.current,name:e,keyframes:i,times:r,ease:o,duration:j.secondsToMilliseconds(a)}),h=s(u);return void this.valueSubscriptions.set(e,()=>{h(),u.cancel()})}const r=p.transformProps.has(e);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&V.frame.preRender(this.notifyUpdate),r&&(this.projection&&(this.projection.isTransformDirty=!0),i.transformGroups.get(this.current)?.check()),this.scheduleRender()});let a;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{o(),a?.()})}sortNodePosition(e){return this.current&&e.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in b){const t=b[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):o.createBox()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){const{transformTemplate:s,onUpdate:n}=this.props;(e.transformTemplate||s)&&this.scheduleRender(),(e.transformTemplate&&!s||e.onUpdate&&!n)&&i.transformGroups.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<C.length;t++){const s=C[t];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?.()}getProps(){return this.props}getVariant(e){return this.props.variants?.[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){const s=this.values.get(e);if(t!==s){s&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);const i=t.get();void 0!==i&&(this.latestValues[e]=i)}}removeValue(e){this.values.delete(e),this.valueSubscriptions.get(e)?.(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){let s=this.props.values?.[e];return s||(s=this.values.get(e),void 0===s&&void 0!==t&&(s=a.motionValue(t??this.getDefaultValue?.(e),{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&&(M.isNumericalString(s)||S.isZeroValueString(s))?s=parseFloat(s):"number"!=typeof s&&!u.complex.test(s)&&u.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}on(e,t){return(this.events[e]||(this.events[e]=new y.SubscriptionManager)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){n.microtask.render(this.render)}},exports.getFeatureDefinitions=function(){return b},exports.setFeatureDefinitions=function(e){b=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 { transformGroups } from '../animation/waapi/transforms/groups.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 { 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 { 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 /**\n * Join the closest variant node above, so its variant changes\n * propagate here, unless inherit={false} cuts the chain.\n */\n if (this.isVariantNode && !this.isControllingVariants) {\n let node = this;\n do\n node = node.props.inherit !== false && node.parent;\n while (node && !node.isVariantNode);\n if (node) {\n const { variantChildren } = node;\n variantChildren.add(this);\n this.removeFromVariantTree = () => variantChildren.delete(this);\n }\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) {\n if (this.projection) {\n this.projection.isTransformDirty = true;\n }\n transformGroups.get(this.current)?.check();\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 either node isn't mounted, or they aren't even of the same type,\n * we can't compare their document order.\n */\n if (!this.current ||\n !other.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 const { transformTemplate, onUpdate } = this.props;\n if (props.transformTemplate || transformTemplate) {\n this.scheduleRender();\n }\n /**\n * Transforms on the compositor can't use a new transformTemplate\n * or onUpdate, so move them to the main thread.\n */\n if ((props.transformTemplate && !transformTemplate) ||\n (props.onUpdate && !onUpdate)) {\n transformGroups.get(this.current)?.demote();\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 /**\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 /**\n * An animated value with no base value is undefined until the\n * keyframe resolver reads its origin. Rendering it before then\n * writes an invalid placeholder (e.g. points=\"undefined\") that\n * the resolver can read back from the DOM as the origin.\n */\n const latest = value.get();\n if (latest !== undefined)\n this.latestValues[key] = latest;\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 ?? this.getDefaultValue?.(key), {\n owner: this,\n });\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 (\n /**\n * If the value as read isn't animatable (e.g. \"none\") but\n * the target is, derive an animatable none from the target.\n * A value is animatable if it's a number or contains a\n * number or color, which is cheaper to check than trying\n * every value type in turn.\n */\n typeof value !== \"number\" &&\n !complex.test(value) &&\n 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 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","parent","props","presenceContext","reducedMotionConfig","skipAnimations","blockInitialAnimation","visualState","options","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","undefined","isMotionValue","set","mount","instance","get","jump","visualElementStore","node","inherit","add","removeFromVariantTree","delete","forEach","bindToMotionValue","hasReducedMotionListener","initPrefersReducedMotion","prefersReducedMotion","process","env","NODE_ENV","warnOnce","addChild","update","unmount","cancelFrame","remove","clear","removeChild","feature","isMounted","child","enteringChildren","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","transformGroups","check","removeSyncCheck","window","MotionCheckAppearSync","sortNodePosition","other","sortInstanceNodePosition","type","updateFeatures","featureDefinition","isEnabled","Feature","FeatureConstructor","build","measureViewportBox","measureInstanceViewportBox","createBox","getStaticValue","setStaticValue","transformTemplate","demote","prevProps","prevPresenceContext","i","length","listener","updateMotionValuesFromProps","handleChildMotionValue","getProps","getVariant","variants","getDefaultTransition","transition","getTransformPagePoint","transformPagePoint","addValue","existingValue","removeValue","latest","unsubscribe","removeValueFromRenderState","hasValue","getValue","defaultValue","motionValue","getDefaultValue","owner","readValue","target","getBaseTargetFromProps","readValueFromInstance","isNumericalString","isZeroValueString","parseFloat","complex","test","getAnimatableNone","setBaseTarget","eventName","callback","SubscriptionManager","args","scheduleRenderMicrotask","microtask","getFeatureDefinitions","definitions"],"mappings":"swCA8CA,MAAMA,EAAoB,CACtB,iBACA,oBACA,SACA,sBACA,gBACA,uBACA,2BAMJ,IAAIC,EAAkD,CAAA,8BAuIlDC,2BAAAA,CACIC,EACAC,EACAC,GAIA,MAAO,EACX,CA8LAC,WAAAA,EACIC,OACIA,EAAMC,MACNA,EAAKC,gBACLA,EAAeC,oBACfA,EAAmBC,eACnBA,EAAcC,sBACdA,EAAqBC,YACrBA,GAEJC,EAAmB,CAAA,GAlMvBC,KAAAC,QAA2B,KAU3BD,KAAAE,SAAW,IAAIC,IA4BfH,KAAAI,eAAyB,EACzBJ,KAAAK,uBAAiC,EAgBjCL,K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,EAAK3C,KAAKD,SAFnDC,KAAKmB,aAAawB,GA6B5B,OAzBIC,UAEqB,iBAAVA,IACN+G,EAAiBA,kBAAC/G,IAAUgH,EAAiBA,kBAAChH,IAG/CA,EAAQiH,WAAWjH,GASF,iBAAVA,IACNkH,UAAQC,KAAKnH,IACdkH,EAAOA,QAACC,KAAKP,KAEb5G,EAAQoH,EAAiBA,kBAACrH,EAAK6G,IAGnCxJ,KAAKiK,cAActH,EAAKG,gBAAcF,GAASA,EAAMM,MAAQN,IAG1DE,EAAAA,cAAcF,GAASA,EAAMM,MAAQN,CAChD,CAMAqH,aAAAA,CAActH,EAAaC,GACvB5C,KAAK+B,WAAWY,GAAOC,CAC3B,CAEAsD,EAAAA,CACIgE,EACAC,GAMA,OAJKnK,KAAKe,OAAOmJ,KACblK,KAAKe,OAAOmJ,GAAa,IAAIE,EAAmBA,qBAG7CpK,KAAKe,OAAOmJ,GAAW3G,IAAI4G,EACtC,CAEAjJ,MAAAA,CACIgJ,KACGG,GAECrK,KAAKe,OAAOmJ,IACZlK,KAAKe,OAAOmJ,GAAWhJ,UAAUmJ,EAEzC,CAEAC,uBAAAA,GACIC,EAAAA,UAAUnJ,OAAOpB,KAAKoB,OAC1B,iCAh3BYoJ,WACZ,OAAOtL,CACX,gCAXM,SACFuL,GAEAvL,EAAqBuL,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 { transformGroups } from '../animation/waapi/transforms/groups.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 { 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 { 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, unless\n * the presence asks to keep them or the element is only shown\n * again to exit (#4049).\n */\n const presence = this.presenceContext;\n if (this.hasBeenMounted &&\n presence?.isPresent !== false &&\n !presence?.keepValuesOnRemount) {\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 this.projection?.instance || this.projection?.mount(instance);\n /**\n * Join the closest variant node above, so its variant changes\n * propagate here, unless inherit={false} cuts the chain.\n */\n if (this.isVariantNode && !this.isControllingVariants) {\n let node = this;\n do\n node = node.props.inherit !== false && node.parent;\n while (node && !node.isVariantNode);\n if (node) {\n const { variantChildren } = node;\n variantChildren.add(this);\n this.removeFromVariantTree = () => variantChildren.delete(this);\n }\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?.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n 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())).add(child);\n }\n removeChild(child) {\n this.children.delete(child);\n this.enteringChildren?.delete(child);\n }\n bindToMotionValue(key, value) {\n this.valueSubscriptions.get(key)?.();\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) {\n if (this.projection) {\n this.projection.isTransformDirty = true;\n }\n transformGroups.get(this.current)?.check();\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 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 either node isn't mounted, or they aren't even of the same type,\n * we can't compare their document order.\n */\n if (!this.current ||\n !other.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 const { transformTemplate, onUpdate } = this.props;\n if (props.transformTemplate || transformTemplate) {\n this.scheduleRender();\n }\n /**\n * Transforms on the compositor can't use a new transformTemplate\n * or onUpdate, so move them to the main thread.\n */\n if ((props.transformTemplate && !transformTemplate) ||\n (props.onUpdate && !onUpdate)) {\n transformGroups.get(this.current)?.demote();\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 this.propEventSubscriptions[key]?.();\n delete this.propEventSubscriptions[key];\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 this.handleChildMotionValue?.();\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?.[name];\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 /**\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 /**\n * An animated value with no base value is undefined until the\n * keyframe resolver reads its origin. Rendering it before then\n * writes an invalid placeholder (e.g. points=\"undefined\") that\n * the resolver can read back from the DOM as the origin.\n */\n const latest = value.get();\n if (latest !== undefined)\n this.latestValues[key] = latest;\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n this.valueSubscriptions.get(key)?.();\n this.valueSubscriptions.delete(key);\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 let value = this.props.values?.[key];\n if (value)\n return value;\n value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue ?? this.getDefaultValue?.(key), {\n owner: this,\n });\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 (\n /**\n * If the value as read isn't animatable (e.g. \"none\") but\n * the target is, derive an animatable none from the target.\n * A value is animatable if it's a number or contains a\n * number or color, which is cheaper to check than trying\n * every value type in turn.\n */\n typeof value !== \"number\" &&\n !complex.test(value) &&\n 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 on(eventName, callback) {\n return (this.events[eventName] ||\n (this.events[eventName] = new SubscriptionManager())).add(callback);\n }\n notify(eventName, ...args) {\n this.events[eventName]?.notify(...args);\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","parent","props","presenceContext","reducedMotionConfig","skipAnimations","blockInitialAnimation","visualState","options","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","undefined","isMotionValue","set","mount","instance","presence","isPresent","keepValuesOnRemount","get","jump","visualElementStore","node","inherit","add","removeFromVariantTree","delete","forEach","bindToMotionValue","hasReducedMotionListener","initPrefersReducedMotion","prefersReducedMotion","process","env","NODE_ENV","warnOnce","addChild","update","unmount","cancelFrame","remove","clear","removeChild","feature","isMounted","child","enteringChildren","accelerate","acceleratedValues","has","HTMLElement","factory","keyframes","times","ease","duration","animation","NativeAnimation","element","name","secondsToMilliseconds","cleanup","cancel","valueIsTransform","transformProps","onBindTransform","removeOnChange","on","latestValue","onUpdate","preRender","isTransformDirty","transformGroups","check","removeSyncCheck","window","MotionCheckAppearSync","sortNodePosition","other","sortInstanceNodePosition","type","updateFeatures","featureDefinition","isEnabled","Feature","FeatureConstructor","build","measureViewportBox","measureInstanceViewportBox","createBox","getStaticValue","setStaticValue","transformTemplate","demote","prevProps","prevPresenceContext","i","length","listener","updateMotionValuesFromProps","handleChildMotionValue","getProps","getVariant","variants","getDefaultTransition","transition","getTransformPagePoint","transformPagePoint","addValue","existingValue","removeValue","latest","removeValueFromRenderState","hasValue","getValue","defaultValue","motionValue","getDefaultValue","owner","readValue","target","getBaseTargetFromProps","readValueFromInstance","isNumericalString","isZeroValueString","parseFloat","complex","test","getAnimatableNone","setBaseTarget","eventName","callback","SubscriptionManager","args","scheduleRenderMicrotask","microtask","getFeatureDefinitions","definitions"],"mappings":"swCA8CA,MAAMA,EAAoB,CACtB,iBACA,oBACA,SACA,sBACA,gBACA,uBACA,2BAMJ,IAAIC,EAAk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C,QAExCD,KAAK2J,uBAAuB3J,KAAKP,MAAOkD,IACxC3C,KAAK4J,sBAAsB5J,KAAKC,QAAS0C,EAAK3C,KAAKD,SAFnDC,KAAKmB,aAAawB,GA6B5B,OAzBIC,UAEqB,iBAAVA,IACNiH,EAAiBA,kBAACjH,IAAUkH,EAAiBA,kBAAClH,IAG/CA,EAAQmH,WAAWnH,GASF,iBAAVA,IACNoH,UAAQC,KAAKrH,IACdoH,EAAOA,QAACC,KAAKP,KAEb9G,EAAQsH,EAAiBA,kBAACvH,EAAK+G,IAGnC1J,KAAKmK,cAAcxH,EAAKG,gBAAcF,GAASA,EAAMS,MAAQT,IAG1DE,EAAAA,cAAcF,GAASA,EAAMS,MAAQT,CAChD,CAMAuH,aAAAA,CAAcxH,EAAaC,GACvB5C,KAAK+B,WAAWY,GAAOC,CAC3B,CAEAyD,EAAAA,CACI+D,EACAC,GAEA,OACIrK,KAAKe,OAAOqJ,KACXpK,KAAKe,OAAOqJ,GAAa,IAAIE,EAAmBA,sBACnD5G,IAAI2G,EACV,CAEAnJ,MAAAA,CACIkJ,KACGG,GAEHvK,KAAKe,OAAOqJ,IAAYlJ,UAAUqJ,EACtC,CAEAC,uBAAAA,GACIC,EAAAA,UAAUrJ,OAAOpB,KAAKoB,OAC1B,iCAz2BYsJ,WACZ,OAAOxL,CACX,gCAXM,SACFyL,GAEAzL,EAAqByL,CACzB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const t=t=>180*t/Math.PI,a=a=>{const e=t(Math.atan2(a[1],a[0]));return s(e)},e={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:a,rotateZ:a,skewX:a=>t(Math.atan(a[1])),skewY:a=>t(Math.atan(a[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},s=t=>((t%=360)<0&&(t+=360),t),r=t=>Math.hypot(t[0],t[1]),n=t=>Math.hypot(t[4],t[5]),o={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:r,scaleY:n,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(r(t)+n(t))/2,rotateX:a=>s(t(Math.atan2(a[6],a[5]))),rotateY:a=>s(t(Math.atan2(-a[2],a[0]))),rotateZ:a,rotate:a,skewX:a=>t(Math.atan(a[4])),skewY:a=>t(Math.atan(a[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function l(t){return t.includes("scale")?1:0}function c(t,a){if(!t||"none"===t)return l(a);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,n;if(s)r=o,n=s;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=e,n=a}if(!n)return l(a);const c=r[a],u=n[1].split(",").map(h);return"function"==typeof c?c(u):u[c]}function h(t){return parseFloat(t.trim())}exports.defaultTransformValue=l,exports.parseValueFromTransform=c,exports.readTransformValue=(t,a)=>{const{transform:e="none"}=getComputedStyle(t);return c(e,a)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const t=t=>180*t/Math.PI,a=a=>{const e=t(Math.atan2(a[1],a[0]));return s(e)},e={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:a,rotateZ:a,skewX:a=>t(Math.atan(a[1])),skewY:a=>t(Math.atan(a[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},s=t=>((t%=360)<0&&(t+=360),t),r=t=>Math.hypot(t[0],t[1]),n=t=>Math.hypot(t[4],t[5]),o={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:r,scaleY:n,scaleZ:t=>Math.hypot(t[8],t[9],t[10]),scale:t=>(r(t)+n(t))/2,rotateX:a=>s(t(Math.atan2(a[6],a[5]))),rotateY:a=>s(t(Math.atan2(-a[2],a[0]))),rotateZ:a,rotate:a,skewX:a=>t(Math.atan(a[4])),skewY:a=>t(Math.atan(a[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function l(t){return t.includes("scale")?1:0}function c(t,a){if(!t||"none"===t)return l(a);const s=t.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!s)return l(a);const r=(s[1]?o:e)[a],n=s[2].split(",").map(t=>parseFloat(t));return"function"==typeof r?r(n):n[r]}exports.defaultTransformValue=l,exports.parseValueFromTransform=c,exports.readTransformValue=(t,a)=>{const{transform:e="none"}=getComputedStyle(t);return c(e,a)};
2
2
  //# sourceMappingURL=parse-transform.mjs.js.map
@@ -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 scaleZ: () => 1,\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.hypot(v[0], v[1]);\nconst scaleY = (v) => Math.hypot(v[4], 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 scaleZ: (v) => Math.hypot(v[8], v[9], v[10]),\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","scaleZ","scale","abs","rotateZ","skewX","atan","skewY","skew","hypot","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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EAAsBC,GAClC,OAAOA,EAAKC,SAAS,SAAW,EAAI,CACxC,CAEM,SAAUC,EACZC,EACAH,GAEA,IAAKG,GAA2B,SAAdA,EACd,OAAOJ,EAAsBC,GAGjC,MAAMI,EAAgBD,EAAUE,MAAM,gCAEtC,IAAIC,EACAD,EAEJ,GAAID,EACAE,EAAUZ,EACVW,EAAQD,MACL,CACH,MAAMG,EAAgBJ,EAAUE,MAAM,8BAEtCC,EAAU5B,EACV2B,EAAQE,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
+ {"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 scaleZ: () => 1,\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.hypot(v[0], v[1]);\nconst scaleY = (v) => Math.hypot(v[4], 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 scaleZ: (v) => Math.hypot(v[8], v[9], v[10]),\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 match = transform.match(/^matrix(3d)?\\(([-\\d.e\\s,]+)\\)$/u);\n if (!match) {\n return defaultTransformValue(name);\n }\n const valueParser = (match[1] ? matrix3dParsers : matrix2dParsers)[name];\n /**\n * parseFloat skips leading whitespace and stops at trailing whitespace.\n */\n const values = match[2].split(\",\").map((v) => parseFloat(v));\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};\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","scaleZ","scale","abs","rotateZ","skewX","atan","skewY","skew","hypot","matrix3dParsers","z","translateZ","rotateX","rotateY","defaultTransformValue","name","includes","parseValueFromTransform","transform","match","valueParser","values","split","map","parseFloat","readTransformValue","instance","getComputedStyle"],"mappings":"oEAEA,MAAMA,EAAYC,GAAuB,IAANA,EAAaC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,IAAIb,EAAE,KAAO,GAG/C,SAAUyB,EAAsBC,GAClC,OAAOA,EAAKC,SAAS,SAAW,EAAI,CACxC,CAEM,SAAUC,EACZC,EACAH,GAEA,IAAKG,GAA2B,SAAdA,EACd,OAAOJ,EAAsBC,GAGjC,MAAMI,EAAQD,EAAUC,MAAM,mCAE9B,IAAKA,EACD,OAAOL,EAAsBC,GAGjC,MAAMK,GAAeD,EAAM,GAAKV,EAAkBhB,GAAiBsB,GAI7DM,EAASF,EAAM,GAAGG,MAAM,KAAKC,IAAKlC,GAAMmC,WAAWnC,IAEzD,MAA8B,mBAAhB+B,EACRA,EAAYC,GACZA,EAAOD,EACjB,8FAEkCK,CAACC,EAAuBX,KACtD,MAAMG,UAAEA,EAAY,QAAWS,iBAAiBD,GAChD,OAAOT,EAAwBC,EAAWH"}
@@ -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"),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,{transformPagePoint:r}){return t.measureViewportBox(e,r)}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;
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){"production"!==process.env.NODE_ENV&&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,{transformPagePoint:r}){return t.measureViewportBox(e,r)}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 { 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","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,GACAmB,mBAAEA,IAEF,OAAOC,EAAkBA,mBAACpB,EAAUmB,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
+ {"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 process.env.NODE_ENV !== \"production\" &&\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","process","env","NODE_ENV","invariant","Boolean","style","super","readValueFromInstance","key","transformProps","has","projection","isProjecting","defaultTransformValue","readTransformValue","computedStyle","value","isCSSVariableName","getPropertyValue","trim","measureInstanceViewportBox","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,OA4DPD,KAAAE,eAAiBC,YACrB,CA3DIC,KAAAA,CAAMC,GAMuB,eAAzBC,QAAQC,IAAIC,UACRC,EAASA,UACLC,QAAQL,EAASM,OACjB,6EACA,wBAGRC,MAAMR,MAAMC,EAChB,CAEAQ,qBAAAA,CACIR,EACAS,GAEA,GAAIC,EAAcA,eAACC,IAAIF,GACnB,OAAOd,KAAKiB,YAAYC,aAClBC,EAAqBA,sBAACL,GACtBM,EAAkBA,mBAACf,EAAUS,GAChC,CACH,MAAMO,EAAgB3B,EAAiBW,GACjCiB,GACDC,oBAAkBT,GACbO,EAAcG,iBAAiBV,GAC/BO,EAAcP,KAAuC,EAE/D,MAAwB,iBAAVQ,EAAqBA,EAAMG,OAAUH,CACvD,CACJ,CAEAI,0BAAAA,CACIrB,GACAsB,mBAAEA,IAEF,OAAOC,EAAkBA,mBAACvB,EAAUsB,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("../../../value/types/utils/get-as-type.mjs.js"),t=require("../../../value/types/maps/number.mjs.js"),s=require("../../utils/keys-transform.mjs.js");const r={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},a=s.transformPropOrder.length;exports.buildTransform=function(n,o,l){let i="",u=!0;for(let p=0;p<a;p++){const a=s.transformPropOrder[p],m=n[a];if(void 0===m)continue;let c=!0;if("number"==typeof m)c=m===(a.startsWith("scale")?1:0);else{const e=parseFloat(m);c=a.startsWith("scale")?1===e:0===e}if(!c||l){const s=e.getValueAsType(m,t.numberValueTypes[a]);if(!c){u=!1;i+=`${r[a]||a}(${s}) `}l&&(o[a]=s)}}const p=n.pathRotation;return p&&(u=!1,i+=`rotate(${e.getValueAsType(p,t.numberValueTypes.pathRotation)}) `),i=i.trim(),l?i=l(o,u?"":i):u&&(i="none"),i},exports.translateAlias=r;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../value/types/utils/get-as-type.mjs.js"),t=require("../../../value/types/maps/number.mjs.js"),r=require("../../../value/types/maps/transform.mjs.js"),s=require("../../utils/keys-transform.mjs.js");const a={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},o=s.transformPropOrder.length,n={},u=(t,s,o=e.getValueAsType(s,r.transformValueTypes[t]))=>(n[t]||(n[t]=(a[t]||t)+"("))+o+")",p=(e,t)=>("number"==typeof t?t:parseFloat(t))===(e.startsWith("scale")?1:0);exports.buildTransform=function(r,a,n){let l="";for(let i=0;i<o;i++){const o=s.transformPropOrder[i],m=r[o];if(void 0===m)continue;const f=n&&(a[o]=e.getValueAsType(m,t.numberValueTypes[o]));p(o,m)||(l+=u(o,m,f||void 0)+" ")}const i=r.pathRotation;return i&&(l+=u("rotate",i)),l=l.trim(),n?n(a,l):l||"none"},exports.isDefaultTransform=p,exports.transformFunction=u,exports.translateAlias=a;
2
2
  //# sourceMappingURL=build-transform.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-transform.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs"],"sourcesContent":["import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(latestValues, transform, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n let transformIsDefault = true;\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n const value = latestValues[key];\n if (value === undefined)\n continue;\n let valueIsDefault = true;\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0);\n }\n else {\n const parsed = parseFloat(value);\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0;\n }\n if (!valueIsDefault || transformTemplate) {\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (!valueIsDefault) {\n transformIsDefault = false;\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${valueAsType}) `;\n }\n if (transformTemplate) {\n transform[key] = valueAsType;\n }\n }\n }\n // `pathRotation` composes onto `rotate` as a separate additive term so\n // the user's `rotate` is never clobbered. Deliberately not a slot in\n // `transformPropOrder`.\n const pathRotation = latestValues.pathRotation;\n if (pathRotation) {\n transformIsDefault = false;\n transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `;\n }\n transformString = transformString.trim();\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\nexport { buildTransform, translateAlias };\n//# sourceMappingURL=build-transform.mjs.map\n"],"names":["translateAlias","x","y","z","transformPerspective","numTransforms","transformPropOrder","length","buildTransform","latestValues","transform","transformTemplate","transformString","transformIsDefault","i","key","value","undefined","valueIsDefault","startsWith","parsed","parseFloat","valueAsType","getValueAsType","numberValueTypes","pathRotation","trim"],"mappings":"uOAOO,MAAMA,EAAyC,CAClDC,EAAG,aACHC,EAAG,aACHC,EAAG,aACHC,qBAAsB,eAGpBC,EAAgBC,EAAkBA,mBAACC,8BAQzBC,SACZC,EACAC,EACAC,GAGA,IAAIC,EAAkB,GAClBC,GAAqB,EAMzB,IAAK,IAAIC,EAAI,EAAGA,EAAIT,EAAeS,IAAK,CACpC,MAAMC,EAAMT,qBAAmBQ,GACzBE,EAAQP,EAAaM,GAE3B,QAAcE,IAAVD,EAAqB,SAEzB,IAAIE,GAAiB,EACrB,GAAqB,iBAAVF,EACPE,EAAiBF,KAAWD,EAAII,WAAW,SAAW,EAAI,OACvD,CACH,MAAMC,EAASC,WAAWL,GAC1BE,EAAiBH,EAAII,WAAW,SAAsB,IAAXC,EAA0B,IAAXA,CAC9D,CAEA,IAAKF,GAAkBP,EAAmB,CACtC,MAAMW,EAAcC,EAAAA,eAAeP,EAAOQ,EAAAA,iBAAiBT,IAE3D,IAAKG,EAAgB,CACjBL,GAAqB,EAErBD,GAAmB,GADGZ,EAAee,IAAQA,KACNO,KAC3C,CAEIX,IACAD,EAAUK,GAAOO,EAEzB,CACJ,CAKA,MAAMG,EAAehB,EAAagB,aAsBlC,OArBIA,IACAZ,GAAqB,EACrBD,GAAmB,UAAUW,iBACzBE,EACAD,EAAAA,iBAAiBC,mBAIzBb,EAAkBA,EAAgBc,OAI9Bf,EACAC,EAAkBD,EACdD,EACAG,EAAqB,GAAKD,GAEvBC,IACPD,EAAkB,QAGfA,CACX"}
1
+ {"version":3,"file":"build-transform.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs"],"sourcesContent":["import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformValueTypes } from '../../../value/types/maps/transform.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Cache of `translateX(`-style openers so each transform function is a few\n * string concatenations rather than a template.\n */\nconst openers = {};\n/**\n * A transform function, e.g. `translateX(10px)` for `x: 10`.\n */\nconst transformFunction = (key, value, valueAsType = getValueAsType(value, transformValueTypes[key])) => (openers[key] || (openers[key] = (translateAlias[key] || key) + \"(\")) + valueAsType + \")\";\n/**\n * Whether a transform value is at its default, so can be left out.\n */\nconst isDefaultTransform = (key, value) => (typeof value === \"number\" ? value : parseFloat(value)) ===\n (key.startsWith(\"scale\") ? 1 : 0);\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(latestValues, transform, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n const value = latestValues[key];\n if (value === undefined)\n continue;\n const valueAsType = transformTemplate &&\n (transform[key] = getValueAsType(value, numberValueTypes[key]));\n if (!isDefaultTransform(key, value)) {\n transformString +=\n transformFunction(key, value, valueAsType || undefined) + \" \";\n }\n }\n // `pathRotation` composes onto `rotate` as a separate additive term so\n // the user's `rotate` is never clobbered. Deliberately not a slot in\n // `transformPropOrder`.\n const pathRotation = latestValues.pathRotation;\n if (pathRotation) {\n transformString += transformFunction(\"rotate\", pathRotation);\n }\n transformString = transformString.trim();\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n return transformTemplate\n ? transformTemplate(transform, transformString)\n : transformString || \"none\";\n}\n\nexport { buildTransform, isDefaultTransform, transformFunction, translateAlias };\n//# sourceMappingURL=build-transform.mjs.map\n"],"names":["translateAlias","x","y","z","transformPerspective","numTransforms","transformPropOrder","length","openers","transformFunction","key","value","valueAsType","getValueAsType","transformValueTypes","isDefaultTransform","parseFloat","startsWith","buildTransform","latestValues","transform","transformTemplate","transformString","i","undefined","numberValueTypes","pathRotation","trim"],"mappings":"+RASO,MAAMA,EAAyC,CAClDC,EAAG,aACHC,EAAG,aACHC,EAAG,aACHC,qBAAsB,eAGpBC,EAAgBC,EAAkBA,mBAACC,OAMnCC,EAAkC,CAAA,EAK3BC,EAAoBA,CAC7BC,EACAC,EACAC,EAAcC,iBAAeF,EAAOG,EAAmBA,oBAACJ,OACtDF,EAAQE,KAARF,EAAQE,IAAUV,EAAeU,IAAQA,GAAO,MAAOE,EAAc,IAK9DG,EAAqBA,CAACL,EAAaC,KAC1B,iBAAVA,EAAqBA,EAAQK,WAAWL,OAC/CD,EAAIO,WAAW,SAAW,EAAI,0BAQnBC,SACZC,EACAC,EACAC,GAGA,IAAIC,EAAkB,GAMtB,IAAK,IAAIC,EAAI,EAAGA,EAAIlB,EAAekB,IAAK,CACpC,MAAMb,EAAMJ,qBAAmBiB,GACzBZ,EAAQQ,EAAaT,GAE3B,QAAcc,IAAVb,EAAqB,SAEzB,MAAMC,EACFS,IACCD,EAAUV,GAAOG,iBAAeF,EAAOc,EAAgBA,iBAACf,KAExDK,EAAmBL,EAAKC,KACzBW,GACIb,EAAkBC,EAAKC,EAAOC,QAAeY,GAAa,IAEtE,CAKA,MAAME,EAAeP,EAAaO,aASlC,OARIA,IACAJ,GAAmBb,EAAkB,SAAUiB,IAGnDJ,EAAkBA,EAAgBK,OAI3BN,EACDA,EAAkBD,EAAWE,GAC7BA,GAAmB,MAC7B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../animation/interfaces/visual-element.mjs.js"),i=require("../../animation/utils/calc-child-stagger.mjs.js"),t=require("../../value/utils/is-motion-value.mjs.js"),n=require("./is-animation-controls.mjs.js"),r=require("./is-variant-label.mjs.js"),s=require("./resolve-dynamic-variants.mjs.js"),o=require("./shallow-compare.mjs.js"),a=require("./variant-props.mjs.js");const l=[...a.variantPriorityOrder].reverse();function c(e,i){return"string"==typeof i?i!==e:!!Array.isArray(i)&&!o.shallowCompare(i,e)}function u(){const e={};for(const i of a.variantPriorityOrder)e[i]={isActive:"animate"===i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}exports.checkVariantsDidChange=c,exports.createAnimationState=function(a){let v=i=>Promise.all(i.map(({animation:i,options:t})=>e.animateVisualElement(a,i,t))),p=u(),d=!0,m=!1;function f(e){const{props:u,parent:f,manuallyAnimateOnMount:y}=a,A=d||m,g=[],h=new Set;let V={},j=1/0,C=a;do{C=!1!==C.props.inherit&&C.parent}while(C&&!C.isControllingVariants);if(l.forEach((t,l)=>{const v=p[t],d=u[t],m=C&&C.props[t],P=void 0!==d?d:r.isVariantLabel(m)||!1===m?m:void 0,b=r.isVariantLabel(P),q=t===e?v.isActive:null;!1===q&&(j=l);const E=b&&void 0===d&&!(A&&y);if(v.protectedKeys={...V},!v.isActive&&null===q||!P&&!v.prevProp||n.isAnimationControls(P)||"boolean"==typeof P)return;if("exit"===t&&v.isActive&&!0!==q)return void(V={...V,...v.prevResolvedValues});const S=c(v.prevProp,P);let w=S||b&&(q&&!E||l>j),x=!1;const O=Array.isArray(P)?P:[P];let K={};if(!1!==q)for(const e of O){const{transition:i,transitionEnd:n,...r}=s.resolveVariant(a,e,s.getTypeCustom(a,t))||{};K={...K,...r,...n}}const{prevResolvedValues:R}=v;for(const e in{...R,...K}){if(e in V)continue;const i=K[e],t=R[e],n=Array.isArray(i)&&Array.isArray(t)?!o.shallowCompare(i,t)||S:i!==t;if(n&&null==i)h.add(e);else if(n||void 0!==i&&h.has(e)){w=!0,h.delete(e)&&(x=!0),v.needsAnimating[e]=!0;const i=a.getValue(e);i&&(i.liveStyle=!1)}else v.protectedKeys[e]=!0}if(v.prevProp=P,v.prevResolvedValues=K,v.isActive&&(V={...V,...K}),w&&(!E||!S||x))for(const e of O){const n={type:t};if("string"==typeof e&&A&&y&&f?.enteringChildren){const t=s.resolveVariant(f,e)?.transition?.delayChildren;n.delay=i.calcChildStagger(f.enteringChildren,a,t)}g.push({animation:e,options:n})}}),h.size){const{initial:e}=u,i={},n="boolean"!=typeof e&&s.resolveVariant(a,Array.isArray(e)?e[0]:e,a.presenceContext?.custom);n&&n.transition&&(i.transition=n.transition),h.forEach(r=>{const s=a.getValue(r);s&&(s.liveStyle=!0);const o=n&&!Array.isArray(e)?n[r]:void 0,l=a.getBaseTargetFromProps(u,r);i[r]=(void 0!==o?o:void 0===l||t.isMotionValue(l)?void 0===a.initialValues[r]?a.baseTarget[r]:void 0:l)??null,"production"!==process.env.NODE_ENV&&null===i[r]&&void 0!==a.initialValues[r]&&(delete a.initialValues[r],s?.stop(),a.baseTarget[r]=s?.get())}),g.push({animation:i})}const P=A&&a.blockInitialAnimation||d&&!y&&(!1===u.initial||u.initial===u.animate);return d=m=!1,!P&&g.length?v(g):Promise.resolve()}return{animateChanges:f,setActive:function(e,i){if(p[e].isActive===i)return Promise.resolve();a.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),p[e].isActive=i;const t=f(e);for(const e in p)p[e].protectedKeys={};return t},setAnimateFunction:e=>{v=e(a)},getState:()=>p,reset:()=>{p=u(),m=!0}}};
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("../../value/utils/is-motion-value.mjs.js"),r=require("./is-animation-controls.mjs.js"),n=require("./is-variant-label.mjs.js"),o=require("./resolve-dynamic-variants.mjs.js"),s=require("./shallow-compare.mjs.js"),a=require("./variant-props.mjs.js");const l=[...a.variantPriorityOrder].reverse(),c=e=>!0===e?.out?e:e?.out;function u(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!s.shallowCompare(t,e)}function v(){const e={};for(const t of a.variantPriorityOrder)e[t]={isActive:"animate"===t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}exports.checkVariantsDidChange=u,exports.createAnimationState=function(a){let p=t=>Promise.all(t.map(({animation:t,options:i})=>e.animateVisualElement(a,t,i))),d=v(),m=!0,f=!1;function y(e){const{props:v,parent:y,manuallyAnimateOnMount:A}=a,{initial:g}=v,h=m||f,V=[],j=(e=g)=>"boolean"!=typeof e&&o.resolveVariant(a,Array.isArray(e)?e[0]:e,a.presenceContext?.custom)||void 0,C=new Map;let P={},b=1/0,q=a;do{q=!1!==q.props.inherit&&q.parent}while(q&&!q.isControllingVariants);const E=h&&c(j(g??(q&&q.props.initial))?.transition);if(l.forEach((i,l)=>{const p=d[i],m=v[i],f=q&&q.props[i],g=void 0!==m?m:n.isVariantLabel(f)||!1===f?f:void 0,j=n.isVariantLabel(g),O=i===e?p.isActive:null,S=j&&void 0===m&&!(h&&A);if(p.protectedKeys={...P},!p.isActive&&null===O||!g&&!p.prevProp||r.isAnimationControls(g)||"boolean"==typeof g)return;if(!1===O&&(b=l),"exit"===i&&p.isActive&&!0!==O)return void(P={...P,...p.prevResolvedValues});const w=u(p.prevProp,g);let x=w||j&&(O&&!S||l>b),T=!1;const K=Array.isArray(g)?g:[g];let M,R={};if(!1!==O)for(const e of K){const{transition:t,transitionEnd:r,...n}=o.resolveVariant(a,e,o.getTypeCustom(a,i))||{};R={...R,...n,...r},M=c(t)||M}const{prevResolvedValues:D}=p;for(const e in{...D,...R}){if(e in P)continue;const t=R[e],i=D[e],r=Array.isArray(t)&&Array.isArray(i)?!s.shallowCompare(t,i)||w:t!==i;let n;if(r&&null==t)C.has(e)||C.set(e,p.prevOut);else if(r||void 0!==t&&C.has(e)){x=!0,n=C.get(e)||E,C.delete(e)&&(T=!0),p.needsAnimating[e]=!0;const t=a.getValue(e);t&&(t.liveStyle=!1)}else p.protectedKeys[e]=!0;p.out[e]=n}if(p.prevProp=g,p.prevResolvedValues=R,p.prevOut=M,p.isActive&&(P={...P,...R}),x&&(!S||!w||T))for(const e of K){const r={type:i};if("string"==typeof e&&h&&A&&y?.enteringChildren){const i=o.resolveVariant(y,e)?.transition?.delayChildren;r.delay=t.calcChildStagger(y.enteringChildren,a,i)}V.push({animation:e,options:r})}}),C.size){const e={},t=j();let r=t?.transition;C.forEach((n,o)=>{n&&(r={...r||a.getDefaultTransition(),[o]:n});const s=a.getValue(o);s&&(s.liveStyle=!0);const l=t&&!Array.isArray(g)?t[o]:void 0,c=a.getBaseTargetFromProps(v,o);e[o]=(void 0!==l?l:void 0===c||i.isMotionValue(c)?void 0===a.initialValues[o]?a.baseTarget[o]:void 0:c)??null,"production"!==process.env.NODE_ENV&&null===e[o]&&void 0!==a.initialValues[o]&&(delete a.initialValues[o],s?.stop(),a.baseTarget[o]=s?.get())}),r&&(e.transition=r),V.push({animation:e})}const O=h&&a.blockInitialAnimation||m&&!A&&(!1===v.initial||v.initial===v.animate);return m=f=!1,!O&&V.length?p(V):Promise.resolve()}return{animateChanges:y,setActive:function(e,t){if(d[e].isActive===t)return Promise.resolve();a.variantChildren?.forEach(i=>i.animationState?.setActive(e,t)),d[e].isActive=t;const i=y(e);for(const e in d)d[e].protectedKeys={};return i},setAnimateFunction:e=>{p=e(a)},getState:()=>d,reset:()=>{d=v(),f=!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 { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { isAnimationControls } from './is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant, getTypeCustom } from './resolve-dynamic-variants.mjs';\nimport { shallowCompare } from './shallow-compare.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\n/**\n * Diffs the element's animation props (one layer per AnimationType, highest\n * priority wins each value) against the previous call and starts animations\n * for what changed.\n *\n * Uses `any` type for visualElement to avoid circular dependencies. It reads\n * props, parent, presenceContext, variantChildren, enteringChildren,\n * manuallyAnimateOnMount, blockInitialAnimation, getValue(),\n * getBaseTargetFromProps(), baseTarget and initialValues.\n */\nfunction createAnimationState(visualElement) {\n let animate = (animations) => Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n let state = createState();\n let isInitialRender = true;\n /**\n * After a reset (StrictMode, Suspense, AnimatePresence re-entry) the next\n * animateChanges() mounts again, but initial={false} no longer applies.\n */\n let wasReset = false;\n function animateChanges(changedActiveType) {\n const { props, parent, manuallyAnimateOnMount } = visualElement;\n const isMounting = isInitialRender || wasReset;\n const animations = [];\n /**\n * Values removed from a type. A lower-priority type that defines\n * them animates them back, otherwise they fall back to a base target.\n */\n const removedKeys = new Set();\n /**\n * Values claimed by active, higher-priority types.\n */\n let encounteredKeys = {};\n /**\n * Once a type has been deactivated, lower-priority variant labels\n * re-animate so variant children animate back too.\n */\n let removedVariantIndex = Infinity;\n /**\n * Variant labels are inherited from the closest variant-controlling\n * ancestor, unless an element on the way has inherit={false}.\n */\n let source = visualElement;\n do\n source = source.props.inherit !== false && source.parent;\n while (source && !source.isControllingVariants);\n reversePriorityOrder.forEach((type, i) => {\n const typeState = state[type];\n const ownProp = props[type];\n const inheritedProp = source && source.props[type];\n const prop = ownProp !== undefined\n ? ownProp\n : isVariantLabel(inheritedProp) || inheritedProp === false\n ? inheritedProp\n : undefined;\n const propIsVariant = isVariantLabel(prop);\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * Inherited labels are animated by the parent through\n * variantChildren, unless this element mounted after its parent.\n */\n const isInherited = propIsVariant &&\n ownProp === undefined &&\n !(isMounting && manuallyAnimateOnMount);\n typeState.protectedKeys = { ...encounteredKeys };\n if ((!typeState.isActive && activeDelta === null) ||\n (!prop && !typeState.prevProp) ||\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n return;\n }\n /**\n * Don't re-resolve a running exit: a changed custom would start\n * new value animations that stop the originals, leaving the exit\n * promise unresolved and the element stuck in the DOM.\n */\n if (type === \"exit\" && typeState.isActive && activeDelta !== true) {\n encounteredKeys = {\n ...encounteredKeys,\n ...typeState.prevResolvedValues,\n };\n return;\n }\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange ||\n (propIsVariant &&\n ((activeDelta && !isInherited) || i > removedVariantIndex));\n let handledRemovedValues = false;\n const definitionList = Array.isArray(prop) ? prop : [prop];\n let resolvedValues = {};\n if (activeDelta !== false) {\n for (const definition of definitionList) {\n const { transition, transitionEnd, ...target } = resolveVariant(visualElement, definition, getTypeCustom(visualElement, type)) || {};\n resolvedValues = {\n ...resolvedValues,\n ...target,\n ...transitionEnd,\n };\n }\n }\n const { prevResolvedValues } = typeState;\n for (const key in { ...prevResolvedValues, ...resolvedValues }) {\n if (key in encounteredKeys)\n continue;\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n /**\n * Keyframes compare by value, but replay whenever the\n * variant label changed.\n */\n const valueHasChanged = Array.isArray(next) && Array.isArray(prev)\n ? !shallowCompare(next, prev) || variantDidChange\n : next !== prev;\n if (valueHasChanged && (next === undefined || next === null)) {\n removedKeys.add(key);\n }\n else if (valueHasChanged ||\n (next !== undefined && removedKeys.has(key))) {\n shouldAnimateType = true;\n if (removedKeys.delete(key))\n handledRemovedValues = true;\n typeState.needsAnimating[key] = true;\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = false;\n }\n else {\n typeState.protectedKeys[key] = true;\n }\n }\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if (shouldAnimateType &&\n (!(isInherited && variantDidChange) || handledRemovedValues)) {\n for (const animation of definitionList) {\n const options = { type };\n /**\n * Elements that mount into an already-mounted parent\n * animate themselves, staggered by the parent variant's\n * delayChildren.\n */\n if (typeof animation === \"string\" &&\n isMounting &&\n manuallyAnimateOnMount &&\n parent?.enteringChildren) {\n const delayChildren = resolveVariant(parent, animation)\n ?.transition?.delayChildren;\n options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren);\n }\n animations.push({ animation, options });\n }\n }\n });\n /**\n * Removed values that no lower-priority type defines animate back to\n * initial, then style, then the value as first read. If initial no\n * longer defines a value it once did, it stays where it is.\n */\n if (removedKeys.size) {\n const { initial } = props;\n const fallbackAnimation = {};\n const resolvedInitial = typeof initial !== \"boolean\" &&\n resolveVariant(visualElement, Array.isArray(initial) ? initial[0] : initial, visualElement.presenceContext?.custom);\n if (resolvedInitial && resolvedInitial.transition) {\n fallbackAnimation.transition = resolvedInitial.transition;\n }\n removedKeys.forEach((key) => {\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = true;\n const fromInitial = resolvedInitial && !Array.isArray(initial)\n ? resolvedInitial[key]\n : undefined;\n const fromProps = visualElement.getBaseTargetFromProps(props, key);\n fallbackAnimation[key] =\n (fromInitial !== undefined\n ? fromInitial\n : fromProps !== undefined && !isMotionValue(fromProps)\n ? fromProps\n : visualElement.initialValues[key] === undefined\n ? visualElement.baseTarget[key]\n : undefined) ?? null;\n /**\n * If it stays where it is, that's now its base. Otherwise a\n * later removal (like a gesture ending) would also stay,\n * leaving the value stuck. Stop first so accelerated\n * animations sync the value they reached. In practice initial\n * only changes like this with Fast Refresh, so this is\n * dev-only (#3787).\n */\n if (process.env.NODE_ENV !== \"production\" &&\n fallbackAnimation[key] === null &&\n visualElement.initialValues[key] !== undefined) {\n delete visualElement.initialValues[key];\n motionValue?.stop();\n visualElement.baseTarget[key] = motionValue?.get();\n }\n });\n animations.push({ animation: fallbackAnimation });\n }\n const blockAnimation = (isMounting && visualElement.blockInitialAnimation) ||\n (isInitialRender &&\n !manuallyAnimateOnMount &&\n (props.initial === false || props.initial === props.animate));\n isInitialRender = wasReset = false;\n return !blockAnimation && animations.length\n ? animate(animations)\n : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive) {\n if (state[type].isActive === isActive)\n return Promise.resolve();\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 /**\n * Allows tests to inject a mocked animate function.\n * @internal\n */\n setAnimateFunction: (makeAnimator) => {\n animate = makeAnimator(visualElement);\n },\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 createState() {\n const state = {};\n for (const type of variantPriorityOrder) {\n state[type] = {\n isActive: type === \"animate\",\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n }\n return state;\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n//# sourceMappingURL=animation-state.mjs.map\n"],"names":["reversePriorityOrder","variantPriorityOrder","reverse","checkVariantsDidChange","prev","next","Array","isArray","shallowCompare","createState","state","type","isActive","protectedKeys","needsAnimating","prevResolvedValues","visualElement","animate","animations","Promise","all","map","animation","options","animateVisualElement","isInitialRender","wasReset","animateChanges","changedActiveType","props","parent","manuallyAnimateOnMount","isMounting","removedKeys","Set","encounteredKeys","removedVariantIndex","Infinity","source","inherit","isControllingVariants","forEach","i","typeState","ownProp","inheritedProp","prop","undefined","isVariantLabel","propIsVariant","activeDelta","isInherited","prevProp","isAnimationControls","variantDidChange","shouldAnimateType","handledRemovedValues","definitionList","resolvedValues","definition","transition","transitionEnd","target","resolveVariant","getTypeCustom","key","valueHasChanged","add","has","delete","motionValue","getValue","liveStyle","enteringChildren","delayChildren","delay","calcChildStagger","push","size","initial","fallbackAnimation","resolvedInitial","presenceContext","custom","fromInitial","fromProps","getBaseTargetFromProps","isMotionValue","initialValues","baseTarget","process","env","NODE_ENV","stop","get","blockAnimation","blockInitialAnimation","length","resolve","setActive","variantChildren","child","animationState","setAnimateFunction","makeAnimator","getState","reset"],"mappings":"qcA6CA,MAAMA,EAAuB,IAAIC,wBAAsBC,UAqUjD,SAAUC,EAAuBC,E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,GAErBqE,GAAkB7E,EAAW+E,OAC/BhF,EAAQC,GACRC,QAAQ+E,SAClB,CAuBA,MAAO,CACHvE,iBACAwE,UApBJ,SAAmBxF,EAAqBC,GACpC,GAAIF,EAAMC,GAAMC,WAAaA,EAAU,OAAOO,QAAQ+E,UAEtDlF,EAAcoF,iBAAiB3D,QAAS4D,GACpCA,EAAMC,gBAAgBH,UAAUxF,EAAMC,IAG1CF,EAAMC,GAAMC,SAAWA,EAEvB,MAAMM,EAAaS,EAAehB,GAElC,IAAK,MAAMsD,KAAOvD,EACdA,EAAMuD,GAAsBpD,cAAgB,GAGhD,OAAOK,CACX,EASIqF,mBAAqBC,IACjBvF,EAAUuF,EAAaxF,IAE3ByF,SAAUA,IAAM/F,EAChBgG,MAAOA,KACHhG,EAAQD,IACRiB,GAAW,GAGvB"}
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 { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { isAnimationControls } from './is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant, getTypeCustom } from './resolve-dynamic-variants.mjs';\nimport { shallowCompare } from './shallow-compare.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\n/**\n * The transition a value uses when it leaves a state (#1725): the state's\n * own transition when `out: true`, or the `out` transition itself.\n * Value-specific keys are resolved by animateTarget.\n */\nconst getOutTransition = (transition) => transition?.out === true ? transition : transition?.out;\n/**\n * Diffs the element's animation props (one layer per AnimationType, highest\n * priority wins each value) against the previous call and starts animations\n * for what changed.\n *\n * Uses `any` type for visualElement to avoid circular dependencies. It reads\n * props, parent, presenceContext, variantChildren, enteringChildren,\n * manuallyAnimateOnMount, blockInitialAnimation, getValue(),\n * getBaseTargetFromProps(), baseTarget and initialValues.\n */\nfunction createAnimationState(visualElement) {\n let animate = (animations) => Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n let state = createState();\n let isInitialRender = true;\n /**\n * After a reset (StrictMode, Suspense, AnimatePresence re-entry) the next\n * animateChanges() mounts again, but initial={false} no longer applies.\n */\n let wasReset = false;\n function animateChanges(changedActiveType) {\n const { props, parent, manuallyAnimateOnMount } = visualElement;\n const { initial } = props;\n const isMounting = isInitialRender || wasReset;\n const animations = [];\n const resolveInitial = (definition = initial) => (typeof definition !== \"boolean\" &&\n resolveVariant(visualElement, Array.isArray(definition) ? definition[0] : definition, visualElement.presenceContext?.custom)) ||\n undefined;\n /**\n * Values removed from a type, mapped to the out transition of the\n * state they're leaving. A lower-priority type that defines them\n * animates them back, otherwise they fall back to a base target.\n */\n const removedKeys = new Map();\n /**\n * Values claimed by active, higher-priority types.\n */\n let encounteredKeys = {};\n /**\n * Once a type has been deactivated, lower-priority variant labels\n * re-animate so variant children animate back too.\n */\n let removedVariantIndex = Infinity;\n /**\n * Variant labels are inherited from the closest variant-controlling\n * ancestor, unless an element on the way has inherit={false}.\n */\n let source = visualElement;\n do\n source = source.props.inherit !== false && source.parent;\n while (source && !source.isControllingVariants);\n /**\n * Mounting leaves initial, so values use its out transition. Like the\n * other types, variant children inherit initial's label.\n */\n const initialOut = isMounting &&\n getOutTransition(resolveInitial(initial ?? (source && source.props.initial))\n ?.transition);\n reversePriorityOrder.forEach((type, i) => {\n const typeState = state[type];\n const ownProp = props[type];\n const inheritedProp = source && source.props[type];\n const prop = ownProp !== undefined\n ? ownProp\n : isVariantLabel(inheritedProp) || inheritedProp === false\n ? inheritedProp\n : undefined;\n const propIsVariant = isVariantLabel(prop);\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n /**\n * Inherited labels are animated by the parent through\n * variantChildren, unless this element mounted after its parent.\n */\n const isInherited = propIsVariant &&\n ownProp === undefined &&\n !(isMounting && manuallyAnimateOnMount);\n typeState.protectedKeys = { ...encounteredKeys };\n if ((!typeState.isActive && activeDelta === null) ||\n (!prop && !typeState.prevProp) ||\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n return;\n }\n /**\n * Set after the skip above, so deactivating a type that has nothing\n * to animate (e.g. whileTap with no prop) doesn't re-run the variants\n * below it.\n */\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * Don't re-resolve a running exit: a changed custom would start\n * new value animations that stop the originals, leaving the exit\n * promise unresolved and the element stuck in the DOM.\n */\n if (type === \"exit\" && typeState.isActive && activeDelta !== true) {\n encounteredKeys = {\n ...encounteredKeys,\n ...typeState.prevResolvedValues,\n };\n return;\n }\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange ||\n (propIsVariant &&\n ((activeDelta && !isInherited) || i > removedVariantIndex));\n let handledRemovedValues = false;\n const definitionList = Array.isArray(prop) ? prop : [prop];\n let resolvedValues = {};\n let out;\n if (activeDelta !== false) {\n for (const definition of definitionList) {\n const { transition, transitionEnd, ...target } = resolveVariant(visualElement, definition, getTypeCustom(visualElement, type)) || {};\n resolvedValues = {\n ...resolvedValues,\n ...target,\n ...transitionEnd,\n };\n /**\n * One out transition per type. With a list of labels,\n * the last one that sets out applies to all its values.\n */\n out = getOutTransition(transition) || out;\n }\n }\n const { prevResolvedValues } = typeState;\n for (const key in { ...prevResolvedValues, ...resolvedValues }) {\n if (key in encounteredKeys)\n continue;\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n /**\n * Keyframes compare by value, but replay whenever the\n * variant label changed.\n */\n const valueHasChanged = Array.isArray(next) && Array.isArray(prev)\n ? !shallowCompare(next, prev) || variantDidChange\n : next !== prev;\n let outTransition;\n if (valueHasChanged && (next === undefined || next === null)) {\n /**\n * The highest-priority state a value leaves wins.\n */\n removedKeys.has(key) ||\n removedKeys.set(key, typeState.prevOut);\n }\n else if (valueHasChanged ||\n (next !== undefined && removedKeys.has(key))) {\n shouldAnimateType = true;\n outTransition = removedKeys.get(key) || initialOut;\n if (removedKeys.delete(key))\n handledRemovedValues = true;\n typeState.needsAnimating[key] = true;\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = false;\n }\n else {\n typeState.protectedKeys[key] = true;\n }\n typeState.out[key] = outTransition;\n }\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n typeState.prevOut = out;\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if (shouldAnimateType &&\n (!(isInherited && variantDidChange) || handledRemovedValues)) {\n for (const animation of definitionList) {\n const options = { type };\n /**\n * Elements that mount into an already-mounted parent\n * animate themselves, staggered by the parent variant's\n * delayChildren.\n */\n if (typeof animation === \"string\" &&\n isMounting &&\n manuallyAnimateOnMount &&\n parent?.enteringChildren) {\n const delayChildren = resolveVariant(parent, animation)\n ?.transition?.delayChildren;\n options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren);\n }\n animations.push({ animation, options });\n }\n }\n });\n /**\n * Removed values that no lower-priority type defines animate back to\n * initial, then style, then the value as first read. If initial no\n * longer defines a value it once did, it stays where it is.\n */\n if (removedKeys.size) {\n const fallbackAnimation = {};\n const resolvedInitial = resolveInitial();\n let fallbackTransition = resolvedInitial?.transition;\n removedKeys.forEach((outTransition, key) => {\n if (outTransition) {\n fallbackTransition = {\n ...(fallbackTransition ||\n visualElement.getDefaultTransition()),\n [key]: outTransition,\n };\n }\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = true;\n const fromInitial = resolvedInitial && !Array.isArray(initial)\n ? resolvedInitial[key]\n : undefined;\n const fromProps = visualElement.getBaseTargetFromProps(props, key);\n fallbackAnimation[key] =\n (fromInitial !== undefined\n ? fromInitial\n : fromProps !== undefined && !isMotionValue(fromProps)\n ? fromProps\n : visualElement.initialValues[key] === undefined\n ? visualElement.baseTarget[key]\n : undefined) ?? null;\n /**\n * If it stays where it is, that's now its base. Otherwise a\n * later removal (like a gesture ending) would also stay,\n * leaving the value stuck. Stop first so accelerated\n * animations sync the value they reached. In practice initial\n * only changes like this with Fast Refresh, so this is\n * dev-only (#3787).\n */\n if (process.env.NODE_ENV !== \"production\" &&\n fallbackAnimation[key] === null &&\n visualElement.initialValues[key] !== undefined) {\n delete visualElement.initialValues[key];\n motionValue?.stop();\n visualElement.baseTarget[key] = motionValue?.get();\n }\n });\n if (fallbackTransition) {\n fallbackAnimation.transition = fallbackTransition;\n }\n animations.push({ animation: fallbackAnimation });\n }\n const blockAnimation = (isMounting && visualElement.blockInitialAnimation) ||\n (isInitialRender &&\n !manuallyAnimateOnMount &&\n (props.initial === false || props.initial === props.animate));\n isInitialRender = wasReset = false;\n return !blockAnimation && animations.length\n ? animate(animations)\n : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive) {\n if (state[type].isActive === isActive)\n return Promise.resolve();\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 /**\n * Allows tests to inject a mocked animate function.\n * @internal\n */\n setAnimateFunction: (makeAnimator) => {\n animate = makeAnimator(visualElement);\n },\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 createState() {\n const state = {};\n for (const type of variantPriorityOrder) {\n state[type] = {\n isActive: type === \"animate\",\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n out: {},\n };\n }\n return state;\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n//# sourceMappingURL=animation-state.mjs.map\n"],"names":["reversePriorityOrder","variantPriorityOrder","reverse","getOutTransition","transition","out","checkVariantsDidChange","prev","next","Array","isArray","shallowCompare","createState","state","type","isActive","protectedKeys","needsAnimating","prevResolvedValues","visualElement","animate","animations","Promise","all","map","animation","options","animateVisualElement","isInitialRender","wasReset","animateChanges","changedActiveType","props","parent","manuallyAnimateOnMount","initial","isMounting","resolveInitial","definition","resolveVariant","presenceContext","custom","undefined","removedKeys","Map","encounteredKeys","removedVariantIndex","Infinity","source","inherit","isControllingVariants","initialOut","forEach","i","typeState","ownProp","inheritedProp","prop","isVariantLabel","propIsVariant","activeDelta","isInherited","prevProp","isAnimationControls","variantDidChange","shouldAnimateType","handledRemovedValues","definitionList","resolvedValues","transitionEnd","target","getTypeCustom","key","valueHasChanged","outTransition","has","set","prevOut","get","delete","motionValue","getValue","liveStyle","enteringChildren","delayChildren","delay","calcChildStagger","push","size","fallbackAnimation","resolvedInitial","fallbackTransition","getDefaultTransition","fromInitial","fromProps","getBaseTargetFromProps","isMotionValue","initialValues","baseTarget","process","env","NODE_ENV","stop","blockAnimation","blockInitialAnimation","length","resolve","setActive","variantChildren","child","animationState","setAnimateFunction","makeAnimator","getState","reset"],"mappings":"qcA6CA,MAAMA,EAAuB,IAAIC,wBAAsBC,UAOjDC,EAAoBC,IACF,IAApBA,GAAYC,IAAeD,EAAaA,GAAYC,IAgXlD,SAAUC,EAAuBC,EAAWC,GAC9C,MAAoB,iBAATA,EACAA,IAASD,IACTE,MAAMC,QAAQF,KACbG,EAAcA,eAACH,EAAMD,EAIrC,CAmBA,SAASK,IACL,MAAMC,EAAQ,CAAA,EAEd,IAAK,MAAMC,KAAQb,uBACfY,EAAMC,GAAQ,CACVC,SAAmB,YAATD,EACVE,cAAe,CAAE,EACjBC,eAAgB,CAAE,EAClBC,mBAAoB,CAAE,EACtBb,IAAK,CAAA,GAIb,OAAOQ,CACX,+DA7YM,SAA+BM,GACjC,IAAIC,EAA4BC,GAC5BC,QAAQC,IACJF,EAAWG,IAAI,EAAGC,YAAWC,aACzBC,EAAoBA,qBAACR,EAAeM,EAAWC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Q,EAAkBC,GAAW,GAErB0E,GAAkBlF,EAAWoF,OAC/BrF,EAAQC,GACRC,QAAQoF,SAClB,CAuBA,MAAO,CACH5E,iBACA6E,UApBJ,SAAmB7F,EAAqBC,GACpC,GAAIF,EAAMC,GAAMC,WAAaA,EAAU,OAAOO,QAAQoF,UAEtDvF,EAAcyF,iBAAiBxD,QAASyD,GACpCA,EAAMC,gBAAgBH,UAAU7F,EAAMC,IAG1CF,EAAMC,GAAMC,SAAWA,EAEvB,MAAMM,EAAaS,EAAehB,GAElC,IAAK,MAAM0D,KAAO3D,EACdA,EAAM2D,GAAsBxD,cAAgB,GAGhD,OAAOK,CACX,EASI0F,mBAAqBC,IACjB5F,EAAU4F,EAAa7F,IAE3B8F,SAAUA,IAAMpG,EAChBqG,MAAOA,KACHrG,EAAQD,IACRiB,GAAW,GAGvB"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e={value:null,addProjectionMetrics:null,countProjection:void 0};exports.statsBuffer=e;
2
+ //# sourceMappingURL=buffer.mjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buffer.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/stats/buffer.mjs"],"sourcesContent":["const statsBuffer = {\n value: null,\n addProjectionMetrics: null,\n countProjection: undefined,\n};\n\nexport { statsBuffer };\n//# sourceMappingURL=buffer.mjs.map\n"],"names":["statsBuffer","value","addProjectionMetrics","countProjection","undefined"],"mappings":"oEAoBO,MAAMA,EAAuD,CAChEC,MAAO,KACPC,qBAAsB,KACtBC,qBAAiBC"}