@rocapine/react-native-onboarding-ui 1.34.1 → 1.36.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/elements/ButtonElement.d.ts +10 -0
- package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.js +3 -0
- package/dist/UI/Pages/ComposableScreen/elements/ButtonElement.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.d.ts +10 -0
- package/dist/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.js +3 -0
- package/dist/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/ImageElement.d.ts +3 -0
- package/dist/UI/Pages/ComposableScreen/elements/ImageElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/ImageElement.js +6 -4
- package/dist/UI/Pages/ComposableScreen/elements/ImageElement.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/ProgressiveBlurImageElement.d.ts +327 -0
- package/dist/UI/Pages/ComposableScreen/elements/ProgressiveBlurImageElement.d.ts.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/ProgressiveBlurImageElement.js +240 -0
- package/dist/UI/Pages/ComposableScreen/elements/ProgressiveBlurImageElement.js.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.d.ts +10 -0
- package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.js +3 -0
- package/dist/UI/Pages/ComposableScreen/elements/RadioGroupElement.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/haptics.d.ts +3 -0
- package/dist/UI/Pages/ComposableScreen/elements/haptics.d.ts.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/haptics.js +27 -0
- package/dist/UI/Pages/ComposableScreen/elements/haptics.js.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/renderElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/renderElement.js +4 -0
- package/dist/UI/Pages/ComposableScreen/elements/renderElement.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/types.d.ts +8 -0
- package/dist/UI/Pages/ComposableScreen/types.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/types.js +8 -0
- package/dist/UI/Pages/ComposableScreen/types.js.map +1 -1
- package/package.json +9 -1
- package/src/UI/Pages/ComposableScreen/elements/ButtonElement.tsx +4 -0
- package/src/UI/Pages/ComposableScreen/elements/CheckboxGroupElement.tsx +4 -0
- package/src/UI/Pages/ComposableScreen/elements/ImageElement.tsx +15 -6
- package/src/UI/Pages/ComposableScreen/elements/ProgressiveBlurImageElement.tsx +348 -0
- package/src/UI/Pages/ComposableScreen/elements/RadioGroupElement.tsx +4 -0
- package/src/UI/Pages/ComposableScreen/elements/haptics.ts +24 -0
- package/src/UI/Pages/ComposableScreen/elements/renderElement.tsx +5 -0
- package/src/UI/Pages/ComposableScreen/types.ts +25 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { BaseBoxProps, GradientEdge } from "./BaseBoxProps";
|
|
4
|
+
import { UIElement } from "../types";
|
|
5
|
+
import { RenderContext } from "./shared";
|
|
6
|
+
export type BlurMaskStop = {
|
|
7
|
+
position: number;
|
|
8
|
+
opacity: number;
|
|
9
|
+
};
|
|
10
|
+
export type LinearBlurMask = {
|
|
11
|
+
type?: "linear";
|
|
12
|
+
from: GradientEdge;
|
|
13
|
+
to: GradientEdge;
|
|
14
|
+
stops: BlurMaskStop[];
|
|
15
|
+
};
|
|
16
|
+
export type RadialBlurMask = {
|
|
17
|
+
type: "radial";
|
|
18
|
+
center?: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
};
|
|
22
|
+
radius?: number;
|
|
23
|
+
stops: BlurMaskStop[];
|
|
24
|
+
};
|
|
25
|
+
export type BlurMask = LinearBlurMask | RadialBlurMask;
|
|
26
|
+
export type ProgressiveBlurImageElementProps = BaseBoxProps & {
|
|
27
|
+
url: string;
|
|
28
|
+
aspectRatio?: number;
|
|
29
|
+
resizeMode?: "cover" | "contain" | "stretch" | "center";
|
|
30
|
+
intensity: number;
|
|
31
|
+
tint?: "light" | "dark" | "default";
|
|
32
|
+
mask: BlurMask;
|
|
33
|
+
maxBlurOpacity?: number;
|
|
34
|
+
};
|
|
35
|
+
export declare const ProgressiveBlurImageElementPropsSchema: z.ZodObject<{
|
|
36
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
37
|
+
height: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
38
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
flex: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
flexShrink: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
flexGrow: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
alignSelf: z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
auto: "auto";
|
|
47
|
+
center: "center";
|
|
48
|
+
"flex-start": "flex-start";
|
|
49
|
+
"flex-end": "flex-end";
|
|
50
|
+
stretch: "stretch";
|
|
51
|
+
baseline: "baseline";
|
|
52
|
+
}>>;
|
|
53
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
55
|
+
backgroundGradient: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"linear">;
|
|
57
|
+
from: z.ZodEnum<{
|
|
58
|
+
left: "left";
|
|
59
|
+
right: "right";
|
|
60
|
+
top: "top";
|
|
61
|
+
bottom: "bottom";
|
|
62
|
+
topLeft: "topLeft";
|
|
63
|
+
topRight: "topRight";
|
|
64
|
+
bottomLeft: "bottomLeft";
|
|
65
|
+
bottomRight: "bottomRight";
|
|
66
|
+
}>;
|
|
67
|
+
to: z.ZodEnum<{
|
|
68
|
+
left: "left";
|
|
69
|
+
right: "right";
|
|
70
|
+
top: "top";
|
|
71
|
+
bottom: "bottom";
|
|
72
|
+
topLeft: "topLeft";
|
|
73
|
+
topRight: "topRight";
|
|
74
|
+
bottomLeft: "bottomLeft";
|
|
75
|
+
bottomRight: "bottomRight";
|
|
76
|
+
}>;
|
|
77
|
+
stops: z.ZodArray<z.ZodObject<{
|
|
78
|
+
color: z.ZodString;
|
|
79
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
}, z.core.$strip>], "type">>;
|
|
82
|
+
overflow: z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
visible: "visible";
|
|
84
|
+
hidden: "hidden";
|
|
85
|
+
scroll: "scroll";
|
|
86
|
+
}>>;
|
|
87
|
+
margin: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
marginHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
marginVertical: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
paddingHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
paddingVertical: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
borderWidth: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
borderRadius: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
|
96
|
+
shadowColor: z.ZodOptional<z.ZodString>;
|
|
97
|
+
shadowOffset: z.ZodOptional<z.ZodObject<{
|
|
98
|
+
width: z.ZodNumber;
|
|
99
|
+
height: z.ZodNumber;
|
|
100
|
+
}, z.core.$strip>>;
|
|
101
|
+
shadowOpacity: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
shadowRadius: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
elevation: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
transform: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
translateX: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
translateY: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
scaleX: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
scaleY: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
rotate: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
animation: z.ZodOptional<z.ZodObject<{
|
|
113
|
+
entering: z.ZodOptional<z.ZodObject<{
|
|
114
|
+
preset: z.ZodEnum<{
|
|
115
|
+
FadeIn: "FadeIn";
|
|
116
|
+
FadeInUp: "FadeInUp";
|
|
117
|
+
FadeInDown: "FadeInDown";
|
|
118
|
+
FadeInLeft: "FadeInLeft";
|
|
119
|
+
FadeInRight: "FadeInRight";
|
|
120
|
+
SlideInUp: "SlideInUp";
|
|
121
|
+
SlideInDown: "SlideInDown";
|
|
122
|
+
SlideInLeft: "SlideInLeft";
|
|
123
|
+
SlideInRight: "SlideInRight";
|
|
124
|
+
ZoomIn: "ZoomIn";
|
|
125
|
+
ZoomInRotate: "ZoomInRotate";
|
|
126
|
+
ZoomInUp: "ZoomInUp";
|
|
127
|
+
ZoomInDown: "ZoomInDown";
|
|
128
|
+
ZoomInLeft: "ZoomInLeft";
|
|
129
|
+
ZoomInRight: "ZoomInRight";
|
|
130
|
+
ZoomInEasyUp: "ZoomInEasyUp";
|
|
131
|
+
ZoomInEasyDown: "ZoomInEasyDown";
|
|
132
|
+
BounceIn: "BounceIn";
|
|
133
|
+
BounceInUp: "BounceInUp";
|
|
134
|
+
BounceInDown: "BounceInDown";
|
|
135
|
+
BounceInLeft: "BounceInLeft";
|
|
136
|
+
BounceInRight: "BounceInRight";
|
|
137
|
+
FlipInXUp: "FlipInXUp";
|
|
138
|
+
FlipInYLeft: "FlipInYLeft";
|
|
139
|
+
FlipInXDown: "FlipInXDown";
|
|
140
|
+
FlipInYRight: "FlipInYRight";
|
|
141
|
+
FlipInEasyX: "FlipInEasyX";
|
|
142
|
+
FlipInEasyY: "FlipInEasyY";
|
|
143
|
+
StretchInX: "StretchInX";
|
|
144
|
+
StretchInY: "StretchInY";
|
|
145
|
+
RotateInDownLeft: "RotateInDownLeft";
|
|
146
|
+
RotateInDownRight: "RotateInDownRight";
|
|
147
|
+
RotateInUpLeft: "RotateInUpLeft";
|
|
148
|
+
RotateInUpRight: "RotateInUpRight";
|
|
149
|
+
RollInLeft: "RollInLeft";
|
|
150
|
+
RollInRight: "RollInRight";
|
|
151
|
+
PinwheelIn: "PinwheelIn";
|
|
152
|
+
LightSpeedInLeft: "LightSpeedInLeft";
|
|
153
|
+
LightSpeedInRight: "LightSpeedInRight";
|
|
154
|
+
}>;
|
|
155
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
easing: z.ZodOptional<z.ZodEnum<{
|
|
158
|
+
linear: "linear";
|
|
159
|
+
"ease-in": "ease-in";
|
|
160
|
+
"ease-out": "ease-out";
|
|
161
|
+
"ease-in-out": "ease-in-out";
|
|
162
|
+
}>>;
|
|
163
|
+
spring: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
damping: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
stiffness: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
mass: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
}, z.core.$strip>>;
|
|
168
|
+
}, z.core.$strip>>;
|
|
169
|
+
exiting: z.ZodOptional<z.ZodObject<{
|
|
170
|
+
preset: z.ZodEnum<{
|
|
171
|
+
FadeOut: "FadeOut";
|
|
172
|
+
FadeOutUp: "FadeOutUp";
|
|
173
|
+
FadeOutDown: "FadeOutDown";
|
|
174
|
+
FadeOutLeft: "FadeOutLeft";
|
|
175
|
+
FadeOutRight: "FadeOutRight";
|
|
176
|
+
SlideOutUp: "SlideOutUp";
|
|
177
|
+
SlideOutDown: "SlideOutDown";
|
|
178
|
+
SlideOutLeft: "SlideOutLeft";
|
|
179
|
+
SlideOutRight: "SlideOutRight";
|
|
180
|
+
ZoomOut: "ZoomOut";
|
|
181
|
+
ZoomOutRotate: "ZoomOutRotate";
|
|
182
|
+
ZoomOutUp: "ZoomOutUp";
|
|
183
|
+
ZoomOutDown: "ZoomOutDown";
|
|
184
|
+
ZoomOutLeft: "ZoomOutLeft";
|
|
185
|
+
ZoomOutRight: "ZoomOutRight";
|
|
186
|
+
ZoomOutEasyUp: "ZoomOutEasyUp";
|
|
187
|
+
ZoomOutEasyDown: "ZoomOutEasyDown";
|
|
188
|
+
BounceOut: "BounceOut";
|
|
189
|
+
BounceOutUp: "BounceOutUp";
|
|
190
|
+
BounceOutDown: "BounceOutDown";
|
|
191
|
+
BounceOutLeft: "BounceOutLeft";
|
|
192
|
+
BounceOutRight: "BounceOutRight";
|
|
193
|
+
FlipOutXUp: "FlipOutXUp";
|
|
194
|
+
FlipOutYLeft: "FlipOutYLeft";
|
|
195
|
+
FlipOutXDown: "FlipOutXDown";
|
|
196
|
+
FlipOutYRight: "FlipOutYRight";
|
|
197
|
+
FlipOutEasyX: "FlipOutEasyX";
|
|
198
|
+
FlipOutEasyY: "FlipOutEasyY";
|
|
199
|
+
StretchOutX: "StretchOutX";
|
|
200
|
+
StretchOutY: "StretchOutY";
|
|
201
|
+
RotateOutDownLeft: "RotateOutDownLeft";
|
|
202
|
+
RotateOutDownRight: "RotateOutDownRight";
|
|
203
|
+
RotateOutUpLeft: "RotateOutUpLeft";
|
|
204
|
+
RotateOutUpRight: "RotateOutUpRight";
|
|
205
|
+
RollOutLeft: "RollOutLeft";
|
|
206
|
+
RollOutRight: "RollOutRight";
|
|
207
|
+
PinwheelOut: "PinwheelOut";
|
|
208
|
+
LightSpeedOutLeft: "LightSpeedOutLeft";
|
|
209
|
+
LightSpeedOutRight: "LightSpeedOutRight";
|
|
210
|
+
}>;
|
|
211
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
easing: z.ZodOptional<z.ZodEnum<{
|
|
214
|
+
linear: "linear";
|
|
215
|
+
"ease-in": "ease-in";
|
|
216
|
+
"ease-out": "ease-out";
|
|
217
|
+
"ease-in-out": "ease-in-out";
|
|
218
|
+
}>>;
|
|
219
|
+
spring: z.ZodOptional<z.ZodObject<{
|
|
220
|
+
damping: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
stiffness: z.ZodOptional<z.ZodNumber>;
|
|
222
|
+
mass: z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
}, z.core.$strip>>;
|
|
224
|
+
}, z.core.$strip>>;
|
|
225
|
+
layout: z.ZodOptional<z.ZodObject<{
|
|
226
|
+
preset: z.ZodEnum<{
|
|
227
|
+
LinearTransition: "LinearTransition";
|
|
228
|
+
FadingTransition: "FadingTransition";
|
|
229
|
+
SequencedTransition: "SequencedTransition";
|
|
230
|
+
JumpingTransition: "JumpingTransition";
|
|
231
|
+
CurvedTransition: "CurvedTransition";
|
|
232
|
+
EntryExitTransition: "EntryExitTransition";
|
|
233
|
+
}>;
|
|
234
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
235
|
+
spring: z.ZodOptional<z.ZodObject<{
|
|
236
|
+
damping: z.ZodOptional<z.ZodNumber>;
|
|
237
|
+
stiffness: z.ZodOptional<z.ZodNumber>;
|
|
238
|
+
mass: z.ZodOptional<z.ZodNumber>;
|
|
239
|
+
}, z.core.$strip>>;
|
|
240
|
+
}, z.core.$strip>>;
|
|
241
|
+
effect: z.ZodOptional<z.ZodObject<{
|
|
242
|
+
preset: z.ZodEnum<{
|
|
243
|
+
rotate: "rotate";
|
|
244
|
+
pulse: "pulse";
|
|
245
|
+
fade: "fade";
|
|
246
|
+
shimmer: "shimmer";
|
|
247
|
+
bounce: "bounce";
|
|
248
|
+
}>;
|
|
249
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
250
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
251
|
+
easing: z.ZodOptional<z.ZodEnum<{
|
|
252
|
+
linear: "linear";
|
|
253
|
+
"ease-in": "ease-in";
|
|
254
|
+
"ease-out": "ease-out";
|
|
255
|
+
"ease-in-out": "ease-in-out";
|
|
256
|
+
}>>;
|
|
257
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
+
minScale: z.ZodOptional<z.ZodNumber>;
|
|
259
|
+
maxScale: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
minOpacity: z.ZodOptional<z.ZodNumber>;
|
|
261
|
+
degrees: z.ZodOptional<z.ZodNumber>;
|
|
262
|
+
}, z.core.$strip>>;
|
|
263
|
+
}, z.core.$strip>>;
|
|
264
|
+
url: z.ZodString;
|
|
265
|
+
aspectRatio: z.ZodOptional<z.ZodNumber>;
|
|
266
|
+
resizeMode: z.ZodOptional<z.ZodEnum<{
|
|
267
|
+
center: "center";
|
|
268
|
+
contain: "contain";
|
|
269
|
+
stretch: "stretch";
|
|
270
|
+
cover: "cover";
|
|
271
|
+
}>>;
|
|
272
|
+
intensity: z.ZodNumber;
|
|
273
|
+
tint: z.ZodOptional<z.ZodEnum<{
|
|
274
|
+
light: "light";
|
|
275
|
+
dark: "dark";
|
|
276
|
+
default: "default";
|
|
277
|
+
}>>;
|
|
278
|
+
mask: z.ZodUnion<readonly [z.ZodObject<{
|
|
279
|
+
type: z.ZodOptional<z.ZodLiteral<"linear">>;
|
|
280
|
+
from: z.ZodEnum<{
|
|
281
|
+
left: "left";
|
|
282
|
+
right: "right";
|
|
283
|
+
top: "top";
|
|
284
|
+
bottom: "bottom";
|
|
285
|
+
topLeft: "topLeft";
|
|
286
|
+
topRight: "topRight";
|
|
287
|
+
bottomLeft: "bottomLeft";
|
|
288
|
+
bottomRight: "bottomRight";
|
|
289
|
+
}>;
|
|
290
|
+
to: z.ZodEnum<{
|
|
291
|
+
left: "left";
|
|
292
|
+
right: "right";
|
|
293
|
+
top: "top";
|
|
294
|
+
bottom: "bottom";
|
|
295
|
+
topLeft: "topLeft";
|
|
296
|
+
topRight: "topRight";
|
|
297
|
+
bottomLeft: "bottomLeft";
|
|
298
|
+
bottomRight: "bottomRight";
|
|
299
|
+
}>;
|
|
300
|
+
stops: z.ZodArray<z.ZodObject<{
|
|
301
|
+
position: z.ZodNumber;
|
|
302
|
+
opacity: z.ZodNumber;
|
|
303
|
+
}, z.core.$strip>>;
|
|
304
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
305
|
+
type: z.ZodLiteral<"radial">;
|
|
306
|
+
center: z.ZodOptional<z.ZodObject<{
|
|
307
|
+
x: z.ZodNumber;
|
|
308
|
+
y: z.ZodNumber;
|
|
309
|
+
}, z.core.$strip>>;
|
|
310
|
+
radius: z.ZodOptional<z.ZodNumber>;
|
|
311
|
+
stops: z.ZodArray<z.ZodObject<{
|
|
312
|
+
position: z.ZodNumber;
|
|
313
|
+
opacity: z.ZodNumber;
|
|
314
|
+
}, z.core.$strip>>;
|
|
315
|
+
}, z.core.$strip>]>;
|
|
316
|
+
maxBlurOpacity: z.ZodOptional<z.ZodNumber>;
|
|
317
|
+
}, z.core.$strip>;
|
|
318
|
+
type BlurUIElement = Extract<UIElement, {
|
|
319
|
+
type: "ProgressiveBlurImage";
|
|
320
|
+
}>;
|
|
321
|
+
type Props = {
|
|
322
|
+
element: BlurUIElement;
|
|
323
|
+
ctx: RenderContext;
|
|
324
|
+
};
|
|
325
|
+
export declare const ProgressiveBlurImageElementComponent: ({ element }: Props) => React.ReactElement;
|
|
326
|
+
export {};
|
|
327
|
+
//# sourceMappingURL=ProgressiveBlurImageElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressiveBlurImageElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/ProgressiveBlurImageElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAsB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEhF,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAO,MAAM,UAAU,CAAC;AAiC9C,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACjE,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,YAAY,CAAC;IAAC,EAAE,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,YAAY,EAAE,CAAA;CAAE,CAAC;AAC9G,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,cAAc,GAAG,cAAc,CAAC;AAEvD,MAAM,MAAM,gCAAgC,GAAG,YAAY,GAAG;IAC5D,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,IAAI,EAAE,QAAQ,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAuBF,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQjD,CAAC;AA2CH,KAAK,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,sBAAsB,CAAA;CAAE,CAAC,CAAC;AAE1E,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,aAAa,CAAC;IACvB,GAAG,EAAE,aAAa,CAAC;CACpB,CAAC;AAyGF,eAAO,MAAM,oCAAoC,GAAI,aAAa,KAAK,KAAG,KAAK,CAAC,YAyG/E,CAAC"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ProgressiveBlurImageElementComponent = exports.ProgressiveBlurImageElementPropsSchema = void 0;
|
|
40
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
+
const react_1 = __importDefault(require("react"));
|
|
42
|
+
const zod_1 = require("zod");
|
|
43
|
+
const react_native_1 = require("react-native");
|
|
44
|
+
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
45
|
+
const BaseBoxProps_1 = require("./BaseBoxProps");
|
|
46
|
+
const shared_1 = require("./shared");
|
|
47
|
+
const GradientBox_1 = require("./GradientBox");
|
|
48
|
+
// expo-image (better webp/avif) — optional, falls back to RN Image.
|
|
49
|
+
let ExpoImage = null;
|
|
50
|
+
try {
|
|
51
|
+
ExpoImage = require("expo-image").Image;
|
|
52
|
+
}
|
|
53
|
+
catch (_a) {
|
|
54
|
+
// expo-image not installed — RN Image fallback below
|
|
55
|
+
}
|
|
56
|
+
// @react-native-masked-view/masked-view — optional. Absent → no progressive
|
|
57
|
+
// mask, so we degrade to a flat gradient scrim rather than a full-screen blur.
|
|
58
|
+
let MaskedView = null;
|
|
59
|
+
try {
|
|
60
|
+
MaskedView = require("@react-native-masked-view/masked-view").default;
|
|
61
|
+
}
|
|
62
|
+
catch (_b) {
|
|
63
|
+
// masked-view not installed
|
|
64
|
+
}
|
|
65
|
+
// expo-linear-gradient — optional. Used for the LINEAR mask + tint/scrim
|
|
66
|
+
// gradients. Absent → plain dark View scrim (radial masks use react-native-svg,
|
|
67
|
+
// a required dep, so they don't depend on this).
|
|
68
|
+
let LinearGradient = null;
|
|
69
|
+
try {
|
|
70
|
+
LinearGradient = require("expo-linear-gradient").LinearGradient;
|
|
71
|
+
}
|
|
72
|
+
catch (_c) {
|
|
73
|
+
// expo-linear-gradient not installed
|
|
74
|
+
}
|
|
75
|
+
const BlurMaskStopSchema = zod_1.z.object({
|
|
76
|
+
position: zod_1.z.number().min(0).max(1),
|
|
77
|
+
opacity: zod_1.z.number().min(0).max(1),
|
|
78
|
+
});
|
|
79
|
+
const EDGE_ENUM = zod_1.z.enum(["top", "bottom", "left", "right", "topLeft", "topRight", "bottomLeft", "bottomRight"]);
|
|
80
|
+
const LinearBlurMaskSchema = zod_1.z.object({
|
|
81
|
+
type: zod_1.z.literal("linear").optional(),
|
|
82
|
+
from: EDGE_ENUM,
|
|
83
|
+
to: EDGE_ENUM,
|
|
84
|
+
stops: zod_1.z.array(BlurMaskStopSchema).min(2, "blur mask requires at least 2 stops"),
|
|
85
|
+
});
|
|
86
|
+
const RadialBlurMaskSchema = zod_1.z.object({
|
|
87
|
+
type: zod_1.z.literal("radial"),
|
|
88
|
+
center: zod_1.z.object({ x: zod_1.z.number().min(0).max(1), y: zod_1.z.number().min(0).max(1) }).optional(),
|
|
89
|
+
radius: zod_1.z.number().positive().optional(),
|
|
90
|
+
stops: zod_1.z.array(BlurMaskStopSchema).min(2, "blur mask requires at least 2 stops"),
|
|
91
|
+
});
|
|
92
|
+
exports.ProgressiveBlurImageElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema.extend({
|
|
93
|
+
url: zod_1.z.string().min(1, "url must not be empty"),
|
|
94
|
+
aspectRatio: zod_1.z.number().optional(),
|
|
95
|
+
resizeMode: zod_1.z.enum(["cover", "contain", "stretch", "center"]).optional(),
|
|
96
|
+
intensity: zod_1.z.number().min(0).max(100),
|
|
97
|
+
tint: zod_1.z.enum(["light", "dark", "default"]).optional(),
|
|
98
|
+
mask: zod_1.z.union([LinearBlurMaskSchema, RadialBlurMaskSchema]),
|
|
99
|
+
maxBlurOpacity: zod_1.z.number().min(0).max(1).optional(),
|
|
100
|
+
});
|
|
101
|
+
const CONTENT_FIT = {
|
|
102
|
+
cover: "cover",
|
|
103
|
+
contain: "contain",
|
|
104
|
+
stretch: "fill",
|
|
105
|
+
center: "none",
|
|
106
|
+
};
|
|
107
|
+
const EDGE_POINT = {
|
|
108
|
+
top: { x: 0.5, y: 0 },
|
|
109
|
+
bottom: { x: 0.5, y: 1 },
|
|
110
|
+
left: { x: 0, y: 0.5 },
|
|
111
|
+
right: { x: 1, y: 0.5 },
|
|
112
|
+
topLeft: { x: 0, y: 0 },
|
|
113
|
+
topRight: { x: 1, y: 0 },
|
|
114
|
+
bottomLeft: { x: 0, y: 1 },
|
|
115
|
+
bottomRight: { x: 1, y: 1 },
|
|
116
|
+
};
|
|
117
|
+
const renderRaster = (url, resizeMode, style, blurRadius) => ExpoImage ? ((0, jsx_runtime_1.jsx)(ExpoImage, { source: url, contentFit: CONTENT_FIT[resizeMode !== null && resizeMode !== void 0 ? resizeMode : "cover"], blurRadius: blurRadius, style: style })) : ((0, jsx_runtime_1.jsx)(react_native_1.Image, { source: { uri: url }, resizeMode: resizeMode, blurRadius: blurRadius, style: style }));
|
|
118
|
+
// expo-blur's BlurView blurs the *backdrop behind it*, but a MaskedView renders
|
|
119
|
+
// its child into an isolated offscreen layer with no backdrop to sample — so a
|
|
120
|
+
// masked BlurView is transparent on iOS (no blur, no tint). Instead we mask a
|
|
121
|
+
// real blurred *copy* of the image, which composites reliably on both platforms.
|
|
122
|
+
// Map the 0–100 intensity onto an expo-image/RN blurRadius in px.
|
|
123
|
+
const intensityToBlurRadius = (intensity) => Math.max(0, Math.round(intensity * 0.3));
|
|
124
|
+
const isRadialMask = (mask) => mask.type === "radial";
|
|
125
|
+
// ---------------------------------------------------------------------------
|
|
126
|
+
// LINEAR helpers (expo-linear-gradient).
|
|
127
|
+
// ---------------------------------------------------------------------------
|
|
128
|
+
// Mask alpha (= blur strength) → black with that alpha. MaskedView keys off the
|
|
129
|
+
// alpha channel of its mask element, so a transparent→opaque black ramp reveals
|
|
130
|
+
// the blurred image copy only where the mask is opaque.
|
|
131
|
+
const linearMaskColors = (mask, maxBlurOpacity) => mask.stops.map((s) => `rgba(0,0,0,${(s.opacity * maxBlurOpacity).toFixed(3)})`);
|
|
132
|
+
// `tint` → an rgb triple for the darkening/lightening overlay. "default" = no tint.
|
|
133
|
+
const tintRgb = (tint) => tint === "dark" ? "0,0,0" : tint === "light" ? "255,255,255" : null;
|
|
134
|
+
// A linear color gradient following the mask shape (tint overlay / fallback
|
|
135
|
+
// scrim). Tint alpha tracks the mask strength × maxBlurOpacity so a "dark" tint
|
|
136
|
+
// actually reads dark (no extra dampening).
|
|
137
|
+
const linearColorGradient = (mask, maxBlurOpacity, rgb) => ({
|
|
138
|
+
type: "linear",
|
|
139
|
+
from: mask.from,
|
|
140
|
+
to: mask.to,
|
|
141
|
+
stops: mask.stops.map((s) => ({
|
|
142
|
+
color: `rgba(${rgb},${(s.opacity * maxBlurOpacity).toFixed(3)})`,
|
|
143
|
+
position: s.position,
|
|
144
|
+
})),
|
|
145
|
+
});
|
|
146
|
+
// ---------------------------------------------------------------------------
|
|
147
|
+
// RADIAL helpers (react-native-svg — a required dep, always available).
|
|
148
|
+
// A radial color/alpha gradient rect; `objectBoundingBox` units map cx/cy/r to
|
|
149
|
+
// 0..1 fractions of the box (so a non-square box yields the Figma ellipse).
|
|
150
|
+
// ---------------------------------------------------------------------------
|
|
151
|
+
const RadialSvg = ({ mask, id, color, opacityScale, }) => {
|
|
152
|
+
var _a, _b;
|
|
153
|
+
const c = (_a = mask.center) !== null && _a !== void 0 ? _a : { x: 0.5, y: 0.5 };
|
|
154
|
+
const r = (_b = mask.radius) !== null && _b !== void 0 ? _b : 0.75;
|
|
155
|
+
return ((0, jsx_runtime_1.jsxs)(react_native_svg_1.default, { style: react_native_1.StyleSheet.absoluteFillObject, width: "100%", height: "100%", children: [(0, jsx_runtime_1.jsx)(react_native_svg_1.Defs, { children: (0, jsx_runtime_1.jsx)(react_native_svg_1.RadialGradient, { id: id, cx: String(c.x), cy: String(c.y), r: String(r), gradientUnits: "objectBoundingBox", children: mask.stops.map((s, i) => ((0, jsx_runtime_1.jsx)(react_native_svg_1.Stop, { offset: String(s.position), stopColor: color, stopOpacity: String(Math.min(1, s.opacity * opacityScale)) }, i))) }) }), (0, jsx_runtime_1.jsx)(react_native_svg_1.Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${id})` })] }));
|
|
156
|
+
};
|
|
157
|
+
// The JS package may be present (hoisted in a monorepo / installed) while the
|
|
158
|
+
// NATIVE view manager is missing — e.g. a dev-client binary built before the
|
|
159
|
+
// dep was added. Then `require` succeeds but rendering `<MaskedView>` throws
|
|
160
|
+
// "View config not found for component RNCMaskedView". Probe the native registry
|
|
161
|
+
// when we can; `hasViewManagerConfig` is absent on some arch/versions, so a
|
|
162
|
+
// `false` only suppresses when we can actually tell (the boundary below is the
|
|
163
|
+
// reliable backstop in all other cases).
|
|
164
|
+
const nativeMaskedViewAvailable = () => {
|
|
165
|
+
const has = react_native_1.UIManager === null || react_native_1.UIManager === void 0 ? void 0 : react_native_1.UIManager.hasViewManagerConfig;
|
|
166
|
+
if (typeof has !== "function")
|
|
167
|
+
return true; // can't determine → let the boundary guard it
|
|
168
|
+
return !!has("RNCMaskedView");
|
|
169
|
+
};
|
|
170
|
+
// Backstop: if the masked-blur subtree throws at render/commit (native view
|
|
171
|
+
// missing on the running binary), swap to the plain fallback instead of
|
|
172
|
+
// crashing the whole onboarding screen.
|
|
173
|
+
class ProgressiveBlurBoundary extends react_1.default.Component {
|
|
174
|
+
constructor() {
|
|
175
|
+
super(...arguments);
|
|
176
|
+
this.state = { failed: false };
|
|
177
|
+
}
|
|
178
|
+
static getDerivedStateFromError() {
|
|
179
|
+
return { failed: true };
|
|
180
|
+
}
|
|
181
|
+
componentDidCatch() {
|
|
182
|
+
// swallow — degradation is intentional, not an error to surface
|
|
183
|
+
}
|
|
184
|
+
render() {
|
|
185
|
+
return this.state.failed ? this.props.fallback : this.props.children;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
const ProgressiveBlurImageElementComponent = ({ element }) => {
|
|
189
|
+
var _a, _b;
|
|
190
|
+
const p = element.props;
|
|
191
|
+
const maxBlurOpacity = (_a = p.maxBlurOpacity) !== null && _a !== void 0 ? _a : 1;
|
|
192
|
+
const radial = isRadialMask(p.mask);
|
|
193
|
+
const rgb = tintRgb(p.tint);
|
|
194
|
+
const containerStyle = {
|
|
195
|
+
flex: p.flex,
|
|
196
|
+
flexShrink: p.flexShrink,
|
|
197
|
+
flexGrow: p.flexGrow,
|
|
198
|
+
alignSelf: p.alignSelf,
|
|
199
|
+
aspectRatio: p.aspectRatio,
|
|
200
|
+
width: (0, shared_1.dim)(p.width),
|
|
201
|
+
height: (0, shared_1.dim)(p.height),
|
|
202
|
+
minWidth: p.minWidth,
|
|
203
|
+
maxWidth: p.maxWidth,
|
|
204
|
+
minHeight: p.minHeight,
|
|
205
|
+
maxHeight: p.maxHeight,
|
|
206
|
+
borderRadius: p.borderRadius,
|
|
207
|
+
borderWidth: p.borderWidth,
|
|
208
|
+
borderColor: p.borderColor,
|
|
209
|
+
opacity: p.opacity,
|
|
210
|
+
overflow: ((_b = p.overflow) !== null && _b !== void 0 ? _b : "hidden"),
|
|
211
|
+
margin: p.margin,
|
|
212
|
+
marginHorizontal: p.marginHorizontal,
|
|
213
|
+
marginVertical: p.marginVertical,
|
|
214
|
+
backgroundColor: p.backgroundColor,
|
|
215
|
+
};
|
|
216
|
+
const sharpImage = renderRaster(p.url, p.resizeMode, react_native_1.StyleSheet.absoluteFillObject);
|
|
217
|
+
// Dark scrim (degraded path + error-boundary fallback). Radial → SVG (always
|
|
218
|
+
// available), linear → GradientBox (plain View when expo-linear-gradient absent).
|
|
219
|
+
// `isRadialMask(p.mask)` narrows the union in each branch.
|
|
220
|
+
const scrim = isRadialMask(p.mask) ? ((0, jsx_runtime_1.jsx)(RadialSvg, { mask: p.mask, id: `pbi-fb-${element.id}`, color: "black", opacityScale: maxBlurOpacity })) : ((0, jsx_runtime_1.jsx)(GradientBox_1.GradientBox, { gradient: linearColorGradient(p.mask, maxBlurOpacity, "0,0,0"), style: react_native_1.StyleSheet.absoluteFillObject }));
|
|
221
|
+
const fallback = ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: containerStyle, children: [sharpImage, scrim] }));
|
|
222
|
+
// Full path needs masked-view (+ its native view) and, for a LINEAR mask, the
|
|
223
|
+
// expo-linear-gradient dep. A RADIAL mask renders via react-native-svg (always
|
|
224
|
+
// available). expo-blur is intentionally not used — a masked BlurView is
|
|
225
|
+
// transparent on iOS (see renderRaster note).
|
|
226
|
+
const gradientDepReady = radial || !!LinearGradient;
|
|
227
|
+
const canProgressiveBlur = MaskedView && nativeMaskedViewAvailable() && gradientDepReady;
|
|
228
|
+
if (!canProgressiveBlur)
|
|
229
|
+
return fallback;
|
|
230
|
+
const Masked = MaskedView;
|
|
231
|
+
const Gradient = LinearGradient; // non-null for linear masks (gradientDepReady)
|
|
232
|
+
const blurredCopy = renderRaster(p.url, p.resizeMode, react_native_1.StyleSheet.absoluteFillObject, intensityToBlurRadius(p.intensity));
|
|
233
|
+
// Mask element: opaque where the blur should show.
|
|
234
|
+
const maskElement = isRadialMask(p.mask) ? ((0, jsx_runtime_1.jsx)(RadialSvg, { mask: p.mask, id: `pbi-mask-${element.id}`, color: "black", opacityScale: maxBlurOpacity })) : ((0, jsx_runtime_1.jsx)(Gradient, { colors: linearMaskColors(p.mask, maxBlurOpacity), start: EDGE_POINT[p.mask.from], end: EDGE_POINT[p.mask.to], locations: p.mask.stops.map((s) => s.position), style: react_native_1.StyleSheet.absoluteFillObject }));
|
|
235
|
+
// Tint overlay following the mask shape (the Figma dark tint).
|
|
236
|
+
const tintOverlay = rgb == null ? null : isRadialMask(p.mask) ? ((0, jsx_runtime_1.jsx)(RadialSvg, { mask: p.mask, id: `pbi-tint-${element.id}`, color: `rgb(${rgb})`, opacityScale: maxBlurOpacity })) : ((0, jsx_runtime_1.jsx)(GradientBox_1.GradientBox, { gradient: linearColorGradient(p.mask, maxBlurOpacity, rgb), style: react_native_1.StyleSheet.absoluteFillObject }));
|
|
237
|
+
return ((0, jsx_runtime_1.jsx)(ProgressiveBlurBoundary, { fallback: fallback, children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: containerStyle, children: [sharpImage, (0, jsx_runtime_1.jsx)(Masked, { style: react_native_1.StyleSheet.absoluteFillObject, maskElement: maskElement, children: blurredCopy }), tintOverlay] }) }));
|
|
238
|
+
};
|
|
239
|
+
exports.ProgressiveBlurImageElementComponent = ProgressiveBlurImageElementComponent;
|
|
240
|
+
//# sourceMappingURL=ProgressiveBlurImageElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressiveBlurImageElement.js","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/ProgressiveBlurImageElement.tsx"],"names":[],"mappings":";;;;;;;;;;;;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AQ,EAAE,QAAQ,YACzC,wBAAC,mBAAI,IAAC,KAAK,EAAE,cAAc,aAExB,UAAU,EAEX,uBAAC,MAAM,IAAC,KAAK,EAAE,yBAAU,CAAC,kBAAkB,EAAE,WAAW,EAAE,WAAW,YACnE,WAAW,GACL,EACR,WAAW,IACP,GACiB,CAC3B,CAAC;AACJ,CAAC,CAAC;AAzGW,QAAA,oCAAoC,wCAyG/C"}
|
|
@@ -3,9 +3,11 @@ import { z } from "zod";
|
|
|
3
3
|
import { BaseBoxProps } from "./BaseBoxProps";
|
|
4
4
|
import { UIElement } from "../types";
|
|
5
5
|
import { RenderContext } from "./shared";
|
|
6
|
+
import { type HapticStyle } from "./haptics";
|
|
6
7
|
export type RadioGroupElementProps = BaseBoxProps & {
|
|
7
8
|
variableName?: string;
|
|
8
9
|
defaultValue?: string;
|
|
10
|
+
haptic?: HapticStyle;
|
|
9
11
|
gap?: number;
|
|
10
12
|
direction?: "vertical" | "horizontal";
|
|
11
13
|
showTick?: boolean;
|
|
@@ -261,6 +263,14 @@ export declare const RadioGroupElementPropsSchema: z.ZodObject<{
|
|
|
261
263
|
}, z.core.$strip>>;
|
|
262
264
|
variableName: z.ZodOptional<z.ZodString>;
|
|
263
265
|
defaultValue: z.ZodOptional<z.ZodString>;
|
|
266
|
+
haptic: z.ZodOptional<z.ZodEnum<{
|
|
267
|
+
light: "light";
|
|
268
|
+
medium: "medium";
|
|
269
|
+
heavy: "heavy";
|
|
270
|
+
none: "none";
|
|
271
|
+
soft: "soft";
|
|
272
|
+
rigid: "rigid";
|
|
273
|
+
}>>;
|
|
264
274
|
gap: z.ZodOptional<z.ZodNumber>;
|
|
265
275
|
direction: z.ZodOptional<z.ZodEnum<{
|
|
266
276
|
horizontal: "horizontal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/RadioGroupElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAO,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioGroupElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/RadioGroupElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAO,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAE5D,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgCvC,CAAC;AAEH,KAAK,mBAAmB,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC;AAEtE,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,mBAAmB,CAAC;IAC7B,GAAG,EAAE,aAAa,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,kBAAkB,KAAK,KAAG,KAAK,CAAC,YAuHnE,CAAC"}
|
|
@@ -8,9 +8,11 @@ const react_native_1 = require("react-native");
|
|
|
8
8
|
const BaseBoxProps_1 = require("./BaseBoxProps");
|
|
9
9
|
const shared_1 = require("./shared");
|
|
10
10
|
const GradientBox_1 = require("./GradientBox");
|
|
11
|
+
const haptics_1 = require("./haptics");
|
|
11
12
|
exports.RadioGroupElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema.extend({
|
|
12
13
|
variableName: zod_1.z.string().optional(),
|
|
13
14
|
defaultValue: zod_1.z.string().optional(),
|
|
15
|
+
haptic: zod_1.z.enum(["none", "light", "medium", "heavy", "soft", "rigid"]).optional(),
|
|
14
16
|
gap: zod_1.z.number().optional(),
|
|
15
17
|
direction: zod_1.z.enum(["vertical", "horizontal"]).optional(),
|
|
16
18
|
showTick: zod_1.z.boolean().optional(),
|
|
@@ -52,6 +54,7 @@ const RadioGroupComponent = ({ element, ctx }) => {
|
|
|
52
54
|
}, [element.props.variableName, element.props.defaultValue, element.props.items, selectedValue]);
|
|
53
55
|
const handleSelect = (value, label) => {
|
|
54
56
|
if (element.props.variableName) {
|
|
57
|
+
(0, haptics_1.triggerHaptic)(element.props.haptic);
|
|
55
58
|
setVariable(element.props.variableName, { value, label });
|
|
56
59
|
}
|
|
57
60
|
};
|