react-native-skelo 0.0.3 โ†’ 0.0.5

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 (38) hide show
  1. package/README.md +86 -92
  2. package/lib/commonjs/animations/PulseAnimation.js +17 -18
  3. package/lib/commonjs/animations/PulseAnimation.js.map +1 -1
  4. package/lib/commonjs/animations/ShimmerAnimation.js +47 -28
  5. package/lib/commonjs/animations/ShimmerAnimation.js.map +1 -1
  6. package/lib/commonjs/components/Skeleton.js +22 -16
  7. package/lib/commonjs/components/Skeleton.js.map +1 -1
  8. package/lib/commonjs/core/parser/expandLists.js +67 -0
  9. package/lib/commonjs/core/parser/expandLists.js.map +1 -0
  10. package/lib/commonjs/index.js +1 -0
  11. package/lib/commonjs/index.js.map +1 -1
  12. package/lib/module/animations/PulseAnimation.js +18 -19
  13. package/lib/module/animations/PulseAnimation.js.map +1 -1
  14. package/lib/module/animations/ShimmerAnimation.js +48 -29
  15. package/lib/module/animations/ShimmerAnimation.js.map +1 -1
  16. package/lib/module/components/Skeleton.js +22 -16
  17. package/lib/module/components/Skeleton.js.map +1 -1
  18. package/lib/module/core/parser/expandLists.js +61 -0
  19. package/lib/module/core/parser/expandLists.js.map +1 -0
  20. package/lib/module/index.js +4 -0
  21. package/lib/module/index.js.map +1 -1
  22. package/lib/typescript/animations/PulseAnimation.d.ts.map +1 -1
  23. package/lib/typescript/animations/ShimmerAnimation.d.ts.map +1 -1
  24. package/lib/typescript/components/Skeleton.d.ts +1 -1
  25. package/lib/typescript/components/Skeleton.d.ts.map +1 -1
  26. package/lib/typescript/core/parser/expandLists.d.ts +3 -0
  27. package/lib/typescript/core/parser/expandLists.d.ts.map +1 -0
  28. package/lib/typescript/index.d.ts +1 -0
  29. package/lib/typescript/index.d.ts.map +1 -1
  30. package/lib/typescript/types/skeleton.d.ts +8 -0
  31. package/lib/typescript/types/skeleton.d.ts.map +1 -1
  32. package/package.json +5 -10
  33. package/src/animations/PulseAnimation.tsx +17 -27
  34. package/src/animations/ShimmerAnimation.tsx +36 -47
  35. package/src/components/Skeleton.tsx +24 -18
  36. package/src/core/parser/expandLists.tsx +77 -0
  37. package/src/index.ts +4 -0
  38. package/src/types/skeleton.ts +9 -0
package/README.md CHANGED
@@ -1,135 +1,121 @@
1
1
  <div align="center">
2
2
 
3
- # react-native-skelo
3
+ # ๐Ÿฆด react-native-skelo
4
4
 
5
- **Write your UI once. Skelo builds the loading state automatically.**
5
+ ### Write your UI once. Skelo builds the loading state โ€” automatically.
6
6
 
7
- [![npm](https://img.shields.io/npm/v/react-native-skelo)](https://www.npmjs.com/package/react-native-skelo)
8
- [![license](https://img.shields.io/npm/l/react-native-skelo)](./LICENSE)
7
+ [![npm version](https://img.shields.io/npm/v/react-native-skelo?color=5FC9F8&label=npm)](https://www.npmjs.com/package/react-native-skelo)
8
+ [![downloads](https://img.shields.io/npm/dm/react-native-skelo?color=5FC9F8)](https://www.npmjs.com/package/react-native-skelo)
9
+ [![license](https://img.shields.io/npm/l/react-native-skelo?color=5FC9F8)](./LICENSE)
10
+ [![PRs welcome](https://img.shields.io/badge/PRs-welcome-5FC9F8.svg)](https://github.com/shubhanshubb/react-native-skelo)
11
+
12
+ <br />
13
+
14
+ <img src="./assets/demo.gif" alt="Skelo skeleton demo" width="270" />
15
+ &nbsp;&nbsp;
16
+ <img src="./assets/grid.gif" alt="Image-grid skeleton" width="270" />
9
17
 
10
18
  </div>
11
19
 
12
- > โš ๏ธ **Pre-release (`0.0.x`).** Early and evolving โ€” the API may change. The first **stable** release will be **`0.1.0`**. The `deep` engine is experimental โ€” see [caveats](#deep-mode-caveats-experimental).
20
+ <br />
13
21
 
14
- Skeleton loading screens usually mean building โ€” and maintaining โ€” a second copy of your UI. Skelo derives the skeleton from the UI you already wrote.
22
+ **Stop building and maintaining a second copy of your UI just for loading states.** Wrap your components in `<Skeleton>` and Skelo generates a matching skeleton โ€” sized from the styles you already wrote.
15
23
 
16
24
  ```tsx
17
- import { Skeleton } from 'react-native-skelo';
18
-
19
25
  <Skeleton loading={isLoading}>
20
- <View style={styles.card}>
21
- <Image style={styles.avatar} />
22
- <Text style={styles.name}>{user.name}</Text>
23
- </View>
26
+ <ProfileCard user={user} />
24
27
  </Skeleton>
25
28
  ```
26
29
 
27
- While `loading`, Skelo reads the tree and its styles and renders a matching skeleton (circle avatar, text bar). When `loading` is `false`, it renders your real content.
30
+ That's the whole API. No skeleton screens to hand-draw, no keeping two layouts in sync.
28
31
 
29
- ## Installation
32
+ > โš ๏ธ **Pre-release (`0.0.x`)** โ€” evolving fast; the API may change before the stable `0.1.0`.
30
33
 
31
- ```bash
32
- npm install react-native-skelo react-native-reanimated
33
- ```
34
+ ---
34
35
 
35
- That's all you need for the basic (inline) and `styles` usage. The shimmer uses
36
- React Native's built-in `experimental_backgroundImage` gradient (New
37
- Architecture) โ€” no gradient library required.
36
+ ## โœจ Features
38
37
 
39
- ### To enable `deep` mode (optional)
38
+ - ๐Ÿช„ **Zero-config** โ€” wrap a component, get a skeleton. No setup, no separate loading screen.
39
+ - ๐Ÿง  **Sees inside your components** โ€” introspects custom components automatically (no inlining).
40
+ - ๐Ÿ“‹ **Lists included** โ€” `FlatList` / `SectionList` render skeleton rows while data loads.
41
+ - ๐ŸŽจ **Shimmer ยท Pulse ยท None** โ€” built-in animations on the native driver.
42
+ - ๐Ÿชถ **No dependencies** โ€” no `reanimated`, no gradient library. Just `react` + `react-native`.
43
+ - ๐Ÿ“ **Style-aware** โ€” every skeleton is sized from your real element styles.
40
44
 
41
- `deep` mode is opt-in so the core library never bundles a reconciler you don't
42
- use. Install `react-reconciler` (matching your React version) and import the
43
- deep entry **once** in your app's entry file:
45
+ ---
44
46
 
45
- ```bash
46
- # React 19:
47
- npm install react-reconciler@0.31.0
48
- # React 18:
49
- npm install react-reconciler@0.29.2
50
- ```
47
+ ## ๐Ÿ“ฆ Installation
51
48
 
52
- ```js
53
- // index.js (app entry)
54
- import 'react-native-skelo/deep';
49
+ ```bash
50
+ npm install react-native-skelo
55
51
  ```
56
52
 
57
- Without this, `<Skeleton deep>` simply falls back to static parsing (no crash).
58
-
59
- ## Usage
60
-
61
- ### Basic โ€” inline host elements
62
-
63
- Skelo traverses the `View` / `Text` / `Image` tree you pass and mirrors it:
53
+ **That's it โ€” no other dependencies.** Everything (including custom-component introspection) works out of the box.
64
54
 
65
- ```tsx
66
- <Skeleton loading={loading} animation="shimmer">
67
- <View style={styles.row}>
68
- <Image style={styles.avatar} /> {/* โ†’ circle / box */}
69
- <Text style={styles.title}>Title</Text> {/* โ†’ text bar */}
70
- </View>
71
- </Skeleton>
72
- ```
55
+ > React 18 apps: add `"react-reconciler": "0.29.x"` to your deps (Skelo ships targeting React 19's `0.31`).
73
56
 
74
- Structure comes from the JSX; dimensions come from each element's `style`.
57
+ ---
75
58
 
76
- ### `deep` โ€” wrap any component (experimental)
59
+ ## ๐Ÿš€ Usage
77
60
 
78
- Don't want to inline? Wrap an opaque component and let Skelo introspect it:
61
+ ### Just wrap it
79
62
 
80
63
  ```tsx
81
- import { Skeleton, withSkeleton } from 'react-native-skelo';
82
-
83
- <Skeleton loading={loading} deep>
84
- <ProfileScreen />
85
- </Skeleton>
64
+ import { Skeleton } from 'react-native-skelo';
86
65
 
87
- // or as an HOC:
88
- const Home = withSkeleton(HomeScreen);
89
- <Home loading={loading} {...props} />
66
+ function Screen({ loading, user }) {
67
+ return (
68
+ <Skeleton loading={loading} animation="shimmer">
69
+ <ProfileCard user={user} />
70
+ </Skeleton>
71
+ );
72
+ }
90
73
  ```
91
74
 
92
- Requires `react-reconciler` + `import 'react-native-skelo/deep'` (see [Installation](#to-enable-deep-mode-optional)). See also [caveats](#deep-mode-caveats-experimental).
75
+ Skelo renders `ProfileCard`, reads its real `View`/`Text`/`Image` tree + styles, and draws a matching skeleton while `loading` is `true`. When it's `false`, your real UI renders.
93
76
 
94
- ### `styles` โ€” generate from a StyleSheet
77
+ ### Lists
95
78
 
96
- Pass styles directly to get a stack of skeleton shapes (no children needed):
79
+ Wrap a `FlatList` โ€” Skelo fills it with skeleton rows while the data loads:
97
80
 
98
81
  ```tsx
99
- <Skeleton loading={loading} styles={styles} excludeStyles={['container']} />
82
+ <Skeleton loading={loading} count={6}>
83
+ <FlatList data={items} renderItem={renderItem} />
84
+ </Skeleton>
100
85
  ```
101
86
 
102
- A StyleSheet has no hierarchy, so this produces one shape per style that has visual dimensions.
103
-
104
- ### `Skeleton.Ignore` โ€” keep something visible
87
+ ### Keep something visible
105
88
 
106
89
  ```tsx
107
90
  <Skeleton loading={loading}>
108
91
  <Skeleton.Ignore>
109
- <Text style={styles.heading}>Profile</Text> {/* stays real */}
92
+ <Text style={styles.heading}>Profile</Text> {/* stays real */}
110
93
  </Skeleton.Ignore>
111
94
  <ProfileBody />
112
95
  </Skeleton>
113
96
  ```
114
97
 
115
- ### Custom components โ€” register a plugin
98
+ ### Generate from a StyleSheet
99
+
100
+ ```tsx
101
+ <Skeleton loading={loading} styles={styles} excludeStyles={['container']} />
102
+ ```
103
+
104
+ ### Custom skeleton for a component
116
105
 
117
106
  ```tsx
118
107
  import { Skelo } from 'react-native-skelo';
119
- import { Avatar } from 'my-design-system';
120
108
 
121
109
  Skelo.register({
122
110
  name: 'Avatar',
123
111
  component: Avatar,
124
- strategy: (props, { primitives }) => (
125
- <primitives.Circle size={props.size ?? 40} />
126
- ),
112
+ strategy: (props, { primitives }) => <primitives.Circle size={props.size ?? 40} />,
127
113
  });
128
114
  ```
129
115
 
130
- ## API
116
+ ---
131
117
 
132
- ### `<Skeleton>` props
118
+ ## โš™๏ธ `<Skeleton>` props
133
119
 
134
120
  | Prop | Type | Default | Description |
135
121
  |---|---|---|---|
@@ -138,34 +124,42 @@ Skelo.register({
138
124
  | `duration` | `number` | `1200` | Animation duration (ms) |
139
125
  | `baseColor` / `highlightColor` | `string` | theme | Skeleton colors |
140
126
  | `borderRadius` | `number` | `4` | Default corner radius |
141
- | `deep` | `boolean` | `false` | Expand opaque components (experimental) |
127
+ | `count` | `number` | `6` | Placeholder rows for a `FlatList`/`SectionList` |
128
+ | `deep` | `boolean` | auto | Force component introspection on/off (auto when available) |
142
129
  | `styles` | `StyleSheet \| style[]` | โ€” | Generate from styles instead of children |
143
- | `excludeStyles` | `string[]` | โ€” | Style keys to skip in `styles` mode |
144
130
  | `accessibilityLabel` | `string` | `'Loading content'` | Screen-reader label |
145
131
 
146
- Also exported: `withSkeleton`, `SkeletonIgnore`, `StyleSkeleton`, the primitives (`SkeletonBox`, `SkeletonText`, `SkeletonImage`, `SkeletonCircle`), and `Skelo` (plugin registry + `Skelo.fromStyles`).
132
+ Also exported: `withSkeleton`, `SkeletonIgnore`, `StyleSkeleton`, the primitives (`SkeletonBox`, `SkeletonText`, `SkeletonImage`, `SkeletonCircle`), and `Skelo` (`register` / `fromStyles`).
133
+
134
+ ---
135
+
136
+ ## ๐Ÿงฉ How it works
137
+
138
+ - **Host elements** (`View` / `Text` / `Image`) are read directly (`React.Children` + `StyleSheet.flatten`).
139
+ - **Custom components** are expanded by a tiny JS-only `react-reconciler` renderer (bundled) that renders them off-screen to recover their real host tree + styles โ€” then feeds the same skeleton engine.
140
+ - Anything Skelo can't introspect (native content) is measured and shown as one size-matched block.
141
+
142
+ ---
147
143
 
148
- ## How it works
144
+ ## โš ๏ธ Good to know
149
145
 
150
- - **Inline mode** โ€” static traversal of the host-element tree (`React.Children` + `StyleSheet.flatten`).
151
- - **`deep` mode** โ€” a JS-only `react-reconciler` renderer renders the component off-screen to recover its real host tree + styles, then feeds the same skeleton renderer.
152
- - Anything Skelo can't introspect (a custom component without `deep`, or native content) is measured and shown as a single size-matched block.
146
+ Skelo skeletonizes **what your component renders during loading**:
153
147
 
154
- ## `deep` mode caveats (experimental)
148
+ - Introspection **runs mount effects** โ€” a screen that fetches on mount may fetch twice. Prefer it for presentational trees; register a plugin for effect-heavy screens.
149
+ - It renders **outside your providers** โ€” components needing navigation/theme/redux context fall back to a measured block.
150
+ - **Native content** (`WebView`, `MapView`, `Video`, โ€ฆ) lives outside React, so it becomes a single sized block.
151
+ - A **data-driven list/grid** that renders nothing while loading has nothing to skeletonize โ€” keep placeholder items rendered (see the [example](./example)).
155
152
 
156
- `deep` renders your component offline to read its structure, which means:
153
+ ---
157
154
 
158
- - **Mount effects run** during introspection โ€” a screen that fetches on mount may fetch twice. Prefer `deep` for presentational trees; register a plugin or provide a manual skeleton for effectful screens.
159
- - **Renders outside your providers** โ€” components that require navigation/theme/redux context may fail to expand; Skelo catches this and falls back to a measured block.
160
- - Only the **React host tree** is visible. `WebView`, `MapView`, `Video`, etc. render their content natively (outside React), so they can only become a single sized block.
155
+ ## ๐Ÿ“‹ Requirements
161
156
 
162
- ## Requirements
157
+ - React Native (New Architecture recommended)
158
+ - React 19 (React 18 โ†’ override `react-reconciler` to `0.29`)
159
+ - No other dependencies
163
160
 
164
- - React Native โ€” New Architecture recommended (the shimmer's
165
- `experimental_backgroundImage` gradient needs it)
166
- - `react-native-reanimated` โ‰ฅ 3
167
- - `react-reconciler` (optional, for `deep`) โ€” must match your React version
161
+ ---
168
162
 
169
- ## License
163
+ ## ๐Ÿ“„ License
170
164
 
171
165
  MIT ยฉ [Shubhanshu Barnwal](https://shubhanshubb.dev)
@@ -6,9 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.PulseAnimation = PulseAnimation;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
9
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
- // Breathing opacity loop on the UI thread with Reanimated.
10
+ // Breathing opacity loop using React Native's built-in Animated (native driver).
12
11
  function PulseAnimation({
13
12
  width,
14
13
  height,
@@ -18,30 +17,30 @@ function PulseAnimation({
18
17
  style,
19
18
  children
20
19
  }) {
21
- const opacity = (0, _reactNativeReanimated.useSharedValue)(1);
20
+ const opacity = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
22
21
  (0, _react.useEffect)(() => {
23
- opacity.value = (0, _reactNativeReanimated.withRepeat)((0, _reactNativeReanimated.withSequence)((0, _reactNativeReanimated.withTiming)(0.5, {
22
+ const loop = _reactNative.Animated.loop(_reactNative.Animated.sequence([_reactNative.Animated.timing(opacity, {
23
+ toValue: 0.5,
24
24
  duration: duration / 2,
25
- easing: _reactNativeReanimated.Easing.inOut(_reactNativeReanimated.Easing.ease)
26
- }), (0, _reactNativeReanimated.withTiming)(1, {
25
+ easing: _reactNative.Easing.inOut(_reactNative.Easing.ease),
26
+ useNativeDriver: true
27
+ }), _reactNative.Animated.timing(opacity, {
28
+ toValue: 1,
27
29
  duration: duration / 2,
28
- easing: _reactNativeReanimated.Easing.inOut(_reactNativeReanimated.Easing.ease)
29
- })), -1, false);
30
+ easing: _reactNative.Easing.inOut(_reactNative.Easing.ease),
31
+ useNativeDriver: true
32
+ })]));
33
+ loop.start();
34
+ return () => loop.stop();
30
35
  }, [duration, opacity]);
31
- const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
32
- 'worklet';
33
-
34
- return {
35
- opacity: opacity.value
36
- };
37
- }, []);
38
- return /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
36
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
39
37
  style: [styles.container, {
40
38
  width,
41
39
  height,
42
40
  borderRadius,
43
- backgroundColor: baseColor
44
- }, animatedStyle, style]
41
+ backgroundColor: baseColor,
42
+ opacity
43
+ }, style]
45
44
  }, children);
46
45
  }
47
46
  const styles = _reactNative.StyleSheet.create({
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PulseAnimation","width","height","baseColor","duration","borderRadius","style","children","opacity","useSharedValue","useEffect","value","withRepeat","withSequence","withTiming","easing","Easing","inOut","ease","animatedStyle","useAnimatedStyle","createElement","View","styles","container","backgroundColor","StyleSheet","create","overflow"],"sourceRoot":"../../../src","sources":["animations/PulseAnimation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAOiC,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cA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+B,IAAI;IACZhB,KAAK,EAAE,CACLiB,MAAM,CAACC,SAAS,EAChB;MAAEvB,KAAK;MAAEC,MAAM;MAAEG,YAAY;MAAEoB,eAAe,EAAEtB;IAAU,CAAC,EAC3DgB,aAAa,EACbb,KAAK;EACL,GAEDC,QACY,CAAC;AAEpB;AAEA,MAAMgB,MAAM,GAAGG,uBAAU,CAACC,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PulseAnimation","width","height","baseColor","duration","borderRadius","style","children","opacity","useRef","Animated","Value","current","useEffect","loop","sequence","timing","toValue","easing","Easing","inOut","ease","useNativeDriver","start","stop","createElement","View","styles","container","backgroundColor","StyleSheet","create","overflow"],"sourceRoot":"../../../src","sources":["animations/PulseAnimation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAA4D,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GA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E,IAAI,CAAC;MACjCC,eAAe,EAAE;IACnB,CAAC,CAAC,CACH,CACH,CAAC;IACDR,IAAI,CAACS,KAAK,CAAC,CAAC;IACZ,OAAO,MAAMT,IAAI,CAACU,IAAI,CAAC,CAAC;EAC1B,CAAC,EAAE,CAACpB,QAAQ,EAAEI,OAAO,CAAC,CAAC;EAEvB,oBACE/B,MAAA,CAAAc,OAAA,CAAAkC,aAAA,CAAC7C,YAAA,CAAA8B,QAAQ,CAACgB,IAAI;IACZpB,KAAK,EAAE,CACLqB,MAAM,CAACC,SAAS,EAChB;MAAE3B,KAAK;MAAEC,MAAM;MAAEG,YAAY;MAAEwB,eAAe,EAAE1B,SAAS;MAAEK;IAAQ,CAAC,EACpEF,KAAK;EACL,GAEDC,QACY,CAAC;AAEpB;AAEA,MAAMoB,MAAM,GAAGG,uBAAU,CAACC,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -6,11 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.ShimmerAnimation = ShimmerAnimation;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
9
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
- // Shimmer with no gradient library: the sweeping overlay uses React Native's
12
- // built-in `experimental_backgroundImage` CSS gradient (New Architecture),
13
- // animated on the UI thread with Reanimated.
10
+ // Zero-dependency shimmer: a highlight band (dim/bright/dim segments to fake a
11
+ // soft gradient) sweeps across the base, driven by React Native's built-in
12
+ // Animated native driver. Plain Views only โ€” guaranteed to render and animate.
14
13
  function ShimmerAnimation({
15
14
  width,
16
15
  height,
@@ -21,35 +20,28 @@ function ShimmerAnimation({
21
20
  style,
22
21
  children
23
22
  }) {
24
- const progress = (0, _reactNativeReanimated.useSharedValue)(0);
23
+ const progress = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
25
24
  const [measuredWidth, setMeasuredWidth] = (0, _react.useState)(0);
26
25
  (0, _react.useEffect)(() => {
27
- progress.value = (0, _reactNativeReanimated.withRepeat)((0, _reactNativeReanimated.withTiming)(1, {
26
+ const loop = _reactNative.Animated.loop(_reactNative.Animated.timing(progress, {
27
+ toValue: 1,
28
28
  duration,
29
- easing: _reactNativeReanimated.Easing.linear
30
- }), -1, false);
29
+ easing: _reactNative.Easing.linear,
30
+ useNativeDriver: true
31
+ }));
32
+ loop.start();
33
+ return () => loop.stop();
31
34
  }, [duration, progress]);
32
35
  const onLayout = event => {
33
36
  const w = event.nativeEvent.layout.width;
34
37
  setMeasuredWidth(prev => prev === w ? prev : w);
35
38
  };
36
- const containerWidth = typeof width === 'number' ? width : measuredWidth;
37
- const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
38
- 'worklet';
39
-
40
- const translateX = (0, _reactNativeReanimated.interpolate)(progress.value, [0, 1], [-containerWidth, containerWidth]);
41
- return {
42
- transform: [{
43
- translateX
44
- }]
45
- };
46
- }, [containerWidth]);
47
-
48
- // `experimental_backgroundImage` isn't in the ViewStyle types yet.
49
- const gradientStyle = {
50
- ..._reactNative.StyleSheet.absoluteFillObject,
51
- experimental_backgroundImage: `linear-gradient(to right, ${baseColor}, ${highlightColor}, ${baseColor})`
52
- };
39
+ const containerWidth = typeof width === 'number' ? width : measuredWidth || 200;
40
+ const bandWidth = Math.max(containerWidth * 0.6, 80);
41
+ const translateX = progress.interpolate({
42
+ inputRange: [0, 1],
43
+ outputRange: [-bandWidth, containerWidth]
44
+ });
53
45
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
54
46
  onLayout: onLayout,
55
47
  style: [styles.container, {
@@ -58,16 +50,43 @@ function ShimmerAnimation({
58
50
  borderRadius,
59
51
  backgroundColor: baseColor
60
52
  }, style]
61
- }, /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
53
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
62
54
  pointerEvents: "none",
63
- style: [_reactNative.StyleSheet.absoluteFill, animatedStyle]
55
+ style: [styles.band, {
56
+ width: bandWidth,
57
+ transform: [{
58
+ translateX
59
+ }]
60
+ }]
64
61
  }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
65
- style: gradientStyle
62
+ style: [styles.segment, {
63
+ backgroundColor: highlightColor,
64
+ opacity: 0.25
65
+ }]
66
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
67
+ style: [styles.segment, {
68
+ backgroundColor: highlightColor,
69
+ opacity: 0.9
70
+ }]
71
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
72
+ style: [styles.segment, {
73
+ backgroundColor: highlightColor,
74
+ opacity: 0.25
75
+ }]
66
76
  })), children);
67
77
  }
68
78
  const styles = _reactNative.StyleSheet.create({
69
79
  container: {
70
80
  overflow: 'hidden'
81
+ },
82
+ band: {
83
+ position: 'absolute',
84
+ top: 0,
85
+ bottom: 0,
86
+ flexDirection: 'row'
87
+ },
88
+ segment: {
89
+ flex: 1
71
90
  }
72
91
  });
73
92
  //# sourceMappingURL=ShimmerAnimation.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ShimmerAnimation","width","height","baseColor","highlightColor","duration","borderRadius","style","children","progress","useSharedValue","measuredWidth","setMeasuredWidth","useState","useEffect","value","withRepeat","withTiming","easing","Easing","linear","onLayout","event","w","nativeEvent","layout","prev","containerWidth","animatedStyle","useAnimatedStyle","translateX","interpolate","transform","gradientStyle","StyleSheet","absoluteFillObject","experimental_backgroundImage","createElement","View","styles","container","backgroundColor","pointerEvents","absoluteFill","create","overflow"],"sourceRoot":"../../../src","sources":["animations/ShimmerAnimation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAOA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAOiC,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,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cAAc,EAAEA,cAAc,CAClC,CAAC;IACD,OAAO;MAAEK,SAAS,EAAE,CAAC;QAAEF;MAAW,CAAC;IAAE,CAAC;EACxC,CAAC,EAAE,CAACH,cAAc,CAAC,CAAC;;EAEpB;EACA,MAAMM,aAAa,GAAG;IACpB,GAAGC,uBAAU,CAACC,kBAAkB;IAChCC,4BAA4B,EAAE,6BAA6BjC,SAAS,KAAKC,cAAc,KAAKD,SAAS;EACvG,CAAyB;EAEzB,oBACE3B,MAAA,CAAAe,OAAA,CAAA8C,aAAA,CAAC1D,YAAA,CAAA2D,IAAI;IACHjB,QAAQ,EAAEA,QAAS;IACnBd,KAAK,EAAE,CACLgC,MAAM,CAACC,SAAS,EAChB;MAAEvC,KAAK;MAAEC,MAAM;MAAEI,YAAY;MAAEmC,eAAe,EAAEtC;IAAU,CAAC,EAC3DI,KAAK;EACL,gBAEF/B,MAAA,CAAAe,OAAA,CAAA8C,aAAA,CAACzD,sBAAA,CAAAW,OAAQ,CAAC+C,IAAI;IACZI,aAAa,EAAC,MAAM;IACpBnC,KAAK,EAAE,CAAC2B,uBAAU,CAACS,YAAY,EAAEf,aAAa;EAAE,gBAEhDpD,MAAA,CAAAe,OAAA,CAAA8C,aAAA,CAAC1D,YAAA,CAAA2D,IAAI;IAAC/B,KAAK,EAAE0B;EAAc,CAAE,CAChB,CAAC,EAEfzB,QACG,CAAC;AAEX;AAEA,MAAM+B,MAAM,GAAGL,uBAAU,CAACU,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ShimmerAnimation","width","height","baseColor","highlightColor","duration","borderRadius","style","children","progress","useRef","Animated","Value","current","measuredWidth","setMeasuredWidth","useState","useEffect","loop","timing","toValue","easing","Easing","linear","useNativeDriver","start","stop","onLayout","event","w","nativeEvent","layout","prev","containerWidth","bandWidth","Math","max","translateX","interpolate","inputRange","outputRange","createElement","View","styles","container","backgroundColor","pointerEvents","band","transform","segment","opacity","StyleSheet","create","overflow","position","top","bottom","flexDirection","flex"],"sourceRoot":"../../../src","sources":["animations/ShimmerAnimation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAAkE,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAA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AAE;IAAK,CAAC;EAAE,CAAE,CACvE,CAAC,EAEf1C,QACG,CAAC;AAEX;AAEA,MAAMmC,MAAM,GAAGQ,uBAAU,CAACC,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,QAAQ,EAAE;EACZ,CAAC;EACDN,IAAI,EAAE;IACJO,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,aAAa,EAAE;EACjB,CAAC;EACDR,OAAO,EAAE;IACPS,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -10,6 +10,7 @@ var _SkeletonRenderer = require("./SkeletonRenderer");
10
10
  var _SkeletonIgnore = require("./SkeletonIgnore");
11
11
  var _StyleSkeleton = require("../core/generator/StyleSkeleton");
12
12
  var _deepRegistry = require("../core/deepRegistry");
13
+ var _expandLists = require("../core/parser/expandLists");
13
14
  var _defaults = require("../constants/defaults");
14
15
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
16
  /**
@@ -45,7 +46,8 @@ function Skeleton({
45
46
  children,
46
47
  styles,
47
48
  excludeStyles,
48
- deep = false,
49
+ deep,
50
+ count = 6,
49
51
  animation = _defaults.DEFAULT_CONFIG.animation,
50
52
  duration = _defaults.DEFAULT_CONFIG.duration,
51
53
  baseColor = _defaults.DEFAULT_CONFIG.baseColor,
@@ -66,24 +68,28 @@ function Skeleton({
66
68
  console.log('[Skelo] Parsing component tree...');
67
69
  }
68
70
  try {
71
+ // Turn FlatList/SectionList into placeholder rows so lists show a
72
+ // skeleton even though their data (and rows) don't exist yet.
73
+ const prepared = (0, _expandLists.expandListPlaceholders)(children, count);
74
+
69
75
  // Deep mode: expand opaque components into their real host tree via the
70
76
  // opt-in expander (registered by importing 'react-native-skelo/deep').
71
- // Falls back to static parsing if unavailable or it returns nothing.
72
- if (deep) {
73
- const expand = (0, _deepRegistry.getDeepExpander)();
74
- if (expand) {
75
- const expanded = expand(/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children));
76
- if (expanded && expanded.length > 0) {
77
- return expanded;
78
- }
79
- if (__DEV__) {
80
- console.warn('[Skelo] deep expansion returned nothing; falling back to static parsing.');
81
- }
82
- } else if (__DEV__) {
83
- console.warn("[Skelo] `deep` requires react-reconciler. Install it and add `import 'react-native-skelo/deep';` in your app entry.");
77
+ // When `deep` is not set explicitly, it's used automatically whenever the
78
+ // expander is available. Falls back to static parsing otherwise.
79
+ const expand = (0, _deepRegistry.getDeepExpander)();
80
+ const wantDeep = deep === undefined ? expand !== null : deep;
81
+ if (wantDeep && expand) {
82
+ const expanded = expand(/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, prepared));
83
+ if (expanded && expanded.length > 0) {
84
+ return expanded;
85
+ }
86
+ if (__DEV__) {
87
+ console.warn('[Skelo] deep expansion returned nothing; falling back to static parsing.');
84
88
  }
89
+ } else if (deep === true && !expand && __DEV__) {
90
+ console.warn("[Skelo] `deep` requires react-reconciler. Install it and add `import 'react-native-skelo/deep';` in your app entry.");
85
91
  }
86
- const parsed = _parser.Parser.parse(children);
92
+ const parsed = _parser.Parser.parse(prepared);
87
93
  if (__DEV__ && debug) {
88
94
  // Log a lightweight summary: the raw nodes hold React elements
89
95
  // (`element`) and arbitrary props that aren't safely serializable.
@@ -101,7 +107,7 @@ function Skeleton({
101
107
  }
102
108
  return [];
103
109
  }
104
- }, [loading, styles, deep, children, debug]);
110
+ }, [loading, styles, deep, count, children, debug]);
105
111
 
106
112
  // Create skeleton config
107
113
  const config = (0, _react.useMemo)(() => ({
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_parser","_SkeletonRenderer","_SkeletonIgnore","_StyleSkeleton","_deepRegistry","_defaults","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Skeleton","loading","children","styles","excludeStyles","deep","animation","DEFAULT_CONFIG","duration","baseColor","highlightColor","borderRadius","accessible","accessibilityLabel","debug","skeletonTree","useMemo","__DEV__","console","log","expand","getDeepExpander","expanded","createElement","Fragment","length","warn","parsed","Parser","parse","summarize","nodes","map","node","type","style","JSON","stringify","error","config","StyleSkeleton","exclude","SkeletonRenderer","tree","displayName","Ignore","SkeletonIgnore"],"sourceRoot":"../../../src","sources":["components/Skeleton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAAuD,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,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EE,MAAM,EAAEE,IAAI,EAAEH,QAAQ,EAAEY,KAAK,CAAC,CAAC;;EAE5C;EACA,MAAMyB,MAAM,GAAG,IAAAvB,cAAO,EACpB,OAAO;IACLV,SAAS;IACTE,QAAQ;IACRC,SAAS;IACTC,cAAc;IACdC;EACF,CAAC,CAAC,EACF,CAACL,SAAS,EAAEE,QAAQ,EAAEC,SAAS,EAAEC,cAAc,EAAEC,YAAY,CAC/D,CAAC;;EAED;EACA,IAAI,CAACV,OAAO,EAAE;IACZ,oBAAO7B,MAAA,CAAAmB,OAAA,CAAAgC,aAAA,CAAAnD,MAAA,CAAAmB,OAAA,CAAAiC,QAAA,QAAGtB,QAAW,CAAC;EACxB;;EAEA;EACA;EACA,IAAIC,MAAM,EAAE;IACV,oBAAO/B,MAAA,CAAAmB,OAAA,CAAAgC,aAAA,CAAC7C,cAAA,CAAA8D,aAAa;MAACrC,MAAM,EAAEA,MAAO;MAACoC,MAAM,EAAEA,MAAO;MAACE,OAAO,EAAErC;IAAc,CAAE,CAAC;EAClF;EAEA,oBACEhC,MAAA,CAAAmB,OAAA,CAAAgC,aAAA,CAAC/C,iBAAA,CAAAkE,gBAAgB;IACfC,IAAI,EAAE5B,YAAa;IACnBwB,MAAM,EAAEA,MAAO;IACf3B,UAAU,EAAEA,UAAW;IACvBC,kBAAkB,EAAEA,kBAAmB;IACvCC,KAAK,EAAEA;EAAM,CACd,CAAC;AAEN;AAEAd,QAAQ,CAAC4C,WAAW,GAAG,UAAU;;AAEjC;AACA;AACA;AACA;AACA5C,QAAQ,CAAC6C,MAAM,GAAGC,8BAAc","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_parser","_SkeletonRenderer","_SkeletonIgnore","_StyleSkeleton","_deepRegistry","_expandLists","_defaults","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Skeleton","loading","children","styles","excludeStyles","deep","count","animation","DEFAULT_CONFIG","duration","baseColor","highlightColor","borderRadius","accessible","accessibilityLabel","debug","skeletonTree","useMemo","__DEV__","console","log","prepared","expandListPlaceholders","expand","getDeepExpander","wantDeep","undefined","expanded","createElement","Fragment","length","warn","parsed","Parser","parse","summarize","nodes","map","node","type","style","JSON","stringify","error","config","StyleSkeleton","exclude","SkeletonRenderer","tree","displayName","Ignore","SkeletonIgnore"],"sourceRoot":"../../../src","sources":["components/Skeleton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAAuD,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAA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