@rocapine/react-native-onboarding-ui 1.35.0 → 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.
@@ -7,6 +7,8 @@ export type ImageElementProps = BaseBoxProps & {
7
7
  url: string;
8
8
  aspectRatio?: number;
9
9
  resizeMode?: "cover" | "contain" | "stretch" | "center";
10
+ /** Uniform Gaussian blur radius (px). 0/undefined = sharp. Ignored for SVGs. */
11
+ blurRadius?: number;
10
12
  };
11
13
  export declare const ImageElementPropsSchema: z.ZodObject<{
12
14
  width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -245,6 +247,7 @@ export declare const ImageElementPropsSchema: z.ZodObject<{
245
247
  stretch: "stretch";
246
248
  cover: "cover";
247
249
  }>>;
250
+ blurRadius: z.ZodOptional<z.ZodNumber>;
248
251
  }, z.core.$strip>;
249
252
  type ImageUIElement = Extract<UIElement, {
250
253
  type: "Image";
@@ -1 +1 @@
1
- {"version":3,"file":"ImageElement.d.ts","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/ImageElement.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,EAAyB,MAAM,UAAU,CAAC;AAahE,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKlC,CAAC;AAyCH,KAAK,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE5D,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,cAAc,CAAC;IACxB,GAAG,EAAE,aAAa,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,aAAa,KAAK,KAAG,KAAK,CAAC,YAsGhE,CAAC"}
@@ -22,6 +22,7 @@ exports.ImageElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema.extend({
22
22
  url: zod_1.z.string().min(1, "url must not be empty"),
23
23
  aspectRatio: zod_1.z.number().optional(),
24
24
  resizeMode: zod_1.z.enum(["cover", "contain", "stretch", "center"]).optional(),
25
+ blurRadius: zod_1.z.number().min(0).optional(),
25
26
  });
26
27
  // RN resizeMode → expo-image contentFit.
27
28
  const CONTENT_FIT = {
@@ -42,8 +43,9 @@ const SVG_ASPECT = {
42
43
  // with `.svg` URLs just work, no schema change.
43
44
  const isSvgUrl = (url) => url.split(/[?#]/)[0].toLowerCase().endsWith(".svg");
44
45
  // Pick expo-image when installed (better webp/avif), else RN Image. resizeMode
45
- // passes through unchanged on RN; maps to contentFit on expo-image.
46
- const renderRaster = (url, resizeMode, style) => ExpoImage ? ((0, jsx_runtime_1.jsx)(ExpoImage, { source: url, contentFit: CONTENT_FIT[resizeMode !== null && resizeMode !== void 0 ? resizeMode : "cover"], style: style })) : ((0, jsx_runtime_1.jsx)(react_native_1.Image, { source: { uri: url }, resizeMode: resizeMode, style: style }));
46
+ // passes through unchanged on RN; maps to contentFit on expo-image. `blurRadius`
47
+ // is a native prop on both undefined leaves the image sharp.
48
+ 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 }));
47
49
  const ImageElementComponent = ({ element }) => {
48
50
  var _a, _b, _c;
49
51
  const p = element.props;
@@ -61,7 +63,7 @@ const ImageElementComponent = ({ element }) => {
61
63
  height: "100%",
62
64
  borderRadius: p.borderRadius,
63
65
  overflow: ((_b = p.overflow) !== null && _b !== void 0 ? _b : "hidden"),
64
- }));
66
+ }, p.blurRadius));
65
67
  if (p.backgroundGradient) {
66
68
  return ((0, jsx_runtime_1.jsx)(GradientBox_1.GradientBox, { gradient: p.backgroundGradient, style: wrapperStyle, children: innerImage }));
67
69
  }
@@ -97,7 +99,7 @@ const ImageElementComponent = ({ element }) => {
97
99
  if (isSvg) {
98
100
  return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: simpleStyle, children: (0, jsx_runtime_1.jsx)(react_native_svg_1.SvgUri, { uri: p.url, width: "100%", height: "100%", preserveAspectRatio: SVG_ASPECT[(_c = p.resizeMode) !== null && _c !== void 0 ? _c : "contain"] }) }));
99
101
  }
100
- return renderRaster(p.url, p.resizeMode, simpleStyle);
102
+ return renderRaster(p.url, p.resizeMode, simpleStyle, p.blurRadius);
101
103
  };
102
104
  exports.ImageElementComponent = ImageElementComponent;
103
105
  //# sourceMappingURL=ImageElement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ImageElement.js","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/ImageElement.tsx"],"names":[],"mappings":";;;;AACA,6BAAwB;AACxB,+CAAsD;AACtD,uDAA0C;AAC1C,iDAAkE;AAElE,qCAAgE;AAChE,+CAA4C;AAE5C,iFAAiF;AACjF,iF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;IACJ,CAAC;IAED,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AACxD,CAAC,CAAC;AAtGW,QAAA,qBAAqB,yBAsGhC"}
1
+ {"version":3,"file":"ImageElement.js","sourceRoot":"","sources":["../../../../../src/UI/Pages/ComposableScreen/elements/ImageElement.tsx"],"names":[],"mappings":";;;;AACA,6BAAwB;AACxB,+CAAsD;AACtD,uDAA0C;AAC1C,iDAAkE;AAElE,qCAAgE;AAChE,+CAA4C;AAE5C,iFAAiF;AACjF,iFAAiF;AACjF,yDAAyD;AACzD,IAAI,SAAS,GAAoC,IAAI,CAAC;AACtD,IAAI,CAAC;IACH,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC;AAC1C,CAAC;AAAC,WAAM,CAAC;IACP,qDAAqD;AACvD,CAAC;AAUY,QAAA,uBAAuB,GAAG,iCAAkB,CAAC,MAAM,CAAC;IAC/D,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;IAC/C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;IACxE,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAIH,yCAAyC;AACzC,MAAM,WAAW,GAA8D;IAC7E,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,MAAM;CACf,CAAC;AAEF,sEAAsE;AACtE,MAAM,UAAU,GAA+B;IAC7C,KAAK,EAAE,gBAAgB;IACvB,OAAO,EAAE,eAAe;I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OAAO;QAClB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,gBAAgB,EAAE,CAAC,CAAC,gBAAgB;QACpC,cAAc,EAAE,CAAC,CAAC,cAAc;QAChC,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,iBAAiB,EAAE,CAAC,CAAC,iBAAiB;QACtC,eAAe,EAAE,CAAC,CAAC,eAAe;KAC5B,CAAC;IAET,gFAAgF;IAChF,iCAAiC;IACjC,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CACL,uBAAC,mBAAI,IAAC,KAAK,EAAE,WAAW,YACtB,uBAAC,yBAAM,IACL,GAAG,EAAE,CAAC,CAAC,GAAG,EACV,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,mBAAmB,EAAE,UAAU,CAAC,MAAA,CAAC,CAAC,UAAU,mCAAI,SAAS,CAAC,GAC1D,GACG,CACR,CAAC;IACJ,CAAC;IAED,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC;AACtE,CAAC,CAAC;AAtGW,QAAA,qBAAqB,yBAsGhC"}
@@ -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