-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor StyleSheetTypes for (internal) extensibility
Summary: Changelog: [Internal] Reviewed By: arushikesarwani94 Differential Revision: D34188705 fbshipit-source-id: 017285553f24144f8f7eff3a126a99be6c9b2f25
- Loading branch information
1 parent
1814bff
commit 370c65b
Showing
3 changed files
with
126 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow strict | ||
* @format | ||
*/ | ||
|
||
export type ____DangerouslyImpreciseStyle_InternalOverrides = $ReadOnly<{}>; | ||
export type ____ImageStyle_InternalOverrides = $ReadOnly<{}>; | ||
export type ____ShadowStyle_InternalOverrides = $ReadOnly<{}>; | ||
export type ____TextStyle_InternalOverrides = $ReadOnly<{}>; | ||
export type ____ViewStyle_InternalOverrides = $ReadOnly<{}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow strict-local | ||
* @format | ||
*/ | ||
|
||
const AnimatedNode = require('../../Animated/nodes/AnimatedNode'); | ||
|
||
export type ____TransformStyle_Internal = $ReadOnly<{| | ||
/** | ||
* `transform` accepts an array of transformation objects. Each object specifies | ||
* the property that will be transformed as the key, and the value to use in the | ||
* transformation. Objects should not be combined. Use a single key/value pair | ||
* per object. | ||
* | ||
* The rotate transformations require a string so that the transform may be | ||
* expressed in degrees (deg) or radians (rad). For example: | ||
* | ||
* `transform([{ rotateX: '45deg' }, { rotateZ: '0.785398rad' }])` | ||
* | ||
* The skew transformations require a string so that the transform may be | ||
* expressed in degrees (deg). For example: | ||
* | ||
* `transform([{ skewX: '45deg' }])` | ||
*/ | ||
transform?: $ReadOnlyArray< | ||
| {|+perspective: number | AnimatedNode|} | ||
| {|+rotate: string | AnimatedNode|} | ||
| {|+rotateX: string | AnimatedNode|} | ||
| {|+rotateY: string | AnimatedNode|} | ||
| {|+rotateZ: string | AnimatedNode|} | ||
| {|+scale: number | AnimatedNode|} | ||
| {|+scaleX: number | AnimatedNode|} | ||
| {|+scaleY: number | AnimatedNode|} | ||
| {|+translateX: number | AnimatedNode|} | ||
| {|+translateY: number | AnimatedNode|} | ||
| {| | ||
+translate: | ||
| [number | AnimatedNode, number | AnimatedNode] | ||
| AnimatedNode, | ||
|} | ||
| {|+skewX: string|} | ||
| {|+skewY: string|} | ||
// TODO: what is the actual type it expects? | ||
| {| | ||
+matrix: $ReadOnlyArray<number | AnimatedNode> | AnimatedNode, | ||
|}, | ||
>, | ||
|}>; |