@rocapine/react-native-onboarding 1.14.0 → 1.15.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.
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding-example.d.ts","sourceRoot":"","sources":["../src/onboarding-example.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8cR,CAAC"}
@@ -97,331 +97,338 @@ exports.onboardingExample = {
97
97
  payload: {
98
98
  elements: [
99
99
  {
100
- id: "root",
101
- type: "YStack",
102
- props: { gap: 24, padding: 24 },
100
+ id: "safe-root",
101
+ type: "SafeAreaView",
102
+ props: { flex: 1, edges: ["top", "bottom"] },
103
103
  children: [
104
104
  {
105
- id: "hero-lottie",
106
- type: "Lottie",
107
- props: {
108
- source: "https://raw.githubusercontent.com/airbnb/lottie-web/master/demo/adrock/data.json",
109
- height: 180,
110
- autoPlay: true,
111
- loop: true,
112
- },
113
- },
114
- {
115
- id: "hero-rive",
116
- type: "Rive",
117
- props: {
118
- url: "https://cdn.rive.app/animations/vehicles.riv",
119
- height: 180,
120
- autoPlay: true,
121
- fit: "Contain",
122
- },
123
- },
124
- {
125
- id: "hero-image",
126
- type: "Image",
127
- props: {
128
- url: "https://picsum.photos/800/400?grayscale",
129
- height: 180,
130
- resizeMode: "cover",
131
- borderRadius: 16,
132
- },
133
- },
134
- {
135
- id: "hero-icon",
136
- type: "Icon",
137
- props: {
138
- name: "Star",
139
- size: 48,
140
- color: "#007AFF",
141
- marginVertical: 8,
142
- },
143
- },
144
- {
145
- id: "hero-video",
146
- type: "Video",
147
- props: {
148
- url: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
149
- height: 200,
150
- borderRadius: 12,
151
- controls: true,
152
- muted: true,
153
- contentFit: "cover",
154
- },
155
- },
156
- {
157
- id: "hero-input",
158
- type: "Input",
159
- props: {
160
- variableName: "name",
161
- placeholder: "Enter your name",
162
- keyboardType: "default",
163
- returnKeyType: "done",
164
- autoCapitalize: "words",
165
- marginVertical: 8,
166
- },
167
- },
168
- {
169
- id: "greeting",
170
- type: "Text",
171
- props: {
172
- content: "Hello {{name}}!",
173
- mode: "expression",
174
- fontSize: 18,
175
- fontWeight: "600",
176
- textAlign: "center",
177
- marginVertical: 4,
178
- },
179
- },
180
- {
181
- id: "headline",
182
- type: "Text",
183
- props: {
184
- content: "Built from the CMS",
185
- fontSize: 28,
186
- fontWeight: "700",
187
- fontFamily: "System",
188
- textAlign: "center",
189
- },
190
- },
191
- {
192
- id: "subheadline",
193
- type: "Text",
194
- props: {
195
- content: "This screen is composed entirely from a JSON payload — no custom renderer needed.",
196
- fontSize: 15,
197
- textAlign: "center",
198
- lineHeight: 22,
199
- opacity: 0.6,
200
- },
201
- },
202
- {
203
- id: "hero-radio",
204
- type: "RadioGroup",
205
- props: {
206
- variableName: "plan",
207
- defaultValue: "monthly",
208
- gap: 8,
209
- marginVertical: 8,
210
- items: [
211
- { label: "Monthly", value: "monthly" },
212
- { label: "Yearly", value: "yearly" },
213
- { label: "Lifetime", value: "lifetime" },
214
- ],
215
- },
216
- },
217
- {
218
- id: "plan-display",
219
- type: "Text",
220
- props: {
221
- content: "Selected: {{plan}}",
222
- mode: "expression",
223
- fontSize: 14,
224
- textAlign: "center",
225
- opacity: 0.6,
226
- marginVertical: 4,
227
- },
228
- },
229
- {
230
- id: "hero-checkbox",
231
- type: "CheckboxGroup",
232
- props: {
233
- variableName: "goals",
234
- defaultValues: ["health", "fitness"],
235
- gap: 8,
236
- marginVertical: 8,
237
- items: [
238
- { label: "Improve health", value: "health" },
239
- { label: "Build fitness", value: "fitness" },
240
- { label: "Lose weight", value: "weight" },
241
- { label: "Gain muscle", value: "muscle" },
242
- ],
243
- },
244
- },
245
- {
246
- id: "goals-display",
247
- type: "Text",
248
- props: {
249
- content: "Goals: {{goals}}",
250
- mode: "expression",
251
- fontSize: 14,
252
- textAlign: "center",
253
- opacity: 0.6,
254
- marginVertical: 4,
255
- },
256
- },
257
- {
258
- id: "hero-date-picker",
259
- type: "DatePicker",
260
- props: {
261
- variableName: "birthdate",
262
- defaultValue: "1990-01-01T00:00:00.000Z",
263
- mode: "date",
264
- display: "spinner",
265
- maximumDate: new Date().toISOString(), // static at module load time — suitable for demo; use a runtime value in production
266
- marginVertical: 8,
267
- },
268
- },
269
- {
270
- id: "birthdate-display",
271
- type: "Text",
272
- props: {
273
- content: "Birth date: {{birthdate}}",
274
- mode: "expression",
275
- fontSize: 14,
276
- textAlign: "center",
277
- opacity: 0.6,
278
- marginVertical: 4,
279
- },
280
- },
281
- {
282
- id: "hero-carousel",
283
- type: "Carousel",
284
- props: {
285
- carouselType: "parallax",
286
- autoPlay: true,
287
- autoPlayInterval: 3000,
288
- loop: true,
289
- showDots: true,
290
- height: 220,
291
- borderRadius: 16,
292
- marginVertical: 8,
293
- },
105
+ id: "root",
106
+ type: "YStack",
107
+ props: { gap: 24, padding: 24 },
294
108
  children: [
295
109
  {
296
- id: "carousel-slide-1",
297
- type: "Image",
110
+ id: "hero-lottie",
111
+ type: "Lottie",
298
112
  props: {
299
- url: "https://picsum.photos/400/220?random=10",
300
- height: 220,
301
- resizeMode: "cover",
113
+ source: "https://raw.githubusercontent.com/airbnb/lottie-web/master/demo/adrock/data.json",
114
+ height: 180,
115
+ autoPlay: true,
116
+ loop: true,
302
117
  },
303
118
  },
304
119
  {
305
- id: "carousel-slide-2",
306
- type: "Image",
120
+ id: "hero-rive",
121
+ type: "Rive",
307
122
  props: {
308
- url: "https://picsum.photos/400/220?random=11",
309
- height: 220,
310
- resizeMode: "cover",
123
+ url: "https://cdn.rive.app/animations/vehicles.riv",
124
+ height: 180,
125
+ autoPlay: true,
126
+ fit: "Contain",
311
127
  },
312
128
  },
313
129
  {
314
- id: "carousel-slide-3",
130
+ id: "hero-image",
315
131
  type: "Image",
316
132
  props: {
317
- url: "https://picsum.photos/400/220?random=12",
318
- height: 220,
133
+ url: "https://picsum.photos/800/400?grayscale",
134
+ height: 180,
319
135
  resizeMode: "cover",
136
+ borderRadius: 16,
320
137
  },
321
138
  },
322
- ],
323
- },
324
- {
325
- id: "zstack-demo",
326
- type: "ZStack",
327
- props: {
328
- height: 200,
329
- borderRadius: 16,
330
- overflow: "hidden",
331
- marginVertical: 8,
332
- },
333
- children: [
334
139
  {
335
- id: "zstack-bg",
336
- type: "Image",
140
+ id: "hero-icon",
141
+ type: "Icon",
337
142
  props: {
338
- url: "https://picsum.photos/800/400?random=20",
143
+ name: "Star",
144
+ size: 48,
145
+ color: "#007AFF",
146
+ marginVertical: 8,
147
+ },
148
+ },
149
+ {
150
+ id: "hero-video",
151
+ type: "Video",
152
+ props: {
153
+ url: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
339
154
  height: 200,
340
- resizeMode: "cover",
155
+ borderRadius: 12,
156
+ controls: true,
157
+ muted: true,
158
+ contentFit: "cover",
341
159
  },
342
160
  },
343
161
  {
344
- id: "zstack-overlay",
345
- type: "YStack",
162
+ id: "hero-input",
163
+ type: "Input",
346
164
  props: {
347
- flex: 1,
348
- backgroundColor: "rgba(0,0,0,0.45)",
349
- padding: 20,
350
- justifyContent: "flex-end",
165
+ variableName: "name",
166
+ placeholder: "Enter your name",
167
+ keyboardType: "default",
168
+ returnKeyType: "done",
169
+ autoCapitalize: "words",
170
+ marginVertical: 8,
171
+ },
172
+ },
173
+ {
174
+ id: "greeting",
175
+ type: "Text",
176
+ props: {
177
+ content: "Hello {{name}}!",
178
+ mode: "expression",
179
+ fontSize: 18,
180
+ fontWeight: "600",
181
+ textAlign: "center",
182
+ marginVertical: 4,
183
+ },
184
+ },
185
+ {
186
+ id: "headline",
187
+ type: "Text",
188
+ props: {
189
+ content: "Built from the CMS",
190
+ fontSize: 28,
191
+ fontWeight: "700",
192
+ fontFamily: "System",
193
+ textAlign: "center",
194
+ },
195
+ },
196
+ {
197
+ id: "subheadline",
198
+ type: "Text",
199
+ props: {
200
+ content: "This screen is composed entirely from a JSON payload — no custom renderer needed.",
201
+ fontSize: 15,
202
+ textAlign: "center",
203
+ lineHeight: 22,
204
+ opacity: 0.6,
205
+ },
206
+ },
207
+ {
208
+ id: "hero-radio",
209
+ type: "RadioGroup",
210
+ props: {
211
+ variableName: "plan",
212
+ defaultValue: "monthly",
213
+ gap: 8,
214
+ marginVertical: 8,
215
+ items: [
216
+ { label: "Monthly", value: "monthly" },
217
+ { label: "Yearly", value: "yearly" },
218
+ { label: "Lifetime", value: "lifetime" },
219
+ ],
220
+ },
221
+ },
222
+ {
223
+ id: "plan-display",
224
+ type: "Text",
225
+ props: {
226
+ content: "Selected: {{plan}}",
227
+ mode: "expression",
228
+ fontSize: 14,
229
+ textAlign: "center",
230
+ opacity: 0.6,
231
+ marginVertical: 4,
232
+ },
233
+ },
234
+ {
235
+ id: "hero-checkbox",
236
+ type: "CheckboxGroup",
237
+ props: {
238
+ variableName: "goals",
239
+ defaultValues: ["health", "fitness"],
240
+ gap: 8,
241
+ marginVertical: 8,
242
+ items: [
243
+ { label: "Improve health", value: "health" },
244
+ { label: "Build fitness", value: "fitness" },
245
+ { label: "Lose weight", value: "weight" },
246
+ { label: "Gain muscle", value: "muscle" },
247
+ ],
248
+ },
249
+ },
250
+ {
251
+ id: "goals-display",
252
+ type: "Text",
253
+ props: {
254
+ content: "Goals: {{goals}}",
255
+ mode: "expression",
256
+ fontSize: 14,
257
+ textAlign: "center",
258
+ opacity: 0.6,
259
+ marginVertical: 4,
260
+ },
261
+ },
262
+ {
263
+ id: "hero-date-picker",
264
+ type: "DatePicker",
265
+ props: {
266
+ variableName: "birthdate",
267
+ defaultValue: "1990-01-01T00:00:00.000Z",
268
+ mode: "date",
269
+ display: "spinner",
270
+ maximumDate: new Date().toISOString(), // static at module load time — suitable for demo; use a runtime value in production
271
+ marginVertical: 8,
272
+ },
273
+ },
274
+ {
275
+ id: "birthdate-display",
276
+ type: "Text",
277
+ props: {
278
+ content: "Birth date: {{birthdate}}",
279
+ mode: "expression",
280
+ fontSize: 14,
281
+ textAlign: "center",
282
+ opacity: 0.6,
283
+ marginVertical: 4,
284
+ },
285
+ },
286
+ {
287
+ id: "hero-carousel",
288
+ type: "Carousel",
289
+ props: {
290
+ carouselType: "parallax",
291
+ autoPlay: true,
292
+ autoPlayInterval: 3000,
293
+ loop: true,
294
+ showDots: true,
295
+ height: 220,
296
+ borderRadius: 16,
297
+ marginVertical: 8,
351
298
  },
352
299
  children: [
353
300
  {
354
- id: "zstack-label",
355
- type: "Text",
301
+ id: "carousel-slide-1",
302
+ type: "Image",
303
+ props: {
304
+ url: "https://picsum.photos/400/220?random=10",
305
+ height: 220,
306
+ resizeMode: "cover",
307
+ },
308
+ },
309
+ {
310
+ id: "carousel-slide-2",
311
+ type: "Image",
356
312
  props: {
357
- content: "ZStack: layered elements",
358
- fontSize: 18,
359
- fontWeight: "700",
360
- color: "#fff",
313
+ url: "https://picsum.photos/400/220?random=11",
314
+ height: 220,
315
+ resizeMode: "cover",
316
+ },
317
+ },
318
+ {
319
+ id: "carousel-slide-3",
320
+ type: "Image",
321
+ props: {
322
+ url: "https://picsum.photos/400/220?random=12",
323
+ height: 220,
324
+ resizeMode: "cover",
361
325
  },
362
326
  },
363
327
  ],
364
328
  },
365
- ],
366
- },
367
- {
368
- id: "hero-button",
369
- type: "Button",
370
- props: {
371
- label: "Get Started",
372
- variant: "filled",
373
- marginVertical: 8,
374
- },
375
- },
376
- {
377
- id: "gradient-card",
378
- type: "YStack",
379
- props: {
380
- padding: 20,
381
- gap: 8,
382
- borderRadius: 16,
383
- overflow: "hidden",
384
- marginVertical: 4,
385
- backgroundGradient: {
386
- type: "linear",
387
- from: "topLeft",
388
- to: "bottomRight",
389
- stops: [
390
- { color: "#6C63FF" },
391
- { color: "#FF6584" },
329
+ {
330
+ id: "zstack-demo",
331
+ type: "ZStack",
332
+ props: {
333
+ height: 200,
334
+ borderRadius: 16,
335
+ overflow: "hidden",
336
+ marginVertical: 8,
337
+ },
338
+ children: [
339
+ {
340
+ id: "zstack-bg",
341
+ type: "Image",
342
+ props: {
343
+ url: "https://picsum.photos/800/400?random=20",
344
+ height: 200,
345
+ resizeMode: "cover",
346
+ },
347
+ },
348
+ {
349
+ id: "zstack-overlay",
350
+ type: "YStack",
351
+ props: {
352
+ flex: 1,
353
+ backgroundColor: "rgba(0,0,0,0.45)",
354
+ padding: 20,
355
+ justifyContent: "flex-end",
356
+ },
357
+ children: [
358
+ {
359
+ id: "zstack-label",
360
+ type: "Text",
361
+ props: {
362
+ content: "ZStack: layered elements",
363
+ fontSize: 18,
364
+ fontWeight: "700",
365
+ color: "#fff",
366
+ },
367
+ },
368
+ ],
369
+ },
392
370
  ],
393
371
  },
394
- },
395
- children: [
396
372
  {
397
- id: "gradient-card-title",
398
- type: "Text",
399
- props: { content: "Linear gradient", fontSize: 15, fontWeight: "700", color: "#fff" },
373
+ id: "hero-button",
374
+ type: "Button",
375
+ props: {
376
+ label: "Get Started",
377
+ variant: "filled",
378
+ marginVertical: 8,
379
+ },
400
380
  },
401
381
  {
402
- id: "gradient-card-body",
403
- type: "Text",
404
- props: { content: "topLeft → bottomRight", fontSize: 12, color: "#fff", opacity: 0.85 },
405
- },
406
- ],
407
- },
408
- {
409
- id: "gradient-button",
410
- type: "Button",
411
- props: {
412
- label: "Gradient Button",
413
- variant: "filled",
414
- marginVertical: 4,
415
- backgroundGradient: {
416
- type: "linear",
417
- from: "left",
418
- to: "right",
419
- stops: [
420
- { color: "#FF6584", position: 0 },
421
- { color: "#6C63FF", position: 1 },
382
+ id: "gradient-card",
383
+ type: "YStack",
384
+ props: {
385
+ padding: 20,
386
+ gap: 8,
387
+ borderRadius: 16,
388
+ overflow: "hidden",
389
+ marginVertical: 4,
390
+ backgroundGradient: {
391
+ type: "linear",
392
+ from: "topLeft",
393
+ to: "bottomRight",
394
+ stops: [
395
+ { color: "#6C63FF" },
396
+ { color: "#FF6584" },
397
+ ],
398
+ },
399
+ },
400
+ children: [
401
+ {
402
+ id: "gradient-card-title",
403
+ type: "Text",
404
+ props: { content: "Linear gradient", fontSize: 15, fontWeight: "700", color: "#fff" },
405
+ },
406
+ {
407
+ id: "gradient-card-body",
408
+ type: "Text",
409
+ props: { content: "topLeft → bottomRight", fontSize: 12, color: "#fff", opacity: 0.85 },
410
+ },
422
411
  ],
423
412
  },
424
- },
413
+ {
414
+ id: "gradient-button",
415
+ type: "Button",
416
+ props: {
417
+ label: "Gradient Button",
418
+ variant: "filled",
419
+ marginVertical: 4,
420
+ backgroundGradient: {
421
+ type: "linear",
422
+ from: "left",
423
+ to: "right",
424
+ stops: [
425
+ { color: "#FF6584", position: 0 },
426
+ { color: "#6C63FF", position: 1 },
427
+ ],
428
+ },
429
+ },
430
+ },
431
+ ],
425
432
  },
426
433
  ],
427
434
  },