@teamturing/react-kit 2.51.3 → 2.51.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/Tooltip/index.d.ts +2 -2
- package/dist/index.js +1342 -24149
- package/esm/_virtual/_commonjsHelpers.js +1 -3
- package/esm/core/ActionList/ActionListItem.js +18 -20
- package/esm/core/ActionList/ActionListSectionDivider.js +2 -2
- package/esm/core/ActionList/ActionListSectionHeader.js +3 -3
- package/esm/core/ActionList/index.js +3 -3
- package/esm/core/AnimatePresence/index.js +2 -5
- package/esm/core/Avatar/index.js +3 -3
- package/esm/core/AvatarGroup/AvatarGroupItem.js +4 -4
- package/esm/core/AvatarGroup/index.js +13 -13
- package/esm/core/BadgeAttacher/index.js +2 -2
- package/esm/core/Breadcrumbs/BreadcrumbsItem.js +4 -4
- package/esm/core/Breadcrumbs/index.js +5 -5
- package/esm/core/Button/index.js +7 -7
- package/esm/core/Card/index.js +1 -1
- package/esm/core/Checkbox/index.js +3 -3
- package/esm/core/Chip/index.js +4 -4
- package/esm/core/ClickArea/index.js +2 -2
- package/esm/core/CounterBadge/index.js +3 -3
- package/esm/core/Datagrid/DatagridBody.js +3 -3
- package/esm/core/Datagrid/DatagridCell.js +2 -2
- package/esm/core/Datagrid/DatagridHeader.js +7 -7
- package/esm/core/Datagrid/DatagridRow.js +3 -3
- package/esm/core/Datagrid/DatagridSubheader.js +3 -3
- package/esm/core/Datagrid/index.js +4 -4
- package/esm/core/DescriptionList/index.js +11 -11
- package/esm/core/Dialog/DialogBody.js +2 -2
- package/esm/core/Dialog/DialogFooter.js +2 -2
- package/esm/core/Dialog/DialogHeader.js +2 -2
- package/esm/core/Dialog/DialogHeaderSubtitle.js +2 -2
- package/esm/core/Dialog/DialogHeaderTitle.js +2 -2
- package/esm/core/Dialog/index.js +8 -8
- package/esm/core/Drawer/DrawerBody.js +2 -2
- package/esm/core/Drawer/DrawerFooter.js +2 -2
- package/esm/core/Drawer/DrawerHeader.js +2 -2
- package/esm/core/Drawer/DrawerHeaderIconButton.js +2 -2
- package/esm/core/Drawer/index.js +12 -13
- package/esm/core/EmptyState/index.js +8 -9
- package/esm/core/Flash/index.js +12 -15
- package/esm/core/FormControl/FormControlCaption.js +2 -2
- package/esm/core/FormControl/FormControlErrorMessage.js +2 -2
- package/esm/core/FormControl/FormControlLabel.js +5 -5
- package/esm/core/FormControl/FormControlSuccessMessage.js +2 -2
- package/esm/core/FormControl/FormControlTooltipIcon.js +5 -6
- package/esm/core/FormControl/index.js +8 -8
- package/esm/core/Grid/index.js +4 -6
- package/esm/core/HorizontalDivider/index.js +2 -2
- package/esm/core/IconButton/index.js +3 -3
- package/esm/core/IconToggleButton/index.js +3 -3
- package/esm/core/ItemList/index.js +2 -2
- package/esm/core/MotionView/index.js +1 -1
- package/esm/core/Overlay/index.js +4 -4
- package/esm/core/OverlayPopper/index.js +4 -6
- package/esm/core/Pagination/index.js +15 -17
- package/esm/core/Pill/index.js +11 -12
- package/esm/core/Radio/index.js +3 -3
- package/esm/core/SearchSelectInput/index.js +22 -28
- package/esm/core/Select/SelectOption.js +3 -3
- package/esm/core/Select/index.js +11 -13
- package/esm/core/Spinner/index.js +2 -3
- package/esm/core/Stack/index.js +4 -4
- package/esm/core/StyledIcon/index.js +3 -3
- package/esm/core/Switch/index.js +3 -3
- package/esm/core/Tab/TabItem.js +5 -5
- package/esm/core/Tab/index.js +18 -19
- package/esm/core/TextInput/TextInputTrailingAction.js +4 -4
- package/esm/core/TextInput/index.js +9 -11
- package/esm/core/Textarea/index.js +6 -8
- package/esm/core/ThemeProvider/index.js +2 -2
- package/esm/core/Toast/index.js +6 -8
- package/esm/core/Tooltip/BaseTooltip.js +8 -8
- package/esm/core/Tooltip/index.js +4 -4
- package/esm/core/Tooltip/useTooltip.js +1 -3
- package/esm/enigma/EnigmaUI/index.js +3 -4
- package/esm/enigma/Layout/SingleColumnLayout/index.js +4 -4
- package/esm/enigma/View/ChipGroupView/index.js +6 -6
- package/esm/enigma/View/GridView/index.js +5 -5
- package/esm/enigma/View/HorizontalDividerView/index.js +2 -2
- package/esm/enigma/View/IconView/index.js +4 -4
- package/esm/enigma/View/ImageView/index.js +2 -2
- package/esm/enigma/View/TextView/index.js +2 -2
- package/esm/hook/useFocusTrap.js +5 -5
- package/esm/hook/useFocusZone.js +2 -2
- package/esm/hook/useResize.js +1 -1
- package/esm/index.js +1 -1
- package/esm/theme/index.js +1 -13
- package/package.json +2 -2
- package/esm/_virtual/index.js +0 -3
- package/esm/_virtual/jsx-runtime.js +0 -3
- package/esm/_virtual/react-is.development.js +0 -3
- package/esm/_virtual/react-is.production.min.js +0 -3
- package/esm/_virtual/react-jsx-runtime.development.js +0 -3
- package/esm/_virtual/react-jsx-runtime.production.min.js +0 -3
- package/esm/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -593
- package/esm/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -731
- package/esm/node_modules/@floating-ui/react/dist/floating-ui.react.js +0 -1621
- package/esm/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +0 -233
- package/esm/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -321
- package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -161
- package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -136
- package/esm/node_modules/@primer/behaviors/dist/esm/focus-trap.js +0 -105
- package/esm/node_modules/@primer/behaviors/dist/esm/focus-zone.js +0 -436
- package/esm/node_modules/@primer/behaviors/dist/esm/polyfills/event-listener-signal.js +0 -38
- package/esm/node_modules/@primer/behaviors/dist/esm/utils/iterate-focusable-elements.js +0 -65
- package/esm/node_modules/@primer/behaviors/dist/esm/utils/unique-id.js +0 -6
- package/esm/node_modules/@primer/behaviors/dist/esm/utils/user-agent.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/animation/animators/instant.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/animation/animators/js/driver-frameloop.js +0 -16
- package/esm/node_modules/framer-motion/dist/es/animation/animators/js/index.js +0 -303
- package/esm/node_modules/framer-motion/dist/es/animation/animators/waapi/create-accelerated-animation.js +0 -199
- package/esm/node_modules/framer-motion/dist/es/animation/animators/waapi/easing.js +0 -31
- package/esm/node_modules/framer-motion/dist/es/animation/animators/waapi/index.js +0 -23
- package/esm/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/animation/generators/inertia.js +0 -87
- package/esm/node_modules/framer-motion/dist/es/animation/generators/keyframes.js +0 -51
- package/esm/node_modules/framer-motion/dist/es/animation/generators/spring/find.js +0 -89
- package/esm/node_modules/framer-motion/dist/es/animation/generators/spring/index.js +0 -129
- package/esm/node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.js +0 -101
- package/esm/node_modules/framer-motion/dist/es/animation/interfaces/single-value.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.js +0 -71
- package/esm/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.js +0 -63
- package/esm/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/animation/utils/default-transitions.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/animation/utils/is-animatable.js +0 -30
- package/esm/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/animation/utils/is-none.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/animation/utils/keyframes.js +0 -45
- package/esm/node_modules/framer-motion/dist/es/animation/utils/transitions.js +0 -13
- package/esm/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -71
- package/esm/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -56
- package/esm/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -158
- package/esm/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -13
- package/esm/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/debug/record.js +0 -7
- package/esm/node_modules/framer-motion/dist/es/easing/anticipate.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/easing/back.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/easing/circ.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/easing/cubic-bezier.js +0 -51
- package/esm/node_modules/framer-motion/dist/es/easing/ease.js +0 -7
- package/esm/node_modules/framer-motion/dist/es/easing/modifiers/mirror.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/easing/modifiers/reverse.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/easing/utils/map.js +0 -37
- package/esm/node_modules/framer-motion/dist/es/events/add-dom-event.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/events/event-info.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/frameloop/batcher.js +0 -60
- package/esm/node_modules/framer-motion/dist/es/frameloop/frame.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/frameloop/render-step.js +0 -104
- package/esm/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -457
- package/esm/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -27
- package/esm/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -125
- package/esm/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.js +0 -53
- package/esm/node_modules/framer-motion/dist/es/gestures/focus.js +0 -41
- package/esm/node_modules/framer-motion/dist/es/gestures/hover.js +0 -32
- package/esm/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -148
- package/esm/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -46
- package/esm/node_modules/framer-motion/dist/es/gestures/press.js +0 -120
- package/esm/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.js +0 -20
- package/esm/node_modules/framer-motion/dist/es/motion/features/Feature.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -31
- package/esm/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -38
- package/esm/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -13
- package/esm/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -28
- package/esm/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -21
- package/esm/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -131
- package/esm/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -72
- package/esm/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -49
- package/esm/node_modules/framer-motion/dist/es/motion/index.js +0 -79
- package/esm/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -33
- package/esm/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -75
- package/esm/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -81
- package/esm/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -59
- package/esm/node_modules/framer-motion/dist/es/projection/animation/mix-values.js +0 -93
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/conversion.js +0 -33
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/copy.js +0 -20
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.js +0 -122
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.js +0 -41
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.js +0 -54
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/models.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/projection/geometry/utils.js +0 -25
- package/esm/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.js +0 -13
- package/esm/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.js +0 -27
- package/esm/node_modules/framer-motion/dist/es/projection/node/create-projection-node.js +0 -1494
- package/esm/node_modules/framer-motion/dist/es/projection/node/state.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/projection/shared/stack.js +0 -112
- package/esm/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.js +0 -41
- package/esm/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.js +0 -35
- package/esm/node_modules/framer-motion/dist/es/projection/styles/scale-correction.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/projection/styles/transform.js +0 -42
- package/esm/node_modules/framer-motion/dist/es/projection/utils/each-axis.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/projection/utils/has-transform.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/projection/utils/measure.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/render/VisualElement.js +0 -507
- package/esm/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.js +0 -48
- package/esm/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/render/dom/motion-proxy.js +0 -47
- package/esm/node_modules/framer-motion/dist/es/render/dom/motion.js +0 -23
- package/esm/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -35
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/create-config.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.js +0 -89
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -57
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -30
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.js +0 -230
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.js +0 -30
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/find.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.js +0 -10
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/number.js +0 -72
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/test.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js +0 -55
- package/esm/node_modules/framer-motion/dist/es/render/html/config-motion.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -57
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js +0 -74
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js +0 -45
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/render.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/render/html/utils/transform.js +0 -28
- package/esm/node_modules/framer-motion/dist/es/render/store.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js +0 -46
- package/esm/node_modules/framer-motion/dist/es/render/svg/config-motion.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -33
- package/esm/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js +0 -52
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.js +0 -30
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/path.js +0 -32
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/render.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/render/utils/animation-state.js +0 -319
- package/esm/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/render/utils/flat-tree.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.js +0 -13
- package/esm/node_modules/framer-motion/dist/es/render/utils/is-variant-label.js +0 -8
- package/esm/node_modules/framer-motion/dist/es/render/utils/motion-values.js +0 -63
- package/esm/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/render/utils/resolve-variants.js +0 -26
- package/esm/node_modules/framer-motion/dist/es/render/utils/setters.js +0 -101
- package/esm/node_modules/framer-motion/dist/es/render/utils/variant-props.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/utils/array.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/utils/clamp.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/utils/delay.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/utils/distance.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/utils/errors.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.js +0 -42
- package/esm/node_modules/framer-motion/dist/es/utils/interpolate.js +0 -92
- package/esm/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/utils/is-numerical-string.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/utils/is-zero-value-string.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/utils/memo.js +0 -10
- package/esm/node_modules/framer-motion/dist/es/utils/mix-color.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/utils/mix-complex.js +0 -64
- package/esm/node_modules/framer-motion/dist/es/utils/mix.js +0 -24
- package/esm/node_modules/framer-motion/dist/es/utils/noop.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/utils/offsets/default.js +0 -9
- package/esm/node_modules/framer-motion/dist/es/utils/offsets/fill.js +0 -12
- package/esm/node_modules/framer-motion/dist/es/utils/offsets/time.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/utils/pipe.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/utils/progress.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/utils/reduced-motion/state.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/utils/resolve-value.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/utils/shallow-compare.js +0 -14
- package/esm/node_modules/framer-motion/dist/es/utils/subscription-manager.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/utils/time-conversion.js +0 -10
- package/esm/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -18
- package/esm/node_modules/framer-motion/dist/es/utils/use-force-update.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.js +0 -5
- package/esm/node_modules/framer-motion/dist/es/utils/use-is-mounted.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -6
- package/esm/node_modules/framer-motion/dist/es/utils/use-unmount-effect.js +0 -7
- package/esm/node_modules/framer-motion/dist/es/utils/velocity-per-second.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/utils/warn-once.js +0 -11
- package/esm/node_modules/framer-motion/dist/es/value/index.js +0 -331
- package/esm/node_modules/framer-motion/dist/es/value/types/color/hex.js +0 -40
- package/esm/node_modules/framer-motion/dist/es/value/types/color/hsla.js +0 -22
- package/esm/node_modules/framer-motion/dist/es/value/types/color/index.js +0 -28
- package/esm/node_modules/framer-motion/dist/es/value/types/color/rgba.js +0 -25
- package/esm/node_modules/framer-motion/dist/es/value/types/color/utils.js +0 -23
- package/esm/node_modules/framer-motion/dist/es/value/types/complex/filter.js +0 -30
- package/esm/node_modules/framer-motion/dist/es/value/types/complex/index.js +0 -92
- package/esm/node_modules/framer-motion/dist/es/value/types/numbers/index.js +0 -17
- package/esm/node_modules/framer-motion/dist/es/value/types/numbers/units.js +0 -19
- package/esm/node_modules/framer-motion/dist/es/value/types/utils.js +0 -15
- package/esm/node_modules/framer-motion/dist/es/value/use-will-change/is.js +0 -7
- package/esm/node_modules/framer-motion/dist/es/value/utils/is-motion-value.js +0 -3
- package/esm/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js +0 -16
- package/esm/node_modules/lodash.debounce/index.js +0 -363
- package/esm/node_modules/lodash.throttle/index.js +0 -424
- package/esm/node_modules/lodash.toarray/index.js +0 -849
- package/esm/node_modules/react/cjs/react-jsx-runtime.development.js +0 -1140
- package/esm/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -53
- package/esm/node_modules/react/jsx-runtime.js +0 -12
- package/esm/node_modules/react-is/cjs/react-is.development.js +0 -211
- package/esm/node_modules/react-is/cjs/react-is.production.min.js +0 -123
- package/esm/node_modules/react-is/index.js +0 -12
- package/esm/node_modules/tabbable/dist/index.esm.js +0 -560
- package/esm/packages/icons/esm/AHorizontalLine.js +0 -15
- package/esm/packages/icons/esm/AInCircleFilled.js +0 -21
- package/esm/packages/icons/esm/AVertialLine.js +0 -15
- package/esm/packages/icons/esm/Ai.js +0 -23
- package/esm/packages/icons/esm/AiColor.js +0 -23
- package/esm/packages/icons/esm/AiSad.js +0 -24
- package/esm/packages/icons/esm/Alarm.js +0 -17
- package/esm/packages/icons/esm/AppleColor.js +0 -18
- package/esm/packages/icons/esm/ArrowBelow.js +0 -17
- package/esm/packages/icons/esm/ArrowDiagonal.js +0 -15
- package/esm/packages/icons/esm/ArrowDown.js +0 -17
- package/esm/packages/icons/esm/ArrowLeft.js +0 -17
- package/esm/packages/icons/esm/ArrowLeftCircle.js +0 -15
- package/esm/packages/icons/esm/ArrowLeftLimit.js +0 -17
- package/esm/packages/icons/esm/ArrowLeftRight.js +0 -17
- package/esm/packages/icons/esm/ArrowRight.js +0 -17
- package/esm/packages/icons/esm/ArrowRightCircle.js +0 -15
- package/esm/packages/icons/esm/ArrowRightLimit.js +0 -17
- package/esm/packages/icons/esm/ArrowUp.js +0 -17
- package/esm/packages/icons/esm/ArrowUpDown.js +0 -17
- package/esm/packages/icons/esm/ArrowUpLimit.js +0 -17
- package/esm/packages/icons/esm/Barchart.js +0 -15
- package/esm/packages/icons/esm/Book.js +0 -17
- package/esm/packages/icons/esm/BookColor.js +0 -28
- package/esm/packages/icons/esm/Bookmark.js +0 -17
- package/esm/packages/icons/esm/BookmarkAnimation.js +0 -17
- package/esm/packages/icons/esm/Box.js +0 -24
- package/esm/packages/icons/esm/BoxPlus.js +0 -15
- package/esm/packages/icons/esm/BusColor.js +0 -36
- package/esm/packages/icons/esm/Calendar.js +0 -22
- package/esm/packages/icons/esm/CalendarCheck.js +0 -17
- package/esm/packages/icons/esm/CalendarCheckColor.js +0 -20
- package/esm/packages/icons/esm/CalendarColor.js +0 -36
- package/esm/packages/icons/esm/Camera.js +0 -22
- package/esm/packages/icons/esm/CameraColor.js +0 -30
- package/esm/packages/icons/esm/Card.js +0 -17
- package/esm/packages/icons/esm/CardsPercent.js +0 -19
- package/esm/packages/icons/esm/CardsPercentColor.js +0 -23
- package/esm/packages/icons/esm/CaretDown.js +0 -15
- package/esm/packages/icons/esm/CaretLeft.js +0 -15
- package/esm/packages/icons/esm/CaretRight.js +0 -15
- package/esm/packages/icons/esm/CaretUp.js +0 -15
- package/esm/packages/icons/esm/Cart.js +0 -17
- package/esm/packages/icons/esm/ChatBubble.js +0 -17
- package/esm/packages/icons/esm/ChatBubbleBadgeColor.js +0 -32
- package/esm/packages/icons/esm/ChatBubbleCorrect.js +0 -24
- package/esm/packages/icons/esm/ChatBubbleCorrectColor.js +0 -22
- package/esm/packages/icons/esm/ChatBubbleDots.js +0 -17
- package/esm/packages/icons/esm/ChatBubbleQuestion.js +0 -17
- package/esm/packages/icons/esm/ChatBubbleQuestionAnimation.js +0 -16
- package/esm/packages/icons/esm/ChatBubbleQuestionColor.js +0 -20
- package/esm/packages/icons/esm/Check.js +0 -15
- package/esm/packages/icons/esm/CheckInCircle.js +0 -17
- package/esm/packages/icons/esm/CheckInCircleColor.js +0 -20
- package/esm/packages/icons/esm/CheckInCircleLine.js +0 -20
- package/esm/packages/icons/esm/ChevronDown.js +0 -17
- package/esm/packages/icons/esm/ChevronDownTwo.js +0 -23
- package/esm/packages/icons/esm/ChevronLeft.js +0 -17
- package/esm/packages/icons/esm/ChevronRight.js +0 -17
- package/esm/packages/icons/esm/ChevronRightTwo.js +0 -23
- package/esm/packages/icons/esm/ChevronUp.js +0 -17
- package/esm/packages/icons/esm/ChevronUpTwo.js +0 -23
- package/esm/packages/icons/esm/Circles.js +0 -17
- package/esm/packages/icons/esm/Clip.js +0 -15
- package/esm/packages/icons/esm/Close.js +0 -17
- package/esm/packages/icons/esm/CloseInCircle.js +0 -17
- package/esm/packages/icons/esm/Coin.js +0 -17
- package/esm/packages/icons/esm/Contact.js +0 -17
- package/esm/packages/icons/esm/Copy.js +0 -22
- package/esm/packages/icons/esm/Correct.js +0 -16
- package/esm/packages/icons/esm/Coupon.js +0 -17
- package/esm/packages/icons/esm/Crop.js +0 -24
- package/esm/packages/icons/esm/Crown.js +0 -17
- package/esm/packages/icons/esm/Curriculum.js +0 -31
- package/esm/packages/icons/esm/CurriculumColor.js +0 -38
- package/esm/packages/icons/esm/Cursor.js +0 -22
- package/esm/packages/icons/esm/Delete.js +0 -17
- package/esm/packages/icons/esm/Document.js +0 -22
- package/esm/packages/icons/esm/Dots.js +0 -17
- package/esm/packages/icons/esm/Download.js +0 -18
- package/esm/packages/icons/esm/Emoji.js +0 -17
- package/esm/packages/icons/esm/EmojiPlus.js +0 -22
- package/esm/packages/icons/esm/EmojiPlusDash.js +0 -17
- package/esm/packages/icons/esm/Eng.js +0 -20
- package/esm/packages/icons/esm/Enter.js +0 -17
- package/esm/packages/icons/esm/Equal.js +0 -17
- package/esm/packages/icons/esm/Eraser.js +0 -17
- package/esm/packages/icons/esm/ExclamationPointInCircle.js +0 -17
- package/esm/packages/icons/esm/ExternalLink.js +0 -27
- package/esm/packages/icons/esm/EyeOff.js +0 -15
- package/esm/packages/icons/esm/EyeOn.js +0 -22
- package/esm/packages/icons/esm/EyesTwo.js +0 -15
- package/esm/packages/icons/esm/FaceHappy.js +0 -17
- package/esm/packages/icons/esm/FaceSad.js +0 -17
- package/esm/packages/icons/esm/Facebook.js +0 -15
- package/esm/packages/icons/esm/FacebookColor.js +0 -20
- package/esm/packages/icons/esm/Filter.js +0 -17
- package/esm/packages/icons/esm/Find.js +0 -17
- package/esm/packages/icons/esm/Fire.js +0 -15
- package/esm/packages/icons/esm/FireColor.js +0 -27
- package/esm/packages/icons/esm/Flag.js +0 -15
- package/esm/packages/icons/esm/Folder.js +0 -17
- package/esm/packages/icons/esm/Frame.js +0 -17
- package/esm/packages/icons/esm/Glasses.js +0 -17
- package/esm/packages/icons/esm/Global.js +0 -17
- package/esm/packages/icons/esm/GoogleColor.js +0 -35
- package/esm/packages/icons/esm/Graph.js +0 -17
- package/esm/packages/icons/esm/Hair.js +0 -17
- package/esm/packages/icons/esm/Headphone.js +0 -17
- package/esm/packages/icons/esm/Heart.js +0 -17
- package/esm/packages/icons/esm/Home.js +0 -17
- package/esm/packages/icons/esm/Infinite.js +0 -15
- package/esm/packages/icons/esm/InfoInCircle.js +0 -17
- package/esm/packages/icons/esm/Instagram.js +0 -17
- package/esm/packages/icons/esm/KakaoColor.js +0 -20
- package/esm/packages/icons/esm/Kor.js +0 -20
- package/esm/packages/icons/esm/LandscapeArrow.js +0 -20
- package/esm/packages/icons/esm/League.js +0 -17
- package/esm/packages/icons/esm/Letter.js +0 -17
- package/esm/packages/icons/esm/LetterCrownColor.js +0 -26
- package/esm/packages/icons/esm/LetterCrownOpenColor.js +0 -35
- package/esm/packages/icons/esm/LetterHeartColor.js +0 -26
- package/esm/packages/icons/esm/LetterHeartOpenColor.js +0 -35
- package/esm/packages/icons/esm/LineThree.js +0 -17
- package/esm/packages/icons/esm/Link.js +0 -22
- package/esm/packages/icons/esm/Lock.js +0 -17
- package/esm/packages/icons/esm/LogoApple.js +0 -17
- package/esm/packages/icons/esm/LogoColor.js +0 -22
- package/esm/packages/icons/esm/LogoFacebook.js +0 -17
- package/esm/packages/icons/esm/LogoKakao.js +0 -17
- package/esm/packages/icons/esm/LogoNaver.js +0 -15
- package/esm/packages/icons/esm/MagicWand.js +0 -22
- package/esm/packages/icons/esm/Maxsize.js +0 -15
- package/esm/packages/icons/esm/Minsize.js +0 -17
- package/esm/packages/icons/esm/Minus.js +0 -17
- package/esm/packages/icons/esm/MinusInCircle.js +0 -17
- package/esm/packages/icons/esm/Moneybag.js +0 -17
- package/esm/packages/icons/esm/MoneybagColor.js +0 -20
- package/esm/packages/icons/esm/Moon.js +0 -15
- package/esm/packages/icons/esm/More.js +0 -17
- package/esm/packages/icons/esm/MyBubble.js +0 -17
- package/esm/packages/icons/esm/NaverColor.js +0 -18
- package/esm/packages/icons/esm/New.js +0 -22
- package/esm/packages/icons/esm/Note.js +0 -17
- package/esm/packages/icons/esm/NoteColor.js +0 -18
- package/esm/packages/icons/esm/NotePenColor.js +0 -46
- package/esm/packages/icons/esm/NumberFiveFilled.js +0 -17
- package/esm/packages/icons/esm/NumberFiveOutlined.js +0 -20
- package/esm/packages/icons/esm/NumberFourFilled.js +0 -17
- package/esm/packages/icons/esm/NumberFourOutlined.js +0 -20
- package/esm/packages/icons/esm/NumberOneFilled.js +0 -17
- package/esm/packages/icons/esm/NumberOneOutlined.js +0 -20
- package/esm/packages/icons/esm/NumberThreeFilled.js +0 -17
- package/esm/packages/icons/esm/NumberThreeOutlined.js +0 -20
- package/esm/packages/icons/esm/NumberTwoFilled.js +0 -17
- package/esm/packages/icons/esm/NumberTwoOutlined.js +0 -20
- package/esm/packages/icons/esm/Out.js +0 -17
- package/esm/packages/icons/esm/PalmTreeColor.js +0 -41
- package/esm/packages/icons/esm/PaperCheck.js +0 -36
- package/esm/packages/icons/esm/PaperPen.js +0 -31
- package/esm/packages/icons/esm/PaperPenColor.js +0 -20
- package/esm/packages/icons/esm/PaperTwo.js +0 -18
- package/esm/packages/icons/esm/Pause.js +0 -17
- package/esm/packages/icons/esm/Pen.js +0 -17
- package/esm/packages/icons/esm/PercentInCircle.js +0 -22
- package/esm/packages/icons/esm/Picture.js +0 -17
- package/esm/packages/icons/esm/Pill.js +0 -25
- package/esm/packages/icons/esm/PillColor.js +0 -18
- package/esm/packages/icons/esm/Pin.js +0 -17
- package/esm/packages/icons/esm/PinColorRed.js +0 -26
- package/esm/packages/icons/esm/Play.js +0 -15
- package/esm/packages/icons/esm/Plus.js +0 -17
- package/esm/packages/icons/esm/PlusInCircle.js +0 -17
- package/esm/packages/icons/esm/PointInCircle.js +0 -22
- package/esm/packages/icons/esm/PointInCircleColor.js +0 -27
- package/esm/packages/icons/esm/PortraitArrow.js +0 -20
- package/esm/packages/icons/esm/Present.js +0 -21
- package/esm/packages/icons/esm/PresentColor.js +0 -20
- package/esm/packages/icons/esm/Print.js +0 -20
- package/esm/packages/icons/esm/Problem.js +0 -15
- package/esm/packages/icons/esm/Profile.js +0 -17
- package/esm/packages/icons/esm/ProgressGradient.js +0 -41
- package/esm/packages/icons/esm/QuestionMarkInCircle.js +0 -17
- package/esm/packages/icons/esm/QuestionMarkInCircleOutlined.js +0 -20
- package/esm/packages/icons/esm/QuizColor.js +0 -28
- package/esm/packages/icons/esm/RaffleColor.js +0 -113
- package/esm/packages/icons/esm/Receipt.js +0 -17
- package/esm/packages/icons/esm/Refresh.js +0 -17
- package/esm/packages/icons/esm/Repeat.js +0 -15
- package/esm/packages/icons/esm/ReportColor.js +0 -30
- package/esm/packages/icons/esm/School.js +0 -20
- package/esm/packages/icons/esm/SchoolColor.js +0 -27
- package/esm/packages/icons/esm/Scroll.js +0 -22
- package/esm/packages/icons/esm/Search.js +0 -15
- package/esm/packages/icons/esm/Set.js +0 -20
- package/esm/packages/icons/esm/Setting.js +0 -17
- package/esm/packages/icons/esm/Share.js +0 -22
- package/esm/packages/icons/esm/ShieldCheck.js +0 -15
- package/esm/packages/icons/esm/Sidebar.js +0 -17
- package/esm/packages/icons/esm/Siren.js +0 -17
- package/esm/packages/icons/esm/Skipback.js +0 -17
- package/esm/packages/icons/esm/Skipforward.js +0 -17
- package/esm/packages/icons/esm/SoundOff.js +0 -15
- package/esm/packages/icons/esm/SoundOn.js +0 -25
- package/esm/packages/icons/esm/SoundPaper.js +0 -20
- package/esm/packages/icons/esm/Speaker.js +0 -17
- package/esm/packages/icons/esm/Stackup.js +0 -27
- package/esm/packages/icons/esm/Star.js +0 -17
- package/esm/packages/icons/esm/StarColor.js +0 -21
- package/esm/packages/icons/esm/Store.js +0 -15
- package/esm/packages/icons/esm/Sun.js +0 -15
- package/esm/packages/icons/esm/Sync.js +0 -17
- package/esm/packages/icons/esm/TestUploadColor.js +0 -26
- package/esm/packages/icons/esm/Thumbdown.js +0 -17
- package/esm/packages/icons/esm/Thumbup.js +0 -17
- package/esm/packages/icons/esm/Thunder.js +0 -17
- package/esm/packages/icons/esm/Ticket.js +0 -17
- package/esm/packages/icons/esm/TicketColor.js +0 -29
- package/esm/packages/icons/esm/Time.js +0 -17
- package/esm/packages/icons/esm/Timer.js +0 -17
- package/esm/packages/icons/esm/Top.js +0 -17
- package/esm/packages/icons/esm/Touch.js +0 -26
- package/esm/packages/icons/esm/Trash.js +0 -17
- package/esm/packages/icons/esm/Treasurebox.js +0 -22
- package/esm/packages/icons/esm/Trophy.js +0 -17
- package/esm/packages/icons/esm/Twinkle.js +0 -15
- package/esm/packages/icons/esm/TwinkleColor.js +0 -48
- package/esm/packages/icons/esm/Undo.js +0 -17
- package/esm/packages/icons/esm/University.js +0 -26
- package/esm/packages/icons/esm/UserBlocked.js +0 -17
- package/esm/packages/icons/esm/UserCheck.js +0 -17
- package/esm/packages/icons/esm/UserPlus.js +0 -17
- package/esm/packages/icons/esm/UserTwo.js +0 -23
- package/esm/packages/icons/esm/Video.js +0 -17
- package/esm/packages/icons/esm/VideoColor.js +0 -18
- package/esm/packages/icons/esm/VoteColor.js +0 -24
- package/esm/packages/icons/esm/Warning.js +0 -17
- package/esm/packages/icons/esm/Wifi.js +0 -27
- package/esm/packages/icons/esm/Workbook.js +0 -28
- package/esm/packages/icons/esm/WorkbookColor.js +0 -29
- package/esm/packages/icons/esm/Wrong.js +0 -20
- package/esm/packages/icons/esm/Youtube.js +0 -17
- package/esm/packages/icons/esm/_virtual/_rollupPluginBabelHelpers.js +0 -16
- package/esm/packages/icons/esm/index.js +0 -242
- package/esm/packages/token-studio/esm/foundation/breakpoint/device.js +0 -7
- package/esm/packages/token-studio/esm/foundation/gradient/colorStopList/index.js +0 -9
- package/esm/packages/token-studio/esm/foundation/gradient/direction/index.js +0 -9
- package/esm/packages/token-studio/esm/foundation/opacity/index.js +0 -5
- package/esm/packages/token-studio/esm/foundation/palette/index.js +0 -169
- package/esm/packages/token-studio/esm/foundation/rounding/index.js +0 -13
- package/esm/packages/token-studio/esm/foundation/shadow/index.js +0 -5
- package/esm/packages/token-studio/esm/foundation/spacing/index.js +0 -56
- package/esm/packages/token-studio/esm/foundation/typography/fontSize/index.js +0 -18
- package/esm/packages/token-studio/esm/foundation/typography/fontWeight/index.js +0 -13
- package/esm/packages/token-studio/esm/foundation/typography/lineHeight/index.js +0 -6
- package/esm/packages/token-studio/esm/token/breakpoints/index.js +0 -6
- package/esm/packages/token-studio/esm/token/color/gpai/dark.js +0 -223
- package/esm/packages/token-studio/esm/token/color/gpai/light.js +0 -223
- package/esm/packages/token-studio/esm/token/color/index.js +0 -223
- package/esm/packages/token-studio/esm/token/elevation/index.js +0 -7
- package/esm/packages/token-studio/esm/token/gradient/index.js +0 -41
- package/esm/packages/token-studio/esm/token/opacity/index.js +0 -7
- package/esm/packages/token-studio/esm/token/radii/index.js +0 -15
- package/esm/packages/token-studio/esm/token/space/index.js +0 -55
- package/esm/packages/token-studio/esm/token/typography/fontSizes.js +0 -17
- package/esm/packages/token-studio/esm/token/typography/fontWeights.js +0 -9
- package/esm/packages/token-studio/esm/token/typography/index.js +0 -133
- package/esm/packages/token-studio/esm/token/typography/lineHeights.js +0 -8
- package/esm/packages/utils/esm/commaizeNumber.js +0 -10
- package/esm/packages/utils/esm/forcePixelValue.js +0 -8
- package/esm/packages/utils/esm/isArray.js +0 -3
- package/esm/packages/utils/esm/isFunction.js +0 -3
- package/esm/packages/utils/esm/isNullable.js +0 -3
- package/esm/packages/utils/esm/noop.js +0 -6
- package/esm/packages/utils/esm/scrollIntoView.js +0 -46
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { easeInOut } from '../../easing/ease.js';
|
|
2
|
-
import { isEasingArray } from '../../easing/utils/is-easing-array.js';
|
|
3
|
-
import { easingDefinitionToFunction } from '../../easing/utils/map.js';
|
|
4
|
-
import { interpolate } from '../../utils/interpolate.js';
|
|
5
|
-
import { defaultOffset } from '../../utils/offsets/default.js';
|
|
6
|
-
import { convertOffsetToTimes } from '../../utils/offsets/time.js';
|
|
7
|
-
|
|
8
|
-
function defaultEasing(values, easing) {
|
|
9
|
-
return values.map(() => easing || easeInOut).splice(0, values.length - 1);
|
|
10
|
-
}
|
|
11
|
-
function keyframes({ duration = 300, keyframes: keyframeValues, times, ease = "easeInOut", }) {
|
|
12
|
-
/**
|
|
13
|
-
* Easing functions can be externally defined as strings. Here we convert them
|
|
14
|
-
* into actual functions.
|
|
15
|
-
*/
|
|
16
|
-
const easingFunctions = isEasingArray(ease)
|
|
17
|
-
? ease.map(easingDefinitionToFunction)
|
|
18
|
-
: easingDefinitionToFunction(ease);
|
|
19
|
-
/**
|
|
20
|
-
* This is the Iterator-spec return value. We ensure it's mutable rather than using a generator
|
|
21
|
-
* to reduce GC during animation.
|
|
22
|
-
*/
|
|
23
|
-
const state = {
|
|
24
|
-
done: false,
|
|
25
|
-
value: keyframeValues[0],
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Create a times array based on the provided 0-1 offsets
|
|
29
|
-
*/
|
|
30
|
-
const absoluteTimes = convertOffsetToTimes(
|
|
31
|
-
// Only use the provided offsets if they're the correct length
|
|
32
|
-
// TODO Maybe we should warn here if there's a length mismatch
|
|
33
|
-
times && times.length === keyframeValues.length
|
|
34
|
-
? times
|
|
35
|
-
: defaultOffset(keyframeValues), duration);
|
|
36
|
-
const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {
|
|
37
|
-
ease: Array.isArray(easingFunctions)
|
|
38
|
-
? easingFunctions
|
|
39
|
-
: defaultEasing(keyframeValues, easingFunctions),
|
|
40
|
-
});
|
|
41
|
-
return {
|
|
42
|
-
calculatedDuration: duration,
|
|
43
|
-
next: (t) => {
|
|
44
|
-
state.value = mapTimeToKeyframe(t);
|
|
45
|
-
state.done = t >= duration;
|
|
46
|
-
return state;
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export { defaultEasing, keyframes };
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { warning } from '../../../utils/errors.js';
|
|
2
|
-
import { clamp } from '../../../utils/clamp.js';
|
|
3
|
-
import { secondsToMilliseconds, millisecondsToSeconds } from '../../../utils/time-conversion.js';
|
|
4
|
-
|
|
5
|
-
const safeMin = 0.001;
|
|
6
|
-
const minDuration = 0.01;
|
|
7
|
-
const maxDuration = 10.0;
|
|
8
|
-
const minDamping = 0.05;
|
|
9
|
-
const maxDamping = 1;
|
|
10
|
-
function findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1, }) {
|
|
11
|
-
let envelope;
|
|
12
|
-
let derivative;
|
|
13
|
-
warning(duration <= secondsToMilliseconds(maxDuration), "Spring duration must be 10 seconds or less");
|
|
14
|
-
let dampingRatio = 1 - bounce;
|
|
15
|
-
/**
|
|
16
|
-
* Restrict dampingRatio and duration to within acceptable ranges.
|
|
17
|
-
*/
|
|
18
|
-
dampingRatio = clamp(minDamping, maxDamping, dampingRatio);
|
|
19
|
-
duration = clamp(minDuration, maxDuration, millisecondsToSeconds(duration));
|
|
20
|
-
if (dampingRatio < 1) {
|
|
21
|
-
/**
|
|
22
|
-
* Underdamped spring
|
|
23
|
-
*/
|
|
24
|
-
envelope = (undampedFreq) => {
|
|
25
|
-
const exponentialDecay = undampedFreq * dampingRatio;
|
|
26
|
-
const delta = exponentialDecay * duration;
|
|
27
|
-
const a = exponentialDecay - velocity;
|
|
28
|
-
const b = calcAngularFreq(undampedFreq, dampingRatio);
|
|
29
|
-
const c = Math.exp(-delta);
|
|
30
|
-
return safeMin - (a / b) * c;
|
|
31
|
-
};
|
|
32
|
-
derivative = (undampedFreq) => {
|
|
33
|
-
const exponentialDecay = undampedFreq * dampingRatio;
|
|
34
|
-
const delta = exponentialDecay * duration;
|
|
35
|
-
const d = delta * velocity + velocity;
|
|
36
|
-
const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;
|
|
37
|
-
const f = Math.exp(-delta);
|
|
38
|
-
const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);
|
|
39
|
-
const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;
|
|
40
|
-
return (factor * ((d - e) * f)) / g;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
/**
|
|
45
|
-
* Critically-damped spring
|
|
46
|
-
*/
|
|
47
|
-
envelope = (undampedFreq) => {
|
|
48
|
-
const a = Math.exp(-undampedFreq * duration);
|
|
49
|
-
const b = (undampedFreq - velocity) * duration + 1;
|
|
50
|
-
return -safeMin + a * b;
|
|
51
|
-
};
|
|
52
|
-
derivative = (undampedFreq) => {
|
|
53
|
-
const a = Math.exp(-undampedFreq * duration);
|
|
54
|
-
const b = (velocity - undampedFreq) * (duration * duration);
|
|
55
|
-
return a * b;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const initialGuess = 5 / duration;
|
|
59
|
-
const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
|
|
60
|
-
duration = secondsToMilliseconds(duration);
|
|
61
|
-
if (isNaN(undampedFreq)) {
|
|
62
|
-
return {
|
|
63
|
-
stiffness: 100,
|
|
64
|
-
damping: 10,
|
|
65
|
-
duration,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
const stiffness = Math.pow(undampedFreq, 2) * mass;
|
|
70
|
-
return {
|
|
71
|
-
stiffness,
|
|
72
|
-
damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
|
|
73
|
-
duration,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
const rootIterations = 12;
|
|
78
|
-
function approximateRoot(envelope, derivative, initialGuess) {
|
|
79
|
-
let result = initialGuess;
|
|
80
|
-
for (let i = 1; i < rootIterations; i++) {
|
|
81
|
-
result = result - envelope(result) / derivative(result);
|
|
82
|
-
}
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
function calcAngularFreq(undampedFreq, dampingRatio) {
|
|
86
|
-
return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export { calcAngularFreq, findSpring, maxDamping, maxDuration, minDamping, minDuration };
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { millisecondsToSeconds } from '../../../utils/time-conversion.js';
|
|
2
|
-
import { calcGeneratorVelocity } from '../utils/velocity.js';
|
|
3
|
-
import { findSpring, calcAngularFreq } from './find.js';
|
|
4
|
-
|
|
5
|
-
const durationKeys = ["duration", "bounce"];
|
|
6
|
-
const physicsKeys = ["stiffness", "damping", "mass"];
|
|
7
|
-
function isSpringType(options, keys) {
|
|
8
|
-
return keys.some((key) => options[key] !== undefined);
|
|
9
|
-
}
|
|
10
|
-
function getSpringOptions(options) {
|
|
11
|
-
let springOptions = {
|
|
12
|
-
velocity: 0.0,
|
|
13
|
-
stiffness: 100,
|
|
14
|
-
damping: 10,
|
|
15
|
-
mass: 1.0,
|
|
16
|
-
isResolvedFromDuration: false,
|
|
17
|
-
...options,
|
|
18
|
-
};
|
|
19
|
-
// stiffness/damping/mass overrides duration/bounce
|
|
20
|
-
if (!isSpringType(options, physicsKeys) &&
|
|
21
|
-
isSpringType(options, durationKeys)) {
|
|
22
|
-
const derived = findSpring(options);
|
|
23
|
-
springOptions = {
|
|
24
|
-
...springOptions,
|
|
25
|
-
...derived,
|
|
26
|
-
velocity: 0.0,
|
|
27
|
-
mass: 1.0,
|
|
28
|
-
};
|
|
29
|
-
springOptions.isResolvedFromDuration = true;
|
|
30
|
-
}
|
|
31
|
-
return springOptions;
|
|
32
|
-
}
|
|
33
|
-
function spring({ keyframes, restDelta, restSpeed, ...options }) {
|
|
34
|
-
const origin = keyframes[0];
|
|
35
|
-
const target = keyframes[keyframes.length - 1];
|
|
36
|
-
/**
|
|
37
|
-
* This is the Iterator-spec return value. We ensure it's mutable rather than using a generator
|
|
38
|
-
* to reduce GC during animation.
|
|
39
|
-
*/
|
|
40
|
-
const state = { done: false, value: origin };
|
|
41
|
-
const { stiffness, damping, mass, velocity, duration, isResolvedFromDuration, } = getSpringOptions(options);
|
|
42
|
-
const initialVelocity = velocity ? -millisecondsToSeconds(velocity) : 0.0;
|
|
43
|
-
const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
|
|
44
|
-
const initialDelta = target - origin;
|
|
45
|
-
const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));
|
|
46
|
-
/**
|
|
47
|
-
* If we're working on a granular scale, use smaller defaults for determining
|
|
48
|
-
* when the spring is finished.
|
|
49
|
-
*
|
|
50
|
-
* These defaults have been selected emprically based on what strikes a good
|
|
51
|
-
* ratio between feeling good and finishing as soon as changes are imperceptible.
|
|
52
|
-
*/
|
|
53
|
-
const isGranularScale = Math.abs(initialDelta) < 5;
|
|
54
|
-
restSpeed || (restSpeed = isGranularScale ? 0.01 : 2);
|
|
55
|
-
restDelta || (restDelta = isGranularScale ? 0.005 : 0.5);
|
|
56
|
-
let resolveSpring;
|
|
57
|
-
if (dampingRatio < 1) {
|
|
58
|
-
const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);
|
|
59
|
-
// Underdamped spring
|
|
60
|
-
resolveSpring = (t) => {
|
|
61
|
-
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
62
|
-
return (target -
|
|
63
|
-
envelope *
|
|
64
|
-
(((initialVelocity +
|
|
65
|
-
dampingRatio * undampedAngularFreq * initialDelta) /
|
|
66
|
-
angularFreq) *
|
|
67
|
-
Math.sin(angularFreq * t) +
|
|
68
|
-
initialDelta * Math.cos(angularFreq * t)));
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
else if (dampingRatio === 1) {
|
|
72
|
-
// Critically damped spring
|
|
73
|
-
resolveSpring = (t) => target -
|
|
74
|
-
Math.exp(-undampedAngularFreq * t) *
|
|
75
|
-
(initialDelta +
|
|
76
|
-
(initialVelocity + undampedAngularFreq * initialDelta) * t);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
// Overdamped spring
|
|
80
|
-
const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
|
|
81
|
-
resolveSpring = (t) => {
|
|
82
|
-
const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
|
|
83
|
-
// When performing sinh or cosh values can hit Infinity so we cap them here
|
|
84
|
-
const freqForT = Math.min(dampedAngularFreq * t, 300);
|
|
85
|
-
return (target -
|
|
86
|
-
(envelope *
|
|
87
|
-
((initialVelocity +
|
|
88
|
-
dampingRatio * undampedAngularFreq * initialDelta) *
|
|
89
|
-
Math.sinh(freqForT) +
|
|
90
|
-
dampedAngularFreq *
|
|
91
|
-
initialDelta *
|
|
92
|
-
Math.cosh(freqForT))) /
|
|
93
|
-
dampedAngularFreq);
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
return {
|
|
97
|
-
calculatedDuration: isResolvedFromDuration ? duration || null : null,
|
|
98
|
-
next: (t) => {
|
|
99
|
-
const current = resolveSpring(t);
|
|
100
|
-
if (!isResolvedFromDuration) {
|
|
101
|
-
let currentVelocity = initialVelocity;
|
|
102
|
-
if (t !== 0) {
|
|
103
|
-
/**
|
|
104
|
-
* We only need to calculate velocity for under-damped springs
|
|
105
|
-
* as over- and critically-damped springs can't overshoot, so
|
|
106
|
-
* checking only for displacement is enough.
|
|
107
|
-
*/
|
|
108
|
-
if (dampingRatio < 1) {
|
|
109
|
-
currentVelocity = calcGeneratorVelocity(resolveSpring, t, current);
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
currentVelocity = 0;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
|
|
116
|
-
const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;
|
|
117
|
-
state.done =
|
|
118
|
-
isBelowVelocityThreshold && isBelowDisplacementThreshold;
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
state.done = t >= duration;
|
|
122
|
-
}
|
|
123
|
-
state.value = state.done ? target : current;
|
|
124
|
-
return state;
|
|
125
|
-
},
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export { spring };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Implement a practical max duration for keyframe generation
|
|
3
|
-
* to prevent infinite loops
|
|
4
|
-
*/
|
|
5
|
-
const maxGeneratorDuration = 20000;
|
|
6
|
-
function calcGeneratorDuration(generator) {
|
|
7
|
-
let duration = 0;
|
|
8
|
-
const timeStep = 50;
|
|
9
|
-
let state = generator.next(duration);
|
|
10
|
-
while (!state.done && duration < maxGeneratorDuration) {
|
|
11
|
-
duration += timeStep;
|
|
12
|
-
state = generator.next(duration);
|
|
13
|
-
}
|
|
14
|
-
return duration >= maxGeneratorDuration ? Infinity : duration;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { calcGeneratorDuration, maxGeneratorDuration };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { velocityPerSecond } from '../../../utils/velocity-per-second.js';
|
|
2
|
-
|
|
3
|
-
const velocitySampleDuration = 5; // ms
|
|
4
|
-
function calcGeneratorVelocity(resolveValue, t, current) {
|
|
5
|
-
const prevT = Math.max(t - velocitySampleDuration, 0);
|
|
6
|
-
return velocityPerSecond(current - resolveValue(prevT), t - prevT);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { calcGeneratorVelocity };
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { warning } from '../../utils/errors.js';
|
|
2
|
-
import { secondsToMilliseconds } from '../../utils/time-conversion.js';
|
|
3
|
-
import { instantAnimationState } from '../../utils/use-instant-transition-state.js';
|
|
4
|
-
import { createAcceleratedAnimation } from '../animators/waapi/create-accelerated-animation.js';
|
|
5
|
-
import { createInstantAnimation } from '../animators/instant.js';
|
|
6
|
-
import { getDefaultTransition } from '../utils/default-transitions.js';
|
|
7
|
-
import { isAnimatable } from '../utils/is-animatable.js';
|
|
8
|
-
import { getKeyframes } from '../utils/keyframes.js';
|
|
9
|
-
import { getValueTransition, isTransitionDefined } from '../utils/transitions.js';
|
|
10
|
-
import { animateValue } from '../animators/js/index.js';
|
|
11
|
-
|
|
12
|
-
const animateMotionValue = (valueName, value, target, transition = {}) => {
|
|
13
|
-
return (onComplete) => {
|
|
14
|
-
const valueTransition = getValueTransition(transition, valueName) || {};
|
|
15
|
-
/**
|
|
16
|
-
* Most transition values are currently completely overwritten by value-specific
|
|
17
|
-
* transitions. In the future it'd be nicer to blend these transitions. But for now
|
|
18
|
-
* delay actually does inherit from the root transition if not value-specific.
|
|
19
|
-
*/
|
|
20
|
-
const delay = valueTransition.delay || transition.delay || 0;
|
|
21
|
-
/**
|
|
22
|
-
* Elapsed isn't a public transition option but can be passed through from
|
|
23
|
-
* optimized appear effects in milliseconds.
|
|
24
|
-
*/
|
|
25
|
-
let { elapsed = 0 } = transition;
|
|
26
|
-
elapsed = elapsed - secondsToMilliseconds(delay);
|
|
27
|
-
const keyframes = getKeyframes(value, valueName, target, valueTransition);
|
|
28
|
-
/**
|
|
29
|
-
* Check if we're able to animate between the start and end keyframes,
|
|
30
|
-
* and throw a warning if we're attempting to animate between one that's
|
|
31
|
-
* animatable and another that isn't.
|
|
32
|
-
*/
|
|
33
|
-
const originKeyframe = keyframes[0];
|
|
34
|
-
const targetKeyframe = keyframes[keyframes.length - 1];
|
|
35
|
-
const isOriginAnimatable = isAnimatable(valueName, originKeyframe);
|
|
36
|
-
const isTargetAnimatable = isAnimatable(valueName, targetKeyframe);
|
|
37
|
-
warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${valueName} from "${originKeyframe}" to "${targetKeyframe}". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \`style\` property.`);
|
|
38
|
-
let options = {
|
|
39
|
-
keyframes,
|
|
40
|
-
velocity: value.getVelocity(),
|
|
41
|
-
ease: "easeOut",
|
|
42
|
-
...valueTransition,
|
|
43
|
-
delay: -elapsed,
|
|
44
|
-
onUpdate: (v) => {
|
|
45
|
-
value.set(v);
|
|
46
|
-
valueTransition.onUpdate && valueTransition.onUpdate(v);
|
|
47
|
-
},
|
|
48
|
-
onComplete: () => {
|
|
49
|
-
onComplete();
|
|
50
|
-
valueTransition.onComplete && valueTransition.onComplete();
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* If there's no transition defined for this value, we can generate
|
|
55
|
-
* unqiue transition settings for this value.
|
|
56
|
-
*/
|
|
57
|
-
if (!isTransitionDefined(valueTransition)) {
|
|
58
|
-
options = {
|
|
59
|
-
...options,
|
|
60
|
-
...getDefaultTransition(valueName, options),
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Both WAAPI and our internal animation functions use durations
|
|
65
|
-
* as defined by milliseconds, while our external API defines them
|
|
66
|
-
* as seconds.
|
|
67
|
-
*/
|
|
68
|
-
if (options.duration) {
|
|
69
|
-
options.duration = secondsToMilliseconds(options.duration);
|
|
70
|
-
}
|
|
71
|
-
if (options.repeatDelay) {
|
|
72
|
-
options.repeatDelay = secondsToMilliseconds(options.repeatDelay);
|
|
73
|
-
}
|
|
74
|
-
if (!isOriginAnimatable ||
|
|
75
|
-
!isTargetAnimatable ||
|
|
76
|
-
instantAnimationState.current ||
|
|
77
|
-
valueTransition.type === false) {
|
|
78
|
-
/**
|
|
79
|
-
* If we can't animate this value, or the global instant animation flag is set,
|
|
80
|
-
* or this is simply defined as an instant transition, return an instant transition.
|
|
81
|
-
*/
|
|
82
|
-
return createInstantAnimation(options);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Animate via WAAPI if possible.
|
|
86
|
-
*/
|
|
87
|
-
if (value.owner &&
|
|
88
|
-
value.owner.current instanceof HTMLElement &&
|
|
89
|
-
!value.owner.getProps().onUpdate) {
|
|
90
|
-
const acceleratedAnimation = createAcceleratedAnimation(value, valueName, options);
|
|
91
|
-
if (acceleratedAnimation)
|
|
92
|
-
return acceleratedAnimation;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* If we didn't create an accelerated animation, create a JS animation
|
|
96
|
-
*/
|
|
97
|
-
return animateValue(options);
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export { animateMotionValue };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { animateMotionValue } from './motion-value.js';
|
|
2
|
-
import { motionValue } from '../../value/index.js';
|
|
3
|
-
import { isMotionValue } from '../../value/utils/is-motion-value.js';
|
|
4
|
-
|
|
5
|
-
function animateSingleValue(value, keyframes, options) {
|
|
6
|
-
const motionValue$1 = isMotionValue(value) ? value : motionValue(value);
|
|
7
|
-
motionValue$1.start(animateMotionValue("", motionValue$1, keyframes, options));
|
|
8
|
-
return motionValue$1.animation;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { animateSingleValue };
|
package/esm/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { transformProps } from '../../render/html/utils/transform.js';
|
|
2
|
-
import { optimizedAppearDataAttribute } from '../optimized-appear/data-id.js';
|
|
3
|
-
import { animateMotionValue } from './motion-value.js';
|
|
4
|
-
import { isWillChangeMotionValue } from '../../value/use-will-change/is.js';
|
|
5
|
-
import { setTarget } from '../../render/utils/setters.js';
|
|
6
|
-
import { frame } from '../../frameloop/frame.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Decide whether we should block this animation. Previously, we achieved this
|
|
10
|
-
* just by checking whether the key was listed in protectedKeys, but this
|
|
11
|
-
* posed problems if an animation was triggered by afterChildren and protectedKeys
|
|
12
|
-
* had been set to true in the meantime.
|
|
13
|
-
*/
|
|
14
|
-
function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {
|
|
15
|
-
const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;
|
|
16
|
-
needsAnimating[key] = false;
|
|
17
|
-
return shouldBlock;
|
|
18
|
-
}
|
|
19
|
-
function animateTarget(visualElement, definition, { delay = 0, transitionOverride, type } = {}) {
|
|
20
|
-
let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = visualElement.makeTargetAnimatable(definition);
|
|
21
|
-
const willChange = visualElement.getValue("willChange");
|
|
22
|
-
if (transitionOverride)
|
|
23
|
-
transition = transitionOverride;
|
|
24
|
-
const animations = [];
|
|
25
|
-
const animationTypeState = type &&
|
|
26
|
-
visualElement.animationState &&
|
|
27
|
-
visualElement.animationState.getState()[type];
|
|
28
|
-
for (const key in target) {
|
|
29
|
-
const value = visualElement.getValue(key);
|
|
30
|
-
const valueTarget = target[key];
|
|
31
|
-
if (!value ||
|
|
32
|
-
valueTarget === undefined ||
|
|
33
|
-
(animationTypeState &&
|
|
34
|
-
shouldBlockAnimation(animationTypeState, key))) {
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
const valueTransition = {
|
|
38
|
-
delay,
|
|
39
|
-
elapsed: 0,
|
|
40
|
-
...transition,
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* If this is the first time a value is being animated, check
|
|
44
|
-
* to see if we're handling off from an existing animation.
|
|
45
|
-
*/
|
|
46
|
-
if (window.HandoffAppearAnimations && !value.hasAnimated) {
|
|
47
|
-
const appearId = visualElement.getProps()[optimizedAppearDataAttribute];
|
|
48
|
-
if (appearId) {
|
|
49
|
-
valueTransition.elapsed = window.HandoffAppearAnimations(appearId, key, value, frame);
|
|
50
|
-
valueTransition.syncStart = true;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)
|
|
54
|
-
? { type: false }
|
|
55
|
-
: valueTransition));
|
|
56
|
-
const animation = value.animation;
|
|
57
|
-
if (isWillChangeMotionValue(willChange)) {
|
|
58
|
-
willChange.add(key);
|
|
59
|
-
animation.then(() => willChange.remove(key));
|
|
60
|
-
}
|
|
61
|
-
animations.push(animation);
|
|
62
|
-
}
|
|
63
|
-
if (transitionEnd) {
|
|
64
|
-
Promise.all(animations).then(() => {
|
|
65
|
-
transitionEnd && setTarget(visualElement, transitionEnd);
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
return animations;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export { animateTarget };
|
package/esm/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.js';
|
|
2
|
-
import { animateTarget } from './visual-element-target.js';
|
|
3
|
-
|
|
4
|
-
function animateVariant(visualElement, variant, options = {}) {
|
|
5
|
-
const resolved = resolveVariant(visualElement, variant, options.custom);
|
|
6
|
-
let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};
|
|
7
|
-
if (options.transitionOverride) {
|
|
8
|
-
transition = options.transitionOverride;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* If we have a variant, create a callback that runs it as an animation.
|
|
12
|
-
* Otherwise, we resolve a Promise immediately for a composable no-op.
|
|
13
|
-
*/
|
|
14
|
-
const getAnimation = resolved
|
|
15
|
-
? () => Promise.all(animateTarget(visualElement, resolved, options))
|
|
16
|
-
: () => Promise.resolve();
|
|
17
|
-
/**
|
|
18
|
-
* If we have children, create a callback that runs all their animations.
|
|
19
|
-
* Otherwise, we resolve a Promise immediately for a composable no-op.
|
|
20
|
-
*/
|
|
21
|
-
const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size
|
|
22
|
-
? (forwardDelay = 0) => {
|
|
23
|
-
const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;
|
|
24
|
-
return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);
|
|
25
|
-
}
|
|
26
|
-
: () => Promise.resolve();
|
|
27
|
-
/**
|
|
28
|
-
* If the transition explicitly defines a "when" option, we need to resolve either
|
|
29
|
-
* this animation or all children animations before playing the other.
|
|
30
|
-
*/
|
|
31
|
-
const { when } = transition;
|
|
32
|
-
if (when) {
|
|
33
|
-
const [first, last] = when === "beforeChildren"
|
|
34
|
-
? [getAnimation, getChildAnimations]
|
|
35
|
-
: [getChildAnimations, getAnimation];
|
|
36
|
-
return first().then(() => last());
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
return Promise.all([getAnimation(), getChildAnimations(options.delay)]);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function animateChildren(visualElement, variant, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {
|
|
43
|
-
const animations = [];
|
|
44
|
-
const maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;
|
|
45
|
-
const generateStaggerDuration = staggerDirection === 1
|
|
46
|
-
? (i = 0) => i * staggerChildren
|
|
47
|
-
: (i = 0) => maxStaggerDuration - i * staggerChildren;
|
|
48
|
-
Array.from(visualElement.variantChildren)
|
|
49
|
-
.sort(sortByTreeOrder)
|
|
50
|
-
.forEach((child, i) => {
|
|
51
|
-
child.notify("AnimationStart", variant);
|
|
52
|
-
animations.push(animateVariant(child, variant, {
|
|
53
|
-
...options,
|
|
54
|
-
delay: delayChildren + generateStaggerDuration(i),
|
|
55
|
-
}).then(() => child.notify("AnimationComplete", variant)));
|
|
56
|
-
});
|
|
57
|
-
return Promise.all(animations);
|
|
58
|
-
}
|
|
59
|
-
function sortByTreeOrder(a, b) {
|
|
60
|
-
return a.sortNodePosition(b);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export { animateVariant, sortByTreeOrder };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.js';
|
|
2
|
-
import { animateTarget } from './visual-element-target.js';
|
|
3
|
-
import { animateVariant } from './visual-element-variant.js';
|
|
4
|
-
|
|
5
|
-
function animateVisualElement(visualElement, definition, options = {}) {
|
|
6
|
-
visualElement.notify("AnimationStart", definition);
|
|
7
|
-
let animation;
|
|
8
|
-
if (Array.isArray(definition)) {
|
|
9
|
-
const animations = definition.map((variant) => animateVariant(visualElement, variant, options));
|
|
10
|
-
animation = Promise.all(animations);
|
|
11
|
-
}
|
|
12
|
-
else if (typeof definition === "string") {
|
|
13
|
-
animation = animateVariant(visualElement, definition, options);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
const resolvedDefinition = typeof definition === "function"
|
|
17
|
-
? resolveVariant(visualElement, definition, options.custom)
|
|
18
|
-
: definition;
|
|
19
|
-
animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));
|
|
20
|
-
}
|
|
21
|
-
return animation.then(() => visualElement.notify("AnimationComplete", definition));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { animateVisualElement };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { camelToDash } from '../../render/dom/utils/camel-to-dash.js';
|
|
2
|
-
|
|
3
|
-
const optimizedAppearDataId = "framerAppearId";
|
|
4
|
-
const optimizedAppearDataAttribute = "data-" + camelToDash(optimizedAppearDataId);
|
|
5
|
-
|
|
6
|
-
export { optimizedAppearDataAttribute, optimizedAppearDataId };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { transformProps } from '../../render/html/utils/transform.js';
|
|
2
|
-
|
|
3
|
-
const underDampedSpring = {
|
|
4
|
-
type: "spring",
|
|
5
|
-
stiffness: 500,
|
|
6
|
-
damping: 25,
|
|
7
|
-
restSpeed: 10,
|
|
8
|
-
};
|
|
9
|
-
const criticallyDampedSpring = (target) => ({
|
|
10
|
-
type: "spring",
|
|
11
|
-
stiffness: 550,
|
|
12
|
-
damping: target === 0 ? 2 * Math.sqrt(550) : 30,
|
|
13
|
-
restSpeed: 10,
|
|
14
|
-
});
|
|
15
|
-
const keyframesTransition = {
|
|
16
|
-
type: "keyframes",
|
|
17
|
-
duration: 0.8,
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Default easing curve is a slightly shallower version of
|
|
21
|
-
* the default browser easing curve.
|
|
22
|
-
*/
|
|
23
|
-
const ease = {
|
|
24
|
-
type: "keyframes",
|
|
25
|
-
ease: [0.25, 0.1, 0.35, 1],
|
|
26
|
-
duration: 0.3,
|
|
27
|
-
};
|
|
28
|
-
const getDefaultTransition = (valueKey, { keyframes }) => {
|
|
29
|
-
if (keyframes.length > 2) {
|
|
30
|
-
return keyframesTransition;
|
|
31
|
-
}
|
|
32
|
-
else if (transformProps.has(valueKey)) {
|
|
33
|
-
return valueKey.startsWith("scale")
|
|
34
|
-
? criticallyDampedSpring(keyframes[1])
|
|
35
|
-
: underDampedSpring;
|
|
36
|
-
}
|
|
37
|
-
return ease;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export { getDefaultTransition };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { complex } from '../../value/types/complex/index.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Check if a value is animatable. Examples:
|
|
5
|
-
*
|
|
6
|
-
* ✅: 100, "100px", "#fff"
|
|
7
|
-
* ❌: "block", "url(2.jpg)"
|
|
8
|
-
* @param value
|
|
9
|
-
*
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
const isAnimatable = (key, value) => {
|
|
13
|
-
// If the list of keys tat might be non-animatable grows, replace with Set
|
|
14
|
-
if (key === "zIndex")
|
|
15
|
-
return false;
|
|
16
|
-
// If it's a number or a keyframes array, we can animate it. We might at some point
|
|
17
|
-
// need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,
|
|
18
|
-
// but for now lets leave it like this for performance reasons
|
|
19
|
-
if (typeof value === "number" || Array.isArray(value))
|
|
20
|
-
return true;
|
|
21
|
-
if (typeof value === "string" && // It's animatable if we have a string
|
|
22
|
-
(complex.test(value) || value === "0") && // And it contains numbers and/or colors
|
|
23
|
-
!value.startsWith("url(") // Unless it starts with "url("
|
|
24
|
-
) {
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
return false;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export { isAnimatable };
|