react-native-skelo 0.0.3 → 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +9 -26
- package/lib/commonjs/animations/PulseAnimation.js +26 -2
- package/lib/commonjs/animations/PulseAnimation.js.map +1 -1
- package/lib/commonjs/animations/ShimmerAnimation.js +55 -25
- package/lib/commonjs/animations/ShimmerAnimation.js.map +1 -1
- package/lib/commonjs/components/Skeleton.js +9 -15
- package/lib/commonjs/components/Skeleton.js.map +1 -1
- package/lib/module/animations/PulseAnimation.js +26 -2
- package/lib/module/animations/PulseAnimation.js.map +1 -1
- package/lib/module/animations/ShimmerAnimation.js +56 -26
- package/lib/module/animations/ShimmerAnimation.js.map +1 -1
- package/lib/module/components/Skeleton.js +9 -15
- package/lib/module/components/Skeleton.js.map +1 -1
- package/lib/typescript/animations/PulseAnimation.d.ts +44 -0
- package/lib/typescript/animations/PulseAnimation.d.ts.map +1 -1
- package/lib/typescript/animations/ShimmerAnimation.d.ts +44 -0
- package/lib/typescript/animations/ShimmerAnimation.d.ts.map +1 -1
- package/lib/typescript/components/Skeleton.d.ts.map +1 -1
- package/package.json +4 -20
- package/src/animations/PulseAnimation.tsx +67 -5
- package/src/animations/ShimmerAnimation.tsx +106 -38
- package/src/components/Skeleton.tsx +9 -17
- package/lib/commonjs/core/deepRegistry.js +0 -18
- package/lib/commonjs/core/deepRegistry.js.map +0 -1
- package/lib/commonjs/deep.js +0 -18
- package/lib/commonjs/deep.js.map +0 -1
- package/lib/module/core/deepRegistry.js +0 -11
- package/lib/module/core/deepRegistry.js.map +0 -1
- package/lib/module/deep.js +0 -11
- package/lib/module/deep.js.map +0 -1
- package/lib/typescript/core/deepRegistry.d.ts +0 -7
- package/lib/typescript/core/deepRegistry.d.ts.map +0 -1
- package/lib/typescript/deep.d.ts +0 -2
- package/lib/typescript/deep.d.ts.map +0 -1
- package/src/core/deepRegistry.ts +0 -16
- package/src/deep.ts +0 -12
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deepRegistry.d.ts","sourceRoot":"","sources":["../../../src/core/deepRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9C,KAAK,YAAY,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,aAAa,EAAE,GAAG,IAAI,CAAC;AAItE,wBAAgB,eAAe,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAEtD;AAED,wBAAgB,eAAe,IAAI,YAAY,GAAG,IAAI,CAErD"}
|
package/lib/typescript/deep.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deep.d.ts","sourceRoot":"","sources":["../../src/deep.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,WAAW,OAAO,CAAC"}
|
package/src/core/deepRegistry.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ReactElement } from 'react';
|
|
2
|
-
import type { ComponentNode } from '../types';
|
|
3
|
-
|
|
4
|
-
// Deep expansion is opt-in so the core bundle never depends on react-reconciler.
|
|
5
|
-
// `react-native-skelo/deep` registers the expander; Skeleton reads it here.
|
|
6
|
-
type DeepExpander = (element: ReactElement) => ComponentNode[] | null;
|
|
7
|
-
|
|
8
|
-
let expander: DeepExpander | null = null;
|
|
9
|
-
|
|
10
|
-
export function setDeepExpander(fn: DeepExpander): void {
|
|
11
|
-
expander = fn;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function getDeepExpander(): DeepExpander | null {
|
|
15
|
-
return expander;
|
|
16
|
-
}
|
package/src/deep.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Opt-in deep mode. Import once in your app entry to enable `<Skeleton deep>`:
|
|
2
|
-
//
|
|
3
|
-
// import 'react-native-skelo/deep';
|
|
4
|
-
//
|
|
5
|
-
// This is the only module that pulls in react-reconciler, so apps that don't
|
|
6
|
-
// use deep mode never bundle it. Requires `react-reconciler` to be installed.
|
|
7
|
-
import { setDeepExpander } from './core/deepRegistry';
|
|
8
|
-
import { expandToComponentNodes } from './core/parser/expandOffline';
|
|
9
|
-
|
|
10
|
-
setDeepExpander(expandToComponentNodes);
|
|
11
|
-
|
|
12
|
-
export const deepEnabled = true;
|