@getrheo/rheo-skill 2.4.0 → 2.6.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.
@@ -4885,6 +4885,22 @@ var FieldKeySchema = external_exports.string().min(1).max(64).regex(FIELD_KEY_RE
4885
4885
  var FieldClassificationSchema = external_exports.enum(FIELD_CLASSIFICATIONS);
4886
4886
  var lazyLayer4 = () => layerSchemaStore.schema;
4887
4887
  var EmailPasswordAuthModeSchema = external_exports.enum(EMAIL_PASSWORD_AUTH_MODES);
4888
+ var PasswordRulesSchema = external_exports.object({
4889
+ minLength: external_exports.number().int().min(4).max(128).optional(),
4890
+ maxLength: external_exports.number().int().min(4).max(128).optional(),
4891
+ requireUppercase: external_exports.boolean().optional(),
4892
+ requireLowercase: external_exports.boolean().optional(),
4893
+ requireDigit: external_exports.boolean().optional(),
4894
+ requireSpecial: external_exports.boolean().optional()
4895
+ }).strict().superRefine((data, ctx) => {
4896
+ if (data.minLength !== void 0 && data.maxLength !== void 0 && data.maxLength < data.minLength) {
4897
+ ctx.addIssue({
4898
+ code: external_exports.ZodIssueCode.custom,
4899
+ message: "passwordRules.maxLength must be >= minLength",
4900
+ path: ["maxLength"]
4901
+ });
4902
+ }
4903
+ });
4888
4904
  var migrateEmailPasswordAuthIncoming = (raw) => {
4889
4905
  if (!raw || typeof raw !== "object") return raw;
4890
4906
  const o = raw;
@@ -5001,7 +5017,10 @@ var EmailPasswordAuthLayerSchemaValidated = external_exports.object({
5001
5017
  kind: external_exports.literal("email_password_auth"),
5002
5018
  mode: EmailPasswordAuthModeSchema,
5003
5019
  fieldKey: FieldKeySchema,
5020
+ /** @deprecated Prefer `passwordRules.minLength`. Kept for backward compatibility. */
5004
5021
  minPasswordLength: external_exports.number().int().min(4).max(128).optional(),
5022
+ /** Composition rules beyond minimum length (uppercase, digit, special, max). */
5023
+ passwordRules: PasswordRulesSchema.optional(),
5005
5024
  children: external_exports.lazy(
5006
5025
  () => external_exports.array(external_exports.union([EmailPasswordFieldLayerSchema, EmailPasswordSubmitLayerSchema])).min(1)
5007
5026
  ),
@@ -5072,16 +5091,39 @@ var TextInputFieldStyleSchema = external_exports.object({
5072
5091
  letterSpacing: external_exports.number().min(-0.5).max(1).optional(),
5073
5092
  opacity: external_exports.number().min(0).max(1).optional()
5074
5093
  }).partial();
5094
+ var TextInputAutoCapitalizeSchema = external_exports.enum([
5095
+ "none",
5096
+ "sentences",
5097
+ "words",
5098
+ "characters"
5099
+ ]);
5100
+ var TextInputReturnKeyTypeSchema = external_exports.enum([
5101
+ "done",
5102
+ "next",
5103
+ "go",
5104
+ "send",
5105
+ "search",
5106
+ "default"
5107
+ ]);
5108
+ var TextInputValidationModeSchema = external_exports.enum(["onBlur", "onSubmit", "live"]);
5075
5109
  var TextInputLayerSchema = external_exports.object({
5076
5110
  ...baseLayerShape,
5077
5111
  kind: external_exports.literal("text_input"),
5078
5112
  fieldKey: FieldKeySchema,
5079
5113
  placeholder: LocalizedTextSchema.optional(),
5114
+ /** Optional helper copy shown under the field when valid / untouched. */
5115
+ helperText: LocalizedTextSchema.optional(),
5080
5116
  inputType: TextInputTypeSchema.optional(),
5081
5117
  required: external_exports.boolean().optional(),
5082
5118
  minLength: external_exports.number().int().min(0).max(2e3).optional(),
5083
5119
  maxLength: external_exports.number().int().positive().max(2e3).optional(),
5084
5120
  classification: FieldClassificationSchema,
5121
+ /** Override autocapitalize (defaults from `inputType` when omitted). */
5122
+ autoCapitalize: TextInputAutoCapitalizeSchema.optional(),
5123
+ /** Soft keyboard return key label. */
5124
+ returnKeyType: TextInputReturnKeyTypeSchema.optional(),
5125
+ /** When to show inline validation errors (default `onBlur`). */
5126
+ validationMode: TextInputValidationModeSchema.optional(),
5085
5127
  children: external_exports.lazy(() => external_exports.array(lazyLayer5())).optional(),
5086
5128
  /** Typography for the native input's typed text. */
5087
5129
  fieldStyle: TextInputFieldStyleSchema.optional(),
@@ -5153,6 +5195,221 @@ var WheelPickerLayerSchema = external_exports.object({
5153
5195
  style: CommonStyleSchema.optional(),
5154
5196
  styleBreakpoints: CommonStyleBreakpointsSchema
5155
5197
  });
5198
+ var DATE_TIME_INPUT_MODES = ["date", "time", "datetime"];
5199
+ var NUMBER_STEPPER_BUTTON_ROLES = ["decrement", "increment"];
5200
+ var ADDRESS_INPUT_FIELDS = [
5201
+ "line1",
5202
+ "line2",
5203
+ "city",
5204
+ "region",
5205
+ "postalCode",
5206
+ "country"
5207
+ ];
5208
+ var lazyLayer6 = () => layerSchemaStore.schema;
5209
+ var CountryCodeSchema = external_exports.string().length(2).regex(/^[A-Za-z]{2}$/u).transform((s) => s.toUpperCase());
5210
+ var DateTimeInputModeSchema = external_exports.enum(DATE_TIME_INPUT_MODES);
5211
+ var DateTimeInputLayerSchema = external_exports.object({
5212
+ ...baseLayerShape,
5213
+ kind: external_exports.literal("date_time_input"),
5214
+ fieldKey: FieldKeySchema,
5215
+ mode: DateTimeInputModeSchema.optional(),
5216
+ required: external_exports.boolean().optional(),
5217
+ min: external_exports.string().min(1).max(64).optional(),
5218
+ max: external_exports.string().min(1).max(64).optional(),
5219
+ defaultValue: external_exports.string().min(1).max(64).optional(),
5220
+ placeholder: LocalizedTextSchema.optional(),
5221
+ classification: FieldClassificationSchema,
5222
+ children: external_exports.lazy(() => external_exports.array(lazyLayer6())).optional(),
5223
+ fieldStyle: TextInputFieldStyleSchema.optional(),
5224
+ style: CommonStyleSchema.optional(),
5225
+ styleBreakpoints: CommonStyleBreakpointsSchema
5226
+ });
5227
+ var NumberStepperButtonRoleSchema = external_exports.enum(NUMBER_STEPPER_BUTTON_ROLES);
5228
+ var NumberStepperButtonLayerSchema = external_exports.object({
5229
+ ...baseLayerShape,
5230
+ kind: external_exports.literal("number_stepper_button"),
5231
+ role: NumberStepperButtonRoleSchema,
5232
+ children: external_exports.lazy(() => external_exports.array(lazyLayer6())).optional(),
5233
+ style: CommonStyleSchema.optional(),
5234
+ styleBreakpoints: CommonStyleBreakpointsSchema
5235
+ });
5236
+ var NumberStepperValueLayerSchema = external_exports.object({
5237
+ ...baseLayerShape,
5238
+ kind: external_exports.literal("number_stepper_value"),
5239
+ unitLabel: LocalizedTextSchema.optional(),
5240
+ style: TextStyleSchema.optional(),
5241
+ styleBreakpoints: TextStyleBreakpointsSchema
5242
+ });
5243
+ var migrateNumberStepperIncoming = (raw) => {
5244
+ if (!raw || typeof raw !== "object") return raw;
5245
+ const o = raw;
5246
+ if (o.kind !== "number_stepper") return raw;
5247
+ if (Array.isArray(o.children) && o.children.length > 0) return raw;
5248
+ const idBase = typeof o.id === "string" ? o.id : "lyr_number_stepper";
5249
+ const slugRaw = idBase.replace(/^lyr_/i, "").replace(/[^a-z0-9_]/gi, "_");
5250
+ const slug = slugRaw.length > 0 ? slugRaw.slice(0, 40) : "stepper";
5251
+ const valueStyle = o.valueStyle && typeof o.valueStyle === "object" ? o.valueStyle : void 0;
5252
+ const buttonColor = o.buttonColor;
5253
+ const mkButton = (role, glyph) => {
5254
+ const suf = role === "decrement" ? "dec" : "inc";
5255
+ return {
5256
+ id: `lyr_${slug}_btn_${suf}`.slice(0, 64),
5257
+ kind: "number_stepper_button",
5258
+ role,
5259
+ style: {
5260
+ width: 36,
5261
+ height: 36,
5262
+ radius: 8
5263
+ },
5264
+ children: [
5265
+ {
5266
+ id: `lyr_${slug}_btn_${suf}_txt`.slice(0, 64),
5267
+ kind: "text",
5268
+ text: { default: glyph },
5269
+ style: {
5270
+ fontSize: 20,
5271
+ align: "center",
5272
+ ...buttonColor !== void 0 ? { color: buttonColor } : {}
5273
+ }
5274
+ }
5275
+ ]
5276
+ };
5277
+ };
5278
+ const valueChild = {
5279
+ id: `lyr_${slug}_value`.slice(0, 64),
5280
+ kind: "number_stepper_value",
5281
+ style: {
5282
+ fontSize: typeof valueStyle?.fontSize === "number" ? valueStyle.fontSize : 14,
5283
+ width: "full",
5284
+ ...typeof valueStyle?.fontFamily === "string" ? { fontFamily: valueStyle.fontFamily } : {},
5285
+ ...typeof valueStyle?.fontWeight === "number" ? { fontWeight: valueStyle.fontWeight } : {},
5286
+ ...valueStyle?.color !== void 0 ? { color: valueStyle.color } : {},
5287
+ ...typeof valueStyle?.lineHeight === "number" ? { lineHeight: valueStyle.lineHeight } : {},
5288
+ ...typeof valueStyle?.letterSpacing === "number" ? { letterSpacing: valueStyle.letterSpacing } : {},
5289
+ ...typeof valueStyle?.opacity === "number" ? { opacity: valueStyle.opacity } : {},
5290
+ align: typeof valueStyle?.align === "string" ? valueStyle.align : "center"
5291
+ }
5292
+ };
5293
+ if (o.unitLabel !== void 0) valueChild.unitLabel = o.unitLabel;
5294
+ const {
5295
+ valueStyle: _vs,
5296
+ buttonColor: _bc,
5297
+ unitLabel: _ul,
5298
+ ...rest
5299
+ } = o;
5300
+ return {
5301
+ ...rest,
5302
+ direction: typeof o.direction === "string" ? o.direction : "horizontal",
5303
+ gap: typeof o.gap === "number" ? o.gap : 12,
5304
+ align: typeof o.align === "string" ? o.align : "center",
5305
+ ...typeof o.distribution === "string" ? { distribution: o.distribution } : {},
5306
+ children: [mkButton("decrement", "-"), valueChild, mkButton("increment", "+")]
5307
+ };
5308
+ };
5309
+ var refineNumberStepperChildren = (data, ctx) => {
5310
+ const buttons = data.children.filter((c) => c.kind === "number_stepper_button");
5311
+ const values = data.children.filter((c) => c.kind === "number_stepper_value");
5312
+ const other = data.children.filter(
5313
+ (c) => c.kind !== "number_stepper_button" && c.kind !== "number_stepper_value"
5314
+ );
5315
+ if (other.length > 0) {
5316
+ ctx.addIssue({
5317
+ code: external_exports.ZodIssueCode.custom,
5318
+ message: "number_stepper children must be number_stepper_button or number_stepper_value",
5319
+ path: ["children"]
5320
+ });
5321
+ }
5322
+ const roles = /* @__PURE__ */ new Set();
5323
+ for (const b of buttons) {
5324
+ if (b.kind !== "number_stepper_button") continue;
5325
+ if (roles.has(b.role)) {
5326
+ ctx.addIssue({
5327
+ code: external_exports.ZodIssueCode.custom,
5328
+ message: `duplicate number_stepper_button role "${b.role}"`,
5329
+ path: ["children"]
5330
+ });
5331
+ }
5332
+ roles.add(b.role);
5333
+ }
5334
+ for (const role of NUMBER_STEPPER_BUTTON_ROLES) {
5335
+ if (!roles.has(role)) {
5336
+ ctx.addIssue({
5337
+ code: external_exports.ZodIssueCode.custom,
5338
+ message: `number_stepper requires a number_stepper_button with role "${role}"`,
5339
+ path: ["children"]
5340
+ });
5341
+ }
5342
+ }
5343
+ if (values.length !== 1) {
5344
+ ctx.addIssue({
5345
+ code: external_exports.ZodIssueCode.custom,
5346
+ message: `number_stepper must have exactly one number_stepper_value (found ${values.length})`,
5347
+ path: ["children"]
5348
+ });
5349
+ }
5350
+ };
5351
+ var NumberStepperLayerSchemaValidated = external_exports.object({
5352
+ ...baseLayerShape,
5353
+ kind: external_exports.literal("number_stepper"),
5354
+ fieldKey: FieldKeySchema,
5355
+ min: external_exports.number(),
5356
+ max: external_exports.number(),
5357
+ step: external_exports.number().positive().optional(),
5358
+ defaultValue: external_exports.number().optional(),
5359
+ classification: FieldClassificationSchema,
5360
+ direction: external_exports.enum(["vertical", "horizontal"]).optional(),
5361
+ gap: external_exports.number().int().min(0).max(64).optional(),
5362
+ align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
5363
+ distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
5364
+ children: external_exports.lazy(
5365
+ () => external_exports.array(external_exports.union([NumberStepperButtonLayerSchema, NumberStepperValueLayerSchema])).min(1)
5366
+ ),
5367
+ style: CommonStyleSchema.optional(),
5368
+ styleBreakpoints: CommonStyleBreakpointsSchema
5369
+ }).superRefine(refineNumberStepperChildren);
5370
+ var NumberStepperLayerSchema = external_exports.preprocess(
5371
+ migrateNumberStepperIncoming,
5372
+ NumberStepperLayerSchemaValidated
5373
+ );
5374
+ var PhoneInputLayerSchema = external_exports.object({
5375
+ ...baseLayerShape,
5376
+ kind: external_exports.literal("phone_input"),
5377
+ fieldKey: FieldKeySchema,
5378
+ defaultCountryCode: CountryCodeSchema.optional(),
5379
+ allowedCountryCodes: external_exports.array(CountryCodeSchema).min(1).max(250).optional(),
5380
+ required: external_exports.boolean().optional(),
5381
+ placeholder: LocalizedTextSchema.optional(),
5382
+ classification: FieldClassificationSchema,
5383
+ children: external_exports.lazy(() => external_exports.array(lazyLayer6())).optional(),
5384
+ fieldStyle: TextInputFieldStyleSchema.optional(),
5385
+ style: CommonStyleSchema.optional(),
5386
+ styleBreakpoints: CommonStyleBreakpointsSchema
5387
+ });
5388
+ var AddressInputFieldSchema = external_exports.enum(ADDRESS_INPUT_FIELDS);
5389
+ var AddressInputPlaceholdersSchema = external_exports.object({
5390
+ line1: LocalizedTextSchema.optional(),
5391
+ line2: LocalizedTextSchema.optional(),
5392
+ city: LocalizedTextSchema.optional(),
5393
+ region: LocalizedTextSchema.optional(),
5394
+ postalCode: LocalizedTextSchema.optional(),
5395
+ country: LocalizedTextSchema.optional()
5396
+ }).partial();
5397
+ var AddressInputLayerSchema = external_exports.object({
5398
+ ...baseLayerShape,
5399
+ kind: external_exports.literal("address_input"),
5400
+ fieldKey: FieldKeySchema,
5401
+ requiredFields: external_exports.array(AddressInputFieldSchema).min(1).max(6).optional(),
5402
+ showLine2: external_exports.boolean().optional(),
5403
+ showRegion: external_exports.boolean().optional(),
5404
+ defaultCountryCode: CountryCodeSchema.optional(),
5405
+ placeholders: AddressInputPlaceholdersSchema.optional(),
5406
+ classification: FieldClassificationSchema,
5407
+ children: external_exports.lazy(() => external_exports.array(lazyLayer6())).optional(),
5408
+ fieldStyle: TextInputFieldStyleSchema.optional(),
5409
+ gap: external_exports.number().int().min(0).max(64).optional(),
5410
+ style: CommonStyleSchema.optional(),
5411
+ styleBreakpoints: CommonStyleBreakpointsSchema
5412
+ });
5156
5413
  var CarouselIndicatorsStyleSchema = external_exports.object({
5157
5414
  width: external_exports.number().int().min(1).max(64).optional(),
5158
5415
  height: external_exports.number().int().min(1).max(64).optional(),
@@ -5287,6 +5544,12 @@ layerSchemaStore.schema = external_exports.lazy(
5287
5544
  TextInputLayerSchema,
5288
5545
  ScaleInputLayerSchema,
5289
5546
  WheelPickerLayerSchema,
5547
+ DateTimeInputLayerSchema,
5548
+ NumberStepperLayerSchema,
5549
+ NumberStepperButtonLayerSchema,
5550
+ NumberStepperValueLayerSchema,
5551
+ PhoneInputLayerSchema,
5552
+ AddressInputLayerSchema,
5290
5553
  OAuthLoginLayerSchema,
5291
5554
  OAuthProviderPresetLayerSchema,
5292
5555
  OAuthProviderCustomLayerSchema,
@@ -5298,7 +5561,17 @@ layerSchemaStore.schema = external_exports.lazy(
5298
5561
  ])
5299
5562
  );
5300
5563
  var LayerSchema = layerSchemaStore.schema;
5301
- var isInputLayer = (l) => l.kind === "single_choice" || l.kind === "multiple_choice" || l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker";
5564
+ var MANUAL_SUBMIT_INPUT_KINDS = [
5565
+ "multiple_choice",
5566
+ "text_input",
5567
+ "scale_input",
5568
+ "wheel_picker",
5569
+ "date_time_input",
5570
+ "number_stepper",
5571
+ "phone_input",
5572
+ "address_input"
5573
+ ];
5574
+ var isInputLayer = (l) => l.kind === "single_choice" || l.kind === "multiple_choice" || l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker" || l.kind === "date_time_input" || l.kind === "number_stepper" || l.kind === "phone_input" || l.kind === "address_input";
5302
5575
 
5303
5576
  // ../../node_modules/@getrheo/contracts/dist/localized.js
5304
5577
  var LocaleCode2 = external_exports.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/, 'locale must be like "en" or "en-US"');
@@ -5733,11 +6006,11 @@ var OAuthPresetButtonChromeBreakpointsSchema2 = external_exports.object({
5733
6006
  }).partial().optional();
5734
6007
  var EMAIL_PASSWORD_AUTH_MODES2 = ["sign_in", "sign_up"];
5735
6008
  var EMAIL_PASSWORD_SLOTS2 = ["email", "password", "confirm"];
5736
- var lazyLayer6 = () => layerSchemaStore2.schema;
6009
+ var lazyLayer7 = () => layerSchemaStore2.schema;
5737
6010
  var ButtonLayerSchema2 = external_exports.object({
5738
6011
  ...baseLayerShape2,
5739
6012
  kind: external_exports.literal("button"),
5740
- children: external_exports.lazy(() => external_exports.array(lazyLayer6())),
6013
+ children: external_exports.lazy(() => external_exports.array(lazyLayer7())),
5741
6014
  action: ButtonActionSchema2,
5742
6015
  variant: ButtonLayerVariantSchema2,
5743
6016
  direction: external_exports.enum(["vertical", "horizontal"]).optional(),
@@ -5751,7 +6024,7 @@ var ButtonLayerSchema2 = external_exports.object({
5751
6024
  var BackButtonLayerSchema2 = external_exports.object({
5752
6025
  ...baseLayerShape2,
5753
6026
  kind: external_exports.literal("back_button"),
5754
- children: external_exports.lazy(() => external_exports.array(lazyLayer6())),
6027
+ children: external_exports.lazy(() => external_exports.array(lazyLayer7())),
5755
6028
  variant: ButtonLayerVariantSchema2,
5756
6029
  direction: external_exports.enum(["vertical", "horizontal"]).optional(),
5757
6030
  gap: external_exports.number().int().min(0).optional(),
@@ -6138,6 +6411,22 @@ var FieldKeySchema2 = external_exports.string().min(1).max(64).regex(FIELD_KEY_R
6138
6411
  var FieldClassificationSchema2 = external_exports.enum(FIELD_CLASSIFICATIONS2);
6139
6412
  var lazyLayer42 = () => layerSchemaStore2.schema;
6140
6413
  var EmailPasswordAuthModeSchema2 = external_exports.enum(EMAIL_PASSWORD_AUTH_MODES2);
6414
+ var PasswordRulesSchema2 = external_exports.object({
6415
+ minLength: external_exports.number().int().min(4).max(128).optional(),
6416
+ maxLength: external_exports.number().int().min(4).max(128).optional(),
6417
+ requireUppercase: external_exports.boolean().optional(),
6418
+ requireLowercase: external_exports.boolean().optional(),
6419
+ requireDigit: external_exports.boolean().optional(),
6420
+ requireSpecial: external_exports.boolean().optional()
6421
+ }).strict().superRefine((data, ctx) => {
6422
+ if (data.minLength !== void 0 && data.maxLength !== void 0 && data.maxLength < data.minLength) {
6423
+ ctx.addIssue({
6424
+ code: external_exports.ZodIssueCode.custom,
6425
+ message: "passwordRules.maxLength must be >= minLength",
6426
+ path: ["maxLength"]
6427
+ });
6428
+ }
6429
+ });
6141
6430
  var migrateEmailPasswordAuthIncoming2 = (raw) => {
6142
6431
  if (!raw || typeof raw !== "object") return raw;
6143
6432
  const o = raw;
@@ -6254,7 +6543,10 @@ var EmailPasswordAuthLayerSchemaValidated2 = external_exports.object({
6254
6543
  kind: external_exports.literal("email_password_auth"),
6255
6544
  mode: EmailPasswordAuthModeSchema2,
6256
6545
  fieldKey: FieldKeySchema2,
6546
+ /** @deprecated Prefer `passwordRules.minLength`. Kept for backward compatibility. */
6257
6547
  minPasswordLength: external_exports.number().int().min(4).max(128).optional(),
6548
+ /** Composition rules beyond minimum length (uppercase, digit, special, max). */
6549
+ passwordRules: PasswordRulesSchema2.optional(),
6258
6550
  children: external_exports.lazy(
6259
6551
  () => external_exports.array(external_exports.union([EmailPasswordFieldLayerSchema2, EmailPasswordSubmitLayerSchema2])).min(1)
6260
6552
  ),
@@ -6325,16 +6617,39 @@ var TextInputFieldStyleSchema2 = external_exports.object({
6325
6617
  letterSpacing: external_exports.number().min(-0.5).max(1).optional(),
6326
6618
  opacity: external_exports.number().min(0).max(1).optional()
6327
6619
  }).partial();
6620
+ var TextInputAutoCapitalizeSchema2 = external_exports.enum([
6621
+ "none",
6622
+ "sentences",
6623
+ "words",
6624
+ "characters"
6625
+ ]);
6626
+ var TextInputReturnKeyTypeSchema2 = external_exports.enum([
6627
+ "done",
6628
+ "next",
6629
+ "go",
6630
+ "send",
6631
+ "search",
6632
+ "default"
6633
+ ]);
6634
+ var TextInputValidationModeSchema2 = external_exports.enum(["onBlur", "onSubmit", "live"]);
6328
6635
  var TextInputLayerSchema2 = external_exports.object({
6329
6636
  ...baseLayerShape2,
6330
6637
  kind: external_exports.literal("text_input"),
6331
6638
  fieldKey: FieldKeySchema2,
6332
6639
  placeholder: LocalizedTextSchema3.optional(),
6640
+ /** Optional helper copy shown under the field when valid / untouched. */
6641
+ helperText: LocalizedTextSchema3.optional(),
6333
6642
  inputType: TextInputTypeSchema2.optional(),
6334
6643
  required: external_exports.boolean().optional(),
6335
6644
  minLength: external_exports.number().int().min(0).max(2e3).optional(),
6336
6645
  maxLength: external_exports.number().int().positive().max(2e3).optional(),
6337
6646
  classification: FieldClassificationSchema2,
6647
+ /** Override autocapitalize (defaults from `inputType` when omitted). */
6648
+ autoCapitalize: TextInputAutoCapitalizeSchema2.optional(),
6649
+ /** Soft keyboard return key label. */
6650
+ returnKeyType: TextInputReturnKeyTypeSchema2.optional(),
6651
+ /** When to show inline validation errors (default `onBlur`). */
6652
+ validationMode: TextInputValidationModeSchema2.optional(),
6338
6653
  children: external_exports.lazy(() => external_exports.array(lazyLayer52())).optional(),
6339
6654
  /** Typography for the native input's typed text. */
6340
6655
  fieldStyle: TextInputFieldStyleSchema2.optional(),
@@ -6406,6 +6721,221 @@ var WheelPickerLayerSchema2 = external_exports.object({
6406
6721
  style: CommonStyleSchema2.optional(),
6407
6722
  styleBreakpoints: CommonStyleBreakpointsSchema2
6408
6723
  });
6724
+ var DATE_TIME_INPUT_MODES2 = ["date", "time", "datetime"];
6725
+ var NUMBER_STEPPER_BUTTON_ROLES2 = ["decrement", "increment"];
6726
+ var ADDRESS_INPUT_FIELDS2 = [
6727
+ "line1",
6728
+ "line2",
6729
+ "city",
6730
+ "region",
6731
+ "postalCode",
6732
+ "country"
6733
+ ];
6734
+ var lazyLayer62 = () => layerSchemaStore2.schema;
6735
+ var CountryCodeSchema2 = external_exports.string().length(2).regex(/^[A-Za-z]{2}$/u).transform((s) => s.toUpperCase());
6736
+ var DateTimeInputModeSchema2 = external_exports.enum(DATE_TIME_INPUT_MODES2);
6737
+ var DateTimeInputLayerSchema2 = external_exports.object({
6738
+ ...baseLayerShape2,
6739
+ kind: external_exports.literal("date_time_input"),
6740
+ fieldKey: FieldKeySchema2,
6741
+ mode: DateTimeInputModeSchema2.optional(),
6742
+ required: external_exports.boolean().optional(),
6743
+ min: external_exports.string().min(1).max(64).optional(),
6744
+ max: external_exports.string().min(1).max(64).optional(),
6745
+ defaultValue: external_exports.string().min(1).max(64).optional(),
6746
+ placeholder: LocalizedTextSchema3.optional(),
6747
+ classification: FieldClassificationSchema2,
6748
+ children: external_exports.lazy(() => external_exports.array(lazyLayer62())).optional(),
6749
+ fieldStyle: TextInputFieldStyleSchema2.optional(),
6750
+ style: CommonStyleSchema2.optional(),
6751
+ styleBreakpoints: CommonStyleBreakpointsSchema2
6752
+ });
6753
+ var NumberStepperButtonRoleSchema2 = external_exports.enum(NUMBER_STEPPER_BUTTON_ROLES2);
6754
+ var NumberStepperButtonLayerSchema2 = external_exports.object({
6755
+ ...baseLayerShape2,
6756
+ kind: external_exports.literal("number_stepper_button"),
6757
+ role: NumberStepperButtonRoleSchema2,
6758
+ children: external_exports.lazy(() => external_exports.array(lazyLayer62())).optional(),
6759
+ style: CommonStyleSchema2.optional(),
6760
+ styleBreakpoints: CommonStyleBreakpointsSchema2
6761
+ });
6762
+ var NumberStepperValueLayerSchema2 = external_exports.object({
6763
+ ...baseLayerShape2,
6764
+ kind: external_exports.literal("number_stepper_value"),
6765
+ unitLabel: LocalizedTextSchema3.optional(),
6766
+ style: TextStyleSchema2.optional(),
6767
+ styleBreakpoints: TextStyleBreakpointsSchema2
6768
+ });
6769
+ var migrateNumberStepperIncoming2 = (raw) => {
6770
+ if (!raw || typeof raw !== "object") return raw;
6771
+ const o = raw;
6772
+ if (o.kind !== "number_stepper") return raw;
6773
+ if (Array.isArray(o.children) && o.children.length > 0) return raw;
6774
+ const idBase = typeof o.id === "string" ? o.id : "lyr_number_stepper";
6775
+ const slugRaw = idBase.replace(/^lyr_/i, "").replace(/[^a-z0-9_]/gi, "_");
6776
+ const slug = slugRaw.length > 0 ? slugRaw.slice(0, 40) : "stepper";
6777
+ const valueStyle = o.valueStyle && typeof o.valueStyle === "object" ? o.valueStyle : void 0;
6778
+ const buttonColor = o.buttonColor;
6779
+ const mkButton = (role, glyph) => {
6780
+ const suf = role === "decrement" ? "dec" : "inc";
6781
+ return {
6782
+ id: `lyr_${slug}_btn_${suf}`.slice(0, 64),
6783
+ kind: "number_stepper_button",
6784
+ role,
6785
+ style: {
6786
+ width: 36,
6787
+ height: 36,
6788
+ radius: 8
6789
+ },
6790
+ children: [
6791
+ {
6792
+ id: `lyr_${slug}_btn_${suf}_txt`.slice(0, 64),
6793
+ kind: "text",
6794
+ text: { default: glyph },
6795
+ style: {
6796
+ fontSize: 20,
6797
+ align: "center",
6798
+ ...buttonColor !== void 0 ? { color: buttonColor } : {}
6799
+ }
6800
+ }
6801
+ ]
6802
+ };
6803
+ };
6804
+ const valueChild = {
6805
+ id: `lyr_${slug}_value`.slice(0, 64),
6806
+ kind: "number_stepper_value",
6807
+ style: {
6808
+ fontSize: typeof valueStyle?.fontSize === "number" ? valueStyle.fontSize : 14,
6809
+ width: "full",
6810
+ ...typeof valueStyle?.fontFamily === "string" ? { fontFamily: valueStyle.fontFamily } : {},
6811
+ ...typeof valueStyle?.fontWeight === "number" ? { fontWeight: valueStyle.fontWeight } : {},
6812
+ ...valueStyle?.color !== void 0 ? { color: valueStyle.color } : {},
6813
+ ...typeof valueStyle?.lineHeight === "number" ? { lineHeight: valueStyle.lineHeight } : {},
6814
+ ...typeof valueStyle?.letterSpacing === "number" ? { letterSpacing: valueStyle.letterSpacing } : {},
6815
+ ...typeof valueStyle?.opacity === "number" ? { opacity: valueStyle.opacity } : {},
6816
+ align: typeof valueStyle?.align === "string" ? valueStyle.align : "center"
6817
+ }
6818
+ };
6819
+ if (o.unitLabel !== void 0) valueChild.unitLabel = o.unitLabel;
6820
+ const {
6821
+ valueStyle: _vs,
6822
+ buttonColor: _bc,
6823
+ unitLabel: _ul,
6824
+ ...rest
6825
+ } = o;
6826
+ return {
6827
+ ...rest,
6828
+ direction: typeof o.direction === "string" ? o.direction : "horizontal",
6829
+ gap: typeof o.gap === "number" ? o.gap : 12,
6830
+ align: typeof o.align === "string" ? o.align : "center",
6831
+ ...typeof o.distribution === "string" ? { distribution: o.distribution } : {},
6832
+ children: [mkButton("decrement", "-"), valueChild, mkButton("increment", "+")]
6833
+ };
6834
+ };
6835
+ var refineNumberStepperChildren2 = (data, ctx) => {
6836
+ const buttons = data.children.filter((c) => c.kind === "number_stepper_button");
6837
+ const values = data.children.filter((c) => c.kind === "number_stepper_value");
6838
+ const other = data.children.filter(
6839
+ (c) => c.kind !== "number_stepper_button" && c.kind !== "number_stepper_value"
6840
+ );
6841
+ if (other.length > 0) {
6842
+ ctx.addIssue({
6843
+ code: external_exports.ZodIssueCode.custom,
6844
+ message: "number_stepper children must be number_stepper_button or number_stepper_value",
6845
+ path: ["children"]
6846
+ });
6847
+ }
6848
+ const roles = /* @__PURE__ */ new Set();
6849
+ for (const b of buttons) {
6850
+ if (b.kind !== "number_stepper_button") continue;
6851
+ if (roles.has(b.role)) {
6852
+ ctx.addIssue({
6853
+ code: external_exports.ZodIssueCode.custom,
6854
+ message: `duplicate number_stepper_button role "${b.role}"`,
6855
+ path: ["children"]
6856
+ });
6857
+ }
6858
+ roles.add(b.role);
6859
+ }
6860
+ for (const role of NUMBER_STEPPER_BUTTON_ROLES2) {
6861
+ if (!roles.has(role)) {
6862
+ ctx.addIssue({
6863
+ code: external_exports.ZodIssueCode.custom,
6864
+ message: `number_stepper requires a number_stepper_button with role "${role}"`,
6865
+ path: ["children"]
6866
+ });
6867
+ }
6868
+ }
6869
+ if (values.length !== 1) {
6870
+ ctx.addIssue({
6871
+ code: external_exports.ZodIssueCode.custom,
6872
+ message: `number_stepper must have exactly one number_stepper_value (found ${values.length})`,
6873
+ path: ["children"]
6874
+ });
6875
+ }
6876
+ };
6877
+ var NumberStepperLayerSchemaValidated2 = external_exports.object({
6878
+ ...baseLayerShape2,
6879
+ kind: external_exports.literal("number_stepper"),
6880
+ fieldKey: FieldKeySchema2,
6881
+ min: external_exports.number(),
6882
+ max: external_exports.number(),
6883
+ step: external_exports.number().positive().optional(),
6884
+ defaultValue: external_exports.number().optional(),
6885
+ classification: FieldClassificationSchema2,
6886
+ direction: external_exports.enum(["vertical", "horizontal"]).optional(),
6887
+ gap: external_exports.number().int().min(0).max(64).optional(),
6888
+ align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
6889
+ distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
6890
+ children: external_exports.lazy(
6891
+ () => external_exports.array(external_exports.union([NumberStepperButtonLayerSchema2, NumberStepperValueLayerSchema2])).min(1)
6892
+ ),
6893
+ style: CommonStyleSchema2.optional(),
6894
+ styleBreakpoints: CommonStyleBreakpointsSchema2
6895
+ }).superRefine(refineNumberStepperChildren2);
6896
+ var NumberStepperLayerSchema2 = external_exports.preprocess(
6897
+ migrateNumberStepperIncoming2,
6898
+ NumberStepperLayerSchemaValidated2
6899
+ );
6900
+ var PhoneInputLayerSchema2 = external_exports.object({
6901
+ ...baseLayerShape2,
6902
+ kind: external_exports.literal("phone_input"),
6903
+ fieldKey: FieldKeySchema2,
6904
+ defaultCountryCode: CountryCodeSchema2.optional(),
6905
+ allowedCountryCodes: external_exports.array(CountryCodeSchema2).min(1).max(250).optional(),
6906
+ required: external_exports.boolean().optional(),
6907
+ placeholder: LocalizedTextSchema3.optional(),
6908
+ classification: FieldClassificationSchema2,
6909
+ children: external_exports.lazy(() => external_exports.array(lazyLayer62())).optional(),
6910
+ fieldStyle: TextInputFieldStyleSchema2.optional(),
6911
+ style: CommonStyleSchema2.optional(),
6912
+ styleBreakpoints: CommonStyleBreakpointsSchema2
6913
+ });
6914
+ var AddressInputFieldSchema2 = external_exports.enum(ADDRESS_INPUT_FIELDS2);
6915
+ var AddressInputPlaceholdersSchema2 = external_exports.object({
6916
+ line1: LocalizedTextSchema3.optional(),
6917
+ line2: LocalizedTextSchema3.optional(),
6918
+ city: LocalizedTextSchema3.optional(),
6919
+ region: LocalizedTextSchema3.optional(),
6920
+ postalCode: LocalizedTextSchema3.optional(),
6921
+ country: LocalizedTextSchema3.optional()
6922
+ }).partial();
6923
+ var AddressInputLayerSchema2 = external_exports.object({
6924
+ ...baseLayerShape2,
6925
+ kind: external_exports.literal("address_input"),
6926
+ fieldKey: FieldKeySchema2,
6927
+ requiredFields: external_exports.array(AddressInputFieldSchema2).min(1).max(6).optional(),
6928
+ showLine2: external_exports.boolean().optional(),
6929
+ showRegion: external_exports.boolean().optional(),
6930
+ defaultCountryCode: CountryCodeSchema2.optional(),
6931
+ placeholders: AddressInputPlaceholdersSchema2.optional(),
6932
+ classification: FieldClassificationSchema2,
6933
+ children: external_exports.lazy(() => external_exports.array(lazyLayer62())).optional(),
6934
+ fieldStyle: TextInputFieldStyleSchema2.optional(),
6935
+ gap: external_exports.number().int().min(0).max(64).optional(),
6936
+ style: CommonStyleSchema2.optional(),
6937
+ styleBreakpoints: CommonStyleBreakpointsSchema2
6938
+ });
6409
6939
  var CarouselIndicatorsStyleSchema2 = external_exports.object({
6410
6940
  width: external_exports.number().int().min(1).max(64).optional(),
6411
6941
  height: external_exports.number().int().min(1).max(64).optional(),
@@ -6558,6 +7088,12 @@ layerSchemaStore2.schema = external_exports.lazy(
6558
7088
  TextInputLayerSchema2,
6559
7089
  ScaleInputLayerSchema2,
6560
7090
  WheelPickerLayerSchema2,
7091
+ DateTimeInputLayerSchema2,
7092
+ NumberStepperLayerSchema2,
7093
+ NumberStepperButtonLayerSchema2,
7094
+ NumberStepperValueLayerSchema2,
7095
+ PhoneInputLayerSchema2,
7096
+ AddressInputLayerSchema2,
6561
7097
  OAuthLoginLayerSchema2,
6562
7098
  OAuthProviderPresetLayerSchema2,
6563
7099
  OAuthProviderCustomLayerSchema2,
@@ -7049,11 +7585,11 @@ var OAuthPresetButtonChromeBreakpointsSchema3 = external_exports.object({
7049
7585
  }).partial().optional();
7050
7586
  var EMAIL_PASSWORD_AUTH_MODES3 = ["sign_in", "sign_up"];
7051
7587
  var EMAIL_PASSWORD_SLOTS3 = ["email", "password", "confirm"];
7052
- var lazyLayer7 = () => layerSchemaStore3.schema;
7588
+ var lazyLayer8 = () => layerSchemaStore3.schema;
7053
7589
  var ButtonLayerSchema3 = external_exports.object({
7054
7590
  ...baseLayerShape3,
7055
7591
  kind: external_exports.literal("button"),
7056
- children: external_exports.lazy(() => external_exports.array(lazyLayer7())),
7592
+ children: external_exports.lazy(() => external_exports.array(lazyLayer8())),
7057
7593
  action: ButtonActionSchema3,
7058
7594
  variant: ButtonLayerVariantSchema3,
7059
7595
  direction: external_exports.enum(["vertical", "horizontal"]).optional(),
@@ -7067,7 +7603,7 @@ var ButtonLayerSchema3 = external_exports.object({
7067
7603
  var BackButtonLayerSchema3 = external_exports.object({
7068
7604
  ...baseLayerShape3,
7069
7605
  kind: external_exports.literal("back_button"),
7070
- children: external_exports.lazy(() => external_exports.array(lazyLayer7())),
7606
+ children: external_exports.lazy(() => external_exports.array(lazyLayer8())),
7071
7607
  variant: ButtonLayerVariantSchema3,
7072
7608
  direction: external_exports.enum(["vertical", "horizontal"]).optional(),
7073
7609
  gap: external_exports.number().int().min(0).optional(),
@@ -7451,6 +7987,22 @@ var OAuthLoginProvidersArraySchema2 = external_exports.array(OAuthLoginProviderS
7451
7987
  });
7452
7988
  var lazyLayer43 = () => layerSchemaStore3.schema;
7453
7989
  var EmailPasswordAuthModeSchema3 = external_exports.enum(EMAIL_PASSWORD_AUTH_MODES3);
7990
+ var PasswordRulesSchema3 = external_exports.object({
7991
+ minLength: external_exports.number().int().min(4).max(128).optional(),
7992
+ maxLength: external_exports.number().int().min(4).max(128).optional(),
7993
+ requireUppercase: external_exports.boolean().optional(),
7994
+ requireLowercase: external_exports.boolean().optional(),
7995
+ requireDigit: external_exports.boolean().optional(),
7996
+ requireSpecial: external_exports.boolean().optional()
7997
+ }).strict().superRefine((data, ctx) => {
7998
+ if (data.minLength !== void 0 && data.maxLength !== void 0 && data.maxLength < data.minLength) {
7999
+ ctx.addIssue({
8000
+ code: external_exports.ZodIssueCode.custom,
8001
+ message: "passwordRules.maxLength must be >= minLength",
8002
+ path: ["maxLength"]
8003
+ });
8004
+ }
8005
+ });
7454
8006
  var migrateEmailPasswordAuthIncoming3 = (raw) => {
7455
8007
  if (!raw || typeof raw !== "object") return raw;
7456
8008
  const o = raw;
@@ -7567,7 +8119,10 @@ var EmailPasswordAuthLayerSchemaValidated3 = external_exports.object({
7567
8119
  kind: external_exports.literal("email_password_auth"),
7568
8120
  mode: EmailPasswordAuthModeSchema3,
7569
8121
  fieldKey: FieldKeySchema3,
8122
+ /** @deprecated Prefer `passwordRules.minLength`. Kept for backward compatibility. */
7570
8123
  minPasswordLength: external_exports.number().int().min(4).max(128).optional(),
8124
+ /** Composition rules beyond minimum length (uppercase, digit, special, max). */
8125
+ passwordRules: PasswordRulesSchema3.optional(),
7571
8126
  children: external_exports.lazy(
7572
8127
  () => external_exports.array(external_exports.union([EmailPasswordFieldLayerSchema3, EmailPasswordSubmitLayerSchema3])).min(1)
7573
8128
  ),
@@ -7686,16 +8241,39 @@ var TextInputFieldStyleSchema3 = external_exports.object({
7686
8241
  letterSpacing: external_exports.number().min(-0.5).max(1).optional(),
7687
8242
  opacity: external_exports.number().min(0).max(1).optional()
7688
8243
  }).partial();
8244
+ var TextInputAutoCapitalizeSchema3 = external_exports.enum([
8245
+ "none",
8246
+ "sentences",
8247
+ "words",
8248
+ "characters"
8249
+ ]);
8250
+ var TextInputReturnKeyTypeSchema3 = external_exports.enum([
8251
+ "done",
8252
+ "next",
8253
+ "go",
8254
+ "send",
8255
+ "search",
8256
+ "default"
8257
+ ]);
8258
+ var TextInputValidationModeSchema3 = external_exports.enum(["onBlur", "onSubmit", "live"]);
7689
8259
  var TextInputLayerSchema3 = external_exports.object({
7690
8260
  ...baseLayerShape3,
7691
8261
  kind: external_exports.literal("text_input"),
7692
8262
  fieldKey: FieldKeySchema3,
7693
8263
  placeholder: LocalizedTextSchema4.optional(),
8264
+ /** Optional helper copy shown under the field when valid / untouched. */
8265
+ helperText: LocalizedTextSchema4.optional(),
7694
8266
  inputType: TextInputTypeSchema3.optional(),
7695
8267
  required: external_exports.boolean().optional(),
7696
8268
  minLength: external_exports.number().int().min(0).max(2e3).optional(),
7697
8269
  maxLength: external_exports.number().int().positive().max(2e3).optional(),
7698
8270
  classification: FieldClassificationSchema3,
8271
+ /** Override autocapitalize (defaults from `inputType` when omitted). */
8272
+ autoCapitalize: TextInputAutoCapitalizeSchema3.optional(),
8273
+ /** Soft keyboard return key label. */
8274
+ returnKeyType: TextInputReturnKeyTypeSchema3.optional(),
8275
+ /** When to show inline validation errors (default `onBlur`). */
8276
+ validationMode: TextInputValidationModeSchema3.optional(),
7699
8277
  children: external_exports.lazy(() => external_exports.array(lazyLayer53())).optional(),
7700
8278
  /** Typography for the native input's typed text. */
7701
8279
  fieldStyle: TextInputFieldStyleSchema3.optional(),
@@ -7767,6 +8345,221 @@ var WheelPickerLayerSchema3 = external_exports.object({
7767
8345
  style: CommonStyleSchema3.optional(),
7768
8346
  styleBreakpoints: CommonStyleBreakpointsSchema3
7769
8347
  });
8348
+ var DATE_TIME_INPUT_MODES3 = ["date", "time", "datetime"];
8349
+ var NUMBER_STEPPER_BUTTON_ROLES3 = ["decrement", "increment"];
8350
+ var ADDRESS_INPUT_FIELDS3 = [
8351
+ "line1",
8352
+ "line2",
8353
+ "city",
8354
+ "region",
8355
+ "postalCode",
8356
+ "country"
8357
+ ];
8358
+ var lazyLayer63 = () => layerSchemaStore3.schema;
8359
+ var CountryCodeSchema3 = external_exports.string().length(2).regex(/^[A-Za-z]{2}$/u).transform((s) => s.toUpperCase());
8360
+ var DateTimeInputModeSchema3 = external_exports.enum(DATE_TIME_INPUT_MODES3);
8361
+ var DateTimeInputLayerSchema3 = external_exports.object({
8362
+ ...baseLayerShape3,
8363
+ kind: external_exports.literal("date_time_input"),
8364
+ fieldKey: FieldKeySchema3,
8365
+ mode: DateTimeInputModeSchema3.optional(),
8366
+ required: external_exports.boolean().optional(),
8367
+ min: external_exports.string().min(1).max(64).optional(),
8368
+ max: external_exports.string().min(1).max(64).optional(),
8369
+ defaultValue: external_exports.string().min(1).max(64).optional(),
8370
+ placeholder: LocalizedTextSchema4.optional(),
8371
+ classification: FieldClassificationSchema3,
8372
+ children: external_exports.lazy(() => external_exports.array(lazyLayer63())).optional(),
8373
+ fieldStyle: TextInputFieldStyleSchema3.optional(),
8374
+ style: CommonStyleSchema3.optional(),
8375
+ styleBreakpoints: CommonStyleBreakpointsSchema3
8376
+ });
8377
+ var NumberStepperButtonRoleSchema3 = external_exports.enum(NUMBER_STEPPER_BUTTON_ROLES3);
8378
+ var NumberStepperButtonLayerSchema3 = external_exports.object({
8379
+ ...baseLayerShape3,
8380
+ kind: external_exports.literal("number_stepper_button"),
8381
+ role: NumberStepperButtonRoleSchema3,
8382
+ children: external_exports.lazy(() => external_exports.array(lazyLayer63())).optional(),
8383
+ style: CommonStyleSchema3.optional(),
8384
+ styleBreakpoints: CommonStyleBreakpointsSchema3
8385
+ });
8386
+ var NumberStepperValueLayerSchema3 = external_exports.object({
8387
+ ...baseLayerShape3,
8388
+ kind: external_exports.literal("number_stepper_value"),
8389
+ unitLabel: LocalizedTextSchema4.optional(),
8390
+ style: TextStyleSchema3.optional(),
8391
+ styleBreakpoints: TextStyleBreakpointsSchema3
8392
+ });
8393
+ var migrateNumberStepperIncoming3 = (raw) => {
8394
+ if (!raw || typeof raw !== "object") return raw;
8395
+ const o = raw;
8396
+ if (o.kind !== "number_stepper") return raw;
8397
+ if (Array.isArray(o.children) && o.children.length > 0) return raw;
8398
+ const idBase = typeof o.id === "string" ? o.id : "lyr_number_stepper";
8399
+ const slugRaw = idBase.replace(/^lyr_/i, "").replace(/[^a-z0-9_]/gi, "_");
8400
+ const slug = slugRaw.length > 0 ? slugRaw.slice(0, 40) : "stepper";
8401
+ const valueStyle = o.valueStyle && typeof o.valueStyle === "object" ? o.valueStyle : void 0;
8402
+ const buttonColor = o.buttonColor;
8403
+ const mkButton = (role, glyph) => {
8404
+ const suf = role === "decrement" ? "dec" : "inc";
8405
+ return {
8406
+ id: `lyr_${slug}_btn_${suf}`.slice(0, 64),
8407
+ kind: "number_stepper_button",
8408
+ role,
8409
+ style: {
8410
+ width: 36,
8411
+ height: 36,
8412
+ radius: 8
8413
+ },
8414
+ children: [
8415
+ {
8416
+ id: `lyr_${slug}_btn_${suf}_txt`.slice(0, 64),
8417
+ kind: "text",
8418
+ text: { default: glyph },
8419
+ style: {
8420
+ fontSize: 20,
8421
+ align: "center",
8422
+ ...buttonColor !== void 0 ? { color: buttonColor } : {}
8423
+ }
8424
+ }
8425
+ ]
8426
+ };
8427
+ };
8428
+ const valueChild = {
8429
+ id: `lyr_${slug}_value`.slice(0, 64),
8430
+ kind: "number_stepper_value",
8431
+ style: {
8432
+ fontSize: typeof valueStyle?.fontSize === "number" ? valueStyle.fontSize : 14,
8433
+ width: "full",
8434
+ ...typeof valueStyle?.fontFamily === "string" ? { fontFamily: valueStyle.fontFamily } : {},
8435
+ ...typeof valueStyle?.fontWeight === "number" ? { fontWeight: valueStyle.fontWeight } : {},
8436
+ ...valueStyle?.color !== void 0 ? { color: valueStyle.color } : {},
8437
+ ...typeof valueStyle?.lineHeight === "number" ? { lineHeight: valueStyle.lineHeight } : {},
8438
+ ...typeof valueStyle?.letterSpacing === "number" ? { letterSpacing: valueStyle.letterSpacing } : {},
8439
+ ...typeof valueStyle?.opacity === "number" ? { opacity: valueStyle.opacity } : {},
8440
+ align: typeof valueStyle?.align === "string" ? valueStyle.align : "center"
8441
+ }
8442
+ };
8443
+ if (o.unitLabel !== void 0) valueChild.unitLabel = o.unitLabel;
8444
+ const {
8445
+ valueStyle: _vs,
8446
+ buttonColor: _bc,
8447
+ unitLabel: _ul,
8448
+ ...rest
8449
+ } = o;
8450
+ return {
8451
+ ...rest,
8452
+ direction: typeof o.direction === "string" ? o.direction : "horizontal",
8453
+ gap: typeof o.gap === "number" ? o.gap : 12,
8454
+ align: typeof o.align === "string" ? o.align : "center",
8455
+ ...typeof o.distribution === "string" ? { distribution: o.distribution } : {},
8456
+ children: [mkButton("decrement", "-"), valueChild, mkButton("increment", "+")]
8457
+ };
8458
+ };
8459
+ var refineNumberStepperChildren3 = (data, ctx) => {
8460
+ const buttons = data.children.filter((c) => c.kind === "number_stepper_button");
8461
+ const values = data.children.filter((c) => c.kind === "number_stepper_value");
8462
+ const other = data.children.filter(
8463
+ (c) => c.kind !== "number_stepper_button" && c.kind !== "number_stepper_value"
8464
+ );
8465
+ if (other.length > 0) {
8466
+ ctx.addIssue({
8467
+ code: external_exports.ZodIssueCode.custom,
8468
+ message: "number_stepper children must be number_stepper_button or number_stepper_value",
8469
+ path: ["children"]
8470
+ });
8471
+ }
8472
+ const roles = /* @__PURE__ */ new Set();
8473
+ for (const b of buttons) {
8474
+ if (b.kind !== "number_stepper_button") continue;
8475
+ if (roles.has(b.role)) {
8476
+ ctx.addIssue({
8477
+ code: external_exports.ZodIssueCode.custom,
8478
+ message: `duplicate number_stepper_button role "${b.role}"`,
8479
+ path: ["children"]
8480
+ });
8481
+ }
8482
+ roles.add(b.role);
8483
+ }
8484
+ for (const role of NUMBER_STEPPER_BUTTON_ROLES3) {
8485
+ if (!roles.has(role)) {
8486
+ ctx.addIssue({
8487
+ code: external_exports.ZodIssueCode.custom,
8488
+ message: `number_stepper requires a number_stepper_button with role "${role}"`,
8489
+ path: ["children"]
8490
+ });
8491
+ }
8492
+ }
8493
+ if (values.length !== 1) {
8494
+ ctx.addIssue({
8495
+ code: external_exports.ZodIssueCode.custom,
8496
+ message: `number_stepper must have exactly one number_stepper_value (found ${values.length})`,
8497
+ path: ["children"]
8498
+ });
8499
+ }
8500
+ };
8501
+ var NumberStepperLayerSchemaValidated3 = external_exports.object({
8502
+ ...baseLayerShape3,
8503
+ kind: external_exports.literal("number_stepper"),
8504
+ fieldKey: FieldKeySchema3,
8505
+ min: external_exports.number(),
8506
+ max: external_exports.number(),
8507
+ step: external_exports.number().positive().optional(),
8508
+ defaultValue: external_exports.number().optional(),
8509
+ classification: FieldClassificationSchema3,
8510
+ direction: external_exports.enum(["vertical", "horizontal"]).optional(),
8511
+ gap: external_exports.number().int().min(0).max(64).optional(),
8512
+ align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
8513
+ distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
8514
+ children: external_exports.lazy(
8515
+ () => external_exports.array(external_exports.union([NumberStepperButtonLayerSchema3, NumberStepperValueLayerSchema3])).min(1)
8516
+ ),
8517
+ style: CommonStyleSchema3.optional(),
8518
+ styleBreakpoints: CommonStyleBreakpointsSchema3
8519
+ }).superRefine(refineNumberStepperChildren3);
8520
+ var NumberStepperLayerSchema3 = external_exports.preprocess(
8521
+ migrateNumberStepperIncoming3,
8522
+ NumberStepperLayerSchemaValidated3
8523
+ );
8524
+ var PhoneInputLayerSchema3 = external_exports.object({
8525
+ ...baseLayerShape3,
8526
+ kind: external_exports.literal("phone_input"),
8527
+ fieldKey: FieldKeySchema3,
8528
+ defaultCountryCode: CountryCodeSchema3.optional(),
8529
+ allowedCountryCodes: external_exports.array(CountryCodeSchema3).min(1).max(250).optional(),
8530
+ required: external_exports.boolean().optional(),
8531
+ placeholder: LocalizedTextSchema4.optional(),
8532
+ classification: FieldClassificationSchema3,
8533
+ children: external_exports.lazy(() => external_exports.array(lazyLayer63())).optional(),
8534
+ fieldStyle: TextInputFieldStyleSchema3.optional(),
8535
+ style: CommonStyleSchema3.optional(),
8536
+ styleBreakpoints: CommonStyleBreakpointsSchema3
8537
+ });
8538
+ var AddressInputFieldSchema3 = external_exports.enum(ADDRESS_INPUT_FIELDS3);
8539
+ var AddressInputPlaceholdersSchema3 = external_exports.object({
8540
+ line1: LocalizedTextSchema4.optional(),
8541
+ line2: LocalizedTextSchema4.optional(),
8542
+ city: LocalizedTextSchema4.optional(),
8543
+ region: LocalizedTextSchema4.optional(),
8544
+ postalCode: LocalizedTextSchema4.optional(),
8545
+ country: LocalizedTextSchema4.optional()
8546
+ }).partial();
8547
+ var AddressInputLayerSchema3 = external_exports.object({
8548
+ ...baseLayerShape3,
8549
+ kind: external_exports.literal("address_input"),
8550
+ fieldKey: FieldKeySchema3,
8551
+ requiredFields: external_exports.array(AddressInputFieldSchema3).min(1).max(6).optional(),
8552
+ showLine2: external_exports.boolean().optional(),
8553
+ showRegion: external_exports.boolean().optional(),
8554
+ defaultCountryCode: CountryCodeSchema3.optional(),
8555
+ placeholders: AddressInputPlaceholdersSchema3.optional(),
8556
+ classification: FieldClassificationSchema3,
8557
+ children: external_exports.lazy(() => external_exports.array(lazyLayer63())).optional(),
8558
+ fieldStyle: TextInputFieldStyleSchema3.optional(),
8559
+ gap: external_exports.number().int().min(0).max(64).optional(),
8560
+ style: CommonStyleSchema3.optional(),
8561
+ styleBreakpoints: CommonStyleBreakpointsSchema3
8562
+ });
7770
8563
  var CarouselIndicatorsStyleSchema3 = external_exports.object({
7771
8564
  width: external_exports.number().int().min(1).max(64).optional(),
7772
8565
  height: external_exports.number().int().min(1).max(64).optional(),
@@ -7972,6 +8765,12 @@ layerSchemaStore3.schema = external_exports.lazy(
7972
8765
  TextInputLayerSchema3,
7973
8766
  ScaleInputLayerSchema3,
7974
8767
  WheelPickerLayerSchema3,
8768
+ DateTimeInputLayerSchema3,
8769
+ NumberStepperLayerSchema3,
8770
+ NumberStepperButtonLayerSchema3,
8771
+ NumberStepperValueLayerSchema3,
8772
+ PhoneInputLayerSchema3,
8773
+ AddressInputLayerSchema3,
7975
8774
  OAuthLoginLayerSchema3,
7976
8775
  OAuthProviderPresetLayerSchema3,
7977
8776
  OAuthProviderCustomLayerSchema3,
@@ -7996,14 +8795,21 @@ var layerChildren = (layer) => {
7996
8795
  case "oauth_login":
7997
8796
  case "email_password_auth":
7998
8797
  case "email_password_submit":
8798
+ case "number_stepper":
7999
8799
  return layer.children;
8000
8800
  case "carousel":
8001
8801
  return layer.slides;
8002
8802
  case "text_input":
8003
8803
  case "scale_input":
8004
8804
  case "wheel_picker":
8805
+ case "date_time_input":
8806
+ case "phone_input":
8807
+ case "address_input":
8005
8808
  case "email_password_field":
8809
+ case "number_stepper_button":
8006
8810
  return layer.children ?? [];
8811
+ case "number_stepper_value":
8812
+ return [];
8007
8813
  case "oauth_provider":
8008
8814
  return layer.variant === "custom" ? layer.children : [];
8009
8815
  default:
@@ -8041,7 +8847,15 @@ var layerHasAbsolutePositionAuthored = (layer) => {
8041
8847
  case "text_input":
8042
8848
  case "scale_input":
8043
8849
  case "wheel_picker":
8850
+ case "date_time_input":
8851
+ case "number_stepper":
8852
+ case "phone_input":
8853
+ case "address_input":
8044
8854
  return commonStyleHasAbsolutePosition(layer.style, void 0);
8855
+ case "number_stepper_button":
8856
+ return commonStyleHasAbsolutePosition(layer.style, layer.styleBreakpoints);
8857
+ case "number_stepper_value":
8858
+ return commonStyleHasAbsolutePosition(layer.style, layer.styleBreakpoints);
8045
8859
  case "oauth_provider":
8046
8860
  if (layer.variant === "preset") {
8047
8861
  return commonStyleHasAbsolutePosition(layer.style, layer.styleBreakpoints);
@@ -8065,7 +8879,7 @@ var layerHasAbsolutePositionAuthored = (layer) => {
8065
8879
  return false;
8066
8880
  }
8067
8881
  };
8068
- var isInputLayer2 = (l) => l.kind === "single_choice" || l.kind === "multiple_choice" || l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker";
8882
+ var isInputLayer2 = (l) => l.kind === "single_choice" || l.kind === "multiple_choice" || l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker" || l.kind === "date_time_input" || l.kind === "number_stepper" || l.kind === "phone_input" || l.kind === "address_input";
8069
8883
  var ANIMATABLE_PROPERTIES = [
8070
8884
  "opacity",
8071
8885
  "translateX",
@@ -8317,7 +9131,11 @@ var walkScreenLayersWithLayoutContext = (screen, fn) => {
8317
9131
  for (const c of l.children) {
8318
9132
  visit(c, childCtx({ insideChoiceOption: true }));
8319
9133
  }
8320
- } else if (l.kind === "text_input" || l.kind === "scale_input") {
9134
+ } else if (l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker" || l.kind === "date_time_input" || l.kind === "phone_input" || l.kind === "address_input") {
9135
+ for (const c of l.children ?? []) visit(c, childCtx());
9136
+ } else if (l.kind === "number_stepper") {
9137
+ for (const c of l.children) visit(c, childCtx());
9138
+ } else if (l.kind === "number_stepper_button") {
8321
9139
  for (const c of l.children ?? []) visit(c, childCtx());
8322
9140
  } else if (l.kind === "oauth_login") {
8323
9141
  for (const c of l.children) visit(c, childCtx());
@@ -8352,7 +9170,11 @@ var walkScreenLayers = (screen, fn) => {
8352
9170
  else if (l.kind === "hyperlink") l.children.forEach(visit);
8353
9171
  else if (l.kind === "single_choice" || l.kind === "multiple_choice") {
8354
9172
  l.children.forEach(visit);
8355
- } else if (l.kind === "text_input" || l.kind === "scale_input") {
9173
+ } else if (l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker" || l.kind === "date_time_input" || l.kind === "phone_input" || l.kind === "address_input") {
9174
+ l.children?.forEach(visit);
9175
+ } else if (l.kind === "number_stepper") {
9176
+ l.children.forEach(visit);
9177
+ } else if (l.kind === "number_stepper_button") {
8356
9178
  l.children?.forEach(visit);
8357
9179
  } else if (l.kind === "oauth_login") {
8358
9180
  l.children.forEach(visit);
@@ -8422,15 +9244,20 @@ var conditionalFieldScopeViolations = (screen) => {
8422
9244
  return violations;
8423
9245
  };
8424
9246
  var ExternalSurfaceNodeIdSchema = external_exports.string().min(1).max(64).regex(/^surf_[a-z0-9_]+$/i, "external surface node id must look like surf_<id>");
8425
- var NORMALIZED_SURFACE_OUTCOMES = [
9247
+ var IAP_SURFACE_OUTCOMES = [
8426
9248
  "purchase_completed",
8427
9249
  "purchase_cancelled",
8428
9250
  "dismissed",
8429
9251
  "failed",
8430
9252
  "restore_completed"
8431
9253
  ];
9254
+ var NORMALIZED_SURFACE_OUTCOMES = [
9255
+ ...IAP_SURFACE_OUTCOMES,
9256
+ "completed",
9257
+ "back"
9258
+ ];
8432
9259
  var NormalizedSurfaceOutcomeSchema = external_exports.enum(NORMALIZED_SURFACE_OUTCOMES);
8433
- var SurfaceProviderSchema = external_exports.enum(["unspecified", "revenuecat"]);
9260
+ var SurfaceProviderSchema = external_exports.enum(["unspecified", "revenuecat", "superwall", "headless"]);
8434
9261
  var UnspecifiedExternalSurfaceConfigSchema = external_exports.object({
8435
9262
  provider: external_exports.literal("unspecified")
8436
9263
  });
@@ -8441,16 +9268,33 @@ var RevenueCatSurfaceConfigSchema = external_exports.object({
8441
9268
  placementId: external_exports.string().min(1).max(128).optional(),
8442
9269
  presentation: RevenueCatSurfacePresentationSchema.optional()
8443
9270
  });
9271
+ var SuperwallSurfaceConfigSchema = external_exports.object({
9272
+ provider: external_exports.literal("superwall"),
9273
+ placementId: external_exports.string().min(1).max(128).optional()
9274
+ });
9275
+ var ExternalSurfaceHostKeySchema = external_exports.string().min(1).max(64).regex(
9276
+ /^[a-zA-Z][a-zA-Z0-9_]*$/,
9277
+ "host key must start with a letter and contain only letters, digits, or underscores"
9278
+ );
9279
+ var HeadlessExternalSurfaceConfigSchema = external_exports.object({
9280
+ provider: external_exports.literal("headless"),
9281
+ /** Registry key for `Flow` / `FlowView` `externalSurfaces`. Defaults to the node id. */
9282
+ hostKey: ExternalSurfaceHostKeySchema.optional()
9283
+ });
8444
9284
  var ExternalSurfaceConfigSchema = external_exports.discriminatedUnion("provider", [
8445
9285
  UnspecifiedExternalSurfaceConfigSchema,
8446
- RevenueCatSurfaceConfigSchema
9286
+ RevenueCatSurfaceConfigSchema,
9287
+ SuperwallSurfaceConfigSchema,
9288
+ HeadlessExternalSurfaceConfigSchema
8447
9289
  ]);
8448
9290
  var ExternalSurfaceOutcomesMapSchema = external_exports.object({
8449
9291
  purchase_completed: FlowJumpTargetSchema2.optional(),
8450
9292
  purchase_cancelled: FlowJumpTargetSchema2.optional(),
8451
9293
  dismissed: FlowJumpTargetSchema2.optional(),
8452
9294
  failed: FlowJumpTargetSchema2.optional(),
8453
- restore_completed: FlowJumpTargetSchema2.optional()
9295
+ restore_completed: FlowJumpTargetSchema2.optional(),
9296
+ completed: FlowJumpTargetSchema2.optional(),
9297
+ back: FlowJumpTargetSchema2.optional()
8454
9298
  }).strict();
8455
9299
  var ExternalSurfaceNodeSchema = external_exports.object({
8456
9300
  id: ExternalSurfaceNodeIdSchema,
@@ -8461,6 +9305,12 @@ var ExternalSurfaceNodeSchema = external_exports.object({
8461
9305
  /** Required: used for any outcome not in `outcomes` (e.g. provider quirks, unmapped events). */
8462
9306
  fallback: FlowJumpTargetSchema2
8463
9307
  });
9308
+ var resolveExternalSurfaceHostKey = (node) => {
9309
+ if (node.config.provider === "headless" && node.config.hostKey) {
9310
+ return node.config.hostKey;
9311
+ }
9312
+ return node.id;
9313
+ };
8464
9314
  var RESERVED_RC_SDK_KEYS = [
8465
9315
  /** Last RC event observed by the SDK (e.g. `purchase_completed`, `purchase_cancelled`). */
8466
9316
  "onb_rc_last_event",
@@ -8471,7 +9321,18 @@ var RESERVED_RC_SDK_KEYS = [
8471
9321
  /** RevenueCat offering id surfaced by the most recent paywall presentation. */
8472
9322
  "onb_rc_last_offering_id"
8473
9323
  ];
8474
- var RESERVED_SDK_KEYS_SET = new Set(RESERVED_RC_SDK_KEYS);
9324
+ var RESERVED_SUPERWALL_SDK_KEYS = [
9325
+ /** Last Superwall event observed by the SDK (e.g. `purchase_completed`, `dismissed`). */
9326
+ "onb_sw_last_event",
9327
+ /** Product identifier from the most recent successful Superwall purchase. */
9328
+ "onb_sw_last_product_id",
9329
+ /** Placement id from the most recent Superwall registration. */
9330
+ "onb_sw_last_placement_id"
9331
+ ];
9332
+ var RESERVED_SDK_KEYS_SET = /* @__PURE__ */ new Set([
9333
+ ...RESERVED_RC_SDK_KEYS,
9334
+ ...RESERVED_SUPERWALL_SDK_KEYS
9335
+ ]);
8475
9336
  var isReservedSdkKey = (key) => RESERVED_SDK_KEYS_SET.has(key);
8476
9337
  var MANIFEST_SCHEMA_VERSION = 7;
8477
9338
  var ThemeSchema = external_exports.object({
@@ -8710,6 +9571,7 @@ var refineManifestGraph = (manifest, ctx, jumpTargets) => {
8710
9571
  }
8711
9572
  });
8712
9573
  const seenSurfaceId = /* @__PURE__ */ new Set();
9574
+ const seenHostKey = /* @__PURE__ */ new Set();
8713
9575
  manifest.externalSurfaceNodes.forEach((sn, si) => {
8714
9576
  if (seenSurfaceId.has(sn.id)) {
8715
9577
  ctx.addIssue({
@@ -8733,6 +9595,17 @@ var refineManifestGraph = (manifest, ctx, jumpTargets) => {
8733
9595
  path: ["externalSurfaceNodes", si]
8734
9596
  });
8735
9597
  }
9598
+ if (sn.config.provider === "headless") {
9599
+ const hostKey = resolveExternalSurfaceHostKey(sn);
9600
+ if (seenHostKey.has(hostKey)) {
9601
+ ctx.addIssue({
9602
+ code: external_exports.ZodIssueCode.custom,
9603
+ message: `duplicate external surface host key "${hostKey}"`,
9604
+ path: ["externalSurfaceNodes", si, "config", "hostKey"]
9605
+ });
9606
+ }
9607
+ seenHostKey.add(hostKey);
9608
+ }
8736
9609
  for (const [outcome, target] of Object.entries(sn.outcomes)) {
8737
9610
  if (target != null && !jumpTargets.has(target)) {
8738
9611
  ctx.addIssue({
@@ -8841,6 +9714,13 @@ var refineManifestScreens = (manifest, ctx, jumpTargets, screenIds, allFieldKeys
8841
9714
  path: ["screens", screenIdx, "regions"]
8842
9715
  });
8843
9716
  }
9717
+ if ((l.kind === "number_stepper_button" || l.kind === "number_stepper_value") && layoutCtx.parentKind !== "number_stepper") {
9718
+ ctx.addIssue({
9719
+ code: external_exports.ZodIssueCode.custom,
9720
+ message: `Layer "${l.id}" (${l.kind}) must be nested under a number stepper`,
9721
+ path: ["screens", screenIdx, "regions"]
9722
+ });
9723
+ }
8844
9724
  });
8845
9725
  const nextDefault = screen.next.default;
8846
9726
  if (nextDefault && !jumpTargets.has(nextDefault)) {
@@ -9082,15 +9962,21 @@ var RevenueCatIntegrationSchema = external_exports.object({
9082
9962
  defaultOfferingId: external_exports.string(),
9083
9963
  defaultPlacementId: external_exports.string()
9084
9964
  });
9965
+ var SuperwallIntegrationSchema = external_exports.object({
9966
+ enabled: external_exports.boolean(),
9967
+ defaultPlacementId: external_exports.string()
9968
+ });
9085
9969
  var AppsFlyerIntegrationSchema = external_exports.object({
9086
9970
  enabled: external_exports.boolean()
9087
9971
  });
9088
9972
  var ResolvedAppIntegrationsSchema = external_exports.object({
9089
9973
  revenuecat: RevenueCatIntegrationSchema,
9974
+ superwall: SuperwallIntegrationSchema,
9090
9975
  appsflyer: AppsFlyerIntegrationSchema
9091
9976
  });
9092
9977
  var AppIntegrationsSchema = external_exports.object({
9093
9978
  revenuecat: RevenueCatIntegrationSchema.partial().optional(),
9979
+ superwall: SuperwallIntegrationSchema.partial().optional(),
9094
9980
  appsflyer: AppsFlyerIntegrationSchema.partial().optional()
9095
9981
  }).passthrough();
9096
9982
  var DASHBOARD_ATTRIBUTION_INTEGRATION_PROVIDER_IDS = ["appsflyer"];
@@ -9272,14 +10158,14 @@ var SdkEventBatchSchema = external_exports.object({
9272
10158
  var IapPurchasePeriodTypeSchema = external_exports.enum(["normal", "intro", "trial"]);
9273
10159
  var IapPurchaseEventPropertiesSchema = external_exports.object({
9274
10160
  /** External surface provider that produced the purchase. */
9275
- provider: external_exports.literal("revenuecat"),
10161
+ provider: external_exports.enum(["revenuecat", "superwall"]),
9276
10162
  /** Manifest node id of the surface (e.g. `surf_paywall_welcome`). */
9277
10163
  surface_node_id: external_exports.string().min(1).max(128),
9278
10164
  /** Store product identifier (e.g. `pro_annual`). */
9279
10165
  product_id: external_exports.string().min(1).max(256),
9280
- /** Optional RevenueCat offering id (manifest config or RC metadata). */
10166
+ /** Optional offering id (RevenueCat) or placement id mirrored for analytics. */
9281
10167
  offering_id: external_exports.string().min(1).max(128).optional(),
9282
- /** Optional RevenueCat package identifier within the offering (e.g. `$rc_annual`). */
10168
+ /** Optional package identifier within an offering (e.g. `$rc_annual`). */
9283
10169
  package_id: external_exports.string().min(1).max(128).optional(),
9284
10170
  /** Localized gross store price at purchase time (non-negative). */
9285
10171
  price: external_exports.number().nonnegative().optional(),
@@ -9811,11 +10697,11 @@ var OAuthPresetButtonChromeBreakpointsSchema4 = external_exports.object({
9811
10697
  }).partial().optional();
9812
10698
  var EMAIL_PASSWORD_AUTH_MODES4 = ["sign_in", "sign_up"];
9813
10699
  var EMAIL_PASSWORD_SLOTS4 = ["email", "password", "confirm"];
9814
- var lazyLayer8 = () => layerSchemaStore4.schema;
10700
+ var lazyLayer9 = () => layerSchemaStore4.schema;
9815
10701
  var ButtonLayerSchema4 = external_exports.object({
9816
10702
  ...baseLayerShape4,
9817
10703
  kind: external_exports.literal("button"),
9818
- children: external_exports.lazy(() => external_exports.array(lazyLayer8())),
10704
+ children: external_exports.lazy(() => external_exports.array(lazyLayer9())),
9819
10705
  action: ButtonActionSchema4,
9820
10706
  variant: ButtonLayerVariantSchema4,
9821
10707
  direction: external_exports.enum(["vertical", "horizontal"]).optional(),
@@ -9829,7 +10715,7 @@ var ButtonLayerSchema4 = external_exports.object({
9829
10715
  var BackButtonLayerSchema4 = external_exports.object({
9830
10716
  ...baseLayerShape4,
9831
10717
  kind: external_exports.literal("back_button"),
9832
- children: external_exports.lazy(() => external_exports.array(lazyLayer8())),
10718
+ children: external_exports.lazy(() => external_exports.array(lazyLayer9())),
9833
10719
  variant: ButtonLayerVariantSchema4,
9834
10720
  direction: external_exports.enum(["vertical", "horizontal"]).optional(),
9835
10721
  gap: external_exports.number().int().min(0).optional(),
@@ -10216,6 +11102,22 @@ var FieldKeySchema5 = external_exports.string().min(1).max(64).regex(FIELD_KEY_R
10216
11102
  var FieldClassificationSchema5 = external_exports.enum(FIELD_CLASSIFICATIONS5);
10217
11103
  var lazyLayer44 = () => layerSchemaStore4.schema;
10218
11104
  var EmailPasswordAuthModeSchema4 = external_exports.enum(EMAIL_PASSWORD_AUTH_MODES4);
11105
+ var PasswordRulesSchema4 = external_exports.object({
11106
+ minLength: external_exports.number().int().min(4).max(128).optional(),
11107
+ maxLength: external_exports.number().int().min(4).max(128).optional(),
11108
+ requireUppercase: external_exports.boolean().optional(),
11109
+ requireLowercase: external_exports.boolean().optional(),
11110
+ requireDigit: external_exports.boolean().optional(),
11111
+ requireSpecial: external_exports.boolean().optional()
11112
+ }).strict().superRefine((data, ctx) => {
11113
+ if (data.minLength !== void 0 && data.maxLength !== void 0 && data.maxLength < data.minLength) {
11114
+ ctx.addIssue({
11115
+ code: external_exports.ZodIssueCode.custom,
11116
+ message: "passwordRules.maxLength must be >= minLength",
11117
+ path: ["maxLength"]
11118
+ });
11119
+ }
11120
+ });
10219
11121
  var migrateEmailPasswordAuthIncoming4 = (raw) => {
10220
11122
  if (!raw || typeof raw !== "object") return raw;
10221
11123
  const o = raw;
@@ -10332,7 +11234,10 @@ var EmailPasswordAuthLayerSchemaValidated4 = external_exports.object({
10332
11234
  kind: external_exports.literal("email_password_auth"),
10333
11235
  mode: EmailPasswordAuthModeSchema4,
10334
11236
  fieldKey: FieldKeySchema5,
11237
+ /** @deprecated Prefer `passwordRules.minLength`. Kept for backward compatibility. */
10335
11238
  minPasswordLength: external_exports.number().int().min(4).max(128).optional(),
11239
+ /** Composition rules beyond minimum length (uppercase, digit, special, max). */
11240
+ passwordRules: PasswordRulesSchema4.optional(),
10336
11241
  children: external_exports.lazy(
10337
11242
  () => external_exports.array(external_exports.union([EmailPasswordFieldLayerSchema4, EmailPasswordSubmitLayerSchema4])).min(1)
10338
11243
  ),
@@ -10403,16 +11308,39 @@ var TextInputFieldStyleSchema4 = external_exports.object({
10403
11308
  letterSpacing: external_exports.number().min(-0.5).max(1).optional(),
10404
11309
  opacity: external_exports.number().min(0).max(1).optional()
10405
11310
  }).partial();
11311
+ var TextInputAutoCapitalizeSchema4 = external_exports.enum([
11312
+ "none",
11313
+ "sentences",
11314
+ "words",
11315
+ "characters"
11316
+ ]);
11317
+ var TextInputReturnKeyTypeSchema4 = external_exports.enum([
11318
+ "done",
11319
+ "next",
11320
+ "go",
11321
+ "send",
11322
+ "search",
11323
+ "default"
11324
+ ]);
11325
+ var TextInputValidationModeSchema4 = external_exports.enum(["onBlur", "onSubmit", "live"]);
10406
11326
  var TextInputLayerSchema4 = external_exports.object({
10407
11327
  ...baseLayerShape4,
10408
11328
  kind: external_exports.literal("text_input"),
10409
11329
  fieldKey: FieldKeySchema5,
10410
11330
  placeholder: LocalizedTextSchema5.optional(),
11331
+ /** Optional helper copy shown under the field when valid / untouched. */
11332
+ helperText: LocalizedTextSchema5.optional(),
10411
11333
  inputType: TextInputTypeSchema4.optional(),
10412
11334
  required: external_exports.boolean().optional(),
10413
11335
  minLength: external_exports.number().int().min(0).max(2e3).optional(),
10414
11336
  maxLength: external_exports.number().int().positive().max(2e3).optional(),
10415
11337
  classification: FieldClassificationSchema5,
11338
+ /** Override autocapitalize (defaults from `inputType` when omitted). */
11339
+ autoCapitalize: TextInputAutoCapitalizeSchema4.optional(),
11340
+ /** Soft keyboard return key label. */
11341
+ returnKeyType: TextInputReturnKeyTypeSchema4.optional(),
11342
+ /** When to show inline validation errors (default `onBlur`). */
11343
+ validationMode: TextInputValidationModeSchema4.optional(),
10416
11344
  children: external_exports.lazy(() => external_exports.array(lazyLayer54())).optional(),
10417
11345
  /** Typography for the native input's typed text. */
10418
11346
  fieldStyle: TextInputFieldStyleSchema4.optional(),
@@ -10484,6 +11412,221 @@ var WheelPickerLayerSchema4 = external_exports.object({
10484
11412
  style: CommonStyleSchema4.optional(),
10485
11413
  styleBreakpoints: CommonStyleBreakpointsSchema4
10486
11414
  });
11415
+ var DATE_TIME_INPUT_MODES4 = ["date", "time", "datetime"];
11416
+ var NUMBER_STEPPER_BUTTON_ROLES4 = ["decrement", "increment"];
11417
+ var ADDRESS_INPUT_FIELDS4 = [
11418
+ "line1",
11419
+ "line2",
11420
+ "city",
11421
+ "region",
11422
+ "postalCode",
11423
+ "country"
11424
+ ];
11425
+ var lazyLayer64 = () => layerSchemaStore4.schema;
11426
+ var CountryCodeSchema4 = external_exports.string().length(2).regex(/^[A-Za-z]{2}$/u).transform((s) => s.toUpperCase());
11427
+ var DateTimeInputModeSchema4 = external_exports.enum(DATE_TIME_INPUT_MODES4);
11428
+ var DateTimeInputLayerSchema4 = external_exports.object({
11429
+ ...baseLayerShape4,
11430
+ kind: external_exports.literal("date_time_input"),
11431
+ fieldKey: FieldKeySchema5,
11432
+ mode: DateTimeInputModeSchema4.optional(),
11433
+ required: external_exports.boolean().optional(),
11434
+ min: external_exports.string().min(1).max(64).optional(),
11435
+ max: external_exports.string().min(1).max(64).optional(),
11436
+ defaultValue: external_exports.string().min(1).max(64).optional(),
11437
+ placeholder: LocalizedTextSchema5.optional(),
11438
+ classification: FieldClassificationSchema5,
11439
+ children: external_exports.lazy(() => external_exports.array(lazyLayer64())).optional(),
11440
+ fieldStyle: TextInputFieldStyleSchema4.optional(),
11441
+ style: CommonStyleSchema4.optional(),
11442
+ styleBreakpoints: CommonStyleBreakpointsSchema4
11443
+ });
11444
+ var NumberStepperButtonRoleSchema4 = external_exports.enum(NUMBER_STEPPER_BUTTON_ROLES4);
11445
+ var NumberStepperButtonLayerSchema4 = external_exports.object({
11446
+ ...baseLayerShape4,
11447
+ kind: external_exports.literal("number_stepper_button"),
11448
+ role: NumberStepperButtonRoleSchema4,
11449
+ children: external_exports.lazy(() => external_exports.array(lazyLayer64())).optional(),
11450
+ style: CommonStyleSchema4.optional(),
11451
+ styleBreakpoints: CommonStyleBreakpointsSchema4
11452
+ });
11453
+ var NumberStepperValueLayerSchema4 = external_exports.object({
11454
+ ...baseLayerShape4,
11455
+ kind: external_exports.literal("number_stepper_value"),
11456
+ unitLabel: LocalizedTextSchema5.optional(),
11457
+ style: TextStyleSchema4.optional(),
11458
+ styleBreakpoints: TextStyleBreakpointsSchema4
11459
+ });
11460
+ var migrateNumberStepperIncoming4 = (raw) => {
11461
+ if (!raw || typeof raw !== "object") return raw;
11462
+ const o = raw;
11463
+ if (o.kind !== "number_stepper") return raw;
11464
+ if (Array.isArray(o.children) && o.children.length > 0) return raw;
11465
+ const idBase = typeof o.id === "string" ? o.id : "lyr_number_stepper";
11466
+ const slugRaw = idBase.replace(/^lyr_/i, "").replace(/[^a-z0-9_]/gi, "_");
11467
+ const slug = slugRaw.length > 0 ? slugRaw.slice(0, 40) : "stepper";
11468
+ const valueStyle = o.valueStyle && typeof o.valueStyle === "object" ? o.valueStyle : void 0;
11469
+ const buttonColor = o.buttonColor;
11470
+ const mkButton = (role, glyph) => {
11471
+ const suf = role === "decrement" ? "dec" : "inc";
11472
+ return {
11473
+ id: `lyr_${slug}_btn_${suf}`.slice(0, 64),
11474
+ kind: "number_stepper_button",
11475
+ role,
11476
+ style: {
11477
+ width: 36,
11478
+ height: 36,
11479
+ radius: 8
11480
+ },
11481
+ children: [
11482
+ {
11483
+ id: `lyr_${slug}_btn_${suf}_txt`.slice(0, 64),
11484
+ kind: "text",
11485
+ text: { default: glyph },
11486
+ style: {
11487
+ fontSize: 20,
11488
+ align: "center",
11489
+ ...buttonColor !== void 0 ? { color: buttonColor } : {}
11490
+ }
11491
+ }
11492
+ ]
11493
+ };
11494
+ };
11495
+ const valueChild = {
11496
+ id: `lyr_${slug}_value`.slice(0, 64),
11497
+ kind: "number_stepper_value",
11498
+ style: {
11499
+ fontSize: typeof valueStyle?.fontSize === "number" ? valueStyle.fontSize : 14,
11500
+ width: "full",
11501
+ ...typeof valueStyle?.fontFamily === "string" ? { fontFamily: valueStyle.fontFamily } : {},
11502
+ ...typeof valueStyle?.fontWeight === "number" ? { fontWeight: valueStyle.fontWeight } : {},
11503
+ ...valueStyle?.color !== void 0 ? { color: valueStyle.color } : {},
11504
+ ...typeof valueStyle?.lineHeight === "number" ? { lineHeight: valueStyle.lineHeight } : {},
11505
+ ...typeof valueStyle?.letterSpacing === "number" ? { letterSpacing: valueStyle.letterSpacing } : {},
11506
+ ...typeof valueStyle?.opacity === "number" ? { opacity: valueStyle.opacity } : {},
11507
+ align: typeof valueStyle?.align === "string" ? valueStyle.align : "center"
11508
+ }
11509
+ };
11510
+ if (o.unitLabel !== void 0) valueChild.unitLabel = o.unitLabel;
11511
+ const {
11512
+ valueStyle: _vs,
11513
+ buttonColor: _bc,
11514
+ unitLabel: _ul,
11515
+ ...rest
11516
+ } = o;
11517
+ return {
11518
+ ...rest,
11519
+ direction: typeof o.direction === "string" ? o.direction : "horizontal",
11520
+ gap: typeof o.gap === "number" ? o.gap : 12,
11521
+ align: typeof o.align === "string" ? o.align : "center",
11522
+ ...typeof o.distribution === "string" ? { distribution: o.distribution } : {},
11523
+ children: [mkButton("decrement", "-"), valueChild, mkButton("increment", "+")]
11524
+ };
11525
+ };
11526
+ var refineNumberStepperChildren4 = (data, ctx) => {
11527
+ const buttons = data.children.filter((c) => c.kind === "number_stepper_button");
11528
+ const values = data.children.filter((c) => c.kind === "number_stepper_value");
11529
+ const other = data.children.filter(
11530
+ (c) => c.kind !== "number_stepper_button" && c.kind !== "number_stepper_value"
11531
+ );
11532
+ if (other.length > 0) {
11533
+ ctx.addIssue({
11534
+ code: external_exports.ZodIssueCode.custom,
11535
+ message: "number_stepper children must be number_stepper_button or number_stepper_value",
11536
+ path: ["children"]
11537
+ });
11538
+ }
11539
+ const roles = /* @__PURE__ */ new Set();
11540
+ for (const b of buttons) {
11541
+ if (b.kind !== "number_stepper_button") continue;
11542
+ if (roles.has(b.role)) {
11543
+ ctx.addIssue({
11544
+ code: external_exports.ZodIssueCode.custom,
11545
+ message: `duplicate number_stepper_button role "${b.role}"`,
11546
+ path: ["children"]
11547
+ });
11548
+ }
11549
+ roles.add(b.role);
11550
+ }
11551
+ for (const role of NUMBER_STEPPER_BUTTON_ROLES4) {
11552
+ if (!roles.has(role)) {
11553
+ ctx.addIssue({
11554
+ code: external_exports.ZodIssueCode.custom,
11555
+ message: `number_stepper requires a number_stepper_button with role "${role}"`,
11556
+ path: ["children"]
11557
+ });
11558
+ }
11559
+ }
11560
+ if (values.length !== 1) {
11561
+ ctx.addIssue({
11562
+ code: external_exports.ZodIssueCode.custom,
11563
+ message: `number_stepper must have exactly one number_stepper_value (found ${values.length})`,
11564
+ path: ["children"]
11565
+ });
11566
+ }
11567
+ };
11568
+ var NumberStepperLayerSchemaValidated4 = external_exports.object({
11569
+ ...baseLayerShape4,
11570
+ kind: external_exports.literal("number_stepper"),
11571
+ fieldKey: FieldKeySchema5,
11572
+ min: external_exports.number(),
11573
+ max: external_exports.number(),
11574
+ step: external_exports.number().positive().optional(),
11575
+ defaultValue: external_exports.number().optional(),
11576
+ classification: FieldClassificationSchema5,
11577
+ direction: external_exports.enum(["vertical", "horizontal"]).optional(),
11578
+ gap: external_exports.number().int().min(0).max(64).optional(),
11579
+ align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
11580
+ distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
11581
+ children: external_exports.lazy(
11582
+ () => external_exports.array(external_exports.union([NumberStepperButtonLayerSchema4, NumberStepperValueLayerSchema4])).min(1)
11583
+ ),
11584
+ style: CommonStyleSchema4.optional(),
11585
+ styleBreakpoints: CommonStyleBreakpointsSchema4
11586
+ }).superRefine(refineNumberStepperChildren4);
11587
+ var NumberStepperLayerSchema4 = external_exports.preprocess(
11588
+ migrateNumberStepperIncoming4,
11589
+ NumberStepperLayerSchemaValidated4
11590
+ );
11591
+ var PhoneInputLayerSchema4 = external_exports.object({
11592
+ ...baseLayerShape4,
11593
+ kind: external_exports.literal("phone_input"),
11594
+ fieldKey: FieldKeySchema5,
11595
+ defaultCountryCode: CountryCodeSchema4.optional(),
11596
+ allowedCountryCodes: external_exports.array(CountryCodeSchema4).min(1).max(250).optional(),
11597
+ required: external_exports.boolean().optional(),
11598
+ placeholder: LocalizedTextSchema5.optional(),
11599
+ classification: FieldClassificationSchema5,
11600
+ children: external_exports.lazy(() => external_exports.array(lazyLayer64())).optional(),
11601
+ fieldStyle: TextInputFieldStyleSchema4.optional(),
11602
+ style: CommonStyleSchema4.optional(),
11603
+ styleBreakpoints: CommonStyleBreakpointsSchema4
11604
+ });
11605
+ var AddressInputFieldSchema4 = external_exports.enum(ADDRESS_INPUT_FIELDS4);
11606
+ var AddressInputPlaceholdersSchema4 = external_exports.object({
11607
+ line1: LocalizedTextSchema5.optional(),
11608
+ line2: LocalizedTextSchema5.optional(),
11609
+ city: LocalizedTextSchema5.optional(),
11610
+ region: LocalizedTextSchema5.optional(),
11611
+ postalCode: LocalizedTextSchema5.optional(),
11612
+ country: LocalizedTextSchema5.optional()
11613
+ }).partial();
11614
+ var AddressInputLayerSchema4 = external_exports.object({
11615
+ ...baseLayerShape4,
11616
+ kind: external_exports.literal("address_input"),
11617
+ fieldKey: FieldKeySchema5,
11618
+ requiredFields: external_exports.array(AddressInputFieldSchema4).min(1).max(6).optional(),
11619
+ showLine2: external_exports.boolean().optional(),
11620
+ showRegion: external_exports.boolean().optional(),
11621
+ defaultCountryCode: CountryCodeSchema4.optional(),
11622
+ placeholders: AddressInputPlaceholdersSchema4.optional(),
11623
+ classification: FieldClassificationSchema5,
11624
+ children: external_exports.lazy(() => external_exports.array(lazyLayer64())).optional(),
11625
+ fieldStyle: TextInputFieldStyleSchema4.optional(),
11626
+ gap: external_exports.number().int().min(0).max(64).optional(),
11627
+ style: CommonStyleSchema4.optional(),
11628
+ styleBreakpoints: CommonStyleBreakpointsSchema4
11629
+ });
10487
11630
  var CarouselIndicatorsStyleSchema4 = external_exports.object({
10488
11631
  width: external_exports.number().int().min(1).max(64).optional(),
10489
11632
  height: external_exports.number().int().min(1).max(64).optional(),
@@ -10618,6 +11761,12 @@ layerSchemaStore4.schema = external_exports.lazy(
10618
11761
  TextInputLayerSchema4,
10619
11762
  ScaleInputLayerSchema4,
10620
11763
  WheelPickerLayerSchema4,
11764
+ DateTimeInputLayerSchema4,
11765
+ NumberStepperLayerSchema4,
11766
+ NumberStepperButtonLayerSchema4,
11767
+ NumberStepperValueLayerSchema4,
11768
+ PhoneInputLayerSchema4,
11769
+ AddressInputLayerSchema4,
10621
11770
  OAuthLoginLayerSchema4,
10622
11771
  OAuthProviderPresetLayerSchema4,
10623
11772
  OAuthProviderCustomLayerSchema4,
@@ -10856,7 +12005,7 @@ var walkLayers = (root, fn) => {
10856
12005
  else if (l.kind === "hyperlink") l.children.forEach((c) => visit(c, depth + 1));
10857
12006
  else if (l.kind === "single_choice" || l.kind === "multiple_choice") {
10858
12007
  l.children.forEach((c) => visit(c, depth + 1));
10859
- } else if (l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker") {
12008
+ } else if (l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker" || l.kind === "date_time_input" || l.kind === "phone_input" || l.kind === "address_input") {
10860
12009
  l.children?.forEach((c) => visit(c, depth + 1));
10861
12010
  } else if (l.kind === "oauth_login") {
10862
12011
  l.children.forEach((c) => visit(c, depth + 1));
@@ -10868,6 +12017,10 @@ var walkLayers = (root, fn) => {
10868
12017
  l.children?.forEach((c) => visit(c, depth + 1));
10869
12018
  } else if (l.kind === "email_password_submit") {
10870
12019
  l.children.forEach((c) => visit(c, depth + 1));
12020
+ } else if (l.kind === "number_stepper") {
12021
+ l.children.forEach((c) => visit(c, depth + 1));
12022
+ } else if (l.kind === "number_stepper_button") {
12023
+ l.children?.forEach((c) => visit(c, depth + 1));
10871
12024
  }
10872
12025
  };
10873
12026
  visit(root, 0);
@@ -11099,6 +12252,7 @@ var validatePublishable = (manifest) => {
11099
12252
  }
11100
12253
  return { ok: issues.length === 0, issues, warnings };
11101
12254
  };
12255
+ var isManualSubmitKind = (kind) => MANUAL_SUBMIT_INPUT_KINDS.includes(kind);
11102
12256
  var FIELD_KEY_RE6 = /^[a-z][a-z0-9_]*$/;
11103
12257
  var styleBucketHasColor = (s) => s !== void 0 && s.color !== void 0;
11104
12258
  var textLayerHasAuthoringColor = (l) => {
@@ -11204,7 +12358,7 @@ var collectFlowBuilderIssues = (manifest) => {
11204
12358
  }
11205
12359
  if (isInputLayer(l)) {
11206
12360
  inputCount += 1;
11207
- if (l.kind === "multiple_choice" || l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker") {
12361
+ if (isManualSubmitKind(l.kind)) {
11208
12362
  needsManualSubmit = true;
11209
12363
  }
11210
12364
  const key = l.fieldKey;
@@ -11401,7 +12555,7 @@ var collectFlowBuilderIssues = (manifest) => {
11401
12555
  }
11402
12556
  if (needsManualSubmit && !hasContinueButton) {
11403
12557
  issues.push(
11404
- `Screen "${screen.name || screen.id}" has a multiple_choice, text_input, scale_input, or wheel_picker but no Button with action "continue". Add a Continue button so users can submit.`
12558
+ `Screen "${screen.name || screen.id}" has a manual-submit input (text, scale, wheel, date/time, stepper, phone, address, or multiple choice) but no Button with action "continue". Add a Continue button so users can submit.`
11405
12559
  );
11406
12560
  }
11407
12561
  }
@@ -11646,6 +12800,20 @@ var scanLayer = (issues, screen, layer, branding) => {
11646
12800
  branding
11647
12801
  );
11648
12802
  return;
12803
+ case "date_time_input":
12804
+ case "phone_input":
12805
+ case "address_input":
12806
+ walkCommonBreakpoints(issues, stepId, id, layer.style, void 0, branding);
12807
+ return;
12808
+ case "number_stepper":
12809
+ walkCommonBreakpoints(issues, stepId, id, layer.style, layer.styleBreakpoints, branding);
12810
+ return;
12811
+ case "number_stepper_button":
12812
+ walkCommonBreakpoints(issues, stepId, id, layer.style, layer.styleBreakpoints, branding);
12813
+ return;
12814
+ case "number_stepper_value":
12815
+ walkTextBreakpoints(issues, stepId, id, layer.style, layer.styleBreakpoints, branding);
12816
+ return;
11649
12817
  case "oauth_login":
11650
12818
  walkCommonBreakpoints(issues, stepId, id, layer.style, layer.styleBreakpoints, branding);
11651
12819
  return;
@@ -11731,6 +12899,62 @@ var RESTING_MOTION_KEYFRAMES_CSS = `
11731
12899
  100% { transform: rotate(var(--ob-rm-rotate-peak, 5deg)); }
11732
12900
  }
11733
12901
  `.trim();
12902
+ var COUNTRY_DIAL_ENTRIES = [
12903
+ { code: "US", dial: "1", label: "United States" },
12904
+ { code: "CA", dial: "1", label: "Canada" },
12905
+ { code: "GB", dial: "44", label: "United Kingdom" },
12906
+ { code: "AU", dial: "61", label: "Australia" },
12907
+ { code: "NZ", dial: "64", label: "New Zealand" },
12908
+ { code: "IE", dial: "353", label: "Ireland" },
12909
+ { code: "DE", dial: "49", label: "Germany" },
12910
+ { code: "FR", dial: "33", label: "France" },
12911
+ { code: "ES", dial: "34", label: "Spain" },
12912
+ { code: "IT", dial: "39", label: "Italy" },
12913
+ { code: "PT", dial: "351", label: "Portugal" },
12914
+ { code: "NL", dial: "31", label: "Netherlands" },
12915
+ { code: "BE", dial: "32", label: "Belgium" },
12916
+ { code: "CH", dial: "41", label: "Switzerland" },
12917
+ { code: "AT", dial: "43", label: "Austria" },
12918
+ { code: "SE", dial: "46", label: "Sweden" },
12919
+ { code: "NO", dial: "47", label: "Norway" },
12920
+ { code: "DK", dial: "45", label: "Denmark" },
12921
+ { code: "FI", dial: "358", label: "Finland" },
12922
+ { code: "PL", dial: "48", label: "Poland" },
12923
+ { code: "CZ", dial: "420", label: "Czechia" },
12924
+ { code: "RO", dial: "40", label: "Romania" },
12925
+ { code: "HU", dial: "36", label: "Hungary" },
12926
+ { code: "GR", dial: "30", label: "Greece" },
12927
+ { code: "TR", dial: "90", label: "Turkey" },
12928
+ { code: "UA", dial: "380", label: "Ukraine" },
12929
+ { code: "RU", dial: "7", label: "Russia" },
12930
+ { code: "IN", dial: "91", label: "India" },
12931
+ { code: "PK", dial: "92", label: "Pakistan" },
12932
+ { code: "BD", dial: "880", label: "Bangladesh" },
12933
+ { code: "JP", dial: "81", label: "Japan" },
12934
+ { code: "KR", dial: "82", label: "South Korea" },
12935
+ { code: "CN", dial: "86", label: "China" },
12936
+ { code: "TW", dial: "886", label: "Taiwan" },
12937
+ { code: "HK", dial: "852", label: "Hong Kong" },
12938
+ { code: "SG", dial: "65", label: "Singapore" },
12939
+ { code: "MY", dial: "60", label: "Malaysia" },
12940
+ { code: "TH", dial: "66", label: "Thailand" },
12941
+ { code: "VN", dial: "84", label: "Vietnam" },
12942
+ { code: "PH", dial: "63", label: "Philippines" },
12943
+ { code: "ID", dial: "62", label: "Indonesia" },
12944
+ { code: "BR", dial: "55", label: "Brazil" },
12945
+ { code: "MX", dial: "52", label: "Mexico" },
12946
+ { code: "AR", dial: "54", label: "Argentina" },
12947
+ { code: "CL", dial: "56", label: "Chile" },
12948
+ { code: "CO", dial: "57", label: "Colombia" },
12949
+ { code: "PE", dial: "51", label: "Peru" },
12950
+ { code: "ZA", dial: "27", label: "South Africa" },
12951
+ { code: "NG", dial: "234", label: "Nigeria" },
12952
+ { code: "EG", dial: "20", label: "Egypt" },
12953
+ { code: "IL", dial: "972", label: "Israel" },
12954
+ { code: "AE", dial: "971", label: "United Arab Emirates" },
12955
+ { code: "SA", dial: "966", label: "Saudi Arabia" }
12956
+ ];
12957
+ var byCode = new Map(COUNTRY_DIAL_ENTRIES.map((e) => [e.code, e]));
11734
12958
  var extractLiquidTemplateBodies = (s) => {
11735
12959
  const out = [];
11736
12960
  let i = 0;
@@ -12009,6 +13233,8 @@ var GAP_BY_KIND = {
12009
13233
  oauth_login: 8,
12010
13234
  email_password_auth: 8,
12011
13235
  email_password_submit: 8,
13236
+ number_stepper: 12,
13237
+ address_input: 8,
12012
13238
  button: 8,
12013
13239
  back_button: 8,
12014
13240
  oauth_provider: 8,
@@ -12060,13 +13286,21 @@ var defaultLayoutStyleForKind = (kind) => {
12060
13286
  case "oauth_provider":
12061
13287
  case "email_password_submit":
12062
13288
  return LAYOUT_FULL_HUG;
13289
+ case "number_stepper_button":
13290
+ return LAYOUT_HUG_HUG;
12063
13291
  case "text_input":
12064
13292
  case "scale_input":
12065
13293
  case "wheel_picker":
13294
+ case "date_time_input":
13295
+ case "number_stepper":
13296
+ case "phone_input":
13297
+ case "address_input":
12066
13298
  case "email_password_auth":
12067
13299
  case "email_password_field":
12068
13300
  case "oauth_login":
12069
13301
  return LAYOUT_FULL_FILL;
13302
+ case "number_stepper_value":
13303
+ return LAYOUT_FULL_HUG;
12070
13304
  case "progress":
12071
13305
  return LAYOUT_PROGRESS;
12072
13306
  case "loader":
@@ -12278,7 +13512,7 @@ var walkLayers2 = (root, fn) => {
12278
13512
  else if (l.kind === "hyperlink") l.children.forEach((c) => visit(c, depth + 1));
12279
13513
  else if (l.kind === "single_choice" || l.kind === "multiple_choice") {
12280
13514
  l.children.forEach((c) => visit(c, depth + 1));
12281
- } else if (l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker") {
13515
+ } else if (l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker" || l.kind === "date_time_input" || l.kind === "phone_input" || l.kind === "address_input") {
12282
13516
  l.children?.forEach((c) => visit(c, depth + 1));
12283
13517
  } else if (l.kind === "oauth_login") {
12284
13518
  l.children.forEach((c) => visit(c, depth + 1));
@@ -12290,6 +13524,10 @@ var walkLayers2 = (root, fn) => {
12290
13524
  l.children?.forEach((c) => visit(c, depth + 1));
12291
13525
  } else if (l.kind === "email_password_submit") {
12292
13526
  l.children.forEach((c) => visit(c, depth + 1));
13527
+ } else if (l.kind === "number_stepper") {
13528
+ l.children.forEach((c) => visit(c, depth + 1));
13529
+ } else if (l.kind === "number_stepper_button") {
13530
+ l.children?.forEach((c) => visit(c, depth + 1));
12293
13531
  }
12294
13532
  };
12295
13533
  visit(root, 0);
@@ -12355,6 +13593,10 @@ var IMPORT_PUBLISH_INTEGRATIONS = {
12355
13593
  defaultOfferingId: "default",
12356
13594
  defaultPlacementId: ""
12357
13595
  },
13596
+ superwall: {
13597
+ enabled: true,
13598
+ defaultPlacementId: "campaign_trigger"
13599
+ },
12358
13600
  appsflyer: { enabled: false }
12359
13601
  };
12360
13602
  var toBlocking = (issues, fixForCode) => issues.map((issue) => ({
@@ -12431,11 +13673,14 @@ var fixForBuilderMessage = (message) => {
12431
13673
  if (message.includes("RevenueCat")) {
12432
13674
  return "Enable RevenueCat in App settings \u2192 Integrations, or remove RevenueCat external surfaces from the import manifest.";
12433
13675
  }
13676
+ if (message.includes("Superwall")) {
13677
+ return "Enable Superwall in App settings \u2192 Integrations, or remove Superwall external surfaces from the import manifest.";
13678
+ }
12434
13679
  if (message.includes("integration provider")) {
12435
- return "Set externalSurfaceNodes[].config.provider to a real provider (e.g. revenuecat), not unspecified.";
13680
+ return "Set externalSurfaceNodes[].config.provider to a real provider (e.g. revenuecat or superwall), not unspecified.";
12436
13681
  }
12437
13682
  if (message.includes("Fallback edge")) {
12438
- return "Connect every external surface fallback to the next screen/decision/surface when the paywall dismisses or fails.";
13683
+ return "Connect every external surface fallback to the next screen/decision/surface when no specific outcome is mapped.";
12439
13684
  }
12440
13685
  return `Resolve builder publish rule: ${message}`;
12441
13686
  };
@@ -12449,7 +13694,7 @@ var collectIntegrationIssues = (manifest, integrations) => {
12449
13694
  }
12450
13695
  if (node.fallback == null) {
12451
13696
  issues.push(
12452
- `External surface "${node.name ?? node.id}" needs a connected Fallback edge \u2014 every paywall must route somewhere when no specific outcome is mapped.`
13697
+ `External surface "${node.name ?? node.id}" needs a connected Fallback edge \u2014 every external surface must route somewhere when no specific outcome is mapped.`
12453
13698
  );
12454
13699
  }
12455
13700
  if (node.config.provider === "revenuecat" && !integrations.revenuecat.enabled) {
@@ -12457,6 +13702,11 @@ var collectIntegrationIssues = (manifest, integrations) => {
12457
13702
  `External surface "${node.name ?? node.id}" uses RevenueCat, but the integration is disabled. Enable it in App Settings \u2192 Integrations.`
12458
13703
  );
12459
13704
  }
13705
+ if (node.config.provider === "superwall" && !integrations.superwall.enabled) {
13706
+ issues.push(
13707
+ `External surface "${node.name ?? node.id}" uses Superwall, but the integration is disabled. Enable it in App Settings \u2192 Integrations.`
13708
+ );
13709
+ }
12460
13710
  }
12461
13711
  return issues.map((message) => ({
12462
13712
  severity: "blocking",
@@ -14695,7 +15945,7 @@ var renderPublishGateMarkdown = (manifestPath, result) => {
14695
15945
  "- Schema: valid FlowManifest (Zod)",
14696
15946
  "- Builder: text/icon `style.color`, Continue on manual-submit inputs, one input per screen, valid graph targets, media triggers",
14697
15947
  "- Publishable: entry connected, completion path, decision branches wired",
14698
- "- Integrations: external surfaces have provider + fallback; RevenueCat enabled when used",
15948
+ "- Integrations: external surfaces have provider + fallback; RevenueCat / Superwall enabled when used",
14699
15949
  "- Canvas gates: no disabled layer types (default import assumes all enabled)",
14700
15950
  "- Branding gradients: `$brandGradient:` only on backgrounds; known preset ids when branding is provided",
14701
15951
  "",
@@ -15004,16 +16254,19 @@ var ScreenSpecSchema = external_exports.object({
15004
16254
  var ExternalSurfaceSpecSchema = external_exports.object({
15005
16255
  id: external_exports.string().min(1).max(64),
15006
16256
  name: external_exports.string().min(1).max(80).optional(),
15007
- provider: external_exports.enum(["revenuecat", "unspecified"]),
16257
+ provider: external_exports.enum(["revenuecat", "superwall", "headless", "unspecified"]),
15008
16258
  offeringId: external_exports.string().min(1).max(128).optional(),
15009
16259
  placementId: external_exports.string().min(1).max(128).optional(),
15010
16260
  presentation: external_exports.enum(["paywall", "paywall_if_needed"]).optional(),
16261
+ hostKey: external_exports.string().min(1).max(64).regex(/^[a-zA-Z][a-zA-Z0-9_]*$/).optional(),
15011
16262
  outcomes: external_exports.object({
15012
16263
  purchase_completed: external_exports.string().min(1).nullable().optional(),
15013
16264
  purchase_cancelled: external_exports.string().min(1).nullable().optional(),
15014
16265
  dismissed: external_exports.string().min(1).nullable().optional(),
15015
16266
  failed: external_exports.string().min(1).nullable().optional(),
15016
- restore_completed: external_exports.string().min(1).nullable().optional()
16267
+ restore_completed: external_exports.string().min(1).nullable().optional(),
16268
+ completed: external_exports.string().min(1).nullable().optional(),
16269
+ back: external_exports.string().min(1).nullable().optional()
15017
16270
  }).optional(),
15018
16271
  fallback: external_exports.string().min(1).nullable()
15019
16272
  });
@@ -15518,6 +16771,12 @@ var buildExternalSurface = (surface) => {
15518
16771
  ...surface.offeringId ? { offeringId: surface.offeringId } : {},
15519
16772
  ...surface.placementId ? { placementId: surface.placementId } : {},
15520
16773
  ...surface.presentation ? { presentation: surface.presentation } : {}
16774
+ } : surface.provider === "superwall" ? {
16775
+ provider: "superwall",
16776
+ ...surface.placementId ? { placementId: surface.placementId } : {}
16777
+ } : surface.provider === "headless" ? {
16778
+ provider: "headless",
16779
+ ...surface.hostKey ? { hostKey: surface.hostKey } : {}
15521
16780
  } : { provider: "unspecified" };
15522
16781
  const outcomes = {};
15523
16782
  for (const [key, value] of Object.entries(surface.outcomes ?? {})) {