@rocapine/react-native-onboarding 1.36.2 → 1.38.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/onboarding-example.d.ts +508 -152
- package/dist/onboarding-example.d.ts.map +1 -1
- package/dist/onboarding-example.js +40 -0
- package/dist/onboarding-example.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.d.ts +32 -0
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.js +2 -0
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts +105 -62
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.js +7 -19
- package/dist/steps/ComposableScreen/elements/ButtonElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/CarouselElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/CarouselElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/DatePickerElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/DatePickerElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/IconElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/IconElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ImageElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/ImageElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/InputElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/InputElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/KeyboardAvoidingViewElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/KeyboardAvoidingViewElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/LottieElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/LottieElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ProgressIndicatorElement.d.ts +52 -7
- package/dist/steps/ComposableScreen/elements/ProgressIndicatorElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ProgressIndicatorElement.js +6 -2
- package/dist/steps/ComposableScreen/elements/ProgressIndicatorElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/ProgressiveBlurImageElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/ProgressiveBlurImageElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/RichTextElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/RichTextElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/RiveElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/RiveElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/SafeAreaViewElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/SafeAreaViewElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ScrollViewElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/ScrollViewElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/StackElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/StackElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/TextElement.d.ts +25 -1
- package/dist/steps/ComposableScreen/elements/TextElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/VideoElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/VideoElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/WheelPickerElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/WheelPickerElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ZStackElement.d.ts +24 -0
- package/dist/steps/ComposableScreen/elements/ZStackElement.d.ts.map +1 -1
- package/dist/steps/common.types.d.ts +84 -0
- package/dist/steps/common.types.d.ts.map +1 -1
- package/dist/steps/common.types.js +20 -1
- package/dist/steps/common.types.js.map +1 -1
- package/package.json +1 -1
- package/src/onboarding-example.ts +40 -0
- package/src/steps/ComposableScreen/elements/BaseBoxProps.ts +9 -0
- package/src/steps/ComposableScreen/elements/ButtonElement.ts +10 -42
- package/src/steps/ComposableScreen/elements/ProgressIndicatorElement.ts +30 -9
- package/src/steps/common.types.ts +66 -0
|
@@ -249,6 +249,30 @@ export declare const ScrollViewElementPropsSchema: z.ZodObject<{
|
|
|
249
249
|
degrees: z.ZodOptional<z.ZodNumber>;
|
|
250
250
|
}, z.core.$strip>>;
|
|
251
251
|
}, z.core.$strip>>;
|
|
252
|
+
onPress: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"continue">, z.ZodObject<{
|
|
253
|
+
type: z.ZodLiteral<"custom">;
|
|
254
|
+
function: z.ZodString;
|
|
255
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
256
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
257
|
+
type: z.ZodLiteral<"setVariable">;
|
|
258
|
+
name: z.ZodString;
|
|
259
|
+
value: z.ZodString;
|
|
260
|
+
label: z.ZodOptional<z.ZodString>;
|
|
261
|
+
valueMode: z.ZodOptional<z.ZodEnum<{
|
|
262
|
+
literal: "literal";
|
|
263
|
+
expression: "expression";
|
|
264
|
+
}>>;
|
|
265
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
266
|
+
string: "string";
|
|
267
|
+
int: "int";
|
|
268
|
+
float: "float";
|
|
269
|
+
}>>;
|
|
270
|
+
arrayOp: z.ZodOptional<z.ZodEnum<{
|
|
271
|
+
append: "append";
|
|
272
|
+
remove: "remove";
|
|
273
|
+
toggle: "toggle";
|
|
274
|
+
}>>;
|
|
275
|
+
}, z.core.$strip>]>>>;
|
|
252
276
|
horizontal: z.ZodOptional<z.ZodBoolean>;
|
|
253
277
|
bounces: z.ZodOptional<z.ZodBoolean>;
|
|
254
278
|
showsVerticalScrollIndicator: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollViewElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/ScrollViewElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEvE,MAAM,MAAM,sBAAsB,GAAG;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG;IAClD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,yBAAyB,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IAC3D,UAAU,CAAC,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;IAC3E,cAAc,CAAC,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,eAAe,GAAG,cAAc,CAAC;CAC1F,CAAC;AASF,eAAO,MAAM,4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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYvC,CAAC"}
|
|
@@ -236,6 +236,30 @@ export declare const StackElementPropsSchema: z.ZodObject<{
|
|
|
236
236
|
degrees: z.ZodOptional<z.ZodNumber>;
|
|
237
237
|
}, z.core.$strip>>;
|
|
238
238
|
}, z.core.$strip>>;
|
|
239
|
+
onPress: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"continue">, z.ZodObject<{
|
|
240
|
+
type: z.ZodLiteral<"custom">;
|
|
241
|
+
function: z.ZodString;
|
|
242
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
243
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
244
|
+
type: z.ZodLiteral<"setVariable">;
|
|
245
|
+
name: z.ZodString;
|
|
246
|
+
value: z.ZodString;
|
|
247
|
+
label: z.ZodOptional<z.ZodString>;
|
|
248
|
+
valueMode: z.ZodOptional<z.ZodEnum<{
|
|
249
|
+
literal: "literal";
|
|
250
|
+
expression: "expression";
|
|
251
|
+
}>>;
|
|
252
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
253
|
+
string: "string";
|
|
254
|
+
int: "int";
|
|
255
|
+
float: "float";
|
|
256
|
+
}>>;
|
|
257
|
+
arrayOp: z.ZodOptional<z.ZodEnum<{
|
|
258
|
+
append: "append";
|
|
259
|
+
remove: "remove";
|
|
260
|
+
toggle: "toggle";
|
|
261
|
+
}>>;
|
|
262
|
+
}, z.core.$strip>]>>>;
|
|
239
263
|
gap: z.ZodOptional<z.ZodNumber>;
|
|
240
264
|
alignItems: z.ZodOptional<z.ZodEnum<{
|
|
241
265
|
"flex-start": "flex-start";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/StackElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,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/steps/ComposableScreen/elements/StackElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,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"}
|
|
@@ -313,6 +313,30 @@ export declare const TextElementPropsSchema: z.ZodObject<{
|
|
|
313
313
|
degrees: z.ZodOptional<z.ZodNumber>;
|
|
314
314
|
}, z.core.$strip>>;
|
|
315
315
|
}, z.core.$strip>>;
|
|
316
|
+
onPress: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"continue">, z.ZodObject<{
|
|
317
|
+
type: z.ZodLiteral<"custom">;
|
|
318
|
+
function: z.ZodString;
|
|
319
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
320
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
321
|
+
type: z.ZodLiteral<"setVariable">;
|
|
322
|
+
name: z.ZodString;
|
|
323
|
+
value: z.ZodString;
|
|
324
|
+
label: z.ZodOptional<z.ZodString>;
|
|
325
|
+
valueMode: z.ZodOptional<z.ZodEnum<{
|
|
326
|
+
literal: "literal";
|
|
327
|
+
expression: "expression";
|
|
328
|
+
}>>;
|
|
329
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
330
|
+
string: "string";
|
|
331
|
+
int: "int";
|
|
332
|
+
float: "float";
|
|
333
|
+
}>>;
|
|
334
|
+
arrayOp: z.ZodOptional<z.ZodEnum<{
|
|
335
|
+
append: "append";
|
|
336
|
+
remove: "remove";
|
|
337
|
+
toggle: "toggle";
|
|
338
|
+
}>>;
|
|
339
|
+
}, z.core.$strip>]>>>;
|
|
316
340
|
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
|
|
317
341
|
text: z.ZodString;
|
|
318
342
|
fontWeight: z.ZodOptional<z.ZodString>;
|
|
@@ -348,8 +372,8 @@ export declare const TextElementPropsSchema: z.ZodObject<{
|
|
|
348
372
|
}>>;
|
|
349
373
|
}, z.core.$strip>>]>;
|
|
350
374
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
351
|
-
plain: "plain";
|
|
352
375
|
expression: "expression";
|
|
376
|
+
plain: "plain";
|
|
353
377
|
}>>;
|
|
354
378
|
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
355
379
|
fontWeight: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/TextElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,CAAC;IAClE,kBAAkB,CAAC,EACf,MAAM,GACN,WAAW,GACX,cAAc,GACd,wBAAwB,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;CAChE,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBzB,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWjC,CAAC"}
|
|
@@ -238,6 +238,30 @@ export declare const VideoElementPropsSchema: z.ZodObject<{
|
|
|
238
238
|
degrees: z.ZodOptional<z.ZodNumber>;
|
|
239
239
|
}, z.core.$strip>>;
|
|
240
240
|
}, z.core.$strip>>;
|
|
241
|
+
onPress: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"continue">, z.ZodObject<{
|
|
242
|
+
type: z.ZodLiteral<"custom">;
|
|
243
|
+
function: z.ZodString;
|
|
244
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
245
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
246
|
+
type: z.ZodLiteral<"setVariable">;
|
|
247
|
+
name: z.ZodString;
|
|
248
|
+
value: z.ZodString;
|
|
249
|
+
label: z.ZodOptional<z.ZodString>;
|
|
250
|
+
valueMode: z.ZodOptional<z.ZodEnum<{
|
|
251
|
+
literal: "literal";
|
|
252
|
+
expression: "expression";
|
|
253
|
+
}>>;
|
|
254
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
255
|
+
string: "string";
|
|
256
|
+
int: "int";
|
|
257
|
+
float: "float";
|
|
258
|
+
}>>;
|
|
259
|
+
arrayOp: z.ZodOptional<z.ZodEnum<{
|
|
260
|
+
append: "append";
|
|
261
|
+
remove: "remove";
|
|
262
|
+
toggle: "toggle";
|
|
263
|
+
}>>;
|
|
264
|
+
}, z.core.$strip>]>>>;
|
|
241
265
|
url: z.ZodString;
|
|
242
266
|
autoPlay: z.ZodOptional<z.ZodBoolean>;
|
|
243
267
|
loop: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/VideoElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YA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 export declare const WheelPickerElementPropsSchema: z.ZodObject<{
|
|
|
265
265
|
degrees: z.ZodOptional<z.ZodNumber>;
|
|
266
266
|
}, z.core.$strip>>;
|
|
267
267
|
}, z.core.$strip>>;
|
|
268
|
+
onPress: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"continue">, z.ZodObject<{
|
|
269
|
+
type: z.ZodLiteral<"custom">;
|
|
270
|
+
function: z.ZodString;
|
|
271
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
272
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
273
|
+
type: z.ZodLiteral<"setVariable">;
|
|
274
|
+
name: z.ZodString;
|
|
275
|
+
value: z.ZodString;
|
|
276
|
+
label: z.ZodOptional<z.ZodString>;
|
|
277
|
+
valueMode: z.ZodOptional<z.ZodEnum<{
|
|
278
|
+
literal: "literal";
|
|
279
|
+
expression: "expression";
|
|
280
|
+
}>>;
|
|
281
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
282
|
+
string: "string";
|
|
283
|
+
int: "int";
|
|
284
|
+
float: "float";
|
|
285
|
+
}>>;
|
|
286
|
+
arrayOp: z.ZodOptional<z.ZodEnum<{
|
|
287
|
+
append: "append";
|
|
288
|
+
remove: "remove";
|
|
289
|
+
toggle: "toggle";
|
|
290
|
+
}>>;
|
|
291
|
+
}, z.core.$strip>]>>>;
|
|
268
292
|
variableName: z.ZodOptional<z.ZodString>;
|
|
269
293
|
defaultValue: z.ZodOptional<z.ZodString>;
|
|
270
294
|
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WheelPickerElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/WheelPickerElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,MAAM,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,YAAY,GAAG;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,kFAAkF;IAClF,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAMF;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,gBAAgB,GAAG,eAAe,EAAE,CAcxF;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,uBAAuB,GAAG,eAAe,EAAE,CAIzF;AAcD,eAAO,MAAM,6BAA6B
|
|
1
|
+
{"version":3,"file":"WheelPickerElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/WheelPickerElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,MAAM,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,YAAY,GAAG;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,kFAAkF;IAClF,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAMF;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,gBAAgB,GAAG,eAAe,EAAE,CAcxF;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,uBAAuB,GAAG,eAAe,EAAE,CAIzF;AAcD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwCxC,CAAC"}
|
|
@@ -231,5 +231,29 @@ export declare const ZStackElementPropsSchema: z.ZodObject<{
|
|
|
231
231
|
degrees: z.ZodOptional<z.ZodNumber>;
|
|
232
232
|
}, z.core.$strip>>;
|
|
233
233
|
}, z.core.$strip>>;
|
|
234
|
+
onPress: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"continue">, z.ZodObject<{
|
|
235
|
+
type: z.ZodLiteral<"custom">;
|
|
236
|
+
function: z.ZodString;
|
|
237
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
238
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
239
|
+
type: z.ZodLiteral<"setVariable">;
|
|
240
|
+
name: z.ZodString;
|
|
241
|
+
value: z.ZodString;
|
|
242
|
+
label: z.ZodOptional<z.ZodString>;
|
|
243
|
+
valueMode: z.ZodOptional<z.ZodEnum<{
|
|
244
|
+
literal: "literal";
|
|
245
|
+
expression: "expression";
|
|
246
|
+
}>>;
|
|
247
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
248
|
+
string: "string";
|
|
249
|
+
int: "int";
|
|
250
|
+
float: "float";
|
|
251
|
+
}>>;
|
|
252
|
+
arrayOp: z.ZodOptional<z.ZodEnum<{
|
|
253
|
+
append: "append";
|
|
254
|
+
remove: "remove";
|
|
255
|
+
toggle: "toggle";
|
|
256
|
+
}>>;
|
|
257
|
+
}, z.core.$strip>]>>>;
|
|
234
258
|
}, z.core.$strip>;
|
|
235
259
|
//# sourceMappingURL=ZStackElement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZStackElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/ZStackElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE9C,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"ZStackElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/ZStackElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE9C,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAqB,CAAC"}
|
|
@@ -29,6 +29,90 @@ export declare const HapticStyleSchema: z.ZodEnum<{
|
|
|
29
29
|
rigid: "rigid";
|
|
30
30
|
}>;
|
|
31
31
|
export type HapticStyle = z.infer<typeof HapticStyleSchema>;
|
|
32
|
+
export type CustomButtonAction = {
|
|
33
|
+
type: "custom";
|
|
34
|
+
function: string;
|
|
35
|
+
variables?: string[];
|
|
36
|
+
};
|
|
37
|
+
export declare const CustomButtonActionSchema: z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<"custom">;
|
|
39
|
+
function: z.ZodString;
|
|
40
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export type SetVariableButtonAction = {
|
|
43
|
+
type: "setVariable";
|
|
44
|
+
name: string;
|
|
45
|
+
value: string;
|
|
46
|
+
label?: string;
|
|
47
|
+
/**
|
|
48
|
+
* When `"expression"`, `value` is parsed as an arithmetic expression with
|
|
49
|
+
* `{{var}}` references, numeric literals, and `+ - * /` (parens supported).
|
|
50
|
+
* On parse failure, falls back to plain interpolation (string).
|
|
51
|
+
* Defaults to `"literal"` — `value` stored verbatim.
|
|
52
|
+
*/
|
|
53
|
+
valueMode?: "literal" | "expression";
|
|
54
|
+
/** Tags the stored variable's underlying type. */
|
|
55
|
+
kind?: "int" | "float" | "string";
|
|
56
|
+
/**
|
|
57
|
+
* Treat the target variable as a multi-select collection (the JSON-encoded
|
|
58
|
+
* `string[]` used by `CheckboxGroup`) and apply `value` as a set operation
|
|
59
|
+
* instead of overwriting:
|
|
60
|
+
* - `"append"` — add `value` if absent (dedup; no-op if already present)
|
|
61
|
+
* - `"remove"` — drop `value` if present
|
|
62
|
+
* - `"toggle"` — add when absent, remove when present (matches CheckboxGroup tap)
|
|
63
|
+
*
|
|
64
|
+
* The variable's `value` is stored as `JSON.stringify(string[])` and its
|
|
65
|
+
* `label` as the comma-joined member labels (`label ?? value` for each entry),
|
|
66
|
+
* mirroring `CheckboxGroup`. `kind` is ignored in this mode (the stored value
|
|
67
|
+
* is always a JSON string). Omit `arrayOp` for the default overwrite behavior.
|
|
68
|
+
*/
|
|
69
|
+
arrayOp?: "append" | "remove" | "toggle";
|
|
70
|
+
};
|
|
71
|
+
export declare const SetVariableButtonActionSchema: z.ZodObject<{
|
|
72
|
+
type: z.ZodLiteral<"setVariable">;
|
|
73
|
+
name: z.ZodString;
|
|
74
|
+
value: z.ZodString;
|
|
75
|
+
label: z.ZodOptional<z.ZodString>;
|
|
76
|
+
valueMode: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
literal: "literal";
|
|
78
|
+
expression: "expression";
|
|
79
|
+
}>>;
|
|
80
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
string: "string";
|
|
82
|
+
int: "int";
|
|
83
|
+
float: "float";
|
|
84
|
+
}>>;
|
|
85
|
+
arrayOp: z.ZodOptional<z.ZodEnum<{
|
|
86
|
+
append: "append";
|
|
87
|
+
remove: "remove";
|
|
88
|
+
toggle: "toggle";
|
|
89
|
+
}>>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
export type ButtonAction = "continue" | CustomButtonAction | SetVariableButtonAction;
|
|
92
|
+
export declare const ButtonActionSchema: z.ZodUnion<readonly [z.ZodLiteral<"continue">, z.ZodObject<{
|
|
93
|
+
type: z.ZodLiteral<"custom">;
|
|
94
|
+
function: z.ZodString;
|
|
95
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
97
|
+
type: z.ZodLiteral<"setVariable">;
|
|
98
|
+
name: z.ZodString;
|
|
99
|
+
value: z.ZodString;
|
|
100
|
+
label: z.ZodOptional<z.ZodString>;
|
|
101
|
+
valueMode: z.ZodOptional<z.ZodEnum<{
|
|
102
|
+
literal: "literal";
|
|
103
|
+
expression: "expression";
|
|
104
|
+
}>>;
|
|
105
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
106
|
+
string: "string";
|
|
107
|
+
int: "int";
|
|
108
|
+
float: "float";
|
|
109
|
+
}>>;
|
|
110
|
+
arrayOp: z.ZodOptional<z.ZodEnum<{
|
|
111
|
+
append: "append";
|
|
112
|
+
remove: "remove";
|
|
113
|
+
toggle: "toggle";
|
|
114
|
+
}>>;
|
|
115
|
+
}, z.core.$strip>]>;
|
|
32
116
|
export declare const ConditionOperatorSchema: z.ZodEnum<{
|
|
33
117
|
eq: "eq";
|
|
34
118
|
neq: "neq";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../src/steps/common.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB,kEAA0C,CAAC;AAE3E,eAAO,MAAM,iBAAiB;;;;;;mBAS5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AAEH,eAAO,MAAM,aAAa;;;iBAGxB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAC;AAMH,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;
|
|
1
|
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-
exports.BaseStepTypeSchema = exports.NextStepSchema = exports.BranchSchema = exports.ConditionGroupSchema = exports.LeafConditionSchema = exports.ConditionValueSchema = exports.isUnaryConditionOperator = exports.UNARY_CONDITION_OPERATORS = exports.ConditionOperatorSchema = exports.HapticStyleSchema = exports.ButtonSectionSchema = exports.InfoBoxSchema = exports.SocialProofSchema = exports.MediaSourceSchema = exports.CustomPayloadSchema = void 0;
|
|
3
|
+
exports.BaseStepTypeSchema = exports.NextStepSchema = exports.BranchSchema = exports.ConditionGroupSchema = exports.LeafConditionSchema = exports.ConditionValueSchema = exports.isUnaryConditionOperator = exports.UNARY_CONDITION_OPERATORS = exports.ConditionOperatorSchema = exports.ButtonActionSchema = exports.SetVariableButtonActionSchema = exports.CustomButtonActionSchema = exports.HapticStyleSchema = exports.ButtonSectionSchema = exports.InfoBoxSchema = exports.SocialProofSchema = exports.MediaSourceSchema = exports.CustomPayloadSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.CustomPayloadSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullish();
|
|
6
6
|
exports.MediaSourceSchema = zod_1.z.union([
|
|
@@ -38,6 +38,25 @@ exports.HapticStyleSchema = zod_1.z.enum([
|
|
|
38
38
|
"soft",
|
|
39
39
|
"rigid",
|
|
40
40
|
]);
|
|
41
|
+
exports.CustomButtonActionSchema = zod_1.z.object({
|
|
42
|
+
type: zod_1.z.literal("custom"),
|
|
43
|
+
function: zod_1.z.string().min(1, "function must not be empty"),
|
|
44
|
+
variables: zod_1.z.array(zod_1.z.string()).optional(),
|
|
45
|
+
});
|
|
46
|
+
exports.SetVariableButtonActionSchema = zod_1.z.object({
|
|
47
|
+
type: zod_1.z.literal("setVariable"),
|
|
48
|
+
name: zod_1.z.string().min(1, "name must not be empty"),
|
|
49
|
+
value: zod_1.z.string(),
|
|
50
|
+
label: zod_1.z.string().optional(),
|
|
51
|
+
valueMode: zod_1.z.enum(["literal", "expression"]).optional(),
|
|
52
|
+
kind: zod_1.z.enum(["int", "float", "string"]).optional(),
|
|
53
|
+
arrayOp: zod_1.z.enum(["append", "remove", "toggle"]).optional(),
|
|
54
|
+
});
|
|
55
|
+
exports.ButtonActionSchema = zod_1.z.union([
|
|
56
|
+
zod_1.z.literal("continue"),
|
|
57
|
+
exports.CustomButtonActionSchema,
|
|
58
|
+
exports.SetVariableButtonActionSchema,
|
|
59
|
+
]);
|
|
41
60
|
// ── Branching / nextStep schemas ─────────────────────────────────────────────
|
|
42
61
|
exports.ConditionOperatorSchema = zod_1.z.enum([
|
|
43
62
|
"eq",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.types.js","sourceRoot":"","sources":["../../src/steps/common.types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;AAE9D,QAAA,iBAAiB,GAAG,OAAC,CAAC,KAAK,CAAC;IACvC,OAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7F,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;KACxB,CAAC;IACF,OAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CA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,2BAAmB;IAClC,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;IAC9D,aAAa,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IAC7C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC9B,QAAQ,EAAE,sBAAc;CACzB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rocapine/react-native-onboarding",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.38.0",
|
|
4
4
|
"description": "Headless React Native SDK for Rocapine Onboarding Studio - Data fetching, state management, and hooks",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -153,6 +153,14 @@ export const onboardingExample = {
|
|
|
153
153
|
animation: {
|
|
154
154
|
entering: { preset: "FadeInDown", duration: 500, delay: 100, easing: "ease-out" },
|
|
155
155
|
},
|
|
156
|
+
// Generic onPress: any non-pressable element can dispatch the same
|
|
157
|
+
// action list as Button. Tapping the hero records a flag, and
|
|
158
|
+
// toggles "hero" into the `favorites` multi-select (arrayOp) —
|
|
159
|
+
// same JSON-array encoding as CheckboxGroup, no widget needed.
|
|
160
|
+
onPress: [
|
|
161
|
+
{ type: "setVariable", name: "hero_tapped", value: "true", kind: "string" },
|
|
162
|
+
{ type: "setVariable", name: "favorites", value: "hero", label: "Hero", arrayOp: "toggle" },
|
|
163
|
+
],
|
|
156
164
|
},
|
|
157
165
|
},
|
|
158
166
|
{
|
|
@@ -265,6 +273,38 @@ export const onboardingExample = {
|
|
|
265
273
|
alignSelf: "center",
|
|
266
274
|
},
|
|
267
275
|
},
|
|
276
|
+
{
|
|
277
|
+
// Count-up: animates a real value 0 -> 5000 (not a percentage)
|
|
278
|
+
// via minValue/maxValue, snapping by `step` (100 hops, not 5000).
|
|
279
|
+
// Writes the live value to `membersJoined`; the Text below reads it.
|
|
280
|
+
id: "progress-countup",
|
|
281
|
+
type: "ProgressIndicator",
|
|
282
|
+
props: {
|
|
283
|
+
variant: "linear",
|
|
284
|
+
autoplay: true,
|
|
285
|
+
loop: false,
|
|
286
|
+
minValue: 0,
|
|
287
|
+
maxValue: 5000,
|
|
288
|
+
step: 50,
|
|
289
|
+
variableName: "membersJoined",
|
|
290
|
+
duration: 2000,
|
|
291
|
+
easing: "ease-out",
|
|
292
|
+
thickness: 8,
|
|
293
|
+
showLabel: false,
|
|
294
|
+
marginVertical: 8,
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
id: "progress-countup-text",
|
|
299
|
+
type: "Text",
|
|
300
|
+
props: {
|
|
301
|
+
content: "{{membersJoined}} members joined",
|
|
302
|
+
mode: "expression",
|
|
303
|
+
fontSize: 18,
|
|
304
|
+
textAlign: "center",
|
|
305
|
+
marginVertical: 4,
|
|
306
|
+
},
|
|
307
|
+
},
|
|
268
308
|
{
|
|
269
309
|
id: "hero-video",
|
|
270
310
|
type: "Video",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { type ButtonAction, ButtonActionSchema } from "../../common.types";
|
|
2
3
|
|
|
3
4
|
export type GradientStop = {
|
|
4
5
|
color: string;
|
|
@@ -289,6 +290,13 @@ export type BaseBoxProps = {
|
|
|
289
290
|
elevation?: number;
|
|
290
291
|
transform?: ElementTransform;
|
|
291
292
|
animation?: ElementAnimation;
|
|
293
|
+
/**
|
|
294
|
+
* Ordered list of actions to run when the element is tapped. Same shape as
|
|
295
|
+
* `Button.actions` — sequential, `"continue"` is terminal. Makes any element
|
|
296
|
+
* pressable. Ignored for elements that own their own press/focus/scroll
|
|
297
|
+
* handling (Button, RadioGroup, CheckboxGroup, DatePicker, Input, WheelPicker).
|
|
298
|
+
*/
|
|
299
|
+
onPress?: ButtonAction[];
|
|
292
300
|
};
|
|
293
301
|
|
|
294
302
|
export const BaseBoxPropsSchema = z.object({
|
|
@@ -323,4 +331,5 @@ export const BaseBoxPropsSchema = z.object({
|
|
|
323
331
|
elevation: z.number().min(0).optional(),
|
|
324
332
|
transform: TransformSchema.optional(),
|
|
325
333
|
animation: ElementAnimationSchema.optional(),
|
|
334
|
+
onPress: z.array(ButtonActionSchema).optional(),
|
|
326
335
|
});
|
|
@@ -4,55 +4,23 @@ import {
|
|
|
4
4
|
type LeafCondition,
|
|
5
5
|
type ConditionGroup,
|
|
6
6
|
type HapticStyle,
|
|
7
|
+
type ButtonAction,
|
|
7
8
|
LeafConditionSchema,
|
|
8
9
|
ConditionGroupSchema,
|
|
9
10
|
HapticStyleSchema,
|
|
11
|
+
ButtonActionSchema,
|
|
10
12
|
} from "../../common.types";
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const CustomButtonActionSchema = z.object({
|
|
19
|
-
type: z.literal("custom"),
|
|
20
|
-
function: z.string().min(1, "function must not be empty"),
|
|
21
|
-
variables: z.array(z.string()).optional(),
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export type SetVariableButtonAction = {
|
|
25
|
-
type: "setVariable";
|
|
26
|
-
name: string;
|
|
27
|
-
value: string;
|
|
28
|
-
label?: string;
|
|
29
|
-
/**
|
|
30
|
-
* When `"expression"`, `value` is parsed as an arithmetic expression with
|
|
31
|
-
* `{{var}}` references, numeric literals, and `+ - * /` (parens supported).
|
|
32
|
-
* On parse failure, falls back to plain interpolation (string).
|
|
33
|
-
* Defaults to `"literal"` — `value` stored verbatim.
|
|
34
|
-
*/
|
|
35
|
-
valueMode?: "literal" | "expression";
|
|
36
|
-
/** Tags the stored variable's underlying type. */
|
|
37
|
-
kind?: "int" | "float" | "string";
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const SetVariableButtonActionSchema = z.object({
|
|
41
|
-
type: z.literal("setVariable"),
|
|
42
|
-
name: z.string().min(1, "name must not be empty"),
|
|
43
|
-
value: z.string(),
|
|
44
|
-
label: z.string().optional(),
|
|
45
|
-
valueMode: z.enum(["literal", "expression"]).optional(),
|
|
46
|
-
kind: z.enum(["int", "float", "string"]).optional(),
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
export type ButtonAction = "continue" | CustomButtonAction | SetVariableButtonAction;
|
|
50
|
-
|
|
51
|
-
export const ButtonActionSchema = z.union([
|
|
52
|
-
z.literal("continue"),
|
|
14
|
+
// `ButtonAction` and its variants moved to `common.types.ts` (now shared with the
|
|
15
|
+
// generic `onPress` on BaseBoxProps). Re-exported here for back-compat.
|
|
16
|
+
export {
|
|
17
|
+
type CustomButtonAction,
|
|
53
18
|
CustomButtonActionSchema,
|
|
19
|
+
type SetVariableButtonAction,
|
|
54
20
|
SetVariableButtonActionSchema,
|
|
55
|
-
|
|
21
|
+
} from "../../common.types";
|
|
22
|
+
export type { ButtonAction };
|
|
23
|
+
export { ButtonActionSchema };
|
|
56
24
|
|
|
57
25
|
type ButtonOverridableProps = BaseBoxProps & {
|
|
58
26
|
variant?: "filled" | "outlined" | "ghost";
|
|
@@ -11,20 +11,37 @@ export type ProgressIndicatorElementProps = BaseBoxProps & {
|
|
|
11
11
|
/** Visual style of the indicator. */
|
|
12
12
|
variant?: "linear" | "circular";
|
|
13
13
|
/**
|
|
14
|
-
* Variable bound to the indicator
|
|
15
|
-
*
|
|
16
|
-
* `autoplay` is off, the indicator reflects (and
|
|
17
|
-
* value.
|
|
14
|
+
* Variable bound to the indicator. When `autoplay` is on, the current
|
|
15
|
+
* step-snapped value (in `[minValue, maxValue]`) is written to this variable
|
|
16
|
+
* on each step hop; when `autoplay` is off, the indicator reflects (and
|
|
17
|
+
* animates to) this variable's value.
|
|
18
18
|
*/
|
|
19
19
|
variableName?: string;
|
|
20
|
-
/** Static value (
|
|
20
|
+
/** Static value (in `[minValue, maxValue]`) used when no `variableName` is provided. */
|
|
21
21
|
value?: number;
|
|
22
|
-
/** Animate from `initialValue` to
|
|
22
|
+
/** Animate from `initialValue` to `maxValue` automatically on mount. */
|
|
23
23
|
autoplay?: boolean;
|
|
24
24
|
/** Repeat the autoplay animation indefinitely. */
|
|
25
25
|
loop?: boolean;
|
|
26
|
-
/** Starting value (
|
|
26
|
+
/** Starting value (in `[minValue, maxValue]`). Defaults to `minValue`. */
|
|
27
27
|
initialValue?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Lower bound of the value range. Defaults to 0. The fill fraction is
|
|
30
|
+
* `(value - minValue) / (maxValue - minValue)`, while the label and the
|
|
31
|
+
* written variable carry the raw value (not a percentage).
|
|
32
|
+
*/
|
|
33
|
+
minValue?: number;
|
|
34
|
+
/** Upper bound of the value range. Defaults to 100. */
|
|
35
|
+
maxValue?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Quantization step for the displayed label and the written variable.
|
|
38
|
+
* Defaults to 1. Also bounds the per-sweep JS-callback count
|
|
39
|
+
* (`(maxValue - minValue) / step`) — use a coarse step for large ranges to
|
|
40
|
+
* avoid a per-step re-render storm.
|
|
41
|
+
*/
|
|
42
|
+
step?: number;
|
|
43
|
+
/** Suffix appended after the label value. Defaults to "%". Set "" or a unit (e.g. " kg"). */
|
|
44
|
+
labelSuffix?: string;
|
|
28
45
|
/** Animation duration in milliseconds. Defaults to 1000. */
|
|
29
46
|
duration?: number;
|
|
30
47
|
/** Delay in milliseconds before the animation starts. Defaults to 0. */
|
|
@@ -50,10 +67,14 @@ const ProgressEasingSchema = z.enum(["linear", "ease-in", "ease-out", "ease-in-o
|
|
|
50
67
|
export const ProgressIndicatorElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
51
68
|
variant: z.enum(["linear", "circular"]).optional(),
|
|
52
69
|
variableName: z.string().min(1).optional(),
|
|
53
|
-
value: z.number().
|
|
70
|
+
value: z.number().optional(),
|
|
54
71
|
autoplay: z.boolean().optional(),
|
|
55
72
|
loop: z.boolean().optional(),
|
|
56
|
-
initialValue: z.number().
|
|
73
|
+
initialValue: z.number().optional(),
|
|
74
|
+
minValue: z.number().optional(),
|
|
75
|
+
maxValue: z.number().optional(),
|
|
76
|
+
step: z.number().gt(0).optional(),
|
|
77
|
+
labelSuffix: z.string().optional(),
|
|
57
78
|
duration: z.number().min(0).optional(),
|
|
58
79
|
delay: z.number().min(0).optional(),
|
|
59
80
|
easing: ProgressEasingSchema.optional(),
|