@rocapine/react-native-onboarding-ui 1.31.0 → 1.33.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/dist/UI/Pages/ComposableScreen/Renderer.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/AnimatedBox.d.ts +21 -0
- package/dist/UI/Pages/ComposableScreen/elements/AnimatedBox.d.ts.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/AnimatedBox.js +140 -0
- package/dist/UI/Pages/ComposableScreen/elements/AnimatedBox.js.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.d.ts +220 -0
- package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.js +83 -0
- package/dist/UI/Pages/ComposableScreen/elements/BaseBoxProps.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.d.ts +640 -0
- package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/CarouselElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/CarouselElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/DatePickerElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/DatePickerElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/IconElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/IconElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/ImageElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/ImageElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/InputElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/InputElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/KeyboardAvoidingViewElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/KeyboardAvoidingViewElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/LottieElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/LottieElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/ProgressIndicatorElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/ProgressIndicatorElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/ProgressIndicatorElement.js +2 -8
- package/dist/UI/Pages/ComposableScreen/elements/ProgressIndicatorElement.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/RichTextElement.d.ts +305 -0
- package/dist/UI/Pages/ComposableScreen/elements/RichTextElement.d.ts.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/RichTextElement.js +133 -0
- package/dist/UI/Pages/ComposableScreen/elements/RichTextElement.js.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/RiveElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/RiveElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/SafeAreaViewElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/SafeAreaViewElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/ScrollViewElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/ScrollViewElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/StackElement.d.ts +161 -1
- package/dist/UI/Pages/ComposableScreen/elements/StackElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/TextElement.d.ts +199 -1
- package/dist/UI/Pages/ComposableScreen/elements/TextElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/TextElement.js +38 -12
- package/dist/UI/Pages/ComposableScreen/elements/TextElement.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/VideoElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/VideoElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/ZStackElement.d.ts +160 -0
- package/dist/UI/Pages/ComposableScreen/elements/ZStackElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/buildAnimation.d.ts +9 -0
- package/dist/UI/Pages/ComposableScreen/elements/buildAnimation.d.ts.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/buildAnimation.js +106 -0
- package/dist/UI/Pages/ComposableScreen/elements/buildAnimation.js.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/renderElement.d.ts +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/renderElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/renderElement.js +76 -58
- package/dist/UI/Pages/ComposableScreen/elements/renderElement.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/shared.d.ts +12 -1
- package/dist/UI/Pages/ComposableScreen/elements/shared.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/shared.js +6 -1
- package/dist/UI/Pages/ComposableScreen/elements/shared.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/types.d.ts +11 -0
- package/dist/UI/Pages/ComposableScreen/types.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/types.js +15 -2
- package/dist/UI/Pages/ComposableScreen/types.js.map +1 -1
- package/package.json +1 -1
- package/src/UI/Pages/ComposableScreen/Renderer.tsx +1 -1
- package/src/UI/Pages/ComposableScreen/elements/AnimatedBox.tsx +133 -0
- package/src/UI/Pages/ComposableScreen/elements/BaseBoxProps.ts +211 -0
- package/src/UI/Pages/ComposableScreen/elements/ProgressIndicatorElement.tsx +1 -9
- package/src/UI/Pages/ComposableScreen/elements/RichTextElement.tsx +177 -0
- package/src/UI/Pages/ComposableScreen/elements/StackElement.tsx +1 -1
- package/src/UI/Pages/ComposableScreen/elements/TextElement.tsx +39 -11
- package/src/UI/Pages/ComposableScreen/elements/buildAnimation.ts +83 -0
- package/src/UI/Pages/ComposableScreen/elements/renderElement.tsx +34 -2
- package/src/UI/Pages/ComposableScreen/elements/shared.ts +19 -1
- package/src/UI/Pages/ComposableScreen/types.ts +25 -2
|
@@ -79,6 +79,166 @@ export declare const StackElementPropsSchema: z.ZodObject<{
|
|
|
79
79
|
shadowOpacity: z.ZodOptional<z.ZodNumber>;
|
|
80
80
|
shadowRadius: z.ZodOptional<z.ZodNumber>;
|
|
81
81
|
elevation: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
transform: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
translateX: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
translateY: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
scaleX: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
scaleY: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
rotate: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
animation: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
entering: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
preset: z.ZodEnum<{
|
|
93
|
+
FadeIn: "FadeIn";
|
|
94
|
+
FadeInUp: "FadeInUp";
|
|
95
|
+
FadeInDown: "FadeInDown";
|
|
96
|
+
FadeInLeft: "FadeInLeft";
|
|
97
|
+
FadeInRight: "FadeInRight";
|
|
98
|
+
SlideInUp: "SlideInUp";
|
|
99
|
+
SlideInDown: "SlideInDown";
|
|
100
|
+
SlideInLeft: "SlideInLeft";
|
|
101
|
+
SlideInRight: "SlideInRight";
|
|
102
|
+
ZoomIn: "ZoomIn";
|
|
103
|
+
ZoomInRotate: "ZoomInRotate";
|
|
104
|
+
ZoomInUp: "ZoomInUp";
|
|
105
|
+
ZoomInDown: "ZoomInDown";
|
|
106
|
+
ZoomInLeft: "ZoomInLeft";
|
|
107
|
+
ZoomInRight: "ZoomInRight";
|
|
108
|
+
ZoomInEasyUp: "ZoomInEasyUp";
|
|
109
|
+
ZoomInEasyDown: "ZoomInEasyDown";
|
|
110
|
+
BounceIn: "BounceIn";
|
|
111
|
+
BounceInUp: "BounceInUp";
|
|
112
|
+
BounceInDown: "BounceInDown";
|
|
113
|
+
BounceInLeft: "BounceInLeft";
|
|
114
|
+
BounceInRight: "BounceInRight";
|
|
115
|
+
FlipInXUp: "FlipInXUp";
|
|
116
|
+
FlipInYLeft: "FlipInYLeft";
|
|
117
|
+
FlipInXDown: "FlipInXDown";
|
|
118
|
+
FlipInYRight: "FlipInYRight";
|
|
119
|
+
FlipInEasyX: "FlipInEasyX";
|
|
120
|
+
FlipInEasyY: "FlipInEasyY";
|
|
121
|
+
StretchInX: "StretchInX";
|
|
122
|
+
StretchInY: "StretchInY";
|
|
123
|
+
RotateInDownLeft: "RotateInDownLeft";
|
|
124
|
+
RotateInDownRight: "RotateInDownRight";
|
|
125
|
+
RotateInUpLeft: "RotateInUpLeft";
|
|
126
|
+
RotateInUpRight: "RotateInUpRight";
|
|
127
|
+
RollInLeft: "RollInLeft";
|
|
128
|
+
RollInRight: "RollInRight";
|
|
129
|
+
PinwheelIn: "PinwheelIn";
|
|
130
|
+
LightSpeedInLeft: "LightSpeedInLeft";
|
|
131
|
+
LightSpeedInRight: "LightSpeedInRight";
|
|
132
|
+
}>;
|
|
133
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
easing: z.ZodOptional<z.ZodEnum<{
|
|
136
|
+
linear: "linear";
|
|
137
|
+
"ease-in": "ease-in";
|
|
138
|
+
"ease-out": "ease-out";
|
|
139
|
+
"ease-in-out": "ease-in-out";
|
|
140
|
+
}>>;
|
|
141
|
+
spring: z.ZodOptional<z.ZodObject<{
|
|
142
|
+
damping: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
stiffness: z.ZodOptional<z.ZodNumber>;
|
|
144
|
+
mass: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
}, z.core.$strip>>;
|
|
147
|
+
exiting: z.ZodOptional<z.ZodObject<{
|
|
148
|
+
preset: z.ZodEnum<{
|
|
149
|
+
FadeOut: "FadeOut";
|
|
150
|
+
FadeOutUp: "FadeOutUp";
|
|
151
|
+
FadeOutDown: "FadeOutDown";
|
|
152
|
+
FadeOutLeft: "FadeOutLeft";
|
|
153
|
+
FadeOutRight: "FadeOutRight";
|
|
154
|
+
SlideOutUp: "SlideOutUp";
|
|
155
|
+
SlideOutDown: "SlideOutDown";
|
|
156
|
+
SlideOutLeft: "SlideOutLeft";
|
|
157
|
+
SlideOutRight: "SlideOutRight";
|
|
158
|
+
ZoomOut: "ZoomOut";
|
|
159
|
+
ZoomOutRotate: "ZoomOutRotate";
|
|
160
|
+
ZoomOutUp: "ZoomOutUp";
|
|
161
|
+
ZoomOutDown: "ZoomOutDown";
|
|
162
|
+
ZoomOutLeft: "ZoomOutLeft";
|
|
163
|
+
ZoomOutRight: "ZoomOutRight";
|
|
164
|
+
ZoomOutEasyUp: "ZoomOutEasyUp";
|
|
165
|
+
ZoomOutEasyDown: "ZoomOutEasyDown";
|
|
166
|
+
BounceOut: "BounceOut";
|
|
167
|
+
BounceOutUp: "BounceOutUp";
|
|
168
|
+
BounceOutDown: "BounceOutDown";
|
|
169
|
+
BounceOutLeft: "BounceOutLeft";
|
|
170
|
+
BounceOutRight: "BounceOutRight";
|
|
171
|
+
FlipOutXUp: "FlipOutXUp";
|
|
172
|
+
FlipOutYLeft: "FlipOutYLeft";
|
|
173
|
+
FlipOutXDown: "FlipOutXDown";
|
|
174
|
+
FlipOutYRight: "FlipOutYRight";
|
|
175
|
+
FlipOutEasyX: "FlipOutEasyX";
|
|
176
|
+
FlipOutEasyY: "FlipOutEasyY";
|
|
177
|
+
StretchOutX: "StretchOutX";
|
|
178
|
+
StretchOutY: "StretchOutY";
|
|
179
|
+
RotateOutDownLeft: "RotateOutDownLeft";
|
|
180
|
+
RotateOutDownRight: "RotateOutDownRight";
|
|
181
|
+
RotateOutUpLeft: "RotateOutUpLeft";
|
|
182
|
+
RotateOutUpRight: "RotateOutUpRight";
|
|
183
|
+
RollOutLeft: "RollOutLeft";
|
|
184
|
+
RollOutRight: "RollOutRight";
|
|
185
|
+
PinwheelOut: "PinwheelOut";
|
|
186
|
+
LightSpeedOutLeft: "LightSpeedOutLeft";
|
|
187
|
+
LightSpeedOutRight: "LightSpeedOutRight";
|
|
188
|
+
}>;
|
|
189
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
191
|
+
easing: z.ZodOptional<z.ZodEnum<{
|
|
192
|
+
linear: "linear";
|
|
193
|
+
"ease-in": "ease-in";
|
|
194
|
+
"ease-out": "ease-out";
|
|
195
|
+
"ease-in-out": "ease-in-out";
|
|
196
|
+
}>>;
|
|
197
|
+
spring: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
damping: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
stiffness: z.ZodOptional<z.ZodNumber>;
|
|
200
|
+
mass: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
}, z.core.$strip>>;
|
|
202
|
+
}, z.core.$strip>>;
|
|
203
|
+
layout: z.ZodOptional<z.ZodObject<{
|
|
204
|
+
preset: z.ZodEnum<{
|
|
205
|
+
LinearTransition: "LinearTransition";
|
|
206
|
+
FadingTransition: "FadingTransition";
|
|
207
|
+
SequencedTransition: "SequencedTransition";
|
|
208
|
+
JumpingTransition: "JumpingTransition";
|
|
209
|
+
CurvedTransition: "CurvedTransition";
|
|
210
|
+
EntryExitTransition: "EntryExitTransition";
|
|
211
|
+
}>;
|
|
212
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
spring: z.ZodOptional<z.ZodObject<{
|
|
214
|
+
damping: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
stiffness: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
mass: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
}, z.core.$strip>>;
|
|
218
|
+
}, z.core.$strip>>;
|
|
219
|
+
effect: z.ZodOptional<z.ZodObject<{
|
|
220
|
+
preset: z.ZodEnum<{
|
|
221
|
+
rotate: "rotate";
|
|
222
|
+
pulse: "pulse";
|
|
223
|
+
fade: "fade";
|
|
224
|
+
shimmer: "shimmer";
|
|
225
|
+
bounce: "bounce";
|
|
226
|
+
}>;
|
|
227
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
228
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
229
|
+
easing: z.ZodOptional<z.ZodEnum<{
|
|
230
|
+
linear: "linear";
|
|
231
|
+
"ease-in": "ease-in";
|
|
232
|
+
"ease-out": "ease-out";
|
|
233
|
+
"ease-in-out": "ease-in-out";
|
|
234
|
+
}>>;
|
|
235
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
236
|
+
minScale: z.ZodOptional<z.ZodNumber>;
|
|
237
|
+
maxScale: z.ZodOptional<z.ZodNumber>;
|
|
238
|
+
minOpacity: z.ZodOptional<z.ZodNumber>;
|
|
239
|
+
degrees: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
}, z.core.$strip>>;
|
|
241
|
+
}, z.core.$strip>>;
|
|
82
242
|
gap: z.ZodOptional<z.ZodNumber>;
|
|
83
243
|
alignItems: z.ZodOptional<z.ZodEnum<{
|
|
84
244
|
center: "center";
|
|
@@ -104,7 +264,7 @@ type StackUIElement = Extract<UIElement, {
|
|
|
104
264
|
type Props = {
|
|
105
265
|
element: StackUIElement;
|
|
106
266
|
ctx: RenderContext;
|
|
107
|
-
parentType?: "XStack" | "YStack" | "ZStack";
|
|
267
|
+
parentType?: "XStack" | "YStack" | "ZStack" | "RichText";
|
|
108
268
|
};
|
|
109
269
|
export declare const StackElementComponent: ({ element, ctx, parentType }: Props) => React.ReactElement;
|
|
110
270
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/StackElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAO,MAAM,UAAU,CAAC;AAG9C,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC9D,cAAc,CAAC,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,eAAe,GAAG,cAAc,CAAC;IACzF,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"StackElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/StackElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAO,MAAM,UAAU,CAAC;AAG9C,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC9D,cAAc,CAAC,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,eAAe,GAAG,cAAc,CAAC;IACzF,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKlC,CAAC;AAEH,KAAK,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAAE,CAAC,CAAC;AAExE,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,cAAc,CAAC;IACxB,GAAG,EAAE,aAAa,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,8BAA8B,KAAK,KAAG,KAAK,CAAC,YAsCjF,CAAC"}
|
|
@@ -10,8 +10,14 @@ export type TextSpan = {
|
|
|
10
10
|
fontFamily?: string | "inherit";
|
|
11
11
|
fontSize?: number;
|
|
12
12
|
letterSpacing?: number;
|
|
13
|
+
lineHeight?: number;
|
|
13
14
|
color?: string;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
opacity?: number;
|
|
17
|
+
textTransform?: "none" | "uppercase" | "lowercase" | "capitalize";
|
|
14
18
|
textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through";
|
|
19
|
+
textDecorationColor?: string;
|
|
20
|
+
textDecorationStyle?: "solid" | "double" | "dotted" | "dashed";
|
|
15
21
|
};
|
|
16
22
|
export declare const TextSpanSchema: z.ZodObject<{
|
|
17
23
|
text: z.ZodString;
|
|
@@ -23,13 +29,29 @@ export declare const TextSpanSchema: z.ZodObject<{
|
|
|
23
29
|
fontFamily: z.ZodOptional<z.ZodString>;
|
|
24
30
|
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
25
31
|
letterSpacing: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
26
33
|
color: z.ZodOptional<z.ZodString>;
|
|
34
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
35
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
textTransform: z.ZodOptional<z.ZodEnum<{
|
|
37
|
+
none: "none";
|
|
38
|
+
capitalize: "capitalize";
|
|
39
|
+
uppercase: "uppercase";
|
|
40
|
+
lowercase: "lowercase";
|
|
41
|
+
}>>;
|
|
27
42
|
textDecorationLine: z.ZodOptional<z.ZodEnum<{
|
|
28
43
|
none: "none";
|
|
29
44
|
underline: "underline";
|
|
30
45
|
"line-through": "line-through";
|
|
31
46
|
"underline line-through": "underline line-through";
|
|
32
47
|
}>>;
|
|
48
|
+
textDecorationColor: z.ZodOptional<z.ZodString>;
|
|
49
|
+
textDecorationStyle: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
solid: "solid";
|
|
51
|
+
double: "double";
|
|
52
|
+
dotted: "dotted";
|
|
53
|
+
dashed: "dashed";
|
|
54
|
+
}>>;
|
|
33
55
|
}, z.core.$strip>;
|
|
34
56
|
export type TextElementProps = BaseBoxProps & {
|
|
35
57
|
content: string | TextSpan[];
|
|
@@ -113,6 +135,166 @@ export declare const TextElementPropsSchema: z.ZodObject<{
|
|
|
113
135
|
shadowOpacity: z.ZodOptional<z.ZodNumber>;
|
|
114
136
|
shadowRadius: z.ZodOptional<z.ZodNumber>;
|
|
115
137
|
elevation: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
transform: z.ZodOptional<z.ZodObject<{
|
|
139
|
+
translateX: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
translateY: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
scaleX: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
scaleY: z.ZodOptional<z.ZodNumber>;
|
|
144
|
+
rotate: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
animation: z.ZodOptional<z.ZodObject<{
|
|
147
|
+
entering: z.ZodOptional<z.ZodObject<{
|
|
148
|
+
preset: z.ZodEnum<{
|
|
149
|
+
FadeIn: "FadeIn";
|
|
150
|
+
FadeInUp: "FadeInUp";
|
|
151
|
+
FadeInDown: "FadeInDown";
|
|
152
|
+
FadeInLeft: "FadeInLeft";
|
|
153
|
+
FadeInRight: "FadeInRight";
|
|
154
|
+
SlideInUp: "SlideInUp";
|
|
155
|
+
SlideInDown: "SlideInDown";
|
|
156
|
+
SlideInLeft: "SlideInLeft";
|
|
157
|
+
SlideInRight: "SlideInRight";
|
|
158
|
+
ZoomIn: "ZoomIn";
|
|
159
|
+
ZoomInRotate: "ZoomInRotate";
|
|
160
|
+
ZoomInUp: "ZoomInUp";
|
|
161
|
+
ZoomInDown: "ZoomInDown";
|
|
162
|
+
ZoomInLeft: "ZoomInLeft";
|
|
163
|
+
ZoomInRight: "ZoomInRight";
|
|
164
|
+
ZoomInEasyUp: "ZoomInEasyUp";
|
|
165
|
+
ZoomInEasyDown: "ZoomInEasyDown";
|
|
166
|
+
BounceIn: "BounceIn";
|
|
167
|
+
BounceInUp: "BounceInUp";
|
|
168
|
+
BounceInDown: "BounceInDown";
|
|
169
|
+
BounceInLeft: "BounceInLeft";
|
|
170
|
+
BounceInRight: "BounceInRight";
|
|
171
|
+
FlipInXUp: "FlipInXUp";
|
|
172
|
+
FlipInYLeft: "FlipInYLeft";
|
|
173
|
+
FlipInXDown: "FlipInXDown";
|
|
174
|
+
FlipInYRight: "FlipInYRight";
|
|
175
|
+
FlipInEasyX: "FlipInEasyX";
|
|
176
|
+
FlipInEasyY: "FlipInEasyY";
|
|
177
|
+
StretchInX: "StretchInX";
|
|
178
|
+
StretchInY: "StretchInY";
|
|
179
|
+
RotateInDownLeft: "RotateInDownLeft";
|
|
180
|
+
RotateInDownRight: "RotateInDownRight";
|
|
181
|
+
RotateInUpLeft: "RotateInUpLeft";
|
|
182
|
+
RotateInUpRight: "RotateInUpRight";
|
|
183
|
+
RollInLeft: "RollInLeft";
|
|
184
|
+
RollInRight: "RollInRight";
|
|
185
|
+
PinwheelIn: "PinwheelIn";
|
|
186
|
+
LightSpeedInLeft: "LightSpeedInLeft";
|
|
187
|
+
LightSpeedInRight: "LightSpeedInRight";
|
|
188
|
+
}>;
|
|
189
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
191
|
+
easing: z.ZodOptional<z.ZodEnum<{
|
|
192
|
+
linear: "linear";
|
|
193
|
+
"ease-in": "ease-in";
|
|
194
|
+
"ease-out": "ease-out";
|
|
195
|
+
"ease-in-out": "ease-in-out";
|
|
196
|
+
}>>;
|
|
197
|
+
spring: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
damping: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
stiffness: z.ZodOptional<z.ZodNumber>;
|
|
200
|
+
mass: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
}, z.core.$strip>>;
|
|
202
|
+
}, z.core.$strip>>;
|
|
203
|
+
exiting: z.ZodOptional<z.ZodObject<{
|
|
204
|
+
preset: z.ZodEnum<{
|
|
205
|
+
FadeOut: "FadeOut";
|
|
206
|
+
FadeOutUp: "FadeOutUp";
|
|
207
|
+
FadeOutDown: "FadeOutDown";
|
|
208
|
+
FadeOutLeft: "FadeOutLeft";
|
|
209
|
+
FadeOutRight: "FadeOutRight";
|
|
210
|
+
SlideOutUp: "SlideOutUp";
|
|
211
|
+
SlideOutDown: "SlideOutDown";
|
|
212
|
+
SlideOutLeft: "SlideOutLeft";
|
|
213
|
+
SlideOutRight: "SlideOutRight";
|
|
214
|
+
ZoomOut: "ZoomOut";
|
|
215
|
+
ZoomOutRotate: "ZoomOutRotate";
|
|
216
|
+
ZoomOutUp: "ZoomOutUp";
|
|
217
|
+
ZoomOutDown: "ZoomOutDown";
|
|
218
|
+
ZoomOutLeft: "ZoomOutLeft";
|
|
219
|
+
ZoomOutRight: "ZoomOutRight";
|
|
220
|
+
ZoomOutEasyUp: "ZoomOutEasyUp";
|
|
221
|
+
ZoomOutEasyDown: "ZoomOutEasyDown";
|
|
222
|
+
BounceOut: "BounceOut";
|
|
223
|
+
BounceOutUp: "BounceOutUp";
|
|
224
|
+
BounceOutDown: "BounceOutDown";
|
|
225
|
+
BounceOutLeft: "BounceOutLeft";
|
|
226
|
+
BounceOutRight: "BounceOutRight";
|
|
227
|
+
FlipOutXUp: "FlipOutXUp";
|
|
228
|
+
FlipOutYLeft: "FlipOutYLeft";
|
|
229
|
+
FlipOutXDown: "FlipOutXDown";
|
|
230
|
+
FlipOutYRight: "FlipOutYRight";
|
|
231
|
+
FlipOutEasyX: "FlipOutEasyX";
|
|
232
|
+
FlipOutEasyY: "FlipOutEasyY";
|
|
233
|
+
StretchOutX: "StretchOutX";
|
|
234
|
+
StretchOutY: "StretchOutY";
|
|
235
|
+
RotateOutDownLeft: "RotateOutDownLeft";
|
|
236
|
+
RotateOutDownRight: "RotateOutDownRight";
|
|
237
|
+
RotateOutUpLeft: "RotateOutUpLeft";
|
|
238
|
+
RotateOutUpRight: "RotateOutUpRight";
|
|
239
|
+
RollOutLeft: "RollOutLeft";
|
|
240
|
+
RollOutRight: "RollOutRight";
|
|
241
|
+
PinwheelOut: "PinwheelOut";
|
|
242
|
+
LightSpeedOutLeft: "LightSpeedOutLeft";
|
|
243
|
+
LightSpeedOutRight: "LightSpeedOutRight";
|
|
244
|
+
}>;
|
|
245
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
246
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
easing: z.ZodOptional<z.ZodEnum<{
|
|
248
|
+
linear: "linear";
|
|
249
|
+
"ease-in": "ease-in";
|
|
250
|
+
"ease-out": "ease-out";
|
|
251
|
+
"ease-in-out": "ease-in-out";
|
|
252
|
+
}>>;
|
|
253
|
+
spring: z.ZodOptional<z.ZodObject<{
|
|
254
|
+
damping: z.ZodOptional<z.ZodNumber>;
|
|
255
|
+
stiffness: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
mass: z.ZodOptional<z.ZodNumber>;
|
|
257
|
+
}, z.core.$strip>>;
|
|
258
|
+
}, z.core.$strip>>;
|
|
259
|
+
layout: z.ZodOptional<z.ZodObject<{
|
|
260
|
+
preset: z.ZodEnum<{
|
|
261
|
+
LinearTransition: "LinearTransition";
|
|
262
|
+
FadingTransition: "FadingTransition";
|
|
263
|
+
SequencedTransition: "SequencedTransition";
|
|
264
|
+
JumpingTransition: "JumpingTransition";
|
|
265
|
+
CurvedTransition: "CurvedTransition";
|
|
266
|
+
EntryExitTransition: "EntryExitTransition";
|
|
267
|
+
}>;
|
|
268
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
spring: z.ZodOptional<z.ZodObject<{
|
|
270
|
+
damping: z.ZodOptional<z.ZodNumber>;
|
|
271
|
+
stiffness: z.ZodOptional<z.ZodNumber>;
|
|
272
|
+
mass: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
}, z.core.$strip>>;
|
|
274
|
+
}, z.core.$strip>>;
|
|
275
|
+
effect: z.ZodOptional<z.ZodObject<{
|
|
276
|
+
preset: z.ZodEnum<{
|
|
277
|
+
rotate: "rotate";
|
|
278
|
+
pulse: "pulse";
|
|
279
|
+
fade: "fade";
|
|
280
|
+
shimmer: "shimmer";
|
|
281
|
+
bounce: "bounce";
|
|
282
|
+
}>;
|
|
283
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
284
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
285
|
+
easing: z.ZodOptional<z.ZodEnum<{
|
|
286
|
+
linear: "linear";
|
|
287
|
+
"ease-in": "ease-in";
|
|
288
|
+
"ease-out": "ease-out";
|
|
289
|
+
"ease-in-out": "ease-in-out";
|
|
290
|
+
}>>;
|
|
291
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
292
|
+
minScale: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
maxScale: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
minOpacity: z.ZodOptional<z.ZodNumber>;
|
|
295
|
+
degrees: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
}, z.core.$strip>>;
|
|
297
|
+
}, z.core.$strip>>;
|
|
116
298
|
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
|
|
117
299
|
text: z.ZodString;
|
|
118
300
|
fontWeight: z.ZodOptional<z.ZodString>;
|
|
@@ -123,13 +305,29 @@ export declare const TextElementPropsSchema: z.ZodObject<{
|
|
|
123
305
|
fontFamily: z.ZodOptional<z.ZodString>;
|
|
124
306
|
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
125
307
|
letterSpacing: z.ZodOptional<z.ZodNumber>;
|
|
308
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
126
309
|
color: z.ZodOptional<z.ZodString>;
|
|
310
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
311
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
312
|
+
textTransform: z.ZodOptional<z.ZodEnum<{
|
|
313
|
+
none: "none";
|
|
314
|
+
capitalize: "capitalize";
|
|
315
|
+
uppercase: "uppercase";
|
|
316
|
+
lowercase: "lowercase";
|
|
317
|
+
}>>;
|
|
127
318
|
textDecorationLine: z.ZodOptional<z.ZodEnum<{
|
|
128
319
|
none: "none";
|
|
129
320
|
underline: "underline";
|
|
130
321
|
"line-through": "line-through";
|
|
131
322
|
"underline line-through": "underline line-through";
|
|
132
323
|
}>>;
|
|
324
|
+
textDecorationColor: z.ZodOptional<z.ZodString>;
|
|
325
|
+
textDecorationStyle: z.ZodOptional<z.ZodEnum<{
|
|
326
|
+
solid: "solid";
|
|
327
|
+
double: "double";
|
|
328
|
+
dotted: "dotted";
|
|
329
|
+
dashed: "dashed";
|
|
330
|
+
}>>;
|
|
133
331
|
}, z.core.$strip>>]>;
|
|
134
332
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
135
333
|
plain: "plain";
|
|
@@ -157,7 +355,7 @@ type TextUIElement = Extract<UIElement, {
|
|
|
157
355
|
type Props = {
|
|
158
356
|
element: TextUIElement;
|
|
159
357
|
ctx: RenderContext;
|
|
160
|
-
parentType?: "XStack" | "YStack" | "ZStack";
|
|
358
|
+
parentType?: "XStack" | "YStack" | "ZStack" | "RichText";
|
|
161
359
|
};
|
|
162
360
|
export declare const TextElementComponent: ({ element, ctx, parentType }: Props) => React.ReactElement;
|
|
163
361
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/TextElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"TextElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/TextElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC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C;IAChC,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWjC,CAAC;AA0CH,KAAK,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE1D,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,aAAa,CAAC;IACvB,GAAG,EAAE,aAAa,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,8BAA8B,KAAK,KAAG,KAAK,CAAC,YAuGhF,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.TextElementComponent = exports.TextElementPropsSchema = exports.TextSpanSchema = void 0;
|
|
4
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
5
9
|
const zod_1 = require("zod");
|
|
6
10
|
const react_native_1 = require("react-native");
|
|
7
11
|
const react_native_onboarding_1 = require("@rocapine/react-native-onboarding");
|
|
@@ -15,10 +19,16 @@ exports.TextSpanSchema = zod_1.z.object({
|
|
|
15
19
|
fontFamily: zod_1.z.string().optional(),
|
|
16
20
|
fontSize: zod_1.z.number().optional(),
|
|
17
21
|
letterSpacing: zod_1.z.number().optional(),
|
|
22
|
+
lineHeight: zod_1.z.number().optional(),
|
|
18
23
|
color: zod_1.z.string().optional(),
|
|
24
|
+
backgroundColor: zod_1.z.string().optional(),
|
|
25
|
+
opacity: zod_1.z.number().min(0).max(1).optional(),
|
|
26
|
+
textTransform: zod_1.z.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
|
|
19
27
|
textDecorationLine: zod_1.z
|
|
20
28
|
.enum(["none", "underline", "line-through", "underline line-through"])
|
|
21
29
|
.optional(),
|
|
30
|
+
textDecorationColor: zod_1.z.string().optional(),
|
|
31
|
+
textDecorationStyle: zod_1.z.enum(["solid", "double", "dotted", "dashed"]).optional(),
|
|
22
32
|
});
|
|
23
33
|
exports.TextElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema.extend({
|
|
24
34
|
content: zod_1.z.union([zod_1.z.string(), zod_1.z.array(exports.TextSpanSchema)]),
|
|
@@ -49,14 +59,30 @@ const RichTextSpan = ({ span, baseFontFamily, }) => {
|
|
|
49
59
|
fontStyle: span.fontStyle,
|
|
50
60
|
fontSize: span.fontSize,
|
|
51
61
|
letterSpacing: span.letterSpacing,
|
|
62
|
+
lineHeight: span.lineHeight,
|
|
52
63
|
color: span.color,
|
|
64
|
+
backgroundColor: span.backgroundColor,
|
|
65
|
+
opacity: span.opacity,
|
|
66
|
+
textTransform: span.textTransform,
|
|
53
67
|
textDecorationLine: span.textDecorationLine,
|
|
68
|
+
textDecorationColor: span.textDecorationColor,
|
|
69
|
+
textDecorationStyle: span.textDecorationStyle,
|
|
54
70
|
}, children: span.text }));
|
|
55
71
|
};
|
|
56
72
|
const TextElementComponent = ({ element, ctx, parentType }) => {
|
|
57
|
-
var _a, _b, _c;
|
|
73
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
58
74
|
const { theme, variables } = ctx;
|
|
59
75
|
const p = element.props;
|
|
76
|
+
// Text-style defaults inherited from a parent `RichText` container (empty when
|
|
77
|
+
// this Text isn't inside one). Element props always win over inherited values.
|
|
78
|
+
const inherited = react_1.default.useContext(shared_1.RichTextStyleContext);
|
|
79
|
+
const fontSize = (_a = p.fontSize) !== null && _a !== void 0 ? _a : inherited.fontSize;
|
|
80
|
+
const fontWeight = (_b = p.fontWeight) !== null && _b !== void 0 ? _b : inherited.fontWeight;
|
|
81
|
+
const fontStyle = (_c = p.fontStyle) !== null && _c !== void 0 ? _c : inherited.fontStyle;
|
|
82
|
+
const color = (_d = p.color) !== null && _d !== void 0 ? _d : inherited.color;
|
|
83
|
+
const textAlign = (_e = p.textAlign) !== null && _e !== void 0 ? _e : inherited.textAlign;
|
|
84
|
+
const letterSpacing = (_f = p.letterSpacing) !== null && _f !== void 0 ? _f : inherited.letterSpacing;
|
|
85
|
+
const lineHeight = (_g = p.lineHeight) !== null && _g !== void 0 ? _g : inherited.lineHeight;
|
|
60
86
|
const isExpression = p.mode === "expression";
|
|
61
87
|
const content = Array.isArray(p.content)
|
|
62
88
|
? isExpression
|
|
@@ -65,11 +91,11 @@ const TextElementComponent = ({ element, ctx, parentType }) => {
|
|
|
65
91
|
: isExpression
|
|
66
92
|
? (0, shared_1.interpolate)(p.content, variables)
|
|
67
93
|
: p.content;
|
|
68
|
-
const inheritedFontFamily = (0, shared_1.resolveInheritedFontFamily)(p.fontFamily, theme.typography.defaultFontFamily);
|
|
69
|
-
const resolvedFont = (0, react_native_onboarding_1.useResolvedFontStyle)(inheritedFontFamily,
|
|
94
|
+
const inheritedFontFamily = (0, shared_1.resolveInheritedFontFamily)((_h = p.fontFamily) !== null && _h !== void 0 ? _h : inherited.fontFamily, theme.typography.defaultFontFamily);
|
|
95
|
+
const resolvedFont = (0, react_native_onboarding_1.useResolvedFontStyle)(inheritedFontFamily, fontWeight);
|
|
70
96
|
const textNode = ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: {
|
|
71
97
|
flex: p.flex,
|
|
72
|
-
flexShrink: (
|
|
98
|
+
flexShrink: (_j = p.flexShrink) !== null && _j !== void 0 ? _j : (parentType === "XStack" ? 1 : undefined),
|
|
73
99
|
flexGrow: p.backgroundGradient ? undefined : p.flexGrow,
|
|
74
100
|
alignSelf: p.backgroundGradient ? undefined : p.alignSelf,
|
|
75
101
|
width: p.backgroundGradient ? undefined : (0, shared_1.dim)(p.width),
|
|
@@ -78,14 +104,14 @@ const TextElementComponent = ({ element, ctx, parentType }) => {
|
|
|
78
104
|
maxWidth: p.backgroundGradient ? undefined : p.maxWidth,
|
|
79
105
|
minHeight: p.backgroundGradient ? undefined : p.minHeight,
|
|
80
106
|
maxHeight: p.backgroundGradient ? undefined : p.maxHeight,
|
|
81
|
-
fontSize
|
|
82
|
-
fontWeight: resolvedFont.resolvedToVariant ? undefined :
|
|
107
|
+
fontSize,
|
|
108
|
+
fontWeight: resolvedFont.resolvedToVariant ? undefined : fontWeight,
|
|
83
109
|
fontFamily: resolvedFont.fontFamily,
|
|
84
|
-
fontStyle
|
|
85
|
-
color:
|
|
86
|
-
textAlign
|
|
87
|
-
letterSpacing
|
|
88
|
-
lineHeight
|
|
110
|
+
fontStyle,
|
|
111
|
+
color: color !== null && color !== void 0 ? color : theme.colors.text.primary,
|
|
112
|
+
textAlign,
|
|
113
|
+
letterSpacing,
|
|
114
|
+
lineHeight,
|
|
89
115
|
backgroundColor: p.backgroundGradient ? undefined : p.backgroundColor,
|
|
90
116
|
padding: p.backgroundGradient ? undefined : p.padding,
|
|
91
117
|
paddingHorizontal: p.backgroundGradient ? undefined : p.paddingHorizontal,
|
|
@@ -103,7 +129,7 @@ const TextElementComponent = ({ element, ctx, parentType }) => {
|
|
|
103
129
|
if (p.backgroundGradient) {
|
|
104
130
|
return ((0, jsx_runtime_1.jsx)(GradientBox_1.GradientBox, { gradient: p.backgroundGradient, style: {
|
|
105
131
|
flex: p.flex,
|
|
106
|
-
flexShrink: (
|
|
132
|
+
flexShrink: (_k = p.flexShrink) !== null && _k !== void 0 ? _k : (parentType === "XStack" ? 1 : undefined),
|
|
107
133
|
flexGrow: p.flexGrow,
|
|
108
134
|
alignSelf: p.alignSelf,
|
|
109
135
|
width: (0, shared_1.dim)(p.width),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextElement.js","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/TextElement.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextElement.js","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/TextElement.tsx"],"names":[],"mappings":";;;;;;;AAAA,kDAA0B;AAC1B,6BAAwB;AACxB,+CAAoC;AACpC,+EAAyE;AACzE,iDAAkE;AAElE,qCAA6G;AAC7G,+CAA4C;AAuB/B,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,SAAS,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;IAClD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,K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