@fluentui-react-native/experimental-shimmer 0.8.26 → 0.8.28

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 (67) hide show
  1. package/CHANGELOG.json +61 -1
  2. package/CHANGELOG.md +23 -2
  3. package/lib/Shimmer.d.ts +3 -0
  4. package/lib/Shimmer.d.ts.map +1 -0
  5. package/lib/Shimmer.js +109 -0
  6. package/lib/Shimmer.js.map +1 -0
  7. package/lib/Shimmer.styling.d.ts +4 -0
  8. package/lib/Shimmer.styling.d.ts.map +1 -0
  9. package/lib/Shimmer.styling.js +31 -0
  10. package/lib/Shimmer.styling.js.map +1 -0
  11. package/lib/Shimmer.styling.win32.d.ts +8 -0
  12. package/lib/Shimmer.styling.win32.d.ts.map +1 -0
  13. package/lib/Shimmer.styling.win32.js +32 -0
  14. package/lib/Shimmer.styling.win32.js.map +1 -0
  15. package/lib/Shimmer.test.d.ts +2 -0
  16. package/lib/Shimmer.test.d.ts.map +1 -0
  17. package/lib/Shimmer.test.js +48 -0
  18. package/lib/Shimmer.test.js.map +1 -0
  19. package/lib/Shimmer.types.d.ts +2 -0
  20. package/lib/Shimmer.types.d.ts.map +1 -0
  21. package/lib/Shimmer.types.js +2 -0
  22. package/lib/Shimmer.types.js.map +1 -0
  23. package/lib/Shimmer.types.shared.d.ts +145 -0
  24. package/lib/Shimmer.types.shared.d.ts.map +1 -0
  25. package/lib/Shimmer.types.shared.js +2 -0
  26. package/lib/Shimmer.types.shared.js.map +1 -0
  27. package/lib/Shimmer.types.win32.d.ts +38 -0
  28. package/lib/Shimmer.types.win32.d.ts.map +1 -0
  29. package/lib/Shimmer.types.win32.js +2 -0
  30. package/lib/Shimmer.types.win32.js.map +1 -0
  31. package/lib/Shimmer.win32.d.ts +4 -0
  32. package/lib/Shimmer.win32.d.ts.map +1 -0
  33. package/lib/Shimmer.win32.js +130 -0
  34. package/lib/Shimmer.win32.js.map +1 -0
  35. package/lib/ShimmerTokens.android.d.ts +2 -0
  36. package/lib/ShimmerTokens.android.d.ts.map +1 -0
  37. package/lib/ShimmerTokens.android.js +2 -0
  38. package/lib/ShimmerTokens.android.js.map +1 -0
  39. package/lib/ShimmerTokens.d.ts +5 -0
  40. package/lib/ShimmerTokens.d.ts.map +1 -0
  41. package/lib/ShimmerTokens.ios.d.ts +2 -0
  42. package/lib/ShimmerTokens.ios.d.ts.map +1 -0
  43. package/lib/ShimmerTokens.ios.js +2 -0
  44. package/lib/ShimmerTokens.ios.js.map +1 -0
  45. package/lib/ShimmerTokens.js +13 -0
  46. package/lib/ShimmerTokens.js.map +1 -0
  47. package/lib/ShimmerTokens.mobile.d.ts +5 -0
  48. package/lib/ShimmerTokens.mobile.d.ts.map +1 -0
  49. package/lib/ShimmerTokens.mobile.js +12 -0
  50. package/lib/ShimmerTokens.mobile.js.map +1 -0
  51. package/lib/ShimmerTokens.win32.d.ts +5 -0
  52. package/lib/ShimmerTokens.win32.d.ts.map +1 -0
  53. package/lib/ShimmerTokens.win32.js +14 -0
  54. package/lib/ShimmerTokens.win32.js.map +1 -0
  55. package/lib/SvgShapeToPath.d.ts +18 -0
  56. package/lib/SvgShapeToPath.d.ts.map +1 -0
  57. package/lib/SvgShapeToPath.js +144 -0
  58. package/lib/SvgShapeToPath.js.map +1 -0
  59. package/lib/consts.win32.d.ts +2 -0
  60. package/lib/consts.win32.d.ts.map +1 -0
  61. package/lib/consts.win32.js +3 -0
  62. package/lib/consts.win32.js.map +1 -0
  63. package/lib/index.d.ts +4 -0
  64. package/lib/index.d.ts.map +1 -0
  65. package/lib/index.js +3 -0
  66. package/lib/index.js.map +1 -0
  67. package/package.json +4 -4
package/CHANGELOG.json CHANGED
@@ -2,7 +2,67 @@
2
2
  "name": "@fluentui-react-native/experimental-shimmer",
3
3
  "entries": [
4
4
  {
5
- "date": "Sat, 18 Mar 2023 17:18:20 GMT",
5
+ "date": "Wed, 03 May 2023 07:04:22 GMT",
6
+ "tag": "@fluentui-react-native/experimental-shimmer_v0.8.28",
7
+ "version": "0.8.28",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui-react-native/experimental-shimmer",
13
+ "comment": "Bump @fluentui-react-native/framework to v0.9.9",
14
+ "commit": "52a53e376865d500b73f26ea9935e13036b04b1a"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui-react-native/experimental-shimmer",
19
+ "comment": "Bump @fluentui-react-native/tokens to v0.20.15",
20
+ "commit": "52a53e376865d500b73f26ea9935e13036b04b1a"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui-react-native/experimental-shimmer",
25
+ "comment": "Bump @fluentui-react-native/theming-utils to v0.23.11",
26
+ "commit": "52a53e376865d500b73f26ea9935e13036b04b1a"
27
+ }
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "date": "Tue, 21 Mar 2023 21:53:46 GMT",
33
+ "tag": "@fluentui-react-native/experimental-shimmer_v0.8.27",
34
+ "version": "0.8.27",
35
+ "comments": {
36
+ "patch": [
37
+ {
38
+ "author": "krsiler@microsoft.com",
39
+ "package": "@fluentui-react-native/experimental-shimmer",
40
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6",
41
+ "comment": "Trigger manual bump (no changes)"
42
+ },
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui-react-native/experimental-shimmer",
46
+ "comment": "Bump @fluentui-react-native/framework to v0.9.8",
47
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui-react-native/experimental-shimmer",
52
+ "comment": "Bump @fluentui-react-native/tokens to v0.20.14",
53
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@fluentui-react-native/experimental-shimmer",
58
+ "comment": "Bump @fluentui-react-native/theming-utils to v0.23.10",
59
+ "commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "date": "Sat, 18 Mar 2023 17:22:31 GMT",
6
66
  "tag": "@fluentui-react-native/experimental-shimmer_v0.8.26",
7
67
  "version": "0.8.26",
8
68
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,33 @@
1
1
  # Change Log - @fluentui-react-native/experimental-shimmer
2
2
 
3
- This log was last generated on Sat, 18 Mar 2023 17:18:20 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 03 May 2023 07:04:22 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.8.28
8
+
9
+ Wed, 03 May 2023 07:04:22 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @fluentui-react-native/framework to v0.9.9
14
+ - Bump @fluentui-react-native/tokens to v0.20.15
15
+ - Bump @fluentui-react-native/theming-utils to v0.23.11
16
+
17
+ ## 0.8.27
18
+
19
+ Tue, 21 Mar 2023 21:53:46 GMT
20
+
21
+ ### Patches
22
+
23
+ - Trigger manual bump (no changes) (krsiler@microsoft.com)
24
+ - Bump @fluentui-react-native/framework to v0.9.8
25
+ - Bump @fluentui-react-native/tokens to v0.20.14
26
+ - Bump @fluentui-react-native/theming-utils to v0.23.10
27
+
7
28
  ## 0.8.26
8
29
 
9
- Sat, 18 Mar 2023 17:18:20 GMT
30
+ Sat, 18 Mar 2023 17:22:31 GMT
10
31
 
11
32
  ### Patches
12
33
 
@@ -0,0 +1,3 @@
1
+ import type { ShimmerProps } from './Shimmer.types';
2
+ export declare const Shimmer: import("@fluentui-react-native/framework").ComposableComponent<ShimmerProps, import("./Shimmer.types.shared").ShimmerSlotProps, import("./Shimmer.types.shared").ShimmerTokens, object>;
3
+ //# sourceMappingURL=Shimmer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.d.ts","sourceRoot":"","sources":["../src/Shimmer.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAIjE,eAAO,MAAM,OAAO,yLAkHlB,CAAC"}
package/lib/Shimmer.js ADDED
@@ -0,0 +1,109 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ /** @jsx withSlots */
24
+ import { useRef, useEffect, useMemo, useCallback } from 'react';
25
+ import { Animated, I18nManager } from 'react-native';
26
+ import { compose, mergeProps, withSlots, buildUseStyling } from '@fluentui-react-native/framework';
27
+ import assertNever from 'assert-never';
28
+ import { Circle, ClipPath, Defs, LinearGradient, Rect, Stop, Svg, G } from 'react-native-svg';
29
+ import { stylingSettings } from './Shimmer.styling';
30
+ import { shimmerName } from './Shimmer.types';
31
+ var useStyling = buildUseStyling(stylingSettings);
32
+ export var Shimmer = compose(__assign(__assign({ displayName: shimmerName }, stylingSettings), { slots: {
33
+ root: Svg,
34
+ }, useRender: function (props, useSlots) {
35
+ var Slots = useSlots(props);
36
+ props = mergeProps(props, Slots.root({}).props);
37
+ var AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
38
+ var tokens = useStyling(props).root;
39
+ var memoizedShimmerData = useMemo(function () {
40
+ var _a, _b;
41
+ return ({
42
+ angle: props.angle ? props.angle : tokens['angle'],
43
+ containerWidth: ((_a = props === null || props === void 0 ? void 0 : props.style) === null || _a === void 0 ? void 0 : _a['width']) ? props === null || props === void 0 ? void 0 : props.style['width'] : '100%',
44
+ containerHeight: ((_b = props === null || props === void 0 ? void 0 : props.style) === null || _b === void 0 ? void 0 : _b['height']) ? props === null || props === void 0 ? void 0 : props.style['height'] : '100%',
45
+ delay: props.delay ? props.delay : tokens['delay'],
46
+ duration: props.duration ? props.duration : tokens['duration'],
47
+ shimmerColor: props.shimmerColor ? props.shimmerColor : tokens['shimmerColor'],
48
+ shimmerColorOpacity: tokens['shimmerColorOpacity'],
49
+ shimmerWaveColor: props.shimmerWaveColor ? props.shimmerWaveColor : tokens['shimmerWaveColor'],
50
+ shimmerWaveColorOpacity: tokens['shimmerWaveColorOpacity'],
51
+ });
52
+ }, [
53
+ props.angle,
54
+ props.delay,
55
+ props.duration,
56
+ props.shimmerColor,
57
+ props.shimmerColorOpacity,
58
+ props.shimmerWaveColor,
59
+ props.shimmerWaveColorOpacity,
60
+ props.style,
61
+ ]);
62
+ /* The shimmer animation is implemented using a LinearGradient which travels from left to right.
63
+ * Different angles are handled by rotating this gradient.
64
+ * The startValue is used to control the start position of the gradient animation, it is set as -2 to make sure it is starts off the screen for any angle.
65
+ * Similarly the endValue is set to 3 to make sure the gradient animation exits the entire screen for any angle.
66
+ */
67
+ var startValue = useRef(new Animated.Value(-2)).current;
68
+ var shimmerAnimation = useCallback(function () {
69
+ Animated.loop(Animated.timing(startValue, {
70
+ toValue: 3,
71
+ duration: memoizedShimmerData.duration,
72
+ delay: memoizedShimmerData.delay,
73
+ useNativeDriver: true,
74
+ })).start();
75
+ }, [memoizedShimmerData.delay, memoizedShimmerData.duration]);
76
+ useEffect(function () {
77
+ shimmerAnimation();
78
+ });
79
+ return function (rest) {
80
+ var _a = mergeProps(props, rest), elements = _a.elements, mergedProps = __rest(_a, ["elements"]);
81
+ var rows = [];
82
+ if (elements) {
83
+ for (var i = 0; i < elements.length; i++) {
84
+ var element = elements[i];
85
+ if (element.type == 'rect') {
86
+ rows.push(withSlots(Rect, { key: i, width: element.width, height: element.height, x: element.x, y: element.y, rx: element.borderRadiusX, ry: element.borderRadiusY }));
87
+ }
88
+ else if (element.type == 'circle') {
89
+ rows.push(withSlots(Circle, { key: i, r: element.radius, cx: element.cx, cy: element.cy }));
90
+ }
91
+ else {
92
+ assertNever(element);
93
+ }
94
+ }
95
+ }
96
+ // Flip the SVG if we are running in RTL
97
+ var rtlTransfrom = I18nManager.isRTL ? { translateX: memoizedShimmerData.containerWidth, scaleX: -1 } : {};
98
+ return (withSlots(Slots.root, __assign({}, mergedProps),
99
+ withSlots(Defs, null,
100
+ withSlots(AnimatedLinearGradient, { id: "gradient", x1: startValue, x2: "-1", gradientTransform: "rotate(".concat(memoizedShimmerData.angle, ")") },
101
+ withSlots(Stop, { offset: "10%", stopColor: memoizedShimmerData.shimmerColor, stopOpacity: memoizedShimmerData.shimmerColorOpacity }),
102
+ withSlots(Stop, { offset: "20%", stopColor: memoizedShimmerData.shimmerWaveColor, stopOpacity: memoizedShimmerData.shimmerWaveColorOpacity }),
103
+ withSlots(Stop, { offset: "30%", stopColor: memoizedShimmerData.shimmerColor, stopOpacity: memoizedShimmerData.shimmerColorOpacity })),
104
+ withSlots(ClipPath, { id: "shimmerView" }, rows)),
105
+ withSlots(G, { transform: rtlTransfrom },
106
+ withSlots(Rect, { x: "0", y: "0", width: memoizedShimmerData.containerWidth, height: memoizedShimmerData.containerHeight, fill: "url(#gradient)", clipPath: "url(#shimmerView)" }))));
107
+ };
108
+ } }));
109
+ //# sourceMappingURL=Shimmer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.js","sourceRoot":"","sources":["../src/Shimmer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAqB;AACrB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,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CAAC,cAAc,EACzC,MAAM,EAAE,mBAAmB,CAAC,eAAe,EAC3C,IAAI,EAAC,gBAAgB,EACrB,QAAQ,EAAC,mBAAmB,GAC5B,CACA,CACO,CACd,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC,IACD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { UseStylingOptions } from '@fluentui-react-native/framework';
2
+ import type { ShimmerProps, ShimmerSlotProps, ShimmerTokens } from './Shimmer.types';
3
+ export declare const stylingSettings: UseStylingOptions<ShimmerProps, ShimmerSlotProps, ShimmerTokens>;
4
+ //# sourceMappingURL=Shimmer.styling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.styling.d.ts","sourceRoot":"","sources":["../src/Shimmer.styling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIrF,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,YAAY,EAAE,gBAAgB,EAAE,aAAa,CA6B5F,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { buildProps } from '@fluentui-react-native/framework';
2
+ import { shimmerName } from './Shimmer.types';
3
+ import { defaultShimmerTokens } from './ShimmerTokens';
4
+ export var stylingSettings = {
5
+ tokens: [defaultShimmerTokens, shimmerName],
6
+ tokensThatAreAlsoProps: 'all',
7
+ slotProps: {
8
+ root: buildProps(function (tokens) { return ({
9
+ accessibilityRole: 'progressbar',
10
+ accessible: true,
11
+ style: { overflow: 'hidden', backgroundColor: tokens.backgroundColor },
12
+ angle: tokens.angle,
13
+ delay: tokens.delay,
14
+ duration: tokens.duration,
15
+ shimmerColor: tokens.shimmerColor,
16
+ shimmerColorOpacity: tokens.shimmerColorOpacity,
17
+ shimmerWaveColor: tokens.shimmerWaveColor,
18
+ shimmerWaveColorOpacity: tokens.shimmerWaveColorOpacity,
19
+ }); }, [
20
+ 'angle',
21
+ 'delay',
22
+ 'duration',
23
+ 'shimmerColor',
24
+ 'shimmerColorOpacity',
25
+ 'shimmerWaveColor',
26
+ 'shimmerWaveColorOpacity',
27
+ 'backgroundColor',
28
+ ]),
29
+ },
30
+ };
31
+ //# sourceMappingURL=Shimmer.styling.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.styling.js","sourceRoot":"","sources":["../src/Shimmer.styling.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,CAAC,IAAM,eAAe,GAAqE;IAC/F,MAAM,EAAE,CAAC,oBAAoB,EAAE,WAAW,CAAC;IAC3C,sBAAsB,EAAE,KAAK;IAC7B,SAAS,EAAE;QACT,IAAI,EAAE,UAAU,CACd,UAAC,MAAqB,IAAK,OAAA,CAAC;YAC1B,iBAAiB,EAAE,aAAa;YAChC,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,CAAC,eAAe,EAAE;YACtE,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,mBAAmB,EAAE,MAAM,CAAC,mBAAmB;YAC/C,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,uBAAuB,EAAE,MAAM,CAAC,uBAAuB;SACxD,CAAC,EAXyB,CAWzB,EACF;YACE,OAAO;YACP,OAAO;YACP,UAAU;YACV,cAAc;YACd,qBAAqB;YACrB,kBAAkB;YAClB,yBAAyB;YACzB,iBAAiB;SAClB,CACF;KACF;CACF,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { UseStylingOptions } from '@fluentui-react-native/framework';
2
+ import type { ShimmerProps, ShimmerTokens } from './Shimmer.types';
3
+ import type { ShimmerSlotProps } from './Shimmer.types.win32';
4
+ /**
5
+ * tell the styling hook how to build up the tokens
6
+ */
7
+ export declare const stylingSettings: UseStylingOptions<ShimmerProps, ShimmerSlotProps, ShimmerTokens>;
8
+ //# sourceMappingURL=Shimmer.styling.win32.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.styling.win32.d.ts","sourceRoot":"","sources":["../src/Shimmer.styling.win32.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,YAAY,EAAE,gBAAgB,EAAE,aAAa,CAuC5F,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { buildProps } from '@fluentui-react-native/framework';
2
+ import { shimmerName } from './Shimmer.types';
3
+ import { defaultShimmerTokens } from './ShimmerTokens.win32';
4
+ /**
5
+ * tell the styling hook how to build up the tokens
6
+ */
7
+ export var stylingSettings = {
8
+ tokens: [defaultShimmerTokens, shimmerName],
9
+ tokensThatAreAlsoProps: 'all',
10
+ slotProps: {
11
+ root: buildProps(function (tokens) { return ({
12
+ accessibilityRole: 'progressbar',
13
+ accessible: true,
14
+ style: { overflow: 'hidden', backgroundColor: tokens.backgroundColor },
15
+ }); }, ['backgroundColor']),
16
+ shimmerWaveContainer: buildProps(function (tokens) { return ({
17
+ delay: tokens.delay,
18
+ duration: tokens.duration,
19
+ shimmerColor: tokens.shimmerColor,
20
+ }); }, ['delay', 'duration', 'shimmerColor']),
21
+ shimmerWave: buildProps(function (tokens) { return ({
22
+ angle: tokens.angle,
23
+ shimmerColor: tokens.shimmerColor,
24
+ shimmerWaveColor: tokens.shimmerWaveColor,
25
+ shimmerWaveWidth: tokens.shimmerWaveWidth,
26
+ }); }, ['angle', 'shimmerColor', 'shimmerWaveColor', 'shimmerWaveWidth']),
27
+ clippingMask: buildProps(function (tokens) { return ({
28
+ backgroundColor: tokens.backgroundColor,
29
+ }); }, ['backgroundColor']),
30
+ },
31
+ };
32
+ //# sourceMappingURL=Shimmer.styling.win32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.styling.win32.js","sourceRoot":"","sources":["../src/Shimmer.styling.win32.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,IAAM,eAAe,GAAqE;IAC/F,MAAM,EAAE,CAAC,oBAAoB,EAAE,WAAW,CAAC;IAC3C,sBAAsB,EAAE,KAAK;IAC7B,SAAS,EAAE;QACT,IAAI,EAAE,UAAU,CACd,UAAC,MAAqB,IAAK,OAAA,CAAC;YAC1B,iBAAiB,EAAE,aAAa;YAChC,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,CAAC,eAAe,EAAE;SACvE,CAAC,EAJyB,CAIzB,EACF,CAAC,iBAAiB,CAAC,CACpB;QAED,oBAAoB,EAAE,UAAU,CAC9B,UAAC,MAAqB,IAAK,OAAA,CAAC;YAC1B,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,YAAY,EAAE,MAAM,CAAC,YAAY;SAClC,CAAC,EAJyB,CAIzB,EACF,CAAC,OAAO,EAAE,UAAU,EAAE,cAAc,CAAC,CACtC;QAED,WAAW,EAAE,UAAU,CACrB,UAAC,MAAqB,IAAK,OAAA,CAAC;YAC1B,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;SAC1C,CAAC,EALyB,CAKzB,EACF,CAAC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAClE;QAED,YAAY,EAAE,UAAU,CACtB,UAAC,MAAqB,IAAK,OAAA,CAAC;YAC1B,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC,CAAC,EAFyB,CAEzB,EACF,CAAC,iBAAiB,CAAC,CACpB;KACF;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Shimmer.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.test.d.ts","sourceRoot":"","sources":["../src/Shimmer.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+ import * as renderer from 'react-test-renderer';
3
+ import { Shimmer } from './Shimmer';
4
+ // mocks out setTimeout and other timer functions with mock functions, test will fail without this as we're using Animated API
5
+ jest.useFakeTimers();
6
+ function shimmerRects() {
7
+ return [
8
+ {
9
+ type: 'rect',
10
+ borderRadiusX: 3,
11
+ borderRadiusY: 3,
12
+ width: 100,
13
+ height: 20,
14
+ x: 90,
15
+ y: 70,
16
+ },
17
+ {
18
+ type: 'rect',
19
+ borderRadiusX: 3,
20
+ borderRadiusY: 3,
21
+ width: 150,
22
+ height: 20,
23
+ x: 90,
24
+ y: 42,
25
+ },
26
+ {
27
+ type: 'rect',
28
+ borderRadiusX: 3,
29
+ borderRadiusY: 3,
30
+ width: 200,
31
+ height: 20,
32
+ x: 90,
33
+ y: 15,
34
+ },
35
+ ];
36
+ }
37
+ var style = { width: 300, height: 100 };
38
+ describe('Shimmer component tests', function () {
39
+ it('Shimmer default', function () {
40
+ var tree = renderer.create(React.createElement(Shimmer, { elements: shimmerRects() })).toJSON();
41
+ expect(tree).toMatchSnapshot();
42
+ });
43
+ it('Shimmer with style prop', function () {
44
+ var tree = renderer.create(React.createElement(Shimmer, { elements: shimmerRects(), style: style })).toJSON();
45
+ expect(tree).toMatchSnapshot();
46
+ });
47
+ });
48
+ //# sourceMappingURL=Shimmer.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.test.js","sourceRoot":"","sources":["../src/Shimmer.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,8HAA8H;AAC9H,IAAI,CAAC,aAAa,EAAE,CAAC;AAErB,SAAS,YAAY;IACnB,OAAO;QACL;YACE,IAAI,EAAE,MAAM;YACZ,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,EAAE;YACV,CAAC,EAAE,EAAE;YACL,CAAC,EAAE,EAAE;SACN;QACD;YACE,IAAI,EAAE,MAAM;YACZ,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,EAAE;YACV,CAAC,EAAE,EAAE;YACL,CAAC,EAAE,EAAE;SACN;QACD;YACE,IAAI,EAAE,MAAM;YACZ,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,EAAE;YACV,CAAC,EAAE,EAAE;YACL,CAAC,EAAE,EAAE;SACN;KACF,CAAC;AACJ,CAAC;AAED,IAAM,KAAK,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAE1C,QAAQ,CAAC,yBAAyB,EAAE;IAClC,EAAE,CAAC,iBAAiB,EAAE;QACpB,IAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,OAAO,IAAC,QAAQ,EAAE,YAAY,EAAE,GAAI,CAAC,CAAC,MAAM,EAAE,CAAC;QAC7E,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE;QAC5B,IAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,OAAO,IAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,MAAM,EAAE,CAAC;QAC3F,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { shimmerName, ShimmerCircleElement, ShimmerRectElement, ShimmerElementTypes, ShimmerTokens, ShimmerSlotProps, ShimmerProps, ShimmerType, } from './Shimmer.types.shared';
2
+ //# sourceMappingURL=Shimmer.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.types.d.ts","sourceRoot":"","sources":["../src/Shimmer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,WAAW,GACZ,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { shimmerName, } from './Shimmer.types.shared';
2
+ //# sourceMappingURL=Shimmer.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.types.js","sourceRoot":"","sources":["../src/Shimmer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,GAQZ,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,145 @@
1
+ import type { ColorValue, ViewProps } from 'react-native';
2
+ import type { IBackgroundColorTokens } from '@fluentui-react-native/tokens';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ export declare const shimmerName = "Shimmer";
5
+ /**
6
+ * Properties necessary to define a circular Shimmer element.
7
+ */
8
+ export interface ShimmerCircleElement {
9
+ /**
10
+ * Shimmer element type.
11
+ */
12
+ type: 'circle';
13
+ /**
14
+ * Radius of the circle element.
15
+ * @defaultValue 12
16
+ */
17
+ radius?: number;
18
+ /**
19
+ * Note: cx and cy should be optional properties [or removed], with relative positioning being the default [or only] positioning mechanism.
20
+ * Note: The behavior of element intersections is undefined. https://www.github.com/Microsoft/fluentui-react-native Issue #866
21
+ */
22
+ /**
23
+ * The x-axis center of the circle element in the Shimmer relative to the origin [top-left, (0,0)].
24
+ */
25
+ cx: number;
26
+ /**
27
+ * The y-axis center of the circle element in the Shimmer relative to the origin [top-left, (0,0)].
28
+ */
29
+ cy: number;
30
+ }
31
+ /**
32
+ * Properties necessary to define a rectangular Shimmer element.
33
+ */
34
+ export interface ShimmerRectElement {
35
+ /**
36
+ * Shimmer element type.
37
+ */
38
+ type: 'rect';
39
+ /**
40
+ * Width of the rect.
41
+ * @defaultValue 100%
42
+ */
43
+ width?: number;
44
+ /**
45
+ * Height of the rect.
46
+ * @defaultValue 16
47
+ */
48
+ height?: number;
49
+ /**
50
+ * Border radius for the x-axis of a rounded rect.
51
+ * @defaultValue 0
52
+ */
53
+ borderRadiusX?: number;
54
+ /**
55
+ * Border radius for the y-axis of a rounded rect.
56
+ * @defaultValue 0
57
+ */
58
+ borderRadiusY?: number;
59
+ /**
60
+ * Note: x and y should be optional properties [or removed], with relative positioning being the default [or only] positioning mechanism.
61
+ * Note: The behavior of element intersections is undefined. https://www.github.com/Microsoft/fluentui-react-native Issue #866
62
+ */
63
+ /**
64
+ * The x-axis position of the rect element's top-left corner in the Shimmer relative to the origin [top-left, (0,0)].
65
+ */
66
+ x: number;
67
+ /**
68
+ * The y-axis position of the rect element's top-left corner in the Shimmer relative to the origin [top-left, (0,0)].
69
+ */
70
+ y: number;
71
+ }
72
+ export type ShimmerElementTypes = ShimmerCircleElement | ShimmerRectElement;
73
+ export interface ShimmerTokens extends IBackgroundColorTokens {
74
+ /**
75
+ * Specifies the Shimmer effect angle in degrees (produced by a gradient).
76
+ *
77
+ * @defaultValue 45 on @platform Android
78
+ * @defaultValue 0 on other platforms.
79
+ */
80
+ angle?: number;
81
+ /**
82
+ * Specifies the animation delay time in milliseconds.
83
+ *
84
+ * @defaultValue 500 on @platform win32
85
+ * @defaultValue 0 on other platforms.
86
+ */
87
+ delay?: number;
88
+ /**
89
+ * Specifies the time required to traverse the control in milliseconds.
90
+ *
91
+ * @defaultValue 1000 on @platform Android
92
+ * @defaultValue 2000 on @platform win32
93
+ * @defaultValue 7000 on other platforms.
94
+ */
95
+ duration?: number;
96
+ /**
97
+ * Specifies the opacity of the shimmer color.
98
+ * @defaultValue 1
99
+ */
100
+ shimmerColorOpacity?: number;
101
+ /**
102
+ * Specifies the opacity of the wave color.
103
+ * @defaultValue 1
104
+ */
105
+ shimmerWaveColorOpacity?: number;
106
+ /**
107
+ * Color you see when the shimmer wave is not animating.
108
+ *
109
+ * @defaultValue theme.colors.neutralStencil1 on @platform Android
110
+ * @defaultValue theme.colors.bodyFrameDivider on @platform win32
111
+ * @defaultValue #E1E1E1/#404040 for light/dark theme on other platforms.
112
+ */
113
+ shimmerColor?: ColorValue;
114
+ /**
115
+ * Defines the tip color of the wave which has a linear gradient.
116
+ * from shimmerColor to shimmerWaveColor to shimmerColor.
117
+ *
118
+ * @defaultValue theme.colors.neutralStencil2 on @platform Android
119
+ * @defaultValue #E1E1E1 on @platform win32
120
+ * @defaultValue white/black for light/dark theme on other platforms.
121
+ */
122
+ shimmerWaveColor?: ColorValue;
123
+ /**
124
+ * Width of the Shimmer wave.
125
+ *
126
+ * @defaultValue '100%' of the 'width' property
127
+ * @platform win32
128
+ */
129
+ shimmerWaveWidth?: number | string;
130
+ }
131
+ export interface ShimmerSlotProps {
132
+ root: SvgProps;
133
+ }
134
+ export interface ShimmerProps extends ViewProps, ShimmerTokens {
135
+ /**
136
+ * Shimmer shapes that define the masking effect of the Shimmer control.
137
+ */
138
+ elements: Array<ShimmerElementTypes>;
139
+ }
140
+ export interface ShimmerType {
141
+ props: ShimmerProps;
142
+ slotProps: ShimmerSlotProps;
143
+ tokens: ShimmerTokens;
144
+ }
145
+ //# sourceMappingURL=Shimmer.types.shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.types.shared.d.ts","sourceRoot":"","sources":["../src/Shimmer.types.shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,WAAW,YAAY,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IAEH;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IAEH;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,GAAG,kBAAkB,CAAC;AAE5E,MAAM,WAAW,aAAc,SAAQ,sBAAsB;IAC3D;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAE1B;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAE9B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,WAAW,YAAa,SAAQ,SAAS,EAAE,aAAa;IAC5D;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,MAAM,EAAE,aAAa,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export var shimmerName = 'Shimmer';
2
+ //# sourceMappingURL=Shimmer.types.shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.types.shared.js","sourceRoot":"","sources":["../src/Shimmer.types.shared.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,IAAM,WAAW,GAAG,SAAS,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ShimmerProps, ShimmerTokens } from './Shimmer.types.shared';
3
+ export { ShimmerProps, ShimmerTokens };
4
+ export { shimmerName, ShimmerRectElement, ShimmerElementTypes, ShimmerCircleElement } from './Shimmer.types.shared';
5
+ export interface ClippingMaskProps extends ShimmerTokens {
6
+ /**
7
+ * Extra parameter necessary to provide the mask effect generated from the provided ShimmerElements.
8
+ *
9
+ * @defaultValue null
10
+ */
11
+ clipPath?: string;
12
+ /**
13
+ * The height and width of the viewBox are internal props used by the SVG to size themselves and
14
+ * set up their viewBox to establish coordinate space for DPI scaling purposes.
15
+ */
16
+ viewBoxHeight: number;
17
+ viewBoxWidth: number;
18
+ }
19
+ export interface ShimmerWaveProps extends ShimmerTokens {
20
+ /**
21
+ * The height and width of the viewBox are internal props used by the SVG to size themselves and
22
+ * set up their viewBox to establish coordinate space for DPI scaling purposes.
23
+ */
24
+ viewBoxHeight: number;
25
+ viewBoxWidth: number;
26
+ }
27
+ export interface ShimmerSlotProps {
28
+ root: ViewProps;
29
+ clippingMask: ClippingMaskProps;
30
+ shimmerWave: ShimmerWaveProps;
31
+ shimmerWaveContainer: ShimmerWaveProps;
32
+ }
33
+ export interface ShimmerType {
34
+ props: ShimmerProps;
35
+ slotProps: ShimmerSlotProps;
36
+ tokens: ShimmerTokens;
37
+ }
38
+ //# sourceMappingURL=Shimmer.types.win32.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.types.win32.d.ts","sourceRoot":"","sources":["../src/Shimmer.types.win32.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEpH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,iBAAiB,CAAC;IAChC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,oBAAoB,EAAE,gBAAgB,CAAC;CACxC;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,MAAM,EAAE,aAAa,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export { shimmerName } from './Shimmer.types.shared';
2
+ //# sourceMappingURL=Shimmer.types.win32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.types.win32.js","sourceRoot":"","sources":["../src/Shimmer.types.win32.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAiE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ShimmerProps, ShimmerCircleElement, ShimmerRectElement } from './Shimmer.types.shared';
2
+ export { ShimmerCircleElement, ShimmerRectElement };
3
+ export declare const Shimmer: import("@fluentui-react-native/framework").ComposableComponent<ShimmerProps, import("./Shimmer.types.win32").ShimmerSlotProps, import("./Shimmer.types.shared").ShimmerTokens, object>;
4
+ //# sourceMappingURL=Shimmer.win32.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.win32.d.ts","sourceRoot":"","sources":["../src/Shimmer.win32.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAuB,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC1H,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;AAiEpD,eAAO,MAAM,OAAO,wLAwElB,CAAC"}
@@ -0,0 +1,130 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ /** @jsx withSlots */
24
+ import { View } from 'react-native';
25
+ import { compose, mergeProps } from '@fluentui-react-native/framework';
26
+ import { withSlots } from '@fluentui-react-native/framework';
27
+ import { assertNever } from 'assert-never';
28
+ import { ClipPath, Defs, LinearGradient, Path, Rect, Stop, Svg } from 'react-native-svg';
29
+ import { RCTNativeAnimatedShimmer } from './consts.win32';
30
+ import { stylingSettings } from './Shimmer.styling.win32';
31
+ import { shimmerName } from './Shimmer.types.shared';
32
+ import { convertRectToSvgPath, convertCircleToSvgPath } from './SvgShapeToPath';
33
+ var clippingMask = function (props) {
34
+ /**
35
+ * Absolute positioning is used to overlay the clipping mask on top of the shimmer wave.
36
+ *
37
+ * preserveAspectRatio = 'xMinYMin slice' asks the SVG to scale the viewBox up to fit the
38
+ * viewPort, starting from the origin of the viewPort and minimum coordinates of the viewBox.
39
+ * 'slice' removes the unnecessary remainder.
40
+ */
41
+ var backgroundColor = props.backgroundColor, viewBoxHeight = props.viewBoxHeight, viewBoxWidth = props.viewBoxWidth;
42
+ var svgProps = {
43
+ style: { position: 'absolute', height: viewBoxHeight, width: viewBoxWidth },
44
+ viewBox: '0 0 ' + viewBoxWidth + ' ' + viewBoxHeight,
45
+ preserveAspectRatio: 'xMinYMin slice',
46
+ };
47
+ return (withSlots(Svg, __assign({}, svgProps),
48
+ withSlots(Defs, null,
49
+ withSlots(ClipPath, { id: "shimmerCuts" },
50
+ withSlots(Path, { d: props.clipPath, clipRule: "evenodd" }))),
51
+ withSlots(Rect, { width: "100%", height: "100%", fill: backgroundColor, clipPath: "url(#shimmerCuts)" })));
52
+ };
53
+ var wave = function (props) {
54
+ var shimmerColor = props.shimmerColor, shimmerColorOpacity = props.shimmerColorOpacity, shimmerWaveColor = props.shimmerWaveColor, shimmerWaveColorOpacity = props.shimmerWaveColorOpacity, viewBoxHeight = props.viewBoxHeight, viewBoxWidth = props.viewBoxWidth;
55
+ /**
56
+ * See the comment above for an explanation of preserveAspectRatio.
57
+ */
58
+ var svgProps = {
59
+ style: { height: viewBoxHeight, width: viewBoxWidth },
60
+ viewBox: '0 0 ' + viewBoxWidth + ' ' + viewBoxHeight,
61
+ preserveAspectRatio: 'xMinYMin slice',
62
+ };
63
+ return (withSlots(Svg, __assign({}, svgProps),
64
+ withSlots(LinearGradient, { id: "gradient" },
65
+ withSlots(Stop, { stopColor: shimmerColor, stopOpacity: shimmerColorOpacity }),
66
+ withSlots(Stop, { offset: "20%", stopColor: shimmerWaveColor, stopOpacity: shimmerWaveColorOpacity }),
67
+ withSlots(Stop, { offset: "40%", stopColor: shimmerColor, stopOpacity: shimmerColorOpacity })),
68
+ withSlots(Rect, { width: props.shimmerWaveWidth, height: "100%", fill: "url(#gradient)" })));
69
+ };
70
+ var waveContainer = function (props) {
71
+ var shimmerColor = props.shimmerColor, viewBoxHeight = props.viewBoxHeight, viewBoxWidth = props.viewBoxWidth;
72
+ return (withSlots(RCTNativeAnimatedShimmer, __assign({}, __assign(__assign({}, props), { style: { backgroundColor: shimmerColor, height: viewBoxHeight, width: viewBoxWidth, overflow: 'hidden' } }))));
73
+ };
74
+ export var Shimmer = compose(__assign(__assign({ displayName: shimmerName }, stylingSettings), { slots: {
75
+ root: View,
76
+ clippingMask: clippingMask,
77
+ shimmerWave: wave,
78
+ shimmerWaveContainer: waveContainer,
79
+ }, useRender: function (props, useSlots) {
80
+ var Slots = useSlots(props);
81
+ return function (rest) {
82
+ var _a = mergeProps(props, rest), elements = _a.elements, mergedProps = __rest(_a, ["elements"]);
83
+ /**
84
+ * Generate a clip path from the provided element shapes, with their path parameter strings generated from their corresponding properties.
85
+ * Ideally this would be better possible with functions from the shape elements themselves and not to rely on our own calculations.
86
+ *
87
+ * One nuanced consideration is scaling the SVG with DPI. Without specifying a viewBox, points are considered to be pixels on an SVG canvas.
88
+ * When the native control is scaled the SVG canvas will scale up -- but pixel coordinates will not, changing the visual for different pixel densities.
89
+ * By providing a viewBox appropriate for our SVG the viewBox containing the graphics will be scaled up to fit the viewPort.
90
+ * Since we're programmatically generating the visual, we can assert our viewBox is `0 0 xMax yMax` where xMax and yMax are the greatest
91
+ * X and Y points used by a shape.
92
+ */
93
+ var clipPathsAsMask = [];
94
+ var xMax = 0;
95
+ var yMax = 0;
96
+ if (elements) {
97
+ elements.forEach(function (element) {
98
+ if (element.type == 'circle') {
99
+ clipPathsAsMask = clipPathsAsMask.concat(convertCircleToSvgPath(element));
100
+ var xMaxCandidate = element.cx + element.radius;
101
+ var yMaxCandidate = element.cy + element.radius;
102
+ xMax = xMax >= xMaxCandidate ? xMax : xMaxCandidate;
103
+ yMax = yMax >= yMaxCandidate ? yMax : yMaxCandidate;
104
+ }
105
+ else if (element.type == 'rect') {
106
+ clipPathsAsMask = clipPathsAsMask.concat(convertRectToSvgPath(element));
107
+ var xMaxCandidate = element.x + element.width;
108
+ var yMaxCandidate = element.y + element.height;
109
+ xMax = xMax >= xMaxCandidate ? xMax : xMaxCandidate;
110
+ yMax = yMax >= yMaxCandidate ? yMax : yMaxCandidate;
111
+ }
112
+ else {
113
+ assertNever(element);
114
+ }
115
+ });
116
+ }
117
+ /**
118
+ * Win32 D2D1 doesn't directly support SVG mask elements, so we're going to generate a mask
119
+ * by manipulating our clip path for the same effect. We do so utilizing the clip-rule='evenodd'
120
+ * and drawing a rectangle around the entire svg viewBox, causing all inner elements to be "clipped out"
121
+ * instead of "clipped around," generating the visual we desire with the linear gradient below the mask.
122
+ */
123
+ var mergedClipPath = clipPathsAsMask.join(' ').concat('M 0 0 h ' + xMax + ' v ' + yMax + ' h -' + xMax + ' z ');
124
+ return (withSlots(Slots.root, __assign({}, mergedProps),
125
+ withSlots(Slots.shimmerWaveContainer, { viewBoxHeight: yMax, viewBoxWidth: xMax },
126
+ withSlots(Slots.shimmerWave, { viewBoxHeight: yMax, viewBoxWidth: xMax })),
127
+ withSlots(Slots.clippingMask, { clipPath: mergedClipPath, viewBoxHeight: yMax, viewBoxWidth: xMax })));
128
+ };
129
+ } }));
130
+ //# sourceMappingURL=Shimmer.win32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.win32.js","sourceRoot":"","sources":["../src/Shimmer.win32.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAqB;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,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,aAAa,CAAC;qBACrD;yBAAM;wBACL,WAAW,CAAC,OAAO,CAAC,CAAC;qBACtB;gBACH,CAAC,CAAC,CAAC;aACJ;YAED;;;;;eAKG;YAEH,IAAM,cAAc,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC;YAEnH,OAAO,CACL,UAAC,KAAK,CAAC,IAAI,eAAK,WAAW;gBACzB,UAAC,KAAK,CAAC,oBAAoB,IAAC,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI;oBACjE,UAAC,KAAK,CAAC,WAAW,IAAC,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,GAAI,CACnC;gBAC7B,UAAC,KAAK,CAAC,YAAY,IAAC,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,GAAI,CAC9E,CACd,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC,IACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { defaultShimmerTokens } from './ShimmerTokens.mobile';
2
+ //# sourceMappingURL=ShimmerTokens.android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShimmerTokens.android.d.ts","sourceRoot":"","sources":["../src/ShimmerTokens.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { defaultShimmerTokens } from './ShimmerTokens.mobile';
2
+ //# sourceMappingURL=ShimmerTokens.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShimmerTokens.android.js","sourceRoot":"","sources":["../src/ShimmerTokens.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Theme } from '@fluentui-react-native/framework';
2
+ import type { TokenSettings } from '@fluentui-react-native/use-styling';
3
+ import type { ShimmerTokens } from './Shimmer.types';
4
+ export declare const defaultShimmerTokens: TokenSettings<ShimmerTokens, Theme>;
5
+ //# sourceMappingURL=ShimmerTokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShimmerTokens.d.ts","sourceRoot":"","sources":["../src/ShimmerTokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,aAAa,EAAE,KAAK,CAShD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { defaultShimmerTokens } from './ShimmerTokens.mobile';
2
+ //# sourceMappingURL=ShimmerTokens.ios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShimmerTokens.ios.d.ts","sourceRoot":"","sources":["../src/ShimmerTokens.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { defaultShimmerTokens } from './ShimmerTokens.mobile';
2
+ //# sourceMappingURL=ShimmerTokens.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShimmerTokens.ios.js","sourceRoot":"","sources":["../src/ShimmerTokens.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { getCurrentAppearance } from '@fluentui-react-native/theming-utils';
2
+ export var defaultShimmerTokens = function (theme) {
3
+ return ({
4
+ angle: 0,
5
+ delay: 0,
6
+ duration: 7000,
7
+ shimmerColor: getCurrentAppearance(theme.host.appearance, 'light') === 'light' ? '#E1E1E1' : '#404040',
8
+ shimmerColorOpacity: 1,
9
+ shimmerWaveColor: getCurrentAppearance(theme.host.appearance, 'light') === 'light' ? 'white' : 'black',
10
+ shimmerWaveColorOpacity: 1,
11
+ });
12
+ };
13
+ //# sourceMappingURL=ShimmerTokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShimmerTokens.js","sourceRoot":"","sources":["../src/ShimmerTokens.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAK5E,MAAM,CAAC,IAAM,oBAAoB,GAAwC,UAAC,KAAY;IACpF,OAAA,CAAC;QACC,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QACtG,mBAAmB,EAAE,CAAC;QACtB,gBAAgB,EAAE,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;QACtG,uBAAuB,EAAE,CAAC;KACT,CAAA;AARnB,CAQmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Theme } from '@fluentui-react-native/framework';
2
+ import type { TokenSettings } from '@fluentui-react-native/use-styling';
3
+ import type { ShimmerTokens } from './Shimmer.types';
4
+ export declare const defaultShimmerTokens: TokenSettings<ShimmerTokens, Theme>;
5
+ //# sourceMappingURL=ShimmerTokens.mobile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShimmerTokens.mobile.d.ts","sourceRoot":"","sources":["../src/ShimmerTokens.mobile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,aAAa,EAAE,KAAK,CAShD,CAAC"}
@@ -0,0 +1,12 @@
1
+ export var defaultShimmerTokens = function (theme) {
2
+ return ({
3
+ angle: 45,
4
+ delay: 0,
5
+ duration: 1000,
6
+ shimmerColor: theme.colors.neutralStencil1,
7
+ shimmerColorOpacity: 1,
8
+ shimmerWaveColor: theme.colors.neutralStencil2,
9
+ shimmerWaveColorOpacity: 1,
10
+ });
11
+ };
12
+ //# sourceMappingURL=ShimmerTokens.mobile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShimmerTokens.mobile.js","sourceRoot":"","sources":["../src/ShimmerTokens.mobile.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,IAAM,oBAAoB,GAAwC,UAAC,KAAY;IACpF,OAAA,CAAC;QACC,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe;QAC1C,mBAAmB,EAAE,CAAC;QACtB,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe;QAC9C,uBAAuB,EAAE,CAAC;KACT,CAAA;AARnB,CAQmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Theme } from '@fluentui-react-native/framework';
2
+ import type { TokenSettings } from '@fluentui-react-native/use-styling';
3
+ import type { ShimmerTokens } from './Shimmer.types';
4
+ export declare const defaultShimmerTokens: TokenSettings<ShimmerTokens, Theme>;
5
+ //# sourceMappingURL=ShimmerTokens.win32.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShimmerTokens.win32.d.ts","sourceRoot":"","sources":["../src/ShimmerTokens.win32.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,aAAa,EAAE,KAAK,CAWhD,CAAC"}
@@ -0,0 +1,14 @@
1
+ export var defaultShimmerTokens = function (theme) {
2
+ return ({
3
+ angle: 0,
4
+ backgroundColor: theme.colors.background,
5
+ delay: 500,
6
+ duration: 2000,
7
+ shimmerColor: theme.colors.bodyFrameDivider,
8
+ shimmerColorOpacity: 1,
9
+ shimmerWaveColor: '#E1E1E1',
10
+ shimmerWaveColorOpacity: 1,
11
+ shimmerWaveWidth: '100%',
12
+ });
13
+ };
14
+ //# sourceMappingURL=ShimmerTokens.win32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShimmerTokens.win32.js","sourceRoot":"","sources":["../src/ShimmerTokens.win32.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,IAAM,oBAAoB,GAAwC,UAAC,KAAY;IACpF,OAAA,CAAC;QACC,KAAK,EAAE,CAAC;QACR,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU;QACxC,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB;QAC3C,mBAAmB,EAAE,CAAC;QACtB,gBAAgB,EAAE,SAAS;QAC3B,uBAAuB,EAAE,CAAC;QAC1B,gBAAgB,EAAE,MAAM;KACP,CAAA;AAVnB,CAUmB,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * These functions are necessary to deal with the win32 platform issue of d2d1 not supporting SVG <Mask> elements.
3
+ * We can support them indirectly by inverting a <ClipPath> element, with the troublesome issue of there being
4
+ * no direct way to do so -- which makes sense in general, one would just use <Mask> instead.
5
+ *
6
+ * The most desirable interface would be a ClipPath.invert property or function and/or a toString; masking
7
+ * is generally an inversion of clipping, but we do not have such properties or functions. This void can
8
+ * be filled by implementing directly (a worthwhile PR to react-native-svg) or by implementing toString functions
9
+ * for shapes individually. The shapes individually can be composed into a single clip path string, along with
10
+ * a shape that covers the entire SVG canvas. Using the evenodd clip rule, this effectively becomes a mask.
11
+ *
12
+ * This solution is far from ideal and may have incompatibilities with <ClipPath> features; for Shimmer, it's sufficient,
13
+ * as we only support rounded rects and circles, with a circle being a rounded rect of borderRadius=length/2=width/2.
14
+ */
15
+ import type { ShimmerCircleElement, ShimmerRectElement } from './Shimmer.types';
16
+ export declare function convertRectToSvgPath(rectShape: ShimmerRectElement): string;
17
+ export declare function convertCircleToSvgPath(circleShape: ShimmerCircleElement): string;
18
+ //# sourceMappingURL=SvgShapeToPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SvgShapeToPath.d.ts","sourceRoot":"","sources":["../src/SvgShapeToPath.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAgJhF,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,kBAAkB,GAAG,MAAM,CAU1E;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,oBAAoB,GAAG,MAAM,CAWhF"}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * These functions are necessary to deal with the win32 platform issue of d2d1 not supporting SVG <Mask> elements.
3
+ * We can support them indirectly by inverting a <ClipPath> element, with the troublesome issue of there being
4
+ * no direct way to do so -- which makes sense in general, one would just use <Mask> instead.
5
+ *
6
+ * The most desirable interface would be a ClipPath.invert property or function and/or a toString; masking
7
+ * is generally an inversion of clipping, but we do not have such properties or functions. This void can
8
+ * be filled by implementing directly (a worthwhile PR to react-native-svg) or by implementing toString functions
9
+ * for shapes individually. The shapes individually can be composed into a single clip path string, along with
10
+ * a shape that covers the entire SVG canvas. Using the evenodd clip rule, this effectively becomes a mask.
11
+ *
12
+ * This solution is far from ideal and may have incompatibilities with <ClipPath> features; for Shimmer, it's sufficient,
13
+ * as we only support rounded rects and circles, with a circle being a rounded rect of borderRadius=length/2=width/2.
14
+ */
15
+ // Note for explicit clarity: length and width represent the full length and width of the rect, and not
16
+ // the straight edge segments (i.e. length - 2*borderRadius).
17
+ // borderRadius[X|Y] cannot be larger than [length/2 or width]/2; it would not be able to connect to the edge
18
+ // segments of the rect if so, and will be reduced to the maximum values accordingly.
19
+ function convertRoundedRectToSvgPath(x, y, borderRadiusX, borderRadiusY, width, height) {
20
+ // Reduce borderRadii to maximum usable size.
21
+ if (borderRadiusX * 2 > width) {
22
+ borderRadiusX = width / 2;
23
+ }
24
+ if (borderRadiusY * 2 > height) {
25
+ borderRadiusY = height / 2;
26
+ }
27
+ var horizontalEdgeLength = width - borderRadiusX * 2;
28
+ var verticalEdgeLength = height - borderRadiusY * 2;
29
+ var xAxisRotation = 0;
30
+ var largeArcFlag = 0;
31
+ var sweepArcFlag = 1;
32
+ /**
33
+ * The general manner in which we will draw our rounded rect is in the following
34
+ * order of points.
35
+ *
36
+ * - Forward (/) and back (\) slashes represent borderRadiusY and borderRadiusX, respectively.
37
+ * - The un-rounded rect points are represented by center dots (and steal 1 unit from the borderRadii).
38
+ * - x and y parameters are left out as path arguments use relative coordinates (vs absolute coordinates).
39
+ * - Coordinate axis aids are present to avoid counting for any necessary clarification.
40
+ *
41
+ * x: arbitrary
42
+ * y: arbitrary
43
+ * width: 24
44
+ * height: 12
45
+ * borderRadiusX: 5
46
+ * borderRadiusY: 3
47
+ *
48
+ * 0123456789012345678901234
49
+ *
50
+ * (1+9) (2)
51
+ * ⬇ ⬇
52
+ * 0 •\\\\--------------\\\\•
53
+ * 1 / /
54
+ * 2 / /
55
+ * 3 (8) ➡ | | ⬅ (3)
56
+ * 4 | |
57
+ * 5 | |
58
+ * 6 | |
59
+ * 7 | |
60
+ * 8 | |
61
+ * 9 (7) ➡ | | ⬅ (4)
62
+ * 0 / /
63
+ * 1 / /
64
+ * 2 •\\\\--------------\\\\•
65
+ * ⬆ ⬆
66
+ * (6) (5)
67
+ *
68
+ * Which would generate the following path:
69
+ * const path = 'M {x+5} ${y+3} ' +
70
+ * 'h 14 ' +
71
+ * 'a 5 3 0 0 1 5 3' +
72
+ * 'v 6 ' +
73
+ * 'a 5 3 0 0 1 -5 3' +
74
+ * 'h -14 ' +
75
+ * 'a 5 3 0 0 1 -5 -3' +
76
+ * 'v -6 ' +
77
+ * 'a 5 3 0 0 1 5 -3 Z';
78
+ */
79
+ // We start at the left-most point of the top edge.
80
+ // M: lift and move the pen to [x] [y] coordinates -- does not draw.
81
+ var path = ['M', x + borderRadiusX, y];
82
+ // draw to the right-most point of the top edge.
83
+ // h: horizontally draw a line [n] units relative to the current pen position.
84
+ path = path.concat(['h', horizontalEdgeLength]);
85
+ /**
86
+ * draw the arc for the top-right corner. If the rect is not rounded, the arc will be 0 length.
87
+ * a: draw an arc relative to the current pen position with the following parameters:
88
+ * rx: X-axis ellipse radius
89
+ * ry: Y-axis ellipse radius
90
+ * x-axis-rotation: rotation of the ellipse relative to the current coordinate system
91
+ * large-arc-flag: See https://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands
92
+ * sweep-arc-flag: See https://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands
93
+ * (dx, dy): relative end coordinate
94
+ *
95
+ * 'a rx ry x-axis-rotation large-arc-flag sweep-arc-flag dx dy'
96
+ *
97
+ * We will use x-axis-rotation = 0, large-arc-flag = 0, and sweep-arc-flag = 1 for our path generation.
98
+ * */
99
+ path = path.concat(['a', borderRadiusX, borderRadiusY, xAxisRotation, largeArcFlag, sweepArcFlag, borderRadiusX, borderRadiusY]);
100
+ /**
101
+ * Draw to the bottom-most point of the right edge.
102
+ * v: vertically draw a line [n] units relative to the current pen position.
103
+ */
104
+ path = path.concat(['v', verticalEdgeLength]);
105
+ /**
106
+ * Draw the arc for the bottom-right corner.
107
+ */
108
+ path = path.concat(['a', borderRadiusX, borderRadiusY, xAxisRotation, largeArcFlag, sweepArcFlag, -borderRadiusX, borderRadiusY]);
109
+ /**
110
+ * Draw to the left-most point of the bottom edge.
111
+ */
112
+ path = path.concat(['h', -horizontalEdgeLength]);
113
+ /**
114
+ * Draw the bottom-left corner.
115
+ */
116
+ path = path.concat(['a', borderRadiusX, borderRadiusY, xAxisRotation, largeArcFlag, sweepArcFlag, -borderRadiusX, -borderRadiusY]);
117
+ /**
118
+ * Draw to the top-most point of the left edge.
119
+ */
120
+ path = path.concat(['v', -verticalEdgeLength]);
121
+ /**
122
+ * Draw the top-left corner.
123
+ */
124
+ path = path.concat(['a', borderRadiusX, borderRadiusY, xAxisRotation, largeArcFlag, sweepArcFlag, borderRadiusX, -borderRadiusY]);
125
+ /**
126
+ * Finally, close the shape. While we have manually returned to the same coordinate we started with, closing and not-closing the shape
127
+ * can have different behavior depending on other properties.
128
+ * z or Z: close the shape.
129
+ */
130
+ path = path.concat('z');
131
+ /**
132
+ * Join all arguments with spaces and return the completed path.
133
+ */
134
+ return path.join(' ');
135
+ }
136
+ export function convertRectToSvgPath(rectShape) {
137
+ // Extract necessary args and generate the corresponding path for the shape.
138
+ return convertRoundedRectToSvgPath(rectShape.x ? rectShape.x : 0, rectShape.y ? rectShape.y : 0, rectShape.borderRadiusX ? rectShape.borderRadiusX : 0, rectShape.borderRadiusX ? rectShape.borderRadiusY : 0, rectShape.width ? rectShape.width : 100, rectShape.height ? rectShape.height : 16);
139
+ }
140
+ export function convertCircleToSvgPath(circleShape) {
141
+ var radius = circleShape.radius ? circleShape.radius : 12;
142
+ return convertRoundedRectToSvgPath(circleShape.cx ? circleShape.cx - circleShape.radius : 12, circleShape.cy ? circleShape.cy - circleShape.radius : 12, radius, radius, radius * 2, radius * 2);
143
+ }
144
+ //# sourceMappingURL=SvgShapeToPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SvgShapeToPath.js","sourceRoot":"","sources":["../src/SvgShapeToPath.ts"],"names":[],"mappings":"AAAA;;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C,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EACrD,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EACvC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CACzC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,WAAiC;IACtE,IAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAE5D,OAAO,2BAA2B,CAChC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EACzD,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EACzD,MAAM,EACN,MAAM,EACN,MAAM,GAAG,CAAC,EACV,MAAM,GAAG,CAAC,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const RCTNativeAnimatedShimmer: import("react-native").HostComponent<unknown>;
2
+ //# sourceMappingURL=consts.win32.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.win32.d.ts","sourceRoot":"","sources":["../src/consts.win32.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,wBAAwB,+CAAoD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ensureNativeComponent } from '@fluentui-react-native/component-cache';
2
+ export var RCTNativeAnimatedShimmer = ensureNativeComponent('RCTNativeAnimatedShimmer');
3
+ //# sourceMappingURL=consts.win32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.win32.js","sourceRoot":"","sources":["../src/consts.win32.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,MAAM,CAAC,IAAM,wBAAwB,GAAG,qBAAqB,CAAC,0BAA0B,CAAC,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export { Shimmer } from './Shimmer';
2
+ export { shimmerName } from './Shimmer.types';
3
+ export type { ShimmerCircleElement, ShimmerElementTypes, ShimmerProps, ShimmerRectElement, ShimmerSlotProps, ShimmerTokens, ShimmerType, } from './Shimmer.types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,WAAW,GACZ,MAAM,iBAAiB,CAAC"}
package/lib/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { Shimmer } from './Shimmer';
2
+ export { shimmerName } from './Shimmer.types';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/experimental-shimmer",
3
- "version": "0.8.26",
3
+ "version": "0.8.28",
4
4
  "description": "A cross-platform Fluent Shimmer component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -22,9 +22,9 @@
22
22
  "directory": "packages/experimental/Shimmer"
23
23
  },
24
24
  "dependencies": {
25
- "@fluentui-react-native/framework": "0.9.7",
26
- "@fluentui-react-native/tokens": ">=0.20.13 <1.0.0",
27
- "@fluentui-react-native/theming-utils": ">=0.23.9 <1.0.0",
25
+ "@fluentui-react-native/framework": "0.9.9",
26
+ "@fluentui-react-native/tokens": ">=0.20.15 <1.0.0",
27
+ "@fluentui-react-native/theming-utils": ">=0.23.11 <1.0.0",
28
28
  "@fluentui-react-native/component-cache": "^1.4.4",
29
29
  "@fluentui-react-native/use-styling": "^0.9.4"
30
30
  },