@hanzogui/animations-css 4.4.0 → 7.3.0
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/LICENSE
CHANGED
|
@@ -1,21 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present, Hanzo AI, Inc.
|
|
4
|
+
|
|
5
|
+
Portions of this software are derived from upstream code originally licensed under
|
|
6
|
+
the MIT License, with the following copyright notices retained per its terms:
|
|
2
7
|
|
|
3
8
|
Copyright (c) 2020 Nate Wienert
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
Copyright (c) 2015-present, Nicolas Gallagher.
|
|
10
|
+
Copyright (c) 2015-present, Facebook, Inc.
|
|
11
|
+
Copyright (c) 2021 Radix
|
|
12
|
+
Copyright (c) 2017 Carmelo Pullara
|
|
13
|
+
Copyright (c) 2018 Framer B.V.
|
|
14
|
+
Copyright (c) 2022 WorkOS
|
|
15
|
+
|
|
16
|
+
All rights reserved.
|
|
17
|
+
|
|
18
|
+
Redistribution and use in source and binary forms, with or without
|
|
19
|
+
modification, are permitted provided that the following conditions are met:
|
|
20
|
+
|
|
21
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
22
|
+
list of conditions and the following disclaimer.
|
|
23
|
+
|
|
24
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
25
|
+
this list of conditions and the following disclaimer in the documentation
|
|
26
|
+
and/or other materials provided with the distribution.
|
|
27
|
+
|
|
28
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
|
29
|
+
may be used to endorse or promote products derived from this software
|
|
30
|
+
without specific prior written permission.
|
|
31
|
+
|
|
32
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
33
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
34
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
35
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
36
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
37
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
38
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
39
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
40
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
41
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
42
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createAnimations_exports","__export","createAnimations","module","exports","import_animation_helpers","require","import_constants","import_use_presence","import_web","import_react","__toESM","_type_of","obj","Symbol","constructor","EXTRACT_MS_REGEX","EXTRACT_S_REGEX","extractDuration","animation","msMatch","match","Number","parseInt","sMatch","Math","round","parseFloat","MS_DURATION_REGEX","S_DURATION_REGEX","applyDurationOverride","durationMs","msReplaced","replace","sReplaced","TRANSFORM_KEYS","buildTransformString","style","parts","x","y","_style_x","_style_y","push","scale","scaleX","scaleY","rotate","val","unit","includes","rotateX","rotateY","rotateZ","skewX","skewY","join","applyStylesToNode","node","transformStr","transform","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Object","entries","iterator","_step","next","done","key","opacity","String","backgroundColor","color","err","return","animations","reactionListeners","WeakMap","usePresence","ResetPresence","inputStyle","outputStyle","useAnimatedNumber","initial","setVal","default","useState","finishTimerRef","useRef","getInstance","getValue","setValue","config","onFinish","current","clearTimeout","type","duration","setTimeout","listeners","get","forEach","listener","stop","useAnimatedNumberReaction","param","onValue","useEffect","instance","queue","Set","set","add","delete","useAnimatedNumberStyle","getStyle","useAnimatedNumbersStyle","vals","map","v","useAnimations","props","presence","componentState","stateRef","styleState","_normalized_config","isHydrating","unmounted","isEntering","isExiting","sendExitComplete","wasEnteringRef","justFinishedEntering","exitCycleIdRef","exitCompletedRef","wasExitingRef","exitInterruptedRef","justStartedExiting","justStoppedExiting","_styleState_effectiveTransition","effectiveTransition","transition","normalized","normalizeTransition","animationState","effectiveAnimationKey","getEffectiveAnimation","defaultAnimation","animatedProperties","getAnimatedProperties","hasDefault","enter","exit","hasPerPropertyConfigs","length","keys","animateOnly","useIsomorphicLayoutEffect","_normalized_config2","host","cycleId","completeExit","rafId","wasInterrupted","ignoreCancelEvents","enterStyle","exitStyle","delayStr2","delay","durationOverride2","exitTransitionString","key2","propAnimation","properties","animationValue2","filter","Boolean","resetStyle","offsetHeight","resetStyle1","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","key1","requestAnimationFrame","maxDuration","animationConfigs","getAnimationConfigsForKeys","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_iterator2","values","_step2","animationValue","_normalized_delay","fallbackTimeout","timeoutId","transitioningProps","completedCount","onFinishAnimation","event","target","eventProp","propertyName","has","size"],"sources":["../../src/createAnimations.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAA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IAAAuJ,SAAA,GAAAF,KAAA,CAAAG,YAAA;UAEA,IAAON,kBAAS,CAAWO,GAAA,CAAAF,SAAa,KAAAA,SAAA,KAAmB;YAC7DJ,cAAA;YACF,IAAAA,cAAA,IAAAD,kBAAA,CAAAQ,IAAA;cACFlH,YAAA,CAAAyG,SAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","createAnimations_exports","createAnimations","module","exports","import_animation_helpers","require","import_constants","import_use_presence","import_web","import_react","_type_of","obj","Symbol","constructor","EXTRACT_MS_REGEX","EXTRACT_S_REGEX","extractDuration","animation","msMatch","match","Number","parseInt","sMatch","Math","round","parseFloat","MS_DURATION_REGEX","S_DURATION_REGEX","applyDurationOverride","durationMs","msReplaced","replace","sReplaced","TRANSFORM_KEYS","buildTransformString","style","parts","x","y","_style_x","_style_y","push","scale","scaleX","scaleY","rotate","val","unit","includes","rotateX","rotateY","rotateZ","skewX","skewY","join","applyStylesToNode","node","transformStr","transform","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","entries","iterator","_step","next","done","opacity","String","backgroundColor","color","err","return","animations","reactionListeners","WeakMap","usePresence","ResetPresence","inputStyle","outputStyle","useAnimatedNumber","initial","setVal","default","useState","finishTimerRef","useRef","getInstance","getValue","setValue","config","onFinish","current","clearTimeout","type","duration","setTimeout","listeners","forEach","listener","stop","useAnimatedNumberReaction","param","onValue","useEffect","instance","queue","Set","set","add","delete","useAnimatedNumberStyle","getStyle","useAnimatedNumbersStyle","vals","map","v","useAnimations","props","presence","componentState","stateRef","styleState","_normalized_config","isHydrating","unmounted","isEntering","isExiting","sendExitComplete","wasEnteringRef","justFinishedEntering","exitCycleIdRef","exitCompletedRef","wasExitingRef","exitInterruptedRef","justStartedExiting","justStoppedExiting","_styleState_effectiveTransition","effectiveTransition","transition","normalized","normalizeTransition","animationState","effectiveAnimationKey","getEffectiveAnimation","defaultAnimation","animatedProperties","getAnimatedProperties","hasDefault","enter","exit","hasPerPropertyConfigs","length","keys","animateOnly","useIsomorphicLayoutEffect","_normalized_config2","host","cycleId","completeExit","rafId","wasInterrupted","ignoreCancelEvents","enterStyle","exitStyle","delayStr2","delay","durationOverride2","exitTransitionString","key2","propAnimation","properties","animationValue2","filter","Boolean","resetStyle","offsetHeight","resetStyle1","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","key1","requestAnimationFrame","maxDuration","animationConfigs","getAnimationConfigsForKeys","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_iterator2","values","_step2","animationValue","_normalized_delay","fallbackTimeout","timeoutId","transitioningProps","completedCount","onFinishAnimation","event","eventProp","propertyName","has","size","onCancelAnimation","addEventListener","cancelAnimationFrame","removeEventListener","hasAnimation","Array","isArray","transformsToString","delayStr","durationOverride","process","env","NODE_ENV","console","info","className"],"sources":["createAnimations.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar createAnimations_exports = {};\n__export(createAnimations_exports, {\n createAnimations: () => createAnimations\n});\nmodule.exports = __toCommonJS(createAnimations_exports);\nvar import_animation_helpers = require(\"@hanzogui/animation-helpers\");\nvar import_constants = require(\"@hanzogui/constants\");\nvar import_use_presence = require(\"@hanzogui/use-presence\");\nvar import_web = require(\"@hanzogui/web\");\nvar import_react = __toESM(require(\"react\"), 1);\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nvar EXTRACT_MS_REGEX = /(\\d+(?:\\.\\d+)?)\\s*ms/;\nvar EXTRACT_S_REGEX = /(\\d+(?:\\.\\d+)?)\\s*s/;\nfunction extractDuration(animation) {\n var msMatch = animation.match(EXTRACT_MS_REGEX);\n if (msMatch) {\n return Number.parseInt(msMatch[1], 10);\n }\n var sMatch = animation.match(EXTRACT_S_REGEX);\n if (sMatch) {\n return Math.round(Number.parseFloat(sMatch[1]) * 1e3);\n }\n return 300;\n}\nvar MS_DURATION_REGEX = /(\\d+(?:\\.\\d+)?)\\s*ms/;\nvar S_DURATION_REGEX = /(\\d+(?:\\.\\d+)?)\\s*s(?!tiffness)/;\nfunction applyDurationOverride(animation, durationMs) {\n var msReplaced = animation.replace(MS_DURATION_REGEX, `${durationMs}ms`);\n if (msReplaced !== animation) {\n return msReplaced;\n }\n var sReplaced = animation.replace(S_DURATION_REGEX, `${durationMs}ms`);\n if (sReplaced !== animation) {\n return sReplaced;\n }\n return `${durationMs}ms ${animation}`;\n}\nvar TRANSFORM_KEYS = [\n \"x\",\n \"y\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skewX\",\n \"skewY\"\n];\nfunction buildTransformString(style) {\n if (!style) return \"\";\n var parts = [];\n if (style.x !== void 0 || style.y !== void 0) {\n var _style_x;\n var x = (_style_x = style.x) !== null && _style_x !== void 0 ? _style_x : 0;\n var _style_y;\n var y = (_style_y = style.y) !== null && _style_y !== void 0 ? _style_y : 0;\n parts.push(`translate(${x}px, ${y}px)`);\n }\n if (style.scale !== void 0) {\n parts.push(`scale(${style.scale})`);\n }\n if (style.scaleX !== void 0) {\n parts.push(`scaleX(${style.scaleX})`);\n }\n if (style.scaleY !== void 0) {\n parts.push(`scaleY(${style.scaleY})`);\n }\n if (style.rotate !== void 0) {\n var val = style.rotate;\n var unit = typeof val === \"string\" && val.includes(\"deg\") ? \"\" : \"deg\";\n parts.push(`rotate(${val}${unit})`);\n }\n if (style.rotateX !== void 0) {\n parts.push(`rotateX(${style.rotateX}deg)`);\n }\n if (style.rotateY !== void 0) {\n parts.push(`rotateY(${style.rotateY}deg)`);\n }\n if (style.rotateZ !== void 0) {\n parts.push(`rotateZ(${style.rotateZ}deg)`);\n }\n if (style.skewX !== void 0) {\n parts.push(`skewX(${style.skewX}deg)`);\n }\n if (style.skewY !== void 0) {\n parts.push(`skewY(${style.skewY}deg)`);\n }\n return parts.join(\" \");\n}\nfunction applyStylesToNode(node, style) {\n if (!style) return;\n var transformStr = buildTransformString(style);\n if (transformStr) {\n node.style.transform = transformStr;\n }\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(style)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [key, value] = _step.value;\n if (TRANSFORM_KEYS.includes(key)) continue;\n if (value === void 0) continue;\n if (key === \"opacity\") {\n node.style.opacity = String(value);\n } else if (key === \"backgroundColor\") {\n node.style.backgroundColor = String(value);\n } else if (key === \"color\") {\n node.style.color = String(value);\n } else {\n node.style[key] = typeof value === \"number\" ? `${value}px` : String(value);\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n}\nfunction createAnimations(animations) {\n var reactionListeners = /* @__PURE__ */ new WeakMap();\n return {\n animations,\n usePresence: import_use_presence.usePresence,\n ResetPresence: import_use_presence.ResetPresence,\n inputStyle: \"css\",\n outputStyle: \"css\",\n useAnimatedNumber(initial) {\n var [val, setVal] = import_react.default.useState(initial);\n var finishTimerRef = import_react.default.useRef(null);\n return {\n getInstance() {\n return setVal;\n },\n getValue() {\n return val;\n },\n setValue(next, config, onFinish) {\n setVal(next);\n if (finishTimerRef.current) {\n clearTimeout(finishTimerRef.current);\n finishTimerRef.current = null;\n }\n if (onFinish) {\n if (!config || config.type === \"direct\" || config.type === \"timing\" && config.duration === 0) {\n onFinish();\n } else {\n var duration = config.type === \"timing\" ? config.duration : 300;\n finishTimerRef.current = setTimeout(onFinish, duration);\n }\n }\n var listeners = reactionListeners.get(setVal);\n if (listeners) {\n listeners.forEach(function(listener) {\n return listener(next);\n });\n }\n },\n stop() {\n if (finishTimerRef.current) {\n clearTimeout(finishTimerRef.current);\n finishTimerRef.current = null;\n }\n }\n };\n },\n useAnimatedNumberReaction(param, onValue) {\n var { value } = param;\n import_react.default.useEffect(function() {\n var instance = value.getInstance();\n var queue = reactionListeners.get(instance);\n if (!queue) {\n var next = /* @__PURE__ */ new Set();\n reactionListeners.set(instance, next);\n queue = next;\n }\n queue.add(onValue);\n return function() {\n queue === null || queue === void 0 ? void 0 : queue.delete(onValue);\n };\n }, []);\n },\n useAnimatedNumberStyle(val, getStyle) {\n return getStyle(val.getValue());\n },\n useAnimatedNumbersStyle(vals, getStyle) {\n return getStyle(...vals.map(function(v) {\n return v.getValue();\n }));\n },\n // @ts-ignore - styleState is added by createComponent\n useAnimations: function(param) {\n var { props, presence, style, componentState, stateRef, styleState } = param;\n var _normalized_config;\n var isHydrating = componentState.unmounted === true;\n var isEntering = !!componentState.unmounted;\n var isExiting = (presence === null || presence === void 0 ? void 0 : presence[0]) === false;\n var sendExitComplete = presence === null || presence === void 0 ? void 0 : presence[1];\n var wasEnteringRef = import_react.default.useRef(isEntering);\n var justFinishedEntering = wasEnteringRef.current && !isEntering;\n import_react.default.useEffect(function() {\n wasEnteringRef.current = isEntering;\n });\n var exitCycleIdRef = import_react.default.useRef(0);\n var exitCompletedRef = import_react.default.useRef(false);\n var wasExitingRef = import_react.default.useRef(false);\n var exitInterruptedRef = import_react.default.useRef(false);\n var justStartedExiting = isExiting && !wasExitingRef.current;\n var justStoppedExiting = !isExiting && wasExitingRef.current;\n if (justStartedExiting) {\n exitCycleIdRef.current++;\n exitCompletedRef.current = false;\n }\n if (justStoppedExiting) {\n exitCycleIdRef.current++;\n exitInterruptedRef.current = true;\n }\n import_react.default.useEffect(function() {\n wasExitingRef.current = isExiting;\n });\n var _styleState_effectiveTransition;\n var effectiveTransition = (_styleState_effectiveTransition = styleState === null || styleState === void 0 ? void 0 : styleState.effectiveTransition) !== null && _styleState_effectiveTransition !== void 0 ? _styleState_effectiveTransition : props.transition;\n var normalized = (0, import_animation_helpers.normalizeTransition)(effectiveTransition);\n var animationState = isExiting ? \"exit\" : isEntering || justFinishedEntering ? \"enter\" : \"default\";\n var effectiveAnimationKey = (0, import_animation_helpers.getEffectiveAnimation)(normalized, animationState);\n var defaultAnimation = effectiveAnimationKey ? animations[effectiveAnimationKey] : null;\n var animatedProperties = (0, import_animation_helpers.getAnimatedProperties)(normalized);\n var hasDefault = normalized.default !== null || normalized.enter !== null || normalized.exit !== null;\n var hasPerPropertyConfigs = animatedProperties.length > 0;\n var keys;\n if (props.animateOnly) {\n keys = props.animateOnly;\n } else if (hasPerPropertyConfigs && !hasDefault) {\n keys = animatedProperties;\n } else if (hasPerPropertyConfigs && hasDefault) {\n keys = [\n \"all\",\n ...animatedProperties\n ];\n } else {\n keys = [\n \"all\"\n ];\n }\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n var _normalized_config2;\n var host = stateRef.current.host;\n if (!sendExitComplete || !isExiting || !host) return;\n var node = host;\n var cycleId = exitCycleIdRef.current;\n var completeExit = function() {\n if (cycleId !== exitCycleIdRef.current) return;\n if (exitCompletedRef.current) return;\n exitCompletedRef.current = true;\n sendExitComplete();\n };\n if (keys.length === 0) {\n completeExit();\n return;\n }\n var rafId;\n var wasInterrupted = exitInterruptedRef.current;\n var ignoreCancelEvents = wasInterrupted;\n var enterStyle = props.enterStyle;\n var exitStyle = props.exitStyle;\n var delayStr2 = normalized.delay ? ` ${normalized.delay}ms` : \"\";\n var durationOverride2 = (_normalized_config2 = normalized.config) === null || _normalized_config2 === void 0 ? void 0 : _normalized_config2.duration;\n var exitTransitionString = keys.map(function(key2) {\n var propAnimation = normalized.properties[key2];\n var animationValue2 = null;\n if (typeof propAnimation === \"string\") {\n animationValue2 = animations[propAnimation];\n } else if (propAnimation && (typeof propAnimation === \"undefined\" ? \"undefined\" : _type_of(propAnimation)) === \"object\" && propAnimation.type) {\n animationValue2 = animations[propAnimation.type];\n } else if (defaultAnimation) {\n animationValue2 = defaultAnimation;\n }\n if (animationValue2 && durationOverride2) {\n animationValue2 = applyDurationOverride(animationValue2, durationOverride2);\n }\n return animationValue2 ? `${key2} ${animationValue2}${delayStr2}` : null;\n }).filter(Boolean).join(\", \");\n if (wasInterrupted) {\n exitInterruptedRef.current = false;\n node.style.transition = \"none\";\n if (exitStyle) {\n var resetStyle = {};\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.keys(exitStyle)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n if (key === \"opacity\") {\n resetStyle[key] = 1;\n } else if (TRANSFORM_KEYS.includes(key)) {\n resetStyle[key] = key === \"scale\" || key === \"scaleX\" || key === \"scaleY\" ? 1 : 0;\n } else if ((enterStyle === null || enterStyle === void 0 ? void 0 : enterStyle[key]) !== void 0) {\n resetStyle[key] = enterStyle[key];\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n applyStylesToNode(node, resetStyle);\n } else {\n node.style.opacity = \"1\";\n node.style.transform = \"none\";\n }\n void node.offsetHeight;\n } else if (exitStyle) {\n ignoreCancelEvents = true;\n node.style.transition = \"none\";\n var resetStyle1 = {};\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = Object.keys(exitStyle)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var key1 = _step1.value;\n if (key1 === \"opacity\") {\n resetStyle1[key1] = 1;\n } else if (TRANSFORM_KEYS.includes(key1)) {\n resetStyle1[key1] = key1 === \"scale\" || key1 === \"scaleX\" || key1 === \"scaleY\" ? 1 : 0;\n } else if ((enterStyle === null || enterStyle === void 0 ? void 0 : enterStyle[key1]) !== void 0) {\n resetStyle1[key1] = enterStyle[key1];\n }\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n applyStylesToNode(node, resetStyle1);\n void node.offsetHeight;\n rafId = requestAnimationFrame(function() {\n if (cycleId !== exitCycleIdRef.current) return;\n node.style.transition = exitTransitionString;\n void node.offsetHeight;\n applyStylesToNode(node, exitStyle);\n ignoreCancelEvents = false;\n });\n }\n var maxDuration = defaultAnimation ? extractDuration(defaultAnimation) : 200;\n var animationConfigs = (0, import_animation_helpers.getAnimationConfigsForKeys)(normalized, animations, keys, defaultAnimation);\n var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;\n try {\n for (var _iterator2 = animationConfigs.values()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var animationValue = _step2.value;\n if (animationValue) {\n var duration = extractDuration(animationValue);\n if (duration > maxDuration) {\n maxDuration = duration;\n }\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n var _normalized_delay;\n var delay = (_normalized_delay = normalized.delay) !== null && _normalized_delay !== void 0 ? _normalized_delay : 0;\n var fallbackTimeout = maxDuration + delay;\n var timeoutId = setTimeout(function() {\n completeExit();\n }, fallbackTimeout);\n var transitioningProps = new Set(keys);\n var completedCount = 0;\n var onFinishAnimation = function(event) {\n if (event.target !== node) return;\n var eventProp = event.propertyName;\n if (transitioningProps.has(eventProp) || eventProp === \"all\") {\n completedCount++;\n if (completedCount >= transitioningProps.size) {\n clearTimeout(timeoutId);\n completeExit();\n }\n }\n };\n var onCancelAnimation = function() {\n if (ignoreCancelEvents) return;\n clearTimeout(timeoutId);\n completeExit();\n };\n node.addEventListener(\"transitionend\", onFinishAnimation);\n node.addEventListener(\"transitioncancel\", onCancelAnimation);\n if (wasInterrupted) {\n rafId = requestAnimationFrame(function() {\n if (cycleId !== exitCycleIdRef.current) return;\n node.style.transition = exitTransitionString;\n void node.offsetHeight;\n applyStylesToNode(node, exitStyle);\n ignoreCancelEvents = false;\n });\n }\n return function() {\n clearTimeout(timeoutId);\n if (rafId !== void 0) cancelAnimationFrame(rafId);\n node.removeEventListener(\"transitionend\", onFinishAnimation);\n node.removeEventListener(\"transitioncancel\", onCancelAnimation);\n node.style.transition = \"\";\n };\n }, [\n sendExitComplete,\n isExiting,\n stateRef,\n keys,\n normalized,\n defaultAnimation,\n props.enterStyle,\n props.exitStyle\n ]);\n if (isHydrating) {\n return null;\n }\n if (!(0, import_animation_helpers.hasAnimation)(normalized)) {\n return null;\n }\n if (Array.isArray(style.transform)) {\n style.transform = (0, import_web.transformsToString)(style.transform);\n }\n var delayStr = normalized.delay ? ` ${normalized.delay}ms` : \"\";\n var durationOverride = (_normalized_config = normalized.config) === null || _normalized_config === void 0 ? void 0 : _normalized_config.duration;\n style.transition = keys.map(function(key) {\n var propAnimation = normalized.properties[key];\n var animationValue = null;\n if (typeof propAnimation === \"string\") {\n animationValue = animations[propAnimation];\n } else if (propAnimation && (typeof propAnimation === \"undefined\" ? \"undefined\" : _type_of(propAnimation)) === \"object\" && propAnimation.type) {\n animationValue = animations[propAnimation.type];\n } else if (defaultAnimation) {\n animationValue = defaultAnimation;\n }\n if (animationValue && durationOverride) {\n animationValue = applyDurationOverride(animationValue, durationOverride);\n }\n return animationValue ? `${key} ${animationValue}${delayStr}` : null;\n }).filter(Boolean).join(\", \");\n if (process.env.NODE_ENV === \"development\" && props[\"debug\"] === \"verbose\") {\n console.info(\"CSS animation\", {\n props,\n animations,\n normalized,\n defaultAnimation,\n style,\n isEntering,\n isExiting\n });\n }\n return {\n style,\n className: isEntering ? \"t_unmounted\" : \"\"\n };\n }\n };\n}\n//# sourceMappingURL=createAnimations.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,QAAQ,GAAGC,MAAM,CAACC,MAAM;AAC5B,IAAIC,SAAS,GAAGF,MAAM,CAACG,cAAc;AACrC,IAAIC,gBAAgB,GAAGJ,MAAM,CAACK,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGN,MAAM,CAACO,mBAAmB;AAClD,IAAIC,YAAY,GAAGR,MAAM,CAACS,cAAc;AACxC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gBAAgB,CAAC;QAC1E;QACA,OAAOrB,cAAc,GAAG,GAAG3M,GAAG,IAAI2M,cAAc,GAAGoB,QAAQ,EAAE,GAAG,IAAI;MACtE,CAAC,CAAC,CAACzC,MAAM,CAACC,OAAO,CAAC,CAACzH,IAAI,CAAC,IAAI,CAAC;MAC7B,IAAImK,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,aAAa,IAAIpG,KAAK,CAAC,OAAO,CAAC,KAAK,SAAS,EAAE;QAC1EqG,OAAO,CAACC,IAAI,CAAC,eAAe,EAAE;UAC5BtG,KAAK;UACL7C,UAAU;UACVmE,UAAU;UACVK,gBAAgB;UAChB/G,KAAK;UACL4F,UAAU;UACVC;QACF,CAAC,CAAC;MACJ;MACA,OAAO;QACL7F,KAAK;QACL2L,SAAS,EAAE/F,UAAU,GAAG,aAAa,GAAG;MAC1C,CAAC;IACH;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc","key","call","get","enumerable","__reExport","target","mod","secondTarget","__toCommonJS","value","index_exports","module","exports","require"],"sources":["index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./createAnimations\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIV,iBAAiB,CAACO,IAAI,CAAC,EACrC,IAAI,CAACL,YAAY,CAACS,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/Cb,SAAS,CAACW,EAAE,EAAEI,GAAG,EAAE;MAAEE,GAAG,EAAEA,CAAA,KAAML,IAAI,CAACG,GAAG,CAAC;MAAEG,UAAU,EAAE,EAAEJ,IAAI,GAAGX,gBAAgB,CAACS,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACI;IAAW,CAAC,CAAC;EACxH;EACA,OAAOP,EAAE;AACX,CAAC;AACD,IAAIQ,UAAU,GAAGA,CAACC,MAAM,EAAEC,GAAG,EAAEC,YAAY,MAAMZ,WAAW,CAACU,MAAM,EAAEC,GAAG,EAAE,SAAS,CAAC,EAAEC,YAAY,IAAIZ,WAAW,CAACY,YAAY,EAAED,GAAG,EAAE,SAAS,CAAC,CAAC;AAChJ,IAAIE,YAAY,GAAIF,GAAG,IAAKX,WAAW,CAACV,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAEwB,KAAK,EAAE;AAAK,CAAC,CAAC,EAAEH,GAAG,CAAC;AAC1F,IAAII,aAAa,GAAG,CAAC,CAAC;AACtBC,MAAM,CAACC,OAAO,GAAGJ,YAAY,CAACE,aAAa,CAAC;AAC5CN,UAAU,CAACM,aAAa,EAAEG,OAAO,CAAC,8BAAoB,CAAC,EAAEF,MAAM,CAACC,OAAO,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["normalizeTransition","getAnimatedProperties","hasAnimation","hasNormalizedAnimation","getEffectiveAnimation","getAnimationConfigsForKeys","useIsomorphicLayoutEffect","ResetPresence","usePresence","transformsToString","React","EXTRACT_MS_REGEX","EXTRACT_S_REGEX","extractDuration","animation","msMatch","match","Number","parseInt","sMatch","Math","round","parseFloat","MS_DURATION_REGEX","S_DURATION_REGEX","applyDurationOverride","durationMs","msReplaced","replace","sReplaced","TRANSFORM_KEYS","buildTransformString","style","parts","x","y","push","scale","scaleX","scaleY","rotate","val","unit","includes","rotateX","rotateY","rotateZ","skewX","skewY","join","applyStylesToNode","node","transformStr","transform","key","value","Object","entries","opacity","String","backgroundColor","color","createAnimations","animations","reactionListeners","WeakMap","inputStyle","outputStyle","useAnimatedNumber","initial","setVal","useState","finishTimerRef","useRef","getInstance","getValue","setValue","next","config","onFinish","current","clearTimeout","type","duration","setTimeout","listeners","get","forEach","listener","stop","useAnimatedNumberReaction","onValue","useEffect","instance","queue","Set","set","add","delete","useAnimatedNumberStyle","getStyle","useAnimatedNumbersStyle","vals","map","v","useAnimations","props","presence","componentState","stateRef","styleState","isHydrating","unmounted","isEntering","isExiting","sendExitComplete","wasEnteringRef","justFinishedEntering","exitCycleIdRef","exitCompletedRef","wasExitingRef","exitInterruptedRef","justStartedExiting","justStoppedExiting","effectiveTransition","transition","normalized","animationState","effectiveAnimationKey","defaultAnimation","animatedProperties","hasDefault","default","enter","exit","hasPerPropertyConfigs","length","keys","animateOnly","host","cycleId","completeExit","rafId","wasInterrupted","ignoreCancelEvents","enterStyle","exitStyle","delayStr2","delay","durationOverride2","exitTransitionString","propAnimation","properties","animationValue","filter","Boolean","resetStyle","offsetHeight","requestAnimationFrame","maxDuration","animationConfigs","values","fallbackTimeout","timeoutId","transitioningProps","completedCount","onFinishAnimation","event","target","eventProp","propertyName","has","size","onCancelAnimation","addEventListener","cancelAnimationFrame","removeEventListener","Array","isArray","delayStr","durationOverride","process","env","NODE_ENV","console","info","className"],"sources":["../../src/createAnimations.tsx"],"sourcesContent":[null],"mappings":"AAAA,SACEA,mBAAA,EACAC,qBAAA,EACAC,YAAA,IAAgBC,sBAAA,EAChBC,qBAAA,EACAC,0BAAA,QACK;AACP,SAASC,yBAAA,QAAiC;AAC1C,SAASC,aAAA,EAAeC,WAAA,QAAmB;AAE3C,SAASC,kBAAA,QAA0B;AACnC,OAAOC,KAAA,MAAyB;AAEhC,MAAMC,gBAAA,GAAmB;AACzB,MAAMC,eAAA,GAAkB;AAOxB,SAASC,gBAAgBC,SAAA,EAA2B;EAElD,MAAMC,OAAA,GAAUD,SAAA,CAAUE,KAAA,CAAML,gBAAgB;EAChD,IAAII,OAAA,EAAS;IACX,OAAOE,MAAA,CAAOC,QAAA,CAASH,OAAA,CAAQ,CAAC,GAAG,EAAE;EACvC;EAGA,MAAMI,MAAA,GAASL,SAAA,CAAUE,KAAA,CAAMJ,eAAe;EAC9C,IAAIO,MAAA,EAAQ;IACV,OAAOC,IAAA,CAAKC,KAAA,CAAMJ,MAAA,CAAOK,UAAA,CAAWH,MAAA,CAAO,CAAC,CAAC,IAAI,GAAI;EACvD;EAGA,OAAO;AACT;AAEA,MAAMI,iBAAA,GAAoB;AAC1B,MAAMC,gBAAA,GAAmB;AAMzB,SAASC,sBAAsBX,SAAA,EAAmBY,UAAA,EAA4B;EAE5E,MAAMC,UAAA,GAAab,SAAA,CAAUc,OAAA,CAAQL,iBAAA,EAAmB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UAAA;UACA+D,UAAA;UACAG,gBAAA;UACAjG,KAAA;UACAiF,UAAA;UACAC;QACF,CAAC;MACH;MAEA,OAAO;QAAElF,KAAA;QAAO0J,SAAA,EAAWzE,UAAA,GAAa,gBAAgB;MAAG;IAC7D;EACF;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["normalizeTransition","getAnimatedProperties","hasAnimation","hasNormalizedAnimation","getEffectiveAnimation","getAnimationConfigsForKeys","useIsomorphicLayoutEffect","ResetPresence","usePresence","transformsToString","React","EXTRACT_MS_REGEX","EXTRACT_S_REGEX","extractDuration","animation","msMatch","match","Number","parseInt","sMatch","Math","round","parseFloat","MS_DURATION_REGEX","S_DURATION_REGEX","applyDurationOverride","durationMs","msReplaced","replace","sReplaced","TRANSFORM_KEYS","buildTransformString","style","parts","x","y","push","scale","scaleX","scaleY","rotate","val","unit","includes","rotateX","rotateY","rotateZ","skewX","skewY","join","applyStylesToNode","node","transformStr","transform","key","value","Object","entries","opacity","String","backgroundColor","color","createAnimations","animations","reactionListeners","WeakMap","inputStyle","outputStyle","useAnimatedNumber","initial","setVal","useState","finishTimerRef","useRef","getInstance","getValue","setValue","next","config","onFinish","current","clearTimeout","type","duration","setTimeout","listeners","get","forEach","listener","stop","useAnimatedNumberReaction","onValue","useEffect","instance","queue","Set","set","add","delete","useAnimatedNumberStyle","getStyle","useAnimatedNumbersStyle","vals","map","v","useAnimations","props","presence","componentState","stateRef","styleState","isHydrating","unmounted","isEntering","isExiting","sendExitComplete","wasEnteringRef","justFinishedEntering","exitCycleIdRef","exitCompletedRef","wasExitingRef","exitInterruptedRef","justStartedExiting","justStoppedExiting","effectiveTransition","transition","normalized","animationState","effectiveAnimationKey","defaultAnimation","animatedProperties","hasDefault","default","enter","exit","hasPerPropertyConfigs","length","keys","animateOnly","host","cycleId","completeExit","rafId","wasInterrupted","ignoreCancelEvents","enterStyle","exitStyle","delayStr","delay","durationOverride","exitTransitionString","propAnimation","properties","animationValue","durationOverride2","delayStr2","filter","Boolean","resetStyle","offsetHeight","requestAnimationFrame","maxDuration","animationConfigs","values","fallbackTimeout","timeoutId","transitioningProps","completedCount","onFinishAnimation","event","target","eventProp","propertyName","has","size","onCancelAnimation","addEventListener","cancelAnimationFrame","removeEventListener","Array","isArray","process","env","NODE_ENV","console","info","className"],"sources":["../../src/createAnimations.tsx"],"sourcesContent":[null],"mappings":"AAAA,SACEA,mBAAA,EACAC,qBAAA,EACAC,YAAA,IAAgBC,sBAAA,EAChBC,qBAAA,EACAC,0BAAA,QACK;AACP,SAASC,yBAAA,QAAiC;AAC1C,SAASC,aAAA,EAAeC,WAAA,QAAmB;AAE3C,SAASC,kBAAA,QAA0B;AACnC,OAAOC,KAAA,MAAyB;AAEhC,MAAMC,gBAAA,GAAmB;AACzB,MAAMC,eAAA,GAAkB;AAOxB,SAASC,gBAAgBC,SAAA,EAA2B;EAElD,MAAMC,OAAA,GAAUD,SAAA,CAAUE,KAAA,CAAML,gBAAgB;EAChD,IAAII,OAAA,EAAS;IACX,OAAOE,MAAA,CAAOC,QAAA,CAASH,OAAA,CAAQ,CAAC,GAAG,EAAE;EACvC;EAGA,MAAMI,MAAA,GAASL,SAAA,CAAUE,KAAA,CAAMJ,eAAe;EAC9C,IAAIO,MAAA,EAAQ;IACV,OAAOC,IAAA,CAAKC,KAAA,CAAMJ,MAAA,CAAOK,UAAA,CAAWH,MAAA,CAAO,CAAC,CAAC,IAAI,GAAI;EACvD;EAGA,OAAO;AACT;AAEA,MAAMI,iBAAA,GAAoB;AAC1B,MAAMC,gBAAA,GAAmB;AAMzB,SAASC,sBAAsBX,SAAA,EAAmBY,UAAA,EAA4B;EAE5E,MAAMC,UAAA,GAAab,SAAA,CAAUc,OAAA,CAAQL,iBAAA,EAAmB,GAAGG,UAAU,IAAI;EACzE,IAAIC,UAAA,KAAeb,SAAA,EAAW;IAC5B,OAAOa,UAAA;EACT;EAGA,MAAME,SAAA,GAAYf,SAAA,CAAUc,OAAA,CAAQJ,gBAAA,EAAk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;MAAG;IAC7D;EACF;AACF","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/animations-css",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "BSD-3-Clause",
|
|
6
6
|
"source": "src/index.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"src",
|
|
@@ -30,25 +30,26 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
-
"build": "
|
|
34
|
-
"watch": "
|
|
35
|
-
"clean": "
|
|
36
|
-
"clean:build": "
|
|
33
|
+
"build": "gui-build",
|
|
34
|
+
"watch": "gui-build --watch",
|
|
35
|
+
"clean": "gui-build clean",
|
|
36
|
+
"clean:build": "gui-build clean:build"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@hanzogui/animation-helpers": "
|
|
40
|
-
"@hanzogui/constants": "
|
|
41
|
-
"@hanzogui/cubic-bezier-animator": "
|
|
42
|
-
"@hanzogui/use-presence": "
|
|
43
|
-
"@hanzogui/web": "
|
|
39
|
+
"@hanzogui/animation-helpers": "7.3.0",
|
|
40
|
+
"@hanzogui/constants": "7.3.0",
|
|
41
|
+
"@hanzogui/cubic-bezier-animator": "7.3.0",
|
|
42
|
+
"@hanzogui/use-presence": "7.3.0",
|
|
43
|
+
"@hanzogui/web": "7.3.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@hanzogui/build": "
|
|
46
|
+
"@hanzogui/build": "7.3.0",
|
|
47
47
|
"react": ">=19",
|
|
48
48
|
"react-dom": "*"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": ">=19",
|
|
52
52
|
"react-dom": "*"
|
|
53
|
-
}
|
|
53
|
+
},
|
|
54
|
+
"author": "Hanzo AI <dev@hanzo.ai>"
|
|
54
55
|
}
|
package/src/createAnimations.tsx
CHANGED
|
@@ -579,7 +579,7 @@ export function createAnimations<A extends object>(animations: A): AnimationDriv
|
|
|
579
579
|
props.exitStyle,
|
|
580
580
|
])
|
|
581
581
|
|
|
582
|
-
//
|
|
582
|
+
// gui doesnt even use animation output during hydration
|
|
583
583
|
if (isHydrating) {
|
|
584
584
|
return null
|
|
585
585
|
}
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
],
|
|
7
7
|
"version": 3,
|
|
8
8
|
"sourcesContent": [
|
|
9
|
-
"import {\n normalizeTransition,\n getAnimatedProperties,\n hasAnimation as hasNormalizedAnimation,\n getEffectiveAnimation,\n getAnimationConfigsForKeys,\n} from '@hanzogui/animation-helpers'\nimport { useIsomorphicLayoutEffect } from '@hanzogui/constants'\nimport { ResetPresence, usePresence } from '@hanzogui/use-presence'\nimport type { AnimationDriver, UniversalAnimatedNumber } from '@hanzogui/web'\nimport { transformsToString } from '@hanzogui/web'\nimport React, { useState } from 'react' // import { animate } from '@hanzogui/cubic-bezier-animator'\n\nconst EXTRACT_MS_REGEX = /(\\d+(?:\\.\\d+)?)\\s*ms/\nconst EXTRACT_S_REGEX = /(\\d+(?:\\.\\d+)?)\\s*s/\n\n/**\n * Helper function to extract duration from CSS animation string\n * Examples: \"ease-in 200ms\" -> 200, \"cubic-bezier(0.215, 0.610, 0.355, 1.000) 400ms\" -> 400\n * \"ease-in 0.5s\" -> 500, \"slow 2s\" -> 2000\n */\nfunction extractDuration(animation: string): number {\n // Try to match milliseconds first\n const msMatch = animation.match(EXTRACT_MS_REGEX)\n if (msMatch) {\n return Number.parseInt(msMatch[1], 10)\n }\n\n // Try to match seconds and convert to milliseconds\n const sMatch = animation.match(EXTRACT_S_REGEX)\n if (sMatch) {\n return Math.round(Number.parseFloat(sMatch[1]) * 1000)\n }\n\n // Default to 300ms if no duration found\n return 300\n}\n\nconst MS_DURATION_REGEX = /(\\d+(?:\\.\\d+)?)\\s*ms/\nconst S_DURATION_REGEX = /(\\d+(?:\\.\\d+)?)\\s*s(?!tiffness)/\n\n/**\n * Apply duration override to a CSS animation string\n * Replaces the existing duration with the override value\n */\nfunction applyDurationOverride(animation: string, durationMs: number): string {\n // Replace ms duration\n const msReplaced = animation.replace(MS_DURATION_REGEX, `${durationMs}ms`)\n if (msReplaced !== animation) {\n return msReplaced\n }\n\n // Replace seconds duration\n const sReplaced = animation.replace(S_DURATION_REGEX, `${durationMs}ms`)\n if (sReplaced !== animation) {\n return sReplaced\n }\n\n // No duration found, prepend the duration\n return `${durationMs}ms ${animation}`\n}\n\n// transform keys that need special handling\nconst TRANSFORM_KEYS = [\n 'x',\n 'y',\n 'scale',\n 'scaleX',\n 'scaleY',\n 'rotate',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'skewX',\n 'skewY',\n] as const\n\n/**\n * Build a CSS transform string from a style object containing transform properties\n */\nfunction buildTransformString(style: Record<string, unknown> | undefined): string {\n if (!style) return ''\n\n const parts: string[] = []\n\n if (style.x !== undefined || style.y !== undefined) {\n const x = style.x ?? 0\n const y = style.y ?? 0\n parts.push(`translate(${x}px, ${y}px)`)\n }\n if (style.scale !== undefined) {\n parts.push(`scale(${style.scale})`)\n }\n if (style.scaleX !== undefined) {\n parts.push(`scaleX(${style.scaleX})`)\n }\n if (style.scaleY !== undefined) {\n parts.push(`scaleY(${style.scaleY})`)\n }\n if (style.rotate !== undefined) {\n const val = style.rotate\n const unit = typeof val === 'string' && val.includes('deg') ? '' : 'deg'\n parts.push(`rotate(${val}${unit})`)\n }\n if (style.rotateX !== undefined) {\n parts.push(`rotateX(${style.rotateX}deg)`)\n }\n if (style.rotateY !== undefined) {\n parts.push(`rotateY(${style.rotateY}deg)`)\n }\n if (style.rotateZ !== undefined) {\n parts.push(`rotateZ(${style.rotateZ}deg)`)\n }\n if (style.skewX !== undefined) {\n parts.push(`skewX(${style.skewX}deg)`)\n }\n if (style.skewY !== undefined) {\n parts.push(`skewY(${style.skewY}deg)`)\n }\n\n return parts.join(' ')\n}\n\n/**\n * Apply a style object to a DOM node, handling transform keys specially\n */\nfunction applyStylesToNode(\n node: HTMLElement,\n style: Record<string, unknown> | undefined\n): void {\n if (!style) return\n\n // collect transform values\n const transformStr = buildTransformString(style)\n if (transformStr) {\n node.style.transform = transformStr\n }\n\n // apply non-transform properties\n for (const [key, value] of Object.entries(style)) {\n if (TRANSFORM_KEYS.includes(key as any)) continue\n if (value === undefined) continue\n\n if (key === 'opacity') {\n node.style.opacity = String(value)\n } else if (key === 'backgroundColor') {\n node.style.backgroundColor = String(value)\n } else if (key === 'color') {\n node.style.color = String(value)\n } else {\n // generic fallback\n node.style[key as any] = typeof value === 'number' ? `${value}px` : String(value)\n }\n }\n}\n\nexport function createAnimations<A extends object>(animations: A): AnimationDriver<A> {\n const reactionListeners = new WeakMap<any, Set<Function>>()\n\n return {\n animations,\n usePresence,\n ResetPresence,\n inputStyle: 'css',\n outputStyle: 'css',\n\n useAnimatedNumber(initial): UniversalAnimatedNumber<Function> {\n const [val, setVal] = React.useState(initial)\n const finishTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n\n return {\n getInstance() {\n return setVal\n },\n getValue() {\n return val\n },\n setValue(next, config, onFinish) {\n setVal(next)\n\n // clear any pending finish callback from a previous setValue\n if (finishTimerRef.current) {\n clearTimeout(finishTimerRef.current)\n finishTimerRef.current = null\n }\n\n if (onFinish) {\n if (\n !config ||\n config.type === 'direct' ||\n (config.type === 'timing' && config.duration === 0)\n ) {\n onFinish()\n } else {\n // estimate duration: use explicit duration, or fall back to\n // default CSS transition duration for spring-type configs\n const duration = config.type === 'timing' ? config.duration : 300\n finishTimerRef.current = setTimeout(onFinish, duration)\n }\n }\n\n // call reaction listeners with the new value\n const listeners = reactionListeners.get(setVal)\n if (listeners) {\n listeners.forEach((listener) => listener(next))\n }\n },\n stop() {\n if (finishTimerRef.current) {\n clearTimeout(finishTimerRef.current)\n finishTimerRef.current = null\n }\n },\n }\n },\n\n useAnimatedNumberReaction({ value }, onValue) {\n React.useEffect(() => {\n const instance = value.getInstance()\n let queue = reactionListeners.get(instance)\n if (!queue) {\n const next = new Set<Function>()\n reactionListeners.set(instance, next)\n queue = next!\n }\n queue.add(onValue)\n return () => {\n queue?.delete(onValue)\n }\n }, [])\n },\n\n useAnimatedNumberStyle(val, getStyle) {\n return getStyle(val.getValue())\n },\n\n useAnimatedNumbersStyle(vals, getStyle) {\n return getStyle(...vals.map((v) => v.getValue()))\n },\n\n // @ts-ignore - styleState is added by createComponent\n useAnimations: ({\n props,\n presence,\n style,\n componentState,\n stateRef,\n styleState,\n }: any) => {\n const isHydrating = componentState.unmounted === true\n const isEntering = !!componentState.unmounted\n const isExiting = presence?.[0] === false\n const sendExitComplete = presence?.[1]\n\n // Track if we just finished entering (transition from entering to not entering)\n // This is needed because the CSS transition happens on the render AFTER t_unmounted is removed\n const wasEnteringRef = React.useRef(isEntering)\n const justFinishedEntering = wasEnteringRef.current && !isEntering\n React.useEffect(() => {\n wasEnteringRef.current = isEntering\n })\n\n // exit cycle guards to prevent stale/duplicate completion\n const exitCycleIdRef = React.useRef(0)\n const exitCompletedRef = React.useRef(false)\n const wasExitingRef = React.useRef(false)\n const exitInterruptedRef = React.useRef(false)\n\n // detect transition into/out of exiting state\n const justStartedExiting = isExiting && !wasExitingRef.current\n const justStoppedExiting = !isExiting && wasExitingRef.current\n\n // start new exit cycle only on transition INTO exiting\n if (justStartedExiting) {\n exitCycleIdRef.current++\n exitCompletedRef.current = false\n }\n // track interruptions so we know to force-restart transitions\n if (justStoppedExiting) {\n exitCycleIdRef.current++\n exitInterruptedRef.current = true\n }\n\n // track previous exiting state\n React.useEffect(() => {\n wasExitingRef.current = isExiting\n })\n\n // use effectiveTransition computed by createComponent (single source of truth)\n const effectiveTransition = styleState?.effectiveTransition ?? props.transition\n\n // Normalize the transition prop to a consistent format\n const normalized = normalizeTransition(effectiveTransition)\n\n // Determine animation state and get effective animation\n // Use 'enter' if we're entering OR if we just finished entering (transition is happening)\n const animationState = isExiting\n ? 'exit'\n : isEntering || justFinishedEntering\n ? 'enter'\n : 'default'\n const effectiveAnimationKey = getEffectiveAnimation(normalized, animationState)\n const defaultAnimation = effectiveAnimationKey\n ? animations[effectiveAnimationKey]\n : null\n const animatedProperties = getAnimatedProperties(normalized)\n\n // Determine which properties to animate\n // - animateOnly prop is an exclusive filter (only animate those properties)\n // - per-property configs WITHOUT a default = only animate those specific properties\n // - per-property configs WITH a default = per-property overrides + default for rest\n const hasDefault =\n normalized.default !== null ||\n normalized.enter !== null ||\n normalized.exit !== null\n const hasPerPropertyConfigs = animatedProperties.length > 0\n\n let keys: string[]\n if (props.animateOnly) {\n // animateOnly is explicit filter\n keys = props.animateOnly\n } else if (hasPerPropertyConfigs && !hasDefault) {\n // object format without default: { opacity: '200ms' } = only animate opacity\n keys = animatedProperties\n } else if (hasPerPropertyConfigs && hasDefault) {\n // array format or object with default: 'all' first, then per-property overrides\n // CSS transition specificity: later declarations override earlier ones for the same property\n keys = ['all', ...animatedProperties]\n } else {\n // simple string format: 'quick' = animate all\n keys = ['all']\n }\n\n useIsomorphicLayoutEffect(() => {\n const host = stateRef.current.host\n if (!sendExitComplete || !isExiting || !host) return\n const node = host as HTMLElement\n\n // capture current cycle id for this effect\n const cycleId = exitCycleIdRef.current\n\n // helper to complete exit with guards\n const completeExit = () => {\n if (cycleId !== exitCycleIdRef.current) return\n if (exitCompletedRef.current) return\n exitCompletedRef.current = true\n sendExitComplete()\n }\n\n // if no properties to animate (animateOnly=[]), complete immediately\n if (keys.length === 0) {\n completeExit()\n return\n }\n\n // Force transition restart for interrupted exits\n // When an exit is interrupted and restarted, the element may already be at\n // the exit style, so no CSS transition fires. We need to:\n // 1. Reset to non-exit state\n // 2. Force reflow\n // 3. Re-apply exit state to trigger transition\n let rafId: number | undefined\n const wasInterrupted = exitInterruptedRef.current\n // flag to ignore transitioncancel during reset (we intentionally cancel the old transition)\n let ignoreCancelEvents = wasInterrupted\n // get enter/exit styles for potential restart\n const enterStyle = props.enterStyle as Record<string, unknown> | undefined\n const exitStyle = props.exitStyle as Record<string, unknown> | undefined\n\n // Build the exit transition string - needed for both normal and interrupted exits\n const delayStr = normalized.delay ? ` ${normalized.delay}ms` : ''\n const durationOverride = normalized.config?.duration\n const exitTransitionString = keys\n .map((key) => {\n const propAnimation = normalized.properties[key]\n let animationValue: string | null = null\n if (typeof propAnimation === 'string') {\n animationValue = animations[propAnimation]\n } else if (\n propAnimation &&\n typeof propAnimation === 'object' &&\n propAnimation.type\n ) {\n animationValue = animations[propAnimation.type]\n } else if (defaultAnimation) {\n animationValue = defaultAnimation\n }\n if (animationValue && durationOverride) {\n animationValue = applyDurationOverride(animationValue, durationOverride)\n }\n return animationValue ? `${key} ${animationValue}${delayStr}` : null\n })\n .filter(Boolean)\n .join(', ')\n\n if (wasInterrupted) {\n exitInterruptedRef.current = false\n // disable transition, reset to enter state\n node.style.transition = 'none'\n\n // reset: apply active/open state for each exit property (not enterStyle,\n // which may equal exitStyle — see comment in the normal exit path below)\n if (exitStyle) {\n const resetStyle: Record<string, unknown> = {}\n for (const key of Object.keys(exitStyle)) {\n if (key === 'opacity') {\n resetStyle[key] = 1\n } else if (TRANSFORM_KEYS.includes(key as any)) {\n resetStyle[key] =\n key === 'scale' || key === 'scaleX' || key === 'scaleY' ? 1 : 0\n } else if (enterStyle?.[key] !== undefined) {\n resetStyle[key] = enterStyle[key]\n }\n }\n applyStylesToNode(node, resetStyle)\n } else {\n // fallback if no exitStyle defined\n node.style.opacity = '1'\n node.style.transform = 'none'\n }\n\n // force reflow\n void node.offsetHeight\n } else if (exitStyle) {\n // For normal (non-interrupted) exits, we need to ensure the CSS transition is\n // processed by the browser BEFORE the exitStyle takes effect. The issue is that\n // React may have already applied exitStyle in the same render batch. To fix this:\n // 1. Disable transition and reset to non-exit state\n // 2. Force reflow so browser processes the reset\n // 3. Use RAF to ensure we're in a new frame\n // 4. Re-enable transition and apply exitStyle\n // This mirrors the interrupted exit handling approach (which also uses RAF).\n ignoreCancelEvents = true\n node.style.transition = 'none'\n\n // Reset to the active/open state (not enterStyle, which may equal exitStyle).\n // enterStyle is the \"unmounted\" initial state and can share values with exitStyle\n // (e.g., both have opacity: 0). resetting to enterStyle would mean no value change\n // when exitStyle is applied, so the CSS transition wouldn't fire.\n const resetStyle: Record<string, unknown> = {}\n for (const key of Object.keys(exitStyle)) {\n if (key === 'opacity') {\n resetStyle[key] = 1\n } else if (TRANSFORM_KEYS.includes(key as any)) {\n resetStyle[key] =\n key === 'scale' || key === 'scaleX' || key === 'scaleY' ? 1 : 0\n } else if (enterStyle?.[key] !== undefined) {\n resetStyle[key] = enterStyle[key]\n }\n }\n applyStylesToNode(node, resetStyle)\n\n // Force reflow\n void node.offsetHeight\n\n // Use RAF to ensure transition is applied in a new frame\n rafId = requestAnimationFrame(() => {\n if (cycleId !== exitCycleIdRef.current) return\n // Re-enable transition\n node.style.transition = exitTransitionString\n // Force reflow to ensure transition is active\n void node.offsetHeight\n // Apply exit styles - this triggers the animation\n applyStylesToNode(node, exitStyle)\n // Re-enable cancel event handling\n ignoreCancelEvents = false\n })\n }\n\n /**\n * Exit animation handling for Dialog/Modal components\n *\n * The Challenge: When users close dialogs (via Escape key or clicking outside),\n * the element can disappear from the DOM before CSS transitions finish, which causes:\n * 1. Dialogs to stick around on screen\n * 2. Event handlers to stop working\n *\n * Fix: Calculate the MAXIMUM duration across all animated properties, not just\n * the default. With animateOnly and per-property configs, different properties\n * can have different durations, and we need to wait for the LONGEST one.\n */\n\n // calculate max duration across all animated properties\n let maxDuration = defaultAnimation ? extractDuration(defaultAnimation) : 200\n\n // check per-property animation durations using shared helper\n const animationConfigs = getAnimationConfigsForKeys(\n normalized,\n animations as Record<string, string>,\n keys,\n defaultAnimation\n )\n for (const animationValue of animationConfigs.values()) {\n if (animationValue) {\n const duration = extractDuration(animationValue)\n if (duration > maxDuration) {\n maxDuration = duration\n }\n }\n }\n\n const delay = normalized.delay ?? 0\n const fallbackTimeout = maxDuration + delay\n\n const timeoutId = setTimeout(() => {\n completeExit()\n }, fallbackTimeout)\n\n // track number of transitioning properties to wait for all to finish\n // (each property fires its own transitionend event)\n const transitioningProps = new Set(keys)\n let completedCount = 0\n\n const onFinishAnimation = (event: TransitionEvent) => {\n // only count transitions on THIS element, not bubbled from children\n if (event.target !== node) return\n\n // map CSS property names to our key names\n // e.g., transitionend fires with propertyName 'transform' for scale/x/y\n const eventProp = event.propertyName\n if (transitioningProps.has(eventProp) || eventProp === 'all') {\n completedCount++\n // wait for all properties to finish\n if (completedCount >= transitioningProps.size) {\n clearTimeout(timeoutId)\n completeExit()\n }\n }\n }\n\n // on cancel, still complete (element is exiting and animation was interrupted)\n // the guards prevent duplicate completion if this is a stale cycle\n const onCancelAnimation = () => {\n // ignore cancel events during reset phase (we intentionally cancel the old transition)\n if (ignoreCancelEvents) return\n clearTimeout(timeoutId)\n completeExit()\n }\n\n node.addEventListener('transitionend', onFinishAnimation)\n node.addEventListener('transitioncancel', onCancelAnimation)\n\n // For interrupted exits, re-enable transition and re-apply exit styles\n // This must happen AFTER listeners are set up so we catch the transitionend\n if (wasInterrupted) {\n rafId = requestAnimationFrame(() => {\n if (cycleId !== exitCycleIdRef.current) return\n // re-enable transition using the pre-built string\n node.style.transition = exitTransitionString\n // force reflow again\n void node.offsetHeight\n // now apply exit styles - this triggers the transition\n applyStylesToNode(node, exitStyle)\n // re-enable cancel event handling now that reset is complete\n ignoreCancelEvents = false\n })\n }\n\n return () => {\n clearTimeout(timeoutId)\n if (rafId !== undefined) cancelAnimationFrame(rafId)\n node.removeEventListener('transitionend', onFinishAnimation)\n node.removeEventListener('transitioncancel', onCancelAnimation)\n // restore transition: the exit handling sets node.style.transition='none'\n // directly on the DOM (bypassing React). if exit is interrupted (e.g. same-key\n // re-entry in AnimatePresence), React won't re-apply its managed transition\n // value because it hasn't changed in the virtual DOM. clearing the inline\n // override lets React's value take effect again.\n node.style.transition = ''\n }\n }, [\n sendExitComplete,\n isExiting,\n stateRef,\n keys,\n normalized,\n defaultAnimation,\n props.enterStyle,\n props.exitStyle,\n ])\n\n // hanzo-gui doesnt even use animation output during hydration\n if (isHydrating) {\n return null\n }\n\n // Check if we have any animation to apply\n if (!hasNormalizedAnimation(normalized)) {\n return null\n }\n\n if (Array.isArray(style.transform)) {\n style.transform = transformsToString(style.transform)\n }\n\n // Build CSS transition string\n // TODO: we disabled the transform transition, because it will create issue for inverse function and animate function\n // for non layout transform properties either use animate function or find a workaround to do it with css\n const delayStr = normalized.delay ? ` ${normalized.delay}ms` : ''\n const durationOverride = normalized.config?.duration\n style.transition = keys\n .map((key) => {\n // Check for property-specific animation, fall back to default\n const propAnimation = normalized.properties[key]\n let animationValue: string | null = null\n\n if (typeof propAnimation === 'string') {\n animationValue = animations[propAnimation]\n } else if (\n propAnimation &&\n typeof propAnimation === 'object' &&\n propAnimation.type\n ) {\n animationValue = animations[propAnimation.type]\n } else if (defaultAnimation) {\n animationValue = defaultAnimation\n }\n\n // Apply global duration override if specified\n if (animationValue && durationOverride) {\n animationValue = applyDurationOverride(animationValue, durationOverride)\n }\n\n return animationValue ? `${key} ${animationValue}${delayStr}` : null\n })\n .filter(Boolean)\n .join(', ')\n\n if (process.env.NODE_ENV === 'development' && props['debug'] === 'verbose') {\n console.info('CSS animation', {\n props,\n animations,\n normalized,\n defaultAnimation,\n style,\n isEntering,\n isExiting,\n })\n }\n\n return { style, className: isEntering ? 't_unmounted' : '' }\n },\n }\n}\n\n// layout animations\n// useIsomorphicLayoutEffect(() => {\n// if (!host || !props.layout) {\n// return\n// }\n// // @ts-ignore\n// const boundingBox = host?.getBoundingClientRect()\n// if (isChanged(initialPositionRef.current, boundingBox)) {\n// const transform = invert(\n// host,\n// boundingBox,\n// initialPositionRef.current\n// )\n\n// animate({\n// from: transform,\n// to: { x: 0, y: 0, scaleX: 1, scaleY: 1 },\n// duration: 1000,\n// onUpdate: ({ x, y, scaleX, scaleY }) => {\n// // @ts-ignore\n// host.style.transform = `translate(${x}px, ${y}px) scaleX(${scaleX}) scaleY(${scaleY})`\n// // TODO: handle childRef inverse scale\n// // childRef.current.style.transform = `scaleX(${1 / scaleX}) scaleY(${\n// // 1 / scaleY\n// // })`\n// },\n// // TODO: extract ease-in from string and convert/map it to a cubicBezier array\n// cubicBezier: [0, 1.38, 1, -0.41],\n// })\n// }\n// initialPositionRef.current = boundingBox\n// })\n\n// style.transition = `${keys} ${animation}${\n// props.layout ? ',width 0s, height 0s, margin 0s, padding 0s, transform' : ''\n// }`\n\n// const isChanged = (initialBox: any, finalBox: any) => {\n// // we just mounted, so we don't have complete data yet\n// if (!initialBox || !finalBox) return false\n\n// // deep compare the two boxes\n// return JSON.stringify(initialBox) !== JSON.stringify(finalBox)\n// }\n\n// const invert = (el, from, to) => {\n// const { x: fromX, y: fromY, width: fromWidth, height: fromHeight } = from\n// const { x, y, width, height } = to\n\n// const transform = {\n// x: x - fromX - (fromWidth - width) / 2,\n// y: y - fromY - (fromHeight - height) / 2,\n// scaleX: width / fromWidth,\n// scaleY: height / fromHeight,\n// }\n\n// el.style.transform = `\n"
|
|
9
|
+
"import {\n normalizeTransition,\n getAnimatedProperties,\n hasAnimation as hasNormalizedAnimation,\n getEffectiveAnimation,\n getAnimationConfigsForKeys,\n} from '@hanzogui/animation-helpers'\nimport { useIsomorphicLayoutEffect } from '@hanzogui/constants'\nimport { ResetPresence, usePresence } from '@hanzogui/use-presence'\nimport type { AnimationDriver, UniversalAnimatedNumber } from '@hanzogui/web'\nimport { transformsToString } from '@hanzogui/web'\nimport React, { useState } from 'react' // import { animate } from '@hanzogui/cubic-bezier-animator'\n\nconst EXTRACT_MS_REGEX = /(\\d+(?:\\.\\d+)?)\\s*ms/\nconst EXTRACT_S_REGEX = /(\\d+(?:\\.\\d+)?)\\s*s/\n\n/**\n * Helper function to extract duration from CSS animation string\n * Examples: \"ease-in 200ms\" -> 200, \"cubic-bezier(0.215, 0.610, 0.355, 1.000) 400ms\" -> 400\n * \"ease-in 0.5s\" -> 500, \"slow 2s\" -> 2000\n */\nfunction extractDuration(animation: string): number {\n // Try to match milliseconds first\n const msMatch = animation.match(EXTRACT_MS_REGEX)\n if (msMatch) {\n return Number.parseInt(msMatch[1], 10)\n }\n\n // Try to match seconds and convert to milliseconds\n const sMatch = animation.match(EXTRACT_S_REGEX)\n if (sMatch) {\n return Math.round(Number.parseFloat(sMatch[1]) * 1000)\n }\n\n // Default to 300ms if no duration found\n return 300\n}\n\nconst MS_DURATION_REGEX = /(\\d+(?:\\.\\d+)?)\\s*ms/\nconst S_DURATION_REGEX = /(\\d+(?:\\.\\d+)?)\\s*s(?!tiffness)/\n\n/**\n * Apply duration override to a CSS animation string\n * Replaces the existing duration with the override value\n */\nfunction applyDurationOverride(animation: string, durationMs: number): string {\n // Replace ms duration\n const msReplaced = animation.replace(MS_DURATION_REGEX, `${durationMs}ms`)\n if (msReplaced !== animation) {\n return msReplaced\n }\n\n // Replace seconds duration\n const sReplaced = animation.replace(S_DURATION_REGEX, `${durationMs}ms`)\n if (sReplaced !== animation) {\n return sReplaced\n }\n\n // No duration found, prepend the duration\n return `${durationMs}ms ${animation}`\n}\n\n// transform keys that need special handling\nconst TRANSFORM_KEYS = [\n 'x',\n 'y',\n 'scale',\n 'scaleX',\n 'scaleY',\n 'rotate',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'skewX',\n 'skewY',\n] as const\n\n/**\n * Build a CSS transform string from a style object containing transform properties\n */\nfunction buildTransformString(style: Record<string, unknown> | undefined): string {\n if (!style) return ''\n\n const parts: string[] = []\n\n if (style.x !== undefined || style.y !== undefined) {\n const x = style.x ?? 0\n const y = style.y ?? 0\n parts.push(`translate(${x}px, ${y}px)`)\n }\n if (style.scale !== undefined) {\n parts.push(`scale(${style.scale})`)\n }\n if (style.scaleX !== undefined) {\n parts.push(`scaleX(${style.scaleX})`)\n }\n if (style.scaleY !== undefined) {\n parts.push(`scaleY(${style.scaleY})`)\n }\n if (style.rotate !== undefined) {\n const val = style.rotate\n const unit = typeof val === 'string' && val.includes('deg') ? '' : 'deg'\n parts.push(`rotate(${val}${unit})`)\n }\n if (style.rotateX !== undefined) {\n parts.push(`rotateX(${style.rotateX}deg)`)\n }\n if (style.rotateY !== undefined) {\n parts.push(`rotateY(${style.rotateY}deg)`)\n }\n if (style.rotateZ !== undefined) {\n parts.push(`rotateZ(${style.rotateZ}deg)`)\n }\n if (style.skewX !== undefined) {\n parts.push(`skewX(${style.skewX}deg)`)\n }\n if (style.skewY !== undefined) {\n parts.push(`skewY(${style.skewY}deg)`)\n }\n\n return parts.join(' ')\n}\n\n/**\n * Apply a style object to a DOM node, handling transform keys specially\n */\nfunction applyStylesToNode(\n node: HTMLElement,\n style: Record<string, unknown> | undefined\n): void {\n if (!style) return\n\n // collect transform values\n const transformStr = buildTransformString(style)\n if (transformStr) {\n node.style.transform = transformStr\n }\n\n // apply non-transform properties\n for (const [key, value] of Object.entries(style)) {\n if (TRANSFORM_KEYS.includes(key as any)) continue\n if (value === undefined) continue\n\n if (key === 'opacity') {\n node.style.opacity = String(value)\n } else if (key === 'backgroundColor') {\n node.style.backgroundColor = String(value)\n } else if (key === 'color') {\n node.style.color = String(value)\n } else {\n // generic fallback\n node.style[key as any] = typeof value === 'number' ? `${value}px` : String(value)\n }\n }\n}\n\nexport function createAnimations<A extends object>(animations: A): AnimationDriver<A> {\n const reactionListeners = new WeakMap<any, Set<Function>>()\n\n return {\n animations,\n usePresence,\n ResetPresence,\n inputStyle: 'css',\n outputStyle: 'css',\n\n useAnimatedNumber(initial): UniversalAnimatedNumber<Function> {\n const [val, setVal] = React.useState(initial)\n const finishTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n\n return {\n getInstance() {\n return setVal\n },\n getValue() {\n return val\n },\n setValue(next, config, onFinish) {\n setVal(next)\n\n // clear any pending finish callback from a previous setValue\n if (finishTimerRef.current) {\n clearTimeout(finishTimerRef.current)\n finishTimerRef.current = null\n }\n\n if (onFinish) {\n if (\n !config ||\n config.type === 'direct' ||\n (config.type === 'timing' && config.duration === 0)\n ) {\n onFinish()\n } else {\n // estimate duration: use explicit duration, or fall back to\n // default CSS transition duration for spring-type configs\n const duration = config.type === 'timing' ? config.duration : 300\n finishTimerRef.current = setTimeout(onFinish, duration)\n }\n }\n\n // call reaction listeners with the new value\n const listeners = reactionListeners.get(setVal)\n if (listeners) {\n listeners.forEach((listener) => listener(next))\n }\n },\n stop() {\n if (finishTimerRef.current) {\n clearTimeout(finishTimerRef.current)\n finishTimerRef.current = null\n }\n },\n }\n },\n\n useAnimatedNumberReaction({ value }, onValue) {\n React.useEffect(() => {\n const instance = value.getInstance()\n let queue = reactionListeners.get(instance)\n if (!queue) {\n const next = new Set<Function>()\n reactionListeners.set(instance, next)\n queue = next!\n }\n queue.add(onValue)\n return () => {\n queue?.delete(onValue)\n }\n }, [])\n },\n\n useAnimatedNumberStyle(val, getStyle) {\n return getStyle(val.getValue())\n },\n\n useAnimatedNumbersStyle(vals, getStyle) {\n return getStyle(...vals.map((v) => v.getValue()))\n },\n\n // @ts-ignore - styleState is added by createComponent\n useAnimations: ({\n props,\n presence,\n style,\n componentState,\n stateRef,\n styleState,\n }: any) => {\n const isHydrating = componentState.unmounted === true\n const isEntering = !!componentState.unmounted\n const isExiting = presence?.[0] === false\n const sendExitComplete = presence?.[1]\n\n // Track if we just finished entering (transition from entering to not entering)\n // This is needed because the CSS transition happens on the render AFTER t_unmounted is removed\n const wasEnteringRef = React.useRef(isEntering)\n const justFinishedEntering = wasEnteringRef.current && !isEntering\n React.useEffect(() => {\n wasEnteringRef.current = isEntering\n })\n\n // exit cycle guards to prevent stale/duplicate completion\n const exitCycleIdRef = React.useRef(0)\n const exitCompletedRef = React.useRef(false)\n const wasExitingRef = React.useRef(false)\n const exitInterruptedRef = React.useRef(false)\n\n // detect transition into/out of exiting state\n const justStartedExiting = isExiting && !wasExitingRef.current\n const justStoppedExiting = !isExiting && wasExitingRef.current\n\n // start new exit cycle only on transition INTO exiting\n if (justStartedExiting) {\n exitCycleIdRef.current++\n exitCompletedRef.current = false\n }\n // track interruptions so we know to force-restart transitions\n if (justStoppedExiting) {\n exitCycleIdRef.current++\n exitInterruptedRef.current = true\n }\n\n // track previous exiting state\n React.useEffect(() => {\n wasExitingRef.current = isExiting\n })\n\n // use effectiveTransition computed by createComponent (single source of truth)\n const effectiveTransition = styleState?.effectiveTransition ?? props.transition\n\n // Normalize the transition prop to a consistent format\n const normalized = normalizeTransition(effectiveTransition)\n\n // Determine animation state and get effective animation\n // Use 'enter' if we're entering OR if we just finished entering (transition is happening)\n const animationState = isExiting\n ? 'exit'\n : isEntering || justFinishedEntering\n ? 'enter'\n : 'default'\n const effectiveAnimationKey = getEffectiveAnimation(normalized, animationState)\n const defaultAnimation = effectiveAnimationKey\n ? animations[effectiveAnimationKey]\n : null\n const animatedProperties = getAnimatedProperties(normalized)\n\n // Determine which properties to animate\n // - animateOnly prop is an exclusive filter (only animate those properties)\n // - per-property configs WITHOUT a default = only animate those specific properties\n // - per-property configs WITH a default = per-property overrides + default for rest\n const hasDefault =\n normalized.default !== null ||\n normalized.enter !== null ||\n normalized.exit !== null\n const hasPerPropertyConfigs = animatedProperties.length > 0\n\n let keys: string[]\n if (props.animateOnly) {\n // animateOnly is explicit filter\n keys = props.animateOnly\n } else if (hasPerPropertyConfigs && !hasDefault) {\n // object format without default: { opacity: '200ms' } = only animate opacity\n keys = animatedProperties\n } else if (hasPerPropertyConfigs && hasDefault) {\n // array format or object with default: 'all' first, then per-property overrides\n // CSS transition specificity: later declarations override earlier ones for the same property\n keys = ['all', ...animatedProperties]\n } else {\n // simple string format: 'quick' = animate all\n keys = ['all']\n }\n\n useIsomorphicLayoutEffect(() => {\n const host = stateRef.current.host\n if (!sendExitComplete || !isExiting || !host) return\n const node = host as HTMLElement\n\n // capture current cycle id for this effect\n const cycleId = exitCycleIdRef.current\n\n // helper to complete exit with guards\n const completeExit = () => {\n if (cycleId !== exitCycleIdRef.current) return\n if (exitCompletedRef.current) return\n exitCompletedRef.current = true\n sendExitComplete()\n }\n\n // if no properties to animate (animateOnly=[]), complete immediately\n if (keys.length === 0) {\n completeExit()\n return\n }\n\n // Force transition restart for interrupted exits\n // When an exit is interrupted and restarted, the element may already be at\n // the exit style, so no CSS transition fires. We need to:\n // 1. Reset to non-exit state\n // 2. Force reflow\n // 3. Re-apply exit state to trigger transition\n let rafId: number | undefined\n const wasInterrupted = exitInterruptedRef.current\n // flag to ignore transitioncancel during reset (we intentionally cancel the old transition)\n let ignoreCancelEvents = wasInterrupted\n // get enter/exit styles for potential restart\n const enterStyle = props.enterStyle as Record<string, unknown> | undefined\n const exitStyle = props.exitStyle as Record<string, unknown> | undefined\n\n // Build the exit transition string - needed for both normal and interrupted exits\n const delayStr = normalized.delay ? ` ${normalized.delay}ms` : ''\n const durationOverride = normalized.config?.duration\n const exitTransitionString = keys\n .map((key) => {\n const propAnimation = normalized.properties[key]\n let animationValue: string | null = null\n if (typeof propAnimation === 'string') {\n animationValue = animations[propAnimation]\n } else if (\n propAnimation &&\n typeof propAnimation === 'object' &&\n propAnimation.type\n ) {\n animationValue = animations[propAnimation.type]\n } else if (defaultAnimation) {\n animationValue = defaultAnimation\n }\n if (animationValue && durationOverride) {\n animationValue = applyDurationOverride(animationValue, durationOverride)\n }\n return animationValue ? `${key} ${animationValue}${delayStr}` : null\n })\n .filter(Boolean)\n .join(', ')\n\n if (wasInterrupted) {\n exitInterruptedRef.current = false\n // disable transition, reset to enter state\n node.style.transition = 'none'\n\n // reset: apply active/open state for each exit property (not enterStyle,\n // which may equal exitStyle — see comment in the normal exit path below)\n if (exitStyle) {\n const resetStyle: Record<string, unknown> = {}\n for (const key of Object.keys(exitStyle)) {\n if (key === 'opacity') {\n resetStyle[key] = 1\n } else if (TRANSFORM_KEYS.includes(key as any)) {\n resetStyle[key] =\n key === 'scale' || key === 'scaleX' || key === 'scaleY' ? 1 : 0\n } else if (enterStyle?.[key] !== undefined) {\n resetStyle[key] = enterStyle[key]\n }\n }\n applyStylesToNode(node, resetStyle)\n } else {\n // fallback if no exitStyle defined\n node.style.opacity = '1'\n node.style.transform = 'none'\n }\n\n // force reflow\n void node.offsetHeight\n } else if (exitStyle) {\n // For normal (non-interrupted) exits, we need to ensure the CSS transition is\n // processed by the browser BEFORE the exitStyle takes effect. The issue is that\n // React may have already applied exitStyle in the same render batch. To fix this:\n // 1. Disable transition and reset to non-exit state\n // 2. Force reflow so browser processes the reset\n // 3. Use RAF to ensure we're in a new frame\n // 4. Re-enable transition and apply exitStyle\n // This mirrors the interrupted exit handling approach (which also uses RAF).\n ignoreCancelEvents = true\n node.style.transition = 'none'\n\n // Reset to the active/open state (not enterStyle, which may equal exitStyle).\n // enterStyle is the \"unmounted\" initial state and can share values with exitStyle\n // (e.g., both have opacity: 0). resetting to enterStyle would mean no value change\n // when exitStyle is applied, so the CSS transition wouldn't fire.\n const resetStyle: Record<string, unknown> = {}\n for (const key of Object.keys(exitStyle)) {\n if (key === 'opacity') {\n resetStyle[key] = 1\n } else if (TRANSFORM_KEYS.includes(key as any)) {\n resetStyle[key] =\n key === 'scale' || key === 'scaleX' || key === 'scaleY' ? 1 : 0\n } else if (enterStyle?.[key] !== undefined) {\n resetStyle[key] = enterStyle[key]\n }\n }\n applyStylesToNode(node, resetStyle)\n\n // Force reflow\n void node.offsetHeight\n\n // Use RAF to ensure transition is applied in a new frame\n rafId = requestAnimationFrame(() => {\n if (cycleId !== exitCycleIdRef.current) return\n // Re-enable transition\n node.style.transition = exitTransitionString\n // Force reflow to ensure transition is active\n void node.offsetHeight\n // Apply exit styles - this triggers the animation\n applyStylesToNode(node, exitStyle)\n // Re-enable cancel event handling\n ignoreCancelEvents = false\n })\n }\n\n /**\n * Exit animation handling for Dialog/Modal components\n *\n * The Challenge: When users close dialogs (via Escape key or clicking outside),\n * the element can disappear from the DOM before CSS transitions finish, which causes:\n * 1. Dialogs to stick around on screen\n * 2. Event handlers to stop working\n *\n * Fix: Calculate the MAXIMUM duration across all animated properties, not just\n * the default. With animateOnly and per-property configs, different properties\n * can have different durations, and we need to wait for the LONGEST one.\n */\n\n // calculate max duration across all animated properties\n let maxDuration = defaultAnimation ? extractDuration(defaultAnimation) : 200\n\n // check per-property animation durations using shared helper\n const animationConfigs = getAnimationConfigsForKeys(\n normalized,\n animations as Record<string, string>,\n keys,\n defaultAnimation\n )\n for (const animationValue of animationConfigs.values()) {\n if (animationValue) {\n const duration = extractDuration(animationValue)\n if (duration > maxDuration) {\n maxDuration = duration\n }\n }\n }\n\n const delay = normalized.delay ?? 0\n const fallbackTimeout = maxDuration + delay\n\n const timeoutId = setTimeout(() => {\n completeExit()\n }, fallbackTimeout)\n\n // track number of transitioning properties to wait for all to finish\n // (each property fires its own transitionend event)\n const transitioningProps = new Set(keys)\n let completedCount = 0\n\n const onFinishAnimation = (event: TransitionEvent) => {\n // only count transitions on THIS element, not bubbled from children\n if (event.target !== node) return\n\n // map CSS property names to our key names\n // e.g., transitionend fires with propertyName 'transform' for scale/x/y\n const eventProp = event.propertyName\n if (transitioningProps.has(eventProp) || eventProp === 'all') {\n completedCount++\n // wait for all properties to finish\n if (completedCount >= transitioningProps.size) {\n clearTimeout(timeoutId)\n completeExit()\n }\n }\n }\n\n // on cancel, still complete (element is exiting and animation was interrupted)\n // the guards prevent duplicate completion if this is a stale cycle\n const onCancelAnimation = () => {\n // ignore cancel events during reset phase (we intentionally cancel the old transition)\n if (ignoreCancelEvents) return\n clearTimeout(timeoutId)\n completeExit()\n }\n\n node.addEventListener('transitionend', onFinishAnimation)\n node.addEventListener('transitioncancel', onCancelAnimation)\n\n // For interrupted exits, re-enable transition and re-apply exit styles\n // This must happen AFTER listeners are set up so we catch the transitionend\n if (wasInterrupted) {\n rafId = requestAnimationFrame(() => {\n if (cycleId !== exitCycleIdRef.current) return\n // re-enable transition using the pre-built string\n node.style.transition = exitTransitionString\n // force reflow again\n void node.offsetHeight\n // now apply exit styles - this triggers the transition\n applyStylesToNode(node, exitStyle)\n // re-enable cancel event handling now that reset is complete\n ignoreCancelEvents = false\n })\n }\n\n return () => {\n clearTimeout(timeoutId)\n if (rafId !== undefined) cancelAnimationFrame(rafId)\n node.removeEventListener('transitionend', onFinishAnimation)\n node.removeEventListener('transitioncancel', onCancelAnimation)\n // restore transition: the exit handling sets node.style.transition='none'\n // directly on the DOM (bypassing React). if exit is interrupted (e.g. same-key\n // re-entry in AnimatePresence), React won't re-apply its managed transition\n // value because it hasn't changed in the virtual DOM. clearing the inline\n // override lets React's value take effect again.\n node.style.transition = ''\n }\n }, [\n sendExitComplete,\n isExiting,\n stateRef,\n keys,\n normalized,\n defaultAnimation,\n props.enterStyle,\n props.exitStyle,\n ])\n\n // gui doesnt even use animation output during hydration\n if (isHydrating) {\n return null\n }\n\n // Check if we have any animation to apply\n if (!hasNormalizedAnimation(normalized)) {\n return null\n }\n\n if (Array.isArray(style.transform)) {\n style.transform = transformsToString(style.transform)\n }\n\n // Build CSS transition string\n // TODO: we disabled the transform transition, because it will create issue for inverse function and animate function\n // for non layout transform properties either use animate function or find a workaround to do it with css\n const delayStr = normalized.delay ? ` ${normalized.delay}ms` : ''\n const durationOverride = normalized.config?.duration\n style.transition = keys\n .map((key) => {\n // Check for property-specific animation, fall back to default\n const propAnimation = normalized.properties[key]\n let animationValue: string | null = null\n\n if (typeof propAnimation === 'string') {\n animationValue = animations[propAnimation]\n } else if (\n propAnimation &&\n typeof propAnimation === 'object' &&\n propAnimation.type\n ) {\n animationValue = animations[propAnimation.type]\n } else if (defaultAnimation) {\n animationValue = defaultAnimation\n }\n\n // Apply global duration override if specified\n if (animationValue && durationOverride) {\n animationValue = applyDurationOverride(animationValue, durationOverride)\n }\n\n return animationValue ? `${key} ${animationValue}${delayStr}` : null\n })\n .filter(Boolean)\n .join(', ')\n\n if (process.env.NODE_ENV === 'development' && props['debug'] === 'verbose') {\n console.info('CSS animation', {\n props,\n animations,\n normalized,\n defaultAnimation,\n style,\n isEntering,\n isExiting,\n })\n }\n\n return { style, className: isEntering ? 't_unmounted' : '' }\n },\n }\n}\n\n// layout animations\n// useIsomorphicLayoutEffect(() => {\n// if (!host || !props.layout) {\n// return\n// }\n// // @ts-ignore\n// const boundingBox = host?.getBoundingClientRect()\n// if (isChanged(initialPositionRef.current, boundingBox)) {\n// const transform = invert(\n// host,\n// boundingBox,\n// initialPositionRef.current\n// )\n\n// animate({\n// from: transform,\n// to: { x: 0, y: 0, scaleX: 1, scaleY: 1 },\n// duration: 1000,\n// onUpdate: ({ x, y, scaleX, scaleY }) => {\n// // @ts-ignore\n// host.style.transform = `translate(${x}px, ${y}px) scaleX(${scaleX}) scaleY(${scaleY})`\n// // TODO: handle childRef inverse scale\n// // childRef.current.style.transform = `scaleX(${1 / scaleX}) scaleY(${\n// // 1 / scaleY\n// // })`\n// },\n// // TODO: extract ease-in from string and convert/map it to a cubicBezier array\n// cubicBezier: [0, 1.38, 1, -0.41],\n// })\n// }\n// initialPositionRef.current = boundingBox\n// })\n\n// style.transition = `${keys} ${animation}${\n// props.layout ? ',width 0s, height 0s, margin 0s, padding 0s, transform' : ''\n// }`\n\n// const isChanged = (initialBox: any, finalBox: any) => {\n// // we just mounted, so we don't have complete data yet\n// if (!initialBox || !finalBox) return false\n\n// // deep compare the two boxes\n// return JSON.stringify(initialBox) !== JSON.stringify(finalBox)\n// }\n\n// const invert = (el, from, to) => {\n// const { x: fromX, y: fromY, width: fromWidth, height: fromHeight } = from\n// const { x, y, width, height } = to\n\n// const transform = {\n// x: x - fromX - (fromWidth - width) / 2,\n// y: y - fromY - (fromHeight - height) / 2,\n// scaleX: width / fromWidth,\n// scaleY: height / fromHeight,\n// }\n\n// el.style.transform = `\n"
|
|
10
10
|
]
|
|
11
11
|
}
|