react-native-gtkx 0.3.0-alpha.1 → 0.4.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/README.md +1 -1
  2. package/dist/adw/index.d.ts +3 -2
  3. package/dist/adw/index.js +21 -4
  4. package/dist/adw/index.js.map +1 -1
  5. package/dist/adw/widgets.generated.d.ts +1 -1
  6. package/dist/adw/widgets.generated.js +2 -2
  7. package/dist/adw/widgets.generated.js.map +1 -1
  8. package/dist/animated/create-animated.d.ts +2 -0
  9. package/dist/animated/create-animated.js +2 -0
  10. package/dist/animated/create-animated.js.map +1 -1
  11. package/dist/animated/event.d.ts +15 -0
  12. package/dist/animated/event.js +80 -0
  13. package/dist/animated/event.js.map +1 -0
  14. package/dist/animated/index.d.ts +4 -0
  15. package/dist/animated/index.js +8 -0
  16. package/dist/animated/index.js.map +1 -1
  17. package/dist/animated/spring.d.ts +10 -0
  18. package/dist/animated/spring.js +20 -6
  19. package/dist/animated/spring.js.map +1 -1
  20. package/dist/animated/timing.d.ts +10 -0
  21. package/dist/animated/timing.js +21 -13
  22. package/dist/animated/timing.js.map +1 -1
  23. package/dist/apis/host.gtkx.js +70 -11
  24. package/dist/apis/host.gtkx.js.map +1 -1
  25. package/dist/common/navigation-stack.d.ts +6 -3
  26. package/dist/common/navigation-stack.js +8 -1
  27. package/dist/common/navigation-stack.js.map +1 -1
  28. package/dist/common/widget.js +2 -11
  29. package/dist/common/widget.js.map +1 -1
  30. package/dist/components/animated.d.ts +1 -0
  31. package/dist/components/animated.js +28 -4
  32. package/dist/components/animated.js.map +1 -1
  33. package/dist/components/app-registry.js +32 -8
  34. package/dist/components/app-registry.js.map +1 -1
  35. package/dist/components/request-animation-frame.d.ts +33 -0
  36. package/dist/components/request-animation-frame.js +83 -0
  37. package/dist/components/request-animation-frame.js.map +1 -0
  38. package/dist/components/scroll-view.js +60 -2
  39. package/dist/components/scroll-view.js.map +1 -1
  40. package/dist/components/virtualized-list.js +1 -4
  41. package/dist/components/virtualized-list.js.map +1 -1
  42. package/dist/dnd/autoscroll.d.ts +44 -0
  43. package/dist/dnd/autoscroll.js +176 -0
  44. package/dist/dnd/autoscroll.js.map +1 -0
  45. package/dist/dnd/grid-order.d.ts +45 -0
  46. package/dist/dnd/grid-order.js +151 -0
  47. package/dist/dnd/grid-order.js.map +1 -0
  48. package/dist/dnd/grid.d.ts +44 -0
  49. package/dist/dnd/grid.js +397 -0
  50. package/dist/dnd/grid.js.map +1 -0
  51. package/dist/dnd/gtk-controllers.d.ts +16 -2
  52. package/dist/dnd/gtk-controllers.js +23 -3
  53. package/dist/dnd/gtk-controllers.js.map +1 -1
  54. package/dist/dnd/index.d.ts +4 -2
  55. package/dist/dnd/index.js +9 -2
  56. package/dist/dnd/index.js.map +1 -1
  57. package/dist/dnd/order-state.d.ts +14 -0
  58. package/dist/dnd/order-state.js +55 -0
  59. package/dist/dnd/order-state.js.map +1 -0
  60. package/dist/dnd/order.d.ts +19 -0
  61. package/dist/dnd/order.js +19 -0
  62. package/dist/dnd/order.js.map +1 -1
  63. package/dist/dnd/sortable.d.ts +29 -4
  64. package/dist/dnd/sortable.js +308 -115
  65. package/dist/dnd/sortable.js.map +1 -1
  66. package/dist/dnd/types.d.ts +236 -14
  67. package/dist/dnd/types.js +30 -0
  68. package/dist/dnd/types.js.map +1 -1
  69. package/dist/gesture-handler-compat/attach-context.d.ts +29 -0
  70. package/dist/gesture-handler-compat/attach-context.js +90 -0
  71. package/dist/gesture-handler-compat/attach-context.js.map +1 -0
  72. package/dist/gesture-handler-compat/detector-runtime.d.ts +14 -3
  73. package/dist/gesture-handler-compat/detector-runtime.js +15 -5
  74. package/dist/gesture-handler-compat/detector-runtime.js.map +1 -1
  75. package/dist/gesture-handler-compat/detector.js +57 -2
  76. package/dist/gesture-handler-compat/detector.js.map +1 -1
  77. package/dist/gesture-handler-compat/gesture-state-manager.d.ts +5 -0
  78. package/dist/gesture-handler-compat/gesture-state-manager.js +77 -0
  79. package/dist/gesture-handler-compat/gesture-state-manager.js.map +1 -0
  80. package/dist/gesture-handler-compat/index.d.ts +2 -2
  81. package/dist/gesture-handler-compat/index.js +38 -33
  82. package/dist/gesture-handler-compat/index.js.map +1 -1
  83. package/dist/gesture-handler-compat/recognizer.d.ts +12 -1
  84. package/dist/gesture-handler-compat/recognizer.js +23 -9
  85. package/dist/gesture-handler-compat/recognizer.js.map +1 -1
  86. package/dist/gesture-handler-compat/tag-registry.d.ts +14 -0
  87. package/dist/gesture-handler-compat/tag-registry.js +19 -0
  88. package/dist/gesture-handler-compat/tag-registry.js.map +1 -0
  89. package/dist/globals/index.d.ts +47 -0
  90. package/dist/globals/index.js +181 -0
  91. package/dist/globals/index.js.map +1 -0
  92. package/dist/globals/install.d.ts +1 -0
  93. package/dist/globals/install.js +14 -0
  94. package/dist/globals/install.js.map +1 -0
  95. package/dist/gtkx/bridge/adw-namespace.d.ts +2 -0
  96. package/dist/gtkx/bridge/adw-namespace.js +26 -0
  97. package/dist/gtkx/bridge/adw-namespace.js.map +1 -0
  98. package/dist/gtkx/bridge/adw.d.ts +23 -0
  99. package/dist/gtkx/bridge/adw.js +93 -0
  100. package/dist/gtkx/bridge/adw.js.map +1 -0
  101. package/dist/gtkx/bridge/color-scheme-parse.d.ts +11 -0
  102. package/dist/gtkx/bridge/color-scheme-parse.js +42 -0
  103. package/dist/gtkx/bridge/color-scheme-parse.js.map +1 -0
  104. package/dist/gtkx/bridge/color-scheme-portal.d.ts +24 -0
  105. package/dist/gtkx/bridge/color-scheme-portal.js +172 -0
  106. package/dist/gtkx/bridge/color-scheme-portal.js.map +1 -0
  107. package/dist/gtkx/bridge/core.d.ts +25 -0
  108. package/dist/gtkx/bridge/core.js +69 -0
  109. package/dist/gtkx/bridge/core.js.map +1 -0
  110. package/dist/gtkx/bridge/drag-layer.d.ts +27 -0
  111. package/dist/gtkx/bridge/drag-layer.js +177 -0
  112. package/dist/gtkx/bridge/drag-layer.js.map +1 -0
  113. package/dist/gtkx/bridge/index.d.ts +1 -27
  114. package/dist/gtkx/bridge/index.js +12 -71
  115. package/dist/gtkx/bridge/index.js.map +1 -1
  116. package/dist/gtkx/bridge/widgets.generated.adw.d.ts +1 -0
  117. package/dist/gtkx/bridge/widgets.generated.adw.js +16 -0
  118. package/dist/gtkx/bridge/widgets.generated.adw.js.map +1 -0
  119. package/dist/gtkx/bridge/widgets.generated.d.ts +0 -1
  120. package/dist/gtkx/bridge/widgets.generated.js +3 -3
  121. package/dist/gtkx/bridge/widgets.generated.js.map +1 -1
  122. package/dist/index.js +20 -0
  123. package/dist/index.js.map +1 -1
  124. package/dist/mcp/data/generated.d.ts +41 -20
  125. package/dist/mcp/data/generated.js +46 -20
  126. package/dist/mcp/data/generated.js.map +1 -1
  127. package/dist/metro/index.d.ts +1 -0
  128. package/dist/metro/index.js +12 -0
  129. package/dist/metro/index.js.map +1 -1
  130. package/dist/navigation/sidebar.js +2 -45
  131. package/dist/navigation/sidebar.js.map +1 -1
  132. package/dist/reanimated-compat/animatable-value.d.ts +158 -0
  133. package/dist/reanimated-compat/animatable-value.js +316 -0
  134. package/dist/reanimated-compat/animatable-value.js.map +1 -0
  135. package/dist/reanimated-compat/animation.d.ts +34 -13
  136. package/dist/reanimated-compat/animation.js +97 -25
  137. package/dist/reanimated-compat/animation.js.map +1 -1
  138. package/dist/reanimated-compat/mutable.js +6 -6
  139. package/dist/reanimated-compat/mutable.js.map +1 -1
  140. package/dist/reanimated-compat/updater-animations.js +32 -12
  141. package/dist/reanimated-compat/updater-animations.js.map +1 -1
  142. package/dist/runner/host-dev.js +5 -1
  143. package/dist/runner/host-dev.js.map +1 -1
  144. package/dist/runner/host.js +9 -1
  145. package/dist/runner/host.js.map +1 -1
  146. package/dist/vite/index.js +130 -0
  147. package/dist/vite/index.js.map +1 -1
  148. package/package.json +1 -1
  149. package/dist/gtkx/bridge/theme.d.ts +0 -4
  150. package/dist/gtkx/bridge/theme.js +0 -5
  151. package/dist/gtkx/bridge/theme.js.map +0 -1
package/README.md CHANGED
@@ -44,7 +44,7 @@ And the portability proof — `examples/profile` renders ONE source file with bo
44
44
  - [x] **Fast Refresh on both toolchains**: `run-linux --dev` (Metro dev server + HMR in the GTK host, state preserved) and `gtkx dev` (vite)
45
45
  - [x] **Navigation on real Adwaita widgets**: react-navigation navigators backed by `Adw.NavigationView` and `Adw.NavigationSplitView` — see below
46
46
 
47
- Verified live: `examples/hn-app` (a Hacker News reader on the Metro path), `examples/gallery` (the whole surface, 32 sections), and `examples/tasks-app` (a full GNOME task manager — a port of the [gtkx tutorial](https://gtkx.dev/tutorial/)'s Tasks app, and the platform's most demanding app so far) — 1,647 tests (unit + component tests under headless Wayland).
47
+ Verified live: `examples/hn-app` (a Hacker News reader on the Metro path), `examples/gallery` (the whole surface, 33 sections), and `examples/tasks-app` (a full GNOME task manager — a port of the [gtkx tutorial](https://gtkx.dev/tutorial/)'s Tasks app, and the platform's most demanding app so far) — 1,800 tests (unit + component tests under headless Wayland).
48
48
 
49
49
  ## Navigation is native, not redrawn
50
50
 
@@ -1,3 +1,4 @@
1
1
  export * from "./widgets.generated";
2
- export { Adw } from "../gtkx/bridge/index";
3
- export { AdwBreakpoint, AdwShortcutsItem, AdwShortcutsSection, AdwToggle, } from "../gtkx/bridge/index";
2
+ export { Adw } from "../gtkx/bridge/adw-namespace";
3
+ declare const AdwBreakpoint: (props: import("@gtkx/jsx/adw").AdwBreakpointProps) => React.ReactNode, AdwShortcutsItem: (props: import("@gtkx/jsx/adw").AdwShortcutsItemProps) => React.ReactNode, AdwShortcutsSection: (props: import("@gtkx/jsx/adw").AdwShortcutsSectionProps) => React.ReactNode, AdwToggle: (props: import("@gtkx/jsx/adw").AdwToggleProps) => React.ReactNode;
4
+ export { AdwBreakpoint, AdwShortcutsItem, AdwShortcutsSection, AdwToggle };
package/dist/adw/index.js CHANGED
@@ -13,6 +13,7 @@
13
13
  // Here, this subpath exposes primitives and react-native-gtkx/navigation
14
14
  // binds them to react-navigation. You can skip the binding entirely — drive
15
15
  // NavigationStack from useState, from your own router, from anything.
16
+ import { requireAdwJsx } from "../gtkx/bridge/adw";
16
17
  // The raw widgets, exactly as gtkx binds them — every GObject property and
17
18
  // signal, including ones added after this file was written.
18
19
  //
@@ -25,9 +26,24 @@
25
26
  // in react-native-gtkx/common is a declarative alternative, never a
26
27
  // replacement, and a standard widget must stay reachable.
27
28
  export * from "./widgets.generated";
28
- // Exported as a value: it carries both the enums you need at runtime and the
29
- // types you need for refs `useRef<Adw.NavigationView | null>(null)`.
30
- export { Adw } from "../gtkx/bridge/index";
29
+ // This whole subpath REQUIRES Adw-1 (see .claude/epics/adw-optional/001.md
30
+ // and docs/api.md) a bare re-export of an actual namespace import (see
31
+ // gtkx/bridge/adw-namespace.ts), so `Adw` keeps working exactly as it did
32
+ // before this epic: both a value (`Adw.Toast.new(title)`, `Adw.ColorScheme
33
+ // .FORCE_DARK`) and a namespace in type position (`Ref<Adw.ToastOverlay |
34
+ // null>`), in ONE import, from real apps (examples/tasks-app/tasks-nav's
35
+ // toast.tsx and window.tsx, examples/gallery's adwaita-stack.tsx) as well
36
+ // as ours. That duality does not survive being synthesized through a
37
+ // function call (tried: adw.ts's requireAdwGi() — the value comes through
38
+ // fine, but "Cannot find namespace 'Adw'" everywhere it was used as a
39
+ // type), which is why this is a re-export of a plain, eager, static import
40
+ // rather than routed through the lazy probe every other Adw value in this
41
+ // package goes through. Importing react-native-gtkx/adw without Adw-1
42
+ // throws at import time regardless — just as a build failure one line
43
+ // down (adw-namespace.ts's own `@gtkx/gi/adw` import, unresolvable without
44
+ // it) instead of a thrown Error, which is an equally loud refusal for a
45
+ // subpath that always requires Adw.
46
+ export { Adw } from "../gtkx/bridge/adw-namespace";
31
47
  // Auxiliary JSX elements that are not Adw.Widget subclasses, so the
32
48
  // generated widget surface above never sees them: a responsive breakpoint
33
49
  // (the `breakpoints` prop of AdwApplicationWindow/AdwBreakpointBin/AdwDialog
@@ -37,5 +53,6 @@ export { Adw } from "../gtkx/bridge/index";
37
53
  // to size" — createSidebarNavigator's own collapse
38
54
  // (src/navigation/sidebar.tsx) pairs AdwBreakpoint with AdwBreakpointBin
39
55
  // (a real widget, wrapped above) to scope a breakpoint to a subtree.
40
- export { AdwBreakpoint, AdwShortcutsItem, AdwShortcutsSection, AdwToggle, } from "../gtkx/bridge/index";
56
+ const { AdwBreakpoint, AdwShortcutsItem, AdwShortcutsSection, AdwToggle } = requireAdwJsx("react-native-gtkx/adw");
57
+ export { AdwBreakpoint, AdwShortcutsItem, AdwShortcutsSection, AdwToggle };
41
58
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adw/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,iEAAiE;AACjE,8DAA8D;AAC9D,yFAAyF;AACzF,4BAA4B;AAC5B,EAAE;AACF,0EAA0E;AAC1E,4EAA4E;AAC5E,EAAE;AACF,wEAAwE;AACxE,6EAA6E;AAC7E,yEAAyE;AACzE,4EAA4E;AAC5E,sEAAsE;AAEtE,2EAA2E;AAC3E,4DAA4D;AAC5D,EAAE;AACF,wEAAwE;AACxE,6EAA6E;AAC7E,yEAAyE;AACzE,mEAAmE;AACnE,6EAA6E;AAC7E,6EAA6E;AAC7E,oEAAoE;AACpE,0DAA0D;AAC1D,cAAc,qBAAqB,CAAA;AAEnC,6EAA6E;AAC7E,uEAAuE;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAE1C,oEAAoE;AACpE,0EAA0E;AAC1E,6EAA6E;AAC7E,6DAA6D;AAC7D,8DAA8D;AAC9D,yEAAyE;AACzE,mDAAmD;AACnD,yEAAyE;AACzE,qEAAqE;AACrE,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,GACV,MAAM,sBAAsB,CAAA","sourcesContent":["// react-native-gtkx/adw — libadwaita widgets as React components.\n//\n// The Adwaita half of the platform layer; its GTK counterpart is\n// react-native-gtkx/gtk, and what we wrote ourselves lives in\n// react-native-gtkx/common (NavigationStack, SlotContent, wrapReactNative). Nothing here\n// imports react-navigation.\n//\n// NAMING, one rule across both subpaths: a name carrying a `Gtk` or `Adw`\n// prefix IS that widget, as gtkx binds it. A name without a prefix is ours.\n//\n// The layering mirrors the React Native ecosystem: react-native-screens\n// exposes primitives, @react-navigation/native-stack binds them to a router.\n// Here, this subpath exposes primitives and react-native-gtkx/navigation\n// binds them to react-navigation. You can skip the binding entirely — drive\n// NavigationStack from useState, from your own router, from anything.\n\n// The raw widgets, exactly as gtkx binds them — every GObject property and\n// signal, including ones added after this file was written.\n//\n// AdwNavigationView and AdwNavigationPage are the imperative originals:\n// NavigationStack above is a declarative alternative, NOT a replacement, and\n// a standard widget must never become unreachable because we wrapped it.\n// The full Adwaita widget surface lives in a generated file: every\n// Adw.Widget subclass gtkx binds, wrapped so React Native drives it. The raw\n// AdwNavigationView and AdwNavigationPage are in there too — NavigationStack\n// in react-native-gtkx/common is a declarative alternative, never a\n// replacement, and a standard widget must stay reachable.\nexport * from \"./widgets.generated\"\n\n// Exported as a value: it carries both the enums you need at runtime and the\n// types you need for refs`useRef<Adw.NavigationView | null>(null)`.\nexport { Adw } from \"../gtkx/bridge/index\"\n\n// Auxiliary JSX elements that are not Adw.Widget subclasses, so the\n// generated widget surface above never sees them: a responsive breakpoint\n// (the `breakpoints` prop of AdwApplicationWindow/AdwBreakpointBin/AdwDialog\n// takes one of these as a child) and the two leaf elements a\n// AdwShortcutsDialog's AdwShortcutsSection is built from. See\n// docs/platform-layer.md \"Unwrapped by necessity\" and \"Two ways to react\n// to size\" — createSidebarNavigator's own collapse\n// (src/navigation/sidebar.tsx) pairs AdwBreakpoint with AdwBreakpointBin\n// (a real widget, wrapped above) to scope a breakpoint to a subtree.\nexport {\n AdwBreakpoint,\n AdwShortcutsItem,\n AdwShortcutsSection,\n AdwToggle,\n} from \"../gtkx/bridge/index\"\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adw/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,iEAAiE;AACjE,8DAA8D;AAC9D,yFAAyF;AACzF,4BAA4B;AAC5B,EAAE;AACF,0EAA0E;AAC1E,4EAA4E;AAC5E,EAAE;AACF,wEAAwE;AACxE,6EAA6E;AAC7E,yEAAyE;AACzE,4EAA4E;AAC5E,sEAAsE;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,2EAA2E;AAC3E,4DAA4D;AAC5D,EAAE;AACF,wEAAwE;AACxE,6EAA6E;AAC7E,yEAAyE;AACzE,mEAAmE;AACnE,6EAA6E;AAC7E,6EAA6E;AAC7E,oEAAoE;AACpE,0DAA0D;AAC1D,cAAc,qBAAqB,CAAA;AAEnC,2EAA2E;AAC3E,yEAAyE;AACzE,0EAA0E;AAC1E,2EAA2E;AAC3E,0EAA0E;AAC1E,yEAAyE;AACzE,0EAA0E;AAC1E,qEAAqE;AACrE,0EAA0E;AAC1E,sEAAsE;AACtE,2EAA2E;AAC3E,0EAA0E;AAC1E,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,wEAAwE;AACxE,oCAAoC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAA;AAElD,oEAAoE;AACpE,0EAA0E;AAC1E,6EAA6E;AAC7E,6DAA6D;AAC7D,8DAA8D;AAC9D,yEAAyE;AACzE,mDAAmD;AACnD,yEAAyE;AACzE,qEAAqE;AACrE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,SAAS,EAAE,GACvE,aAAa,CAAC,uBAAuB,CAAC,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,SAAS,EAAE,CAAA","sourcesContent":["// react-native-gtkx/adw — libadwaita widgets as React components.\n//\n// The Adwaita half of the platform layer; its GTK counterpart is\n// react-native-gtkx/gtk, and what we wrote ourselves lives in\n// react-native-gtkx/common (NavigationStack, SlotContent, wrapReactNative). Nothing here\n// imports react-navigation.\n//\n// NAMING, one rule across both subpaths: a name carrying a `Gtk` or `Adw`\n// prefix IS that widget, as gtkx binds it. A name without a prefix is ours.\n//\n// The layering mirrors the React Native ecosystem: react-native-screens\n// exposes primitives, @react-navigation/native-stack binds them to a router.\n// Here, this subpath exposes primitives and react-native-gtkx/navigation\n// binds them to react-navigation. You can skip the binding entirely — drive\n// NavigationStack from useState, from your own router, from anything.\nimport { requireAdwJsx } from \"../gtkx/bridge/adw\"\n\n// The raw widgets, exactly as gtkx binds them — every GObject property and\n// signal, including ones added after this file was written.\n//\n// AdwNavigationView and AdwNavigationPage are the imperative originals:\n// NavigationStack above is a declarative alternative, NOT a replacement, and\n// a standard widget must never become unreachable because we wrapped it.\n// The full Adwaita widget surface lives in a generated file: every\n// Adw.Widget subclass gtkx binds, wrapped so React Native drives it. The raw\n// AdwNavigationView and AdwNavigationPage are in there too — NavigationStack\n// in react-native-gtkx/common is a declarative alternative, never a\n// replacement, and a standard widget must stay reachable.\nexport * from \"./widgets.generated\"\n\n// This whole subpath REQUIRES Adw-1 (see .claude/epics/adw-optional/001.md\n// and docs/api.md) — a bare re-export of an actual namespace import (see\n// gtkx/bridge/adw-namespace.ts), so `Adw` keeps working exactly as it did\n// before this epic: both a value (`Adw.Toast.new(title)`, `Adw.ColorScheme\n// .FORCE_DARK`) and a namespace in type position (`Ref<Adw.ToastOverlay |\n// null>`), in ONE import, from real apps (examples/tasks-app/tasks-nav's\n// toast.tsx and window.tsx, examples/gallery's adwaita-stack.tsx) as well\n// as ours. That duality does not survive being synthesized through a\n// function call (tried: adw.ts's requireAdwGi() — the value comes through\n// fine, but \"Cannot find namespace 'Adw'\" everywhere it was used as a\n// type), which is why this is a re-export of a plain, eager, static import\n// rather than routed through the lazy probe every other Adw value in this\n// package goes through. Importing react-native-gtkx/adw without Adw-1\n// throws at import time regardless just as a build failure one line\n// down (adw-namespace.ts's own `@gtkx/gi/adw` import, unresolvable without\n// it) instead of a thrown Error, which is an equally loud refusal for a\n// subpath that always requires Adw.\nexport { Adw } from \"../gtkx/bridge/adw-namespace\"\n\n// Auxiliary JSX elements that are not Adw.Widget subclasses, so the\n// generated widget surface above never sees them: a responsive breakpoint\n// (the `breakpoints` prop of AdwApplicationWindow/AdwBreakpointBin/AdwDialog\n// takes one of these as a child) and the two leaf elements a\n// AdwShortcutsDialog's AdwShortcutsSection is built from. See\n// docs/platform-layer.md \"Unwrapped by necessity\" and \"Two ways to react\n// to size\" — createSidebarNavigator's own collapse\n// (src/navigation/sidebar.tsx) pairs AdwBreakpoint with AdwBreakpointBin\n// (a real widget, wrapped above) to scope a breakpoint to a subtree.\nconst { AdwBreakpoint, AdwShortcutsItem, AdwShortcutsSection, AdwToggle } =\n requireAdwJsx(\"react-native-gtkx/adw\")\nexport { AdwBreakpoint, AdwShortcutsItem, AdwShortcutsSection, AdwToggle }\n"]}
@@ -59,5 +59,5 @@ AdwPreferencesRow, // child-only (derives Gtk.ListBoxRow)
59
59
  AdwPreferencesWindow, // toplevel (implements GtkRoot)
60
60
  AdwSpinRow, // child-only (derives Gtk.ListBoxRow)
61
61
  AdwSwitchRow, // child-only (derives Gtk.ListBoxRow)
62
- AdwWindow, } from "../gtkx/bridge/widgets.generated";
62
+ AdwWindow, } from "../gtkx/bridge/widgets.generated.adw";
63
63
  export declare const ADW_WRAPPED_WIDGET_NAMES: readonly ["AdwAboutDialog", "AdwAlertDialog", "AdwAvatar", "AdwBanner", "AdwBin", "AdwBottomSheet", "AdwBreakpointBin", "AdwButtonContent", "AdwCarousel", "AdwCarouselIndicatorDots", "AdwCarouselIndicatorLines", "AdwClamp", "AdwClampScrollable", "AdwDialog", "AdwFlap", "AdwHeaderBar", "AdwInlineViewSwitcher", "AdwLayoutSlot", "AdwLeaflet", "AdwMultiLayoutView", "AdwNavigationSplitView", "AdwNavigationView", "AdwOverlaySplitView", "AdwPreferencesDialog", "AdwPreferencesGroup", "AdwShortcutLabel", "AdwShortcutsDialog", "AdwSidebar", "AdwSpinner", "AdwSplitButton", "AdwSqueezer", "AdwStatusPage", "AdwTabBar", "AdwTabButton", "AdwTabOverview", "AdwTabView", "AdwToastOverlay", "AdwToggleGroup", "AdwToolbarView", "AdwViewStack", "AdwViewSwitcher", "AdwViewSwitcherBar", "AdwViewSwitcherSidebar", "AdwViewSwitcherTitle", "AdwWindowTitle", "AdwWrapBox"];
@@ -10,7 +10,7 @@
10
10
  // invalid GTK rather than a convenience — exported as gtkx binds them, same
11
11
  // as the hand-picked ones were before this file existed.
12
12
  import { wrapReactNative } from "../common/widget";
13
- import { AdwAboutDialog as RawAdwAboutDialog, AdwAlertDialog as RawAdwAlertDialog, AdwAvatar as RawAdwAvatar, AdwBanner as RawAdwBanner, AdwBin as RawAdwBin, AdwBottomSheet as RawAdwBottomSheet, AdwBreakpointBin as RawAdwBreakpointBin, AdwButtonContent as RawAdwButtonContent, AdwCarousel as RawAdwCarousel, AdwCarouselIndicatorDots as RawAdwCarouselIndicatorDots, AdwCarouselIndicatorLines as RawAdwCarouselIndicatorLines, AdwClamp as RawAdwClamp, AdwClampScrollable as RawAdwClampScrollable, AdwDialog as RawAdwDialog, AdwFlap as RawAdwFlap, AdwHeaderBar as RawAdwHeaderBar, AdwInlineViewSwitcher as RawAdwInlineViewSwitcher, AdwLayoutSlot as RawAdwLayoutSlot, AdwLeaflet as RawAdwLeaflet, AdwMultiLayoutView as RawAdwMultiLayoutView, AdwNavigationSplitView as RawAdwNavigationSplitView, AdwNavigationView as RawAdwNavigationView, AdwOverlaySplitView as RawAdwOverlaySplitView, AdwPreferencesDialog as RawAdwPreferencesDialog, AdwPreferencesGroup as RawAdwPreferencesGroup, AdwShortcutLabel as RawAdwShortcutLabel, AdwShortcutsDialog as RawAdwShortcutsDialog, AdwSidebar as RawAdwSidebar, AdwSpinner as RawAdwSpinner, AdwSplitButton as RawAdwSplitButton, AdwSqueezer as RawAdwSqueezer, AdwStatusPage as RawAdwStatusPage, AdwTabBar as RawAdwTabBar, AdwTabButton as RawAdwTabButton, AdwTabOverview as RawAdwTabOverview, AdwTabView as RawAdwTabView, AdwToastOverlay as RawAdwToastOverlay, AdwToggleGroup as RawAdwToggleGroup, AdwToolbarView as RawAdwToolbarView, AdwViewStack as RawAdwViewStack, AdwViewSwitcher as RawAdwViewSwitcher, AdwViewSwitcherBar as RawAdwViewSwitcherBar, AdwViewSwitcherSidebar as RawAdwViewSwitcherSidebar, AdwViewSwitcherTitle as RawAdwViewSwitcherTitle, AdwWindowTitle as RawAdwWindowTitle, AdwWrapBox as RawAdwWrapBox, } from "../gtkx/bridge/widgets.generated";
13
+ import { AdwAboutDialog as RawAdwAboutDialog, AdwAlertDialog as RawAdwAlertDialog, AdwAvatar as RawAdwAvatar, AdwBanner as RawAdwBanner, AdwBin as RawAdwBin, AdwBottomSheet as RawAdwBottomSheet, AdwBreakpointBin as RawAdwBreakpointBin, AdwButtonContent as RawAdwButtonContent, AdwCarousel as RawAdwCarousel, AdwCarouselIndicatorDots as RawAdwCarouselIndicatorDots, AdwCarouselIndicatorLines as RawAdwCarouselIndicatorLines, AdwClamp as RawAdwClamp, AdwClampScrollable as RawAdwClampScrollable, AdwDialog as RawAdwDialog, AdwFlap as RawAdwFlap, AdwHeaderBar as RawAdwHeaderBar, AdwInlineViewSwitcher as RawAdwInlineViewSwitcher, AdwLayoutSlot as RawAdwLayoutSlot, AdwLeaflet as RawAdwLeaflet, AdwMultiLayoutView as RawAdwMultiLayoutView, AdwNavigationSplitView as RawAdwNavigationSplitView, AdwNavigationView as RawAdwNavigationView, AdwOverlaySplitView as RawAdwOverlaySplitView, AdwPreferencesDialog as RawAdwPreferencesDialog, AdwPreferencesGroup as RawAdwPreferencesGroup, AdwShortcutLabel as RawAdwShortcutLabel, AdwShortcutsDialog as RawAdwShortcutsDialog, AdwSidebar as RawAdwSidebar, AdwSpinner as RawAdwSpinner, AdwSplitButton as RawAdwSplitButton, AdwSqueezer as RawAdwSqueezer, AdwStatusPage as RawAdwStatusPage, AdwTabBar as RawAdwTabBar, AdwTabButton as RawAdwTabButton, AdwTabOverview as RawAdwTabOverview, AdwTabView as RawAdwTabView, AdwToastOverlay as RawAdwToastOverlay, AdwToggleGroup as RawAdwToggleGroup, AdwToolbarView as RawAdwToolbarView, AdwViewStack as RawAdwViewStack, AdwViewSwitcher as RawAdwViewSwitcher, AdwViewSwitcherBar as RawAdwViewSwitcherBar, AdwViewSwitcherSidebar as RawAdwViewSwitcherSidebar, AdwViewSwitcherTitle as RawAdwViewSwitcherTitle, AdwWindowTitle as RawAdwWindowTitle, AdwWrapBox as RawAdwWrapBox, } from "../gtkx/bridge/widgets.generated.adw";
14
14
  export const AdwAboutDialog = wrapReactNative(RawAdwAboutDialog, "AdwAboutDialog");
15
15
  export const AdwAlertDialog = wrapReactNative(RawAdwAlertDialog, "AdwAlertDialog");
16
16
  export const AdwAvatar = wrapReactNative(RawAdwAvatar, "AdwAvatar");
@@ -73,7 +73,7 @@ AdwPreferencesWindow, // toplevel (implements GtkRoot)
73
73
  AdwSpinRow, // child-only (derives Gtk.ListBoxRow)
74
74
  AdwSwitchRow, // child-only (derives Gtk.ListBoxRow)
75
75
  AdwWindow, // toplevel (implements GtkRoot)
76
- } from "../gtkx/bridge/widgets.generated";
76
+ } from "../gtkx/bridge/widgets.generated.adw";
77
77
  export const ADW_WRAPPED_WIDGET_NAMES = [
78
78
  "AdwAboutDialog",
79
79
  "AdwAlertDialog",
@@ -1 +1 @@
1
- {"version":3,"file":"widgets.generated.js","sourceRoot":"","sources":["../../src/adw/widgets.generated.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,0EAA0E;AAC1E,sDAAsD;AACtD,yEAAyE;AACzE,6DAA6D;AAC7D,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,sEAAsE;AACtE,4EAA4E;AAC5E,yDAAyD;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAA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ACtB,gBAAgB;IAChB,YAAY;CACJ,CAAA","sourcesContent":["// GENERATED FILE — do not edit by hand.\n// Produced by scripts/generate-widget-surface.ts. Re-run it inside the VM\n// after `npm run codegen` picks up a gtkx update; see\n// scripts/widget-surface/classification.json for the full classification\n// and .claude/epics/widget-surface/ for the rules behind it.\n//\n// Wrapped: RN layout + a GTK CSS class from the style prop, steps aside and\n// renders bare outside RN layout (see wrapReactNative in ../common/widget).\n// Raw: toplevels and child-only widgets, where a wrapper box would be\n// invalid GTK rather than a convenience — exported as gtkx binds them, same\n// as the hand-picked ones were before this file existed.\n\nimport { wrapReactNative } from \"../common/widget\"\nimport {\n AdwAboutDialog as RawAdwAboutDialog,\n AdwAlertDialog as RawAdwAlertDialog,\n AdwAvatar as RawAdwAvatar,\n AdwBanner as RawAdwBanner,\n AdwBin as RawAdwBin,\n AdwBottomSheet as RawAdwBottomSheet,\n AdwBreakpointBin as RawAdwBreakpointBin,\n AdwButtonContent as RawAdwButtonContent,\n AdwCarousel as RawAdwCarousel,\n AdwCarouselIndicatorDots as RawAdwCarouselIndicatorDots,\n AdwCarouselIndicatorLines as RawAdwCarouselIndicatorLines,\n AdwClamp as RawAdwClamp,\n AdwClampScrollable as RawAdwClampScrollable,\n AdwDialog as RawAdwDialog,\n AdwFlap as RawAdwFlap,\n AdwHeaderBar as RawAdwHeaderBar,\n AdwInlineViewSwitcher as RawAdwInlineViewSwitcher,\n AdwLayoutSlot as RawAdwLayoutSlot,\n AdwLeaflet as RawAdwLeaflet,\n AdwMultiLayoutView as RawAdwMultiLayoutView,\n AdwNavigationSplitView as RawAdwNavigationSplitView,\n AdwNavigationView as RawAdwNavigationView,\n AdwOverlaySplitView as RawAdwOverlaySplitView,\n AdwPreferencesDialog as RawAdwPreferencesDialog,\n AdwPreferencesGroup as RawAdwPreferencesGroup,\n AdwShortcutLabel as RawAdwShortcutLabel,\n AdwShortcutsDialog as RawAdwShortcutsDialog,\n AdwSidebar as RawAdwSidebar,\n AdwSpinner as RawAdwSpinner,\n AdwSplitButton as RawAdwSplitButton,\n AdwSqueezer as RawAdwSqueezer,\n AdwStatusPage as RawAdwStatusPage,\n AdwTabBar as RawAdwTabBar,\n AdwTabButton as RawAdwTabButton,\n AdwTabOverview as RawAdwTabOverview,\n AdwTabView as RawAdwTabView,\n AdwToastOverlay as RawAdwToastOverlay,\n AdwToggleGroup as RawAdwToggleGroup,\n AdwToolbarView as RawAdwToolbarView,\n AdwViewStack as RawAdwViewStack,\n AdwViewSwitcher as RawAdwViewSwitcher,\n AdwViewSwitcherBar as RawAdwViewSwitcherBar,\n AdwViewSwitcherSidebar as RawAdwViewSwitcherSidebar,\n AdwViewSwitcherTitle as RawAdwViewSwitcherTitle,\n AdwWindowTitle as RawAdwWindowTitle,\n AdwWrapBox as RawAdwWrapBox,\n} from \"../gtkx/bridge/widgets.generated\"\n\nexport const AdwAboutDialog = wrapReactNative(\n RawAdwAboutDialog,\n \"AdwAboutDialog\",\n)\nexport const AdwAlertDialog = wrapReactNative(\n RawAdwAlertDialog,\n \"AdwAlertDialog\",\n)\nexport const AdwAvatar = wrapReactNative(RawAdwAvatar, \"AdwAvatar\")\nexport const AdwBanner = wrapReactNative(RawAdwBanner, \"AdwBanner\")\nexport const AdwBin = wrapReactNative(RawAdwBin, \"AdwBin\")\nexport const AdwBottomSheet = wrapReactNative(\n RawAdwBottomSheet,\n \"AdwBottomSheet\",\n)\nexport const AdwBreakpointBin = wrapReactNative(\n RawAdwBreakpointBin,\n \"AdwBreakpointBin\",\n)\nexport const AdwButtonContent = wrapReactNative(\n RawAdwButtonContent,\n \"AdwButtonContent\",\n)\nexport const AdwCarousel = wrapReactNative(RawAdwCarousel, \"AdwCarousel\")\nexport const AdwCarouselIndicatorDots = wrapReactNative(\n RawAdwCarouselIndicatorDots,\n \"AdwCarouselIndicatorDots\",\n)\nexport const AdwCarouselIndicatorLines = wrapReactNative(\n RawAdwCarouselIndicatorLines,\n \"AdwCarouselIndicatorLines\",\n)\nexport const AdwClamp = wrapReactNative(RawAdwClamp, \"AdwClamp\")\nexport const AdwClampScrollable = wrapReactNative(\n RawAdwClampScrollable,\n \"AdwClampScrollable\",\n)\nexport const AdwDialog = wrapReactNative(RawAdwDialog, \"AdwDialog\")\nexport const AdwFlap = wrapReactNative(RawAdwFlap, \"AdwFlap\")\nexport const AdwHeaderBar = wrapReactNative(RawAdwHeaderBar, \"AdwHeaderBar\")\nexport const AdwInlineViewSwitcher = wrapReactNative(\n RawAdwInlineViewSwitcher,\n \"AdwInlineViewSwitcher\",\n)\nexport const AdwLayoutSlot = wrapReactNative(RawAdwLayoutSlot, \"AdwLayoutSlot\")\nexport const AdwLeaflet = wrapReactNative(RawAdwLeaflet, \"AdwLeaflet\")\nexport const AdwMultiLayoutView = wrapReactNative(\n RawAdwMultiLayoutView,\n \"AdwMultiLayoutView\",\n)\nexport const AdwNavigationSplitView = wrapReactNative(\n RawAdwNavigationSplitView,\n \"AdwNavigationSplitView\",\n)\nexport const AdwNavigationView = wrapReactNative(\n RawAdwNavigationView,\n \"AdwNavigationView\",\n)\nexport const AdwOverlaySplitView = wrapReactNative(\n RawAdwOverlaySplitView,\n \"AdwOverlaySplitView\",\n)\nexport const AdwPreferencesDialog = wrapReactNative(\n RawAdwPreferencesDialog,\n \"AdwPreferencesDialog\",\n)\nexport const AdwPreferencesGroup = wrapReactNative(\n RawAdwPreferencesGroup,\n \"AdwPreferencesGroup\",\n)\nexport const AdwShortcutLabel = wrapReactNative(\n RawAdwShortcutLabel,\n \"AdwShortcutLabel\",\n)\nexport const AdwShortcutsDialog = wrapReactNative(\n RawAdwShortcutsDialog,\n \"AdwShortcutsDialog\",\n)\nexport const AdwSidebar = wrapReactNative(RawAdwSidebar, \"AdwSidebar\")\nexport const AdwSpinner = wrapReactNative(RawAdwSpinner, \"AdwSpinner\")\nexport const AdwSplitButton = wrapReactNative(\n RawAdwSplitButton,\n \"AdwSplitButton\",\n)\nexport const AdwSqueezer = wrapReactNative(RawAdwSqueezer, \"AdwSqueezer\")\nexport const AdwStatusPage = wrapReactNative(RawAdwStatusPage, \"AdwStatusPage\")\nexport const AdwTabBar = wrapReactNative(RawAdwTabBar, \"AdwTabBar\")\nexport const AdwTabButton = wrapReactNative(RawAdwTabButton, \"AdwTabButton\")\nexport const AdwTabOverview = wrapReactNative(\n RawAdwTabOverview,\n \"AdwTabOverview\",\n)\nexport const AdwTabView = wrapReactNative(RawAdwTabView, \"AdwTabView\")\nexport const AdwToastOverlay = wrapReactNative(\n RawAdwToastOverlay,\n \"AdwToastOverlay\",\n)\nexport const AdwToggleGroup = wrapReactNative(\n RawAdwToggleGroup,\n \"AdwToggleGroup\",\n)\nexport const AdwToolbarView = wrapReactNative(\n RawAdwToolbarView,\n \"AdwToolbarView\",\n)\nexport const AdwViewStack = wrapReactNative(RawAdwViewStack, \"AdwViewStack\")\nexport const AdwViewSwitcher = wrapReactNative(\n RawAdwViewSwitcher,\n \"AdwViewSwitcher\",\n)\nexport const AdwViewSwitcherBar = wrapReactNative(\n RawAdwViewSwitcherBar,\n \"AdwViewSwitcherBar\",\n)\nexport const AdwViewSwitcherSidebar = wrapReactNative(\n RawAdwViewSwitcherSidebar,\n \"AdwViewSwitcherSidebar\",\n)\nexport const AdwViewSwitcherTitle = wrapReactNative(\n RawAdwViewSwitcherTitle,\n \"AdwViewSwitcherTitle\",\n)\nexport const AdwWindowTitle = wrapReactNative(\n RawAdwWindowTitle,\n \"AdwWindowTitle\",\n)\nexport const AdwWrapBox = wrapReactNative(RawAdwWrapBox, \"AdwWrapBox\")\n\nexport {\n AdwAboutWindow, // toplevel (implements GtkRoot)\n AdwActionRow, // child-only (derives Gtk.ListBoxRow)\n AdwApplicationWindow, // toplevel (implements GtkRoot)\n AdwButtonRow, // child-only (derives Gtk.ListBoxRow)\n AdwComboRow, // child-only (derives Gtk.ListBoxRow)\n AdwEntryRow, // child-only (derives Gtk.ListBoxRow)\n AdwExpanderRow, // child-only (derives Gtk.ListBoxRow)\n AdwMessageDialog, // toplevel (implements GtkRoot)\n AdwNavigationPage, // child-only (denylist — see scripts/widget-surface/classify.ts)\n AdwPasswordEntryRow, // child-only (derives Gtk.ListBoxRow)\n AdwPreferencesPage, // child-only (denylist — see scripts/widget-surface/classify.ts)\n AdwPreferencesRow, // child-only (derives Gtk.ListBoxRow)\n AdwPreferencesWindow, // toplevel (implements GtkRoot)\n AdwSpinRow, // child-only (derives Gtk.ListBoxRow)\n AdwSwitchRow, // child-only (derives Gtk.ListBoxRow)\n AdwWindow, // toplevel (implements GtkRoot)\n} from \"../gtkx/bridge/widgets.generated\"\n\nexport const ADW_WRAPPED_WIDGET_NAMES = [\n \"AdwAboutDialog\",\n \"AdwAlertDialog\",\n \"AdwAvatar\",\n \"AdwBanner\",\n \"AdwBin\",\n \"AdwBottomSheet\",\n \"AdwBreakpointBin\",\n \"AdwButtonContent\",\n \"AdwCarousel\",\n \"AdwCarouselIndicatorDots\",\n \"AdwCarouselIndicatorLines\",\n \"AdwClamp\",\n \"AdwClampScrollable\",\n \"AdwDialog\",\n \"AdwFlap\",\n \"AdwHeaderBar\",\n \"AdwInlineViewSwitcher\",\n \"AdwLayoutSlot\",\n \"AdwLeaflet\",\n \"AdwMultiLayoutView\",\n \"AdwNavigationSplitView\",\n \"AdwNavigationView\",\n \"AdwOverlaySplitView\",\n \"AdwPreferencesDialog\",\n \"AdwPreferencesGroup\",\n \"AdwShortcutLabel\",\n \"AdwShortcutsDialog\",\n \"AdwSidebar\",\n \"AdwSpinner\",\n \"AdwSplitButton\",\n \"AdwSqueezer\",\n \"AdwStatusPage\",\n \"AdwTabBar\",\n \"AdwTabButton\",\n \"AdwTabOverview\",\n \"AdwTabView\",\n \"AdwToastOverlay\",\n \"AdwToggleGroup\",\n \"AdwToolbarView\",\n \"AdwViewStack\",\n \"AdwViewSwitcher\",\n \"AdwViewSwitcherBar\",\n \"AdwViewSwitcherSidebar\",\n \"AdwViewSwitcherTitle\",\n \"AdwWindowTitle\",\n \"AdwWrapBox\",\n] as const\n"]}
1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qBAAqB;IACrB,sBAAsB;IACtB,qBAAqB;IACrB,kBAAkB;IAClB,oBAAoB;IACpB,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,aAAa;IACb,eAAe;IACf,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,YAAY;IACZ,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,iBAAiB;IACjB,oBAAoB;IACpB,wBAAwB;IACxB,sBAAsB;IACtB,gBAAgB;IAChB,YAAY;CACJ,CAAA","sourcesContent":["// GENERATED FILE — do not edit by hand.\n// Produced by scripts/generate-widget-surface.ts. Re-run it inside the VM\n// after `npm run codegen` picks up a gtkx update; see\n// scripts/widget-surface/classification.json for the full classification\n// and .claude/epics/widget-surface/ for the rules behind it.\n//\n// Wrapped: RN layout + a GTK CSS class from the style prop, steps aside and\n// renders bare outside RN layout (see wrapReactNative in ../common/widget).\n// Raw: toplevels and child-only widgets, where a wrapper box would be\n// invalid GTK rather than a convenience — exported as gtkx binds them, same\n// as the hand-picked ones were before this file existed.\n\nimport { wrapReactNative } from \"../common/widget\"\nimport {\n AdwAboutDialog as RawAdwAboutDialog,\n AdwAlertDialog as RawAdwAlertDialog,\n AdwAvatar as RawAdwAvatar,\n AdwBanner as RawAdwBanner,\n AdwBin as RawAdwBin,\n AdwBottomSheet as RawAdwBottomSheet,\n AdwBreakpointBin as RawAdwBreakpointBin,\n AdwButtonContent as RawAdwButtonContent,\n AdwCarousel as RawAdwCarousel,\n AdwCarouselIndicatorDots as RawAdwCarouselIndicatorDots,\n AdwCarouselIndicatorLines as RawAdwCarouselIndicatorLines,\n AdwClamp as RawAdwClamp,\n AdwClampScrollable as RawAdwClampScrollable,\n AdwDialog as RawAdwDialog,\n AdwFlap as RawAdwFlap,\n AdwHeaderBar as RawAdwHeaderBar,\n AdwInlineViewSwitcher as RawAdwInlineViewSwitcher,\n AdwLayoutSlot as RawAdwLayoutSlot,\n AdwLeaflet as RawAdwLeaflet,\n AdwMultiLayoutView as RawAdwMultiLayoutView,\n AdwNavigationSplitView as RawAdwNavigationSplitView,\n AdwNavigationView as RawAdwNavigationView,\n AdwOverlaySplitView as RawAdwOverlaySplitView,\n AdwPreferencesDialog as RawAdwPreferencesDialog,\n AdwPreferencesGroup as RawAdwPreferencesGroup,\n AdwShortcutLabel as RawAdwShortcutLabel,\n AdwShortcutsDialog as RawAdwShortcutsDialog,\n AdwSidebar as RawAdwSidebar,\n AdwSpinner as RawAdwSpinner,\n AdwSplitButton as RawAdwSplitButton,\n AdwSqueezer as RawAdwSqueezer,\n AdwStatusPage as RawAdwStatusPage,\n AdwTabBar as RawAdwTabBar,\n AdwTabButton as RawAdwTabButton,\n AdwTabOverview as RawAdwTabOverview,\n AdwTabView as RawAdwTabView,\n AdwToastOverlay as RawAdwToastOverlay,\n AdwToggleGroup as RawAdwToggleGroup,\n AdwToolbarView as RawAdwToolbarView,\n AdwViewStack as RawAdwViewStack,\n AdwViewSwitcher as RawAdwViewSwitcher,\n AdwViewSwitcherBar as RawAdwViewSwitcherBar,\n AdwViewSwitcherSidebar as RawAdwViewSwitcherSidebar,\n AdwViewSwitcherTitle as RawAdwViewSwitcherTitle,\n AdwWindowTitle as RawAdwWindowTitle,\n AdwWrapBox as RawAdwWrapBox,\n} from \"../gtkx/bridge/widgets.generated.adw\"\n\nexport const AdwAboutDialog = wrapReactNative(\n RawAdwAboutDialog,\n \"AdwAboutDialog\",\n)\nexport const AdwAlertDialog = wrapReactNative(\n RawAdwAlertDialog,\n \"AdwAlertDialog\",\n)\nexport const AdwAvatar = wrapReactNative(RawAdwAvatar, \"AdwAvatar\")\nexport const AdwBanner = wrapReactNative(RawAdwBanner, \"AdwBanner\")\nexport const AdwBin = wrapReactNative(RawAdwBin, \"AdwBin\")\nexport const AdwBottomSheet = wrapReactNative(\n RawAdwBottomSheet,\n \"AdwBottomSheet\",\n)\nexport const AdwBreakpointBin = wrapReactNative(\n RawAdwBreakpointBin,\n \"AdwBreakpointBin\",\n)\nexport const AdwButtonContent = wrapReactNative(\n RawAdwButtonContent,\n \"AdwButtonContent\",\n)\nexport const AdwCarousel = wrapReactNative(RawAdwCarousel, \"AdwCarousel\")\nexport const AdwCarouselIndicatorDots = wrapReactNative(\n RawAdwCarouselIndicatorDots,\n \"AdwCarouselIndicatorDots\",\n)\nexport const AdwCarouselIndicatorLines = wrapReactNative(\n RawAdwCarouselIndicatorLines,\n \"AdwCarouselIndicatorLines\",\n)\nexport const AdwClamp = wrapReactNative(RawAdwClamp, \"AdwClamp\")\nexport const AdwClampScrollable = wrapReactNative(\n RawAdwClampScrollable,\n \"AdwClampScrollable\",\n)\nexport const AdwDialog = wrapReactNative(RawAdwDialog, \"AdwDialog\")\nexport const AdwFlap = wrapReactNative(RawAdwFlap, \"AdwFlap\")\nexport const AdwHeaderBar = wrapReactNative(RawAdwHeaderBar, \"AdwHeaderBar\")\nexport const AdwInlineViewSwitcher = wrapReactNative(\n RawAdwInlineViewSwitcher,\n \"AdwInlineViewSwitcher\",\n)\nexport const AdwLayoutSlot = wrapReactNative(RawAdwLayoutSlot, \"AdwLayoutSlot\")\nexport const AdwLeaflet = wrapReactNative(RawAdwLeaflet, \"AdwLeaflet\")\nexport const AdwMultiLayoutView = wrapReactNative(\n RawAdwMultiLayoutView,\n \"AdwMultiLayoutView\",\n)\nexport const AdwNavigationSplitView = wrapReactNative(\n RawAdwNavigationSplitView,\n \"AdwNavigationSplitView\",\n)\nexport const AdwNavigationView = wrapReactNative(\n RawAdwNavigationView,\n \"AdwNavigationView\",\n)\nexport const AdwOverlaySplitView = wrapReactNative(\n RawAdwOverlaySplitView,\n \"AdwOverlaySplitView\",\n)\nexport const AdwPreferencesDialog = wrapReactNative(\n RawAdwPreferencesDialog,\n \"AdwPreferencesDialog\",\n)\nexport const AdwPreferencesGroup = wrapReactNative(\n RawAdwPreferencesGroup,\n \"AdwPreferencesGroup\",\n)\nexport const AdwShortcutLabel = wrapReactNative(\n RawAdwShortcutLabel,\n \"AdwShortcutLabel\",\n)\nexport const AdwShortcutsDialog = wrapReactNative(\n RawAdwShortcutsDialog,\n \"AdwShortcutsDialog\",\n)\nexport const AdwSidebar = wrapReactNative(RawAdwSidebar, \"AdwSidebar\")\nexport const AdwSpinner = wrapReactNative(RawAdwSpinner, \"AdwSpinner\")\nexport const AdwSplitButton = wrapReactNative(\n RawAdwSplitButton,\n \"AdwSplitButton\",\n)\nexport const AdwSqueezer = wrapReactNative(RawAdwSqueezer, \"AdwSqueezer\")\nexport const AdwStatusPage = wrapReactNative(RawAdwStatusPage, \"AdwStatusPage\")\nexport const AdwTabBar = wrapReactNative(RawAdwTabBar, \"AdwTabBar\")\nexport const AdwTabButton = wrapReactNative(RawAdwTabButton, \"AdwTabButton\")\nexport const AdwTabOverview = wrapReactNative(\n RawAdwTabOverview,\n \"AdwTabOverview\",\n)\nexport const AdwTabView = wrapReactNative(RawAdwTabView, \"AdwTabView\")\nexport const AdwToastOverlay = wrapReactNative(\n RawAdwToastOverlay,\n \"AdwToastOverlay\",\n)\nexport const AdwToggleGroup = wrapReactNative(\n RawAdwToggleGroup,\n \"AdwToggleGroup\",\n)\nexport const AdwToolbarView = wrapReactNative(\n RawAdwToolbarView,\n \"AdwToolbarView\",\n)\nexport const AdwViewStack = wrapReactNative(RawAdwViewStack, \"AdwViewStack\")\nexport const AdwViewSwitcher = wrapReactNative(\n RawAdwViewSwitcher,\n \"AdwViewSwitcher\",\n)\nexport const AdwViewSwitcherBar = wrapReactNative(\n RawAdwViewSwitcherBar,\n \"AdwViewSwitcherBar\",\n)\nexport const AdwViewSwitcherSidebar = wrapReactNative(\n RawAdwViewSwitcherSidebar,\n \"AdwViewSwitcherSidebar\",\n)\nexport const AdwViewSwitcherTitle = wrapReactNative(\n RawAdwViewSwitcherTitle,\n \"AdwViewSwitcherTitle\",\n)\nexport const AdwWindowTitle = wrapReactNative(\n RawAdwWindowTitle,\n \"AdwWindowTitle\",\n)\nexport const AdwWrapBox = wrapReactNative(RawAdwWrapBox, \"AdwWrapBox\")\n\nexport {\n AdwAboutWindow, // toplevel (implements GtkRoot)\n AdwActionRow, // child-only (derives Gtk.ListBoxRow)\n AdwApplicationWindow, // toplevel (implements GtkRoot)\n AdwButtonRow, // child-only (derives Gtk.ListBoxRow)\n AdwComboRow, // child-only (derives Gtk.ListBoxRow)\n AdwEntryRow, // child-only (derives Gtk.ListBoxRow)\n AdwExpanderRow, // child-only (derives Gtk.ListBoxRow)\n AdwMessageDialog, // toplevel (implements GtkRoot)\n AdwNavigationPage, // child-only (denylist — see scripts/widget-surface/classify.ts)\n AdwPasswordEntryRow, // child-only (derives Gtk.ListBoxRow)\n AdwPreferencesPage, // child-only (denylist — see scripts/widget-surface/classify.ts)\n AdwPreferencesRow, // child-only (derives Gtk.ListBoxRow)\n AdwPreferencesWindow, // toplevel (implements GtkRoot)\n AdwSpinRow, // child-only (derives Gtk.ListBoxRow)\n AdwSwitchRow, // child-only (derives Gtk.ListBoxRow)\n AdwWindow, // toplevel (implements GtkRoot)\n} from \"../gtkx/bridge/widgets.generated.adw\"\n\nexport const ADW_WRAPPED_WIDGET_NAMES = [\n \"AdwAboutDialog\",\n \"AdwAlertDialog\",\n \"AdwAvatar\",\n \"AdwBanner\",\n \"AdwBin\",\n \"AdwBottomSheet\",\n \"AdwBreakpointBin\",\n \"AdwButtonContent\",\n \"AdwCarousel\",\n \"AdwCarouselIndicatorDots\",\n \"AdwCarouselIndicatorLines\",\n \"AdwClamp\",\n \"AdwClampScrollable\",\n \"AdwDialog\",\n \"AdwFlap\",\n \"AdwHeaderBar\",\n \"AdwInlineViewSwitcher\",\n \"AdwLayoutSlot\",\n \"AdwLeaflet\",\n \"AdwMultiLayoutView\",\n \"AdwNavigationSplitView\",\n \"AdwNavigationView\",\n \"AdwOverlaySplitView\",\n \"AdwPreferencesDialog\",\n \"AdwPreferencesGroup\",\n \"AdwShortcutLabel\",\n \"AdwShortcutsDialog\",\n \"AdwSidebar\",\n \"AdwSpinner\",\n \"AdwSplitButton\",\n \"AdwSqueezer\",\n \"AdwStatusPage\",\n \"AdwTabBar\",\n \"AdwTabButton\",\n \"AdwTabOverview\",\n \"AdwTabView\",\n \"AdwToastOverlay\",\n \"AdwToggleGroup\",\n \"AdwToolbarView\",\n \"AdwViewStack\",\n \"AdwViewSwitcher\",\n \"AdwViewSwitcherBar\",\n \"AdwViewSwitcherSidebar\",\n \"AdwViewSwitcherTitle\",\n \"AdwWindowTitle\",\n \"AdwWrapBox\",\n] as const\n"]}
@@ -1,3 +1,4 @@
1
+ import type { AnimatedEventConfig, EventMapping } from "./event";
1
2
  import type { CompositeAnimation, FrameScheduler, LoopConfig, ParallelConfig, SpringConfig, TimingConfig } from "./types";
2
3
  import { AnimatedValue } from "./value";
3
4
  import { AnimatedValueXY } from "./value-xy";
@@ -10,5 +11,6 @@ export type AnimatedApi = {
10
11
  parallel(animations: CompositeAnimation[], config?: ParallelConfig): CompositeAnimation;
11
12
  delay(ms: number): CompositeAnimation;
12
13
  loop(animation: CompositeAnimation, config?: LoopConfig): CompositeAnimation;
14
+ event(argMapping: readonly (EventMapping | null | undefined)[], config?: AnimatedEventConfig): (...args: unknown[]) => void;
13
15
  };
14
16
  export declare const createAnimated: (scheduler: FrameScheduler) => AnimatedApi;
@@ -2,6 +2,7 @@
2
2
  // passes a scheduler backed by the frame clock;
3
3
  // tests pass a manual scheduler and drive frames by hand.
4
4
  import { createDelay, loop, parallel, sequence } from "./composite";
5
+ import { createAnimatedEvent } from "./event";
5
6
  import { createSpring } from "./spring";
6
7
  import { createTiming } from "./timing";
7
8
  import { AnimatedValue } from "./value";
@@ -15,5 +16,6 @@ export const createAnimated = (scheduler) => ({
15
16
  parallel,
16
17
  delay: (ms) => createDelay(scheduler, ms),
17
18
  loop,
19
+ event: createAnimatedEvent,
18
20
  });
19
21
  //# sourceMappingURL=create-animated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-animated.js","sourceRoot":"","sources":["../../src/animated/create-animated.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,gDAAgD;AAChD,0DAA0D;AAE1D,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AASvC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAgB5C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAyB,EAAe,EAAE,CAAC,CAAC;IACzE,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,eAAe;IACxB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC;IACjE,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC;IACjE,QAAQ;IACR,QAAQ;IACR,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,CAAC;IACzC,IAAI;CACL,CAAC,CAAA","sourcesContent":["// Factory wiring the frame driver into the whole Animated API. The GTK side\n// passes a scheduler backed by the frame clock;\n// tests pass a manual scheduler and drive frames by hand.\n\nimport { createDelay, loop, parallel, sequence } from \"./composite\"\nimport { createSpring } from \"./spring\"\nimport { createTiming } from \"./timing\"\nimport type {\n CompositeAnimation,\n FrameScheduler,\n LoopConfig,\n ParallelConfig,\n SpringConfig,\n TimingConfig,\n} from \"./types\"\nimport { AnimatedValue } from \"./value\"\nimport { AnimatedValueXY } from \"./value-xy\"\n\nexport type AnimatedApi = {\n Value: typeof AnimatedValue\n ValueXY: typeof AnimatedValueXY\n timing(value: AnimatedValue, config: TimingConfig): CompositeAnimation\n spring(value: AnimatedValue, config: SpringConfig): CompositeAnimation\n sequence(animations: CompositeAnimation[]): CompositeAnimation\n parallel(\n animations: CompositeAnimation[],\n config?: ParallelConfig,\n ): CompositeAnimation\n delay(ms: number): CompositeAnimation\n loop(animation: CompositeAnimation, config?: LoopConfig): CompositeAnimation\n}\n\nexport const createAnimated = (scheduler: FrameScheduler): AnimatedApi => ({\n Value: AnimatedValue,\n ValueXY: AnimatedValueXY,\n timing: (value, config) => createTiming(scheduler, value, config),\n spring: (value, config) => createSpring(scheduler, value, config),\n sequence,\n parallel,\n delay: (ms) => createDelay(scheduler, ms),\n loop,\n})\n"]}
1
+ {"version":3,"file":"create-animated.js","sourceRoot":"","sources":["../../src/animated/create-animated.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,gDAAgD;AAChD,0DAA0D;AAE1D,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AASvC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAoB5C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAyB,EAAe,EAAE,CAAC,CAAC;IACzE,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,eAAe;IACxB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC;IACjE,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC;IACjE,QAAQ;IACR,QAAQ;IACR,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,CAAC;IACzC,IAAI;IACJ,KAAK,EAAE,mBAAmB;CAC3B,CAAC,CAAA","sourcesContent":["// Factory wiring the frame driver into the whole Animated API. The GTK side\n// passes a scheduler backed by the frame clock;\n// tests pass a manual scheduler and drive frames by hand.\n\nimport { createDelay, loop, parallel, sequence } from \"./composite\"\nimport { createAnimatedEvent } from \"./event\"\nimport type { AnimatedEventConfig, EventMapping } from \"./event\"\nimport { createSpring } from \"./spring\"\nimport { createTiming } from \"./timing\"\nimport type {\n CompositeAnimation,\n FrameScheduler,\n LoopConfig,\n ParallelConfig,\n SpringConfig,\n TimingConfig,\n} from \"./types\"\nimport { AnimatedValue } from \"./value\"\nimport { AnimatedValueXY } from \"./value-xy\"\n\nexport type AnimatedApi = {\n Value: typeof AnimatedValue\n ValueXY: typeof AnimatedValueXY\n timing(value: AnimatedValue, config: TimingConfig): CompositeAnimation\n spring(value: AnimatedValue, config: SpringConfig): CompositeAnimation\n sequence(animations: CompositeAnimation[]): CompositeAnimation\n parallel(\n animations: CompositeAnimation[],\n config?: ParallelConfig,\n ): CompositeAnimation\n delay(ms: number): CompositeAnimation\n loop(animation: CompositeAnimation, config?: LoopConfig): CompositeAnimation\n event(\n argMapping: readonly (EventMapping | null | undefined)[],\n config?: AnimatedEventConfig,\n ): (...args: unknown[]) => void\n}\n\nexport const createAnimated = (scheduler: FrameScheduler): AnimatedApi => ({\n Value: AnimatedValue,\n ValueXY: AnimatedValueXY,\n timing: (value, config) => createTiming(scheduler, value, config),\n spring: (value, config) => createSpring(scheduler, value, config),\n sequence,\n parallel,\n delay: (ms) => createDelay(scheduler, ms),\n loop,\n event: createAnimatedEvent,\n})\n"]}
@@ -0,0 +1,15 @@
1
+ import { AnimatedValue } from "./value";
2
+ import { AnimatedValueXY } from "./value-xy";
3
+ export type EventMapping = {
4
+ [key: string]: EventMapping | null | undefined;
5
+ } | AnimatedValue | AnimatedValueXY;
6
+ export type AnimatedEventConfig = {
7
+ listener?: (...args: never[]) => void;
8
+ useNativeDriver?: boolean;
9
+ };
10
+ /**
11
+ * `Animated.event(argMapping, config?)`. Returns a plain callback — assign
12
+ * it directly to `ScrollView.onScroll`, to `onPanResponderMove`, or to any
13
+ * other RN event prop whose argument shape `argMapping` mirrors.
14
+ */
15
+ export declare const createAnimatedEvent: (argMapping: readonly (EventMapping | null | undefined)[], config?: AnimatedEventConfig) => ((...args: unknown[]) => void);
@@ -0,0 +1,80 @@
1
+ // Animated.event: the arg-mapping traversal RN's AnimatedEvent runs on every
2
+ // callback invocation, transcribed from
3
+ // node_modules/react-native/Libraries/Animated/AnimatedEvent.js —
4
+ // `__getHandler`'s NON-native branch, which is the only branch this platform
5
+ // ever needs. Upstream's native branch exists to hand a view tag, an event
6
+ // name and a serialized path to a native module that patches the animated
7
+ // value from the native thread, bypassing JS entirely; there is no such
8
+ // native side here (see native-driver.ts), so `Animated.event` always
9
+ // returns the plain JS callback (upstream's `eventImpl` does the same thing
10
+ // whenever `!animatedEvent.__isNative` — this platform's `__isNative` is
11
+ // simply always false).
12
+ //
13
+ // argMapping is POSITIONAL over the callback's own arguments — not always
14
+ // "the event": a `ScrollView.onScroll` handler takes one argument, so
15
+ // `[{ nativeEvent: { contentOffset: { y: scrollY } } }]` maps it; a
16
+ // `PanResponder.onPanResponderMove` handler takes two,
17
+ // `(event, gestureState)`, and a drag reads the SECOND one —
18
+ // `[null, { dx: pan.x, dy: pan.y }]` — leaving the first argument's slot
19
+ // `null` (RN supports mapping either argument; this is the one PanResponder
20
+ // actually uses in every example in the wild). A `null` entry, and anything
21
+ // past the end of `argMapping`, is simply never traversed.
22
+ //
23
+ // A leaf that is an Animated.Value gets `setValue()`'d with the number found
24
+ // at the same path in the real argument; an Animated.ValueXY recurses into
25
+ // its own `x`/`y`. A missing path — the real argument genuinely has nothing
26
+ // at that key — resolves to `undefined` and is silently skipped, AT ANY
27
+ // DEPTH. That widening is deliberate and is the one place this
28
+ // reimplementation departs from the source it is transcribed from: upstream
29
+ // indexes the missing object directly (`recEvt[mappingKey]`), which throws
30
+ // one level up from a leaf rather than at it — a mapping that reaches for
31
+ // `contentSize.height` against an event shape that happens not to carry a
32
+ // `contentSize` crashes upstream and does not here.
33
+ import { warnNativeDriverIgnored } from "./native-driver";
34
+ import { AnimatedValue } from "./value";
35
+ import { AnimatedValueXY } from "./value-xy";
36
+ const traverse = (mapping, value) => {
37
+ if (mapping instanceof AnimatedValue) {
38
+ if (typeof value === "number") {
39
+ mapping.setValue(value);
40
+ }
41
+ return;
42
+ }
43
+ if (mapping instanceof AnimatedValueXY) {
44
+ if (value !== null && typeof value === "object") {
45
+ const record = value;
46
+ traverse(mapping.x, record.x);
47
+ traverse(mapping.y, record.y);
48
+ }
49
+ return;
50
+ }
51
+ if (mapping !== null && typeof mapping === "object") {
52
+ // A missing path in the real argument resolves every key under it to
53
+ // `undefined` rather than throwing — see the file header.
54
+ const record = value;
55
+ for (const key of Object.keys(mapping)) {
56
+ traverse(mapping[key], record?.[key]);
57
+ }
58
+ }
59
+ };
60
+ /**
61
+ * `Animated.event(argMapping, config?)`. Returns a plain callback — assign
62
+ * it directly to `ScrollView.onScroll`, to `onPanResponderMove`, or to any
63
+ * other RN event prop whose argument shape `argMapping` mirrors.
64
+ */
65
+ export const createAnimatedEvent = (argMapping, config = {}) => {
66
+ if (config.useNativeDriver) {
67
+ warnNativeDriverIgnored();
68
+ }
69
+ const { listener } = config;
70
+ return (...args) => {
71
+ argMapping.forEach((mapping, index) => {
72
+ traverse(mapping, args[index]);
73
+ });
74
+ // `never[]` is unconstructible from real values on purpose (see the
75
+ // config type above) — this is the one place that trades back for the
76
+ // ability to actually call the listener with what was received.
77
+ listener?.(...args);
78
+ };
79
+ };
80
+ //# sourceMappingURL=event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/animated/event.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,wCAAwC;AACxC,kEAAkE;AAClE,6EAA6E;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0DAA0D;QAC1D,MAAM,MAAM,GAAG,KAAmD,CAAA;QAClE,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YACvC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;QACvC,CAAC;IACH,CAAC;AACH,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,UAAwD,EACxD,SAA8B,EAAE,EACA,EAAE;IAClC,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3B,uBAAuB,EAAE,CAAA;IAC3B,CAAC;IACD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAA;IAE3B,OAAO,CAAC,GAAG,IAAe,EAAQ,EAAE;QAClC,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;YACpC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;QAChC,CAAC,CAAC,CAAA;QACF,oEAAoE;QACpE,sEAAsE;QACtE,gEAAgE;QAChE,QAAQ,EAAE,CAAC,GAAI,IAAgB,CAAC,CAAA;IAClC,CAAC,CAAA;AACH,CAAC,CAAA","sourcesContent":["// Animated.event: the arg-mapping traversal RN's AnimatedEvent runs on every\n// callback invocation, transcribed from\n// node_modules/react-native/Libraries/Animated/AnimatedEvent.js —\n// `__getHandler`'s NON-native branch, which is the only branch this platform\n// ever needs. Upstream's native branch exists to hand a view tag, an event\n// name and a serialized path to a native module that patches the animated\n// value from the native thread, bypassing JS entirely; there is no such\n// native side here (see native-driver.ts), so `Animated.event` always\n// returns the plain JS callback (upstream's `eventImpl` does the same thing\n// whenever `!animatedEvent.__isNative` — this platform's `__isNative` is\n// simply always false).\n//\n// argMapping is POSITIONAL over the callback's own arguments — not always\n// \"the event\": a `ScrollView.onScroll` handler takes one argument, so\n// `[{ nativeEvent: { contentOffset: { y: scrollY } } }]` maps it; a\n// `PanResponder.onPanResponderMove` handler takes two,\n// `(event, gestureState)`, and a drag reads the SECOND one —\n// `[null, { dx: pan.x, dy: pan.y }]` — leaving the first argument's slot\n// `null` (RN supports mapping either argument; this is the one PanResponder\n// actually uses in every example in the wild). A `null` entry, and anything\n// past the end of `argMapping`, is simply never traversed.\n//\n// A leaf that is an Animated.Value gets `setValue()`'d with the number found\n// at the same path in the real argument; an Animated.ValueXY recurses into\n// its own `x`/`y`. A missing path — the real argument genuinely has nothing\n// at that key — resolves to `undefined` and is silently skipped, AT ANY\n// DEPTH. That widening is deliberate and is the one place this\n// reimplementation departs from the source it is transcribed from: upstream\n// indexes the missing object directly (`recEvt[mappingKey]`), which throws\n// one level up from a leaf rather than at it — a mapping that reaches for\n// `contentSize.height` against an event shape that happens not to carry a\n// `contentSize` crashes upstream and does not here.\nimport { warnNativeDriverIgnored } from \"./native-driver\"\nimport { AnimatedValue } from \"./value\"\nimport { AnimatedValueXY } from \"./value-xy\"\n\n// RN's `Mapping` type (AnimatedEvent.js), transcribed: a leaf is an\n// Animated.Value/ValueXY, anything else recurses one key at a time.\nexport type EventMapping =\n | { [key: string]: EventMapping | null | undefined }\n | AnimatedValue\n | AnimatedValueXY\n\nexport type AnimatedEventConfig = {\n // Called with the SAME arguments the returned handler itself received —\n // RN's `_callListeners(...args)` — so a listener attached to\n // `ScrollView.onScroll` gets the one `ScrollEvent`, and one attached to\n // `onPanResponderMove` gets `(event, gestureState)` both, after the\n // mapping has already written this call's values.\n //\n // `never[]` rather than `unknown[]`: this field is filled in by a caller\n // whose listener has a concrete signature (`(event: ScrollEvent) => void`,\n // or the two-argument PanResponder shape), and a parameter position is\n // CONTRAVARIANT — a listener typed for `unknown` arguments would reject\n // every concretely-typed listener there is. `never` is the parameter type\n // every function's parameters are wider than, which is what makes a\n // listener of any real event shape assignable here; the handler below\n // casts back on the one call site that actually invokes it.\n listener?: (...args: never[]) => void\n // Accepted for RN source compatibility and ignored, with the platform's\n // usual one-line warning (native-driver.ts) — the GTK backend has no\n // native side to attach the event to, so unlike upstream this never\n // changes what `Animated.event` RETURNS: it is always the plain JS\n // handler below, `useNativeDriver` true or false.\n useNativeDriver?: boolean\n}\n\nconst traverse = (\n mapping: EventMapping | null | undefined,\n value: unknown,\n): void => {\n if (mapping instanceof AnimatedValue) {\n if (typeof value === \"number\") {\n mapping.setValue(value)\n }\n return\n }\n if (mapping instanceof AnimatedValueXY) {\n if (value !== null && typeof value === \"object\") {\n const record = value as Record<string, unknown>\n traverse(mapping.x, record.x)\n traverse(mapping.y, record.y)\n }\n return\n }\n if (mapping !== null && typeof mapping === \"object\") {\n // A missing path in the real argument resolves every key under it to\n // `undefined` rather than throwing — see the file header.\n const record = value as Record<string, unknown> | null | undefined\n for (const key of Object.keys(mapping)) {\n traverse(mapping[key], record?.[key])\n }\n }\n}\n\n/**\n * `Animated.event(argMapping, config?)`. Returns a plain callback — assign\n * it directly to `ScrollView.onScroll`, to `onPanResponderMove`, or to any\n * other RN event prop whose argument shape `argMapping` mirrors.\n */\nexport const createAnimatedEvent = (\n argMapping: readonly (EventMapping | null | undefined)[],\n config: AnimatedEventConfig = {},\n): ((...args: unknown[]) => void) => {\n if (config.useNativeDriver) {\n warnNativeDriverIgnored()\n }\n const { listener } = config\n\n return (...args: unknown[]): void => {\n argMapping.forEach((mapping, index) => {\n traverse(mapping, args[index])\n })\n // `never[]` is unconstructible from real values on purpose (see the\n // config type above) — this is the one place that trades back for the\n // ability to actually call the listener with what was received.\n listener?.(...(args as never[]))\n }\n}\n"]}
@@ -2,6 +2,10 @@ export type { AnimatedApi } from "./create-animated";
2
2
  export { createAnimated } from "./create-animated";
3
3
  export type { EasingFunction } from "./easing";
4
4
  export { Easing } from "./easing";
5
+ export type { AnimatedEventConfig, EventMapping } from "./event";
6
+ export { createAnimatedEvent } from "./event";
7
+ export { springStep } from "./spring";
8
+ export { timingStep } from "./timing";
5
9
  export type { CompositeAnimation, EndCallback, EndResult, ExtrapolateType, FrameScheduler, InterpolationConfig, InterpolationListener, LoopConfig, ParallelConfig, SpringConfig, TimingConfig, ValueListener, } from "./types";
6
10
  export { AnimatedInterpolation, AnimatedValue } from "./value";
7
11
  export { createValueAnimation } from "./value-animation";
@@ -3,6 +3,14 @@
3
3
  // Animated.* components are built.
4
4
  export { createAnimated } from "./create-animated";
5
5
  export { Easing } from "./easing";
6
+ export { createAnimatedEvent } from "./event";
7
+ // The pure per-frame closed-form solvers behind Animated.timing/.spring,
8
+ // exported alongside MakeStep for the same reason createValueAnimation is: a
9
+ // layer built on this engine may need the exact curve without a single
10
+ // AnimatedValue attached to it — reanimated-compat's object/array leaves
11
+ // (one MakeStep per leaf, stepped in lockstep) are the first such caller.
12
+ export { springStep } from "./spring";
13
+ export { timingStep } from "./timing";
6
14
  export { AnimatedInterpolation, AnimatedValue } from "./value";
7
15
  // The frame-driven lifecycle every single-value animation shares. Not part of
8
16
  // `AnimatedApi` — RN's `Animated` has no such method and this object is spread
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/animated/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,uEAAuE;AACvE,mCAAmC;AAGnC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAejC,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC9D,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,2EAA2E;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA","sourcesContent":["// Animated module entry point. Pure by contract: everything is driven by an\n// injected FrameScheduler — the GTK frame clock is connected where the\n// Animated.* components are built.\n\nexport type { AnimatedApi } from \"./create-animated\"\nexport { createAnimated } from \"./create-animated\"\nexport type { EasingFunction } from \"./easing\"\nexport { Easing } from \"./easing\"\nexport type {\n CompositeAnimation,\n EndCallback,\n EndResult,\n ExtrapolateType,\n FrameScheduler,\n InterpolationConfig,\n InterpolationListener,\n LoopConfig,\n ParallelConfig,\n SpringConfig,\n TimingConfig,\n ValueListener,\n} from \"./types\"\nexport { AnimatedInterpolation, AnimatedValue } from \"./value\"\n// The frame-driven lifecycle every single-value animation shares. Not part of\n// `AnimatedApi` — RN's `Animated` has no such method and this object is spread\n// into the public one — but exported because a layer built ON this engine may\n// need a per-frame step RN itself does not have: `withDecay` is the first.\nexport { createValueAnimation } from \"./value-animation\"\nexport type { MakeStep, StepFn, StepResult } from \"./value-animation\"\nexport { AnimatedValueXY } from \"./value-xy\"\nexport type { ValueXYListener, ValueXYLiteral } from \"./value-xy\"\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/animated/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,uEAAuE;AACvE,mCAAmC;AAGnC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAC7C,yEAAyE;AACzE,6EAA6E;AAC7E,uEAAuE;AACvE,yEAAyE;AACzE,0EAA0E;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAerC,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC9D,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,2EAA2E;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA","sourcesContent":["// Animated module entry point. Pure by contract: everything is driven by an\n// injected FrameScheduler — the GTK frame clock is connected where the\n// Animated.* components are built.\n\nexport type { AnimatedApi } from \"./create-animated\"\nexport { createAnimated } from \"./create-animated\"\nexport type { EasingFunction } from \"./easing\"\nexport { Easing } from \"./easing\"\nexport type { AnimatedEventConfig, EventMapping } from \"./event\"\nexport { createAnimatedEvent } from \"./event\"\n// The pure per-frame closed-form solvers behind Animated.timing/.spring,\n// exported alongside MakeStep for the same reason createValueAnimation is: a\n// layer built on this engine may need the exact curve without a single\n// AnimatedValue attached to it — reanimated-compat's object/array leaves\n// (one MakeStep per leaf, stepped in lockstep) are the first such caller.\nexport { springStep } from \"./spring\"\nexport { timingStep } from \"./timing\"\nexport type {\n CompositeAnimation,\n EndCallback,\n EndResult,\n ExtrapolateType,\n FrameScheduler,\n InterpolationConfig,\n InterpolationListener,\n LoopConfig,\n ParallelConfig,\n SpringConfig,\n TimingConfig,\n ValueListener,\n} from \"./types\"\nexport { AnimatedInterpolation, AnimatedValue } from \"./value\"\n// The frame-driven lifecycle every single-value animation shares. Not part of\n// `AnimatedApi` — RN's `Animated` has no such method and this object is spread\n// into the public one — but exported because a layer built ON this engine may\n// need a per-frame step RN itself does not have: `withDecay` is the first.\nexport { createValueAnimation } from \"./value-animation\"\nexport type { MakeStep, StepFn, StepResult } from \"./value-animation\"\nexport { AnimatedValueXY } from \"./value-xy\"\nexport type { ValueXYListener, ValueXYLiteral } from \"./value-xy\"\n"]}
@@ -1,3 +1,13 @@
1
1
  import type { CompositeAnimation, FrameScheduler, SpringConfig } from "./types";
2
2
  import type { AnimatedValue } from "./value";
3
+ import type { MakeStep } from "./value-animation";
4
+ /**
5
+ * The pure per-frame math, with no `AnimatedValue` or scheduler attached —
6
+ * exported for the same reason `timingStep` is (see timing.ts): a caller
7
+ * animating one leaf of an object/array target needs this exact solver, not
8
+ * a re-derivation of it, and needs it without a single number driver
9
+ * attached. `createSpring` below is a thin wrapper over this and
10
+ * `createValueAnimation`.
11
+ */
12
+ export declare const springStep: (config: SpringConfig) => MakeStep;
3
13
  export declare const createSpring: (scheduler: FrameScheduler, value: AnimatedValue, config: SpringConfig) => CompositeAnimation;
@@ -6,7 +6,15 @@
6
6
  // toValue.
7
7
  import { warnNativeDriverIgnored } from "./native-driver";
8
8
  import { createValueAnimation } from "./value-animation";
9
- export const createSpring = (scheduler, value, config) => {
9
+ /**
10
+ * The pure per-frame math, with no `AnimatedValue` or scheduler attached —
11
+ * exported for the same reason `timingStep` is (see timing.ts): a caller
12
+ * animating one leaf of an object/array target needs this exact solver, not
13
+ * a re-derivation of it, and needs it without a single number driver
14
+ * attached. `createSpring` below is a thin wrapper over this and
15
+ * `createValueAnimation`.
16
+ */
17
+ export const springStep = (config) => {
10
18
  const { toValue, delay = 0 } = config;
11
19
  const stiffness = config.stiffness ?? 100;
12
20
  const damping = config.damping ?? 10;
@@ -18,13 +26,10 @@ export const createSpring = (scheduler, value, config) => {
18
26
  if (stiffness <= 0 || damping <= 0 || mass <= 0) {
19
27
  throw new Error("Animated.spring: stiffness, damping and mass must be positive");
20
28
  }
21
- if (config.useNativeDriver) {
22
- warnNativeDriverIgnored();
23
- }
24
29
  const zeta = damping / (2 * Math.sqrt(stiffness * mass));
25
30
  const omega0 = Math.sqrt(stiffness / mass); // undamped frequency, rad/s
26
31
  const omega1 = omega0 * Math.sqrt(Math.abs(1 - zeta * zeta));
27
- return createValueAnimation(scheduler, value, (startValue) => {
32
+ return (startValue) => {
28
33
  const x0 = toValue - startValue;
29
34
  const v0 = -initialVelocity;
30
35
  return (elapsedMs) => {
@@ -62,6 +67,15 @@ export const createSpring = (scheduler, value, config) => {
62
67
  }
63
68
  return { position, done: false };
64
69
  };
65
- });
70
+ };
71
+ };
72
+ export const createSpring = (scheduler, value, config) => {
73
+ // Built before the native-driver check, so an invalid config still throws
74
+ // first — exactly the order this had before the math moved into springStep.
75
+ const step = springStep(config);
76
+ if (config.useNativeDriver) {
77
+ warnNativeDriverIgnored();
78
+ }
79
+ return createValueAnimation(scheduler, value, step);
66
80
  };
67
81
  //# sourceMappingURL=spring.js.map
@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spring: analytic damped harmonic oscillator — the same closed-form\n// solution RN uses — evaluated from the elapsed time the frame scheduler\n// reports, so the trajectory is deterministic for any frame cadence. The run\n// completes when both velocity and displacement fall under the rest\n// thresholds (or as soon as overshootClamping trips), then snaps exactly to\n// toValue.\n\nimport { warnNativeDriverIgnored } from \"./native-driver\"\nimport type { CompositeAnimation, FrameScheduler, SpringConfig } from \"./types\"\nimport type { AnimatedValue } from \"./value\"\nimport { createValueAnimation } from \"./value-animation\"\n\nexport const createSpring = (\n scheduler: FrameScheduler,\n value: AnimatedValue,\n config: SpringConfig,\n): CompositeAnimation => {\n const { toValue, delay = 0 } = config\n const stiffness = config.stiffness ?? 100\n const damping = config.damping ?? 10\n const mass = config.mass ?? 1\n const initialVelocity = config.initialVelocity ?? 0\n const overshootClamping = config.overshootClamping ?? false\n const restDisplacementThreshold = config.restDisplacementThreshold ?? 0.001\n const restSpeedThreshold = config.restSpeedThreshold ?? 0.001\n if (stiffness <= 0 || damping <= 0 || mass <= 0) {\n throw new Error(\n \"Animated.spring: stiffness, damping and mass must be positive\",\n )\n }\n if (config.useNativeDriver) {\n warnNativeDriverIgnored()\n }\n\n const zeta = damping / (2 * Math.sqrt(stiffness * mass))\n const omega0 = Math.sqrt(stiffness / mass) // undamped frequency, rad/s\n const omega1 = omega0 * Math.sqrt(Math.abs(1 - zeta * zeta))\n\n return createValueAnimation(scheduler, value, (startValue) => {\n const x0 = toValue - startValue\n const v0 = -initialVelocity\n return (elapsedMs) => {\n const t = (elapsedMs - delay) / 1000\n if (t < 0) {\n return { position: null, done: false }\n }\n\n let position: number\n let velocity: number\n if (zeta < 1) {\n // Underdamped oscillation.\n const envelope = Math.exp(-zeta * omega0 * t)\n const sin = Math.sin(omega1 * t)\n const cos = Math.cos(omega1 * t)\n const a2 = (v0 + zeta * omega0 * x0) / omega1\n position = toValue - envelope * (a2 * sin + x0 * cos)\n velocity =\n zeta * omega0 * envelope * (a2 * sin + x0 * cos) -\n envelope * (cos * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin)\n } else {\n // Critically damped (RN applies the same formula when overdamped).\n const envelope = Math.exp(-omega0 * t)\n position = toValue - envelope * (x0 + (v0 + omega0 * x0) * t)\n velocity = envelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0)\n }\n\n // Checked before publishing, so a clamped spring never reports a value\n // past its target.\n const overshooting =\n overshootClamping &&\n (startValue < toValue ? position > toValue : position < toValue)\n const atRest =\n Math.abs(velocity) <= restSpeedThreshold &&\n Math.abs(toValue - position) <= restDisplacementThreshold\n if (overshooting || atRest) {\n return { position: toValue, done: true }\n }\n return { position, done: false }\n }\n })\n}\n"]}
1
+ {"version":3,"file":"spring.js","sourceRoot":"","sources":["../../src/animated/spring.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,yEAAyE;AACzE,6EAA6E;AAC7E,oEAAoE;AACpE,4EAA4E;AAC5E,WAAW;AAEX,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAIzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAoB,EAAY,EAAE;IAC3D,MAAM,EAAE,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,MAAM,CAAA;IACrC,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,GAAG,CAAA;IACzC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;IACpC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,CAAA;IAC7B,MAAM,eAAe,GAAG,MAAM,CAAC,eAAe,IAAI,CAAC,CAAA;IACnD,MAAM,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,IAAI,KAAK,CAAA;IAC3D,MAAM,yBAAyB,GAAG,MAAM,CAAC,yBAAyB,IAAI,KAAK,CAAA;IAC3E,MAAM,kBAAkB,GAAG,MAAM,CAAC,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D,IAAI,YAAY,IAAI,MAAM,EAAE,CAAC;gBAC3B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;YAC1C,CAAC;YACD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;QAClC,CAAC,CAAA;IACH,CAAC,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,SAAyB,EACzB,KAAoB,EACpB,MAAoB,EACA,EAAE;IACtB,0EAA0E;IAC1E,4EAA4E;IAC5E,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAC/B,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3B,uBAAuB,EAAE,CAAA;IAC3B,CAAC;IACD,OAAO,oBAAoB,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAA;AACrD,CAAC,CAAA","sourcesContent":["// Animated.spring: analytic damped harmonic oscillator — the same closed-form\n// solution RN uses — evaluated from the elapsed time the frame scheduler\n// reports, so the trajectory is deterministic for any frame cadence. The run\n// completes when both velocity and displacement fall under the rest\n// thresholds (or as soon as overshootClamping trips), then snaps exactly to\n// toValue.\n\nimport { warnNativeDriverIgnored } from \"./native-driver\"\nimport type { CompositeAnimation, FrameScheduler, SpringConfig } from \"./types\"\nimport type { AnimatedValue } from \"./value\"\nimport type { MakeStep } from \"./value-animation\"\nimport { createValueAnimation } from \"./value-animation\"\n\n/**\n * The pure per-frame math, with no `AnimatedValue` or scheduler attached —\n * exported for the same reason `timingStep` is (see timing.ts): a caller\n * animating one leaf of an object/array target needs this exact solver, not\n * a re-derivation of it, and needs it without a single number driver\n * attached. `createSpring` below is a thin wrapper over this and\n * `createValueAnimation`.\n */\nexport const springStep = (config: SpringConfig): MakeStep => {\n const { toValue, delay = 0 } = config\n const stiffness = config.stiffness ?? 100\n const damping = config.damping ?? 10\n const mass = config.mass ?? 1\n const initialVelocity = config.initialVelocity ?? 0\n const overshootClamping = config.overshootClamping ?? false\n const restDisplacementThreshold = config.restDisplacementThreshold ?? 0.001\n const restSpeedThreshold = config.restSpeedThreshold ?? 0.001\n if (stiffness <= 0 || damping <= 0 || mass <= 0) {\n throw new Error(\n \"Animated.spring: stiffness, damping and mass must be positive\",\n )\n }\n\n const zeta = damping / (2 * Math.sqrt(stiffness * mass))\n const omega0 = Math.sqrt(stiffness / mass) // undamped frequency, rad/s\n const omega1 = omega0 * Math.sqrt(Math.abs(1 - zeta * zeta))\n\n return (startValue) => {\n const x0 = toValue - startValue\n const v0 = -initialVelocity\n return (elapsedMs) => {\n const t = (elapsedMs - delay) / 1000\n if (t < 0) {\n return { position: null, done: false }\n }\n\n let position: number\n let velocity: number\n if (zeta < 1) {\n // Underdamped oscillation.\n const envelope = Math.exp(-zeta * omega0 * t)\n const sin = Math.sin(omega1 * t)\n const cos = Math.cos(omega1 * t)\n const a2 = (v0 + zeta * omega0 * x0) / omega1\n position = toValue - envelope * (a2 * sin + x0 * cos)\n velocity =\n zeta * omega0 * envelope * (a2 * sin + x0 * cos) -\n envelope * (cos * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin)\n } else {\n // Critically damped (RN applies the same formula when overdamped).\n const envelope = Math.exp(-omega0 * t)\n position = toValue - envelope * (x0 + (v0 + omega0 * x0) * t)\n velocity = envelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0)\n }\n\n // Checked before publishing, so a clamped spring never reports a value\n // past its target.\n const overshooting =\n overshootClamping &&\n (startValue < toValue ? position > toValue : position < toValue)\n const atRest =\n Math.abs(velocity) <= restSpeedThreshold &&\n Math.abs(toValue - position) <= restDisplacementThreshold\n if (overshooting || atRest) {\n return { position: toValue, done: true }\n }\n return { position, done: false }\n }\n }\n}\n\nexport const createSpring = (\n scheduler: FrameScheduler,\n value: AnimatedValue,\n config: SpringConfig,\n): CompositeAnimation => {\n // Built before the native-driver check, so an invalid config still throws\n // first — exactly the order this had before the math moved into springStep.\n const step = springStep(config)\n if (config.useNativeDriver) {\n warnNativeDriverIgnored()\n }\n return createValueAnimation(scheduler, value, step)\n}\n"]}
@@ -1,3 +1,13 @@
1
+ import type { EasingFunction } from "./easing";
1
2
  import type { CompositeAnimation, FrameScheduler, TimingConfig } from "./types";
2
3
  import type { AnimatedValue } from "./value";
4
+ import type { MakeStep } from "./value-animation";
5
+ /**
6
+ * The pure per-frame math, with no `AnimatedValue` or scheduler attached —
7
+ * exported so a caller that needs the exact same curve without a single
8
+ * number driver (reanimated-compat's object/array leaves, one `MakeStep` per
9
+ * leaf) reuses it rather than re-deriving it. `createTiming` below is a thin
10
+ * wrapper over this and `createValueAnimation`.
11
+ */
12
+ export declare const timingStep: (toValue: number, duration: number, easing: EasingFunction, delay?: number) => MakeStep;
3
13
  export declare const createTiming: (scheduler: FrameScheduler, value: AnimatedValue, config: TimingConfig) => CompositeAnimation;
@@ -6,6 +6,26 @@ import { Easing } from "./easing";
6
6
  import { warnNativeDriverIgnored } from "./native-driver";
7
7
  import { createValueAnimation } from "./value-animation";
8
8
  const defaultEasing = Easing.inOut(Easing.ease);
9
+ /**
10
+ * The pure per-frame math, with no `AnimatedValue` or scheduler attached —
11
+ * exported so a caller that needs the exact same curve without a single
12
+ * number driver (reanimated-compat's object/array leaves, one `MakeStep` per
13
+ * leaf) reuses it rather than re-deriving it. `createTiming` below is a thin
14
+ * wrapper over this and `createValueAnimation`.
15
+ */
16
+ export const timingStep = (toValue, duration, easing, delay = 0) => (startValue) => (elapsedMs) => {
17
+ const t = elapsedMs - delay;
18
+ if (t < 0) {
19
+ return { position: null, done: false };
20
+ }
21
+ if (duration <= 0 || t >= duration) {
22
+ return { position: toValue, done: true };
23
+ }
24
+ return {
25
+ position: startValue + easing(t / duration) * (toValue - startValue),
26
+ done: false,
27
+ };
28
+ };
9
29
  export const createTiming = (scheduler, value, config) => {
10
30
  const { toValue, delay = 0 } = config;
11
31
  const duration = config.duration ?? 500;
@@ -13,18 +33,6 @@ export const createTiming = (scheduler, value, config) => {
13
33
  if (config.useNativeDriver) {
14
34
  warnNativeDriverIgnored();
15
35
  }
16
- return createValueAnimation(scheduler, value, (startValue) => (elapsedMs) => {
17
- const t = elapsedMs - delay;
18
- if (t < 0) {
19
- return { position: null, done: false };
20
- }
21
- if (duration <= 0 || t >= duration) {
22
- return { position: toValue, done: true };
23
- }
24
- return {
25
- position: startValue + easing(t / duration) * (toValue - startValue),
26
- done: false,
27
- };
28
- });
36
+ return createValueAnimation(scheduler, value, timingStep(toValue, duration, easing, delay));
29
37
  };
30
38
  //# sourceMappingURL=timing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/animated/timing.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,aAAa;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAGzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAE/C,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,SAAyB,EACzB,KAAoB,EACpB,MAAoB,EACA,EAAE;IACtB,MAAM,EAAE,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,MAAM,CAAA;IACrC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,GAAG,CAAA;IACvC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,aAAa,CAAA;IAC7C,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3B,uBAAuB,EAAE,CAAA;IAC3B,CAAC;IAED,OAAO,oBAAoB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,EAAE;QAC1E,MAAM,CAAC,GAAG,SAAS,GAAG,KAAK,CAAA;QAC3B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACV,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;QACxC,CAAC;QACD,IAAI,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC;YACnC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;QAC1C,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,GAAG,UAAU,CAAC;YACpE,IAAI,EAAE,KAAK;SACZ,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["// Animated.timing: duration-based easing toward toValue with RN defaults\n// (duration 500 ms, easing inOut(ease)). delay waits out frames without\n// touching the value; duration 0 jumps to toValue on the first frame past\n// the delay.\n\nimport { Easing } from \"./easing\"\nimport { warnNativeDriverIgnored } from \"./native-driver\"\nimport type { CompositeAnimation, FrameScheduler, TimingConfig } from \"./types\"\nimport type { AnimatedValue } from \"./value\"\nimport { createValueAnimation } from \"./value-animation\"\n\nconst defaultEasing = Easing.inOut(Easing.ease)\n\nexport const createTiming = (\n scheduler: FrameScheduler,\n value: AnimatedValue,\n config: TimingConfig,\n): CompositeAnimation => {\n const { toValue, delay = 0 } = config\n const duration = config.duration ?? 500\n const easing = config.easing ?? defaultEasing\n if (config.useNativeDriver) {\n warnNativeDriverIgnored()\n }\n\n return createValueAnimation(scheduler, value, (startValue) => (elapsedMs) => {\n const t = elapsedMs - delay\n if (t < 0) {\n return { position: null, done: false }\n }\n if (duration <= 0 || t >= duration) {\n return { position: toValue, done: true }\n }\n return {\n position: startValue + easing(t / duration) * (toValue - startValue),\n done: false,\n }\n })\n}\n"]}
1
+ {"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/animated/timing.ts"],"names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,CAAC,MAAM,IAAI,aAAa,CAAA;IAC7C,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3B,uBAAuB,EAAE,CAAA;IAC3B,CAAC;IAED,OAAO,oBAAoB,CACzB,SAAS,EACT,KAAK,EACL,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAC7C,CAAA;AACH,CAAC,CAAA","sourcesContent":["// Animated.timing: duration-based easing toward toValue with RN defaults\n// (duration 500 ms, easing inOut(ease)). delay waits out frames without\n// touching the value; duration 0 jumps to toValue on the first frame past\n// the delay.\n\nimport type { EasingFunction } from \"./easing\"\nimport { Easing } from \"./easing\"\nimport { warnNativeDriverIgnored } from \"./native-driver\"\nimport type { CompositeAnimation, FrameScheduler, TimingConfig } from \"./types\"\nimport type { AnimatedValue } from \"./value\"\nimport type { MakeStep } from \"./value-animation\"\nimport { createValueAnimation } from \"./value-animation\"\n\nconst defaultEasing = Easing.inOut(Easing.ease)\n\n/**\n * The pure per-frame math, with no `AnimatedValue` or scheduler attached —\n * exported so a caller that needs the exact same curve without a single\n * number driver (reanimated-compat's object/array leaves, one `MakeStep` per\n * leaf) reuses it rather than re-deriving it. `createTiming` below is a thin\n * wrapper over this and `createValueAnimation`.\n */\nexport const timingStep =\n (\n toValue: number,\n duration: number,\n easing: EasingFunction,\n delay = 0,\n ): MakeStep =>\n (startValue) =>\n (elapsedMs) => {\n const t = elapsedMs - delay\n if (t < 0) {\n return { position: null, done: false }\n }\n if (duration <= 0 || t >= duration) {\n return { position: toValue, done: true }\n }\n return {\n position: startValue + easing(t / duration) * (toValue - startValue),\n done: false,\n }\n }\n\nexport const createTiming = (\n scheduler: FrameScheduler,\n value: AnimatedValue,\n config: TimingConfig,\n): CompositeAnimation => {\n const { toValue, delay = 0 } = config\n const duration = config.duration ?? 500\n const easing = config.easing ?? defaultEasing\n if (config.useNativeDriver) {\n warnNativeDriverIgnored()\n }\n\n return createValueAnimation(\n scheduler,\n value,\n timingStep(toValue, duration, easing, delay),\n )\n}\n"]}