@nethesis/phone-island 1.1.3 → 1.1.5-dev.1

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 (463) 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 +1 -1
  60. package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
  61. package/dist/components/Socket.js +1 -1
  62. package/dist/components/Socket.js.map +1 -1
  63. package/dist/components/SwitchDeviceView/index.js +1 -1
  64. package/dist/components/SwitchDeviceView/index.js.map +1 -1
  65. package/dist/components/SwitchInputView/DropdownContent.js +1 -1
  66. package/dist/components/SwitchInputView/DropdownContent.js.map +1 -1
  67. package/dist/components/SwitchInputView/Index.js +1 -1
  68. package/dist/components/TextScroll.js +1 -1
  69. package/dist/components/TextScroll.js.map +1 -1
  70. package/dist/components/TranscriptionView/TranscriptionView.js +1 -1
  71. package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
  72. package/dist/components/VideoStreamingEmptyState/index.js +1 -1
  73. package/dist/components/VideoStreamingEmptyState/index.js.map +1 -1
  74. package/dist/components/VideoStreamingSkeleton/index.js +1 -1
  75. package/dist/components/VideoStreamingSkeleton/index.js.map +1 -1
  76. package/dist/components/VideoView/index.js +1 -1
  77. package/dist/components/VideoView/index.js.map +1 -1
  78. package/dist/components/WebRTC.js +1 -1
  79. package/dist/components/WebRTC.js.map +1 -1
  80. package/dist/events/SocketEvents.js.map +1 -1
  81. package/dist/lib/i18n.js +1 -1
  82. package/dist/lib/i18n.js.map +1 -1
  83. package/dist/lib/phone/call.js +1 -1
  84. package/dist/lib/phone/call.js.map +1 -1
  85. package/dist/lib/phone/counterpartDevice.js +1 -1
  86. package/dist/lib/phone/counterpartDevice.js.map +1 -1
  87. package/dist/lib/phone/screenShare.js +2 -0
  88. package/dist/lib/phone/screenShare.js.map +1 -0
  89. package/dist/lib/phone/video.js.map +1 -1
  90. package/dist/lib/player/audio.js.map +1 -1
  91. package/dist/lib/user/default_device.js.map +1 -1
  92. package/dist/lib/user/extensions.js.map +1 -1
  93. package/dist/models/currentCall.js.map +1 -1
  94. package/dist/models/island.js.map +1 -1
  95. package/dist/models/player.js +1 -1
  96. package/dist/models/player.js.map +1 -1
  97. package/dist/node_modules/classnames/index.js +1 -1
  98. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js +1 -1
  99. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js.map +1 -1
  100. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
  101. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
  102. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
  103. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
  104. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
  105. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
  106. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.js.map +1 -1
  107. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs.js.map +1 -1
  108. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.mjs.js.map +1 -1
  109. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs.js.map +1 -1
  110. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs.js.map +1 -1
  111. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js +1 -1
  112. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js.map +1 -1
  113. package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js.map +1 -1
  114. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
  115. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
  116. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
  117. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
  118. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
  119. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
  120. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
  121. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
  122. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js +1 -1
  123. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js.map +1 -1
  124. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js +1 -1
  125. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js.map +1 -1
  126. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
  127. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
  128. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
  129. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
  130. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs.js.map +1 -1
  131. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
  132. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
  133. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js +1 -1
  134. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js.map +1 -1
  135. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js +1 -1
  136. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js.map +1 -1
  137. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
  138. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
  139. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js +1 -1
  140. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js.map +1 -1
  141. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js +1 -1
  142. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js.map +1 -1
  143. package/dist/node_modules/i18next/dist/esm/i18next.js +1 -1
  144. package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
  145. package/dist/node_modules/js-base64/base64.mjs.js +1 -1
  146. package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
  147. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
  148. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
  149. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
  150. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
  151. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
  152. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
  153. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js +1 -1
  154. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js.map +1 -1
  155. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js +1 -1
  156. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js.map +1 -1
  157. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js +1 -1
  158. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +1 -1
  159. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
  160. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
  161. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
  162. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
  163. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
  164. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
  165. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js +1 -1
  166. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js.map +1 -1
  167. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js +1 -1
  168. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js.map +1 -1
  169. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js +1 -1
  170. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js.map +1 -1
  171. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js +1 -1
  172. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -1
  173. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
  174. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
  175. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js +1 -1
  176. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -1
  177. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js +1 -1
  178. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -1
  179. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
  180. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
  181. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
  182. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
  183. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js +1 -1
  184. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
  185. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js +1 -1
  186. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js.map +1 -1
  187. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
  188. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
  189. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js +1 -1
  190. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js.map +1 -1
  191. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js +1 -1
  192. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js.map +1 -1
  193. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js +1 -1
  194. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js.map +1 -1
  195. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
  196. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
  197. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js +1 -1
  198. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js.map +1 -1
  199. package/dist/node_modules/motion-dom/dist/es/animation/utils/notify-inspector.mjs.js +2 -0
  200. package/dist/node_modules/motion-dom/dist/es/animation/utils/notify-inspector.mjs.js.map +1 -0
  201. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-start-time.mjs.js +2 -0
  202. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-start-time.mjs.js.map +1 -0
  203. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
  204. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
  205. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js +2 -0
  206. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js.map +1 -0
  207. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js +2 -0
  208. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js.map +1 -0
  209. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js +1 -1
  210. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js.map +1 -1
  211. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js +2 -0
  212. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js.map +1 -0
  213. package/dist/node_modules/motion-dom/dist/es/events/add-pointer-event.mjs.js +2 -0
  214. package/dist/node_modules/motion-dom/dist/es/events/add-pointer-event.mjs.js.map +1 -0
  215. package/dist/node_modules/motion-dom/dist/es/events/event-info.mjs.js +2 -0
  216. package/dist/node_modules/motion-dom/dist/es/events/event-info.mjs.js.map +1 -0
  217. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
  218. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
  219. package/dist/node_modules/motion-dom/dist/es/frameloop/frame-data.mjs.js +2 -0
  220. package/dist/node_modules/motion-dom/dist/es/frameloop/frame-data.mjs.js.map +1 -0
  221. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.mjs.js +1 -1
  222. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.mjs.js.map +1 -1
  223. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js +1 -1
  224. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
  225. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js +1 -1
  226. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js.map +1 -1
  227. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js +2 -0
  228. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -0
  229. package/dist/node_modules/motion-dom/dist/es/gestures/drag/utils/constraints.mjs.js +2 -0
  230. package/dist/node_modules/motion-dom/dist/es/gestures/drag/utils/constraints.mjs.js.map +1 -0
  231. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
  232. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
  233. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js +2 -0
  234. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js.map +1 -0
  235. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
  236. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
  237. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js +1 -1
  238. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
  239. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.js +1 -1
  240. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.js.map +1 -1
  241. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js +1 -1
  242. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js.map +1 -1
  243. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +1 -1
  244. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
  245. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +1 -1
  246. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -1
  247. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +1 -1
  248. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -1
  249. package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js +2 -0
  250. package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js.map +1 -0
  251. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js +1 -1
  252. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +1 -1
  253. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js +1 -1
  254. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -1
  255. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
  256. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
  257. package/dist/node_modules/motion-dom/dist/es/projection/node/root.mjs.js +2 -0
  258. package/dist/node_modules/motion-dom/dist/es/projection/node/root.mjs.js.map +1 -0
  259. package/dist/node_modules/motion-dom/dist/es/projection/styles/default-scale-correctors.mjs.js +2 -0
  260. package/dist/node_modules/motion-dom/dist/es/projection/styles/default-scale-correctors.mjs.js.map +1 -0
  261. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js +1 -1
  262. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js.map +1 -1
  263. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js +1 -1
  264. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js.map +1 -1
  265. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs.js.map +1 -1
  266. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js +1 -1
  267. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
  268. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js +1 -1
  269. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js.map +1 -1
  270. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
  271. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
  272. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -1
  273. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js +1 -1
  274. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
  275. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +1 -1
  276. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -1
  277. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js +1 -1
  278. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js.map +1 -1
  279. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js +1 -1
  280. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js.map +1 -1
  281. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js +1 -1
  282. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js.map +1 -1
  283. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js +1 -1
  284. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js.map +1 -1
  285. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
  286. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
  287. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js +1 -1
  288. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js.map +1 -1
  289. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js +1 -1
  290. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js.map +1 -1
  291. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js +1 -1
  292. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js.map +1 -1
  293. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js +1 -1
  294. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js.map +1 -1
  295. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.js +1 -1
  296. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.js.map +1 -1
  297. package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js +1 -1
  298. package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js.map +1 -1
  299. package/dist/node_modules/motion-dom/dist/es/scope/active.mjs.js +2 -0
  300. package/dist/node_modules/motion-dom/dist/es/scope/active.mjs.js.map +1 -0
  301. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js +2 -0
  302. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js.map +1 -0
  303. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js +1 -1
  304. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +1 -1
  305. package/dist/node_modules/motion-dom/dist/es/utils/distance.mjs.js.map +1 -0
  306. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
  307. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
  308. package/dist/node_modules/motion-dom/dist/es/utils/is-ref-object.mjs.js.map +1 -0
  309. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
  310. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
  311. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js +1 -1
  312. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js.map +1 -1
  313. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.mjs.js +1 -1
  314. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.mjs.js.map +1 -1
  315. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js +1 -1
  316. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
  317. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
  318. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
  319. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js +1 -1
  320. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js.map +1 -1
  321. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
  322. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
  323. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js +1 -1
  324. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js.map +1 -1
  325. package/dist/node_modules/motion-dom/dist/es/value/utils/as-number.mjs.js +2 -0
  326. package/dist/node_modules/motion-dom/dist/es/value/utils/as-number.mjs.js.map +1 -0
  327. package/dist/node_modules/motion-utils/dist/es/easing/circ.mjs.js.map +1 -1
  328. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js +1 -1
  329. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js.map +1 -1
  330. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js +1 -1
  331. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js.map +1 -1
  332. package/dist/node_modules/motion-utils/dist/es/errors.mjs.js +1 -1
  333. package/dist/node_modules/motion-utils/dist/es/errors.mjs.js.map +1 -1
  334. package/dist/node_modules/motion-utils/dist/es/subscription-manager.mjs.js +1 -1
  335. package/dist/node_modules/motion-utils/dist/es/subscription-manager.mjs.js.map +1 -1
  336. package/dist/node_modules/react-i18next/dist/es/context.js +1 -1
  337. package/dist/node_modules/react-i18next/dist/es/context.js.map +1 -1
  338. package/dist/node_modules/react-i18next/dist/es/defaults.js +1 -1
  339. package/dist/node_modules/react-i18next/dist/es/defaults.js.map +1 -1
  340. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +1 -1
  341. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js.map +1 -1
  342. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +1 -1
  343. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js.map +1 -1
  344. package/dist/node_modules/react-i18next/dist/es/unescape.js +1 -1
  345. package/dist/node_modules/react-i18next/dist/es/unescape.js.map +1 -1
  346. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +1 -1
  347. package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
  348. package/dist/node_modules/react-i18next/dist/es/utils.js +1 -1
  349. package/dist/node_modules/react-i18next/dist/es/utils.js.map +1 -1
  350. package/dist/node_modules/react-redux/node_modules/react-is/index.js +1 -1
  351. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +1 -1
  352. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +1 -1
  353. package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
  354. package/dist/package.json.js +1 -1
  355. package/dist/services/astproxy.js +1 -1
  356. package/dist/services/astproxy.js.map +1 -1
  357. package/dist/services/phonebook.js +1 -1
  358. package/dist/services/phonebook.js.map +1 -1
  359. package/dist/utils/customHooks/useLocalStorage.js.map +1 -1
  360. package/dist/utils/deviceUtils.js.map +1 -1
  361. package/package.json +6 -6
  362. package/dist/_virtual/arrayLikeToArray.js +0 -2
  363. package/dist/_virtual/arrayLikeToArray.js.map +0 -1
  364. package/dist/_virtual/arrayWithHoles.js +0 -2
  365. package/dist/_virtual/arrayWithHoles.js.map +0 -1
  366. package/dist/_virtual/classCallCheck.js +0 -2
  367. package/dist/_virtual/classCallCheck.js.map +0 -1
  368. package/dist/_virtual/createClass.js +0 -2
  369. package/dist/_virtual/createClass.js.map +0 -1
  370. package/dist/_virtual/defineProperty.js +0 -2
  371. package/dist/_virtual/defineProperty.js.map +0 -1
  372. package/dist/_virtual/iterableToArrayLimit.js +0 -2
  373. package/dist/_virtual/iterableToArrayLimit.js.map +0 -1
  374. package/dist/_virtual/nonIterableRest.js +0 -2
  375. package/dist/_virtual/nonIterableRest.js.map +0 -1
  376. package/dist/_virtual/objectWithoutProperties.js +0 -2
  377. package/dist/_virtual/objectWithoutProperties.js.map +0 -1
  378. package/dist/_virtual/objectWithoutPropertiesLoose.js +0 -2
  379. package/dist/_virtual/objectWithoutPropertiesLoose.js.map +0 -1
  380. package/dist/_virtual/slicedToArray.js +0 -2
  381. package/dist/_virtual/slicedToArray.js.map +0 -1
  382. package/dist/_virtual/toPrimitive.js +0 -2
  383. package/dist/_virtual/toPrimitive.js.map +0 -1
  384. package/dist/_virtual/toPropertyKey.js +0 -2
  385. package/dist/_virtual/toPropertyKey.js.map +0 -1
  386. package/dist/_virtual/typeof.js +0 -2
  387. package/dist/_virtual/typeof.js.map +0 -1
  388. package/dist/_virtual/unsupportedIterableToArray.js +0 -2
  389. package/dist/_virtual/unsupportedIterableToArray.js.map +0 -1
  390. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -2
  391. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js.map +0 -1
  392. package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -2
  393. package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js.map +0 -1
  394. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -2
  395. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js.map +0 -1
  396. package/dist/node_modules/@babel/runtime/helpers/createClass.js +0 -2
  397. package/dist/node_modules/@babel/runtime/helpers/createClass.js.map +0 -1
  398. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js +0 -2
  399. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js.map +0 -1
  400. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -2
  401. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +0 -1
  402. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -2
  403. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +0 -1
  404. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -2
  405. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +0 -1
  406. package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -2
  407. package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js.map +0 -1
  408. package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -2
  409. package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js.map +0 -1
  410. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -2
  411. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +0 -1
  412. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -2
  413. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +0 -1
  414. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -2
  415. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js.map +0 -1
  416. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -2
  417. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
  418. package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -2
  419. package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js.map +0 -1
  420. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -2
  421. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +0 -1
  422. package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -2
  423. package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js.map +0 -1
  424. package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -2
  425. package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js.map +0 -1
  426. package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -2
  427. package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js.map +0 -1
  428. package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -2
  429. package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js.map +0 -1
  430. package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -2
  431. package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js.map +0 -1
  432. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -2
  433. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js.map +0 -1
  434. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -2
  435. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js.map +0 -1
  436. package/dist/node_modules/@babel/runtime/helpers/typeof.js +0 -2
  437. package/dist/node_modules/@babel/runtime/helpers/typeof.js.map +0 -1
  438. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -2
  439. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +0 -1
  440. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js +0 -2
  441. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js.map +0 -1
  442. package/dist/node_modules/framer-motion/dist/es/events/event-info.mjs.js +0 -2
  443. package/dist/node_modules/framer-motion/dist/es/events/event-info.mjs.js.map +0 -1
  444. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +0 -2
  445. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +0 -1
  446. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js +0 -2
  447. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js.map +0 -1
  448. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js +0 -2
  449. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +0 -1
  450. package/dist/node_modules/framer-motion/dist/es/utils/distance.mjs.js.map +0 -1
  451. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js +0 -2
  452. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +0 -1
  453. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.js.map +0 -1
  454. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js +0 -2
  455. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js.map +0 -1
  456. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.js +0 -2
  457. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.js.map +0 -1
  458. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.js +0 -2
  459. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.js.map +0 -1
  460. package/dist/node_modules/void-elements/index.js +0 -2
  461. package/dist/node_modules/void-elements/index.js.map +0 -1
  462. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/distance.mjs.js +0 -0
  463. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/is-ref-object.mjs.js +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildProjectionTransform=function(e,t,r){let s="";const a=e.x.translate/t.x,o=e.y.translate/t.y,n=r?.z||0;if((a||o||n)&&(s=`translate3d(${a}px, ${o}px, ${n}px) `),1===t.x&&1===t.y||(s+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:e,rotate:t,pathRotation:a,rotateX:o,rotateY:n,skewX:$,skewY:c}=r;e&&(s=`perspective(${e}px) ${s}`),t&&(s+=`rotate(${t}deg) `),a&&(s+=`rotate(${a}deg) `),o&&(s+=`rotateX(${o}deg) `),n&&(s+=`rotateY(${n}deg) `),$&&(s+=`skewX(${$}deg) `),c&&(s+=`skewY(${c}deg) `)}const $=e.x.scale*t.x,c=e.y.scale*t.y;return 1===$&&1===c||(s+=`scale(${$}, ${c})`),s||"none"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils/has-transform.mjs.js");exports.buildProjectionTransform=function(s,t,a){let r="";const l=s.x.translate/t.x,n=s.y.translate/t.y,o=a?.z||0;(l||n||o)&&(r=`translate3d(${l}px, ${n}px, ${o}px) `);let c="";if(a){const{transformPerspective:s}=a;s&&(r=`perspective(${s}px) ${r}`);for(let s=0;s<e.angleTransforms.length;s++){const t=e.angleTransforms[s],r=a[t];r&&(c+=`${t}(${r}deg) `),!s&&a.pathRotation&&(c+=`rotate(${a.pathRotation}deg) `)}}if(c){1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),r+=c;const e=s.x.scale*t.x,a=s.y.scale*t.y;1===e&&1===a||(r+=`scale(${e}, ${a})`)}else 1!==s.x.scale||1!==s.y.scale?r+=`scale(${s.x.scale}, ${s.y.scale})`:r||1===t.x&&1===t.y||(r="scale(1, 1)");return r||"none"};
2
2
  //# sourceMappingURL=transform.mjs.js.map
@@ -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, 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 (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","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,MACPA,EAAKC,MACLA,GACAf,EACAS,IACAR,EAAY,eAAeQ,QAA2BR,KACtDS,IAAQT,GAAa,UAAUS,UAE/BC,IAAcV,GAAa,UAAUU,UACrCC,IAASX,GAAa,WAAWW,UACjCC,IAASZ,GAAa,WAAWY,UACjCC,IAAOb,GAAa,SAASa,UAC7BC,IAAOd,GAAa,SAASc,SACrC,CAMA,MAAMC,EAAgBlB,EAAMK,EAAEc,MAAQlB,EAAUI,EAC1Ce,EAAgBpB,EAAMQ,EAAEW,MAAQlB,EAAUO,EAKhD,OAJsB,IAAlBU,GAAyC,IAAlBE,IACvBjB,GAAa,SAASe,MAAkBE,MAGrCjB,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 +1 @@
1
- {"version":3,"file":"each-axis.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs"],"sourcesContent":["function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n//# sourceMappingURL=each-axis.mjs.map\n"],"names":["callback"],"mappings":"qFAEM,SAAmBA,GACrB,MAAO,CAACA,EAAS,KAAMA,EAAS,KACpC"}
1
+ {"version":3,"file":"each-axis.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs"],"sourcesContent":["function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n//# sourceMappingURL=each-axis.mjs.map\n"],"names":["callback"],"mappings":"qFAAM,SAAsBA,GACxB,MAAO,CAACA,EAAS,KAAMA,EAAS,KACpC"}
@@ -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.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.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","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,CAeM,SAAUC,EAAeC,GAC3B,OAAOC,EAAcD,EAAOE,IAAMD,EAAcD,EAAOG,EAC3D,CAEA,SAASF,EAAcG,GACnB,OAAOA,GAAmB,OAAVA,CACpB,yHAnBM,SAAuBJ,GACzB,OACIJ,EAASI,IACTD,EAAeC,IACfA,EAAOK,GACPL,EAAOM,QACPN,EAAOO,SACPP,EAAOQ,SACPR,EAAOS,OACPT,EAAOU,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("../frameloop/microtask.mjs.js"),r=require("../frameloop/sync-time.mjs.js"),n=require("../projection/geometry/models.mjs.js"),o=require("../value/index.mjs.js"),a=require("../value/types/complex/index.mjs.js"),u=require("../value/types/utils/animatable-none.mjs.js"),h=require("../value/types/utils/find.mjs.js"),l=require("../value/utils/is-motion-value.mjs.js"),d=require("./store.mjs.js"),p=require("./utils/is-controlling-variants.mjs.js"),c=require("./utils/keys-transform.mjs.js"),m=require("./utils/motion-values.mjs.js"),v=require("./utils/reduced-motion/index.mjs.js"),f=require("./utils/resolve-variants.mjs.js"),V=require("./utils/reduced-motion/state.mjs.js"),g=require("../frameloop/frame.mjs.js"),j=require("../../../../motion-utils/dist/es/warn-once.mjs.js"),M=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),C=require("../../../../motion-utils/dist/es/is-numerical-string.mjs.js"),y=require("../../../../motion-utils/dist/es/is-zero-value-string.mjs.js"),S=require("../../../../motion-utils/dist/es/subscription-manager.mjs.js");const b=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let q={};exports.VisualElement=class{scrapeMotionValuesFromProps(e,t,s){return{}}constructor({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,g.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=n,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];this.current=e,d.visualElementStore.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(V.hasReducedMotionListener.current||v.initPrefersReducedMotion(),this.shouldReduceMotion=V.prefersReducedMotion.current),"production"!==process.env.NODE_ENV&&j.warnOnce(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),g.cancelFrame(this.notifyUpdate),g.cancelFrame(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,i){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),i.accelerate&&s.acceleratedValues.has(e)&&this.current instanceof HTMLElement){const{factory:s,keyframes:r,times:n,ease:o,duration:a}=i.accelerate,u=new t.NativeAnimation({element:this.current,name:e,keyframes:r,times:n,ease:o,duration:M.secondsToMilliseconds(a)}),h=s(u);return void this.valueSubscriptions.set(e,()=>{h(),u.cancel()})}const r=c.transformProps.has(e);r&&this.onBindTransform&&this.onBindTransform();const n=i.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&g.frame.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,i)),this.valueSubscriptions.set(e,()=>{n(),o&&o()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in q){const t=q[e];if(!t)continue;const{isEnabled:s,Feature:i}=t;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):n.createBox()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<b.length;t++){const s=b[t];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i=e["on"+s];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=m.updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const s=this.values.get(e);t!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return void 0===s&&void 0!==t&&(s=o.motionValue(null===t?void 0:t,{owner:this}),this.addValue(e,s)),s}readValue(e,t){let s=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=s&&("string"==typeof s&&(C.isNumericalString(s)||y.isZeroValueString(s))?s=parseFloat(s):!h.findValueType(s)&&a.complex.test(t)&&(s=u.getAnimatableNone(e,t)),this.setBaseTarget(e,l.isMotionValue(s)?s.get():s)),l.isMotionValue(s)?s.get():s}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let s;if("string"==typeof t||"object"==typeof t){const i=f.resolveVariantFromProps(this.props,t,this.presenceContext?.custom);i&&(s=i[e])}if(t&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||l.isMotionValue(i)?void 0!==this.initialValues[e]&&void 0===s?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new S.SubscriptionManager),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){i.microtask.render(this.render)}},exports.getFeatureDefinitions=function(){return q},exports.setFeatureDefinitions=function(e){q=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 { microtask } from '../frameloop/microtask.mjs';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { complex } from '../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../value/types/utils/animatable-none.mjs';\nimport { findValueType } from '../value/types/utils/find.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { transformProps } from './utils/keys-transform.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { initPrefersReducedMotion } from './utils/reduced-motion/index.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './utils/reduced-motion/state.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\n/**\n * Static feature definitions - can be injected by framework layer\n */\nlet featureDefinitions = {};\n/**\n * Set feature definitions for all VisualElements.\n * This should be called by the framework layer (e.g., framer-motion) during initialization.\n */\nfunction setFeatureDefinitions(definitions) {\n featureDefinitions = definitions;\n}\n/**\n * Get the current feature definitions\n */\nfunction getFeatureDefinitions() {\n return featureDefinitions;\n}\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * Decides whether animations should be skipped for this VisualElement.\n * Useful for E2E tests and visual regression testing.\n */\n this.shouldSkipAnimations = false;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n this.KeyframeResolver = KeyframeResolver;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * Track whether this element has been mounted before, to detect\n * remounts after Suspense unmount/remount cycles.\n */\n this.hasBeenMounted = false;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.renderScheduledAt = 0.0;\n this.scheduleRender = () => {\n const now = time.now();\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now;\n frame.render(this.render, false, true);\n }\n };\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.skipAnimationsConfig = skipAnimations;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key]);\n }\n }\n }\n mount(instance) {\n /**\n * If this element has been mounted before (e.g. after a Suspense\n * unmount/remount), reset motion values to their initial state\n * so animations replay correctly from initial → animate.\n */\n if (this.hasBeenMounted) {\n for (const key in this.initialValues) {\n this.values.get(key)?.jump(this.initialValues[key]);\n this.latestValues[key] = this.initialValues[key];\n }\n }\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n /**\n * Determine reduced motion preference. Only initialize the matchMedia\n * listener if we actually need the dynamic value (i.e., when config\n * is neither \"never\" nor \"always\").\n */\n if (this.reducedMotionConfig === \"never\") {\n this.shouldReduceMotion = false;\n }\n else if (this.reducedMotionConfig === \"always\") {\n this.shouldReduceMotion = true;\n }\n else {\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion = prefersReducedMotion.current;\n }\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\", \"reduced-motion-disabled\");\n }\n /**\n * Set whether animations should be skipped based on the config.\n */\n this.shouldSkipAnimations = this.skipAnimationsConfig ?? false;\n this.parent?.addChild(this);\n this.update(this.props, this.presenceContext);\n this.hasBeenMounted = true;\n }\n unmount() {\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent?.removeChild(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature) {\n feature.unmount();\n feature.isMounted = false;\n }\n }\n this.current = null;\n }\n addChild(child) {\n this.children.add(child);\n this.enteringChildren ?? (this.enteringChildren = new Set());\n this.enteringChildren.add(child);\n }\n removeChild(child) {\n this.children.delete(child);\n this.enteringChildren && this.enteringChildren.delete(child);\n }\n bindToMotionValue(key, value) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)();\n }\n if (value.accelerate &&\n acceleratedValues.has(key) &&\n this.current instanceof HTMLElement) {\n const { factory, keyframes, times, ease, duration } = value.accelerate;\n const animation = new NativeAnimation({\n element: this.current,\n name: key,\n keyframes,\n times,\n ease,\n duration: secondsToMilliseconds(duration),\n });\n const cleanup = factory(animation);\n this.valueSubscriptions.set(key, () => {\n cleanup();\n animation.cancel();\n });\n return;\n }\n const valueIsTransform = transformProps.has(key);\n if (valueIsTransform && this.onBindTransform) {\n this.onBindTransform();\n }\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n this.scheduleRender();\n });\n let removeSyncCheck;\n if (typeof window !== \"undefined\" &&\n window.MotionCheckAppearSync) {\n removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n }\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n if (removeSyncCheck)\n removeSyncCheck();\n // Defer to MotionValue.on(\"change\") auto-stop so React 19 remounts\n // can resubscribe before the animation is cancelled (#3315).\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n updateFeatures() {\n let key = \"animation\";\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key];\n if (!featureDefinition)\n continue;\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (!this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)) {\n this.features[key] = new FeatureConstructor(this);\n }\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = (\"on\" + key);\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key, target) {\n let value = this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : this.getBaseTargetFromProps(this.props, key) ??\n this.readValueFromInstance(this.current, key, this.options);\n if (value !== undefined && value !== null) {\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n scheduleRenderMicrotask() {\n microtask.render(this.render);\n }\n}\n\nexport { VisualElement, getFeatureDefinitions, setFeatureDefinitions };\n//# sourceMappingURL=VisualElement.mjs.map\n"],"names":["propEventHandlers","featureDefinitions","scrapeMotionValuesFromProps","_props","_prevProps","_visualElement","constructor","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","removeFromVariantTree","addVariantChild","forEach","bindToMotionValue","hasReducedMotionListener","initPrefersReducedMotion","prefersReducedMotion","process","env","NODE_ENV","warnOnce","addChild","update","unmount","cancelFrame","remove","clear","removeChild","feature","isMounted","child","add","enteringChildren","delete","has","accelerate","acceleratedValues","HTMLElement","factory","keyframes","times","ease","duration","animation","NativeAnimation","element","name","secondsToMilliseconds","cleanup","cancel","valueIsTransform","transformProps","onBindTransform","removeOnChange","on","latestValue","onUpdate","preRender","isTransformDirty","removeSyncCheck","window","MotionCheckAppearSync","sortNodePosition","other","sortInstanceNodePosition","type","updateFeatures","featureDefinition","isEnabled","Feature","FeatureConstructor","build","measureViewportBox","measureInstanceViewportBox","createBox","getStaticValue","setStaticValue","transformTemplate","prevProps","prevPresenceContext","i","length","listener","updateMotionValuesFromProps","handleChildMotionValue","getProps","getVariant","variants","getDefaultTransition","transition","getTransformPagePoint","transformPagePoint","getClosestVariantNode","closestVariantNode","addValue","existingValue","removeValue","unsubscribe","removeValueFromRenderState","hasValue","getValue","defaultValue","motionValue","owner","readValue","target","getBaseTargetFromProps","readValueFromInstance","isNumericalString","isZeroValueString","parseFloat","findValueType","complex","test","getAnimatableNone","setBaseTarget","getBaseTarget","valueFromInitial","variant","resolveVariantFromProps","custom","eventName","callback","SubscriptionManager","args","scheduleRenderMicrotask","microtask","getFeatureDefinitions","definitions"],"mappings":"wyCA+CA,MAAMA,EAAoB,CACtB,iBACA,oBACA,SACA,sBACA,gBACA,uBACA,2BAMJ,IAAIC,EAAkD,CAAA,8BAgIlDC,2BAAAA,CACIC,EACAC,EACAC,GAIA,MAAO,EACX,CA4LAC,WAAAA,EACIC,OACIA,EAAMC,MACNA,EAAKC,gBACLA,EAAeC,oBACfA,EAAmBC,eACnBA,EAAcC,sBACdA,EAAqBC,YACrBA,GAEJC,EAAmB,CAAA,GAhMvBC,KAAAC,QAA2B,KAU3BD,KAAAE,SAAW,IAAIC,IA4BfH,KAAAI,eAAyB,EACzBJ,KAAAK,uBAAiC,EAgBjCL,KAAAM,mBAAqC,KAMrCN,KAAAO,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AAClH,EAAKyG,IAGnCpJ,KAAK8J,cAAcnH,EAAKG,gBAAcF,GAASA,EAAMM,MAAQN,IAG1DE,EAAAA,cAAcF,GAASA,EAAMM,MAAQN,CAChD,CAMAkH,aAAAA,CAAcnH,EAAaC,GACvB5C,KAAK+B,WAAWY,GAAOC,CAC3B,CAMAmH,aAAAA,CAAcpH,GACV,MAAMV,QAAEA,GAAYjC,KAAKP,MAEzB,IAAIuK,EAEJ,GAAuB,iBAAZ/H,GAA2C,iBAAZA,EAAsB,CAC5D,MAAMgI,EAAUC,EAAuBA,wBACnClK,KAAKP,MACLwC,EACAjC,KAAKN,iBAAiByK,QAEtBF,IACAD,EAAmBC,EACftH,GAGZ,CAKA,GAAIV,QAAgCY,IAArBmH,EACX,OAAOA,EAOX,MAAMZ,EAASpJ,KAAKqJ,uBAAuBrJ,KAAKP,MAAOkD,GACvD,YAAeE,IAAXuG,GAAyBtG,EAAaA,cAACsG,QAMRvG,IAA5B7C,KAAKgC,cAAcW,SACDE,IAArBmH,OACEnH,EACA7C,KAAK+B,WAAWY,GATqCyG,CAU/D,CAEAnD,EAAAA,CACImE,EACAC,GAMA,OAJKrK,KAAKe,OAAOqJ,KACbpK,KAAKe,OAAOqJ,GAAa,IAAIE,EAAmBA,qBAG7CtK,KAAKe,OAAOqJ,GAAW1F,IAAI2F,EACtC,CAEAnJ,MAAAA,CACIkJ,KACGG,GAECvK,KAAKe,OAAOqJ,IACZpK,KAAKe,OAAOqJ,GAAWlJ,UAAUqJ,EAEzC,CAEAC,uBAAAA,GACIC,EAAAA,UAAUrJ,OAAOpB,KAAKoB,OAC1B,iCAz3BYsJ,WACZ,OAAOxL,CACX,gCAXM,SACFyL,GAEAzL,EAAqByL,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,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,KAAAM,mBAAqC,KAMrCN,KAAAO,sBAAgC,EA4BhCP,KAAAQ,OAAS,IAAIC,IAObT,KAAAU,iBAAmBA,mBAoBXV,KAAAW,SAEJ,GAMIX,KAAAY,mBAAqB,IAAIH,IAuBzBT,KAAAa,iBAAgC,GAmBhCb,KAAAc,gBAAiB,EAKjBd,KAAAe,OAEJ,GAOIf,KAAAgB,uBAEJ,GA8SJhB,KAAAiB,aAAe,IAAMjB,KAAKkB,OAAO,SAAUlB,KAAKmB,cAMhDnB,KAAAoB,OAAS,KACApB,KAAKC,UACVD,KAAKqB,eACLrB,KAAKsB,eACDtB,KAAKC,QACLD,KAAKuB,YACJvB,KAAKP,MAAc+B,MACpBxB,KAAKyB,cAILzB,KAAA0B,kBAAoB,EAC5B1B,KAAA2B,eAAiB,KACb,MAAMC,EAAMC,OAAKD,MACb5B,KAAK0B,kBAAoBE,IACzB5B,KAAK0B,kBAAoBE,EACzBE,EAAKA,MAACV,OAAOpB,KAAKoB,QAAQ,GAAO,KAtTrC,MAAMD,aAAEA,EAAYI,YAAEA,GAAgBzB,EACtCE,KAAK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AwCC,IAAjBwG,IACvBzG,EAAQ0G,EAAWA,YAACD,GAAgBrJ,KAAKuJ,kBAAkB5G,GAAM,CAC7D6G,MAAOxJ,OAEXA,KAAK8I,SAASnG,EAAKC,IAGhBA,EACX,CAOA6G,SAAAA,CAAU9G,EAAa+G,GACnB,IAAI9G,OAC2BC,IAA3B7C,KAAKmB,aAAawB,IAAuB3C,KAAKC,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 +1 @@
1
- {"version":3,"file":"DOMVisualElement.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs"],"sourcesContent":["import { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { DOMKeyframesResolver } from '../../animation/keyframes/DOMKeyframesResolver.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n const style = props.style;\n return style ? style[key] : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current) {\n this.current.textContent = `${latest}`;\n }\n });\n }\n }\n}\n\nexport { DOMVisualElement };\n//# sourceMappingURL=DOMVisualElement.mjs.map\n"],"names":["DOMVisualElement","VisualElement","constructor","this","KeyframeResolver","DOMKeyframesResolver","sortInstanceNodePosition","a","b","compareDocumentPosition","getBaseTargetFromProps","props","key","style","undefined","removeValueFromRenderState","vars","handleChildMotionValue","childSubscription","children","isMotionValue","on","latest","current","textContent"],"mappings":"sOASM,MAAgBA,UAIZC,EAAAA,cAJVC,WAAAA,uBA8BIC,KAAAC,iBAAmBC,sBAkBvB,CA3CIC,wBAAAA,CAAyBC,EAAaC,GAMlC,OAAsC,EAA/BD,EAAEE,wBAAwBD,GAAS,GAAM,CACpD,CAEAE,sBAAAA,CACIC,EACAC,GAEA,MAAMC,EAASF,EAAsDE,MACrE,OAAOA,EAASA,EAAMD,QAAkBE,CAC5C,CAEAC,0BAAAA,CACIH,GACAI,KAAEA,EAAIH,MAAEA,WAEDG,EAAKJ,UACLC,EAAMD,EACjB,CAKAK,sBAAAA,GACQd,KAAKe,oBACLf,KAAKe,2BACEf,KAAKe,mBAGhB,MAAMC,SAAEA,GAAahB,KAAKQ,MACtBS,EAAAA,cAAcD,KACdhB,KAAKe,kBAAoBC,EAASE,GAAG,SAAWC,IACxCnB,KAAKoB,UACLpB,KAAKoB,QAAQC,YAAc,GAAGF,OAI9C"}
1
+ {"version":3,"file":"DOMVisualElement.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs"],"sourcesContent":["import { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { DOMKeyframesResolver } from '../../animation/keyframes/DOMKeyframesResolver.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b precedes a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n const style = props.style;\n return style ? style[key] : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current) {\n this.current.textContent = `${latest}`;\n }\n });\n }\n }\n}\n\nexport { DOMVisualElement };\n//# sourceMappingURL=DOMVisualElement.mjs.map\n"],"names":["DOMVisualElement","VisualElement","constructor","this","KeyframeResolver","DOMKeyframesResolver","sortInstanceNodePosition","a","b","compareDocumentPosition","getBaseTargetFromProps","props","key","style","undefined","removeValueFromRenderState","vars","handleChildMotionValue","childSubscription","children","isMotionValue","on","latest","current","textContent"],"mappings":"sOASM,MAAgBA,UAIZC,EAAAA,cAJVC,WAAAA,uBA8BIC,KAAAC,iBAAmBC,sBAkBvB,CA3CIC,wBAAAA,CAAyBC,EAAaC,GAMlC,OAAsC,EAA/BD,EAAEE,wBAAwBD,GAAS,GAAM,CACpD,CAEAE,sBAAAA,CACIC,EACAC,GAEA,MAAMC,EAASF,EAAsDE,MACrE,OAAOA,EAASA,EAAMD,QAAkBE,CAC5C,CAEAC,0BAAAA,CACIH,GACAI,KAAEA,EAAIH,MAAEA,WAEDG,EAAKJ,UACLC,EAAMD,EACjB,CAKAK,sBAAAA,GACQd,KAAKe,oBACLf,KAAKe,2BACEf,KAAKe,mBAGhB,MAAMC,SAAEA,GAAahB,KAAKQ,MACtBS,EAAAA,cAAcD,KACdhB,KAAKe,kBAAoBC,EAASE,GAAG,SAAWC,IACxCnB,KAAKoB,UACLpB,KAAKoB,QAAQC,YAAc,GAAGF,OAI9C"}
@@ -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,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.sqrt(t[0]*t[0]+t[1]*t[1]),n=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),o={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:r,scaleY:n,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],h=n[1].split(",").map(u);return"function"==typeof c?c(h):h[c]}function u(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 scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n rotate,\n rotateZ: rotate,\n skewX: (v) => radToDeg(Math.atan(v[1])),\n skewY: (v) => radToDeg(Math.atan(v[2])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n};\nconst rebaseAngle = (angle) => {\n angle = angle % 360;\n if (angle < 0)\n angle += 360;\n return angle;\n};\nconst rotateZ = rotate;\nconst scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]);\nconst scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]);\nconst matrix3dParsers = {\n x: 12,\n y: 13,\n z: 14,\n translateX: 12,\n translateY: 13,\n translateZ: 14,\n scaleX,\n scaleY,\n scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n rotateZ,\n rotate: rotateZ,\n skewX: (v) => radToDeg(Math.atan(v[4])),\n skewY: (v) => radToDeg(Math.atan(v[1])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n};\nfunction defaultTransformValue(name) {\n return name.includes(\"scale\") ? 1 : 0;\n}\nfunction parseValueFromTransform(transform, name) {\n if (!transform || transform === \"none\") {\n return defaultTransformValue(name);\n }\n const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);\n let parsers;\n let match;\n if (matrix3dMatch) {\n parsers = matrix3dParsers;\n match = matrix3dMatch;\n }\n else {\n const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);\n parsers = matrix2dParsers;\n match = matrix2dMatch;\n }\n if (!match) {\n return defaultTransformValue(name);\n }\n const valueParser = parsers[name];\n const values = match[1].split(\",\").map(convertTransformToNumber);\n return typeof valueParser === \"function\"\n ? valueParser(values)\n : values[valueParser];\n}\nconst readTransformValue = (instance, name) => {\n const { transform = \"none\" } = getComputedStyle(instance);\n return parseValueFromTransform(transform, name);\n};\nfunction convertTransformToNumber(value) {\n return parseFloat(value.trim());\n}\n\nexport { defaultTransformValue, parseValueFromTransform, readTransformValue };\n//# sourceMappingURL=parse-transform.mjs.map\n"],"names":["radToDeg","rad","Math","PI","rotate","v","angle","atan2","rebaseAngle","matrix2dParsers","x","y","translateX","translateY","scaleX","scaleY","scale","abs","rotateZ","skewX","atan","skewY","skew","sqrt","matrix3dParsers","z","translateZ","rotateX","rotateY","defaultTransformValue","name","includes","parseValueFromTransform","transform","matrix3dMatch","match","parsers","matrix2dMatch","valueParser","values","split","map","convertTransformToNumber","value","parseFloat","trim","readTransformValue","instance","getComputedStyle"],"mappings":"oEAEA,MAAMA,EAAYC,GAAuB,IAANA,EAAaC,KAAKC,GAS/CC,EAAUC,IACZ,MAAMC,EAAQN,EAASE,KAAKK,MAAMF,EAAE,GAAIA,EAAE,KAC1C,OAAOG,EAAYF,IAGjBG,EAAiC,CACnCC,EAAG,EACHC,EAAG,EACHC,WAAY,EACZC,WAAY,EACZC,OAAQ,EACRC,OAAQ,EACRC,MAAQX,IAAOH,KAAKe,IAAIZ,EAAE,IAAMH,KAAKe,IAAIZ,EAAE,KAAO,EAClDD,SACAc,QAASd,EACTe,MAAQd,GAAML,EAASE,KAAKkB,KAAKf,EAAE,KACnCgB,MAAQhB,GAAML,EAASE,KAAKkB,KAAKf,EAAE,KACnCiB,KAAOjB,IAAOH,KAAKe,IAAIZ,EAAE,IA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AAYC,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,KAAKC,GAS/CC,EAAUC,IACZ,MAAMC,EAAQN,EAASE,KAAKK,MAAMF,EAAE,GAAIA,EAAE,KAC1C,OAAOG,EAAYF,IAGjBG,EAAiC,CACnCC,EAAG,EACHC,EAAG,EACHC,WAAY,EACZC,WAAY,EACZC,OAAQ,EACRC,OAAQ,EACRC,OAAQA,IAAM,EACdC,MAAQZ,IAAOH,KAAKgB,IAAIb,EAAE,IAAMH,KAAKgB,IAAIb,EAAE,KAAO,EAClDD,SACAe,QAASf,EACTgB,MAAQf,GAAML,EAASE,KAAKmB,KAAKhB,EAAE,KACnCiB,MAAQjB,GAAML,EAASE,KAAKmB,KAAKhB,EAAE,KACnCkB,KAAOlB,IAAOH,KAAKgB,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G,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"),r=require("../../utils/keys-transform.mjs.js");const s={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},a=r.transformPropOrder.length;exports.buildTransform=function(n,o,i){let l="",u=!0;for(let p=0;p<a;p++){const a=r.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||i){const r=e.getValueAsType(m,t.numberValueTypes[a]);if(!c){u=!1;l+=`${s[a]||a}(${r}) `}i&&(o[a]=r)}}const p=n.pathRotation;return p&&(u=!1,l+=`rotate(${e.getValueAsType(p,t.numberValueTypes.pathRotation)}) `),l=l.trim(),i?l=i(o,u?"":l):u&&(l="none"),l};
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 };\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":"uOAOA,MAAMA,EAAiB,CACnBC,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("../utils/keys-transform.mjs.js"),s=require("../../value/types/maps/defaults.mjs.js"),r=require("../../projection/geometry/models.mjs.js"),t=require("../dom/DOMVisualElement.mjs.js"),a=require("../dom/utils/camel-to-dash.mjs.js"),u=require("./utils/build-attrs.mjs.js"),i=require("./utils/camel-case-attrs.mjs.js"),o=require("./utils/is-svg-tag.mjs.js"),l=require("./utils/render.mjs.js"),m=require("./utils/scrape-motion-values.mjs.js");class n extends t.DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=r.createBox}getBaseTargetFromProps(e,s){return e[s]}readValueFromInstance(r,t){if(e.transformProps.has(t)){const e=s.getDefaultValueType(t);return e&&e.default||0}return t=i.camelCaseAttributes.has(t)?t:a.camelToDash(t),r.getAttribute(t)}scrapeMotionValuesFromProps(e,s,r){return m.scrapeMotionValuesFromProps(e,s,r)}build(e,s,r){u.buildSVGAttrs(e,s,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,s,r,t){l.renderSVG(e,s,r,t)}mount(e){this.isSVGTag=o.isSVGTag(e.tagName),super.mount(e)}}exports.SVGVisualElement=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils/keys-transform.mjs.js"),s=require("../../value/types/maps/defaults.mjs.js"),r=require("../../projection/geometry/models.mjs.js"),t=require("../dom/DOMVisualElement.mjs.js"),a=require("../dom/parse-transform.mjs.js"),u=require("../dom/utils/camel-to-dash.mjs.js"),i=require("./utils/build-attrs.mjs.js"),o=require("./utils/camel-case-attrs.mjs.js"),l=require("./utils/is-svg-tag.mjs.js"),m=require("./utils/render.mjs.js"),n=require("./utils/scrape-motion-values.mjs.js");class p extends t.DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=r.createBox}getBaseTargetFromProps(s,r){return e.transformProps.has(r)?super.getBaseTargetFromProps(s,r)??a.defaultTransformValue(r):s[r]}getDefaultValue(s){return e.transformProps.has(s)?this.latestValues[s]??a.defaultTransformValue(s):void 0}readValueFromInstance(r,t){if(e.transformProps.has(t)){const e=s.getDefaultValueType(t);return e&&e.default||0}if(i.cssStyleProperties.includes(t)){const e=getComputedStyle(r)[t];if("string"==typeof e&&e)return e.trim()}return t=o.camelCaseAttributes.has(t)?t:u.camelToDash(t),r.getAttribute(t)}scrapeMotionValuesFromProps(e,s,r){return n.scrapeMotionValuesFromProps(e,s,r)}build(e,s,r){i.buildSVGAttrs(e,s,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,s,r,t){m.renderSVG(e,s,r,t)}mount(e){this.isSVGTag=l.isSVGTag(e.tagName),super.mount(e)}}exports.SVGVisualElement=p;
2
2
  //# sourceMappingURL=SVGVisualElement.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SVGVisualElement.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs"],"sourcesContent":["import { transformProps } from '../utils/keys-transform.mjs';\nimport { getDefaultValueType } from '../../value/types/maps/defaults.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"svg\";\n this.isSVGTag = false;\n this.measureInstanceViewportBox = createBox;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n build(renderState, latestValues, props) {\n buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n//# sourceMappingURL=SVGVisualElement.mjs.map\n"],"names":["SVGVisualElement","DOMVisualElement","constructor","this","type","isSVGTag","measureInstanceViewportBox","createBox","getBaseTargetFromProps","props","key","readValueFromInstance","instance","transformProps","has","defaultType","getDefaultValueType","default","camelCaseAttributes","camelToDash","getAttribute","scrapeMotionValuesFromProps","prevProps","visualElement","build","renderState","latestValues","buildSVGAttrs","transformTemplate","style","renderInstance","styleProp","projection","renderSVG","mount","tagName","super"],"mappings":"wgBAiBM,MAAOA,UAAyBC,EAAAA,iBAAtCC,WAAAA,uBAKIC,KAAAC,KAAO,MAEPD,KAAAE,UAAW,EAkBXF,KAAAG,2BAA6BC,WAqCjC,CArDIC,sBAAAA,CACIC,EACAC,GAEA,OAAOD,EAAMC,EACjB,CAEAC,qBAAAA,CAAsBC,EAAsBF,GACxC,GAAIG,EAAcA,eAACC,IAAIJ,GAAM,CACzB,MAAMK,EAAcC,sBAAoBN,GACxC,OAAOK,GAAcA,EAAYE,SAAe,CACpD,CAEA,OADAP,EAAOQ,EAAmBA,oBAACJ,IAAIJ,GAA0BA,EAAnBS,cAAYT,GAC3CE,EAASQ,aAAaV,EACjC,CAIAW,2BAAAA,CACIZ,EACAa,EACAC,GAEA,OAAOF,8BAA4BZ,EAAOa,EAAWC,EACzD,CAEAC,KAAAA,CACIC,EACAC,EACAjB,GAEAkB,gBACIF,EACAC,EACAvB,KAAKE,SACLI,EAAMmB,kBACLnB,EAAcoB,MAEvB,CAEAC,cAAAA,CACIlB,EACAa,EACAM,EACAC,GAEAC,EAAAA,UAAUrB,EAAUa,EAAaM,EAAWC,EAChD,CAEAE,KAAAA,CAAMtB,GACFT,KAAKE,SAAWA,EAAAA,SAASO,EAASuB,SAClCC,MAAMF,MAAMtB,EAChB"}
1
+ {"version":3,"file":"SVGVisualElement.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs"],"sourcesContent":["import { transformProps } from '../utils/keys-transform.mjs';\nimport { getDefaultValueType } from '../../value/types/maps/defaults.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { defaultTransformValue } from '../dom/parse-transform.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { cssStyleProperties, buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"svg\";\n this.isSVGTag = false;\n this.measureInstanceViewportBox = createBox;\n }\n getBaseTargetFromProps(props, key) {\n /**\n * An independent transform's base is never an attribute of the same\n * name, e.g. <rect x> is a position, not a translate. Like HTML it\n * comes from style, falling back to the transform's default.\n */\n return transformProps.has(key)\n ? super.getBaseTargetFromProps(props, key) ??\n defaultTransformValue(key)\n : props[key];\n }\n /**\n * An independent transform's origin is never read from the DOM, so it\n * starts from its latest or default value and renders on mount.\n */\n getDefaultValue(key) {\n return transformProps.has(key)\n ? this.latestValues[key] ?? defaultTransformValue(key)\n : undefined;\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n if (cssStyleProperties.includes(key)) {\n const computedStyle = getComputedStyle(instance);\n const value = computedStyle[key];\n if (typeof value === \"string\" && value)\n return value.trim();\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n build(renderState, latestValues, props) {\n buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n//# sourceMappingURL=SVGVisualElement.mjs.map\n"],"names":["SVGVisualElement","DOMVisualElement","constructor","this","type","isSVGTag","measureInstanceViewportBox","createBox","getBaseTargetFromProps","props","key","transformProps","has","super","defaultTransformValue","getDefaultValue","latestValues","undefined","readValueFromInstance","instance","defaultType","getDefaultValueType","default","cssStyleProperties","includes","value","getComputedStyle","trim","camelCaseAttributes","camelToDash","getAttribute","scrapeMotionValuesFromProps","prevProps","visualElement","build","renderState","buildSVGAttrs","transformTemplate","style","renderInstance","styleProp","projection","renderSVG","mount","tagName"],"mappings":"mjBAkBM,MAAOA,UAAyBC,EAAAA,iBAAtCC,WAAAA,uBAKIC,KAAAC,KAAO,MAEPD,KAAAE,UAAW,EA2CXF,KAAAG,2BAA6BC,WAqCjC,CA9EIC,sBAAAA,CACIC,EACAC,GAOA,OAAOC,EAAcA,eAACC,IAAIF,GACpBG,MAAML,uBAAuBC,EAAOC,IAChCI,EAAAA,sBAAsBJ,GAC1BD,EAAMC,EAChB,CAMAK,eAAAA,CAAgBL,GACZ,OAAOC,iBAAeC,IAAIF,GACpBP,KAAKa,aAAaN,IAAQI,EAAAA,sBAAsBJ,QAChDO,CACV,CAEAC,qBAAAA,CAAsBC,EAAsBT,GACxC,GAAIC,EAAcA,eAACC,IAAIF,GAAM,CACzB,MAAMU,EAAcC,sBAAoBX,GACxC,OAAOU,GAAcA,EAAYE,SAAe,CACpD,CAEA,GAAIC,EAAkBA,mBAACC,SAASd,GAAM,CAClC,MACMe,EADgBC,iBAAiBP,GACXT,GAC5B,GAAqB,iBAAVe,GAAsBA,EAAO,OAAOA,EAAME,MACzD,CAGA,OADAjB,EAAOkB,EAAmBA,oBAAChB,IAAIF,GAA0BA,EAAnBmB,cAAYnB,GAC3CS,EAASW,aAAapB,EACjC,CAIAqB,2BAAAA,CACItB,EACAuB,EACAC,GAEA,OAAOF,8BAA4BtB,EAAOuB,EAAWC,EACzD,CAEAC,KAAAA,CACIC,EACAnB,EACAP,GAEA2B,gBACID,EACAnB,EACAb,KAAKE,SACLI,EAAM4B,kBACL5B,EAAc6B,MAEvB,CAEAC,cAAAA,CACIpB,EACAgB,EACAK,EACAC,GAEAC,EAAAA,UAAUvB,EAAUgB,EAAaK,EAAWC,EAChD,CAEAE,KAAAA,CAAMxB,GACFhB,KAAKE,SAAWA,EAAAA,SAASc,EAASyB,SAClC/B,MAAM8B,MAAMxB,EAChB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../html/utils/build-styles.mjs.js"),r=require("./path.mjs.js");const e=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];exports.buildSVGAttrs=function(s,{attrX:o,attrY:a,attrScale:i,pathLength:f,pathSpacing:n=1,pathOffset:l=0,...d},m,u,c){if(t.buildHTMLStyles(s,d,u),m)return void(s.style.viewBox&&(s.attrs.viewBox=s.style.viewBox));s.attrs=s.style,s.style={};const{attrs:v,style:x}=s;v.transform&&(x.transform=v.transform,delete v.transform),(x.transform||v.transformOrigin)&&(x.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),x.transform&&(x.transformBox=c?.transformBox??"fill-box",delete v.transformBox);for(const t of e)void 0!==v[t]&&(x[t]=v[t],delete v[t]);void 0!==o&&(v.x=o),void 0!==a&&(v.y=a),void 0!==i&&(v.scale=i),void 0!==f&&r.buildSVGPath(v,f,n,l,!1)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../html/utils/build-styles.mjs.js"),e=require("./path.mjs.js");const r=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];exports.buildSVGAttrs=function(s,{attrX:o,attrY:i,attrScale:a,pathLength:f,pathSpacing:l=1,pathOffset:n=0,...d},c,m,p){if(t.buildHTMLStyles(s,d,m),c)return void(s.style.viewBox&&(s.attrs.viewBox=s.style.viewBox));s.attrs=s.style,s.style={};const{attrs:u,style:v}=s;for(const t of r)void 0!==u[t]&&(v[t]=u[t],delete u[t]);(v.transform||u.transformOrigin)&&(v.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),v.transform&&(v.transformBox=p?.transformBox??"fill-box",delete u.transformBox),void 0!==o&&(u.x=o),void 0!==i&&(u.y=i),void 0!==a&&(u.scale=a),void 0!==f&&e.buildSVGPath(u,f,l,n,!1)},exports.cssStyleProperties=r;
2
2
  //# sourceMappingURL=build-attrs.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-attrs.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs"],"sourcesContent":["import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * CSS Motion Path properties that should remain as CSS styles on SVG elements.\n */\nconst cssMotionPathProperties = [\n \"offsetDistance\",\n \"offsetPath\",\n \"offsetRotate\",\n \"offsetAnchor\",\n];\n/**\n * Build SVG visual attributes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, isSVGTag, transformTemplate, styleProp) {\n buildHTMLStyles(state, latest, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style } = state;\n /**\n * However, we apply transforms as CSS transforms.\n * So if we detect a transform, transformOrigin we take it from attrs and copy it into style.\n */\n if (attrs.transform) {\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n if (style.transform || attrs.transformOrigin) {\n style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\";\n delete attrs.transformOrigin;\n }\n if (style.transform) {\n /**\n * SVG's element transform-origin uses its own median as a reference.\n * Therefore, transformBox becomes a fill-box\n */\n style.transformBox = styleProp?.transformBox ?? \"fill-box\";\n delete attrs.transformBox;\n }\n for (const key of cssMotionPathProperties) {\n if (attrs[key] !== undefined) {\n style[key] = attrs[key];\n delete attrs[key];\n }\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n//# sourceMappingURL=build-attrs.mjs.map\n"],"names":["cssMotionPathProperties","state","attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset","latest","isSVGTag","transformTemplate","styleProp","buildHTMLStyles","style","viewBox","attrs","transform","transformOrigin","transformBox","key","undefined","x","y","scale","buildSVGPath"],"mappings":"qJASA,MAAMA,EAA0B,CAC5B,iBACA,aACA,eACA,sCAME,SACFC,GACAC,MACIA,EAAKC,MACLA,EAAKC,UACLA,EAASC,WACTA,EAAUC,YACVA,EAAc,EAACC,WACfA,EAAa,KAEVC,GAEPC,EACAC,EACAC,GAQA,GANAC,EAAAA,gBAAgBX,EAAOO,EAAQE,GAM3BD,EAIA,YAHIR,EAAMY,MAAMC,UACZb,EAAMc,MAAMD,QAAUb,EAAMY,MAAMC,UAK1Cb,EAAMc,MAAQd,EAAMY,MACpBZ,EAAMY,MAAQ,GACd,MAAME,MAAEA,EAAKF,MAAEA,GAAUZ,EAMrBc,EAAMC,YACNH,EAAMG,UAAYD,EAAMC,iBACjBD,EAAMC,YAEbH,EAAMG,WAAaD,EAAME,mBACzBJ,EAAMI,gBAAkBF,EAAME,iBAAmB,iBAC1CF,EAAME,iBAGbJ,EAAMG,YAKNH,EAAMK,aAAgBP,GAAWO,cAA2B,kBACrDH,EAAMG,cAGjB,IAAK,MAAMC,KAAOnB,OACKoB,IAAfL,EAAMI,KACNN,EAAMM,GAAOJ,EAAMI,UACZJ,EAAMI,SAKPC,IAAVlB,IAAqBa,EAAMM,EAAInB,QACrBkB,IAAVjB,IAAqBY,EAAMO,EAAInB,QACjBiB,IAAdhB,IAAyBW,EAAMQ,MAAQnB,QAGxBgB,IAAff,GACAmB,EAAYA,aACRT,EACAV,EACAC,EACAC,GACA,EAGZ"}
1
+ {"version":3,"file":"build-attrs.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs"],"sourcesContent":["import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Values rendered via style rather than as attributes. This must include\n * every value WAAPI can accelerate, as WAAPI writes its final value to\n * style, which would otherwise override later attribute writes.\n */\nconst cssStyleProperties = [\n \"transform\",\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"offsetDistance\",\n \"offsetPath\",\n \"offsetRotate\",\n \"offsetAnchor\",\n];\n/**\n * Build SVG visual attributes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, isSVGTag, transformTemplate, styleProp) {\n buildHTMLStyles(state, latest, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style } = state;\n for (const key of cssStyleProperties) {\n if (attrs[key] !== undefined) {\n style[key] = attrs[key];\n delete attrs[key];\n }\n }\n if (style.transform || attrs.transformOrigin) {\n style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\";\n delete attrs.transformOrigin;\n }\n if (style.transform) {\n /**\n * SVG's element transform-origin uses its own median as a reference.\n * Therefore, transformBox becomes a fill-box\n */\n style.transformBox = styleProp?.transformBox ?? \"fill-box\";\n delete attrs.transformBox;\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs, cssStyleProperties };\n//# sourceMappingURL=build-attrs.mjs.map\n"],"names":["cssStyleProperties","state","attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset","latest","isSVGTag","transformTemplate","styleProp","buildHTMLStyles","style","viewBox","attrs","key","undefined","transform","transformOrigin","transformBox","x","y","scale","buildSVGPath"],"mappings":"qJAWO,MAAMA,EAAqB,CAC9B,YACA,UACA,WACA,SACA,iBACA,aACA,eACA,sCAME,SACFC,GACAC,MACIA,EAAKC,MACLA,EAAKC,UACLA,EAASC,WACTA,EAAUC,YACVA,EAAc,EAACC,WACfA,EAAa,KAEVC,GAEPC,EACAC,EACAC,GAQA,GANAC,EAAAA,gBAAgBX,EAAOO,EAAQE,GAM3BD,EAIA,YAHIR,EAAMY,MAAMC,UACZb,EAAMc,MAAMD,QAAUb,EAAMY,MAAMC,UAK1Cb,EAAMc,MAAQd,EAAMY,MACpBZ,EAAMY,MAAQ,GACd,MAAME,MAAEA,EAAKF,MAAEA,GAAUZ,EAEzB,IAAK,MAAMe,KAAOhB,OACKiB,IAAfF,EAAMC,KACNH,EAAMG,GAAOD,EAAMC,UACZD,EAAMC,KAIjBH,EAAMK,WAAaH,EAAMI,mBACzBN,EAAMM,gBAAkBJ,EAAMI,iBAAmB,iBAC1CJ,EAAMI,iBAGbN,EAAMK,YAKNL,EAAMO,aAAgBT,GAAWS,cAA2B,kBACrDL,EAAMK,mBAIHH,IAAVf,IAAqBa,EAAMM,EAAInB,QACrBe,IAAVd,IAAqBY,EAAMO,EAAInB,QACjBc,IAAdb,IAAyBW,EAAMQ,MAAQnB,QAGxBa,IAAfZ,GACAmB,EAAYA,aACRT,EACAV,EACAC,EACAC,GACA,EAGZ"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../../value/utils/is-motion-value.mjs.js"),s=require("../../utils/keys-transform.mjs.js"),e=require("../../html/utils/scrape-motion-values.mjs.js");exports.scrapeMotionValuesFromProps=function(o,t,i){const u=e.scrapeMotionValuesFromProps(o,t,i);for(const e in o)if(r.isMotionValue(o[e])||r.isMotionValue(t[e])){u[-1!==s.transformPropOrder.indexOf(e)?"attr"+e.charAt(0).toUpperCase()+e.substring(1):e]=o[e]}return u};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../../value/utils/is-motion-value.mjs.js"),e=require("../../utils/keys-transform.mjs.js"),s=require("../../html/utils/scrape-motion-values.mjs.js");exports.scrapeMotionValuesFromProps=function(o,t,i){const u=s.scrapeMotionValuesFromProps(o,t,i);for(const s in o)if("children"!==s&&(r.isMotionValue(o[s])||r.isMotionValue(t[s]))){u[-1!==e.transformPropOrder.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=o[s]}return u};
2
2
  //# sourceMappingURL=scrape-motion-values.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scrape-motion-values.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs"],"sourcesContent":["import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);\n for (const key in props) {\n if (isMotionValue(props[key]) ||\n isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n"],"names":["scrapeMotionValuesFromProps","props","prevProps","visualElement","newValues","scrapeHTMLMotionValuesFromProps","key","isMotionValue","transformPropOrder","indexOf","charAt","toUpperCase","substring"],"mappings":"8QAMgBA,SACZC,EACAC,EACAC,GAEA,MAAMC,EAAYC,EAA+BL,4BAC7CC,EACAC,EACAC,GAGJ,IAAK,MAAMG,KAAOL,EACd,GACIM,EAAaA,cAACN,EAAMK,KACpBC,EAAAA,cAAcL,EAAUI,IAC1B,CAMEF,GAJwC,IAApCI,EAAAA,mBAAmBC,QAAQH,GACrB,OAASA,EAAII,OAAO,GAAGC,cAAgBL,EAAIM,UAAU,GACrDN,GAEaL,EAAMK,EACjC,CAGJ,OAAOF,CACX"}
1
+ {"version":3,"file":"scrape-motion-values.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs"],"sourcesContent":["import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);\n for (const key in props) {\n /**\n * A MotionValue child is rendered as text content by\n * DOMVisualElement, so it mustn't also be written as an attribute.\n */\n if (key !== \"children\" &&\n (isMotionValue(props[key]) ||\n isMotionValue(prevProps[key]))) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n"],"names":["scrapeMotionValuesFromProps","props","prevProps","visualElement","newValues","scrapeHTMLMotionValuesFromProps","key","isMotionValue","transformPropOrder","indexOf","charAt","toUpperCase","substring"],"mappings":"8QAMgBA,SACZC,EACAC,EACAC,GAEA,MAAMC,EAAYC,EAA+BL,4BAC7CC,EACAC,EACAC,GAGJ,IAAK,MAAMG,KAAOL,EAKd,GACY,aAARK,IACCC,EAAaA,cAACN,EAAMK,KACjBC,gBAAcL,EAAUI,KAC9B,CAMEF,GAJwC,IAApCI,EAAAA,mBAAmBC,QAAQH,GACrB,OAASA,EAAII,OAAO,GAAGC,cAAgBL,EAAIM,UAAU,GACrDN,GAEaL,EAAMK,EACjC,CAGJ,OAAOF,CACX"}