react-native-gtkx 0.2.0-alpha.2 → 0.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/aliases/index.d.ts +84 -0
- package/dist/aliases/index.js +208 -0
- package/dist/aliases/index.js.map +1 -0
- package/dist/animated/index.d.ts +2 -0
- package/dist/animated/index.js +5 -0
- package/dist/animated/index.js.map +1 -1
- package/dist/animated/types.d.ts +1 -0
- package/dist/animated/types.js.map +1 -1
- package/dist/animated/value-animation.js +17 -4
- package/dist/animated/value-animation.js.map +1 -1
- package/dist/apis/host.gtkx.js +9 -12
- package/dist/apis/host.gtkx.js.map +1 -1
- package/dist/apis/index.d.ts +4 -2
- package/dist/apis/index.js +2 -0
- package/dist/apis/index.js.map +1 -1
- package/dist/apis/keyboard.d.ts +60 -0
- package/dist/apis/keyboard.js +63 -0
- package/dist/apis/keyboard.js.map +1 -0
- package/dist/apis/log-box.d.ts +15 -0
- package/dist/apis/log-box.js +46 -0
- package/dist/apis/log-box.js.map +1 -0
- package/dist/apis/platform.d.ts +18 -1
- package/dist/apis/platform.js.map +1 -1
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.js +24 -1
- package/dist/common/index.js.map +1 -1
- package/dist/components/animated.d.ts +70 -6
- package/dist/components/animated.js +559 -46
- package/dist/components/animated.js.map +1 -1
- package/dist/components/driven-size.d.ts +27 -0
- package/dist/components/driven-size.js +85 -0
- package/dist/components/driven-size.js.map +1 -0
- package/dist/components/find-node-handle.d.ts +11 -0
- package/dist/components/find-node-handle.js +53 -0
- package/dist/components/find-node-handle.js.map +1 -0
- package/dist/components/flat-list.d.ts +3 -2
- package/dist/components/flat-list.js.map +1 -1
- package/dist/components/frame-scheduler.d.ts +16 -0
- package/dist/components/frame-scheduler.js +37 -0
- package/dist/components/frame-scheduler.js.map +1 -0
- package/dist/components/image.d.ts +6 -1
- package/dist/components/image.js +15 -4
- package/dist/components/image.js.map +1 -1
- package/dist/components/index.d.ts +7 -5
- package/dist/components/index.js +5 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/measure.d.ts +51 -1
- package/dist/components/measure.js +101 -2
- package/dist/components/measure.js.map +1 -1
- package/dist/components/pressable.d.ts +61 -1
- package/dist/components/pressable.js +151 -4
- package/dist/components/pressable.js.map +1 -1
- package/dist/components/rect-store.d.ts +58 -0
- package/dist/components/rect-store.js +124 -3
- package/dist/components/rect-store.js.map +1 -1
- package/dist/components/root.js +6 -1
- package/dist/components/root.js.map +1 -1
- package/dist/components/scroll-phase.d.ts +35 -0
- package/dist/components/scroll-phase.js +26 -0
- package/dist/components/scroll-phase.js.map +1 -0
- package/dist/components/scroll-view.d.ts +39 -3
- package/dist/components/scroll-view.js +378 -43
- package/dist/components/scroll-view.js.map +1 -1
- package/dist/components/text-input.js +9 -25
- package/dist/components/text-input.js.map +1 -1
- package/dist/components/text.d.ts +6 -2
- package/dist/components/text.js +43 -8
- package/dist/components/text.js.map +1 -1
- package/dist/components/use-focus.d.ts +27 -0
- package/dist/components/use-focus.js +116 -0
- package/dist/components/use-focus.js.map +1 -0
- package/dist/components/use-layout-child.d.ts +13 -1
- package/dist/components/use-layout-child.js +188 -5
- package/dist/components/use-layout-child.js.map +1 -1
- package/dist/components/view.d.ts +5 -2
- package/dist/components/view.js +18 -13
- package/dist/components/view.js.map +1 -1
- package/dist/components/virtualized-list.d.ts +45 -5
- package/dist/components/virtualized-list.js +90 -24
- package/dist/components/virtualized-list.js.map +1 -1
- package/dist/components/wheel-scroll-session.d.ts +7 -0
- package/dist/components/wheel-scroll-session.js +53 -0
- package/dist/components/wheel-scroll-session.js.map +1 -0
- package/dist/components/widget-retention.d.ts +35 -0
- package/dist/components/widget-retention.js +169 -0
- package/dist/components/widget-retention.js.map +1 -0
- package/dist/contracts.d.ts +4 -0
- package/dist/contracts.js.map +1 -1
- package/dist/dnd/context.d.ts +69 -0
- package/dist/dnd/context.js +149 -0
- package/dist/dnd/context.js.map +1 -0
- package/dist/dnd/draggable.d.ts +59 -0
- package/dist/dnd/draggable.js +149 -0
- package/dist/dnd/draggable.js.map +1 -0
- package/dist/dnd/droppable.d.ts +24 -0
- package/dist/dnd/droppable.js +74 -0
- package/dist/dnd/droppable.js.map +1 -0
- package/dist/dnd/gtk-controllers.d.ts +39 -0
- package/dist/dnd/gtk-controllers.js +110 -0
- package/dist/dnd/gtk-controllers.js.map +1 -0
- package/dist/dnd/index.d.ts +6 -0
- package/dist/dnd/index.js +31 -0
- package/dist/dnd/index.js.map +1 -0
- package/dist/dnd/order.d.ts +7 -0
- package/dist/dnd/order.js +20 -0
- package/dist/dnd/order.js.map +1 -0
- package/dist/dnd/payload.d.ts +14 -0
- package/dist/dnd/payload.js +41 -0
- package/dist/dnd/payload.js.map +1 -0
- package/dist/dnd/sortable.d.ts +49 -0
- package/dist/dnd/sortable.js +307 -0
- package/dist/dnd/sortable.js.map +1 -0
- package/dist/dnd/types.d.ts +290 -0
- package/dist/dnd/types.js +25 -0
- package/dist/dnd/types.js.map +1 -0
- package/dist/gesture-handler-compat/builder.d.ts +251 -0
- package/dist/gesture-handler-compat/builder.js +513 -0
- package/dist/gesture-handler-compat/builder.js.map +1 -0
- package/dist/gesture-handler-compat/composition.d.ts +23 -0
- package/dist/gesture-handler-compat/composition.js +111 -0
- package/dist/gesture-handler-compat/composition.js.map +1 -0
- package/dist/gesture-handler-compat/deciders.d.ts +3 -0
- package/dist/gesture-handler-compat/deciders.js +47 -0
- package/dist/gesture-handler-compat/deciders.js.map +1 -0
- package/dist/gesture-handler-compat/detector-runtime.d.ts +44 -0
- package/dist/gesture-handler-compat/detector-runtime.js +374 -0
- package/dist/gesture-handler-compat/detector-runtime.js.map +1 -0
- package/dist/gesture-handler-compat/detector.d.ts +22 -0
- package/dist/gesture-handler-compat/detector.js +104 -0
- package/dist/gesture-handler-compat/detector.js.map +1 -0
- package/dist/gesture-handler-compat/fling.d.ts +24 -0
- package/dist/gesture-handler-compat/fling.js +123 -0
- package/dist/gesture-handler-compat/fling.js.map +1 -0
- package/dist/gesture-handler-compat/force-touch.d.ts +13 -0
- package/dist/gesture-handler-compat/force-touch.js +40 -0
- package/dist/gesture-handler-compat/force-touch.js.map +1 -0
- package/dist/gesture-handler-compat/hooks.d.ts +157 -0
- package/dist/gesture-handler-compat/hooks.js +268 -0
- package/dist/gesture-handler-compat/hooks.js.map +1 -0
- package/dist/gesture-handler-compat/hover.d.ts +2 -0
- package/dist/gesture-handler-compat/hover.js +22 -0
- package/dist/gesture-handler-compat/hover.js.map +1 -0
- package/dist/gesture-handler-compat/index.d.ts +98 -0
- package/dist/gesture-handler-compat/index.js +255 -0
- package/dist/gesture-handler-compat/index.js.map +1 -0
- package/dist/gesture-handler-compat/long-press.d.ts +6 -0
- package/dist/gesture-handler-compat/long-press.js +21 -0
- package/dist/gesture-handler-compat/long-press.js.map +1 -0
- package/dist/gesture-handler-compat/manual.d.ts +2 -0
- package/dist/gesture-handler-compat/manual.js +18 -0
- package/dist/gesture-handler-compat/manual.js.map +1 -0
- package/dist/gesture-handler-compat/native.d.ts +7 -0
- package/dist/gesture-handler-compat/native.js +34 -0
- package/dist/gesture-handler-compat/native.js.map +1 -0
- package/dist/gesture-handler-compat/orchestrator.d.ts +77 -0
- package/dist/gesture-handler-compat/orchestrator.js +284 -0
- package/dist/gesture-handler-compat/orchestrator.js.map +1 -0
- package/dist/gesture-handler-compat/pan.d.ts +23 -0
- package/dist/gesture-handler-compat/pan.js +116 -0
- package/dist/gesture-handler-compat/pan.js.map +1 -0
- package/dist/gesture-handler-compat/recognizer.d.ts +268 -0
- package/dist/gesture-handler-compat/recognizer.js +1056 -0
- package/dist/gesture-handler-compat/recognizer.js.map +1 -0
- package/dist/gesture-handler-compat/relations.d.ts +43 -0
- package/dist/gesture-handler-compat/relations.js +128 -0
- package/dist/gesture-handler-compat/relations.js.map +1 -0
- package/dist/gesture-handler-compat/tap.d.ts +6 -0
- package/dist/gesture-handler-compat/tap.js +29 -0
- package/dist/gesture-handler-compat/tap.js.map +1 -0
- package/dist/gesture-handler-compat/touchpad.d.ts +41 -0
- package/dist/gesture-handler-compat/touchpad.js +64 -0
- package/dist/gesture-handler-compat/touchpad.js.map +1 -0
- package/dist/gesture-handler-compat/types.d.ts +441 -0
- package/dist/gesture-handler-compat/types.js +167 -0
- package/dist/gesture-handler-compat/types.js.map +1 -0
- package/dist/gtk/controllers.d.ts +39 -0
- package/dist/gtk/controllers.js +92 -0
- package/dist/gtk/controllers.js.map +1 -0
- package/dist/gtk/index.d.ts +2 -1
- package/dist/gtk/index.js +7 -1
- package/dist/gtk/index.js.map +1 -1
- package/dist/gtkx/bridge/geometry.js +6 -4
- package/dist/gtkx/bridge/geometry.js.map +1 -1
- package/dist/gtkx/bridge/index.d.ts +5 -3
- package/dist/gtkx/bridge/index.js +6 -3
- package/dist/gtkx/bridge/index.js.map +1 -1
- package/dist/gtkx/bridge/slot-portal.js.map +1 -1
- package/dist/gtkx/bridge/use-signal.js +1 -1
- package/dist/gtkx/bridge/use-signal.js.map +1 -1
- package/dist/gtkx/bridge/view-box.d.ts +56 -0
- package/dist/gtkx/bridge/view-box.js +394 -9
- package/dist/gtkx/bridge/view-box.js.map +1 -1
- package/dist/gtkx/bridge/widget-css.d.ts +17 -0
- package/dist/gtkx/bridge/widget-css.js +72 -0
- package/dist/gtkx/bridge/widget-css.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/driven-size.d.ts +12 -0
- package/dist/layout/driven-size.js +70 -0
- package/dist/layout/driven-size.js.map +1 -0
- package/dist/layout/engine.d.ts +17 -1
- package/dist/layout/engine.js +3 -20
- package/dist/layout/engine.js.map +1 -1
- package/dist/layout/node.d.ts +13 -0
- package/dist/layout/node.js +14 -0
- package/dist/layout/node.js.map +1 -1
- package/dist/layout/yoga.d.ts +3 -2
- package/dist/layout/yoga.js +5 -2
- package/dist/layout/yoga.js.map +1 -1
- package/dist/mcp/data/generated.d.ts +257 -60
- package/dist/mcp/data/generated.js +306 -62
- package/dist/mcp/data/generated.js.map +1 -1
- package/dist/metro/index.d.ts +10 -0
- package/dist/metro/index.js +21 -12
- package/dist/metro/index.js.map +1 -1
- package/dist/navigation/sidebar.d.ts +16 -0
- package/dist/navigation/sidebar.js +65 -1
- package/dist/navigation/sidebar.js.map +1 -1
- package/dist/reanimated-compat/animated-ref.d.ts +32 -0
- package/dist/reanimated-compat/animated-ref.js +57 -0
- package/dist/reanimated-compat/animated-ref.js.map +1 -0
- package/dist/reanimated-compat/animation.d.ts +177 -0
- package/dist/reanimated-compat/animation.js +540 -0
- package/dist/reanimated-compat/animation.js.map +1 -0
- package/dist/reanimated-compat/color.d.ts +28 -0
- package/dist/reanimated-compat/color.js +249 -0
- package/dist/reanimated-compat/color.js.map +1 -0
- package/dist/reanimated-compat/decay.d.ts +39 -0
- package/dist/reanimated-compat/decay.js +96 -0
- package/dist/reanimated-compat/decay.js.map +1 -0
- package/dist/reanimated-compat/easing.d.ts +30 -0
- package/dist/reanimated-compat/easing.js +76 -0
- package/dist/reanimated-compat/easing.js.map +1 -0
- package/dist/reanimated-compat/hooks.d.ts +14 -0
- package/dist/reanimated-compat/hooks.js +217 -0
- package/dist/reanimated-compat/hooks.js.map +1 -0
- package/dist/reanimated-compat/index.d.ts +258 -0
- package/dist/reanimated-compat/index.js +464 -0
- package/dist/reanimated-compat/index.js.map +1 -0
- package/dist/reanimated-compat/interpolation.d.ts +18 -0
- package/dist/reanimated-compat/interpolation.js +122 -0
- package/dist/reanimated-compat/interpolation.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-config.d.ts +43 -0
- package/dist/reanimated-compat/layout-animation-config.js +78 -0
- package/dist/reanimated-compat/layout-animation-config.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-presets.d.ts +117 -0
- package/dist/reanimated-compat/layout-animation-presets.js +498 -0
- package/dist/reanimated-compat/layout-animation-presets.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-runtime.d.ts +21 -0
- package/dist/reanimated-compat/layout-animation-runtime.js +311 -0
- package/dist/reanimated-compat/layout-animation-runtime.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-view.d.ts +27 -0
- package/dist/reanimated-compat/layout-animation-view.js +266 -0
- package/dist/reanimated-compat/layout-animation-view.js.map +1 -0
- package/dist/reanimated-compat/layout-animation.d.ts +171 -0
- package/dist/reanimated-compat/layout-animation.js +469 -0
- package/dist/reanimated-compat/layout-animation.js.map +1 -0
- package/dist/reanimated-compat/layout-transitions.d.ts +83 -0
- package/dist/reanimated-compat/layout-transitions.js +350 -0
- package/dist/reanimated-compat/layout-transitions.js.map +1 -0
- package/dist/reanimated-compat/mutable.d.ts +29 -0
- package/dist/reanimated-compat/mutable.js +139 -0
- package/dist/reanimated-compat/mutable.js.map +1 -0
- package/dist/reanimated-compat/props.d.ts +18 -0
- package/dist/reanimated-compat/props.js +111 -0
- package/dist/reanimated-compat/props.js.map +1 -0
- package/dist/reanimated-compat/scroll-handler.d.ts +119 -0
- package/dist/reanimated-compat/scroll-handler.js +274 -0
- package/dist/reanimated-compat/scroll-handler.js.map +1 -0
- package/dist/reanimated-compat/scroll-offset.d.ts +12 -0
- package/dist/reanimated-compat/scroll-offset.js +104 -0
- package/dist/reanimated-compat/scroll-offset.js.map +1 -0
- package/dist/reanimated-compat/style.d.ts +90 -0
- package/dist/reanimated-compat/style.js +452 -0
- package/dist/reanimated-compat/style.js.map +1 -0
- package/dist/reanimated-compat/test-timers.d.ts +28 -0
- package/dist/reanimated-compat/test-timers.js +136 -0
- package/dist/reanimated-compat/test-timers.js.map +1 -0
- package/dist/reanimated-compat/threads.d.ts +13 -0
- package/dist/reanimated-compat/threads.js +41 -0
- package/dist/reanimated-compat/threads.js.map +1 -0
- package/dist/reanimated-compat/tracking.d.ts +41 -0
- package/dist/reanimated-compat/tracking.js +106 -0
- package/dist/reanimated-compat/tracking.js.map +1 -0
- package/dist/reanimated-compat/updater-animations.d.ts +36 -0
- package/dist/reanimated-compat/updater-animations.js +273 -0
- package/dist/reanimated-compat/updater-animations.js.map +1 -0
- package/dist/responder/system.d.ts +80 -7
- package/dist/responder/system.js +143 -23
- package/dist/responder/system.js.map +1 -1
- package/dist/responder/use-responder.d.ts +11 -0
- package/dist/responder/use-responder.js +225 -6
- package/dist/responder/use-responder.js.map +1 -1
- package/dist/runner/host-dev.js +1 -1
- package/dist/runner/host-dev.js.map +1 -1
- package/dist/runner/host.js +1 -1
- package/dist/runner/host.js.map +1 -1
- package/dist/runner/index.js +3 -3
- package/dist/runner/index.js.map +1 -1
- package/dist/sea/gtkx-config-module.js +1 -1
- package/dist/sea/gtkx-config-module.js.map +1 -1
- package/dist/style/absolute-insets.d.ts +26 -0
- package/dist/style/absolute-insets.js +113 -0
- package/dist/style/absolute-insets.js.map +1 -0
- package/dist/style/animated-size.d.ts +25 -0
- package/dist/style/animated-size.js +225 -0
- package/dist/style/animated-size.js.map +1 -0
- package/dist/style/colors.d.ts +17 -0
- package/dist/style/colors.js +25 -6
- package/dist/style/colors.js.map +1 -1
- package/dist/style/imperative-css.d.ts +21 -0
- package/dist/style/imperative-css.js +63 -0
- package/dist/style/imperative-css.js.map +1 -0
- package/dist/style/index.d.ts +2 -1
- package/dist/style/index.js +2 -1
- package/dist/style/index.js.map +1 -1
- package/dist/style/split-style.js +5 -0
- package/dist/style/split-style.js.map +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/unsupported-export.d.ts +8 -0
- package/dist/unsupported-export.js +66 -0
- package/dist/unsupported-export.js.map +1 -0
- package/dist/vite/index.d.ts +21 -8
- package/dist/vite/index.js +127 -82
- package/dist/vite/index.js.map +1 -1
- package/dist/vitest/index.d.ts +2 -2
- package/dist/vitest/index.js.map +1 -1
- package/dist/worklets-compat/index.d.ts +4 -0
- package/dist/worklets-compat/index.js +28 -0
- package/dist/worklets-compat/index.js.map +1 -0
- package/dist/worklets-compat/surface.d.ts +110 -0
- package/dist/worklets-compat/surface.js +153 -0
- package/dist/worklets-compat/surface.js.map +1 -0
- package/package.json +25 -9
- package/types.d.ts +9 -0
- package/dist/common/list.d.ts +0 -82
- package/dist/common/list.js +0 -166
- package/dist/common/list.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-animation-view.js","sourceRoot":"","sources":["../../src/reanimated-compat/layout-animation-view.tsx"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,EAAE;AACF,wEAAwE;AACxE,2EAA2E;AAC3E,uEAAuE;AACvE,4EAA4E;AAC5E,yDAAyD;AACzD,wEAAwE;AACxE,4BAA4B;AAC5B,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,8EAA8E;AAC9E,2EAA2E;AAC3E,4EAA4E;AAC5E,6EAA6E;AAC7E,2EAA2E;AAC3E,6EAA6E;AAC7E,2EAA2E;AAC3E,4BAA4B;AAC5B,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,4EAA4E;AAC5E,yEAAyE;AACzE,4CAA4C;AAC5C,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,MAAM,EACN,QAAQ,GAMT,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,iBAAiB,GAElB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,YAAY,GAEb,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,oBAAoB,EAAY,MAAM,sBAAsB,CAAA;AAMrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EACL,k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AA;gBACjD,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,EAAE,CAClE,OAAO,EAAE,IAAI,EAAE,CAChB,CAAA;gBACD,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;oBACvB,OAAM;gBACR,CAAC;gBACD,OAAO,GAAG,kBAAkB,CAC1B,MAAM,EACN,EAAE,MAAM,EAAE,YAAY,EAAE,EACxB,OAAO,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,EACvB,MAAM,EACN,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,CAC1B,CAAA;YACH,CAAC,CAAA;YACD,uDAAuD;QACzD,CAAC,EAAE,EAAE,CAAC,CAAA;QAEN,MAAM,WAAW,GAA4B,EAAE,GAAG,IAAI,EAAE,CAAA;QACxD,IAAI,QAAQ,IAAI,OAAO,IAAI,MAAM,IAAI,GAAG,EAAE,CAAC;YACzC,WAAW,CAAC,GAAG,GAAG,YAAY,CAAA;QAChC,CAAC;QAED,MAAM,MAAM,GAAG,SAAmD,CAAA;QAClE,OAAO,KAAC,MAAM,OAAK,WAAW,GAAI,CAAA;IACpC,CAAC,CAAA;IACD,cAAc,CAAC,WAAW,GAAG,kBAAkB,IAAI,GAAG,CAAA;IAEtD,OAAO,cAAuD,CAAA;AAChE,CAAC,CAAA","sourcesContent":["// `entering`, `exiting` and `layout` on an animated component.\n//\n// The three props are added by WRAPPING, not by changing the platform's\n// `Animated.View`: the wrapper renders the component it was given, adds no\n// widget to the tree, and reaches the real one through the handle that\n// component already exposes — the same seam `createAnimatedComponent` uses.\n// That is what lets `Animated.Text` and anything through\n// `createAnimatedComponent` take a layout animation on exactly the same\n// terms as `Animated.View`.\n//\n// WHY THE WRAPPER IS WHERE `exiting` LIVES, and this is the whole reason it\n// exists as a component rather than a hook inside the platform: React runs a\n// deleted subtree's layout-effect cleanups from the OUTSIDE IN, and unparents\n// its topmost widget last. A cleanup registered here — one component above\n// the one that owns the widget — therefore runs at the only moment when the\n// widget is still parented, its Yoga node still alive and its layout manager\n// still attached. It hands all three to the platform's retention primitive\n// (src/components/widget-retention.ts), which puts the widget back after the\n// reconciler takes it out and holds everything else until the fade ends or\n// the fallback timer fires.\n//\n// The other two need nothing new. `entering` is \"write the initial values on\n// mount and animate to the real ones\"; `layout` is \"the engine committed a\n// different rect for this child, so walk it there from where it was\" — both\n// are snapshot-measure-animate, which is exactly what upstream's own web\n// implementation does on its single thread.\nimport {\n useInsertionEffect,\n useLayoutEffect,\n useRef,\n useState,\n type ComponentProps,\n type ComponentType,\n type ElementType,\n type ReactNode,\n type Ref,\n} from \"react\"\nimport { Dimensions } from \"../apis/index\"\nimport { Animated as PlatformAnimated } from \"../components/animated\"\nimport { glibScheduler } from \"../components/frame-scheduler\"\nimport { useHostNode } from \"../components/host-node\"\nimport { widgetForHandle } from \"../components/measure\"\nimport {\n getStoredLayoutOffset,\n getStoredRect,\n observeStoredRect,\n type StoredRect,\n} from \"../components/rect-store\"\nimport {\n retainWidget,\n type WidgetRetention,\n} from \"../components/widget-retention\"\nimport { computePointInWindow, type Gtk } from \"../gtkx/bridge/index\"\nimport type { AnimationEngine } from \"./animation\"\nimport type {\n LayoutAnimationBuilderLike,\n LayoutAnimationValues,\n} from \"./layout-animation\"\nimport { useLayoutAnimationSkip } from \"./layout-animation-config\"\nimport {\n runLayoutAnimation,\n type RunningLayoutAnimation,\n} from \"./layout-animation-runtime\"\n\n/**\n * How much longer than the animation itself a widget may be retained before\n * the fallback drops it. The timer exists for the case where the animation\n * never reports an end at all, so the margin only has to cover the ordinary\n * jitter of a frame source — not a whole animation.\n */\nconst RETENTION_MARGIN_MS = 500\n\n/** What `entering`, `exiting` and `layout` accept: a builder, or its class. */\nexport type LayoutAnimationProps = {\n /** Runs once, when the component mounts. */\n entering?: LayoutAnimationBuilderLike | false | null\n /**\n * Runs when the component unmounts, on a widget the platform keeps on\n * screen for the duration. Ignored when the component's own container is\n * unmounting in the same commit — there would be nothing left to animate\n * inside.\n */\n exiting?: LayoutAnimationBuilderLike | false | null\n /** Runs whenever the layout engine commits a new position for this child. */\n layout?: LayoutAnimationBuilderLike | false | null\n}\n\nconst ZERO_RECT: StoredRect = { x: 0, y: 0, width: 0, height: 0 }\n\n// The platform's own Animated api and the frame scheduler behind it: the same\n// pair every other animation in this surface runs on, so a layout animation\n// adds no second clock.\nconst ENGINE: AnimationEngine = {\n api: PlatformAnimated,\n scheduler: glibScheduler,\n}\n\nconst retainForExit = (\n widget: Gtk.Widget,\n parentWidget: Gtk.Widget,\n builder: LayoutAnimationBuilderLike,\n stop: () => void,\n): WidgetRetention | null =>\n retainWidget(widget, parentWidget, {\n // The fallback covers a frame source that never delivers an end, so it\n // only has to outlast the animation the builder describes.\n fallbackMs: builder.getMaxDuration() + RETENTION_MARGIN_MS,\n onRelease: stop,\n })\n\nconst warnedWithoutWidget = new Set<string>()\n\nconst warnNoWidget = (name: string): void => {\n if (warnedWithoutWidget.has(name)) {\n return\n }\n warnedWithoutWidget.add(name)\n const isProduction =\n typeof process !== \"undefined\" && process.env.NODE_ENV === \"production\"\n if (!isProduction) {\n console.warn(\n `react-native-reanimated: ${name} was given an \\`entering\\`, \\`exiting\\` or \\`layout\\` animation, but ` +\n \"the component exposed no ref carrying a widget, so there is nothing to animate. Put the animation on \" +\n \"an `Animated.View`, or give the component a `ref` built with the platform's own measure handle. \" +\n \"See docs/api.md.\",\n )\n }\n}\n\n/** @internal Test seam: the warning is once per component per session. */\nexport const resetLayoutAnimationComponentWarnings = (): void => {\n warnedWithoutWidget.clear()\n}\n\nconst valuesFor = (\n widget: Gtk.Widget,\n current: StoredRect,\n target: StoredRect,\n): LayoutAnimationValues => {\n const window = Dimensions.get(\"window\")\n // One FFI call per animation START (never per frame), so a builder reading\n // the global origin gets a real answer rather than a parent-relative one\n // wearing its name.\n const page = computePointInWindow(widget, 0, 0)\n const dx = page ? page.x - target.x : 0\n const dy = page ? page.y - target.y : 0\n return {\n targetOriginX: target.x,\n targetOriginY: target.y,\n targetWidth: target.width,\n targetHeight: target.height,\n targetGlobalOriginX: target.x + dx,\n targetGlobalOriginY: target.y + dy,\n currentOriginX: current.x,\n currentOriginY: current.y,\n currentWidth: current.width,\n currentHeight: current.height,\n currentGlobalOriginX: current.x + dx,\n currentGlobalOriginY: current.y + dy,\n windowWidth: window.width,\n windowHeight: window.height,\n }\n}\n\nconst displayNameOf = (component: unknown): string => {\n if (typeof component === \"string\") {\n return component\n }\n const named = component as { displayName?: string; name?: string }\n return named?.displayName ?? named?.name ?? \"Component\"\n}\n\n/** The props a layout-animated wrapper adds on top of the component's own. */\nexport type LayoutAnimatedComponent<C extends ElementType> = (\n props: ComponentProps<C> & LayoutAnimationProps,\n) => ReactNode\n\n/**\n * Adds `entering`, `exiting` and `layout` to an animated component.\n *\n * The rendered output is byte-for-byte what the wrapped component produces —\n * the wrapper is a function component with no host element of its own.\n */\nexport const withLayoutAnimations = <C extends ElementType>(\n component: C,\n): LayoutAnimatedComponent<C> => {\n const name = displayNameOf(component)\n\n const LayoutAnimated = ({\n entering,\n exiting,\n layout,\n ref,\n ...rest\n }: LayoutAnimationProps & {\n ref?: Ref<unknown>\n [key: string]: unknown\n }) => {\n const host = useHostNode()\n const handleRef = useRef<unknown>(null)\n // Null unless a `<LayoutAnimationConfig>` is above. Captured once and read\n // from inside the effects below: the object identity is stable for the\n // life of that wrapper, and both of its flags are only meaningful at the\n // moment the effect (or its cleanup) actually runs.\n const skip = useLayoutAnimationSkip()\n\n // Read by an unmount cleanup and by a rect observer, both of which\n // outlive the render that produced them. Refreshed in an insertion effect\n // — the project's standard escape from writing a ref during render, and\n // early enough that a layout effect in the same commit sees it.\n const exitingRef = useRef<LayoutAnimationBuilderLike | false | null>(\n exiting ?? null,\n )\n const layoutRef = useRef<LayoutAnimationBuilderLike | false | null>(\n layout ?? null,\n )\n const forwardedRef = useRef<Ref<unknown> | undefined>(ref)\n useInsertionEffect(() => {\n exitingRef.current = exiting ?? null\n layoutRef.current = layout ?? null\n forwardedRef.current = ref\n })\n\n // Stable identity: a fresh callback ref every render would detach and\n // reattach the wrapped component's handle on every render.\n const [assignHandle] = useState(() => (instance: unknown) => {\n handleRef.current = instance\n const target = forwardedRef.current\n if (typeof target === \"function\") {\n target(instance)\n } else if (target) {\n ;(target as { current: unknown }).current = instance\n }\n // No return value: React 19 reads one as a callback-ref cleanup.\n })\n\n const parentWidgetRef = host.widgetRef\n\n // --- entering --------------------------------------------------------\n // Never refreshed, unlike the two above: an entering animation runs once,\n // on mount, so the builder that counts is the one this component was\n // mounted with.\n const enteringRef = useRef<LayoutAnimationBuilderLike | false | null>(\n entering ?? null,\n )\n useLayoutEffect(() => {\n const builder = enteringRef.current\n if (!builder || skip?.entering.current) {\n return\n }\n const widget = widgetForHandle(handleRef.current)\n if (!widget) {\n warnNoWidget(name)\n return\n }\n const rect = getStoredRect(widget) ?? ZERO_RECT\n const values = valuesFor(widget, rect, rect)\n const running = runLayoutAnimation(\n ENGINE,\n { widget, parentWidget: parentWidgetRef.current },\n builder.build()(values),\n values,\n )\n return () => running.stop()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n // --- layout ----------------------------------------------------------\n // Keyed on whether there IS a layout animation, not on which one: a rect\n // observer is what turns on the rect store's notify path, and a view that\n // never asked for a layout transition must not pay for it.\n const hasLayout = Boolean(layout)\n useLayoutEffect(() => {\n if (!hasLayout) {\n return\n }\n const widget = widgetForHandle(handleRef.current)\n if (!widget) {\n warnNoWidget(name)\n return\n }\n let running: RunningLayoutAnimation | null = null\n const unobserve = observeStoredRect(widget, (next, previous) => {\n const builder = layoutRef.current\n // Nothing to walk from on the first commit, and a pure resize has no\n // position to animate — the size lands immediately either way.\n if (!builder || previous === undefined) {\n return\n }\n if (previous.x === next.x && previous.y === next.y) {\n return\n }\n // Where the child is being DRAWN right now, which is the rect it had\n // plus whatever a transition still in flight has added to it.\n const offset = getStoredLayoutOffset(widget)\n const drawn: StoredRect = {\n x: previous.x + offset.dx,\n y: previous.y + offset.dy,\n width: previous.width,\n height: previous.height,\n }\n running?.stop()\n const values = valuesFor(widget, drawn, next)\n running = runLayoutAnimation(\n ENGINE,\n { widget, parentWidget: parentWidgetRef.current },\n builder.build()(values),\n values,\n () => {\n running = null\n },\n )\n })\n return () => {\n unobserve()\n running?.stop()\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [hasLayout])\n\n // --- exiting ---------------------------------------------------------\n // Declared last so its cleanup runs after the other two have stopped\n // whatever they were driving: React tears a component's layout effects\n // down in the order they were created.\n useLayoutEffect(() => {\n return () => {\n const builder = exitingRef.current\n // `skip.exiting` is set by a `<LayoutAnimationConfig skipExiting>`\n // above us, whose own cleanup React already ran — deletions tear down\n // outside in, which is the same ordering `exiting` itself relies on.\n if (!builder || skip?.exiting.current) {\n return\n }\n const widget = widgetForHandle(handleRef.current)\n // Read HERE and not captured when the effect ran, which is the whole\n // point: null means this component's own container is unmounting in\n // the same commit (React detaches the container's ref before\n // descending into it), and there is then no container left to hold\n // the widget — an exit animation inside a disappearing parent is not\n // one anybody sees.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const parentWidget = parentWidgetRef.current\n if (!widget || !parentWidget) {\n return\n }\n const rect = getStoredRect(widget) ?? ZERO_RECT\n const values = valuesFor(widget, rect, rect)\n let running: RunningLayoutAnimation | null = null\n const retention = retainForExit(widget, parentWidget, builder, () =>\n running?.stop(),\n )\n if (retention === null) {\n return\n }\n running = runLayoutAnimation(\n ENGINE,\n { widget, parentWidget },\n builder.build()(values),\n values,\n () => retention.release(),\n )\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const targetProps: Record<string, unknown> = { ...rest }\n if (entering || exiting || layout || ref) {\n targetProps.ref = assignHandle\n }\n\n const Target = component as ComponentType<Record<string, unknown>>\n return <Target {...targetProps} />\n }\n LayoutAnimated.displayName = `LayoutAnimated(${name})`\n\n return LayoutAnimated as unknown as LayoutAnimatedComponent<C>\n}\n"]}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { type WithSpringConfig } from "./animation";
|
|
2
|
+
import type { EasingFunction, EasingFunctionFactory } from "./easing";
|
|
3
|
+
/**
|
|
4
|
+
* What a builder is handed when it is asked to produce a config. Upstream
|
|
5
|
+
* fills the `target*` half for an entering animation and the `current*` half
|
|
6
|
+
* for an exiting one; both halves are always populated here, from the rects
|
|
7
|
+
* the layout engine committed, because a superset costs nothing and a builder
|
|
8
|
+
* that reads the wrong half would otherwise get `undefined`.
|
|
9
|
+
*/
|
|
10
|
+
export type LayoutAnimationValues = {
|
|
11
|
+
targetOriginX: number;
|
|
12
|
+
targetOriginY: number;
|
|
13
|
+
targetWidth: number;
|
|
14
|
+
targetHeight: number;
|
|
15
|
+
targetGlobalOriginX: number;
|
|
16
|
+
targetGlobalOriginY: number;
|
|
17
|
+
currentOriginX: number;
|
|
18
|
+
currentOriginY: number;
|
|
19
|
+
currentWidth: number;
|
|
20
|
+
currentHeight: number;
|
|
21
|
+
currentGlobalOriginX: number;
|
|
22
|
+
currentGlobalOriginY: number;
|
|
23
|
+
windowWidth: number;
|
|
24
|
+
windowHeight: number;
|
|
25
|
+
};
|
|
26
|
+
/** Called when a layout animation settles or is cut short, as upstream. */
|
|
27
|
+
export type LayoutAnimationCallback = (finished: boolean) => void;
|
|
28
|
+
/** Upstream's built config: where to start, what to run, who to tell. */
|
|
29
|
+
export type BuiltLayoutAnimation = {
|
|
30
|
+
initialValues: Record<string, unknown>;
|
|
31
|
+
animations: Record<string, unknown>;
|
|
32
|
+
callback?: LayoutAnimationCallback;
|
|
33
|
+
};
|
|
34
|
+
/** Anything an `entering`, `exiting` or `layout` prop accepts. */
|
|
35
|
+
export type LayoutAnimationBuilderLike = {
|
|
36
|
+
build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
37
|
+
/** The longest this animation can run, which is what arms a retention. */
|
|
38
|
+
getMaxDuration(): number;
|
|
39
|
+
};
|
|
40
|
+
type TimingLike = (toValue: number) => number;
|
|
41
|
+
export declare class AnimationBuilder {
|
|
42
|
+
durationV: number | undefined;
|
|
43
|
+
delayV: number | undefined;
|
|
44
|
+
easingV: EasingFunction | EasingFunctionFactory | undefined;
|
|
45
|
+
randomizeDelay: boolean;
|
|
46
|
+
type: "timing" | "spring";
|
|
47
|
+
springConfigV: WithSpringConfig;
|
|
48
|
+
initialValuesV: Record<string, unknown>;
|
|
49
|
+
callbackV: LayoutAnimationCallback | undefined;
|
|
50
|
+
rotateV: string | number | undefined;
|
|
51
|
+
static createInstance<T extends typeof AnimationBuilder>(this: T): InstanceType<T>;
|
|
52
|
+
duration(durationMs: number): this;
|
|
53
|
+
delay(delayMs: number): this;
|
|
54
|
+
easing(easingFunction: EasingFunction | EasingFunctionFactory): this;
|
|
55
|
+
/** Upstream's "spread the delay over a window" helper, ported as-is. */
|
|
56
|
+
randomDelay(): this;
|
|
57
|
+
springify(durationMs?: number): this;
|
|
58
|
+
/**
|
|
59
|
+
* The angle `ZoomInRotate` / `ZoomOutRotate` spin through.
|
|
60
|
+
*
|
|
61
|
+
* Upstream takes a bare number of RADIANS in a string (its default is
|
|
62
|
+
* `'0.3'`, interpolated into `` `${rotate}rad` ``), and a united value like
|
|
63
|
+
* `'90deg'` reaches its template as `'90degrad'`. A bare number or numeric
|
|
64
|
+
* string is read as radians here, exactly as upstream; a value that carries
|
|
65
|
+
* its own `deg`/`rad` unit is parsed instead of being concatenated into
|
|
66
|
+
* nonsense.
|
|
67
|
+
*/
|
|
68
|
+
rotate(angle: string | number): this;
|
|
69
|
+
damping(value: number): this;
|
|
70
|
+
dampingRatio(value: number): this;
|
|
71
|
+
mass(value: number): this;
|
|
72
|
+
stiffness(value: number): this;
|
|
73
|
+
overshootClamping(value: number): this;
|
|
74
|
+
/**
|
|
75
|
+
* Accepted and ignored, because this platform's spring solver derives its
|
|
76
|
+
* rest condition from the same energy budget upstream stops on rather than
|
|
77
|
+
* from absolute thresholds — the difference is well under a pixel and is
|
|
78
|
+
* already in docs/api.md's differences table.
|
|
79
|
+
*/
|
|
80
|
+
restDisplacementThreshold(): this;
|
|
81
|
+
restSpeedThreshold(): this;
|
|
82
|
+
/**
|
|
83
|
+
* Accepted and ignored: no reduce-motion source is wired on this platform
|
|
84
|
+
* yet, so every value behaves as `ReduceMotion.Never` — the same answer
|
|
85
|
+
* `useReducedMotion()` gives.
|
|
86
|
+
*/
|
|
87
|
+
reduceMotion(): this;
|
|
88
|
+
withInitialValues(values: Record<string, unknown>): this;
|
|
89
|
+
withCallback(callback: LayoutAnimationCallback): this;
|
|
90
|
+
getDelay(): number;
|
|
91
|
+
/** The nominal length, as upstream reports it. */
|
|
92
|
+
getDuration(): number;
|
|
93
|
+
/**
|
|
94
|
+
* The UPPER BOUND on delay plus duration, which is what a retention arms
|
|
95
|
+
* its fallback timer from. Not `getDelay() + getDuration()`: `randomDelay`
|
|
96
|
+
* draws a fresh number on every call — deliberately, so a list staggers —
|
|
97
|
+
* and a fallback armed from one draw could cut short an animation built
|
|
98
|
+
* from another.
|
|
99
|
+
*/
|
|
100
|
+
getMaxDuration(): number;
|
|
101
|
+
/**
|
|
102
|
+
* `.rotate()` resolved to degrees, or `fallbackDegrees` when it was never
|
|
103
|
+
* called. See {@link AnimationBuilder.rotate} for the unit rules.
|
|
104
|
+
*/
|
|
105
|
+
protected getRotationDegrees(fallbackDegrees: number): number;
|
|
106
|
+
protected animation(): TimingLike;
|
|
107
|
+
protected delayed(delayMs: number, animation: number): number;
|
|
108
|
+
build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
109
|
+
static duration<T extends typeof AnimationBuilder>(this: T, durationMs: number): InstanceType<T>;
|
|
110
|
+
static delay<T extends typeof AnimationBuilder>(this: T, delayMs: number): InstanceType<T>;
|
|
111
|
+
static easing<T extends typeof AnimationBuilder>(this: T, easingFunction: EasingFunction | EasingFunctionFactory): InstanceType<T>;
|
|
112
|
+
static randomDelay<T extends typeof AnimationBuilder>(this: T): InstanceType<T>;
|
|
113
|
+
static springify<T extends typeof AnimationBuilder>(this: T, durationMs?: number): InstanceType<T>;
|
|
114
|
+
static rotate<T extends typeof AnimationBuilder>(this: T, angle: string | number): InstanceType<T>;
|
|
115
|
+
static damping<T extends typeof AnimationBuilder>(this: T, value: number): InstanceType<T>;
|
|
116
|
+
static dampingRatio<T extends typeof AnimationBuilder>(this: T, value: number): InstanceType<T>;
|
|
117
|
+
static mass<T extends typeof AnimationBuilder>(this: T, value: number): InstanceType<T>;
|
|
118
|
+
static stiffness<T extends typeof AnimationBuilder>(this: T, value: number): InstanceType<T>;
|
|
119
|
+
static overshootClamping<T extends typeof AnimationBuilder>(this: T, value: number): InstanceType<T>;
|
|
120
|
+
static restDisplacementThreshold<T extends typeof AnimationBuilder>(this: T): InstanceType<T>;
|
|
121
|
+
static restSpeedThreshold<T extends typeof AnimationBuilder>(this: T): InstanceType<T>;
|
|
122
|
+
static reduceMotion<T extends typeof AnimationBuilder>(this: T): InstanceType<T>;
|
|
123
|
+
static withInitialValues<T extends typeof AnimationBuilder>(this: T, values: Record<string, unknown>): InstanceType<T>;
|
|
124
|
+
static withCallback<T extends typeof AnimationBuilder>(this: T, callback: LayoutAnimationCallback): InstanceType<T>;
|
|
125
|
+
static build<T extends typeof AnimationBuilder>(this: T): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
126
|
+
static getDuration<T extends typeof AnimationBuilder>(this: T): number;
|
|
127
|
+
static getDelay<T extends typeof AnimationBuilder>(this: T): number;
|
|
128
|
+
static getMaxDuration<T extends typeof AnimationBuilder>(this: T): number;
|
|
129
|
+
}
|
|
130
|
+
/** Fades a view in as it mounts. */
|
|
131
|
+
export declare class FadeIn extends AnimationBuilder {
|
|
132
|
+
build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
133
|
+
}
|
|
134
|
+
/** Fades a view out as it unmounts — the animation that needs retention. */
|
|
135
|
+
export declare class FadeOut extends AnimationBuilder {
|
|
136
|
+
build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Walks a view from where it was to where the layout engine just put it.
|
|
140
|
+
*
|
|
141
|
+
* Upstream animates `originX`/`originY`/`width`/`height`; the same four are
|
|
142
|
+
* produced here, and the runtime honours the origins (as a translation, which
|
|
143
|
+
* is paint-only) and applies the size immediately. See docs/api.md.
|
|
144
|
+
*/
|
|
145
|
+
export declare class LinearTransition extends AnimationBuilder {
|
|
146
|
+
build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
147
|
+
}
|
|
148
|
+
type KeyframeStyle = Record<string, unknown> & {
|
|
149
|
+
easing?: EasingFunction | EasingFunctionFactory;
|
|
150
|
+
};
|
|
151
|
+
export type KeyframeDefinitions = Record<string | number, KeyframeStyle>;
|
|
152
|
+
/**
|
|
153
|
+
* A hand-written keyframe track — the one builder that is a class you
|
|
154
|
+
* instantiate (`new Keyframe({...})`) rather than a preset you configure.
|
|
155
|
+
*
|
|
156
|
+
* Each keyframe is a percentage (or `from`/`to`) mapped to a style. Every
|
|
157
|
+
* property is turned into a `withSequence` of `withTiming` steps whose
|
|
158
|
+
* durations are the gaps between the offsets it appears at, which is exactly
|
|
159
|
+
* how upstream compiles them; a per-keyframe `easing` applies to the step
|
|
160
|
+
* that ENDS there, as in CSS.
|
|
161
|
+
*/
|
|
162
|
+
export declare class Keyframe extends AnimationBuilder {
|
|
163
|
+
private readonly definitions;
|
|
164
|
+
constructor(definitions: KeyframeDefinitions);
|
|
165
|
+
/** Keyframes and springs are different clocks; upstream refuses this too. */
|
|
166
|
+
springify(): this;
|
|
167
|
+
private readonly unhandled;
|
|
168
|
+
private tracks;
|
|
169
|
+
build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
170
|
+
}
|
|
171
|
+
export {};
|