@octane-xplat/motion 0.7.1 → 0.7.3
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/UPSTREAM.md +37 -4
- package/dist/native/octane-client-build.json +1 -1
- package/dist/web/octane-client-build.json +1 -1
- package/package.json +2 -2
- package/src/components.mobile.test.tsrx +19 -5
- package/src/components.web.test.tsrx +1 -0
- package/src/types.ts +5 -1
- package/types/types.d.ts +5 -1
package/UPSTREAM.md
CHANGED
|
@@ -55,7 +55,40 @@ An ancestor unmount always disposes immediately. Nested boundaries are independe
|
|
|
55
55
|
|
|
56
56
|
Unit and DOM tests establish bounded behavior, not full Framer Motion parity.
|
|
57
57
|
Universal object-driver tests establish retention and lifecycle without an OS.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
Partial device observations are recorded in the
|
|
59
|
+
[motion v1 validation matrix](../../docs/animation-notes.md). An isolated iOS
|
|
60
|
+
26.5 MotionProbe run verified pan completion/cancellation, Presence
|
|
61
|
+
focus/reversal/removal, and live Reduce Motion, including immediate transform
|
|
62
|
+
settlement. The API 35 Android emulator verified tween/spring completion,
|
|
63
|
+
cancellation, disposal, pan phase delivery, focus release on Presence exit, and
|
|
64
|
+
live reduced-motion observation. Changing `animator_duration_scale` to `0`
|
|
65
|
+
while mounted changed the probe state to reduced, and a subsequent idle snapshot
|
|
66
|
+
showed the `-100` tween destination; deleting the setting restored the default
|
|
67
|
+
and the state returned to normal. The idle snapshot does not establish
|
|
68
|
+
frame-accurate settlement time. Its injected pan release reported zero velocity,
|
|
69
|
+
and the accessibility runner did not reach idle during reversal, so those
|
|
70
|
+
checks remain open.
|
|
71
|
+
|
|
72
|
+
A physical iPhone 13 Pro Max running iOS 27.0.1 launched the temporary direct
|
|
73
|
+
MotionProbe under an Xcode UI-test host. The test verified tween-to-spring
|
|
74
|
+
retargeting, explicit `MotionValue.stop()` cancellation, native pan begin/move/end
|
|
75
|
+
with nonzero release velocity and settling, and Presence child retention through
|
|
76
|
+
a focus-triggered exit/reversal. Presence dismissed the keyboard; after
|
|
77
|
+
re-entry the retained field accepted focus and typed input, and a later exit
|
|
78
|
+
dismissed the keyboard and reported one removal. The failed check expected the
|
|
79
|
+
keyboard to remain open immediately after the focus-triggered reversal; that
|
|
80
|
+
expectation conflicts with Presence releasing focus on exit. The physical
|
|
81
|
+
Reduce Motion change remains inconclusive: the test did not record the system
|
|
82
|
+
switch value before and after its Settings tap. A corrected rerun was blocked
|
|
83
|
+
when the phone re-locked.
|
|
84
|
+
|
|
85
|
+
Physical Android CPH2551 evidence covers app launch and target retarget only;
|
|
86
|
+
the handset is currently disconnected. The regular mobile app now builds and
|
|
87
|
+
mounts on the iOS 26.5 simulator using NativeScript's `NSObject.extend()` API
|
|
88
|
+
for the auth-session presentation delegate. The Android build also passes with
|
|
89
|
+
the iOS delegate behind the `NSObject` runtime guard. Motion-specific simulator,
|
|
90
|
+
emulator, and iPhone checks still use a temporary direct MotionProbe entry to
|
|
91
|
+
isolate the driver. Physical input suppression during exit, Android gesture
|
|
92
|
+
cancellation/natural velocity, background/resume, and frame pacing remain
|
|
93
|
+
uncharacterized. Native preference observation polls at 500 ms while subscribed
|
|
94
|
+
and refreshes on resume; Android reads `animator_duration_scale`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octane-xplat/motion",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Declarative motion and retained presence for Octane on web, iOS and Android",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"octane",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@octane-xplat/ui": "0.7.
|
|
46
|
+
"@octane-xplat/ui": "0.7.3",
|
|
47
47
|
"motion-dom": "12.42.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
/** @jsxImportSource @nativescript-community/octane */
|
|
2
|
-
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { describe, expect, it, vi } from 'vitest'
|
|
3
3
|
import { createObjectContainer, createObjectDriver, createUniversalRoot, flushUniversalSync } from 'octane/universal/native'
|
|
4
4
|
import { motion, MotionConfig } from './index'
|
|
5
5
|
|
|
6
6
|
function NativeBox(props: any) @{
|
|
7
7
|
<MotionConfig reducedMotion="always">
|
|
8
|
-
<motion.View
|
|
8
|
+
<motion.View
|
|
9
|
+
id="native"
|
|
10
|
+
initial={{ x: 10 }}
|
|
11
|
+
animate={{ x: props.x }}
|
|
12
|
+
transition={{ duration: 20 }}
|
|
13
|
+
onAnimationComplete={props.done}
|
|
14
|
+
/>
|
|
9
15
|
</MotionConfig>
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
describe('native compiled hosts', () => {
|
|
13
|
-
it('updates retained hosts
|
|
19
|
+
it('updates retained hosts and reports one completion for each changed destination', async () => {
|
|
14
20
|
const container = createObjectContainer('nativescript')
|
|
15
21
|
const root = createUniversalRoot(container, createObjectDriver('nativescript'))
|
|
16
|
-
|
|
22
|
+
const done = vi.fn()
|
|
23
|
+
root.render(NativeBox, { x: 50, done })
|
|
17
24
|
const node: any = container.children[0]
|
|
18
25
|
expect(node.translateX).toBe(50)
|
|
19
|
-
|
|
26
|
+
await new Promise((resolve) => setTimeout(resolve, 0))
|
|
27
|
+
expect(done).toHaveBeenCalledTimes(1)
|
|
28
|
+
flushUniversalSync(() => root.render(NativeBox, { x: 50, done }))
|
|
29
|
+
await new Promise((resolve) => setTimeout(resolve, 0))
|
|
30
|
+
expect(done).toHaveBeenCalledTimes(1)
|
|
31
|
+
flushUniversalSync(() => root.render(NativeBox, { x: 80, done }))
|
|
32
|
+
await new Promise((resolve) => setTimeout(resolve, 0))
|
|
20
33
|
expect(container.children[0]).toBe(node)
|
|
21
34
|
expect(node.translateX).toBe(80)
|
|
35
|
+
expect(done).toHaveBeenCalledTimes(2)
|
|
22
36
|
root.unmount()
|
|
23
37
|
expect(container.children.length).toBe(0)
|
|
24
38
|
})
|
package/src/types.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { View, Row, Pressable } from '@octane-xplat/ui'
|
|
2
2
|
import type { MotionValue } from './value'
|
|
3
3
|
|
|
4
|
+
type ViewProps = Parameters<typeof View>[0]
|
|
5
|
+
type RowProps = Parameters<typeof Row>[0]
|
|
6
|
+
type PressableProps = Parameters<typeof Pressable>[0]
|
|
7
|
+
|
|
4
8
|
/** Supported channels. Translation is CSS pixels/DIP; rotation is degrees. */
|
|
5
9
|
export type MotionKey = 'opacity' | 'x' | 'y' | 'scale' | 'scaleX' | 'scaleY' | 'rotate'
|
|
6
10
|
/** Absolute numeric destinations; omitted channels retain their current values. */
|
package/types/types.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { View, Row, Pressable } from '@octane-xplat/ui';
|
|
2
2
|
import type { MotionValue } from './value';
|
|
3
|
+
type ViewProps = Parameters<typeof View>[0];
|
|
4
|
+
type RowProps = Parameters<typeof Row>[0];
|
|
5
|
+
type PressableProps = Parameters<typeof Pressable>[0];
|
|
3
6
|
/** Supported channels. Translation is CSS pixels/DIP; rotation is degrees. */
|
|
4
7
|
export type MotionKey = 'opacity' | 'x' | 'y' | 'scale' | 'scaleX' | 'scaleY' | 'rotate';
|
|
5
8
|
/** Absolute numeric destinations; omitted channels retain their current values. */
|
|
@@ -49,3 +52,4 @@ export interface PresenceProps extends ViewProps {
|
|
|
49
52
|
/** Called once after all registered exits finish, never after reversal/disposal. */
|
|
50
53
|
onExitComplete?: () => void;
|
|
51
54
|
}
|
|
55
|
+
export {};
|