@fluentui/react-motion 0.0.0-nightly-20240607-1142.1 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -1,25 +1,12 @@
|
|
1
1
|
# Change Log - @fluentui/react-motion
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 06 Jun 2024 15:22:17 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-20240607-1142.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-motion_v0.0.0-nightly-20240607-1142.1)
|
8
|
-
|
9
|
-
Fri, 07 Jun 2024 12:00:10 GMT
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-motion_v9.0.0..@fluentui/react-motion_v0.0.0-nightly-20240607-1142.1)
|
11
|
-
|
12
|
-
### Changes
|
13
|
-
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
15
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20240607-1142.1 ([commit](https://github.com/microsoft/fluentui/commit/40da052540066d9cb9e19ae1127d52eeccb7a699) by beachball)
|
16
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-20240607-1142.1 ([commit](https://github.com/microsoft/fluentui/commit/40da052540066d9cb9e19ae1127d52eeccb7a699) by beachball)
|
17
|
-
- Bump @fluentui/react-conformance to v0.0.0-nightly-20240607-1142.1 ([commit](https://github.com/microsoft/fluentui/commit/40da052540066d9cb9e19ae1127d52eeccb7a699) by beachball)
|
18
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20240607-1142.1 ([commit](https://github.com/microsoft/fluentui/commit/40da052540066d9cb9e19ae1127d52eeccb7a699) by beachball)
|
19
|
-
|
20
7
|
## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-motion_v9.0.0)
|
21
8
|
|
22
|
-
Thu, 06 Jun 2024 15:
|
9
|
+
Thu, 06 Jun 2024 15:22:17 GMT
|
23
10
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-motions-preview_v0.3.2..@fluentui/react-motion_v9.0.0)
|
24
11
|
|
25
12
|
### Minor changes
|
@@ -26,18 +26,6 @@ export function animateAtoms(element, value, options) {
|
|
26
26
|
});
|
27
27
|
},
|
28
28
|
set onfinish (callback){
|
29
|
-
// Heads up!
|
30
|
-
// Jest uses jsdom as the default environment, which doesn't support the Web Animations API. This no-op is
|
31
|
-
// necessary to avoid errors in tests.
|
32
|
-
//
|
33
|
-
// See https://github.com/microsoft/fluentui/issues/31593
|
34
|
-
// See https://github.com/jsdom/jsdom/issues/3429
|
35
|
-
if (process.env.NODE_ENV === 'test') {
|
36
|
-
if (animations.length === 0) {
|
37
|
-
callback();
|
38
|
-
return;
|
39
|
-
}
|
40
|
-
}
|
41
29
|
Promise.all(animations.map((animation)=>animation.finished)).then(()=>{
|
42
30
|
callback();
|
43
31
|
}).catch((err)=>{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["animateAtoms.ts"],"sourcesContent":["import type { AnimationHandle, AtomMotion } from '../types';\n\nexport function animateAtoms(\n element: HTMLElement,\n value: AtomMotion | AtomMotion[],\n options: {\n isReducedMotion: boolean;\n },\n): AnimationHandle {\n // Heads up!\n // Jest uses jsdom as the default environment, which doesn't support the Web Animations API. The same is true for\n // older browsers that are out of browser support matrix. In these cases, the animation will be a no-op.\n const SUPPORTS_WEB_ANIMATIONS = typeof element.animate === 'function';\n\n const atoms = Array.isArray(value) ? value : [value];\n const { isReducedMotion } = options;\n\n const animations = SUPPORTS_WEB_ANIMATIONS\n ? atoms.map(motion => {\n const { keyframes, ...params } = motion;\n const animation = element.animate(keyframes, {\n fill: 'forwards',\n\n ...params,\n ...(isReducedMotion && { duration: 1 }),\n });\n\n animation.persist();\n\n return animation;\n })\n : [];\n\n return {\n set playbackRate(rate: number) {\n animations.forEach(animation => {\n animation.playbackRate = rate;\n });\n },\n set onfinish(callback: () => void) {\n
|
1
|
+
{"version":3,"sources":["animateAtoms.ts"],"sourcesContent":["import type { AnimationHandle, AtomMotion } from '../types';\n\nexport function animateAtoms(\n element: HTMLElement,\n value: AtomMotion | AtomMotion[],\n options: {\n isReducedMotion: boolean;\n },\n): AnimationHandle {\n // Heads up!\n // Jest uses jsdom as the default environment, which doesn't support the Web Animations API. The same is true for\n // older browsers that are out of browser support matrix. In these cases, the animation will be a no-op.\n const SUPPORTS_WEB_ANIMATIONS = typeof element.animate === 'function';\n\n const atoms = Array.isArray(value) ? value : [value];\n const { isReducedMotion } = options;\n\n const animations = SUPPORTS_WEB_ANIMATIONS\n ? atoms.map(motion => {\n const { keyframes, ...params } = motion;\n const animation = element.animate(keyframes, {\n fill: 'forwards',\n\n ...params,\n ...(isReducedMotion && { duration: 1 }),\n });\n\n animation.persist();\n\n return animation;\n })\n : [];\n\n return {\n set playbackRate(rate: number) {\n animations.forEach(animation => {\n animation.playbackRate = rate;\n });\n },\n set onfinish(callback: () => void) {\n Promise.all(animations.map(animation => animation.finished))\n .then(() => {\n callback();\n })\n .catch((err: unknown) => {\n const DOMException = element.ownerDocument.defaultView?.DOMException;\n\n // Ignores \"DOMException: The user aborted a request\" that appears if animations are cancelled\n if (DOMException && err instanceof DOMException) {\n return;\n }\n\n throw err;\n });\n },\n\n cancel: () => {\n animations.forEach(animation => {\n animation.cancel();\n });\n },\n pause: () => {\n animations.forEach(animation => {\n animation.pause();\n });\n },\n play: () => {\n animations.forEach(animation => {\n animation.play();\n });\n },\n finish: () => {\n animations.forEach(animation => {\n animation.finish();\n });\n },\n };\n}\n"],"names":["animateAtoms","element","value","options","SUPPORTS_WEB_ANIMATIONS","animate","atoms","Array","isArray","isReducedMotion","animations","map","motion","keyframes","params","animation","fill","duration","persist","playbackRate","rate","forEach","onfinish","callback","Promise","all","finished","then","catch","err","DOMException","ownerDoc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AAO,CAACN,CAAAA;gBACjBA,UAAUoB,IAAI;YAChB;QACF;QACAC,QAAQ;YACN1B,WAAWW,OAAO,CAACN,CAAAA;gBACjBA,UAAUqB,MAAM;YAClB;QACF;IACF;AACF"}
|
@@ -36,18 +36,6 @@ function animateAtoms(element, value, options) {
|
|
36
36
|
});
|
37
37
|
},
|
38
38
|
set onfinish (callback){
|
39
|
-
// Heads up!
|
40
|
-
// Jest uses jsdom as the default environment, which doesn't support the Web Animations API. This no-op is
|
41
|
-
// necessary to avoid errors in tests.
|
42
|
-
//
|
43
|
-
// See https://github.com/microsoft/fluentui/issues/31593
|
44
|
-
// See https://github.com/jsdom/jsdom/issues/3429
|
45
|
-
if (process.env.NODE_ENV === 'test') {
|
46
|
-
if (animations.length === 0) {
|
47
|
-
callback();
|
48
|
-
return;
|
49
|
-
}
|
50
|
-
}
|
51
39
|
Promise.all(animations.map((animation)=>animation.finished)).then(()=>{
|
52
40
|
callback();
|
53
41
|
}).catch((err)=>{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["animateAtoms.js"],"sourcesContent":["export function animateAtoms(element, value, options) {\n // Heads up!\n // Jest uses jsdom as the default environment, which doesn't support the Web Animations API. The same is true for\n // older browsers that are out of browser support matrix. In these cases, the animation will be a no-op.\n const SUPPORTS_WEB_ANIMATIONS = typeof element.animate === 'function';\n const atoms = Array.isArray(value) ? value : [\n value\n ];\n const { isReducedMotion } = options;\n const animations = SUPPORTS_WEB_ANIMATIONS ? atoms.map((motion)=>{\n const { keyframes, ...params } = motion;\n const animation = element.animate(keyframes, {\n fill: 'forwards',\n ...params,\n ...isReducedMotion && {\n duration: 1\n }\n });\n animation.persist();\n return animation;\n }) : [];\n return {\n set playbackRate (rate){\n animations.forEach((animation)=>{\n animation.playbackRate = rate;\n });\n },\n set onfinish (callback){\n
|
1
|
+
{"version":3,"sources":["animateAtoms.js"],"sourcesContent":["export function animateAtoms(element, value, options) {\n // Heads up!\n // Jest uses jsdom as the default environment, which doesn't support the Web Animations API. The same is true for\n // older browsers that are out of browser support matrix. In these cases, the animation will be a no-op.\n const SUPPORTS_WEB_ANIMATIONS = typeof element.animate === 'function';\n const atoms = Array.isArray(value) ? value : [\n value\n ];\n const { isReducedMotion } = options;\n const animations = SUPPORTS_WEB_ANIMATIONS ? atoms.map((motion)=>{\n const { keyframes, ...params } = motion;\n const animation = element.animate(keyframes, {\n fill: 'forwards',\n ...params,\n ...isReducedMotion && {\n duration: 1\n }\n });\n animation.persist();\n return animation;\n }) : [];\n return {\n set playbackRate (rate){\n animations.forEach((animation)=>{\n animation.playbackRate = rate;\n });\n },\n set onfinish (callback){\n Promise.all(animations.map((animation)=>animation.finished)).then(()=>{\n callback();\n }).catch((err)=>{\n var _element_ownerDocument_defaultView;\n const DOMException = (_element_ownerDocument_defaultView = element.ownerDocument.defaultView) === null || _element_ownerDocument_defaultView === void 0 ? void 0 : _element_ownerDocument_defaultView.DOMException;\n // Ignores \"DOMException: The user aborted a request\" that appears if animations are cancelled\n if (DOMException && err instanceof DOMException) {\n return;\n }\n throw err;\n });\n },\n cancel: ()=>{\n animations.forEach((animation)=>{\n animation.cancel();\n });\n },\n pause: ()=>{\n animations.forEach((animation)=>{\n animation.pause();\n });\n },\n play: ()=>{\n animations.forEach((animation)=>{\n animation.play();\n });\n },\n finish: ()=>{\n animations.forEach((animation)=>{\n animation.finish();\n });\n }\n };\n}\n"],"names":["animateAtoms","element","value","options","SUPPORTS_WEB_ANIMATIONS","animate","atoms","Array","isArray","isReducedMotion","animations","map","motion","keyframes","params","animation","fill","duration","persist","playbackRate","rate","forEach","onfinish","callback","Promise","all","finished","then","catch","err","_element_ownerDocument_defaultView","DOMException","ownerDocument","defaultView","cancel","pause","play","finish"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA,aAAaC,OAAO,EAAEC,KAAK,EAAEC,OAAO;IAChD,YAAY;IACZ,iHAAiH;IACjH,wGAAwG;IACxG,MAAMC,0BAA0B,OAAOH,QAAQI,OA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B;QACJ;IACJ;AACJ"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-motion",
|
3
|
-
"version": "
|
3
|
+
"version": "9.0.0",
|
4
4
|
"description": "A package with utilities & motion definitions using Web Animations API",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -30,14 +30,14 @@
|
|
30
30
|
},
|
31
31
|
"devDependencies": {
|
32
32
|
"@fluentui/eslint-plugin": "*",
|
33
|
-
"@fluentui/react-conformance": "
|
34
|
-
"@fluentui/react-conformance-griffel": "
|
33
|
+
"@fluentui/react-conformance": "*",
|
34
|
+
"@fluentui/react-conformance-griffel": "*",
|
35
35
|
"@fluentui/scripts-api-extractor": "*",
|
36
36
|
"@fluentui/scripts-tasks": "*"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
|
-
"@fluentui/react-shared-contexts": "
|
40
|
-
"@fluentui/react-utilities": "
|
39
|
+
"@fluentui/react-shared-contexts": "^9.19.0",
|
40
|
+
"@fluentui/react-utilities": "^9.18.10",
|
41
41
|
"@swc/helpers": "^0.5.1",
|
42
42
|
"react-is": "^17.0.2"
|
43
43
|
},
|
@@ -56,5 +56,10 @@
|
|
56
56
|
},
|
57
57
|
"./package.json": "./package.json"
|
58
58
|
},
|
59
|
-
"beachball": {
|
59
|
+
"beachball": {
|
60
|
+
"disallowedChangeTypes": [
|
61
|
+
"major",
|
62
|
+
"prerelease"
|
63
|
+
]
|
64
|
+
}
|
60
65
|
}
|