@prototyp/skeletor 1.2.0 → 1.3.0-beta0
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/lib/commonjs/components/Block/Block.js +9 -28
- package/lib/commonjs/components/Block/Block.js.map +1 -1
- package/lib/commonjs/components/InputFocusScrollView/InputFocusScrollView.js +8 -6
- package/lib/commonjs/components/InputFocusScrollView/InputFocusScrollView.js.map +1 -1
- package/lib/commonjs/components/Text/Text.js +5 -15
- package/lib/commonjs/components/Text/Text.js.map +1 -1
- package/lib/commonjs/hooks/skeleform/src/index.js +3 -5
- package/lib/commonjs/hooks/skeleform/src/index.js.map +1 -1
- package/lib/commonjs/testing/TestingPlayground.js +16 -0
- package/lib/commonjs/testing/TestingPlayground.js.map +1 -0
- package/lib/commonjs/utils/animations.js +10 -10
- package/lib/commonjs/utils/animations.js.map +1 -1
- package/lib/commonjs/utils/extract-animation-properties.js +63 -42
- package/lib/commonjs/utils/extract-animation-properties.js.map +1 -1
- package/lib/commonjs/utils/extract-skeletor-style-properties.js +38 -0
- package/lib/commonjs/utils/extract-skeletor-style-properties.js.map +1 -0
- package/lib/commonjs/utils/index.js +22 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/is-color-value.js +16 -3
- package/lib/commonjs/utils/is-color-value.js.map +1 -1
- package/lib/commonjs/utils/memoize-styles.js +49 -0
- package/lib/commonjs/utils/memoize-styles.js.map +1 -0
- package/lib/module/components/Block/Block.js +11 -29
- package/lib/module/components/Block/Block.js.map +1 -1
- package/lib/module/components/InputFocusScrollView/InputFocusScrollView.js +10 -8
- package/lib/module/components/InputFocusScrollView/InputFocusScrollView.js.map +1 -1
- package/lib/module/components/Text/Text.js +7 -17
- package/lib/module/components/Text/Text.js.map +1 -1
- package/lib/module/hooks/skeleform/src/index.js +3 -5
- package/lib/module/hooks/skeleform/src/index.js.map +1 -1
- package/lib/module/testing/TestingPlayground.js +16 -0
- package/lib/module/testing/TestingPlayground.js.map +1 -0
- package/lib/module/utils/animations.js +10 -10
- package/lib/module/utils/animations.js.map +1 -1
- package/lib/module/utils/extract-animation-properties.js +63 -42
- package/lib/module/utils/extract-animation-properties.js.map +1 -1
- package/lib/module/utils/extract-skeletor-style-properties.js +34 -0
- package/lib/module/utils/extract-skeletor-style-properties.js.map +1 -0
- package/lib/module/utils/index.js +2 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/is-color-value.js +16 -3
- package/lib/module/utils/is-color-value.js.map +1 -1
- package/lib/module/utils/memoize-styles.js +45 -0
- package/lib/module/utils/memoize-styles.js.map +1 -0
- package/lib/typescript/commonjs/components/Block/Block.d.ts +2 -1
- package/lib/typescript/commonjs/components/Block/Block.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/InputFocusScrollView/InputFocusScrollView.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Text/Text.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/skeleform/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useAnimateParallel.d.ts +2 -2
- package/lib/typescript/commonjs/hooks/useAnimateParallel.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useAnimateSequence.d.ts +2 -2
- package/lib/typescript/commonjs/hooks/useAnimateSequence.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useAnimateStagger.d.ts +2 -2
- package/lib/typescript/commonjs/hooks/useAnimateStagger.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useLoopAnimation.d.ts +3 -3
- package/lib/typescript/commonjs/hooks/useLoopAnimation.d.ts.map +1 -1
- package/lib/typescript/commonjs/models/Animation.d.ts +23 -21
- package/lib/typescript/commonjs/models/Animation.d.ts.map +1 -1
- package/lib/typescript/commonjs/testing/TestingPlayground.d.ts +2 -0
- package/lib/typescript/commonjs/testing/TestingPlayground.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/animations.d.ts +6 -6
- package/lib/typescript/commonjs/utils/animations.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/extract-animation-properties.d.ts +5 -5
- package/lib/typescript/commonjs/utils/extract-animation-properties.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/extract-skeletor-style-properties.d.ts +6 -0
- package/lib/typescript/commonjs/utils/extract-skeletor-style-properties.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/index.d.ts +2 -0
- package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/is-color-value.d.ts +10 -2
- package/lib/typescript/commonjs/utils/is-color-value.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/memoize-styles.d.ts +6 -0
- package/lib/typescript/commonjs/utils/memoize-styles.d.ts.map +1 -0
- package/lib/typescript/module/components/Block/Block.d.ts +2 -1
- package/lib/typescript/module/components/Block/Block.d.ts.map +1 -1
- package/lib/typescript/module/components/InputFocusScrollView/InputFocusScrollView.d.ts.map +1 -1
- package/lib/typescript/module/components/Text/Text.d.ts.map +1 -1
- package/lib/typescript/module/hooks/skeleform/src/index.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useAnimateParallel.d.ts +2 -2
- package/lib/typescript/module/hooks/useAnimateParallel.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useAnimateSequence.d.ts +2 -2
- package/lib/typescript/module/hooks/useAnimateSequence.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useAnimateStagger.d.ts +2 -2
- package/lib/typescript/module/hooks/useAnimateStagger.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useLoopAnimation.d.ts +3 -3
- package/lib/typescript/module/hooks/useLoopAnimation.d.ts.map +1 -1
- package/lib/typescript/module/models/Animation.d.ts +23 -21
- package/lib/typescript/module/models/Animation.d.ts.map +1 -1
- package/lib/typescript/module/testing/TestingPlayground.d.ts +2 -0
- package/lib/typescript/module/testing/TestingPlayground.d.ts.map +1 -0
- package/lib/typescript/module/utils/animations.d.ts +6 -6
- package/lib/typescript/module/utils/animations.d.ts.map +1 -1
- package/lib/typescript/module/utils/extract-animation-properties.d.ts +5 -5
- package/lib/typescript/module/utils/extract-animation-properties.d.ts.map +1 -1
- package/lib/typescript/module/utils/extract-skeletor-style-properties.d.ts +6 -0
- package/lib/typescript/module/utils/extract-skeletor-style-properties.d.ts.map +1 -0
- package/lib/typescript/module/utils/index.d.ts +2 -0
- package/lib/typescript/module/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/utils/is-color-value.d.ts +10 -2
- package/lib/typescript/module/utils/is-color-value.d.ts.map +1 -1
- package/lib/typescript/module/utils/memoize-styles.d.ts +6 -0
- package/lib/typescript/module/utils/memoize-styles.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Animated, EasingFunction, ViewStyle } from "react-native";
|
|
1
|
+
import type { Animated, EasingFunction, ScaleTransform, ScaleXTransform, ScaleYTransform, SkewXTransform, SkewYTransform, TranslateXTransform, TranslateYTransform, ViewStyle } from "react-native";
|
|
2
2
|
export type AnimationConfiguration = {
|
|
3
3
|
duration?: number;
|
|
4
4
|
/** Enables or disables native driver. Defaults to true. Unexpected lifecycle behavior might be experience when false. If animations behave weirdly, try changing this. */
|
|
@@ -14,21 +14,26 @@ export type StaggerAnimationConfiguration = AnimationConfiguration & {
|
|
|
14
14
|
export type AnimationTimelineConfiguration = {
|
|
15
15
|
[ms: number]: Array<ElementAnimation<any>>;
|
|
16
16
|
};
|
|
17
|
-
type
|
|
18
|
-
export type
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
[
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export type
|
|
31
|
-
|
|
17
|
+
type AnimatableValueTypes = string | number;
|
|
18
|
+
export type CustomAnimatableProperties = {
|
|
19
|
+
translateX?: TranslateXTransform["translateX"][];
|
|
20
|
+
translateY?: TranslateYTransform["translateY"][];
|
|
21
|
+
scaleX?: ScaleXTransform["scaleX"][];
|
|
22
|
+
scaleY?: ScaleYTransform["scaleY"][];
|
|
23
|
+
scale?: ScaleTransform["scale"][];
|
|
24
|
+
skewX?: SkewXTransform["skewX"][];
|
|
25
|
+
skewY?: SkewYTransform["skewY"][];
|
|
26
|
+
skew?: SkewXTransform["skewX"][];
|
|
27
|
+
rotation?: Array<`${number}deg` | `${number}rad`>;
|
|
28
|
+
};
|
|
29
|
+
export type NonAnimatableKeys = "alignItems" | "alignContent" | "alignSelf" | "justifyContent" | "display" | "flexDirection" | "flexWrap" | "overflow" | "position" | "zIndex" | "elevation" | "direction" | "backfaceVisibility" | "borderStyle" | "borderCurve" | "pointerEvents" | "shadowOffset" | "textShadowOffset" | "transformMatrix" | "transform";
|
|
30
|
+
export type AnimatableStyleKeys = keyof Exclude<ViewStyle, NonAnimatableKeys> | keyof CustomAnimatableProperties;
|
|
31
|
+
export type AnimationStyle<Keys extends AnimatableStyleKeys> = {
|
|
32
|
+
[K in Keys]: AnimatableValueTypes[];
|
|
33
|
+
};
|
|
34
|
+
export type ComposedAnimationInterpolations<Keys extends AnimatableStyleKeys> = Partial<Record<Keys, Animated.AnimatedInterpolation<string | number>>>;
|
|
35
|
+
export type ElementAnimation<Keys extends AnimatableStyleKeys> = {
|
|
36
|
+
animations: Required<ComposedAnimationInterpolations<Keys>>;
|
|
32
37
|
forward: Animated.CompositeAnimation;
|
|
33
38
|
backward: Animated.CompositeAnimation;
|
|
34
39
|
/** Start animation with onFinished callback. Using forward.start() */
|
|
@@ -38,11 +43,8 @@ export type ElementAnimation<Keys extends keyof AnimationViewStyle> = {
|
|
|
38
43
|
/** Reset animations to initial value. Using forward.reset() */
|
|
39
44
|
reset: Animated.CompositeAnimation["reset"];
|
|
40
45
|
};
|
|
41
|
-
export type
|
|
42
|
-
|
|
46
|
+
export type Animations = {
|
|
47
|
+
animations?: ComposedAnimationInterpolations<AnimatableStyleKeys>;
|
|
43
48
|
};
|
|
44
|
-
export interface Animations {
|
|
45
|
-
animations?: ViewAnimation<keyof AnimationViewStyle>;
|
|
46
|
-
}
|
|
47
49
|
export {};
|
|
48
50
|
//# sourceMappingURL=Animation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Animation.d.ts","sourceRoot":"","sources":["../../../../src/models/Animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Animation.d.ts","sourceRoot":"","sources":["../../../../src/models/Animation.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestingPlayground.d.ts","sourceRoot":"","sources":["../../../../src/testing/TestingPlayground.tsx"],"names":[],"mappings":""}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { Animated } from "react-native";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AnimatableStyleKeys, AnimationConfiguration, AnimationStyle, AnimationTimelineConfiguration, ElementAnimation, StaggerAnimationConfiguration } from "../models";
|
|
3
3
|
/** Animate styles in parallel.
|
|
4
4
|
* Example: if you define opacity and top styles, this will start the opacity animation and the top animation at the same time. */
|
|
5
|
-
export declare function animateParallel<Styles extends
|
|
5
|
+
export declare function animateParallel<Styles extends AnimatableStyleKeys>(styles: AnimationStyle<Styles>, config?: AnimationConfiguration): ElementAnimation<Styles>;
|
|
6
6
|
/** Stagger defined styles animations.
|
|
7
7
|
* Example: if you define opacity and top styles, this will start the opacity animation and stagger the top animation by stagger amount. */
|
|
8
|
-
export declare function animateStagger<Styles extends
|
|
8
|
+
export declare function animateStagger<Styles extends AnimatableStyleKeys>(styles: AnimationStyle<Styles>, config: StaggerAnimationConfiguration): ElementAnimation<Styles>;
|
|
9
9
|
/** This will animate the passed in styles in sequence.
|
|
10
10
|
* Example: if you define opacity and top styles, this will start the opacity animation and then start the top animation when the opacity animation finishes. */
|
|
11
|
-
export declare function animateSequence<Styles extends
|
|
11
|
+
export declare function animateSequence<Styles extends AnimatableStyleKeys>(styles: AnimationStyle<Styles>, config?: AnimationConfiguration): ElementAnimation<Styles>;
|
|
12
12
|
export declare function createAnimationTimeline(timeline: AnimationTimelineConfiguration): {
|
|
13
13
|
start: (callback?: Animated.EndCallback) => void;
|
|
14
14
|
reverse: (callback?: Animated.EndCallback) => void;
|
|
15
15
|
reset: () => void;
|
|
16
16
|
};
|
|
17
|
-
export declare function loopAnimation<Type extends
|
|
17
|
+
export declare function loopAnimation<Type extends AnimatableStyleKeys = AnimatableStyleKeys>(animation: ElementAnimation<Type>): {
|
|
18
18
|
start: () => void;
|
|
19
|
-
animations:
|
|
19
|
+
animations: Required<Partial<Record<Type, Animated.AnimatedInterpolation<string | number>>>>;
|
|
20
20
|
forward: Animated.CompositeAnimation;
|
|
21
21
|
backward: Animated.CompositeAnimation;
|
|
22
22
|
reverse: (onFinished?: () => void) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../../../src/utils/animations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAU,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EACX,
|
|
1
|
+
{"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../../../src/utils/animations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAU,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EACX,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,8BAA8B,EAE9B,gBAAgB,EAChB,6BAA6B,EAC7B,MAAM,WAAW,CAAC;AA0FnB;kIACkI;AAClI,wBAAgB,eAAe,CAAC,MAAM,SAAS,mBAAmB,EACjE,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,EAC9B,MAAM,CAAC,EAAE,sBAAsB,GAC7B,gBAAgB,CAAC,MAAM,CAAC,CAc1B;AAyBD;2IAC2I;AAC3I,wBAAgB,cAAc,CAAC,MAAM,SAAS,mBAAmB,EAChE,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,EAC9B,MAAM,EAAE,6BAA6B,GACnC,gBAAgB,CAAC,MAAM,CAAC,CAiB1B;AAgCD;gKACgK;AAChK,wBAAgB,eAAe,CAAC,MAAM,SAAS,mBAAmB,EACjE,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,EAC9B,MAAM,CAAC,EAAE,sBAAsB,GAC7B,gBAAgB,CAAC,MAAM,CAAC,CAc1B;AAED,wBAAgB,uBAAuB,CACtC,QAAQ,EAAE,8BAA8B;;;;EAoCxC;AAED,wBAAgB,aAAa,CAC5B,IAAI,SAAS,mBAAmB,GAAG,mBAAmB,EACrD,SAAS,EAAE,gBAAgB,CAAC,IAAI,CAAC;;;;;wBArKrB,CAAC;;EA8Kd"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { MatrixTransform, RotateTransform, RotateXTransform, RotateYTransform, RotateZTransform, ScaleTransform, ScaleXTransform, ScaleYTransform, SkewXTransform, SkewYTransform, TranslateXTransform, TranslateYTransform } from "react-native";
|
|
2
|
-
import type {
|
|
3
|
-
type
|
|
4
|
-
export declare function extractAnimationProperties
|
|
5
|
-
transform:
|
|
6
|
-
}
|
|
2
|
+
import type { ComposedAnimationInterpolations, CustomAnimatableProperties } from "../models";
|
|
3
|
+
type BaseTransformProps = RotateTransform | RotateXTransform | RotateYTransform | RotateZTransform | ScaleTransform | ScaleXTransform | ScaleYTransform | TranslateXTransform | TranslateYTransform | SkewXTransform | SkewYTransform | MatrixTransform;
|
|
4
|
+
export declare function extractAnimationProperties(props: ComposedAnimationInterpolations<keyof CustomAnimatableProperties> | undefined): {
|
|
5
|
+
transform: BaseTransformProps[];
|
|
6
|
+
} | undefined;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=extract-animation-properties.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-animation-properties.d.ts","sourceRoot":"","sources":["../../../../src/utils/extract-animation-properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"extract-animation-properties.d.ts","sourceRoot":"","sources":["../../../../src/utils/extract-animation-properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACX,+BAA+B,EAC/B,0BAA0B,EAC1B,MAAM,WAAW,CAAC;AAEnB,KAAK,kBAAkB,GACpB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,cAAc,GACd,cAAc,GACd,eAAe,CAAC;AAEnB,wBAAgB,0BAA0B,CACzC,KAAK,EACF,+BAA+B,CAAC,MAAM,0BAA0B,CAAC,GACjE,SAAS;;cAuDZ"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ViewStyle } from "react-native";
|
|
2
|
+
import type { Alignment, Border, Flex, Position, Size, Spacing } from "../models";
|
|
3
|
+
type SkeletorStyleProperties = Alignment & Position & Size & Border & Flex & Spacing;
|
|
4
|
+
export declare function extractSkeletorStyleProperties<T extends SkeletorStyleProperties>(props: T): Partial<ViewStyle>;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=extract-skeletor-style-properties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-skeletor-style-properties.d.ts","sourceRoot":"","sources":["../../../../src/utils/extract-skeletor-style-properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACX,SAAS,EACT,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,MAAM,WAAW,CAAC;AAYnB,KAAK,uBAAuB,GAAG,SAAS,GACvC,QAAQ,GACR,IAAI,GACJ,MAAM,GACN,IAAI,GACJ,OAAO,CAAC;AAET,wBAAgB,8BAA8B,CAC7C,CAAC,SAAS,uBAAuB,EAChC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,CAwB9B"}
|
|
@@ -5,6 +5,8 @@ export * from "./extract-flex-properties";
|
|
|
5
5
|
export * from "./extract-gap-properties";
|
|
6
6
|
export * from "./extract-position-properties";
|
|
7
7
|
export * from "./extract-size-properties";
|
|
8
|
+
export * from "./extract-skeletor-style-properties";
|
|
8
9
|
export * from "./is-color-value";
|
|
10
|
+
export * from "./memoize-styles";
|
|
9
11
|
export * from "./normalize-spacing-values";
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { ColorValue } from "react-native";
|
|
2
|
+
/**
|
|
3
|
+
* Checks if a value is a valid React Native color.
|
|
4
|
+
* Supports:
|
|
5
|
+
* - strings (hex, color names)
|
|
6
|
+
* - numbers (RN numeric colors)
|
|
7
|
+
* - PlatformColor objects
|
|
8
|
+
* - DynamicColorIOS objects
|
|
9
|
+
*/
|
|
10
|
+
export declare const isColorValue: (value: unknown) => value is ColorValue;
|
|
3
11
|
//# sourceMappingURL=is-color-value.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-color-value.d.ts","sourceRoot":"","sources":["../../../../src/utils/is-color-value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"is-color-value.d.ts","sourceRoot":"","sources":["../../../../src/utils/is-color-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,UActD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memoize-styles.d.ts","sourceRoot":"","sources":["../../../../src/utils/memoize-styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA2B9C;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,SAAS,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAc3D"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"Luka Buljan <luka@prototyp.digital>",
|
|
7
7
|
"Vlatko Vlahek <vlatko@prototyp.digital>"
|
|
8
8
|
],
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.3.0-beta0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"main": "./lib/commonjs/index.js",
|
|
12
12
|
"module": "./lib/module/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-native": "^0.81.4",
|
|
36
36
|
"react-native-builder-bob": "^0.40.12",
|
|
37
37
|
"react-native-safe-area-context": "^5.5.2",
|
|
38
|
-
"typescript": "^5.
|
|
38
|
+
"typescript": "^5.9.3"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">=19",
|