@getrheo/rheo-skill 2.5.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -12
- package/package.json +7 -5
- package/rheo/SKILL.md +20 -11
- package/rheo/rheo-best-practices/SKILL.md +32 -19
- package/rheo/rheo-best-practices/examples/swiftui-install-snippet.md +3 -1
- package/rheo/rheo-best-practices/examples/web-install-snippet.md +26 -0
- package/rheo/rheo-best-practices/references/analytics.md +104 -0
- package/rheo/rheo-best-practices/references/engage.md +95 -0
- package/rheo/rheo-best-practices/references/implement-workflow.md +20 -15
- package/rheo/rheo-best-practices/references/integrations.md +38 -4
- package/rheo/rheo-best-practices/references/product-model.md +66 -0
- package/rheo/rheo-best-practices/references/react-native-bare.md +3 -1
- package/rheo/rheo-best-practices/references/react-native-expo.md +5 -4
- package/rheo/rheo-best-practices/references/react-web.md +78 -0
- package/rheo/rheo-best-practices/references/swiftui.md +20 -49
- package/rheo/rheo-best-practices/references/troubleshooting.md +15 -2
- package/rheo/rheo-flow-import/SKILL.md +4 -2
- package/rheo/rheo-flow-import/references/capabilities.md +10 -1
- package/rheo/rheo-flow-import/references/flow-spec.md +11 -1
- package/rheo/rheo-flow-import/references/import-workflow.md +1 -1
- package/rheo/rheo-flow-import/references/manifest-agent-profile-fallback.md +1 -1
- package/rheo/rheo-flow-import/references/manifest-rules.md +1 -1
- package/rheo/rheo-flow-import/references/publish-gates.md +2 -2
- package/rheo/rheo-flow-import/references/react-native-source-patterns.md +3 -1
- package/rheo/rheo-flow-import/references/swiftui-source-patterns.md +2 -0
- package/rheo/rheo-flow-import/scripts/lib/rheo-cli.mjs +3713 -259
|
@@ -4447,7 +4447,8 @@ var ButtonActionSchema = external_exports.discriminatedUnion("kind", [
|
|
|
4447
4447
|
kind: external_exports.literal("advance_carousel"),
|
|
4448
4448
|
targetLayerId: external_exports.string().min(1),
|
|
4449
4449
|
onLast: CarouselAdvanceOnLastSchema.optional()
|
|
4450
|
-
})
|
|
4450
|
+
}),
|
|
4451
|
+
external_exports.object({ kind: external_exports.literal("dismiss_banner") })
|
|
4451
4452
|
]);
|
|
4452
4453
|
var TEXT_INPUT_TYPES = ["plain", "email", "phone", "url", "number", "multiline"];
|
|
4453
4454
|
var TextInputTypeSchema = external_exports.enum(TEXT_INPUT_TYPES);
|
|
@@ -4885,6 +4886,22 @@ var FieldKeySchema = external_exports.string().min(1).max(64).regex(FIELD_KEY_RE
|
|
|
4885
4886
|
var FieldClassificationSchema = external_exports.enum(FIELD_CLASSIFICATIONS);
|
|
4886
4887
|
var lazyLayer4 = () => layerSchemaStore.schema;
|
|
4887
4888
|
var EmailPasswordAuthModeSchema = external_exports.enum(EMAIL_PASSWORD_AUTH_MODES);
|
|
4889
|
+
var PasswordRulesSchema = external_exports.object({
|
|
4890
|
+
minLength: external_exports.number().int().min(4).max(128).optional(),
|
|
4891
|
+
maxLength: external_exports.number().int().min(4).max(128).optional(),
|
|
4892
|
+
requireUppercase: external_exports.boolean().optional(),
|
|
4893
|
+
requireLowercase: external_exports.boolean().optional(),
|
|
4894
|
+
requireDigit: external_exports.boolean().optional(),
|
|
4895
|
+
requireSpecial: external_exports.boolean().optional()
|
|
4896
|
+
}).strict().superRefine((data, ctx) => {
|
|
4897
|
+
if (data.minLength !== void 0 && data.maxLength !== void 0 && data.maxLength < data.minLength) {
|
|
4898
|
+
ctx.addIssue({
|
|
4899
|
+
code: external_exports.ZodIssueCode.custom,
|
|
4900
|
+
message: "passwordRules.maxLength must be >= minLength",
|
|
4901
|
+
path: ["maxLength"]
|
|
4902
|
+
});
|
|
4903
|
+
}
|
|
4904
|
+
});
|
|
4888
4905
|
var migrateEmailPasswordAuthIncoming = (raw) => {
|
|
4889
4906
|
if (!raw || typeof raw !== "object") return raw;
|
|
4890
4907
|
const o = raw;
|
|
@@ -5001,7 +5018,10 @@ var EmailPasswordAuthLayerSchemaValidated = external_exports.object({
|
|
|
5001
5018
|
kind: external_exports.literal("email_password_auth"),
|
|
5002
5019
|
mode: EmailPasswordAuthModeSchema,
|
|
5003
5020
|
fieldKey: FieldKeySchema,
|
|
5021
|
+
/** @deprecated Prefer `passwordRules.minLength`. Kept for backward compatibility. */
|
|
5004
5022
|
minPasswordLength: external_exports.number().int().min(4).max(128).optional(),
|
|
5023
|
+
/** Composition rules beyond minimum length (uppercase, digit, special, max). */
|
|
5024
|
+
passwordRules: PasswordRulesSchema.optional(),
|
|
5005
5025
|
children: external_exports.lazy(
|
|
5006
5026
|
() => external_exports.array(external_exports.union([EmailPasswordFieldLayerSchema, EmailPasswordSubmitLayerSchema])).min(1)
|
|
5007
5027
|
),
|
|
@@ -5072,16 +5092,39 @@ var TextInputFieldStyleSchema = external_exports.object({
|
|
|
5072
5092
|
letterSpacing: external_exports.number().min(-0.5).max(1).optional(),
|
|
5073
5093
|
opacity: external_exports.number().min(0).max(1).optional()
|
|
5074
5094
|
}).partial();
|
|
5095
|
+
var TextInputAutoCapitalizeSchema = external_exports.enum([
|
|
5096
|
+
"none",
|
|
5097
|
+
"sentences",
|
|
5098
|
+
"words",
|
|
5099
|
+
"characters"
|
|
5100
|
+
]);
|
|
5101
|
+
var TextInputReturnKeyTypeSchema = external_exports.enum([
|
|
5102
|
+
"done",
|
|
5103
|
+
"next",
|
|
5104
|
+
"go",
|
|
5105
|
+
"send",
|
|
5106
|
+
"search",
|
|
5107
|
+
"default"
|
|
5108
|
+
]);
|
|
5109
|
+
var TextInputValidationModeSchema = external_exports.enum(["onBlur", "onSubmit", "live"]);
|
|
5075
5110
|
var TextInputLayerSchema = external_exports.object({
|
|
5076
5111
|
...baseLayerShape,
|
|
5077
5112
|
kind: external_exports.literal("text_input"),
|
|
5078
5113
|
fieldKey: FieldKeySchema,
|
|
5079
5114
|
placeholder: LocalizedTextSchema.optional(),
|
|
5115
|
+
/** Optional helper copy shown under the field when valid / untouched. */
|
|
5116
|
+
helperText: LocalizedTextSchema.optional(),
|
|
5080
5117
|
inputType: TextInputTypeSchema.optional(),
|
|
5081
5118
|
required: external_exports.boolean().optional(),
|
|
5082
5119
|
minLength: external_exports.number().int().min(0).max(2e3).optional(),
|
|
5083
5120
|
maxLength: external_exports.number().int().positive().max(2e3).optional(),
|
|
5084
5121
|
classification: FieldClassificationSchema,
|
|
5122
|
+
/** Override autocapitalize (defaults from `inputType` when omitted). */
|
|
5123
|
+
autoCapitalize: TextInputAutoCapitalizeSchema.optional(),
|
|
5124
|
+
/** Soft keyboard return key label. */
|
|
5125
|
+
returnKeyType: TextInputReturnKeyTypeSchema.optional(),
|
|
5126
|
+
/** When to show inline validation errors (default `onBlur`). */
|
|
5127
|
+
validationMode: TextInputValidationModeSchema.optional(),
|
|
5085
5128
|
children: external_exports.lazy(() => external_exports.array(lazyLayer5())).optional(),
|
|
5086
5129
|
/** Typography for the native input's typed text. */
|
|
5087
5130
|
fieldStyle: TextInputFieldStyleSchema.optional(),
|
|
@@ -5153,6 +5196,221 @@ var WheelPickerLayerSchema = external_exports.object({
|
|
|
5153
5196
|
style: CommonStyleSchema.optional(),
|
|
5154
5197
|
styleBreakpoints: CommonStyleBreakpointsSchema
|
|
5155
5198
|
});
|
|
5199
|
+
var DATE_TIME_INPUT_MODES = ["date", "time", "datetime"];
|
|
5200
|
+
var NUMBER_STEPPER_BUTTON_ROLES = ["decrement", "increment"];
|
|
5201
|
+
var ADDRESS_INPUT_FIELDS = [
|
|
5202
|
+
"line1",
|
|
5203
|
+
"line2",
|
|
5204
|
+
"city",
|
|
5205
|
+
"region",
|
|
5206
|
+
"postalCode",
|
|
5207
|
+
"country"
|
|
5208
|
+
];
|
|
5209
|
+
var lazyLayer6 = () => layerSchemaStore.schema;
|
|
5210
|
+
var CountryCodeSchema = external_exports.string().length(2).regex(/^[A-Za-z]{2}$/u).transform((s) => s.toUpperCase());
|
|
5211
|
+
var DateTimeInputModeSchema = external_exports.enum(DATE_TIME_INPUT_MODES);
|
|
5212
|
+
var DateTimeInputLayerSchema = external_exports.object({
|
|
5213
|
+
...baseLayerShape,
|
|
5214
|
+
kind: external_exports.literal("date_time_input"),
|
|
5215
|
+
fieldKey: FieldKeySchema,
|
|
5216
|
+
mode: DateTimeInputModeSchema.optional(),
|
|
5217
|
+
required: external_exports.boolean().optional(),
|
|
5218
|
+
min: external_exports.string().min(1).max(64).optional(),
|
|
5219
|
+
max: external_exports.string().min(1).max(64).optional(),
|
|
5220
|
+
defaultValue: external_exports.string().min(1).max(64).optional(),
|
|
5221
|
+
placeholder: LocalizedTextSchema.optional(),
|
|
5222
|
+
classification: FieldClassificationSchema,
|
|
5223
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer6())).optional(),
|
|
5224
|
+
fieldStyle: TextInputFieldStyleSchema.optional(),
|
|
5225
|
+
style: CommonStyleSchema.optional(),
|
|
5226
|
+
styleBreakpoints: CommonStyleBreakpointsSchema
|
|
5227
|
+
});
|
|
5228
|
+
var NumberStepperButtonRoleSchema = external_exports.enum(NUMBER_STEPPER_BUTTON_ROLES);
|
|
5229
|
+
var NumberStepperButtonLayerSchema = external_exports.object({
|
|
5230
|
+
...baseLayerShape,
|
|
5231
|
+
kind: external_exports.literal("number_stepper_button"),
|
|
5232
|
+
role: NumberStepperButtonRoleSchema,
|
|
5233
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer6())).optional(),
|
|
5234
|
+
style: CommonStyleSchema.optional(),
|
|
5235
|
+
styleBreakpoints: CommonStyleBreakpointsSchema
|
|
5236
|
+
});
|
|
5237
|
+
var NumberStepperValueLayerSchema = external_exports.object({
|
|
5238
|
+
...baseLayerShape,
|
|
5239
|
+
kind: external_exports.literal("number_stepper_value"),
|
|
5240
|
+
unitLabel: LocalizedTextSchema.optional(),
|
|
5241
|
+
style: TextStyleSchema.optional(),
|
|
5242
|
+
styleBreakpoints: TextStyleBreakpointsSchema
|
|
5243
|
+
});
|
|
5244
|
+
var migrateNumberStepperIncoming = (raw) => {
|
|
5245
|
+
if (!raw || typeof raw !== "object") return raw;
|
|
5246
|
+
const o = raw;
|
|
5247
|
+
if (o.kind !== "number_stepper") return raw;
|
|
5248
|
+
if (Array.isArray(o.children) && o.children.length > 0) return raw;
|
|
5249
|
+
const idBase = typeof o.id === "string" ? o.id : "lyr_number_stepper";
|
|
5250
|
+
const slugRaw = idBase.replace(/^lyr_/i, "").replace(/[^a-z0-9_]/gi, "_");
|
|
5251
|
+
const slug = slugRaw.length > 0 ? slugRaw.slice(0, 40) : "stepper";
|
|
5252
|
+
const valueStyle = o.valueStyle && typeof o.valueStyle === "object" ? o.valueStyle : void 0;
|
|
5253
|
+
const buttonColor = o.buttonColor;
|
|
5254
|
+
const mkButton = (role, glyph) => {
|
|
5255
|
+
const suf = role === "decrement" ? "dec" : "inc";
|
|
5256
|
+
return {
|
|
5257
|
+
id: `lyr_${slug}_btn_${suf}`.slice(0, 64),
|
|
5258
|
+
kind: "number_stepper_button",
|
|
5259
|
+
role,
|
|
5260
|
+
style: {
|
|
5261
|
+
width: 36,
|
|
5262
|
+
height: 36,
|
|
5263
|
+
radius: 8
|
|
5264
|
+
},
|
|
5265
|
+
children: [
|
|
5266
|
+
{
|
|
5267
|
+
id: `lyr_${slug}_btn_${suf}_txt`.slice(0, 64),
|
|
5268
|
+
kind: "text",
|
|
5269
|
+
text: { default: glyph },
|
|
5270
|
+
style: {
|
|
5271
|
+
fontSize: 20,
|
|
5272
|
+
align: "center",
|
|
5273
|
+
...buttonColor !== void 0 ? { color: buttonColor } : {}
|
|
5274
|
+
}
|
|
5275
|
+
}
|
|
5276
|
+
]
|
|
5277
|
+
};
|
|
5278
|
+
};
|
|
5279
|
+
const valueChild = {
|
|
5280
|
+
id: `lyr_${slug}_value`.slice(0, 64),
|
|
5281
|
+
kind: "number_stepper_value",
|
|
5282
|
+
style: {
|
|
5283
|
+
fontSize: typeof valueStyle?.fontSize === "number" ? valueStyle.fontSize : 14,
|
|
5284
|
+
width: "full",
|
|
5285
|
+
...typeof valueStyle?.fontFamily === "string" ? { fontFamily: valueStyle.fontFamily } : {},
|
|
5286
|
+
...typeof valueStyle?.fontWeight === "number" ? { fontWeight: valueStyle.fontWeight } : {},
|
|
5287
|
+
...valueStyle?.color !== void 0 ? { color: valueStyle.color } : {},
|
|
5288
|
+
...typeof valueStyle?.lineHeight === "number" ? { lineHeight: valueStyle.lineHeight } : {},
|
|
5289
|
+
...typeof valueStyle?.letterSpacing === "number" ? { letterSpacing: valueStyle.letterSpacing } : {},
|
|
5290
|
+
...typeof valueStyle?.opacity === "number" ? { opacity: valueStyle.opacity } : {},
|
|
5291
|
+
align: typeof valueStyle?.align === "string" ? valueStyle.align : "center"
|
|
5292
|
+
}
|
|
5293
|
+
};
|
|
5294
|
+
if (o.unitLabel !== void 0) valueChild.unitLabel = o.unitLabel;
|
|
5295
|
+
const {
|
|
5296
|
+
valueStyle: _vs,
|
|
5297
|
+
buttonColor: _bc,
|
|
5298
|
+
unitLabel: _ul,
|
|
5299
|
+
...rest
|
|
5300
|
+
} = o;
|
|
5301
|
+
return {
|
|
5302
|
+
...rest,
|
|
5303
|
+
direction: typeof o.direction === "string" ? o.direction : "horizontal",
|
|
5304
|
+
gap: typeof o.gap === "number" ? o.gap : 12,
|
|
5305
|
+
align: typeof o.align === "string" ? o.align : "center",
|
|
5306
|
+
...typeof o.distribution === "string" ? { distribution: o.distribution } : {},
|
|
5307
|
+
children: [mkButton("decrement", "-"), valueChild, mkButton("increment", "+")]
|
|
5308
|
+
};
|
|
5309
|
+
};
|
|
5310
|
+
var refineNumberStepperChildren = (data, ctx) => {
|
|
5311
|
+
const buttons = data.children.filter((c) => c.kind === "number_stepper_button");
|
|
5312
|
+
const values = data.children.filter((c) => c.kind === "number_stepper_value");
|
|
5313
|
+
const other = data.children.filter(
|
|
5314
|
+
(c) => c.kind !== "number_stepper_button" && c.kind !== "number_stepper_value"
|
|
5315
|
+
);
|
|
5316
|
+
if (other.length > 0) {
|
|
5317
|
+
ctx.addIssue({
|
|
5318
|
+
code: external_exports.ZodIssueCode.custom,
|
|
5319
|
+
message: "number_stepper children must be number_stepper_button or number_stepper_value",
|
|
5320
|
+
path: ["children"]
|
|
5321
|
+
});
|
|
5322
|
+
}
|
|
5323
|
+
const roles = /* @__PURE__ */ new Set();
|
|
5324
|
+
for (const b of buttons) {
|
|
5325
|
+
if (b.kind !== "number_stepper_button") continue;
|
|
5326
|
+
if (roles.has(b.role)) {
|
|
5327
|
+
ctx.addIssue({
|
|
5328
|
+
code: external_exports.ZodIssueCode.custom,
|
|
5329
|
+
message: `duplicate number_stepper_button role "${b.role}"`,
|
|
5330
|
+
path: ["children"]
|
|
5331
|
+
});
|
|
5332
|
+
}
|
|
5333
|
+
roles.add(b.role);
|
|
5334
|
+
}
|
|
5335
|
+
for (const role of NUMBER_STEPPER_BUTTON_ROLES) {
|
|
5336
|
+
if (!roles.has(role)) {
|
|
5337
|
+
ctx.addIssue({
|
|
5338
|
+
code: external_exports.ZodIssueCode.custom,
|
|
5339
|
+
message: `number_stepper requires a number_stepper_button with role "${role}"`,
|
|
5340
|
+
path: ["children"]
|
|
5341
|
+
});
|
|
5342
|
+
}
|
|
5343
|
+
}
|
|
5344
|
+
if (values.length !== 1) {
|
|
5345
|
+
ctx.addIssue({
|
|
5346
|
+
code: external_exports.ZodIssueCode.custom,
|
|
5347
|
+
message: `number_stepper must have exactly one number_stepper_value (found ${values.length})`,
|
|
5348
|
+
path: ["children"]
|
|
5349
|
+
});
|
|
5350
|
+
}
|
|
5351
|
+
};
|
|
5352
|
+
var NumberStepperLayerSchemaValidated = external_exports.object({
|
|
5353
|
+
...baseLayerShape,
|
|
5354
|
+
kind: external_exports.literal("number_stepper"),
|
|
5355
|
+
fieldKey: FieldKeySchema,
|
|
5356
|
+
min: external_exports.number(),
|
|
5357
|
+
max: external_exports.number(),
|
|
5358
|
+
step: external_exports.number().positive().optional(),
|
|
5359
|
+
defaultValue: external_exports.number().optional(),
|
|
5360
|
+
classification: FieldClassificationSchema,
|
|
5361
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
5362
|
+
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
5363
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
5364
|
+
distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
5365
|
+
children: external_exports.lazy(
|
|
5366
|
+
() => external_exports.array(external_exports.union([NumberStepperButtonLayerSchema, NumberStepperValueLayerSchema])).min(1)
|
|
5367
|
+
),
|
|
5368
|
+
style: CommonStyleSchema.optional(),
|
|
5369
|
+
styleBreakpoints: CommonStyleBreakpointsSchema
|
|
5370
|
+
}).superRefine(refineNumberStepperChildren);
|
|
5371
|
+
var NumberStepperLayerSchema = external_exports.preprocess(
|
|
5372
|
+
migrateNumberStepperIncoming,
|
|
5373
|
+
NumberStepperLayerSchemaValidated
|
|
5374
|
+
);
|
|
5375
|
+
var PhoneInputLayerSchema = external_exports.object({
|
|
5376
|
+
...baseLayerShape,
|
|
5377
|
+
kind: external_exports.literal("phone_input"),
|
|
5378
|
+
fieldKey: FieldKeySchema,
|
|
5379
|
+
defaultCountryCode: CountryCodeSchema.optional(),
|
|
5380
|
+
allowedCountryCodes: external_exports.array(CountryCodeSchema).min(1).max(250).optional(),
|
|
5381
|
+
required: external_exports.boolean().optional(),
|
|
5382
|
+
placeholder: LocalizedTextSchema.optional(),
|
|
5383
|
+
classification: FieldClassificationSchema,
|
|
5384
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer6())).optional(),
|
|
5385
|
+
fieldStyle: TextInputFieldStyleSchema.optional(),
|
|
5386
|
+
style: CommonStyleSchema.optional(),
|
|
5387
|
+
styleBreakpoints: CommonStyleBreakpointsSchema
|
|
5388
|
+
});
|
|
5389
|
+
var AddressInputFieldSchema = external_exports.enum(ADDRESS_INPUT_FIELDS);
|
|
5390
|
+
var AddressInputPlaceholdersSchema = external_exports.object({
|
|
5391
|
+
line1: LocalizedTextSchema.optional(),
|
|
5392
|
+
line2: LocalizedTextSchema.optional(),
|
|
5393
|
+
city: LocalizedTextSchema.optional(),
|
|
5394
|
+
region: LocalizedTextSchema.optional(),
|
|
5395
|
+
postalCode: LocalizedTextSchema.optional(),
|
|
5396
|
+
country: LocalizedTextSchema.optional()
|
|
5397
|
+
}).partial();
|
|
5398
|
+
var AddressInputLayerSchema = external_exports.object({
|
|
5399
|
+
...baseLayerShape,
|
|
5400
|
+
kind: external_exports.literal("address_input"),
|
|
5401
|
+
fieldKey: FieldKeySchema,
|
|
5402
|
+
requiredFields: external_exports.array(AddressInputFieldSchema).min(1).max(6).optional(),
|
|
5403
|
+
showLine2: external_exports.boolean().optional(),
|
|
5404
|
+
showRegion: external_exports.boolean().optional(),
|
|
5405
|
+
defaultCountryCode: CountryCodeSchema.optional(),
|
|
5406
|
+
placeholders: AddressInputPlaceholdersSchema.optional(),
|
|
5407
|
+
classification: FieldClassificationSchema,
|
|
5408
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer6())).optional(),
|
|
5409
|
+
fieldStyle: TextInputFieldStyleSchema.optional(),
|
|
5410
|
+
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
5411
|
+
style: CommonStyleSchema.optional(),
|
|
5412
|
+
styleBreakpoints: CommonStyleBreakpointsSchema
|
|
5413
|
+
});
|
|
5156
5414
|
var CarouselIndicatorsStyleSchema = external_exports.object({
|
|
5157
5415
|
width: external_exports.number().int().min(1).max(64).optional(),
|
|
5158
5416
|
height: external_exports.number().int().min(1).max(64).optional(),
|
|
@@ -5287,6 +5545,12 @@ layerSchemaStore.schema = external_exports.lazy(
|
|
|
5287
5545
|
TextInputLayerSchema,
|
|
5288
5546
|
ScaleInputLayerSchema,
|
|
5289
5547
|
WheelPickerLayerSchema,
|
|
5548
|
+
DateTimeInputLayerSchema,
|
|
5549
|
+
NumberStepperLayerSchema,
|
|
5550
|
+
NumberStepperButtonLayerSchema,
|
|
5551
|
+
NumberStepperValueLayerSchema,
|
|
5552
|
+
PhoneInputLayerSchema,
|
|
5553
|
+
AddressInputLayerSchema,
|
|
5290
5554
|
OAuthLoginLayerSchema,
|
|
5291
5555
|
OAuthProviderPresetLayerSchema,
|
|
5292
5556
|
OAuthProviderCustomLayerSchema,
|
|
@@ -5298,7 +5562,17 @@ layerSchemaStore.schema = external_exports.lazy(
|
|
|
5298
5562
|
])
|
|
5299
5563
|
);
|
|
5300
5564
|
var LayerSchema = layerSchemaStore.schema;
|
|
5301
|
-
var
|
|
5565
|
+
var MANUAL_SUBMIT_INPUT_KINDS = [
|
|
5566
|
+
"multiple_choice",
|
|
5567
|
+
"text_input",
|
|
5568
|
+
"scale_input",
|
|
5569
|
+
"wheel_picker",
|
|
5570
|
+
"date_time_input",
|
|
5571
|
+
"number_stepper",
|
|
5572
|
+
"phone_input",
|
|
5573
|
+
"address_input"
|
|
5574
|
+
];
|
|
5575
|
+
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
5576
|
|
|
5303
5577
|
// ../../node_modules/@getrheo/contracts/dist/localized.js
|
|
5304
5578
|
var LocaleCode2 = external_exports.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/, 'locale must be like "en" or "en-US"');
|
|
@@ -5700,7 +5974,8 @@ var ButtonActionSchema2 = external_exports.discriminatedUnion("kind", [
|
|
|
5700
5974
|
kind: external_exports.literal("advance_carousel"),
|
|
5701
5975
|
targetLayerId: external_exports.string().min(1),
|
|
5702
5976
|
onLast: CarouselAdvanceOnLastSchema2.optional()
|
|
5703
|
-
})
|
|
5977
|
+
}),
|
|
5978
|
+
external_exports.object({ kind: external_exports.literal("dismiss_banner") })
|
|
5704
5979
|
]);
|
|
5705
5980
|
var TEXT_INPUT_TYPES2 = ["plain", "email", "phone", "url", "number", "multiline"];
|
|
5706
5981
|
var TextInputTypeSchema2 = external_exports.enum(TEXT_INPUT_TYPES2);
|
|
@@ -5733,11 +6008,11 @@ var OAuthPresetButtonChromeBreakpointsSchema2 = external_exports.object({
|
|
|
5733
6008
|
}).partial().optional();
|
|
5734
6009
|
var EMAIL_PASSWORD_AUTH_MODES2 = ["sign_in", "sign_up"];
|
|
5735
6010
|
var EMAIL_PASSWORD_SLOTS2 = ["email", "password", "confirm"];
|
|
5736
|
-
var
|
|
6011
|
+
var lazyLayer7 = () => layerSchemaStore2.schema;
|
|
5737
6012
|
var ButtonLayerSchema2 = external_exports.object({
|
|
5738
6013
|
...baseLayerShape2,
|
|
5739
6014
|
kind: external_exports.literal("button"),
|
|
5740
|
-
children: external_exports.lazy(() => external_exports.array(
|
|
6015
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer7())),
|
|
5741
6016
|
action: ButtonActionSchema2,
|
|
5742
6017
|
variant: ButtonLayerVariantSchema2,
|
|
5743
6018
|
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
@@ -5751,7 +6026,7 @@ var ButtonLayerSchema2 = external_exports.object({
|
|
|
5751
6026
|
var BackButtonLayerSchema2 = external_exports.object({
|
|
5752
6027
|
...baseLayerShape2,
|
|
5753
6028
|
kind: external_exports.literal("back_button"),
|
|
5754
|
-
children: external_exports.lazy(() => external_exports.array(
|
|
6029
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer7())),
|
|
5755
6030
|
variant: ButtonLayerVariantSchema2,
|
|
5756
6031
|
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
5757
6032
|
gap: external_exports.number().int().min(0).optional(),
|
|
@@ -6138,6 +6413,22 @@ var FieldKeySchema2 = external_exports.string().min(1).max(64).regex(FIELD_KEY_R
|
|
|
6138
6413
|
var FieldClassificationSchema2 = external_exports.enum(FIELD_CLASSIFICATIONS2);
|
|
6139
6414
|
var lazyLayer42 = () => layerSchemaStore2.schema;
|
|
6140
6415
|
var EmailPasswordAuthModeSchema2 = external_exports.enum(EMAIL_PASSWORD_AUTH_MODES2);
|
|
6416
|
+
var PasswordRulesSchema2 = external_exports.object({
|
|
6417
|
+
minLength: external_exports.number().int().min(4).max(128).optional(),
|
|
6418
|
+
maxLength: external_exports.number().int().min(4).max(128).optional(),
|
|
6419
|
+
requireUppercase: external_exports.boolean().optional(),
|
|
6420
|
+
requireLowercase: external_exports.boolean().optional(),
|
|
6421
|
+
requireDigit: external_exports.boolean().optional(),
|
|
6422
|
+
requireSpecial: external_exports.boolean().optional()
|
|
6423
|
+
}).strict().superRefine((data, ctx) => {
|
|
6424
|
+
if (data.minLength !== void 0 && data.maxLength !== void 0 && data.maxLength < data.minLength) {
|
|
6425
|
+
ctx.addIssue({
|
|
6426
|
+
code: external_exports.ZodIssueCode.custom,
|
|
6427
|
+
message: "passwordRules.maxLength must be >= minLength",
|
|
6428
|
+
path: ["maxLength"]
|
|
6429
|
+
});
|
|
6430
|
+
}
|
|
6431
|
+
});
|
|
6141
6432
|
var migrateEmailPasswordAuthIncoming2 = (raw) => {
|
|
6142
6433
|
if (!raw || typeof raw !== "object") return raw;
|
|
6143
6434
|
const o = raw;
|
|
@@ -6254,7 +6545,10 @@ var EmailPasswordAuthLayerSchemaValidated2 = external_exports.object({
|
|
|
6254
6545
|
kind: external_exports.literal("email_password_auth"),
|
|
6255
6546
|
mode: EmailPasswordAuthModeSchema2,
|
|
6256
6547
|
fieldKey: FieldKeySchema2,
|
|
6548
|
+
/** @deprecated Prefer `passwordRules.minLength`. Kept for backward compatibility. */
|
|
6257
6549
|
minPasswordLength: external_exports.number().int().min(4).max(128).optional(),
|
|
6550
|
+
/** Composition rules beyond minimum length (uppercase, digit, special, max). */
|
|
6551
|
+
passwordRules: PasswordRulesSchema2.optional(),
|
|
6258
6552
|
children: external_exports.lazy(
|
|
6259
6553
|
() => external_exports.array(external_exports.union([EmailPasswordFieldLayerSchema2, EmailPasswordSubmitLayerSchema2])).min(1)
|
|
6260
6554
|
),
|
|
@@ -6325,16 +6619,39 @@ var TextInputFieldStyleSchema2 = external_exports.object({
|
|
|
6325
6619
|
letterSpacing: external_exports.number().min(-0.5).max(1).optional(),
|
|
6326
6620
|
opacity: external_exports.number().min(0).max(1).optional()
|
|
6327
6621
|
}).partial();
|
|
6622
|
+
var TextInputAutoCapitalizeSchema2 = external_exports.enum([
|
|
6623
|
+
"none",
|
|
6624
|
+
"sentences",
|
|
6625
|
+
"words",
|
|
6626
|
+
"characters"
|
|
6627
|
+
]);
|
|
6628
|
+
var TextInputReturnKeyTypeSchema2 = external_exports.enum([
|
|
6629
|
+
"done",
|
|
6630
|
+
"next",
|
|
6631
|
+
"go",
|
|
6632
|
+
"send",
|
|
6633
|
+
"search",
|
|
6634
|
+
"default"
|
|
6635
|
+
]);
|
|
6636
|
+
var TextInputValidationModeSchema2 = external_exports.enum(["onBlur", "onSubmit", "live"]);
|
|
6328
6637
|
var TextInputLayerSchema2 = external_exports.object({
|
|
6329
6638
|
...baseLayerShape2,
|
|
6330
6639
|
kind: external_exports.literal("text_input"),
|
|
6331
6640
|
fieldKey: FieldKeySchema2,
|
|
6332
6641
|
placeholder: LocalizedTextSchema3.optional(),
|
|
6642
|
+
/** Optional helper copy shown under the field when valid / untouched. */
|
|
6643
|
+
helperText: LocalizedTextSchema3.optional(),
|
|
6333
6644
|
inputType: TextInputTypeSchema2.optional(),
|
|
6334
6645
|
required: external_exports.boolean().optional(),
|
|
6335
6646
|
minLength: external_exports.number().int().min(0).max(2e3).optional(),
|
|
6336
6647
|
maxLength: external_exports.number().int().positive().max(2e3).optional(),
|
|
6337
6648
|
classification: FieldClassificationSchema2,
|
|
6649
|
+
/** Override autocapitalize (defaults from `inputType` when omitted). */
|
|
6650
|
+
autoCapitalize: TextInputAutoCapitalizeSchema2.optional(),
|
|
6651
|
+
/** Soft keyboard return key label. */
|
|
6652
|
+
returnKeyType: TextInputReturnKeyTypeSchema2.optional(),
|
|
6653
|
+
/** When to show inline validation errors (default `onBlur`). */
|
|
6654
|
+
validationMode: TextInputValidationModeSchema2.optional(),
|
|
6338
6655
|
children: external_exports.lazy(() => external_exports.array(lazyLayer52())).optional(),
|
|
6339
6656
|
/** Typography for the native input's typed text. */
|
|
6340
6657
|
fieldStyle: TextInputFieldStyleSchema2.optional(),
|
|
@@ -6406,6 +6723,221 @@ var WheelPickerLayerSchema2 = external_exports.object({
|
|
|
6406
6723
|
style: CommonStyleSchema2.optional(),
|
|
6407
6724
|
styleBreakpoints: CommonStyleBreakpointsSchema2
|
|
6408
6725
|
});
|
|
6726
|
+
var DATE_TIME_INPUT_MODES2 = ["date", "time", "datetime"];
|
|
6727
|
+
var NUMBER_STEPPER_BUTTON_ROLES2 = ["decrement", "increment"];
|
|
6728
|
+
var ADDRESS_INPUT_FIELDS2 = [
|
|
6729
|
+
"line1",
|
|
6730
|
+
"line2",
|
|
6731
|
+
"city",
|
|
6732
|
+
"region",
|
|
6733
|
+
"postalCode",
|
|
6734
|
+
"country"
|
|
6735
|
+
];
|
|
6736
|
+
var lazyLayer62 = () => layerSchemaStore2.schema;
|
|
6737
|
+
var CountryCodeSchema2 = external_exports.string().length(2).regex(/^[A-Za-z]{2}$/u).transform((s) => s.toUpperCase());
|
|
6738
|
+
var DateTimeInputModeSchema2 = external_exports.enum(DATE_TIME_INPUT_MODES2);
|
|
6739
|
+
var DateTimeInputLayerSchema2 = external_exports.object({
|
|
6740
|
+
...baseLayerShape2,
|
|
6741
|
+
kind: external_exports.literal("date_time_input"),
|
|
6742
|
+
fieldKey: FieldKeySchema2,
|
|
6743
|
+
mode: DateTimeInputModeSchema2.optional(),
|
|
6744
|
+
required: external_exports.boolean().optional(),
|
|
6745
|
+
min: external_exports.string().min(1).max(64).optional(),
|
|
6746
|
+
max: external_exports.string().min(1).max(64).optional(),
|
|
6747
|
+
defaultValue: external_exports.string().min(1).max(64).optional(),
|
|
6748
|
+
placeholder: LocalizedTextSchema3.optional(),
|
|
6749
|
+
classification: FieldClassificationSchema2,
|
|
6750
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer62())).optional(),
|
|
6751
|
+
fieldStyle: TextInputFieldStyleSchema2.optional(),
|
|
6752
|
+
style: CommonStyleSchema2.optional(),
|
|
6753
|
+
styleBreakpoints: CommonStyleBreakpointsSchema2
|
|
6754
|
+
});
|
|
6755
|
+
var NumberStepperButtonRoleSchema2 = external_exports.enum(NUMBER_STEPPER_BUTTON_ROLES2);
|
|
6756
|
+
var NumberStepperButtonLayerSchema2 = external_exports.object({
|
|
6757
|
+
...baseLayerShape2,
|
|
6758
|
+
kind: external_exports.literal("number_stepper_button"),
|
|
6759
|
+
role: NumberStepperButtonRoleSchema2,
|
|
6760
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer62())).optional(),
|
|
6761
|
+
style: CommonStyleSchema2.optional(),
|
|
6762
|
+
styleBreakpoints: CommonStyleBreakpointsSchema2
|
|
6763
|
+
});
|
|
6764
|
+
var NumberStepperValueLayerSchema2 = external_exports.object({
|
|
6765
|
+
...baseLayerShape2,
|
|
6766
|
+
kind: external_exports.literal("number_stepper_value"),
|
|
6767
|
+
unitLabel: LocalizedTextSchema3.optional(),
|
|
6768
|
+
style: TextStyleSchema2.optional(),
|
|
6769
|
+
styleBreakpoints: TextStyleBreakpointsSchema2
|
|
6770
|
+
});
|
|
6771
|
+
var migrateNumberStepperIncoming2 = (raw) => {
|
|
6772
|
+
if (!raw || typeof raw !== "object") return raw;
|
|
6773
|
+
const o = raw;
|
|
6774
|
+
if (o.kind !== "number_stepper") return raw;
|
|
6775
|
+
if (Array.isArray(o.children) && o.children.length > 0) return raw;
|
|
6776
|
+
const idBase = typeof o.id === "string" ? o.id : "lyr_number_stepper";
|
|
6777
|
+
const slugRaw = idBase.replace(/^lyr_/i, "").replace(/[^a-z0-9_]/gi, "_");
|
|
6778
|
+
const slug = slugRaw.length > 0 ? slugRaw.slice(0, 40) : "stepper";
|
|
6779
|
+
const valueStyle = o.valueStyle && typeof o.valueStyle === "object" ? o.valueStyle : void 0;
|
|
6780
|
+
const buttonColor = o.buttonColor;
|
|
6781
|
+
const mkButton = (role, glyph) => {
|
|
6782
|
+
const suf = role === "decrement" ? "dec" : "inc";
|
|
6783
|
+
return {
|
|
6784
|
+
id: `lyr_${slug}_btn_${suf}`.slice(0, 64),
|
|
6785
|
+
kind: "number_stepper_button",
|
|
6786
|
+
role,
|
|
6787
|
+
style: {
|
|
6788
|
+
width: 36,
|
|
6789
|
+
height: 36,
|
|
6790
|
+
radius: 8
|
|
6791
|
+
},
|
|
6792
|
+
children: [
|
|
6793
|
+
{
|
|
6794
|
+
id: `lyr_${slug}_btn_${suf}_txt`.slice(0, 64),
|
|
6795
|
+
kind: "text",
|
|
6796
|
+
text: { default: glyph },
|
|
6797
|
+
style: {
|
|
6798
|
+
fontSize: 20,
|
|
6799
|
+
align: "center",
|
|
6800
|
+
...buttonColor !== void 0 ? { color: buttonColor } : {}
|
|
6801
|
+
}
|
|
6802
|
+
}
|
|
6803
|
+
]
|
|
6804
|
+
};
|
|
6805
|
+
};
|
|
6806
|
+
const valueChild = {
|
|
6807
|
+
id: `lyr_${slug}_value`.slice(0, 64),
|
|
6808
|
+
kind: "number_stepper_value",
|
|
6809
|
+
style: {
|
|
6810
|
+
fontSize: typeof valueStyle?.fontSize === "number" ? valueStyle.fontSize : 14,
|
|
6811
|
+
width: "full",
|
|
6812
|
+
...typeof valueStyle?.fontFamily === "string" ? { fontFamily: valueStyle.fontFamily } : {},
|
|
6813
|
+
...typeof valueStyle?.fontWeight === "number" ? { fontWeight: valueStyle.fontWeight } : {},
|
|
6814
|
+
...valueStyle?.color !== void 0 ? { color: valueStyle.color } : {},
|
|
6815
|
+
...typeof valueStyle?.lineHeight === "number" ? { lineHeight: valueStyle.lineHeight } : {},
|
|
6816
|
+
...typeof valueStyle?.letterSpacing === "number" ? { letterSpacing: valueStyle.letterSpacing } : {},
|
|
6817
|
+
...typeof valueStyle?.opacity === "number" ? { opacity: valueStyle.opacity } : {},
|
|
6818
|
+
align: typeof valueStyle?.align === "string" ? valueStyle.align : "center"
|
|
6819
|
+
}
|
|
6820
|
+
};
|
|
6821
|
+
if (o.unitLabel !== void 0) valueChild.unitLabel = o.unitLabel;
|
|
6822
|
+
const {
|
|
6823
|
+
valueStyle: _vs,
|
|
6824
|
+
buttonColor: _bc,
|
|
6825
|
+
unitLabel: _ul,
|
|
6826
|
+
...rest
|
|
6827
|
+
} = o;
|
|
6828
|
+
return {
|
|
6829
|
+
...rest,
|
|
6830
|
+
direction: typeof o.direction === "string" ? o.direction : "horizontal",
|
|
6831
|
+
gap: typeof o.gap === "number" ? o.gap : 12,
|
|
6832
|
+
align: typeof o.align === "string" ? o.align : "center",
|
|
6833
|
+
...typeof o.distribution === "string" ? { distribution: o.distribution } : {},
|
|
6834
|
+
children: [mkButton("decrement", "-"), valueChild, mkButton("increment", "+")]
|
|
6835
|
+
};
|
|
6836
|
+
};
|
|
6837
|
+
var refineNumberStepperChildren2 = (data, ctx) => {
|
|
6838
|
+
const buttons = data.children.filter((c) => c.kind === "number_stepper_button");
|
|
6839
|
+
const values = data.children.filter((c) => c.kind === "number_stepper_value");
|
|
6840
|
+
const other = data.children.filter(
|
|
6841
|
+
(c) => c.kind !== "number_stepper_button" && c.kind !== "number_stepper_value"
|
|
6842
|
+
);
|
|
6843
|
+
if (other.length > 0) {
|
|
6844
|
+
ctx.addIssue({
|
|
6845
|
+
code: external_exports.ZodIssueCode.custom,
|
|
6846
|
+
message: "number_stepper children must be number_stepper_button or number_stepper_value",
|
|
6847
|
+
path: ["children"]
|
|
6848
|
+
});
|
|
6849
|
+
}
|
|
6850
|
+
const roles = /* @__PURE__ */ new Set();
|
|
6851
|
+
for (const b of buttons) {
|
|
6852
|
+
if (b.kind !== "number_stepper_button") continue;
|
|
6853
|
+
if (roles.has(b.role)) {
|
|
6854
|
+
ctx.addIssue({
|
|
6855
|
+
code: external_exports.ZodIssueCode.custom,
|
|
6856
|
+
message: `duplicate number_stepper_button role "${b.role}"`,
|
|
6857
|
+
path: ["children"]
|
|
6858
|
+
});
|
|
6859
|
+
}
|
|
6860
|
+
roles.add(b.role);
|
|
6861
|
+
}
|
|
6862
|
+
for (const role of NUMBER_STEPPER_BUTTON_ROLES2) {
|
|
6863
|
+
if (!roles.has(role)) {
|
|
6864
|
+
ctx.addIssue({
|
|
6865
|
+
code: external_exports.ZodIssueCode.custom,
|
|
6866
|
+
message: `number_stepper requires a number_stepper_button with role "${role}"`,
|
|
6867
|
+
path: ["children"]
|
|
6868
|
+
});
|
|
6869
|
+
}
|
|
6870
|
+
}
|
|
6871
|
+
if (values.length !== 1) {
|
|
6872
|
+
ctx.addIssue({
|
|
6873
|
+
code: external_exports.ZodIssueCode.custom,
|
|
6874
|
+
message: `number_stepper must have exactly one number_stepper_value (found ${values.length})`,
|
|
6875
|
+
path: ["children"]
|
|
6876
|
+
});
|
|
6877
|
+
}
|
|
6878
|
+
};
|
|
6879
|
+
var NumberStepperLayerSchemaValidated2 = external_exports.object({
|
|
6880
|
+
...baseLayerShape2,
|
|
6881
|
+
kind: external_exports.literal("number_stepper"),
|
|
6882
|
+
fieldKey: FieldKeySchema2,
|
|
6883
|
+
min: external_exports.number(),
|
|
6884
|
+
max: external_exports.number(),
|
|
6885
|
+
step: external_exports.number().positive().optional(),
|
|
6886
|
+
defaultValue: external_exports.number().optional(),
|
|
6887
|
+
classification: FieldClassificationSchema2,
|
|
6888
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
6889
|
+
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
6890
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
6891
|
+
distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
6892
|
+
children: external_exports.lazy(
|
|
6893
|
+
() => external_exports.array(external_exports.union([NumberStepperButtonLayerSchema2, NumberStepperValueLayerSchema2])).min(1)
|
|
6894
|
+
),
|
|
6895
|
+
style: CommonStyleSchema2.optional(),
|
|
6896
|
+
styleBreakpoints: CommonStyleBreakpointsSchema2
|
|
6897
|
+
}).superRefine(refineNumberStepperChildren2);
|
|
6898
|
+
var NumberStepperLayerSchema2 = external_exports.preprocess(
|
|
6899
|
+
migrateNumberStepperIncoming2,
|
|
6900
|
+
NumberStepperLayerSchemaValidated2
|
|
6901
|
+
);
|
|
6902
|
+
var PhoneInputLayerSchema2 = external_exports.object({
|
|
6903
|
+
...baseLayerShape2,
|
|
6904
|
+
kind: external_exports.literal("phone_input"),
|
|
6905
|
+
fieldKey: FieldKeySchema2,
|
|
6906
|
+
defaultCountryCode: CountryCodeSchema2.optional(),
|
|
6907
|
+
allowedCountryCodes: external_exports.array(CountryCodeSchema2).min(1).max(250).optional(),
|
|
6908
|
+
required: external_exports.boolean().optional(),
|
|
6909
|
+
placeholder: LocalizedTextSchema3.optional(),
|
|
6910
|
+
classification: FieldClassificationSchema2,
|
|
6911
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer62())).optional(),
|
|
6912
|
+
fieldStyle: TextInputFieldStyleSchema2.optional(),
|
|
6913
|
+
style: CommonStyleSchema2.optional(),
|
|
6914
|
+
styleBreakpoints: CommonStyleBreakpointsSchema2
|
|
6915
|
+
});
|
|
6916
|
+
var AddressInputFieldSchema2 = external_exports.enum(ADDRESS_INPUT_FIELDS2);
|
|
6917
|
+
var AddressInputPlaceholdersSchema2 = external_exports.object({
|
|
6918
|
+
line1: LocalizedTextSchema3.optional(),
|
|
6919
|
+
line2: LocalizedTextSchema3.optional(),
|
|
6920
|
+
city: LocalizedTextSchema3.optional(),
|
|
6921
|
+
region: LocalizedTextSchema3.optional(),
|
|
6922
|
+
postalCode: LocalizedTextSchema3.optional(),
|
|
6923
|
+
country: LocalizedTextSchema3.optional()
|
|
6924
|
+
}).partial();
|
|
6925
|
+
var AddressInputLayerSchema2 = external_exports.object({
|
|
6926
|
+
...baseLayerShape2,
|
|
6927
|
+
kind: external_exports.literal("address_input"),
|
|
6928
|
+
fieldKey: FieldKeySchema2,
|
|
6929
|
+
requiredFields: external_exports.array(AddressInputFieldSchema2).min(1).max(6).optional(),
|
|
6930
|
+
showLine2: external_exports.boolean().optional(),
|
|
6931
|
+
showRegion: external_exports.boolean().optional(),
|
|
6932
|
+
defaultCountryCode: CountryCodeSchema2.optional(),
|
|
6933
|
+
placeholders: AddressInputPlaceholdersSchema2.optional(),
|
|
6934
|
+
classification: FieldClassificationSchema2,
|
|
6935
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer62())).optional(),
|
|
6936
|
+
fieldStyle: TextInputFieldStyleSchema2.optional(),
|
|
6937
|
+
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
6938
|
+
style: CommonStyleSchema2.optional(),
|
|
6939
|
+
styleBreakpoints: CommonStyleBreakpointsSchema2
|
|
6940
|
+
});
|
|
6409
6941
|
var CarouselIndicatorsStyleSchema2 = external_exports.object({
|
|
6410
6942
|
width: external_exports.number().int().min(1).max(64).optional(),
|
|
6411
6943
|
height: external_exports.number().int().min(1).max(64).optional(),
|
|
@@ -6558,6 +7090,12 @@ layerSchemaStore2.schema = external_exports.lazy(
|
|
|
6558
7090
|
TextInputLayerSchema2,
|
|
6559
7091
|
ScaleInputLayerSchema2,
|
|
6560
7092
|
WheelPickerLayerSchema2,
|
|
7093
|
+
DateTimeInputLayerSchema2,
|
|
7094
|
+
NumberStepperLayerSchema2,
|
|
7095
|
+
NumberStepperButtonLayerSchema2,
|
|
7096
|
+
NumberStepperValueLayerSchema2,
|
|
7097
|
+
PhoneInputLayerSchema2,
|
|
7098
|
+
AddressInputLayerSchema2,
|
|
6561
7099
|
OAuthLoginLayerSchema2,
|
|
6562
7100
|
OAuthProviderPresetLayerSchema2,
|
|
6563
7101
|
OAuthProviderCustomLayerSchema2,
|
|
@@ -6643,7 +7181,9 @@ var EVENT_NAMES = [
|
|
|
6643
7181
|
/** Emitted once per provider id when merged SDK attributes first expose that attribution source (used for integration health checks). */
|
|
6644
7182
|
"attribution_context_observed",
|
|
6645
7183
|
/** Successful in-app purchase from an external surface (e.g. RevenueCat paywall); commerce fields live in `properties`. */
|
|
6646
|
-
"iap_purchase"
|
|
7184
|
+
"iap_purchase",
|
|
7185
|
+
"banner_impression",
|
|
7186
|
+
"banner_dismissed"
|
|
6647
7187
|
];
|
|
6648
7188
|
var MediaTypeSchema3 = external_exports.enum(MEDIA_TYPES3);
|
|
6649
7189
|
var MediaReferenceSchema3 = external_exports.object({
|
|
@@ -7016,7 +7556,8 @@ var ButtonActionSchema3 = external_exports.discriminatedUnion("kind", [
|
|
|
7016
7556
|
kind: external_exports.literal("advance_carousel"),
|
|
7017
7557
|
targetLayerId: external_exports.string().min(1),
|
|
7018
7558
|
onLast: CarouselAdvanceOnLastSchema3.optional()
|
|
7019
|
-
})
|
|
7559
|
+
}),
|
|
7560
|
+
external_exports.object({ kind: external_exports.literal("dismiss_banner") })
|
|
7020
7561
|
]);
|
|
7021
7562
|
var TEXT_INPUT_TYPES3 = ["plain", "email", "phone", "url", "number", "multiline"];
|
|
7022
7563
|
var TextInputTypeSchema3 = external_exports.enum(TEXT_INPUT_TYPES3);
|
|
@@ -7049,11 +7590,11 @@ var OAuthPresetButtonChromeBreakpointsSchema3 = external_exports.object({
|
|
|
7049
7590
|
}).partial().optional();
|
|
7050
7591
|
var EMAIL_PASSWORD_AUTH_MODES3 = ["sign_in", "sign_up"];
|
|
7051
7592
|
var EMAIL_PASSWORD_SLOTS3 = ["email", "password", "confirm"];
|
|
7052
|
-
var
|
|
7593
|
+
var lazyLayer8 = () => layerSchemaStore3.schema;
|
|
7053
7594
|
var ButtonLayerSchema3 = external_exports.object({
|
|
7054
7595
|
...baseLayerShape3,
|
|
7055
7596
|
kind: external_exports.literal("button"),
|
|
7056
|
-
children: external_exports.lazy(() => external_exports.array(
|
|
7597
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer8())),
|
|
7057
7598
|
action: ButtonActionSchema3,
|
|
7058
7599
|
variant: ButtonLayerVariantSchema3,
|
|
7059
7600
|
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
@@ -7067,7 +7608,7 @@ var ButtonLayerSchema3 = external_exports.object({
|
|
|
7067
7608
|
var BackButtonLayerSchema3 = external_exports.object({
|
|
7068
7609
|
...baseLayerShape3,
|
|
7069
7610
|
kind: external_exports.literal("back_button"),
|
|
7070
|
-
children: external_exports.lazy(() => external_exports.array(
|
|
7611
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer8())),
|
|
7071
7612
|
variant: ButtonLayerVariantSchema3,
|
|
7072
7613
|
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
7073
7614
|
gap: external_exports.number().int().min(0).optional(),
|
|
@@ -7451,6 +7992,22 @@ var OAuthLoginProvidersArraySchema2 = external_exports.array(OAuthLoginProviderS
|
|
|
7451
7992
|
});
|
|
7452
7993
|
var lazyLayer43 = () => layerSchemaStore3.schema;
|
|
7453
7994
|
var EmailPasswordAuthModeSchema3 = external_exports.enum(EMAIL_PASSWORD_AUTH_MODES3);
|
|
7995
|
+
var PasswordRulesSchema3 = external_exports.object({
|
|
7996
|
+
minLength: external_exports.number().int().min(4).max(128).optional(),
|
|
7997
|
+
maxLength: external_exports.number().int().min(4).max(128).optional(),
|
|
7998
|
+
requireUppercase: external_exports.boolean().optional(),
|
|
7999
|
+
requireLowercase: external_exports.boolean().optional(),
|
|
8000
|
+
requireDigit: external_exports.boolean().optional(),
|
|
8001
|
+
requireSpecial: external_exports.boolean().optional()
|
|
8002
|
+
}).strict().superRefine((data, ctx) => {
|
|
8003
|
+
if (data.minLength !== void 0 && data.maxLength !== void 0 && data.maxLength < data.minLength) {
|
|
8004
|
+
ctx.addIssue({
|
|
8005
|
+
code: external_exports.ZodIssueCode.custom,
|
|
8006
|
+
message: "passwordRules.maxLength must be >= minLength",
|
|
8007
|
+
path: ["maxLength"]
|
|
8008
|
+
});
|
|
8009
|
+
}
|
|
8010
|
+
});
|
|
7454
8011
|
var migrateEmailPasswordAuthIncoming3 = (raw) => {
|
|
7455
8012
|
if (!raw || typeof raw !== "object") return raw;
|
|
7456
8013
|
const o = raw;
|
|
@@ -7567,7 +8124,10 @@ var EmailPasswordAuthLayerSchemaValidated3 = external_exports.object({
|
|
|
7567
8124
|
kind: external_exports.literal("email_password_auth"),
|
|
7568
8125
|
mode: EmailPasswordAuthModeSchema3,
|
|
7569
8126
|
fieldKey: FieldKeySchema3,
|
|
8127
|
+
/** @deprecated Prefer `passwordRules.minLength`. Kept for backward compatibility. */
|
|
7570
8128
|
minPasswordLength: external_exports.number().int().min(4).max(128).optional(),
|
|
8129
|
+
/** Composition rules beyond minimum length (uppercase, digit, special, max). */
|
|
8130
|
+
passwordRules: PasswordRulesSchema3.optional(),
|
|
7571
8131
|
children: external_exports.lazy(
|
|
7572
8132
|
() => external_exports.array(external_exports.union([EmailPasswordFieldLayerSchema3, EmailPasswordSubmitLayerSchema3])).min(1)
|
|
7573
8133
|
),
|
|
@@ -7686,16 +8246,39 @@ var TextInputFieldStyleSchema3 = external_exports.object({
|
|
|
7686
8246
|
letterSpacing: external_exports.number().min(-0.5).max(1).optional(),
|
|
7687
8247
|
opacity: external_exports.number().min(0).max(1).optional()
|
|
7688
8248
|
}).partial();
|
|
8249
|
+
var TextInputAutoCapitalizeSchema3 = external_exports.enum([
|
|
8250
|
+
"none",
|
|
8251
|
+
"sentences",
|
|
8252
|
+
"words",
|
|
8253
|
+
"characters"
|
|
8254
|
+
]);
|
|
8255
|
+
var TextInputReturnKeyTypeSchema3 = external_exports.enum([
|
|
8256
|
+
"done",
|
|
8257
|
+
"next",
|
|
8258
|
+
"go",
|
|
8259
|
+
"send",
|
|
8260
|
+
"search",
|
|
8261
|
+
"default"
|
|
8262
|
+
]);
|
|
8263
|
+
var TextInputValidationModeSchema3 = external_exports.enum(["onBlur", "onSubmit", "live"]);
|
|
7689
8264
|
var TextInputLayerSchema3 = external_exports.object({
|
|
7690
8265
|
...baseLayerShape3,
|
|
7691
8266
|
kind: external_exports.literal("text_input"),
|
|
7692
8267
|
fieldKey: FieldKeySchema3,
|
|
7693
8268
|
placeholder: LocalizedTextSchema4.optional(),
|
|
8269
|
+
/** Optional helper copy shown under the field when valid / untouched. */
|
|
8270
|
+
helperText: LocalizedTextSchema4.optional(),
|
|
7694
8271
|
inputType: TextInputTypeSchema3.optional(),
|
|
7695
8272
|
required: external_exports.boolean().optional(),
|
|
7696
8273
|
minLength: external_exports.number().int().min(0).max(2e3).optional(),
|
|
7697
8274
|
maxLength: external_exports.number().int().positive().max(2e3).optional(),
|
|
7698
8275
|
classification: FieldClassificationSchema3,
|
|
8276
|
+
/** Override autocapitalize (defaults from `inputType` when omitted). */
|
|
8277
|
+
autoCapitalize: TextInputAutoCapitalizeSchema3.optional(),
|
|
8278
|
+
/** Soft keyboard return key label. */
|
|
8279
|
+
returnKeyType: TextInputReturnKeyTypeSchema3.optional(),
|
|
8280
|
+
/** When to show inline validation errors (default `onBlur`). */
|
|
8281
|
+
validationMode: TextInputValidationModeSchema3.optional(),
|
|
7699
8282
|
children: external_exports.lazy(() => external_exports.array(lazyLayer53())).optional(),
|
|
7700
8283
|
/** Typography for the native input's typed text. */
|
|
7701
8284
|
fieldStyle: TextInputFieldStyleSchema3.optional(),
|
|
@@ -7767,28 +8350,243 @@ var WheelPickerLayerSchema3 = external_exports.object({
|
|
|
7767
8350
|
style: CommonStyleSchema3.optional(),
|
|
7768
8351
|
styleBreakpoints: CommonStyleBreakpointsSchema3
|
|
7769
8352
|
});
|
|
7770
|
-
var
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
}).
|
|
7782
|
-
var
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
8353
|
+
var DATE_TIME_INPUT_MODES3 = ["date", "time", "datetime"];
|
|
8354
|
+
var NUMBER_STEPPER_BUTTON_ROLES3 = ["decrement", "increment"];
|
|
8355
|
+
var ADDRESS_INPUT_FIELDS3 = [
|
|
8356
|
+
"line1",
|
|
8357
|
+
"line2",
|
|
8358
|
+
"city",
|
|
8359
|
+
"region",
|
|
8360
|
+
"postalCode",
|
|
8361
|
+
"country"
|
|
8362
|
+
];
|
|
8363
|
+
var lazyLayer63 = () => layerSchemaStore3.schema;
|
|
8364
|
+
var CountryCodeSchema3 = external_exports.string().length(2).regex(/^[A-Za-z]{2}$/u).transform((s) => s.toUpperCase());
|
|
8365
|
+
var DateTimeInputModeSchema3 = external_exports.enum(DATE_TIME_INPUT_MODES3);
|
|
8366
|
+
var DateTimeInputLayerSchema3 = external_exports.object({
|
|
8367
|
+
...baseLayerShape3,
|
|
8368
|
+
kind: external_exports.literal("date_time_input"),
|
|
8369
|
+
fieldKey: FieldKeySchema3,
|
|
8370
|
+
mode: DateTimeInputModeSchema3.optional(),
|
|
8371
|
+
required: external_exports.boolean().optional(),
|
|
8372
|
+
min: external_exports.string().min(1).max(64).optional(),
|
|
8373
|
+
max: external_exports.string().min(1).max(64).optional(),
|
|
8374
|
+
defaultValue: external_exports.string().min(1).max(64).optional(),
|
|
8375
|
+
placeholder: LocalizedTextSchema4.optional(),
|
|
8376
|
+
classification: FieldClassificationSchema3,
|
|
8377
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer63())).optional(),
|
|
8378
|
+
fieldStyle: TextInputFieldStyleSchema3.optional(),
|
|
8379
|
+
style: CommonStyleSchema3.optional(),
|
|
8380
|
+
styleBreakpoints: CommonStyleBreakpointsSchema3
|
|
7790
8381
|
});
|
|
7791
|
-
var
|
|
8382
|
+
var NumberStepperButtonRoleSchema3 = external_exports.enum(NUMBER_STEPPER_BUTTON_ROLES3);
|
|
8383
|
+
var NumberStepperButtonLayerSchema3 = external_exports.object({
|
|
8384
|
+
...baseLayerShape3,
|
|
8385
|
+
kind: external_exports.literal("number_stepper_button"),
|
|
8386
|
+
role: NumberStepperButtonRoleSchema3,
|
|
8387
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer63())).optional(),
|
|
8388
|
+
style: CommonStyleSchema3.optional(),
|
|
8389
|
+
styleBreakpoints: CommonStyleBreakpointsSchema3
|
|
8390
|
+
});
|
|
8391
|
+
var NumberStepperValueLayerSchema3 = external_exports.object({
|
|
8392
|
+
...baseLayerShape3,
|
|
8393
|
+
kind: external_exports.literal("number_stepper_value"),
|
|
8394
|
+
unitLabel: LocalizedTextSchema4.optional(),
|
|
8395
|
+
style: TextStyleSchema3.optional(),
|
|
8396
|
+
styleBreakpoints: TextStyleBreakpointsSchema3
|
|
8397
|
+
});
|
|
8398
|
+
var migrateNumberStepperIncoming3 = (raw) => {
|
|
8399
|
+
if (!raw || typeof raw !== "object") return raw;
|
|
8400
|
+
const o = raw;
|
|
8401
|
+
if (o.kind !== "number_stepper") return raw;
|
|
8402
|
+
if (Array.isArray(o.children) && o.children.length > 0) return raw;
|
|
8403
|
+
const idBase = typeof o.id === "string" ? o.id : "lyr_number_stepper";
|
|
8404
|
+
const slugRaw = idBase.replace(/^lyr_/i, "").replace(/[^a-z0-9_]/gi, "_");
|
|
8405
|
+
const slug = slugRaw.length > 0 ? slugRaw.slice(0, 40) : "stepper";
|
|
8406
|
+
const valueStyle = o.valueStyle && typeof o.valueStyle === "object" ? o.valueStyle : void 0;
|
|
8407
|
+
const buttonColor = o.buttonColor;
|
|
8408
|
+
const mkButton = (role, glyph) => {
|
|
8409
|
+
const suf = role === "decrement" ? "dec" : "inc";
|
|
8410
|
+
return {
|
|
8411
|
+
id: `lyr_${slug}_btn_${suf}`.slice(0, 64),
|
|
8412
|
+
kind: "number_stepper_button",
|
|
8413
|
+
role,
|
|
8414
|
+
style: {
|
|
8415
|
+
width: 36,
|
|
8416
|
+
height: 36,
|
|
8417
|
+
radius: 8
|
|
8418
|
+
},
|
|
8419
|
+
children: [
|
|
8420
|
+
{
|
|
8421
|
+
id: `lyr_${slug}_btn_${suf}_txt`.slice(0, 64),
|
|
8422
|
+
kind: "text",
|
|
8423
|
+
text: { default: glyph },
|
|
8424
|
+
style: {
|
|
8425
|
+
fontSize: 20,
|
|
8426
|
+
align: "center",
|
|
8427
|
+
...buttonColor !== void 0 ? { color: buttonColor } : {}
|
|
8428
|
+
}
|
|
8429
|
+
}
|
|
8430
|
+
]
|
|
8431
|
+
};
|
|
8432
|
+
};
|
|
8433
|
+
const valueChild = {
|
|
8434
|
+
id: `lyr_${slug}_value`.slice(0, 64),
|
|
8435
|
+
kind: "number_stepper_value",
|
|
8436
|
+
style: {
|
|
8437
|
+
fontSize: typeof valueStyle?.fontSize === "number" ? valueStyle.fontSize : 14,
|
|
8438
|
+
width: "full",
|
|
8439
|
+
...typeof valueStyle?.fontFamily === "string" ? { fontFamily: valueStyle.fontFamily } : {},
|
|
8440
|
+
...typeof valueStyle?.fontWeight === "number" ? { fontWeight: valueStyle.fontWeight } : {},
|
|
8441
|
+
...valueStyle?.color !== void 0 ? { color: valueStyle.color } : {},
|
|
8442
|
+
...typeof valueStyle?.lineHeight === "number" ? { lineHeight: valueStyle.lineHeight } : {},
|
|
8443
|
+
...typeof valueStyle?.letterSpacing === "number" ? { letterSpacing: valueStyle.letterSpacing } : {},
|
|
8444
|
+
...typeof valueStyle?.opacity === "number" ? { opacity: valueStyle.opacity } : {},
|
|
8445
|
+
align: typeof valueStyle?.align === "string" ? valueStyle.align : "center"
|
|
8446
|
+
}
|
|
8447
|
+
};
|
|
8448
|
+
if (o.unitLabel !== void 0) valueChild.unitLabel = o.unitLabel;
|
|
8449
|
+
const {
|
|
8450
|
+
valueStyle: _vs,
|
|
8451
|
+
buttonColor: _bc,
|
|
8452
|
+
unitLabel: _ul,
|
|
8453
|
+
...rest
|
|
8454
|
+
} = o;
|
|
8455
|
+
return {
|
|
8456
|
+
...rest,
|
|
8457
|
+
direction: typeof o.direction === "string" ? o.direction : "horizontal",
|
|
8458
|
+
gap: typeof o.gap === "number" ? o.gap : 12,
|
|
8459
|
+
align: typeof o.align === "string" ? o.align : "center",
|
|
8460
|
+
...typeof o.distribution === "string" ? { distribution: o.distribution } : {},
|
|
8461
|
+
children: [mkButton("decrement", "-"), valueChild, mkButton("increment", "+")]
|
|
8462
|
+
};
|
|
8463
|
+
};
|
|
8464
|
+
var refineNumberStepperChildren3 = (data, ctx) => {
|
|
8465
|
+
const buttons = data.children.filter((c) => c.kind === "number_stepper_button");
|
|
8466
|
+
const values = data.children.filter((c) => c.kind === "number_stepper_value");
|
|
8467
|
+
const other = data.children.filter(
|
|
8468
|
+
(c) => c.kind !== "number_stepper_button" && c.kind !== "number_stepper_value"
|
|
8469
|
+
);
|
|
8470
|
+
if (other.length > 0) {
|
|
8471
|
+
ctx.addIssue({
|
|
8472
|
+
code: external_exports.ZodIssueCode.custom,
|
|
8473
|
+
message: "number_stepper children must be number_stepper_button or number_stepper_value",
|
|
8474
|
+
path: ["children"]
|
|
8475
|
+
});
|
|
8476
|
+
}
|
|
8477
|
+
const roles = /* @__PURE__ */ new Set();
|
|
8478
|
+
for (const b of buttons) {
|
|
8479
|
+
if (b.kind !== "number_stepper_button") continue;
|
|
8480
|
+
if (roles.has(b.role)) {
|
|
8481
|
+
ctx.addIssue({
|
|
8482
|
+
code: external_exports.ZodIssueCode.custom,
|
|
8483
|
+
message: `duplicate number_stepper_button role "${b.role}"`,
|
|
8484
|
+
path: ["children"]
|
|
8485
|
+
});
|
|
8486
|
+
}
|
|
8487
|
+
roles.add(b.role);
|
|
8488
|
+
}
|
|
8489
|
+
for (const role of NUMBER_STEPPER_BUTTON_ROLES3) {
|
|
8490
|
+
if (!roles.has(role)) {
|
|
8491
|
+
ctx.addIssue({
|
|
8492
|
+
code: external_exports.ZodIssueCode.custom,
|
|
8493
|
+
message: `number_stepper requires a number_stepper_button with role "${role}"`,
|
|
8494
|
+
path: ["children"]
|
|
8495
|
+
});
|
|
8496
|
+
}
|
|
8497
|
+
}
|
|
8498
|
+
if (values.length !== 1) {
|
|
8499
|
+
ctx.addIssue({
|
|
8500
|
+
code: external_exports.ZodIssueCode.custom,
|
|
8501
|
+
message: `number_stepper must have exactly one number_stepper_value (found ${values.length})`,
|
|
8502
|
+
path: ["children"]
|
|
8503
|
+
});
|
|
8504
|
+
}
|
|
8505
|
+
};
|
|
8506
|
+
var NumberStepperLayerSchemaValidated3 = external_exports.object({
|
|
8507
|
+
...baseLayerShape3,
|
|
8508
|
+
kind: external_exports.literal("number_stepper"),
|
|
8509
|
+
fieldKey: FieldKeySchema3,
|
|
8510
|
+
min: external_exports.number(),
|
|
8511
|
+
max: external_exports.number(),
|
|
8512
|
+
step: external_exports.number().positive().optional(),
|
|
8513
|
+
defaultValue: external_exports.number().optional(),
|
|
8514
|
+
classification: FieldClassificationSchema3,
|
|
8515
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
8516
|
+
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
8517
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
8518
|
+
distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
8519
|
+
children: external_exports.lazy(
|
|
8520
|
+
() => external_exports.array(external_exports.union([NumberStepperButtonLayerSchema3, NumberStepperValueLayerSchema3])).min(1)
|
|
8521
|
+
),
|
|
8522
|
+
style: CommonStyleSchema3.optional(),
|
|
8523
|
+
styleBreakpoints: CommonStyleBreakpointsSchema3
|
|
8524
|
+
}).superRefine(refineNumberStepperChildren3);
|
|
8525
|
+
var NumberStepperLayerSchema3 = external_exports.preprocess(
|
|
8526
|
+
migrateNumberStepperIncoming3,
|
|
8527
|
+
NumberStepperLayerSchemaValidated3
|
|
8528
|
+
);
|
|
8529
|
+
var PhoneInputLayerSchema3 = external_exports.object({
|
|
8530
|
+
...baseLayerShape3,
|
|
8531
|
+
kind: external_exports.literal("phone_input"),
|
|
8532
|
+
fieldKey: FieldKeySchema3,
|
|
8533
|
+
defaultCountryCode: CountryCodeSchema3.optional(),
|
|
8534
|
+
allowedCountryCodes: external_exports.array(CountryCodeSchema3).min(1).max(250).optional(),
|
|
8535
|
+
required: external_exports.boolean().optional(),
|
|
8536
|
+
placeholder: LocalizedTextSchema4.optional(),
|
|
8537
|
+
classification: FieldClassificationSchema3,
|
|
8538
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer63())).optional(),
|
|
8539
|
+
fieldStyle: TextInputFieldStyleSchema3.optional(),
|
|
8540
|
+
style: CommonStyleSchema3.optional(),
|
|
8541
|
+
styleBreakpoints: CommonStyleBreakpointsSchema3
|
|
8542
|
+
});
|
|
8543
|
+
var AddressInputFieldSchema3 = external_exports.enum(ADDRESS_INPUT_FIELDS3);
|
|
8544
|
+
var AddressInputPlaceholdersSchema3 = external_exports.object({
|
|
8545
|
+
line1: LocalizedTextSchema4.optional(),
|
|
8546
|
+
line2: LocalizedTextSchema4.optional(),
|
|
8547
|
+
city: LocalizedTextSchema4.optional(),
|
|
8548
|
+
region: LocalizedTextSchema4.optional(),
|
|
8549
|
+
postalCode: LocalizedTextSchema4.optional(),
|
|
8550
|
+
country: LocalizedTextSchema4.optional()
|
|
8551
|
+
}).partial();
|
|
8552
|
+
var AddressInputLayerSchema3 = external_exports.object({
|
|
8553
|
+
...baseLayerShape3,
|
|
8554
|
+
kind: external_exports.literal("address_input"),
|
|
8555
|
+
fieldKey: FieldKeySchema3,
|
|
8556
|
+
requiredFields: external_exports.array(AddressInputFieldSchema3).min(1).max(6).optional(),
|
|
8557
|
+
showLine2: external_exports.boolean().optional(),
|
|
8558
|
+
showRegion: external_exports.boolean().optional(),
|
|
8559
|
+
defaultCountryCode: CountryCodeSchema3.optional(),
|
|
8560
|
+
placeholders: AddressInputPlaceholdersSchema3.optional(),
|
|
8561
|
+
classification: FieldClassificationSchema3,
|
|
8562
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer63())).optional(),
|
|
8563
|
+
fieldStyle: TextInputFieldStyleSchema3.optional(),
|
|
8564
|
+
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
8565
|
+
style: CommonStyleSchema3.optional(),
|
|
8566
|
+
styleBreakpoints: CommonStyleBreakpointsSchema3
|
|
8567
|
+
});
|
|
8568
|
+
var CarouselIndicatorsStyleSchema3 = external_exports.object({
|
|
8569
|
+
width: external_exports.number().int().min(1).max(64).optional(),
|
|
8570
|
+
height: external_exports.number().int().min(1).max(64).optional(),
|
|
8571
|
+
defaultColor: ThemedColorSchema3.optional(),
|
|
8572
|
+
defaultOpacity: external_exports.number().min(0).max(1).optional(),
|
|
8573
|
+
activeColor: ThemedColorSchema3.optional(),
|
|
8574
|
+
activeOpacity: external_exports.number().min(0).max(1).optional(),
|
|
8575
|
+
activeWidth: external_exports.number().int().min(1).max(64).optional(),
|
|
8576
|
+
activeHeight: external_exports.number().int().min(1).max(64).optional(),
|
|
8577
|
+
border: BorderSchema3.optional(),
|
|
8578
|
+
activeBorder: BorderSchema3.optional()
|
|
8579
|
+
}).partial();
|
|
8580
|
+
var CarouselPageControlSchema3 = external_exports.object({
|
|
8581
|
+
position: external_exports.enum(["top", "bottom"]),
|
|
8582
|
+
spacing: external_exports.number().int().min(0).optional(),
|
|
8583
|
+
padding: PaddingSchema3.optional(),
|
|
8584
|
+
margin: PaddingSchema3.optional(),
|
|
8585
|
+
indicators: CarouselIndicatorsStyleSchema3.optional(),
|
|
8586
|
+
border: BorderSchema3.optional(),
|
|
8587
|
+
shadow: DropShadowSchema3.optional()
|
|
8588
|
+
});
|
|
8589
|
+
var CarouselLayerSchema3 = external_exports.object({
|
|
7792
8590
|
...baseLayerShape3,
|
|
7793
8591
|
kind: external_exports.literal("carousel"),
|
|
7794
8592
|
slides: external_exports.lazy(() => external_exports.array(StackLayerSchema3).min(1)),
|
|
@@ -7972,6 +8770,12 @@ layerSchemaStore3.schema = external_exports.lazy(
|
|
|
7972
8770
|
TextInputLayerSchema3,
|
|
7973
8771
|
ScaleInputLayerSchema3,
|
|
7974
8772
|
WheelPickerLayerSchema3,
|
|
8773
|
+
DateTimeInputLayerSchema3,
|
|
8774
|
+
NumberStepperLayerSchema3,
|
|
8775
|
+
NumberStepperButtonLayerSchema3,
|
|
8776
|
+
NumberStepperValueLayerSchema3,
|
|
8777
|
+
PhoneInputLayerSchema3,
|
|
8778
|
+
AddressInputLayerSchema3,
|
|
7975
8779
|
OAuthLoginLayerSchema3,
|
|
7976
8780
|
OAuthProviderPresetLayerSchema3,
|
|
7977
8781
|
OAuthProviderCustomLayerSchema3,
|
|
@@ -7996,14 +8800,21 @@ var layerChildren = (layer) => {
|
|
|
7996
8800
|
case "oauth_login":
|
|
7997
8801
|
case "email_password_auth":
|
|
7998
8802
|
case "email_password_submit":
|
|
8803
|
+
case "number_stepper":
|
|
7999
8804
|
return layer.children;
|
|
8000
8805
|
case "carousel":
|
|
8001
8806
|
return layer.slides;
|
|
8002
8807
|
case "text_input":
|
|
8003
8808
|
case "scale_input":
|
|
8004
8809
|
case "wheel_picker":
|
|
8810
|
+
case "date_time_input":
|
|
8811
|
+
case "phone_input":
|
|
8812
|
+
case "address_input":
|
|
8005
8813
|
case "email_password_field":
|
|
8814
|
+
case "number_stepper_button":
|
|
8006
8815
|
return layer.children ?? [];
|
|
8816
|
+
case "number_stepper_value":
|
|
8817
|
+
return [];
|
|
8007
8818
|
case "oauth_provider":
|
|
8008
8819
|
return layer.variant === "custom" ? layer.children : [];
|
|
8009
8820
|
default:
|
|
@@ -8041,7 +8852,15 @@ var layerHasAbsolutePositionAuthored = (layer) => {
|
|
|
8041
8852
|
case "text_input":
|
|
8042
8853
|
case "scale_input":
|
|
8043
8854
|
case "wheel_picker":
|
|
8855
|
+
case "date_time_input":
|
|
8856
|
+
case "number_stepper":
|
|
8857
|
+
case "phone_input":
|
|
8858
|
+
case "address_input":
|
|
8044
8859
|
return commonStyleHasAbsolutePosition(layer.style, void 0);
|
|
8860
|
+
case "number_stepper_button":
|
|
8861
|
+
return commonStyleHasAbsolutePosition(layer.style, layer.styleBreakpoints);
|
|
8862
|
+
case "number_stepper_value":
|
|
8863
|
+
return commonStyleHasAbsolutePosition(layer.style, layer.styleBreakpoints);
|
|
8045
8864
|
case "oauth_provider":
|
|
8046
8865
|
if (layer.variant === "preset") {
|
|
8047
8866
|
return commonStyleHasAbsolutePosition(layer.style, layer.styleBreakpoints);
|
|
@@ -8065,7 +8884,7 @@ var layerHasAbsolutePositionAuthored = (layer) => {
|
|
|
8065
8884
|
return false;
|
|
8066
8885
|
}
|
|
8067
8886
|
};
|
|
8068
|
-
var isInputLayer2 = (l) => l.kind === "single_choice" || l.kind === "multiple_choice" || l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker";
|
|
8887
|
+
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
8888
|
var ANIMATABLE_PROPERTIES = [
|
|
8070
8889
|
"opacity",
|
|
8071
8890
|
"translateX",
|
|
@@ -8317,7 +9136,11 @@ var walkScreenLayersWithLayoutContext = (screen, fn) => {
|
|
|
8317
9136
|
for (const c of l.children) {
|
|
8318
9137
|
visit(c, childCtx({ insideChoiceOption: true }));
|
|
8319
9138
|
}
|
|
8320
|
-
} else if (l.kind === "text_input" || l.kind === "scale_input") {
|
|
9139
|
+
} 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") {
|
|
9140
|
+
for (const c of l.children ?? []) visit(c, childCtx());
|
|
9141
|
+
} else if (l.kind === "number_stepper") {
|
|
9142
|
+
for (const c of l.children) visit(c, childCtx());
|
|
9143
|
+
} else if (l.kind === "number_stepper_button") {
|
|
8321
9144
|
for (const c of l.children ?? []) visit(c, childCtx());
|
|
8322
9145
|
} else if (l.kind === "oauth_login") {
|
|
8323
9146
|
for (const c of l.children) visit(c, childCtx());
|
|
@@ -8352,7 +9175,11 @@ var walkScreenLayers = (screen, fn) => {
|
|
|
8352
9175
|
else if (l.kind === "hyperlink") l.children.forEach(visit);
|
|
8353
9176
|
else if (l.kind === "single_choice" || l.kind === "multiple_choice") {
|
|
8354
9177
|
l.children.forEach(visit);
|
|
8355
|
-
} else if (l.kind === "text_input" || l.kind === "scale_input") {
|
|
9178
|
+
} 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") {
|
|
9179
|
+
l.children?.forEach(visit);
|
|
9180
|
+
} else if (l.kind === "number_stepper") {
|
|
9181
|
+
l.children.forEach(visit);
|
|
9182
|
+
} else if (l.kind === "number_stepper_button") {
|
|
8356
9183
|
l.children?.forEach(visit);
|
|
8357
9184
|
} else if (l.kind === "oauth_login") {
|
|
8358
9185
|
l.children.forEach(visit);
|
|
@@ -8435,7 +9262,13 @@ var NORMALIZED_SURFACE_OUTCOMES = [
|
|
|
8435
9262
|
"back"
|
|
8436
9263
|
];
|
|
8437
9264
|
var NormalizedSurfaceOutcomeSchema = external_exports.enum(NORMALIZED_SURFACE_OUTCOMES);
|
|
8438
|
-
var SurfaceProviderSchema = external_exports.enum([
|
|
9265
|
+
var SurfaceProviderSchema = external_exports.enum([
|
|
9266
|
+
"unspecified",
|
|
9267
|
+
"revenuecat",
|
|
9268
|
+
"superwall",
|
|
9269
|
+
"stripe",
|
|
9270
|
+
"headless"
|
|
9271
|
+
]);
|
|
8439
9272
|
var UnspecifiedExternalSurfaceConfigSchema = external_exports.object({
|
|
8440
9273
|
provider: external_exports.literal("unspecified")
|
|
8441
9274
|
});
|
|
@@ -8446,6 +9279,26 @@ var RevenueCatSurfaceConfigSchema = external_exports.object({
|
|
|
8446
9279
|
placementId: external_exports.string().min(1).max(128).optional(),
|
|
8447
9280
|
presentation: RevenueCatSurfacePresentationSchema.optional()
|
|
8448
9281
|
});
|
|
9282
|
+
var SuperwallSurfaceConfigSchema = external_exports.object({
|
|
9283
|
+
provider: external_exports.literal("superwall"),
|
|
9284
|
+
placementId: external_exports.string().min(1).max(128).optional()
|
|
9285
|
+
});
|
|
9286
|
+
var isStripePaymentLinkHost = (hostname) => {
|
|
9287
|
+
const host = hostname.toLowerCase();
|
|
9288
|
+
return host === "stripe.com" || host.endsWith(".stripe.com");
|
|
9289
|
+
};
|
|
9290
|
+
var StripePaymentLinkUrlSchema = external_exports.string().min(1).max(2048).refine((raw) => {
|
|
9291
|
+
try {
|
|
9292
|
+
const url = new URL(raw);
|
|
9293
|
+
return url.protocol === "https:" && isStripePaymentLinkHost(url.hostname);
|
|
9294
|
+
} catch {
|
|
9295
|
+
return false;
|
|
9296
|
+
}
|
|
9297
|
+
}, "Stripe Payment Link must be an https URL on buy.stripe.com or *.stripe.com");
|
|
9298
|
+
var StripeSurfaceConfigSchema = external_exports.object({
|
|
9299
|
+
provider: external_exports.literal("stripe"),
|
|
9300
|
+
paymentLinkUrl: StripePaymentLinkUrlSchema.optional()
|
|
9301
|
+
});
|
|
8449
9302
|
var ExternalSurfaceHostKeySchema = external_exports.string().min(1).max(64).regex(
|
|
8450
9303
|
/^[a-zA-Z][a-zA-Z0-9_]*$/,
|
|
8451
9304
|
"host key must start with a letter and contain only letters, digits, or underscores"
|
|
@@ -8458,6 +9311,8 @@ var HeadlessExternalSurfaceConfigSchema = external_exports.object({
|
|
|
8458
9311
|
var ExternalSurfaceConfigSchema = external_exports.discriminatedUnion("provider", [
|
|
8459
9312
|
UnspecifiedExternalSurfaceConfigSchema,
|
|
8460
9313
|
RevenueCatSurfaceConfigSchema,
|
|
9314
|
+
SuperwallSurfaceConfigSchema,
|
|
9315
|
+
StripeSurfaceConfigSchema,
|
|
8461
9316
|
HeadlessExternalSurfaceConfigSchema
|
|
8462
9317
|
]);
|
|
8463
9318
|
var ExternalSurfaceOutcomesMapSchema = external_exports.object({
|
|
@@ -8484,6 +9339,60 @@ var resolveExternalSurfaceHostKey = (node) => {
|
|
|
8484
9339
|
}
|
|
8485
9340
|
return node.id;
|
|
8486
9341
|
};
|
|
9342
|
+
var CHECKOUT_ATTEMPT_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
9343
|
+
var WEB_SDK_ORIGIN_MAX = 20;
|
|
9344
|
+
var StripeCheckoutAttemptStatusSchema = external_exports.enum([
|
|
9345
|
+
"pending",
|
|
9346
|
+
"confirmed",
|
|
9347
|
+
"cancelled",
|
|
9348
|
+
"expired"
|
|
9349
|
+
]);
|
|
9350
|
+
var AttributionValueSchema = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]);
|
|
9351
|
+
var WebSdkOriginSchema = external_exports.string().min(1).max(200).transform((raw, ctx) => {
|
|
9352
|
+
let url;
|
|
9353
|
+
try {
|
|
9354
|
+
url = new URL(raw);
|
|
9355
|
+
} catch {
|
|
9356
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "origin must be an absolute URL" });
|
|
9357
|
+
return external_exports.NEVER;
|
|
9358
|
+
}
|
|
9359
|
+
const local = url.hostname === "localhost" || url.hostname === "127.0.0.1";
|
|
9360
|
+
if (url.protocol !== "https:" && !(url.protocol === "http:" && local)) {
|
|
9361
|
+
ctx.addIssue({
|
|
9362
|
+
code: external_exports.ZodIssueCode.custom,
|
|
9363
|
+
message: "origin must be https, or http://localhost / http://127.0.0.1"
|
|
9364
|
+
});
|
|
9365
|
+
return external_exports.NEVER;
|
|
9366
|
+
}
|
|
9367
|
+
if (url.username || url.password || url.search || url.hash || url.pathname !== "/" && url.pathname !== "") {
|
|
9368
|
+
ctx.addIssue({
|
|
9369
|
+
code: external_exports.ZodIssueCode.custom,
|
|
9370
|
+
message: "origin must be scheme, host, and port only"
|
|
9371
|
+
});
|
|
9372
|
+
return external_exports.NEVER;
|
|
9373
|
+
}
|
|
9374
|
+
return url.origin;
|
|
9375
|
+
});
|
|
9376
|
+
var WebSdkOriginsSchema = external_exports.array(WebSdkOriginSchema).max(WEB_SDK_ORIGIN_MAX);
|
|
9377
|
+
var StripeCheckoutAttemptCreateRequestSchema = external_exports.object({
|
|
9378
|
+
channelId: external_exports.string().min(1).max(128),
|
|
9379
|
+
flowId: external_exports.string().uuid(),
|
|
9380
|
+
versionId: external_exports.string().uuid(),
|
|
9381
|
+
experimentId: external_exports.string().uuid().nullable().optional(),
|
|
9382
|
+
variantId: external_exports.string().min(1).max(128).nullable().optional(),
|
|
9383
|
+
surfaceId: external_exports.string().min(1).max(128),
|
|
9384
|
+
appUserId: external_exports.string().min(1).max(256),
|
|
9385
|
+
paymentLinkUrl: StripePaymentLinkUrlSchema,
|
|
9386
|
+
attribution: external_exports.record(external_exports.string(), AttributionValueSchema).optional()
|
|
9387
|
+
});
|
|
9388
|
+
var StripeCheckoutAttemptCreateResponseSchema = external_exports.object({
|
|
9389
|
+
attemptId: external_exports.string().uuid(),
|
|
9390
|
+
expiresAt: external_exports.string().datetime()
|
|
9391
|
+
});
|
|
9392
|
+
var StripeCheckoutAttemptStatusResponseSchema = external_exports.object({
|
|
9393
|
+
attemptId: external_exports.string().uuid(),
|
|
9394
|
+
status: StripeCheckoutAttemptStatusSchema
|
|
9395
|
+
});
|
|
8487
9396
|
var RESERVED_RC_SDK_KEYS = [
|
|
8488
9397
|
/** Last RC event observed by the SDK (e.g. `purchase_completed`, `purchase_cancelled`). */
|
|
8489
9398
|
"onb_rc_last_event",
|
|
@@ -8494,7 +9403,18 @@ var RESERVED_RC_SDK_KEYS = [
|
|
|
8494
9403
|
/** RevenueCat offering id surfaced by the most recent paywall presentation. */
|
|
8495
9404
|
"onb_rc_last_offering_id"
|
|
8496
9405
|
];
|
|
8497
|
-
var
|
|
9406
|
+
var RESERVED_SUPERWALL_SDK_KEYS = [
|
|
9407
|
+
/** Last Superwall event observed by the SDK (e.g. `purchase_completed`, `dismissed`). */
|
|
9408
|
+
"onb_sw_last_event",
|
|
9409
|
+
/** Product identifier from the most recent successful Superwall purchase. */
|
|
9410
|
+
"onb_sw_last_product_id",
|
|
9411
|
+
/** Placement id from the most recent Superwall registration. */
|
|
9412
|
+
"onb_sw_last_placement_id"
|
|
9413
|
+
];
|
|
9414
|
+
var RESERVED_SDK_KEYS_SET = /* @__PURE__ */ new Set([
|
|
9415
|
+
...RESERVED_RC_SDK_KEYS,
|
|
9416
|
+
...RESERVED_SUPERWALL_SDK_KEYS
|
|
9417
|
+
]);
|
|
8498
9418
|
var isReservedSdkKey = (key) => RESERVED_SDK_KEYS_SET.has(key);
|
|
8499
9419
|
var MANIFEST_SCHEMA_VERSION = 7;
|
|
8500
9420
|
var ThemeSchema = external_exports.object({
|
|
@@ -8768,6 +9688,13 @@ var refineManifestGraph = (manifest, ctx, jumpTargets) => {
|
|
|
8768
9688
|
}
|
|
8769
9689
|
seenHostKey.add(hostKey);
|
|
8770
9690
|
}
|
|
9691
|
+
if (sn.config.provider === "stripe" && !sn.config.paymentLinkUrl) {
|
|
9692
|
+
ctx.addIssue({
|
|
9693
|
+
code: external_exports.ZodIssueCode.custom,
|
|
9694
|
+
message: `external surface "${sn.id}" Stripe paymentLinkUrl is required`,
|
|
9695
|
+
path: ["externalSurfaceNodes", si, "config", "paymentLinkUrl"]
|
|
9696
|
+
});
|
|
9697
|
+
}
|
|
8771
9698
|
for (const [outcome, target] of Object.entries(sn.outcomes)) {
|
|
8772
9699
|
if (target != null && !jumpTargets.has(target)) {
|
|
8773
9700
|
ctx.addIssue({
|
|
@@ -8876,6 +9803,13 @@ var refineManifestScreens = (manifest, ctx, jumpTargets, screenIds, allFieldKeys
|
|
|
8876
9803
|
path: ["screens", screenIdx, "regions"]
|
|
8877
9804
|
});
|
|
8878
9805
|
}
|
|
9806
|
+
if ((l.kind === "number_stepper_button" || l.kind === "number_stepper_value") && layoutCtx.parentKind !== "number_stepper") {
|
|
9807
|
+
ctx.addIssue({
|
|
9808
|
+
code: external_exports.ZodIssueCode.custom,
|
|
9809
|
+
message: `Layer "${l.id}" (${l.kind}) must be nested under a number stepper`,
|
|
9810
|
+
path: ["screens", screenIdx, "regions"]
|
|
9811
|
+
});
|
|
9812
|
+
}
|
|
8879
9813
|
});
|
|
8880
9814
|
const nextDefault = screen.next.default;
|
|
8881
9815
|
if (nextDefault && !jumpTargets.has(nextDefault)) {
|
|
@@ -9106,27 +10040,270 @@ var SdkIdentitySchema = external_exports.object({
|
|
|
9106
10040
|
customUserId: external_exports.string().min(1).optional(),
|
|
9107
10041
|
sessionId: external_exports.string().min(1).optional()
|
|
9108
10042
|
});
|
|
10043
|
+
var SdkAttributeValueSchema = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]);
|
|
9109
10044
|
var SdkContextSchema = external_exports.object({
|
|
9110
10045
|
platform: external_exports.enum(["ios", "android", "web"]).optional(),
|
|
9111
10046
|
appVersion: external_exports.string().optional(),
|
|
9112
10047
|
locale: external_exports.string().optional(),
|
|
9113
|
-
|
|
10048
|
+
/** Web SDK only. App SDKs leave this empty. */
|
|
10049
|
+
browser: external_exports.string().max(80).optional(),
|
|
10050
|
+
os: external_exports.string().max(80).optional(),
|
|
10051
|
+
device: external_exports.string().max(80).optional(),
|
|
10052
|
+
customProperties: external_exports.record(external_exports.string(), SdkAttributeValueSchema).optional(),
|
|
10053
|
+
/**
|
|
10054
|
+
* Canonical attribution keys (`acquisition.*`, `attribution.*`, `link.*`).
|
|
10055
|
+
* Optional. Web sends first-touch; mobile may omit them.
|
|
10056
|
+
*/
|
|
10057
|
+
attribution: external_exports.record(external_exports.string(), SdkAttributeValueSchema).optional()
|
|
10058
|
+
});
|
|
10059
|
+
var isValidIanaTimeZone = (tz) => {
|
|
10060
|
+
try {
|
|
10061
|
+
Intl.DateTimeFormat("en-US", { timeZone: tz });
|
|
10062
|
+
return true;
|
|
10063
|
+
} catch {
|
|
10064
|
+
return false;
|
|
10065
|
+
}
|
|
10066
|
+
};
|
|
10067
|
+
var IanaTimeZoneSchema = external_exports.string().trim().min(1).max(80).refine(isValidIanaTimeZone, { message: "timezone must be a valid IANA time zone" });
|
|
10068
|
+
var CivilLocalTimeSchema = external_exports.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "expected HH:mm");
|
|
10069
|
+
var CivilLocalDateSchema = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD");
|
|
10070
|
+
var ProfileNameSchema = external_exports.string().trim().max(80);
|
|
10071
|
+
var ProfilePhoneSchema = external_exports.string().trim().max(32);
|
|
10072
|
+
var ProfileLocaleSchema = external_exports.string().trim().max(35);
|
|
10073
|
+
var ProfileCountrySchema = external_exports.string().trim().regex(/^[A-Za-z]{2}$/, "country must be a two-letter code").transform((value) => value.toUpperCase());
|
|
10074
|
+
var optionalClearable = (schema) => external_exports.preprocess(
|
|
10075
|
+
(value) => {
|
|
10076
|
+
if (value === null || value === void 0) return void 0;
|
|
10077
|
+
if (typeof value === "string" && value.trim() === "") return "";
|
|
10078
|
+
return value;
|
|
10079
|
+
},
|
|
10080
|
+
external_exports.union([external_exports.literal("").transform(() => null), schema]).optional()
|
|
10081
|
+
);
|
|
10082
|
+
var SdkTrackPropertyValueSchema = external_exports.union([
|
|
10083
|
+
external_exports.string(),
|
|
10084
|
+
external_exports.number(),
|
|
10085
|
+
external_exports.boolean(),
|
|
10086
|
+
external_exports.null(),
|
|
10087
|
+
external_exports.array(external_exports.string())
|
|
10088
|
+
]);
|
|
10089
|
+
var SdkTrackRequestSchema = external_exports.object({
|
|
10090
|
+
eventId: external_exports.string().uuid(),
|
|
10091
|
+
name: external_exports.string().trim().min(1).max(120),
|
|
10092
|
+
timestamp: external_exports.string().datetime(),
|
|
10093
|
+
identity: SdkIdentitySchema,
|
|
10094
|
+
context: SdkContextSchema.optional(),
|
|
10095
|
+
properties: external_exports.record(external_exports.string(), SdkTrackPropertyValueSchema).optional()
|
|
10096
|
+
}).superRefine((value, ctx) => {
|
|
10097
|
+
if (value.properties === void 0) return;
|
|
10098
|
+
const encoded = JSON.stringify(value.properties);
|
|
10099
|
+
if (encoded.length > 32 * 1024) {
|
|
10100
|
+
ctx.addIssue({
|
|
10101
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10102
|
+
message: "properties exceed 32KB",
|
|
10103
|
+
path: ["properties"]
|
|
10104
|
+
});
|
|
10105
|
+
}
|
|
10106
|
+
});
|
|
10107
|
+
var SdkTrackResponseSchema = external_exports.object({
|
|
10108
|
+
accepted: external_exports.literal(true)
|
|
10109
|
+
});
|
|
10110
|
+
var SdkIdentifyAttributesSchema = external_exports.record(external_exports.string().min(1).max(80), external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean(), external_exports.null()])).superRefine((value, ctx) => {
|
|
10111
|
+
const keys = Object.keys(value);
|
|
10112
|
+
if (keys.length > 50) {
|
|
10113
|
+
ctx.addIssue({
|
|
10114
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10115
|
+
message: "attributes exceed 50 keys"
|
|
10116
|
+
});
|
|
10117
|
+
}
|
|
10118
|
+
const encoded = JSON.stringify(value);
|
|
10119
|
+
if (encoded.length > 10 * 1024) {
|
|
10120
|
+
ctx.addIssue({
|
|
10121
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10122
|
+
message: "attributes exceed 10KB"
|
|
10123
|
+
});
|
|
10124
|
+
}
|
|
10125
|
+
});
|
|
10126
|
+
var MarketingConsentSchema = external_exports.enum(["granted", "denied", "unknown"]);
|
|
10127
|
+
var MARKETING_CONSENT_ALIAS_CONFLICT = "marketingConsent and emailMarketingConsent disagree";
|
|
10128
|
+
var marketingConsentAliasDisagrees = (marketingConsent, emailMarketingConsent) => marketingConsent !== void 0 && emailMarketingConsent !== void 0 && marketingConsent !== emailMarketingConsent;
|
|
10129
|
+
var addMarketingConsentAliasIssue = (value, ctx) => {
|
|
10130
|
+
if (marketingConsentAliasDisagrees(value.marketingConsent, value.emailMarketingConsent)) {
|
|
10131
|
+
ctx.addIssue({
|
|
10132
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10133
|
+
message: MARKETING_CONSENT_ALIAS_CONFLICT,
|
|
10134
|
+
path: ["marketingConsent"]
|
|
10135
|
+
});
|
|
10136
|
+
}
|
|
10137
|
+
};
|
|
10138
|
+
var resolvedMarketingConsent = (marketingConsent, emailMarketingConsent) => marketingConsent ?? emailMarketingConsent;
|
|
10139
|
+
var SdkIdentifyRequestSchema = external_exports.object({
|
|
10140
|
+
appUserId: external_exports.string().trim().min(1).max(200),
|
|
10141
|
+
email: external_exports.string().trim().email().optional(),
|
|
10142
|
+
marketingConsent: MarketingConsentSchema.optional(),
|
|
10143
|
+
/** @deprecated Ingest alias. Parsed requests keep marketingConsent only. */
|
|
10144
|
+
emailMarketingConsent: MarketingConsentSchema.optional(),
|
|
10145
|
+
topicConsents: external_exports.record(external_exports.string().min(1).max(80), MarketingConsentSchema).optional(),
|
|
10146
|
+
customUserId: external_exports.string().trim().min(1).max(200).optional(),
|
|
10147
|
+
/** Shallow-merged into Customer.attributes (incoming keys overlay). */
|
|
10148
|
+
attributes: SdkIdentifyAttributesSchema.optional(),
|
|
10149
|
+
/** Blank clears the column. JSON null leaves it unchanged. */
|
|
10150
|
+
firstName: optionalClearable(ProfileNameSchema),
|
|
10151
|
+
lastName: optionalClearable(ProfileNameSchema),
|
|
10152
|
+
phone: optionalClearable(ProfilePhoneSchema),
|
|
10153
|
+
locale: optionalClearable(ProfileLocaleSchema),
|
|
10154
|
+
country: optionalClearable(ProfileCountrySchema),
|
|
10155
|
+
/** Customer IANA timezone for Engage local send / quiet hours (PRD-3). */
|
|
10156
|
+
timezone: optionalClearable(IanaTimeZoneSchema)
|
|
10157
|
+
}).superRefine((value, ctx) => {
|
|
10158
|
+
addMarketingConsentAliasIssue(value, ctx);
|
|
10159
|
+
const consent = resolvedMarketingConsent(value.marketingConsent, value.emailMarketingConsent);
|
|
10160
|
+
if (value.email && consent === void 0) {
|
|
10161
|
+
ctx.addIssue({
|
|
10162
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10163
|
+
message: "marketingConsent is required when email is provided",
|
|
10164
|
+
path: ["marketingConsent"]
|
|
10165
|
+
});
|
|
10166
|
+
}
|
|
10167
|
+
if (consent === "granted" && !value.email) {
|
|
10168
|
+
ctx.addIssue({
|
|
10169
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10170
|
+
message: "email is required when marketingConsent is granted",
|
|
10171
|
+
path: ["email"]
|
|
10172
|
+
});
|
|
10173
|
+
}
|
|
10174
|
+
}).transform(
|
|
10175
|
+
(value) => {
|
|
10176
|
+
const { emailMarketingConsent, marketingConsent, ...rest } = value;
|
|
10177
|
+
const resolved = marketingConsent ?? emailMarketingConsent;
|
|
10178
|
+
if (resolved === void 0) return rest;
|
|
10179
|
+
return { ...rest, marketingConsent: resolved };
|
|
10180
|
+
}
|
|
10181
|
+
);
|
|
10182
|
+
var SdkIdentifyResponseSchema = external_exports.object({
|
|
10183
|
+
appUserId: external_exports.string(),
|
|
10184
|
+
email: external_exports.string().email().nullable(),
|
|
10185
|
+
marketingConsent: MarketingConsentSchema,
|
|
10186
|
+
topicConsents: external_exports.record(external_exports.string(), MarketingConsentSchema),
|
|
10187
|
+
merged: external_exports.boolean()
|
|
10188
|
+
});
|
|
10189
|
+
var SdkPushPlatformSchema = external_exports.enum(["ios", "android", "web"]);
|
|
10190
|
+
var SdkPushProviderSchema = external_exports.enum(["apns", "fcm", "web_push"]);
|
|
10191
|
+
var SdkWebPushKeysSchema = external_exports.object({
|
|
10192
|
+
endpoint: external_exports.string().trim().url().max(2e3),
|
|
10193
|
+
p256dh: external_exports.string().trim().min(1).max(200),
|
|
10194
|
+
auth: external_exports.string().trim().min(1).max(200)
|
|
10195
|
+
});
|
|
10196
|
+
var SdkPushRegisterRequestSchema = external_exports.object({
|
|
10197
|
+
appUserId: external_exports.string().trim().min(1).max(200).optional(),
|
|
10198
|
+
platform: SdkPushPlatformSchema,
|
|
10199
|
+
provider: SdkPushProviderSchema,
|
|
10200
|
+
token: external_exports.string().trim().min(1).max(4096).optional(),
|
|
10201
|
+
webPush: SdkWebPushKeysSchema.optional()
|
|
10202
|
+
}).superRefine((value, ctx) => {
|
|
10203
|
+
if (value.provider === "web_push") {
|
|
10204
|
+
if (!value.webPush) {
|
|
10205
|
+
ctx.addIssue({
|
|
10206
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10207
|
+
message: "webPush is required for web_push",
|
|
10208
|
+
path: ["webPush"]
|
|
10209
|
+
});
|
|
10210
|
+
}
|
|
10211
|
+
return;
|
|
10212
|
+
}
|
|
10213
|
+
if (!value.token) {
|
|
10214
|
+
ctx.addIssue({
|
|
10215
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10216
|
+
message: "token is required",
|
|
10217
|
+
path: ["token"]
|
|
10218
|
+
});
|
|
10219
|
+
}
|
|
10220
|
+
});
|
|
10221
|
+
var SdkPushUnregisterRequestSchema = external_exports.object({
|
|
10222
|
+
appUserId: external_exports.string().trim().min(1).max(200).optional(),
|
|
10223
|
+
token: external_exports.string().trim().min(1).max(4096).optional(),
|
|
10224
|
+
endpoint: external_exports.string().trim().url().max(2e3).optional()
|
|
10225
|
+
}).superRefine((value, ctx) => {
|
|
10226
|
+
if (!value.token && !value.endpoint) {
|
|
10227
|
+
ctx.addIssue({
|
|
10228
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10229
|
+
message: "token or endpoint is required",
|
|
10230
|
+
path: ["token"]
|
|
10231
|
+
});
|
|
10232
|
+
}
|
|
10233
|
+
});
|
|
10234
|
+
var SdkPushRegisterResponseSchema = external_exports.object({
|
|
10235
|
+
subscriptionId: external_exports.string().uuid(),
|
|
10236
|
+
platform: SdkPushPlatformSchema,
|
|
10237
|
+
provider: SdkPushProviderSchema
|
|
10238
|
+
});
|
|
10239
|
+
var SdkPushConfigResponseSchema = external_exports.object({
|
|
10240
|
+
vapidPublicKey: external_exports.string().nullable()
|
|
10241
|
+
});
|
|
10242
|
+
var BillingIdentityProviderSchema = external_exports.enum(["revenuecat", "superwall"]);
|
|
10243
|
+
var SdkBillingIdentityRequestSchema = external_exports.object({
|
|
10244
|
+
appUserId: external_exports.string().trim().min(1).max(200),
|
|
10245
|
+
provider: BillingIdentityProviderSchema,
|
|
10246
|
+
externalId: external_exports.string().trim().min(1).max(256)
|
|
10247
|
+
});
|
|
10248
|
+
var SdkBillingIdentityResponseSchema = external_exports.object({
|
|
10249
|
+
appUserId: external_exports.string(),
|
|
10250
|
+
provider: BillingIdentityProviderSchema
|
|
10251
|
+
});
|
|
10252
|
+
var PRODUCT_ANALYTICS_SESSION_TIMEOUT_MS = 30 * 60 * 1e3;
|
|
10253
|
+
var PRODUCT_ANALYTICS_MAX_BATCH = 500;
|
|
10254
|
+
var PRODUCT_ANALYTICS_MAX_PROPERTIES_BYTES = 32 * 1024;
|
|
10255
|
+
var PRODUCT_ANALYTICS_MAX_SCREEN_NAME = 200;
|
|
10256
|
+
var propertiesSchema = external_exports.record(external_exports.string(), SdkTrackPropertyValueSchema).optional().superRefine((value, ctx) => {
|
|
10257
|
+
if (value === void 0) return;
|
|
10258
|
+
if (JSON.stringify(value).length > PRODUCT_ANALYTICS_MAX_PROPERTIES_BYTES) {
|
|
10259
|
+
ctx.addIssue({
|
|
10260
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10261
|
+
message: "properties exceed 32KB",
|
|
10262
|
+
path: ["properties"]
|
|
10263
|
+
});
|
|
10264
|
+
}
|
|
10265
|
+
});
|
|
10266
|
+
var SdkProductAnalyticsEventSchema = external_exports.object({
|
|
10267
|
+
eventId: external_exports.string().uuid(),
|
|
10268
|
+
name: external_exports.string().trim().min(1).max(120),
|
|
10269
|
+
timestamp: external_exports.string().datetime(),
|
|
10270
|
+
identity: SdkIdentitySchema,
|
|
10271
|
+
context: SdkContextSchema.optional(),
|
|
10272
|
+
screenName: external_exports.string().trim().min(1).max(PRODUCT_ANALYTICS_MAX_SCREEN_NAME).optional(),
|
|
10273
|
+
properties: propertiesSchema
|
|
10274
|
+
});
|
|
10275
|
+
var SdkProductAnalyticsBatchSchema = external_exports.object({
|
|
10276
|
+
events: external_exports.array(SdkProductAnalyticsEventSchema).min(1).max(PRODUCT_ANALYTICS_MAX_BATCH)
|
|
10277
|
+
});
|
|
10278
|
+
var SdkProductAnalyticsResponseSchema = external_exports.object({
|
|
10279
|
+
accepted: external_exports.literal(true)
|
|
9114
10280
|
});
|
|
9115
10281
|
var RevenueCatIntegrationSchema = external_exports.object({
|
|
9116
10282
|
enabled: external_exports.boolean(),
|
|
9117
10283
|
defaultOfferingId: external_exports.string(),
|
|
9118
10284
|
defaultPlacementId: external_exports.string()
|
|
9119
10285
|
});
|
|
10286
|
+
var SuperwallIntegrationSchema = external_exports.object({
|
|
10287
|
+
enabled: external_exports.boolean(),
|
|
10288
|
+
defaultPlacementId: external_exports.string()
|
|
10289
|
+
});
|
|
9120
10290
|
var AppsFlyerIntegrationSchema = external_exports.object({
|
|
9121
10291
|
enabled: external_exports.boolean()
|
|
9122
10292
|
});
|
|
10293
|
+
var StripeIntegrationSchema = external_exports.object({
|
|
10294
|
+
enabled: external_exports.boolean()
|
|
10295
|
+
});
|
|
9123
10296
|
var ResolvedAppIntegrationsSchema = external_exports.object({
|
|
9124
10297
|
revenuecat: RevenueCatIntegrationSchema,
|
|
9125
|
-
|
|
10298
|
+
superwall: SuperwallIntegrationSchema,
|
|
10299
|
+
appsflyer: AppsFlyerIntegrationSchema,
|
|
10300
|
+
stripe: StripeIntegrationSchema
|
|
9126
10301
|
});
|
|
9127
10302
|
var AppIntegrationsSchema = external_exports.object({
|
|
9128
10303
|
revenuecat: RevenueCatIntegrationSchema.partial().optional(),
|
|
9129
|
-
|
|
10304
|
+
superwall: SuperwallIntegrationSchema.partial().optional(),
|
|
10305
|
+
appsflyer: AppsFlyerIntegrationSchema.partial().optional(),
|
|
10306
|
+
stripe: StripeIntegrationSchema.partial().optional()
|
|
9130
10307
|
}).passthrough();
|
|
9131
10308
|
var DASHBOARD_ATTRIBUTION_INTEGRATION_PROVIDER_IDS = ["appsflyer"];
|
|
9132
10309
|
var DashboardAttributionIntegrationProviderIdSchema = external_exports.enum(
|
|
@@ -9202,7 +10379,13 @@ var SdkResolveRequestSchema = external_exports.object({
|
|
|
9202
10379
|
identity: SdkIdentitySchema,
|
|
9203
10380
|
context: SdkContextSchema.optional()
|
|
9204
10381
|
});
|
|
10382
|
+
var SdkResolveExperimentSchema = external_exports.object({
|
|
10383
|
+
id: external_exports.string().uuid(),
|
|
10384
|
+
variantKey: external_exports.string().min(1),
|
|
10385
|
+
variantId: external_exports.string().min(1)
|
|
10386
|
+
});
|
|
9205
10387
|
var SdkResolveResponseSchema = external_exports.object({
|
|
10388
|
+
kind: external_exports.literal("flow"),
|
|
9206
10389
|
flowId: external_exports.string().uuid(),
|
|
9207
10390
|
versionId: external_exports.string().uuid(),
|
|
9208
10391
|
versionNumber: external_exports.number().int().positive(),
|
|
@@ -9213,6 +10396,7 @@ var SdkResolveResponseSchema = external_exports.object({
|
|
|
9213
10396
|
channelId: external_exports.string(),
|
|
9214
10397
|
experimentId: external_exports.string().uuid().nullable(),
|
|
9215
10398
|
variantId: external_exports.string().nullable(),
|
|
10399
|
+
experiment: SdkResolveExperimentSchema.nullable(),
|
|
9216
10400
|
manifest: FlowManifestSchema,
|
|
9217
10401
|
mediaMap: external_exports.record(external_exports.string(), external_exports.string().url()),
|
|
9218
10402
|
/** App branding (gradient presets, etc.) when present on the app record. */
|
|
@@ -9225,10 +10409,8 @@ var SdkResolveResponseSchema = external_exports.object({
|
|
|
9225
10409
|
/** Per-app integration toggles from the dashboard; SDK should respect these after resolve. */
|
|
9226
10410
|
integrations: ResolvedAppIntegrationsSchema
|
|
9227
10411
|
});
|
|
9228
|
-
var SdkResolveAllResponseSchema = external_exports.object({
|
|
9229
|
-
channels: external_exports.array(SdkResolveResponseSchema)
|
|
9230
|
-
});
|
|
9231
10412
|
var SdkResolveAssignmentSchema = external_exports.object({
|
|
10413
|
+
kind: external_exports.literal("flow"),
|
|
9232
10414
|
flowId: external_exports.string().uuid(),
|
|
9233
10415
|
versionId: external_exports.string().uuid(),
|
|
9234
10416
|
versionNumber: external_exports.number().int().positive(),
|
|
@@ -9237,6 +10419,7 @@ var SdkResolveAssignmentSchema = external_exports.object({
|
|
|
9237
10419
|
channelId: external_exports.string(),
|
|
9238
10420
|
experimentId: external_exports.string().uuid().nullable(),
|
|
9239
10421
|
variantId: external_exports.string().nullable(),
|
|
10422
|
+
experiment: SdkResolveExperimentSchema.nullable(),
|
|
9240
10423
|
branding: BrandingSchema.optional(),
|
|
9241
10424
|
features: external_exports.object({
|
|
9242
10425
|
attribution: external_exports.boolean()
|
|
@@ -9281,20 +10464,140 @@ var FlowTerminalSnapshotSchema = external_exports.object({
|
|
|
9281
10464
|
answersDetail: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
9282
10465
|
manifest: FlowManifestSchema.optional()
|
|
9283
10466
|
});
|
|
9284
|
-
var
|
|
9285
|
-
var
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
10467
|
+
var BANNER_DIMENSION_MIN = 8;
|
|
10468
|
+
var BANNER_DIMENSION_MAX = 4096;
|
|
10469
|
+
var BannerDimensionSchema = external_exports.number().int().min(BANNER_DIMENSION_MIN).max(BANNER_DIMENSION_MAX);
|
|
10470
|
+
var BannerFixedSizingSchema = external_exports.object({
|
|
10471
|
+
mode: external_exports.literal("fixed"),
|
|
10472
|
+
width: BannerDimensionSchema,
|
|
10473
|
+
height: BannerDimensionSchema
|
|
10474
|
+
}).strict();
|
|
10475
|
+
var BannerResponsiveSizingBaseSchema = external_exports.object({
|
|
10476
|
+
mode: external_exports.literal("responsive"),
|
|
10477
|
+
maxWidth: BannerDimensionSchema.optional(),
|
|
10478
|
+
minHeight: BannerDimensionSchema.optional(),
|
|
10479
|
+
maxHeight: BannerDimensionSchema.optional()
|
|
10480
|
+
}).strict();
|
|
10481
|
+
var BannerSizingSchema = external_exports.discriminatedUnion("mode", [BannerFixedSizingSchema, BannerResponsiveSizingBaseSchema]).superRefine((value, ctx) => {
|
|
10482
|
+
if (value.mode !== "responsive") return;
|
|
10483
|
+
if (value.minHeight !== void 0 && value.maxHeight !== void 0 && value.minHeight > value.maxHeight) {
|
|
10484
|
+
ctx.addIssue({
|
|
10485
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10486
|
+
message: "minHeight must be <= maxHeight",
|
|
10487
|
+
path: ["minHeight"]
|
|
10488
|
+
});
|
|
10489
|
+
}
|
|
10490
|
+
});
|
|
10491
|
+
var BannerManifestObjectSchema = external_exports.object({
|
|
10492
|
+
bannerId: external_exports.string().uuid(),
|
|
10493
|
+
schemaVersion: external_exports.literal(MANIFEST_SCHEMA_VERSION).optional(),
|
|
10494
|
+
version: external_exports.number().int().positive(),
|
|
10495
|
+
defaultLocale: LocaleCode4,
|
|
10496
|
+
locales: external_exports.array(LocaleCode4),
|
|
10497
|
+
rootScreen: ScreenSchema,
|
|
10498
|
+
sizing: BannerSizingSchema,
|
|
10499
|
+
theme: ThemeSchema.optional(),
|
|
10500
|
+
builderMeta: BuilderMetaSchema
|
|
10501
|
+
});
|
|
10502
|
+
var BannerManifestSchema = BannerManifestObjectSchema;
|
|
10503
|
+
var SLUG_KEY_PATTERN = /^[A-Za-z][A-Za-z0-9_]{0,63}$/;
|
|
10504
|
+
var SlugKeySchema = external_exports.string().regex(SLUG_KEY_PATTERN);
|
|
10505
|
+
var ContentKindSchema = external_exports.enum(["flow", "code", "banner"]);
|
|
10506
|
+
var CodeParameterValueSchema = external_exports.union([
|
|
10507
|
+
external_exports.string(),
|
|
10508
|
+
external_exports.number(),
|
|
10509
|
+
external_exports.boolean(),
|
|
10510
|
+
external_exports.null()
|
|
10511
|
+
]);
|
|
10512
|
+
var MAX_PARAMETER_ENTRIES = 32;
|
|
10513
|
+
var MAX_PARAMETER_JSON_BYTES = 8192;
|
|
10514
|
+
var CodeParametersSchema = external_exports.record(SlugKeySchema, CodeParameterValueSchema).superRefine((value, ctx) => {
|
|
10515
|
+
const keys = Object.keys(value);
|
|
10516
|
+
if (keys.length > MAX_PARAMETER_ENTRIES) {
|
|
10517
|
+
ctx.addIssue({
|
|
10518
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10519
|
+
message: `parameters allow at most ${MAX_PARAMETER_ENTRIES} entries`
|
|
10520
|
+
});
|
|
10521
|
+
}
|
|
10522
|
+
if (JSON.stringify(value).length > MAX_PARAMETER_JSON_BYTES) {
|
|
10523
|
+
ctx.addIssue({
|
|
10524
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10525
|
+
message: "parameters must serialize under 8KB"
|
|
10526
|
+
});
|
|
10527
|
+
}
|
|
10528
|
+
});
|
|
10529
|
+
var SdkCodeResolveResponseSchema = external_exports.object({
|
|
10530
|
+
kind: external_exports.literal("code"),
|
|
10531
|
+
channelId: external_exports.string(),
|
|
10532
|
+
environment: external_exports.enum(["test", "live"]),
|
|
10533
|
+
assignmentVersion: external_exports.number().int().nonnegative(),
|
|
10534
|
+
experiment: SdkResolveExperimentSchema.nullable(),
|
|
10535
|
+
variantKey: external_exports.string().min(1),
|
|
10536
|
+
parameters: CodeParametersSchema
|
|
10537
|
+
});
|
|
10538
|
+
var SdkBannerResolveResponseSchema = external_exports.object({
|
|
10539
|
+
kind: external_exports.literal("banner"),
|
|
10540
|
+
bannerId: external_exports.string().uuid(),
|
|
10541
|
+
versionId: external_exports.string().uuid(),
|
|
10542
|
+
versionNumber: external_exports.number().int().positive(),
|
|
10543
|
+
assignmentVersion: external_exports.number().int().nonnegative(),
|
|
10544
|
+
environment: external_exports.enum(["test", "live"]),
|
|
10545
|
+
channelId: external_exports.string(),
|
|
10546
|
+
experimentId: external_exports.string().uuid().nullable(),
|
|
10547
|
+
variantId: external_exports.string().nullable(),
|
|
10548
|
+
experiment: SdkResolveExperimentSchema.nullable(),
|
|
10549
|
+
manifest: BannerManifestSchema,
|
|
10550
|
+
mediaMap: external_exports.record(external_exports.string(), external_exports.string().url()),
|
|
10551
|
+
branding: BrandingSchema.optional(),
|
|
10552
|
+
features: external_exports.object({
|
|
10553
|
+
attribution: external_exports.boolean()
|
|
10554
|
+
}).optional(),
|
|
10555
|
+
integrations: ResolvedAppIntegrationsSchema,
|
|
10556
|
+
control: external_exports.boolean().optional()
|
|
10557
|
+
});
|
|
10558
|
+
var SdkCodeChannelEventSchema = external_exports.object({
|
|
10559
|
+
eventId: external_exports.string().uuid(),
|
|
10560
|
+
name: external_exports.string().min(1).max(128),
|
|
10561
|
+
timestamp: external_exports.string().datetime(),
|
|
10562
|
+
experimentId: external_exports.string().uuid().nullable().optional(),
|
|
10563
|
+
variantId: external_exports.string().nullable().optional(),
|
|
10564
|
+
identity: SdkIdentitySchema,
|
|
10565
|
+
context: SdkContextSchema.optional(),
|
|
10566
|
+
properties: external_exports.record(external_exports.string(), external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean(), external_exports.null()])).optional()
|
|
10567
|
+
});
|
|
10568
|
+
var SdkCodeChannelEventBatchSchema = external_exports.object({
|
|
10569
|
+
events: external_exports.array(SdkCodeChannelEventSchema).min(1).max(500)
|
|
10570
|
+
});
|
|
10571
|
+
var SdkBannerChannelEventSchema = external_exports.object({
|
|
10572
|
+
eventId: external_exports.string().uuid(),
|
|
10573
|
+
name: external_exports.string().min(1).max(128),
|
|
10574
|
+
timestamp: external_exports.string().datetime(),
|
|
10575
|
+
bannerId: external_exports.string().uuid(),
|
|
10576
|
+
versionId: external_exports.string().uuid(),
|
|
10577
|
+
channelId: external_exports.string().min(1),
|
|
10578
|
+
experimentId: external_exports.string().uuid().nullable().optional(),
|
|
10579
|
+
variantId: external_exports.string().nullable().optional(),
|
|
10580
|
+
identity: SdkIdentitySchema,
|
|
10581
|
+
context: SdkContextSchema.optional(),
|
|
10582
|
+
properties: external_exports.record(external_exports.string(), external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean(), external_exports.null()])).optional()
|
|
10583
|
+
});
|
|
10584
|
+
var SdkBannerChannelEventBatchSchema = external_exports.object({
|
|
10585
|
+
events: external_exports.array(SdkBannerChannelEventSchema).min(1).max(500)
|
|
10586
|
+
});
|
|
10587
|
+
var EventNameSchema = external_exports.enum(EVENT_NAMES);
|
|
10588
|
+
var SdkEventSchema = external_exports.object({
|
|
10589
|
+
eventId: external_exports.string().uuid(),
|
|
10590
|
+
name: EventNameSchema,
|
|
10591
|
+
timestamp: external_exports.string().datetime(),
|
|
10592
|
+
flowId: external_exports.string().uuid(),
|
|
10593
|
+
/** Resolved version the SDK was rendering when the event occurred. */
|
|
10594
|
+
versionId: external_exports.string().uuid(),
|
|
10595
|
+
experimentId: external_exports.string().uuid().nullable().optional(),
|
|
10596
|
+
variantId: external_exports.string().nullable().optional(),
|
|
10597
|
+
stepId: external_exports.string().nullable().optional(),
|
|
10598
|
+
identity: SdkIdentitySchema,
|
|
10599
|
+
context: SdkContextSchema.optional(),
|
|
10600
|
+
properties: external_exports.record(
|
|
9298
10601
|
external_exports.string(),
|
|
9299
10602
|
external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean(), external_exports.null(), external_exports.array(external_exports.string())])
|
|
9300
10603
|
).optional(),
|
|
@@ -9307,14 +10610,14 @@ var SdkEventBatchSchema = external_exports.object({
|
|
|
9307
10610
|
var IapPurchasePeriodTypeSchema = external_exports.enum(["normal", "intro", "trial"]);
|
|
9308
10611
|
var IapPurchaseEventPropertiesSchema = external_exports.object({
|
|
9309
10612
|
/** External surface provider that produced the purchase. */
|
|
9310
|
-
provider: external_exports.
|
|
10613
|
+
provider: external_exports.enum(["revenuecat", "superwall", "stripe"]),
|
|
9311
10614
|
/** Manifest node id of the surface (e.g. `surf_paywall_welcome`). */
|
|
9312
10615
|
surface_node_id: external_exports.string().min(1).max(128),
|
|
9313
10616
|
/** Store product identifier (e.g. `pro_annual`). */
|
|
9314
10617
|
product_id: external_exports.string().min(1).max(256),
|
|
9315
|
-
/** Optional
|
|
10618
|
+
/** Optional offering id (RevenueCat) or placement id mirrored for analytics. */
|
|
9316
10619
|
offering_id: external_exports.string().min(1).max(128).optional(),
|
|
9317
|
-
/** Optional
|
|
10620
|
+
/** Optional package identifier within an offering (e.g. `$rc_annual`). */
|
|
9318
10621
|
package_id: external_exports.string().min(1).max(128).optional(),
|
|
9319
10622
|
/** Localized gross store price at purchase time (non-negative). */
|
|
9320
10623
|
price: external_exports.number().nonnegative().optional(),
|
|
@@ -9414,19 +10717,13 @@ var collectCanvasGateViolations = (manifest, gates) => {
|
|
|
9414
10717
|
return issues;
|
|
9415
10718
|
};
|
|
9416
10719
|
|
|
9417
|
-
// ../../node_modules/@getrheo/contracts/dist/
|
|
9418
|
-
var FIELD_CLASSIFICATIONS4 = ["safe", "sensitive"];
|
|
9419
|
-
var FIELD_KEY_RE4 = /^[a-z][a-z0-9_]*$/;
|
|
9420
|
-
var FieldKeySchema4 = external_exports.string().min(1).max(64).regex(FIELD_KEY_RE4, "field key must be snake_case");
|
|
9421
|
-
var FieldClassificationSchema4 = external_exports.enum(FIELD_CLASSIFICATIONS4);
|
|
9422
|
-
|
|
9423
|
-
// ../../node_modules/@getrheo/contracts/dist/screens.js
|
|
9424
|
-
var layerSchemaStore4 = {};
|
|
10720
|
+
// ../../node_modules/@getrheo/contracts/dist/bannerManifest.js
|
|
9425
10721
|
var LocaleCode5 = external_exports.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/, 'locale must be like "en" or "en-US"');
|
|
9426
10722
|
var LocalizedTextSchema5 = external_exports.object({
|
|
9427
10723
|
default: external_exports.string().min(1, "default copy is required"),
|
|
9428
10724
|
translations: external_exports.record(LocaleCode5, external_exports.string()).optional()
|
|
9429
10725
|
});
|
|
10726
|
+
var layerSchemaStore4 = {};
|
|
9430
10727
|
var parseHyperlinkHref4 = (raw) => {
|
|
9431
10728
|
const t = raw.trim();
|
|
9432
10729
|
if (!t) return { ok: false };
|
|
@@ -9446,7 +10743,7 @@ var parseHyperlinkHref4 = (raw) => {
|
|
|
9446
10743
|
}
|
|
9447
10744
|
return { ok: false };
|
|
9448
10745
|
};
|
|
9449
|
-
var
|
|
10746
|
+
var FIELD_CLASSIFICATIONS4 = ["safe", "sensitive"];
|
|
9450
10747
|
var MEDIA_TYPES4 = ["image", "font", "lottie", "video"];
|
|
9451
10748
|
var MediaTypeSchema4 = external_exports.enum(MEDIA_TYPES4);
|
|
9452
10749
|
var MediaReferenceSchema4 = external_exports.object({
|
|
@@ -9813,7 +11110,8 @@ var ButtonActionSchema4 = external_exports.discriminatedUnion("kind", [
|
|
|
9813
11110
|
kind: external_exports.literal("advance_carousel"),
|
|
9814
11111
|
targetLayerId: external_exports.string().min(1),
|
|
9815
11112
|
onLast: CarouselAdvanceOnLastSchema4.optional()
|
|
9816
|
-
})
|
|
11113
|
+
}),
|
|
11114
|
+
external_exports.object({ kind: external_exports.literal("dismiss_banner") })
|
|
9817
11115
|
]);
|
|
9818
11116
|
var TEXT_INPUT_TYPES4 = ["plain", "email", "phone", "url", "number", "multiline"];
|
|
9819
11117
|
var TextInputTypeSchema4 = external_exports.enum(TEXT_INPUT_TYPES4);
|
|
@@ -9846,11 +11144,11 @@ var OAuthPresetButtonChromeBreakpointsSchema4 = external_exports.object({
|
|
|
9846
11144
|
}).partial().optional();
|
|
9847
11145
|
var EMAIL_PASSWORD_AUTH_MODES4 = ["sign_in", "sign_up"];
|
|
9848
11146
|
var EMAIL_PASSWORD_SLOTS4 = ["email", "password", "confirm"];
|
|
9849
|
-
var
|
|
11147
|
+
var lazyLayer9 = () => layerSchemaStore4.schema;
|
|
9850
11148
|
var ButtonLayerSchema4 = external_exports.object({
|
|
9851
11149
|
...baseLayerShape4,
|
|
9852
11150
|
kind: external_exports.literal("button"),
|
|
9853
|
-
children: external_exports.lazy(() => external_exports.array(
|
|
11151
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer9())),
|
|
9854
11152
|
action: ButtonActionSchema4,
|
|
9855
11153
|
variant: ButtonLayerVariantSchema4,
|
|
9856
11154
|
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
@@ -9864,7 +11162,7 @@ var ButtonLayerSchema4 = external_exports.object({
|
|
|
9864
11162
|
var BackButtonLayerSchema4 = external_exports.object({
|
|
9865
11163
|
...baseLayerShape4,
|
|
9866
11164
|
kind: external_exports.literal("back_button"),
|
|
9867
|
-
children: external_exports.lazy(() => external_exports.array(
|
|
11165
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer9())),
|
|
9868
11166
|
variant: ButtonLayerVariantSchema4,
|
|
9869
11167
|
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
9870
11168
|
gap: external_exports.number().int().min(0).optional(),
|
|
@@ -10246,11 +11544,27 @@ external_exports.array(OAuthLoginProviderSchema4).min(1).superRefine((providers,
|
|
|
10246
11544
|
seen.add(preset);
|
|
10247
11545
|
}
|
|
10248
11546
|
});
|
|
10249
|
-
var
|
|
10250
|
-
var
|
|
10251
|
-
var
|
|
11547
|
+
var FIELD_KEY_RE4 = /^[a-z][a-z0-9_]*$/;
|
|
11548
|
+
var FieldKeySchema4 = external_exports.string().min(1).max(64).regex(FIELD_KEY_RE4, "field key must be snake_case");
|
|
11549
|
+
var FieldClassificationSchema4 = external_exports.enum(FIELD_CLASSIFICATIONS4);
|
|
10252
11550
|
var lazyLayer44 = () => layerSchemaStore4.schema;
|
|
10253
11551
|
var EmailPasswordAuthModeSchema4 = external_exports.enum(EMAIL_PASSWORD_AUTH_MODES4);
|
|
11552
|
+
var PasswordRulesSchema4 = external_exports.object({
|
|
11553
|
+
minLength: external_exports.number().int().min(4).max(128).optional(),
|
|
11554
|
+
maxLength: external_exports.number().int().min(4).max(128).optional(),
|
|
11555
|
+
requireUppercase: external_exports.boolean().optional(),
|
|
11556
|
+
requireLowercase: external_exports.boolean().optional(),
|
|
11557
|
+
requireDigit: external_exports.boolean().optional(),
|
|
11558
|
+
requireSpecial: external_exports.boolean().optional()
|
|
11559
|
+
}).strict().superRefine((data, ctx) => {
|
|
11560
|
+
if (data.minLength !== void 0 && data.maxLength !== void 0 && data.maxLength < data.minLength) {
|
|
11561
|
+
ctx.addIssue({
|
|
11562
|
+
code: external_exports.ZodIssueCode.custom,
|
|
11563
|
+
message: "passwordRules.maxLength must be >= minLength",
|
|
11564
|
+
path: ["maxLength"]
|
|
11565
|
+
});
|
|
11566
|
+
}
|
|
11567
|
+
});
|
|
10254
11568
|
var migrateEmailPasswordAuthIncoming4 = (raw) => {
|
|
10255
11569
|
if (!raw || typeof raw !== "object") return raw;
|
|
10256
11570
|
const o = raw;
|
|
@@ -10366,8 +11680,11 @@ var EmailPasswordAuthLayerSchemaValidated4 = external_exports.object({
|
|
|
10366
11680
|
...baseLayerShape4,
|
|
10367
11681
|
kind: external_exports.literal("email_password_auth"),
|
|
10368
11682
|
mode: EmailPasswordAuthModeSchema4,
|
|
10369
|
-
fieldKey:
|
|
11683
|
+
fieldKey: FieldKeySchema4,
|
|
11684
|
+
/** @deprecated Prefer `passwordRules.minLength`. Kept for backward compatibility. */
|
|
10370
11685
|
minPasswordLength: external_exports.number().int().min(4).max(128).optional(),
|
|
11686
|
+
/** Composition rules beyond minimum length (uppercase, digit, special, max). */
|
|
11687
|
+
passwordRules: PasswordRulesSchema4.optional(),
|
|
10371
11688
|
children: external_exports.lazy(
|
|
10372
11689
|
() => external_exports.array(external_exports.union([EmailPasswordFieldLayerSchema4, EmailPasswordSubmitLayerSchema4])).min(1)
|
|
10373
11690
|
),
|
|
@@ -10397,7 +11714,7 @@ var lazyLayer54 = () => layerSchemaStore4.schema;
|
|
|
10397
11714
|
var SingleChoiceLayerSchema4 = external_exports.object({
|
|
10398
11715
|
...baseLayerShape4,
|
|
10399
11716
|
kind: external_exports.literal("single_choice"),
|
|
10400
|
-
fieldKey:
|
|
11717
|
+
fieldKey: FieldKeySchema4,
|
|
10401
11718
|
children: external_exports.lazy(
|
|
10402
11719
|
() => external_exports.array(StackLayerSchema4).min(2)
|
|
10403
11720
|
),
|
|
@@ -10413,7 +11730,7 @@ var SingleChoiceLayerSchema4 = external_exports.object({
|
|
|
10413
11730
|
var MultipleChoiceLayerSchema4 = external_exports.object({
|
|
10414
11731
|
...baseLayerShape4,
|
|
10415
11732
|
kind: external_exports.literal("multiple_choice"),
|
|
10416
|
-
fieldKey:
|
|
11733
|
+
fieldKey: FieldKeySchema4,
|
|
10417
11734
|
children: external_exports.lazy(
|
|
10418
11735
|
() => external_exports.array(StackLayerSchema4).min(2)
|
|
10419
11736
|
),
|
|
@@ -10438,16 +11755,39 @@ var TextInputFieldStyleSchema4 = external_exports.object({
|
|
|
10438
11755
|
letterSpacing: external_exports.number().min(-0.5).max(1).optional(),
|
|
10439
11756
|
opacity: external_exports.number().min(0).max(1).optional()
|
|
10440
11757
|
}).partial();
|
|
11758
|
+
var TextInputAutoCapitalizeSchema4 = external_exports.enum([
|
|
11759
|
+
"none",
|
|
11760
|
+
"sentences",
|
|
11761
|
+
"words",
|
|
11762
|
+
"characters"
|
|
11763
|
+
]);
|
|
11764
|
+
var TextInputReturnKeyTypeSchema4 = external_exports.enum([
|
|
11765
|
+
"done",
|
|
11766
|
+
"next",
|
|
11767
|
+
"go",
|
|
11768
|
+
"send",
|
|
11769
|
+
"search",
|
|
11770
|
+
"default"
|
|
11771
|
+
]);
|
|
11772
|
+
var TextInputValidationModeSchema4 = external_exports.enum(["onBlur", "onSubmit", "live"]);
|
|
10441
11773
|
var TextInputLayerSchema4 = external_exports.object({
|
|
10442
11774
|
...baseLayerShape4,
|
|
10443
11775
|
kind: external_exports.literal("text_input"),
|
|
10444
|
-
fieldKey:
|
|
11776
|
+
fieldKey: FieldKeySchema4,
|
|
10445
11777
|
placeholder: LocalizedTextSchema5.optional(),
|
|
11778
|
+
/** Optional helper copy shown under the field when valid / untouched. */
|
|
11779
|
+
helperText: LocalizedTextSchema5.optional(),
|
|
10446
11780
|
inputType: TextInputTypeSchema4.optional(),
|
|
10447
11781
|
required: external_exports.boolean().optional(),
|
|
10448
11782
|
minLength: external_exports.number().int().min(0).max(2e3).optional(),
|
|
10449
11783
|
maxLength: external_exports.number().int().positive().max(2e3).optional(),
|
|
10450
|
-
classification:
|
|
11784
|
+
classification: FieldClassificationSchema4,
|
|
11785
|
+
/** Override autocapitalize (defaults from `inputType` when omitted). */
|
|
11786
|
+
autoCapitalize: TextInputAutoCapitalizeSchema4.optional(),
|
|
11787
|
+
/** Soft keyboard return key label. */
|
|
11788
|
+
returnKeyType: TextInputReturnKeyTypeSchema4.optional(),
|
|
11789
|
+
/** When to show inline validation errors (default `onBlur`). */
|
|
11790
|
+
validationMode: TextInputValidationModeSchema4.optional(),
|
|
10451
11791
|
children: external_exports.lazy(() => external_exports.array(lazyLayer54())).optional(),
|
|
10452
11792
|
/** Typography for the native input's typed text. */
|
|
10453
11793
|
fieldStyle: TextInputFieldStyleSchema4.optional(),
|
|
@@ -10467,7 +11807,7 @@ var ScaleInputLabelStyleSchema4 = external_exports.object({
|
|
|
10467
11807
|
var ScaleInputLayerSchema4 = external_exports.object({
|
|
10468
11808
|
...baseLayerShape4,
|
|
10469
11809
|
kind: external_exports.literal("scale_input"),
|
|
10470
|
-
fieldKey:
|
|
11810
|
+
fieldKey: FieldKeySchema4,
|
|
10471
11811
|
min: external_exports.number(),
|
|
10472
11812
|
max: external_exports.number(),
|
|
10473
11813
|
step: external_exports.number().positive().optional(),
|
|
@@ -10487,63 +11827,2051 @@ var ScaleInputLayerSchema4 = external_exports.object({
|
|
|
10487
11827
|
style: CommonStyleSchema4.optional(),
|
|
10488
11828
|
styleBreakpoints: CommonStyleBreakpointsSchema4
|
|
10489
11829
|
});
|
|
10490
|
-
var WheelPickerOptionSchema4 = external_exports.object({
|
|
11830
|
+
var WheelPickerOptionSchema4 = external_exports.object({
|
|
11831
|
+
optionId: external_exports.string().min(1).max(64),
|
|
11832
|
+
label: LocalizedTextSchema5
|
|
11833
|
+
});
|
|
11834
|
+
var WheelPickerItemStyleSchema4 = external_exports.object({
|
|
11835
|
+
fontFamily: external_exports.string().min(1).max(128).optional(),
|
|
11836
|
+
fontSize: external_exports.number().int().min(8).max(96).optional(),
|
|
11837
|
+
fontWeight: external_exports.number().int().min(100).max(900).optional(),
|
|
11838
|
+
color: ThemedColorSchema4.optional(),
|
|
11839
|
+
opacity: external_exports.number().min(0).max(1).optional()
|
|
11840
|
+
}).partial();
|
|
11841
|
+
var WheelPickerLayerSchema4 = external_exports.object({
|
|
11842
|
+
...baseLayerShape4,
|
|
11843
|
+
kind: external_exports.literal("wheel_picker"),
|
|
11844
|
+
fieldKey: FieldKeySchema4,
|
|
11845
|
+
mode: external_exports.enum(["options", "date"]).optional(),
|
|
11846
|
+
options: external_exports.array(WheelPickerOptionSchema4).min(2).optional(),
|
|
11847
|
+
defaultOptionId: external_exports.string().optional(),
|
|
11848
|
+
datePart: external_exports.enum(["year", "month", "day"]).optional(),
|
|
11849
|
+
minYear: external_exports.number().int().min(1e3).max(9999).optional(),
|
|
11850
|
+
maxYear: external_exports.number().int().min(1e3).max(9999).optional(),
|
|
11851
|
+
defaultValue: external_exports.string().optional(),
|
|
11852
|
+
placeholder: LocalizedTextSchema5.optional(),
|
|
11853
|
+
itemHeight: external_exports.number().int().min(28).max(72).optional(),
|
|
11854
|
+
visibleItemCount: external_exports.number().int().min(3).max(9).optional(),
|
|
11855
|
+
selectionBackgroundColor: ThemedColorSchema4.optional(),
|
|
11856
|
+
itemStyle: WheelPickerItemStyleSchema4.optional(),
|
|
11857
|
+
selectedItemStyle: WheelPickerItemStyleSchema4.optional(),
|
|
11858
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer54())).optional(),
|
|
11859
|
+
style: CommonStyleSchema4.optional(),
|
|
11860
|
+
styleBreakpoints: CommonStyleBreakpointsSchema4
|
|
11861
|
+
});
|
|
11862
|
+
var DATE_TIME_INPUT_MODES4 = ["date", "time", "datetime"];
|
|
11863
|
+
var NUMBER_STEPPER_BUTTON_ROLES4 = ["decrement", "increment"];
|
|
11864
|
+
var ADDRESS_INPUT_FIELDS4 = [
|
|
11865
|
+
"line1",
|
|
11866
|
+
"line2",
|
|
11867
|
+
"city",
|
|
11868
|
+
"region",
|
|
11869
|
+
"postalCode",
|
|
11870
|
+
"country"
|
|
11871
|
+
];
|
|
11872
|
+
var lazyLayer64 = () => layerSchemaStore4.schema;
|
|
11873
|
+
var CountryCodeSchema4 = external_exports.string().length(2).regex(/^[A-Za-z]{2}$/u).transform((s) => s.toUpperCase());
|
|
11874
|
+
var DateTimeInputModeSchema4 = external_exports.enum(DATE_TIME_INPUT_MODES4);
|
|
11875
|
+
var DateTimeInputLayerSchema4 = external_exports.object({
|
|
11876
|
+
...baseLayerShape4,
|
|
11877
|
+
kind: external_exports.literal("date_time_input"),
|
|
11878
|
+
fieldKey: FieldKeySchema4,
|
|
11879
|
+
mode: DateTimeInputModeSchema4.optional(),
|
|
11880
|
+
required: external_exports.boolean().optional(),
|
|
11881
|
+
min: external_exports.string().min(1).max(64).optional(),
|
|
11882
|
+
max: external_exports.string().min(1).max(64).optional(),
|
|
11883
|
+
defaultValue: external_exports.string().min(1).max(64).optional(),
|
|
11884
|
+
placeholder: LocalizedTextSchema5.optional(),
|
|
11885
|
+
classification: FieldClassificationSchema4,
|
|
11886
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer64())).optional(),
|
|
11887
|
+
fieldStyle: TextInputFieldStyleSchema4.optional(),
|
|
11888
|
+
style: CommonStyleSchema4.optional(),
|
|
11889
|
+
styleBreakpoints: CommonStyleBreakpointsSchema4
|
|
11890
|
+
});
|
|
11891
|
+
var NumberStepperButtonRoleSchema4 = external_exports.enum(NUMBER_STEPPER_BUTTON_ROLES4);
|
|
11892
|
+
var NumberStepperButtonLayerSchema4 = external_exports.object({
|
|
11893
|
+
...baseLayerShape4,
|
|
11894
|
+
kind: external_exports.literal("number_stepper_button"),
|
|
11895
|
+
role: NumberStepperButtonRoleSchema4,
|
|
11896
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer64())).optional(),
|
|
11897
|
+
style: CommonStyleSchema4.optional(),
|
|
11898
|
+
styleBreakpoints: CommonStyleBreakpointsSchema4
|
|
11899
|
+
});
|
|
11900
|
+
var NumberStepperValueLayerSchema4 = external_exports.object({
|
|
11901
|
+
...baseLayerShape4,
|
|
11902
|
+
kind: external_exports.literal("number_stepper_value"),
|
|
11903
|
+
unitLabel: LocalizedTextSchema5.optional(),
|
|
11904
|
+
style: TextStyleSchema4.optional(),
|
|
11905
|
+
styleBreakpoints: TextStyleBreakpointsSchema4
|
|
11906
|
+
});
|
|
11907
|
+
var migrateNumberStepperIncoming4 = (raw) => {
|
|
11908
|
+
if (!raw || typeof raw !== "object") return raw;
|
|
11909
|
+
const o = raw;
|
|
11910
|
+
if (o.kind !== "number_stepper") return raw;
|
|
11911
|
+
if (Array.isArray(o.children) && o.children.length > 0) return raw;
|
|
11912
|
+
const idBase = typeof o.id === "string" ? o.id : "lyr_number_stepper";
|
|
11913
|
+
const slugRaw = idBase.replace(/^lyr_/i, "").replace(/[^a-z0-9_]/gi, "_");
|
|
11914
|
+
const slug = slugRaw.length > 0 ? slugRaw.slice(0, 40) : "stepper";
|
|
11915
|
+
const valueStyle = o.valueStyle && typeof o.valueStyle === "object" ? o.valueStyle : void 0;
|
|
11916
|
+
const buttonColor = o.buttonColor;
|
|
11917
|
+
const mkButton = (role, glyph) => {
|
|
11918
|
+
const suf = role === "decrement" ? "dec" : "inc";
|
|
11919
|
+
return {
|
|
11920
|
+
id: `lyr_${slug}_btn_${suf}`.slice(0, 64),
|
|
11921
|
+
kind: "number_stepper_button",
|
|
11922
|
+
role,
|
|
11923
|
+
style: {
|
|
11924
|
+
width: 36,
|
|
11925
|
+
height: 36,
|
|
11926
|
+
radius: 8
|
|
11927
|
+
},
|
|
11928
|
+
children: [
|
|
11929
|
+
{
|
|
11930
|
+
id: `lyr_${slug}_btn_${suf}_txt`.slice(0, 64),
|
|
11931
|
+
kind: "text",
|
|
11932
|
+
text: { default: glyph },
|
|
11933
|
+
style: {
|
|
11934
|
+
fontSize: 20,
|
|
11935
|
+
align: "center",
|
|
11936
|
+
...buttonColor !== void 0 ? { color: buttonColor } : {}
|
|
11937
|
+
}
|
|
11938
|
+
}
|
|
11939
|
+
]
|
|
11940
|
+
};
|
|
11941
|
+
};
|
|
11942
|
+
const valueChild = {
|
|
11943
|
+
id: `lyr_${slug}_value`.slice(0, 64),
|
|
11944
|
+
kind: "number_stepper_value",
|
|
11945
|
+
style: {
|
|
11946
|
+
fontSize: typeof valueStyle?.fontSize === "number" ? valueStyle.fontSize : 14,
|
|
11947
|
+
width: "full",
|
|
11948
|
+
...typeof valueStyle?.fontFamily === "string" ? { fontFamily: valueStyle.fontFamily } : {},
|
|
11949
|
+
...typeof valueStyle?.fontWeight === "number" ? { fontWeight: valueStyle.fontWeight } : {},
|
|
11950
|
+
...valueStyle?.color !== void 0 ? { color: valueStyle.color } : {},
|
|
11951
|
+
...typeof valueStyle?.lineHeight === "number" ? { lineHeight: valueStyle.lineHeight } : {},
|
|
11952
|
+
...typeof valueStyle?.letterSpacing === "number" ? { letterSpacing: valueStyle.letterSpacing } : {},
|
|
11953
|
+
...typeof valueStyle?.opacity === "number" ? { opacity: valueStyle.opacity } : {},
|
|
11954
|
+
align: typeof valueStyle?.align === "string" ? valueStyle.align : "center"
|
|
11955
|
+
}
|
|
11956
|
+
};
|
|
11957
|
+
if (o.unitLabel !== void 0) valueChild.unitLabel = o.unitLabel;
|
|
11958
|
+
const {
|
|
11959
|
+
valueStyle: _vs,
|
|
11960
|
+
buttonColor: _bc,
|
|
11961
|
+
unitLabel: _ul,
|
|
11962
|
+
...rest
|
|
11963
|
+
} = o;
|
|
11964
|
+
return {
|
|
11965
|
+
...rest,
|
|
11966
|
+
direction: typeof o.direction === "string" ? o.direction : "horizontal",
|
|
11967
|
+
gap: typeof o.gap === "number" ? o.gap : 12,
|
|
11968
|
+
align: typeof o.align === "string" ? o.align : "center",
|
|
11969
|
+
...typeof o.distribution === "string" ? { distribution: o.distribution } : {},
|
|
11970
|
+
children: [mkButton("decrement", "-"), valueChild, mkButton("increment", "+")]
|
|
11971
|
+
};
|
|
11972
|
+
};
|
|
11973
|
+
var refineNumberStepperChildren4 = (data, ctx) => {
|
|
11974
|
+
const buttons = data.children.filter((c) => c.kind === "number_stepper_button");
|
|
11975
|
+
const values = data.children.filter((c) => c.kind === "number_stepper_value");
|
|
11976
|
+
const other = data.children.filter(
|
|
11977
|
+
(c) => c.kind !== "number_stepper_button" && c.kind !== "number_stepper_value"
|
|
11978
|
+
);
|
|
11979
|
+
if (other.length > 0) {
|
|
11980
|
+
ctx.addIssue({
|
|
11981
|
+
code: external_exports.ZodIssueCode.custom,
|
|
11982
|
+
message: "number_stepper children must be number_stepper_button or number_stepper_value",
|
|
11983
|
+
path: ["children"]
|
|
11984
|
+
});
|
|
11985
|
+
}
|
|
11986
|
+
const roles = /* @__PURE__ */ new Set();
|
|
11987
|
+
for (const b of buttons) {
|
|
11988
|
+
if (b.kind !== "number_stepper_button") continue;
|
|
11989
|
+
if (roles.has(b.role)) {
|
|
11990
|
+
ctx.addIssue({
|
|
11991
|
+
code: external_exports.ZodIssueCode.custom,
|
|
11992
|
+
message: `duplicate number_stepper_button role "${b.role}"`,
|
|
11993
|
+
path: ["children"]
|
|
11994
|
+
});
|
|
11995
|
+
}
|
|
11996
|
+
roles.add(b.role);
|
|
11997
|
+
}
|
|
11998
|
+
for (const role of NUMBER_STEPPER_BUTTON_ROLES4) {
|
|
11999
|
+
if (!roles.has(role)) {
|
|
12000
|
+
ctx.addIssue({
|
|
12001
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12002
|
+
message: `number_stepper requires a number_stepper_button with role "${role}"`,
|
|
12003
|
+
path: ["children"]
|
|
12004
|
+
});
|
|
12005
|
+
}
|
|
12006
|
+
}
|
|
12007
|
+
if (values.length !== 1) {
|
|
12008
|
+
ctx.addIssue({
|
|
12009
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12010
|
+
message: `number_stepper must have exactly one number_stepper_value (found ${values.length})`,
|
|
12011
|
+
path: ["children"]
|
|
12012
|
+
});
|
|
12013
|
+
}
|
|
12014
|
+
};
|
|
12015
|
+
var NumberStepperLayerSchemaValidated4 = external_exports.object({
|
|
12016
|
+
...baseLayerShape4,
|
|
12017
|
+
kind: external_exports.literal("number_stepper"),
|
|
12018
|
+
fieldKey: FieldKeySchema4,
|
|
12019
|
+
min: external_exports.number(),
|
|
12020
|
+
max: external_exports.number(),
|
|
12021
|
+
step: external_exports.number().positive().optional(),
|
|
12022
|
+
defaultValue: external_exports.number().optional(),
|
|
12023
|
+
classification: FieldClassificationSchema4,
|
|
12024
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
12025
|
+
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
12026
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
12027
|
+
distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
12028
|
+
children: external_exports.lazy(
|
|
12029
|
+
() => external_exports.array(external_exports.union([NumberStepperButtonLayerSchema4, NumberStepperValueLayerSchema4])).min(1)
|
|
12030
|
+
),
|
|
12031
|
+
style: CommonStyleSchema4.optional(),
|
|
12032
|
+
styleBreakpoints: CommonStyleBreakpointsSchema4
|
|
12033
|
+
}).superRefine(refineNumberStepperChildren4);
|
|
12034
|
+
var NumberStepperLayerSchema4 = external_exports.preprocess(
|
|
12035
|
+
migrateNumberStepperIncoming4,
|
|
12036
|
+
NumberStepperLayerSchemaValidated4
|
|
12037
|
+
);
|
|
12038
|
+
var PhoneInputLayerSchema4 = external_exports.object({
|
|
12039
|
+
...baseLayerShape4,
|
|
12040
|
+
kind: external_exports.literal("phone_input"),
|
|
12041
|
+
fieldKey: FieldKeySchema4,
|
|
12042
|
+
defaultCountryCode: CountryCodeSchema4.optional(),
|
|
12043
|
+
allowedCountryCodes: external_exports.array(CountryCodeSchema4).min(1).max(250).optional(),
|
|
12044
|
+
required: external_exports.boolean().optional(),
|
|
12045
|
+
placeholder: LocalizedTextSchema5.optional(),
|
|
12046
|
+
classification: FieldClassificationSchema4,
|
|
12047
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer64())).optional(),
|
|
12048
|
+
fieldStyle: TextInputFieldStyleSchema4.optional(),
|
|
12049
|
+
style: CommonStyleSchema4.optional(),
|
|
12050
|
+
styleBreakpoints: CommonStyleBreakpointsSchema4
|
|
12051
|
+
});
|
|
12052
|
+
var AddressInputFieldSchema4 = external_exports.enum(ADDRESS_INPUT_FIELDS4);
|
|
12053
|
+
var AddressInputPlaceholdersSchema4 = external_exports.object({
|
|
12054
|
+
line1: LocalizedTextSchema5.optional(),
|
|
12055
|
+
line2: LocalizedTextSchema5.optional(),
|
|
12056
|
+
city: LocalizedTextSchema5.optional(),
|
|
12057
|
+
region: LocalizedTextSchema5.optional(),
|
|
12058
|
+
postalCode: LocalizedTextSchema5.optional(),
|
|
12059
|
+
country: LocalizedTextSchema5.optional()
|
|
12060
|
+
}).partial();
|
|
12061
|
+
var AddressInputLayerSchema4 = external_exports.object({
|
|
12062
|
+
...baseLayerShape4,
|
|
12063
|
+
kind: external_exports.literal("address_input"),
|
|
12064
|
+
fieldKey: FieldKeySchema4,
|
|
12065
|
+
requiredFields: external_exports.array(AddressInputFieldSchema4).min(1).max(6).optional(),
|
|
12066
|
+
showLine2: external_exports.boolean().optional(),
|
|
12067
|
+
showRegion: external_exports.boolean().optional(),
|
|
12068
|
+
defaultCountryCode: CountryCodeSchema4.optional(),
|
|
12069
|
+
placeholders: AddressInputPlaceholdersSchema4.optional(),
|
|
12070
|
+
classification: FieldClassificationSchema4,
|
|
12071
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer64())).optional(),
|
|
12072
|
+
fieldStyle: TextInputFieldStyleSchema4.optional(),
|
|
12073
|
+
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
12074
|
+
style: CommonStyleSchema4.optional(),
|
|
12075
|
+
styleBreakpoints: CommonStyleBreakpointsSchema4
|
|
12076
|
+
});
|
|
12077
|
+
var CarouselIndicatorsStyleSchema4 = external_exports.object({
|
|
12078
|
+
width: external_exports.number().int().min(1).max(64).optional(),
|
|
12079
|
+
height: external_exports.number().int().min(1).max(64).optional(),
|
|
12080
|
+
defaultColor: ThemedColorSchema4.optional(),
|
|
12081
|
+
defaultOpacity: external_exports.number().min(0).max(1).optional(),
|
|
12082
|
+
activeColor: ThemedColorSchema4.optional(),
|
|
12083
|
+
activeOpacity: external_exports.number().min(0).max(1).optional(),
|
|
12084
|
+
activeWidth: external_exports.number().int().min(1).max(64).optional(),
|
|
12085
|
+
activeHeight: external_exports.number().int().min(1).max(64).optional(),
|
|
12086
|
+
border: BorderSchema4.optional(),
|
|
12087
|
+
activeBorder: BorderSchema4.optional()
|
|
12088
|
+
}).partial();
|
|
12089
|
+
var CarouselPageControlSchema4 = external_exports.object({
|
|
12090
|
+
position: external_exports.enum(["top", "bottom"]),
|
|
12091
|
+
spacing: external_exports.number().int().min(0).optional(),
|
|
12092
|
+
padding: PaddingSchema4.optional(),
|
|
12093
|
+
margin: PaddingSchema4.optional(),
|
|
12094
|
+
indicators: CarouselIndicatorsStyleSchema4.optional(),
|
|
12095
|
+
border: BorderSchema4.optional(),
|
|
12096
|
+
shadow: DropShadowSchema4.optional()
|
|
12097
|
+
});
|
|
12098
|
+
var CarouselLayerSchema4 = external_exports.object({
|
|
12099
|
+
...baseLayerShape4,
|
|
12100
|
+
kind: external_exports.literal("carousel"),
|
|
12101
|
+
slides: external_exports.lazy(() => external_exports.array(StackLayerSchema4).min(1)),
|
|
12102
|
+
pageAlignment: external_exports.enum(["top", "center", "bottom"]).optional(),
|
|
12103
|
+
pageSpacing: external_exports.number().int().min(0).optional(),
|
|
12104
|
+
pagePeek: external_exports.number().int().min(0).max(400).optional(),
|
|
12105
|
+
openOn: external_exports.number().int().min(0).optional(),
|
|
12106
|
+
loop: external_exports.boolean().optional(),
|
|
12107
|
+
autoAdvance: external_exports.boolean().optional(),
|
|
12108
|
+
autoAdvanceMs: external_exports.number().int().min(500).max(6e4).optional(),
|
|
12109
|
+
pageControl: CarouselPageControlSchema4.optional(),
|
|
12110
|
+
style: CommonStyleSchema4.optional(),
|
|
12111
|
+
styleBreakpoints: CommonStyleBreakpointsSchema4,
|
|
12112
|
+
carouselLayoutBreakpoints: CarouselLayoutBreakpointsSchema4
|
|
12113
|
+
});
|
|
12114
|
+
var DecisionBuiltinNameSchema4 = external_exports.enum(["locale", "platform"]);
|
|
12115
|
+
var DecisionVariableRefSchema4 = external_exports.discriminatedUnion("kind", [
|
|
12116
|
+
external_exports.object({ kind: external_exports.literal("builtin"), name: DecisionBuiltinNameSchema4 }),
|
|
12117
|
+
external_exports.object({ kind: external_exports.literal("sdk"), key: external_exports.string().min(1).max(128) }),
|
|
12118
|
+
external_exports.object({ kind: external_exports.literal("field"), fieldKey: external_exports.string().min(1).max(128) })
|
|
12119
|
+
]);
|
|
12120
|
+
var DecisionStringPredicateSchema4 = external_exports.discriminatedUnion("op", [
|
|
12121
|
+
external_exports.object({ op: external_exports.literal("eq"), value: external_exports.string() }),
|
|
12122
|
+
external_exports.object({ op: external_exports.literal("neq"), value: external_exports.string() }),
|
|
12123
|
+
external_exports.object({ op: external_exports.literal("contains"), value: external_exports.string() })
|
|
12124
|
+
]);
|
|
12125
|
+
var DecisionNumberPredicateSchema4 = external_exports.discriminatedUnion("op", [
|
|
12126
|
+
external_exports.object({ op: external_exports.literal("eq"), value: external_exports.number() }),
|
|
12127
|
+
external_exports.object({ op: external_exports.literal("neq"), value: external_exports.number() }),
|
|
12128
|
+
external_exports.object({ op: external_exports.literal("lt"), value: external_exports.number() }),
|
|
12129
|
+
external_exports.object({ op: external_exports.literal("lte"), value: external_exports.number() }),
|
|
12130
|
+
external_exports.object({ op: external_exports.literal("gt"), value: external_exports.number() }),
|
|
12131
|
+
external_exports.object({ op: external_exports.literal("gte"), value: external_exports.number() })
|
|
12132
|
+
]);
|
|
12133
|
+
var DecisionChoicePredicateSchema4 = external_exports.discriminatedUnion("op", [
|
|
12134
|
+
external_exports.object({ op: external_exports.literal("eq"), optionId: external_exports.string().min(1) }),
|
|
12135
|
+
external_exports.object({ op: external_exports.literal("one_of"), optionIds: external_exports.array(external_exports.string().min(1)).min(1) })
|
|
12136
|
+
]);
|
|
12137
|
+
var DecisionMultiPredicateSchema4 = external_exports.discriminatedUnion("op", [
|
|
12138
|
+
external_exports.object({
|
|
12139
|
+
op: external_exports.literal("intersects"),
|
|
12140
|
+
optionIds: external_exports.array(external_exports.string().min(1)).min(1)
|
|
12141
|
+
}),
|
|
12142
|
+
external_exports.object({
|
|
12143
|
+
op: external_exports.literal("contains_all"),
|
|
12144
|
+
optionIds: external_exports.array(external_exports.string().min(1)).min(1)
|
|
12145
|
+
}),
|
|
12146
|
+
external_exports.object({
|
|
12147
|
+
op: external_exports.literal("subset_of"),
|
|
12148
|
+
optionIds: external_exports.array(external_exports.string().min(1)).min(1)
|
|
12149
|
+
})
|
|
12150
|
+
]);
|
|
12151
|
+
var DecisionBooleanPredicateSchema4 = external_exports.discriminatedUnion("op", [
|
|
12152
|
+
external_exports.object({ op: external_exports.literal("eq"), value: external_exports.boolean() }),
|
|
12153
|
+
external_exports.object({ op: external_exports.literal("neq"), value: external_exports.boolean() })
|
|
12154
|
+
]);
|
|
12155
|
+
var DecisionPredicatePayloadSchema4 = external_exports.discriminatedUnion("type", [
|
|
12156
|
+
external_exports.object({ type: external_exports.literal("string"), pred: DecisionStringPredicateSchema4 }),
|
|
12157
|
+
external_exports.object({ type: external_exports.literal("number"), pred: DecisionNumberPredicateSchema4 }),
|
|
12158
|
+
external_exports.object({ type: external_exports.literal("boolean"), pred: DecisionBooleanPredicateSchema4 }),
|
|
12159
|
+
external_exports.object({ type: external_exports.literal("choice"), pred: DecisionChoicePredicateSchema4 }),
|
|
12160
|
+
external_exports.object({ type: external_exports.literal("multi"), pred: DecisionMultiPredicateSchema4 })
|
|
12161
|
+
]);
|
|
12162
|
+
var DecisionExprSchema4 = external_exports.lazy(
|
|
12163
|
+
() => external_exports.discriminatedUnion("kind", [
|
|
12164
|
+
external_exports.object({ kind: external_exports.literal("empty") }),
|
|
12165
|
+
external_exports.object({
|
|
12166
|
+
kind: external_exports.literal("group"),
|
|
12167
|
+
op: external_exports.enum(["and", "or"]),
|
|
12168
|
+
children: external_exports.array(DecisionExprSchema4).min(1)
|
|
12169
|
+
}),
|
|
12170
|
+
external_exports.object({
|
|
12171
|
+
kind: external_exports.literal("predicate"),
|
|
12172
|
+
variable: DecisionVariableRefSchema4,
|
|
12173
|
+
predicate: DecisionPredicatePayloadSchema4
|
|
12174
|
+
})
|
|
12175
|
+
])
|
|
12176
|
+
);
|
|
12177
|
+
var CONDITIONAL_MAX_CASES4 = 16;
|
|
12178
|
+
var ConditionalCaseSchema4 = external_exports.object({
|
|
12179
|
+
id: external_exports.string().min(1).max(80),
|
|
12180
|
+
name: external_exports.string().min(1).max(80).optional(),
|
|
12181
|
+
expression: DecisionExprSchema4,
|
|
12182
|
+
rootLayerId: LayerIdSchema4
|
|
12183
|
+
});
|
|
12184
|
+
var ConditionalLayerSchema4 = external_exports.object({
|
|
12185
|
+
...baseLayerShape4,
|
|
12186
|
+
kind: external_exports.literal("conditional"),
|
|
12187
|
+
cases: external_exports.array(ConditionalCaseSchema4).min(1).max(CONDITIONAL_MAX_CASES4),
|
|
12188
|
+
elseRootLayerId: LayerIdSchema4,
|
|
12189
|
+
children: external_exports.lazy(() => external_exports.array(StackLayerSchema4).min(2))
|
|
12190
|
+
});
|
|
12191
|
+
layerSchemaStore4.schema = external_exports.lazy(
|
|
12192
|
+
() => external_exports.union([
|
|
12193
|
+
StackLayerSchema4,
|
|
12194
|
+
TextLayerSchema4,
|
|
12195
|
+
HyperlinkLayerSchema4,
|
|
12196
|
+
ImageLayerSchema4,
|
|
12197
|
+
LottieLayerSchema4,
|
|
12198
|
+
VideoLayerSchema4,
|
|
12199
|
+
IconLayerSchema4,
|
|
12200
|
+
ButtonLayerSchema4,
|
|
12201
|
+
BackButtonLayerSchema4,
|
|
12202
|
+
ProgressLayerSchema4,
|
|
12203
|
+
LoaderLayerSchema4,
|
|
12204
|
+
CounterLayerSchema4,
|
|
12205
|
+
CheckboxLayerSchema4,
|
|
12206
|
+
SingleChoiceLayerSchema4,
|
|
12207
|
+
MultipleChoiceLayerSchema4,
|
|
12208
|
+
TextInputLayerSchema4,
|
|
12209
|
+
ScaleInputLayerSchema4,
|
|
12210
|
+
WheelPickerLayerSchema4,
|
|
12211
|
+
DateTimeInputLayerSchema4,
|
|
12212
|
+
NumberStepperLayerSchema4,
|
|
12213
|
+
NumberStepperButtonLayerSchema4,
|
|
12214
|
+
NumberStepperValueLayerSchema4,
|
|
12215
|
+
PhoneInputLayerSchema4,
|
|
12216
|
+
AddressInputLayerSchema4,
|
|
12217
|
+
OAuthLoginLayerSchema4,
|
|
12218
|
+
OAuthProviderPresetLayerSchema4,
|
|
12219
|
+
OAuthProviderCustomLayerSchema4,
|
|
12220
|
+
EmailPasswordAuthLayerSchema4,
|
|
12221
|
+
EmailPasswordFieldLayerSchema4,
|
|
12222
|
+
EmailPasswordSubmitLayerSchema4,
|
|
12223
|
+
CarouselLayerSchema4,
|
|
12224
|
+
ConditionalLayerSchema4
|
|
12225
|
+
])
|
|
12226
|
+
);
|
|
12227
|
+
var ScreenBackgroundFitSchema2 = external_exports.enum(["cover", "contain", "fill"]);
|
|
12228
|
+
var ScreenBackgroundScrimSchema2 = external_exports.object({
|
|
12229
|
+
color: ThemedColorSchema4.optional(),
|
|
12230
|
+
opacity: external_exports.number().min(0).max(1).optional()
|
|
12231
|
+
}).partial();
|
|
12232
|
+
var screenBackgroundMediaShape2 = {
|
|
12233
|
+
media: MediaReferenceSchema4.optional(),
|
|
12234
|
+
fit: ScreenBackgroundFitSchema2.optional(),
|
|
12235
|
+
opacity: external_exports.number().min(0).max(1).optional(),
|
|
12236
|
+
scrim: ScreenBackgroundScrimSchema2.optional()
|
|
12237
|
+
};
|
|
12238
|
+
var ScreenBackgroundColorFillSchema2 = external_exports.object({
|
|
12239
|
+
kind: external_exports.literal("color"),
|
|
12240
|
+
color: ThemedColorSchema4.optional(),
|
|
12241
|
+
opacity: external_exports.number().min(0).max(1).optional()
|
|
12242
|
+
});
|
|
12243
|
+
var ScreenBackgroundImageFillSchema2 = external_exports.object({
|
|
12244
|
+
kind: external_exports.literal("image"),
|
|
12245
|
+
...screenBackgroundMediaShape2
|
|
12246
|
+
});
|
|
12247
|
+
var ScreenBackgroundVideoFillSchema2 = external_exports.object({
|
|
12248
|
+
kind: external_exports.literal("video"),
|
|
12249
|
+
...screenBackgroundMediaShape2,
|
|
12250
|
+
loop: external_exports.boolean().optional(),
|
|
12251
|
+
autoPlay: external_exports.boolean().optional(),
|
|
12252
|
+
triggerLayerId: external_exports.string().min(1).optional(),
|
|
12253
|
+
onComplete: LoaderOnCompleteSchema4.optional(),
|
|
12254
|
+
audioEnabled: external_exports.boolean().optional()
|
|
12255
|
+
});
|
|
12256
|
+
var ScreenBackgroundFillSchema2 = external_exports.discriminatedUnion("kind", [
|
|
12257
|
+
ScreenBackgroundColorFillSchema2,
|
|
12258
|
+
ScreenBackgroundImageFillSchema2,
|
|
12259
|
+
ScreenBackgroundVideoFillSchema2
|
|
12260
|
+
]);
|
|
12261
|
+
var ScreenBackgroundFillPatchSchema2 = external_exports.object({
|
|
12262
|
+
color: ThemedColorSchema4.optional(),
|
|
12263
|
+
fit: ScreenBackgroundFitSchema2.optional(),
|
|
12264
|
+
opacity: external_exports.number().min(0).max(1).optional(),
|
|
12265
|
+
scrim: ScreenBackgroundScrimSchema2.optional(),
|
|
12266
|
+
loop: external_exports.boolean().optional(),
|
|
12267
|
+
autoPlay: external_exports.boolean().optional(),
|
|
12268
|
+
triggerLayerId: external_exports.string().min(1).optional(),
|
|
12269
|
+
onComplete: LoaderOnCompleteSchema4.optional(),
|
|
12270
|
+
audioEnabled: external_exports.boolean().optional()
|
|
12271
|
+
}).partial();
|
|
12272
|
+
var ScreenContainerBreakpointPatchSchema2 = external_exports.object({
|
|
12273
|
+
padding: PaddingSchema4.optional(),
|
|
12274
|
+
margin: PaddingSchema4.optional(),
|
|
12275
|
+
insetSafeArea: external_exports.boolean().optional(),
|
|
12276
|
+
backgroundFillPatch: ScreenBackgroundFillPatchSchema2.optional()
|
|
12277
|
+
}).partial();
|
|
12278
|
+
var ScreenContainerStyleBreakpointsSchema2 = external_exports.object({
|
|
12279
|
+
sm: ScreenContainerBreakpointPatchSchema2.optional(),
|
|
12280
|
+
md: ScreenContainerBreakpointPatchSchema2.optional(),
|
|
12281
|
+
lg: ScreenContainerBreakpointPatchSchema2.optional(),
|
|
12282
|
+
xl: ScreenContainerBreakpointPatchSchema2.optional(),
|
|
12283
|
+
"2xl": ScreenContainerBreakpointPatchSchema2.optional()
|
|
12284
|
+
}).partial().optional();
|
|
12285
|
+
var DecisionNodeIdSchema3 = external_exports.string().min(1).max(64).regex(/^dec_[a-z0-9_]+$/i, "decision node id must look like dec_<id>");
|
|
12286
|
+
var ExternalSurfaceJumpIdSchema24 = external_exports.string().min(1).max(64).regex(/^surf_[a-z0-9_]+$/i, "external surface node id must look like surf_<id>");
|
|
12287
|
+
var EXTERNAL_SURFACE_NO_NEXT3 = "__onb_surface_no_next__";
|
|
12288
|
+
var ExternalSurfaceTerminalTargetSchema3 = external_exports.literal(EXTERNAL_SURFACE_NO_NEXT3);
|
|
12289
|
+
var FlowJumpTargetSchema3 = ScreenIdSchema4.or(DecisionNodeIdSchema3).or(ExternalSurfaceJumpIdSchema24).or(ExternalSurfaceTerminalTargetSchema3).nullable();
|
|
12290
|
+
var DecisionCaseSchema3 = external_exports.object({
|
|
12291
|
+
id: external_exports.string().min(1).max(80),
|
|
12292
|
+
/** Display label in the editor (e.g. “Engaged users”). */
|
|
12293
|
+
name: external_exports.string().min(1).max(80).optional(),
|
|
12294
|
+
expression: DecisionExprSchema4,
|
|
12295
|
+
next: FlowJumpTargetSchema3
|
|
12296
|
+
});
|
|
12297
|
+
external_exports.object({
|
|
12298
|
+
id: DecisionNodeIdSchema3,
|
|
12299
|
+
name: external_exports.string().min(1).max(80).optional(),
|
|
12300
|
+
cases: external_exports.array(DecisionCaseSchema3).min(1).max(16),
|
|
12301
|
+
elseNext: FlowJumpTargetSchema3
|
|
12302
|
+
});
|
|
12303
|
+
var ANIMATABLE_PROPERTIES2 = [
|
|
12304
|
+
"opacity",
|
|
12305
|
+
"translateX",
|
|
12306
|
+
"translateY",
|
|
12307
|
+
"scale"
|
|
12308
|
+
];
|
|
12309
|
+
var AnimatablePropertySchema2 = external_exports.enum(ANIMATABLE_PROPERTIES2);
|
|
12310
|
+
var EASING_TOKENS2 = [
|
|
12311
|
+
"linear",
|
|
12312
|
+
"ease-in",
|
|
12313
|
+
"ease-out",
|
|
12314
|
+
"ease-in-out",
|
|
12315
|
+
"standard",
|
|
12316
|
+
"emphasized"
|
|
12317
|
+
];
|
|
12318
|
+
var EasingTokenSchema2 = external_exports.enum(EASING_TOKENS2);
|
|
12319
|
+
var KeyframeSchema2 = external_exports.object({
|
|
12320
|
+
t: external_exports.number().min(0).max(1),
|
|
12321
|
+
value: external_exports.number(),
|
|
12322
|
+
/** Easing applied from this keyframe to the next; defaults to linear. */
|
|
12323
|
+
easing: EasingTokenSchema2.optional()
|
|
12324
|
+
}).strict();
|
|
12325
|
+
var KeyframeTrackSchema2 = external_exports.object({
|
|
12326
|
+
property: AnimatablePropertySchema2,
|
|
12327
|
+
keyframes: external_exports.array(KeyframeSchema2).min(2)
|
|
12328
|
+
}).strict().superRefine((track, ctx) => {
|
|
12329
|
+
let last = -Infinity;
|
|
12330
|
+
for (const k of track.keyframes) {
|
|
12331
|
+
if (k.t < last) {
|
|
12332
|
+
ctx.addIssue({
|
|
12333
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12334
|
+
message: `keyframe times must be monotonically non-decreasing on track "${track.property}"`
|
|
12335
|
+
});
|
|
12336
|
+
return;
|
|
12337
|
+
}
|
|
12338
|
+
last = k.t;
|
|
12339
|
+
}
|
|
12340
|
+
if (track.keyframes[0].t !== 0) {
|
|
12341
|
+
ctx.addIssue({
|
|
12342
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12343
|
+
message: `track "${track.property}" first keyframe must start at t=0`
|
|
12344
|
+
});
|
|
12345
|
+
}
|
|
12346
|
+
if (track.keyframes[track.keyframes.length - 1].t !== 1) {
|
|
12347
|
+
ctx.addIssue({
|
|
12348
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12349
|
+
message: `track "${track.property}" last keyframe must end at t=1`
|
|
12350
|
+
});
|
|
12351
|
+
}
|
|
12352
|
+
});
|
|
12353
|
+
var ANIMATION_TRIGGERS2 = ["mount", "stagger", "unmount"];
|
|
12354
|
+
var AnimationTriggerSchema2 = external_exports.enum(ANIMATION_TRIGGERS2);
|
|
12355
|
+
var AnimationClipSchema2 = external_exports.object({
|
|
12356
|
+
id: external_exports.string().min(1).max(64),
|
|
12357
|
+
targetLayerId: LayerIdSchema4,
|
|
12358
|
+
trigger: AnimationTriggerSchema2,
|
|
12359
|
+
/** Position in the screen's stagger order. Required when trigger is `stagger`. */
|
|
12360
|
+
staggerIndex: external_exports.number().int().min(0).max(64).optional(),
|
|
12361
|
+
/** Total clip duration in milliseconds (renderer scales 0..1 keyframes by this). */
|
|
12362
|
+
durationMs: external_exports.number().int().min(0).max(36e5),
|
|
12363
|
+
/** Pre-roll delay before the clip begins, in ms. Stagger adds on top of this. */
|
|
12364
|
+
delayMs: external_exports.number().int().min(0).max(36e5).optional(),
|
|
12365
|
+
tracks: external_exports.array(KeyframeTrackSchema2).min(1)
|
|
12366
|
+
}).strict().superRefine((clip, ctx) => {
|
|
12367
|
+
if (clip.trigger === "unmount" && clip.staggerIndex !== void 0) {
|
|
12368
|
+
ctx.addIssue({
|
|
12369
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12370
|
+
message: `clip "${clip.id}" with trigger "unmount" must not set staggerIndex`,
|
|
12371
|
+
path: ["staggerIndex"]
|
|
12372
|
+
});
|
|
12373
|
+
}
|
|
12374
|
+
if (clip.trigger === "stagger" && clip.staggerIndex === void 0) {
|
|
12375
|
+
ctx.addIssue({
|
|
12376
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12377
|
+
message: `clip "${clip.id}" with trigger "stagger" must define staggerIndex`,
|
|
12378
|
+
path: ["staggerIndex"]
|
|
12379
|
+
});
|
|
12380
|
+
}
|
|
12381
|
+
const seenProps = /* @__PURE__ */ new Set();
|
|
12382
|
+
for (const track of clip.tracks) {
|
|
12383
|
+
if (seenProps.has(track.property)) {
|
|
12384
|
+
ctx.addIssue({
|
|
12385
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12386
|
+
message: `clip "${clip.id}" has duplicate track for property "${track.property}"`
|
|
12387
|
+
});
|
|
12388
|
+
}
|
|
12389
|
+
seenProps.add(track.property);
|
|
12390
|
+
}
|
|
12391
|
+
});
|
|
12392
|
+
var ScreenStaggerSchema2 = external_exports.object({
|
|
12393
|
+
/** Per-index delay multiplier in ms. */
|
|
12394
|
+
stepMs: external_exports.number().int().min(0).max(2e3)
|
|
12395
|
+
}).strict();
|
|
12396
|
+
var ScreenNextSchema2 = external_exports.object({
|
|
12397
|
+
default: FlowJumpTargetSchema3
|
|
12398
|
+
});
|
|
12399
|
+
var ScreenRegionsSchema2 = external_exports.object({
|
|
12400
|
+
header: StackLayerSchema4.optional(),
|
|
12401
|
+
body: StackLayerSchema4,
|
|
12402
|
+
footer: StackLayerSchema4.optional()
|
|
12403
|
+
});
|
|
12404
|
+
var ScreenContainerStyleSchema2 = external_exports.object({
|
|
12405
|
+
padding: PaddingSchema4.optional(),
|
|
12406
|
+
margin: PaddingSchema4.optional(),
|
|
12407
|
+
/** When true, runtimes add device safe-area insets to shell padding (in addition to manual padding). */
|
|
12408
|
+
insetSafeArea: external_exports.boolean().optional(),
|
|
12409
|
+
backgroundFill: ScreenBackgroundFillSchema2.optional()
|
|
12410
|
+
}).partial();
|
|
12411
|
+
var ScreenSchema2 = external_exports.object({
|
|
12412
|
+
id: ScreenIdSchema4,
|
|
12413
|
+
name: external_exports.string().min(1).max(80),
|
|
12414
|
+
regions: ScreenRegionsSchema2,
|
|
12415
|
+
next: ScreenNextSchema2,
|
|
12416
|
+
/** Ordered animation clips bound to layers on this screen. */
|
|
12417
|
+
animations: external_exports.array(AnimationClipSchema2).optional(),
|
|
12418
|
+
/** Defaults for clips with `trigger: stagger`. */
|
|
12419
|
+
stagger: ScreenStaggerSchema2.optional(),
|
|
12420
|
+
/** Chrome on the outer screen container (wraps all regions). */
|
|
12421
|
+
containerStyle: ScreenContainerStyleSchema2.optional(),
|
|
12422
|
+
containerStyleBreakpoints: ScreenContainerStyleBreakpointsSchema2
|
|
12423
|
+
});
|
|
12424
|
+
var MANIFEST_SCHEMA_VERSION2 = 7;
|
|
12425
|
+
var ThemeSchema2 = external_exports.object({
|
|
12426
|
+
primary: external_exports.string().optional(),
|
|
12427
|
+
primaryForeground: external_exports.string().optional(),
|
|
12428
|
+
background: external_exports.string().optional(),
|
|
12429
|
+
foreground: external_exports.string().optional(),
|
|
12430
|
+
accent: external_exports.string().optional(),
|
|
12431
|
+
borderRadius: external_exports.number().optional(),
|
|
12432
|
+
fontFamily: external_exports.string().optional()
|
|
12433
|
+
});
|
|
12434
|
+
var BuilderMetaSchema2 = external_exports.object({
|
|
12435
|
+
layout: external_exports.object({
|
|
12436
|
+
nodes: external_exports.array(
|
|
12437
|
+
external_exports.object({
|
|
12438
|
+
id: external_exports.string(),
|
|
12439
|
+
kind: external_exports.enum(["screen", "decision"]).optional(),
|
|
12440
|
+
x: external_exports.number(),
|
|
12441
|
+
y: external_exports.number()
|
|
12442
|
+
})
|
|
12443
|
+
).optional(),
|
|
12444
|
+
canvas: external_exports.object({
|
|
12445
|
+
zoom: external_exports.number().optional(),
|
|
12446
|
+
x: external_exports.number().optional(),
|
|
12447
|
+
y: external_exports.number().optional()
|
|
12448
|
+
}).optional()
|
|
12449
|
+
}).optional()
|
|
12450
|
+
}).passthrough().optional();
|
|
12451
|
+
var BANNER_DIMENSION_MIN2 = 8;
|
|
12452
|
+
var BANNER_DIMENSION_MAX2 = 4096;
|
|
12453
|
+
var BannerDimensionSchema2 = external_exports.number().int().min(BANNER_DIMENSION_MIN2).max(BANNER_DIMENSION_MAX2);
|
|
12454
|
+
var BannerFixedSizingSchema2 = external_exports.object({
|
|
12455
|
+
mode: external_exports.literal("fixed"),
|
|
12456
|
+
width: BannerDimensionSchema2,
|
|
12457
|
+
height: BannerDimensionSchema2
|
|
12458
|
+
}).strict();
|
|
12459
|
+
var BannerResponsiveSizingBaseSchema2 = external_exports.object({
|
|
12460
|
+
mode: external_exports.literal("responsive"),
|
|
12461
|
+
maxWidth: BannerDimensionSchema2.optional(),
|
|
12462
|
+
minHeight: BannerDimensionSchema2.optional(),
|
|
12463
|
+
maxHeight: BannerDimensionSchema2.optional()
|
|
12464
|
+
}).strict();
|
|
12465
|
+
var BannerSizingSchema2 = external_exports.discriminatedUnion("mode", [BannerFixedSizingSchema2, BannerResponsiveSizingBaseSchema2]).superRefine((value, ctx) => {
|
|
12466
|
+
if (value.mode !== "responsive") return;
|
|
12467
|
+
if (value.minHeight !== void 0 && value.maxHeight !== void 0 && value.minHeight > value.maxHeight) {
|
|
12468
|
+
ctx.addIssue({
|
|
12469
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12470
|
+
message: "minHeight must be <= maxHeight",
|
|
12471
|
+
path: ["minHeight"]
|
|
12472
|
+
});
|
|
12473
|
+
}
|
|
12474
|
+
});
|
|
12475
|
+
var BannerManifestObjectSchema2 = external_exports.object({
|
|
12476
|
+
bannerId: external_exports.string().uuid(),
|
|
12477
|
+
schemaVersion: external_exports.literal(MANIFEST_SCHEMA_VERSION2).optional(),
|
|
12478
|
+
version: external_exports.number().int().positive(),
|
|
12479
|
+
defaultLocale: LocaleCode5,
|
|
12480
|
+
locales: external_exports.array(LocaleCode5),
|
|
12481
|
+
rootScreen: ScreenSchema2,
|
|
12482
|
+
sizing: BannerSizingSchema2,
|
|
12483
|
+
theme: ThemeSchema2.optional(),
|
|
12484
|
+
builderMeta: BuilderMetaSchema2
|
|
12485
|
+
});
|
|
12486
|
+
|
|
12487
|
+
// ../../node_modules/@getrheo/contracts/dist/fields.js
|
|
12488
|
+
var FIELD_CLASSIFICATIONS5 = ["safe", "sensitive"];
|
|
12489
|
+
var FIELD_KEY_RE5 = /^[a-z][a-z0-9_]*$/;
|
|
12490
|
+
var FieldKeySchema5 = external_exports.string().min(1).max(64).regex(FIELD_KEY_RE5, "field key must be snake_case");
|
|
12491
|
+
var FieldClassificationSchema5 = external_exports.enum(FIELD_CLASSIFICATIONS5);
|
|
12492
|
+
|
|
12493
|
+
// ../../node_modules/@getrheo/contracts/dist/screens.js
|
|
12494
|
+
var layerSchemaStore5 = {};
|
|
12495
|
+
var LocaleCode6 = external_exports.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/, 'locale must be like "en" or "en-US"');
|
|
12496
|
+
var LocalizedTextSchema6 = external_exports.object({
|
|
12497
|
+
default: external_exports.string().min(1, "default copy is required"),
|
|
12498
|
+
translations: external_exports.record(LocaleCode6, external_exports.string()).optional()
|
|
12499
|
+
});
|
|
12500
|
+
var parseHyperlinkHref5 = (raw) => {
|
|
12501
|
+
const t = raw.trim();
|
|
12502
|
+
if (!t) return { ok: false };
|
|
12503
|
+
let u;
|
|
12504
|
+
try {
|
|
12505
|
+
u = new URL(t);
|
|
12506
|
+
} catch {
|
|
12507
|
+
return { ok: false };
|
|
12508
|
+
}
|
|
12509
|
+
const scheme = u.protocol.replace(/:$/, "").toLowerCase();
|
|
12510
|
+
if (scheme === "https") {
|
|
12511
|
+
if (!u.hostname) return { ok: false };
|
|
12512
|
+
return { ok: true, scheme: "https", host: u.hostname };
|
|
12513
|
+
}
|
|
12514
|
+
if (scheme === "mailto") {
|
|
12515
|
+
return { ok: true, scheme: "mailto" };
|
|
12516
|
+
}
|
|
12517
|
+
return { ok: false };
|
|
12518
|
+
};
|
|
12519
|
+
var FIELD_CLASSIFICATIONS6 = ["safe", "sensitive"];
|
|
12520
|
+
var MEDIA_TYPES5 = ["image", "font", "lottie", "video"];
|
|
12521
|
+
var MediaTypeSchema5 = external_exports.enum(MEDIA_TYPES5);
|
|
12522
|
+
var MediaReferenceSchema5 = external_exports.object({
|
|
12523
|
+
mediaAssetId: external_exports.string().uuid()
|
|
12524
|
+
});
|
|
12525
|
+
external_exports.object({
|
|
12526
|
+
id: external_exports.string().uuid(),
|
|
12527
|
+
orgId: external_exports.string().uuid(),
|
|
12528
|
+
type: MediaTypeSchema5,
|
|
12529
|
+
url: external_exports.string().url(),
|
|
12530
|
+
name: external_exports.string().nullable().optional(),
|
|
12531
|
+
contentType: external_exports.string(),
|
|
12532
|
+
sizeBytes: external_exports.number().int().nonnegative(),
|
|
12533
|
+
archivedAt: external_exports.string().datetime().nullable().optional(),
|
|
12534
|
+
createdAt: external_exports.string().datetime()
|
|
12535
|
+
});
|
|
12536
|
+
var LayerIdSchema5 = external_exports.string().min(1).max(64).regex(/^lyr_[a-z0-9_]+$/i, "layer id must look like lyr_<id>");
|
|
12537
|
+
var ScreenIdSchema5 = external_exports.string().min(1).max(64).regex(/^scr_[a-z0-9_]+$/i, "screen id must look like scr_<id>");
|
|
12538
|
+
var RESTING_MOTION_PRESETS5 = ["translate", "bounce", "scale", "pulse", "rotate"];
|
|
12539
|
+
var RestingMotionPresetSchema5 = external_exports.enum(RESTING_MOTION_PRESETS5);
|
|
12540
|
+
var RESTING_MOTION_SCALE_DIRECTIONS5 = ["up", "down"];
|
|
12541
|
+
var RestingMotionScaleDirectionSchema5 = external_exports.enum(RESTING_MOTION_SCALE_DIRECTIONS5);
|
|
12542
|
+
var RESTING_MOTION_ROTATE_DIRECTIONS5 = ["clockwise", "counterclockwise"];
|
|
12543
|
+
var RestingMotionRotateDirectionSchema5 = external_exports.enum(RESTING_MOTION_ROTATE_DIRECTIONS5);
|
|
12544
|
+
var RestingMotionSchema5 = external_exports.object({
|
|
12545
|
+
preset: RestingMotionPresetSchema5,
|
|
12546
|
+
/**
|
|
12547
|
+
* Timeline segment length (ms): motion is active from start until
|
|
12548
|
+
* start + durationMs. When {@link loop} is true, the preset pattern repeats
|
|
12549
|
+
* every {@link cycleDurationMs} (or preset default) within this window.
|
|
12550
|
+
*/
|
|
12551
|
+
durationMs: external_exports.number().int().min(200).max(2e4).optional(),
|
|
12552
|
+
/** When true, repeat the motion pattern within the timeline segment; default is one shot. */
|
|
12553
|
+
loop: external_exports.boolean().optional(),
|
|
12554
|
+
/**
|
|
12555
|
+
* Duration (ms) of one full pattern cycle when looping. Defaults per {@link RESTING_MOTION_DEFAULT_DURATION_MS}.
|
|
12556
|
+
*/
|
|
12557
|
+
cycleDurationMs: external_exports.number().int().min(200).max(2e4).optional(),
|
|
12558
|
+
intensity: external_exports.number().min(0).max(2).optional(),
|
|
12559
|
+
/** Bounce preset only: vertical lift in px. When omitted, uses `14 * intensity` (default intensity 1 → 14). */
|
|
12560
|
+
bounceAmplitudePx: external_exports.number().min(1).max(80).optional(),
|
|
12561
|
+
/** Scale preset: grow (+) or shrink (−) toward a peak, then return to 100%. */
|
|
12562
|
+
scaleDirection: RestingMotionScaleDirectionSchema5.optional(),
|
|
12563
|
+
/**
|
|
12564
|
+
* Scale preset: when true (default), each cycle goes rest → peak scale → rest.
|
|
12565
|
+
* When false, ramps rest → peak and holds; with loop, the next cycle restarts from rest.
|
|
12566
|
+
*/
|
|
12567
|
+
scaleSpringBack: external_exports.boolean().optional(),
|
|
12568
|
+
/**
|
|
12569
|
+
* Scale preset: magnitude in % — growth above 100% (up to +400% = 5× at peak) or shrink toward
|
|
12570
|
+
* 100%− (up to 90% so peak can be 10% size). See authoring caps in the layer editor.
|
|
12571
|
+
*/
|
|
12572
|
+
scalePercent: external_exports.number().min(0).max(400).optional(),
|
|
12573
|
+
/**
|
|
12574
|
+
* Scale preset: ms for one full out-and-back (rest → peak → rest). Timeline bar still sets
|
|
12575
|
+
* {@link durationMs} (when the layer may animate); this controls how fast each cycle runs.
|
|
12576
|
+
*/
|
|
12577
|
+
scalePatternDurationMs: external_exports.number().int().min(200).max(2e4).optional(),
|
|
12578
|
+
/** @deprecated Use {@link scalePercent} + {@link scaleDirection}. Kept for legacy manifests. */
|
|
12579
|
+
scaleUpPercent: external_exports.number().min(0).max(400).optional(),
|
|
12580
|
+
/** @deprecated Use {@link scalePercent} + {@link scaleDirection}. Kept for legacy manifests. */
|
|
12581
|
+
scaleDownPercent: external_exports.number().min(0).max(90).optional(),
|
|
12582
|
+
/**
|
|
12583
|
+
* @deprecated Legacy vertical-only float (px). Prefer {@link translatePeakXPercent} / {@link translatePeakYPercent}.
|
|
12584
|
+
*/
|
|
12585
|
+
translateRangePx: external_exports.number().min(0).max(40).optional(),
|
|
12586
|
+
/** @deprecated Legacy peak offsets in px. Prefer {@link translatePeakXPercent} / {@link translatePeakYPercent}. */
|
|
12587
|
+
translatePeakXPx: external_exports.number().min(-200).max(200).optional(),
|
|
12588
|
+
/** @deprecated Legacy peak offsets in px. Prefer {@link translatePeakXPercent} / {@link translatePeakYPercent}. */
|
|
12589
|
+
translatePeakYPx: external_exports.number().min(-200).max(200).optional(),
|
|
12590
|
+
/** Translate preset: peak X offset as % of the layer box (−200–200). Scaled by intensity. */
|
|
12591
|
+
translatePeakXPercent: external_exports.number().min(-200).max(200).optional(),
|
|
12592
|
+
/** Translate preset: peak Y offset as % of the layer box (−200–200). Scaled by intensity. */
|
|
12593
|
+
translatePeakYPercent: external_exports.number().min(-200).max(200).optional(),
|
|
12594
|
+
/**
|
|
12595
|
+
* Translate preset: when true (default), each cycle goes rest → peak offset → rest. When false, ramp to
|
|
12596
|
+
* peak and hold; with loop, the next cycle restarts from the origin.
|
|
12597
|
+
*/
|
|
12598
|
+
translateSpringBack: external_exports.boolean().optional(),
|
|
12599
|
+
/** Rotate preset: target rotation in degrees (0–360), scaled by intensity. */
|
|
12600
|
+
rotateMaxDeg: external_exports.number().min(0).max(360).optional(),
|
|
12601
|
+
/** Rotate preset: spin direction; omitted or `clockwise` → positive angles (default). */
|
|
12602
|
+
rotateDirection: RestingMotionRotateDirectionSchema5.optional(),
|
|
12603
|
+
/**
|
|
12604
|
+
* Rotate preset: when true (default), each cycle oscillates 0° → peak → 0°.
|
|
12605
|
+
* When false, each cycle ramps 0° → peak and holds; with loop, the next cycle snaps to 0° and ramps again.
|
|
12606
|
+
*/
|
|
12607
|
+
rotateSpringBack: external_exports.boolean().optional(),
|
|
12608
|
+
/** Pulse preset: minimum opacity at the dip (0–1). Omitted → `1 - 0.38 * intensity`. */
|
|
12609
|
+
pulseMinOpacity: external_exports.number().min(0).max(1).optional(),
|
|
12610
|
+
/** Ms after the last mount/stagger clip ends before motion applies (authoring + scrub). */
|
|
12611
|
+
delayMsAfterMountEnd: external_exports.number().int().min(0).max(6e4).optional(),
|
|
12612
|
+
/**
|
|
12613
|
+
* Absolute start time (ms from screen mount). When set, overrides
|
|
12614
|
+
* {@link delayMsAfterMountEnd} + mount-clip end so motion can sit between
|
|
12615
|
+
* clips (e.g. after first entry, before exit) when multiple mounts exist.
|
|
12616
|
+
*/
|
|
12617
|
+
timelineStartMs: external_exports.number().int().min(0).max(36e5).optional()
|
|
12618
|
+
}).strict();
|
|
12619
|
+
var RestingMotionEntrySchema5 = RestingMotionSchema5.extend({
|
|
12620
|
+
id: external_exports.string().min(1)
|
|
12621
|
+
});
|
|
12622
|
+
var baseLayerShape5 = {
|
|
12623
|
+
id: LayerIdSchema5,
|
|
12624
|
+
name: external_exports.string().max(80).optional(),
|
|
12625
|
+
restingMotion: RestingMotionSchema5.optional(),
|
|
12626
|
+
restingMotions: external_exports.array(RestingMotionEntrySchema5).optional()
|
|
12627
|
+
};
|
|
12628
|
+
var ThemedColorModesSchema5 = external_exports.object({
|
|
12629
|
+
light: external_exports.string().min(1).optional(),
|
|
12630
|
+
dark: external_exports.string().min(1).optional()
|
|
12631
|
+
}).strict().refine((o) => o.light !== void 0 || o.dark !== void 0, {
|
|
12632
|
+
message: "at least one of light or dark is required"
|
|
12633
|
+
});
|
|
12634
|
+
var ThemedColorSchema5 = external_exports.union([external_exports.string().min(1), ThemedColorModesSchema5]);
|
|
12635
|
+
var LAYOUT_FRACTION_PRESETS5 = ["1/2", "1/3", "2/3", "1/4", "3/4"];
|
|
12636
|
+
var WIDTH_PRESETS5 = ["auto", "full", ...LAYOUT_FRACTION_PRESETS5];
|
|
12637
|
+
var WidthValueSchema5 = external_exports.preprocess(
|
|
12638
|
+
(value) => value === "fill" ? "full" : value,
|
|
12639
|
+
external_exports.union([external_exports.enum(WIDTH_PRESETS5), external_exports.number().int().min(0).max(2e3)])
|
|
12640
|
+
);
|
|
12641
|
+
var HEIGHT_PRESETS5 = ["auto", "full", "fill", ...LAYOUT_FRACTION_PRESETS5];
|
|
12642
|
+
var CommonLayoutHeightSchema5 = external_exports.union([
|
|
12643
|
+
external_exports.enum(HEIGHT_PRESETS5),
|
|
12644
|
+
external_exports.number().int().min(0).max(2e3)
|
|
12645
|
+
]);
|
|
12646
|
+
var NonNegativePxSchema5 = external_exports.number().int().min(0);
|
|
12647
|
+
var PaddingSchema5 = external_exports.object({
|
|
12648
|
+
t: NonNegativePxSchema5.optional(),
|
|
12649
|
+
r: NonNegativePxSchema5.optional(),
|
|
12650
|
+
b: NonNegativePxSchema5.optional(),
|
|
12651
|
+
l: NonNegativePxSchema5.optional()
|
|
12652
|
+
}).partial();
|
|
12653
|
+
var BorderSchema5 = external_exports.object({
|
|
12654
|
+
width: external_exports.number().int().min(0).max(20).optional(),
|
|
12655
|
+
color: ThemedColorSchema5.optional()
|
|
12656
|
+
}).partial();
|
|
12657
|
+
var DropShadowSchema5 = external_exports.object({
|
|
12658
|
+
offsetX: external_exports.number().int().min(-100).max(100).optional(),
|
|
12659
|
+
offsetY: external_exports.number().int().min(-100).max(100).optional(),
|
|
12660
|
+
blur: external_exports.number().int().min(0).max(100).optional(),
|
|
12661
|
+
spread: external_exports.number().int().min(-50).max(50).optional(),
|
|
12662
|
+
color: ThemedColorSchema5.optional(),
|
|
12663
|
+
opacity: external_exports.number().min(0).max(1).optional()
|
|
12664
|
+
}).partial();
|
|
12665
|
+
var CommonStyleSchema5 = external_exports.object({
|
|
12666
|
+
padding: PaddingSchema5.optional(),
|
|
12667
|
+
margin: PaddingSchema5.optional(),
|
|
12668
|
+
radius: external_exports.number().int().min(0).max(96).optional(),
|
|
12669
|
+
background: ThemedColorSchema5.optional(),
|
|
12670
|
+
border: BorderSchema5.optional(),
|
|
12671
|
+
shadow: DropShadowSchema5.optional(),
|
|
12672
|
+
opacity: external_exports.number().min(0).max(1).optional(),
|
|
12673
|
+
/** Multiplier (0–1) applied to the resolved background color alpha only; children stay fully opaque unless `opacity` is set. */
|
|
12674
|
+
backgroundOpacity: external_exports.number().min(0).max(1).optional(),
|
|
12675
|
+
width: WidthValueSchema5.optional(),
|
|
12676
|
+
/** Omit for normal flow; `'absolute'` removes the layer from flex flow (non-root only). */
|
|
12677
|
+
position: external_exports.literal("absolute").optional(),
|
|
12678
|
+
/** Pixel insets when `position === 'absolute'` (same shape as padding). */
|
|
12679
|
+
inset: PaddingSchema5.optional(),
|
|
12680
|
+
zIndex: external_exports.number().int().min(-999).max(999).optional(),
|
|
12681
|
+
/** Static rotation in degrees (CSS `rotate`); not timeline animation. */
|
|
12682
|
+
rotate: external_exports.number().min(-360).max(360).optional(),
|
|
12683
|
+
/** Cross-axis size: `auto` (hug), `full`/`fill` (parent height), fractions, or fixed px. */
|
|
12684
|
+
height: CommonLayoutHeightSchema5.optional(),
|
|
12685
|
+
/** Optional size clamps (px); applied on the flex shell / wrapper like width/height. */
|
|
12686
|
+
minWidth: NonNegativePxSchema5.max(2e3).optional(),
|
|
12687
|
+
maxWidth: NonNegativePxSchema5.max(2e3).optional(),
|
|
12688
|
+
minHeight: NonNegativePxSchema5.max(2e3).optional(),
|
|
12689
|
+
maxHeight: NonNegativePxSchema5.max(2e3).optional(),
|
|
12690
|
+
/** Stroke thickness in px for layers that render a stroke primitive (e.g. loader ring). */
|
|
12691
|
+
strokeWidth: external_exports.number().int().min(0).max(64).optional()
|
|
12692
|
+
}).partial();
|
|
12693
|
+
var TextStyleSchema5 = CommonStyleSchema5.extend({
|
|
12694
|
+
/**
|
|
12695
|
+
* Logical font family: manifest `theme.fontFamily` when omitted, {@link TEXT_FONT_FAMILY_SYSTEM_UI}
|
|
12696
|
+
* for the platform stack, or a custom name (matches `Branding.fontFamilies[].name` for uploaded fonts).
|
|
12697
|
+
*/
|
|
12698
|
+
fontFamily: external_exports.string().min(1).max(128).optional(),
|
|
12699
|
+
fontSize: external_exports.number().int().min(8).max(96).optional(),
|
|
12700
|
+
fontWeight: external_exports.number().int().min(100).max(900).optional(),
|
|
12701
|
+
color: ThemedColorSchema5.optional(),
|
|
12702
|
+
align: external_exports.enum(["left", "center", "right"]).optional(),
|
|
12703
|
+
/** Unitless line-height multiplier (CSS `line-height` without units). */
|
|
12704
|
+
lineHeight: external_exports.number().min(0.8).max(3).optional(),
|
|
12705
|
+
/** Extra spacing between characters as a multiple of `fontSize` (CSS `em`; negative values tighten). */
|
|
12706
|
+
letterSpacing: external_exports.number().min(-0.5).max(1).optional()
|
|
12707
|
+
});
|
|
12708
|
+
var ImageStyleSchema5 = CommonStyleSchema5.extend({
|
|
12709
|
+
fit: external_exports.enum(["cover", "contain", "fill"]).optional(),
|
|
12710
|
+
aspectRatio: external_exports.number().positive().max(10).optional()
|
|
12711
|
+
});
|
|
12712
|
+
var IconStyleSchema5 = CommonStyleSchema5.extend({
|
|
12713
|
+
color: ThemedColorSchema5.optional()
|
|
12714
|
+
});
|
|
12715
|
+
var ICON_FAMILIES5 = ["ionicons"];
|
|
12716
|
+
var ButtonStyleSchema5 = CommonStyleSchema5.extend({
|
|
12717
|
+
fontSize: external_exports.number().int().min(8).max(96).optional(),
|
|
12718
|
+
fontWeight: external_exports.number().int().min(100).max(900).optional(),
|
|
12719
|
+
color: ThemedColorSchema5.optional(),
|
|
12720
|
+
align: external_exports.enum(["left", "center", "right"]).optional()
|
|
12721
|
+
});
|
|
12722
|
+
var BUTTON_LAYER_VARIANTS5 = ["primary", "secondary", "ghost", "destructive"];
|
|
12723
|
+
var ButtonLayerVariantSchema5 = external_exports.enum(BUTTON_LAYER_VARIANTS5);
|
|
12724
|
+
var CommonStyleBreakpointsSchema5 = external_exports.object({
|
|
12725
|
+
sm: CommonStyleSchema5.partial().optional(),
|
|
12726
|
+
md: CommonStyleSchema5.partial().optional(),
|
|
12727
|
+
lg: CommonStyleSchema5.partial().optional(),
|
|
12728
|
+
xl: CommonStyleSchema5.partial().optional(),
|
|
12729
|
+
"2xl": CommonStyleSchema5.partial().optional()
|
|
12730
|
+
}).partial().optional();
|
|
12731
|
+
var TextStyleBreakpointsSchema5 = external_exports.object({
|
|
12732
|
+
sm: TextStyleSchema5.partial().optional(),
|
|
12733
|
+
md: TextStyleSchema5.partial().optional(),
|
|
12734
|
+
lg: TextStyleSchema5.partial().optional(),
|
|
12735
|
+
xl: TextStyleSchema5.partial().optional(),
|
|
12736
|
+
"2xl": TextStyleSchema5.partial().optional()
|
|
12737
|
+
}).partial().optional();
|
|
12738
|
+
var ImageStyleBreakpointsSchema5 = external_exports.object({
|
|
12739
|
+
sm: ImageStyleSchema5.partial().optional(),
|
|
12740
|
+
md: ImageStyleSchema5.partial().optional(),
|
|
12741
|
+
lg: ImageStyleSchema5.partial().optional(),
|
|
12742
|
+
xl: ImageStyleSchema5.partial().optional(),
|
|
12743
|
+
"2xl": ImageStyleSchema5.partial().optional()
|
|
12744
|
+
}).partial().optional();
|
|
12745
|
+
var IconStyleBreakpointsSchema5 = external_exports.object({
|
|
12746
|
+
sm: IconStyleSchema5.partial().optional(),
|
|
12747
|
+
md: IconStyleSchema5.partial().optional(),
|
|
12748
|
+
lg: IconStyleSchema5.partial().optional(),
|
|
12749
|
+
xl: IconStyleSchema5.partial().optional(),
|
|
12750
|
+
"2xl": IconStyleSchema5.partial().optional()
|
|
12751
|
+
}).partial().optional();
|
|
12752
|
+
var ButtonStyleBreakpointsSchema5 = external_exports.object({
|
|
12753
|
+
sm: ButtonStyleSchema5.partial().optional(),
|
|
12754
|
+
md: ButtonStyleSchema5.partial().optional(),
|
|
12755
|
+
lg: ButtonStyleSchema5.partial().optional(),
|
|
12756
|
+
xl: ButtonStyleSchema5.partial().optional(),
|
|
12757
|
+
"2xl": ButtonStyleSchema5.partial().optional()
|
|
12758
|
+
}).partial().optional();
|
|
12759
|
+
var StackLayoutBreakpointPatchSchema5 = external_exports.object({
|
|
12760
|
+
gap: NonNegativePxSchema5.optional(),
|
|
12761
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional()
|
|
12762
|
+
}).partial();
|
|
12763
|
+
var StackLayoutBreakpointsSchema5 = external_exports.object({
|
|
12764
|
+
sm: StackLayoutBreakpointPatchSchema5.optional(),
|
|
12765
|
+
md: StackLayoutBreakpointPatchSchema5.optional(),
|
|
12766
|
+
lg: StackLayoutBreakpointPatchSchema5.optional(),
|
|
12767
|
+
xl: StackLayoutBreakpointPatchSchema5.optional(),
|
|
12768
|
+
"2xl": StackLayoutBreakpointPatchSchema5.optional()
|
|
12769
|
+
}).partial().optional();
|
|
12770
|
+
var ButtonLayoutBreakpointPatchSchema5 = external_exports.object({
|
|
12771
|
+
gap: NonNegativePxSchema5.optional(),
|
|
12772
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional()
|
|
12773
|
+
}).partial();
|
|
12774
|
+
var ButtonLayoutBreakpointsSchema5 = external_exports.object({
|
|
12775
|
+
sm: ButtonLayoutBreakpointPatchSchema5.optional(),
|
|
12776
|
+
md: ButtonLayoutBreakpointPatchSchema5.optional(),
|
|
12777
|
+
lg: ButtonLayoutBreakpointPatchSchema5.optional(),
|
|
12778
|
+
xl: ButtonLayoutBreakpointPatchSchema5.optional(),
|
|
12779
|
+
"2xl": ButtonLayoutBreakpointPatchSchema5.optional()
|
|
12780
|
+
}).partial().optional();
|
|
12781
|
+
var AuthLayoutBreakpointPatchSchema5 = external_exports.object({
|
|
12782
|
+
gap: NonNegativePxSchema5.optional(),
|
|
12783
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional()
|
|
12784
|
+
}).partial();
|
|
12785
|
+
var AuthLayoutBreakpointsSchema5 = external_exports.object({
|
|
12786
|
+
sm: AuthLayoutBreakpointPatchSchema5.optional(),
|
|
12787
|
+
md: AuthLayoutBreakpointPatchSchema5.optional(),
|
|
12788
|
+
lg: AuthLayoutBreakpointPatchSchema5.optional(),
|
|
12789
|
+
xl: AuthLayoutBreakpointPatchSchema5.optional(),
|
|
12790
|
+
"2xl": AuthLayoutBreakpointPatchSchema5.optional()
|
|
12791
|
+
}).partial().optional();
|
|
12792
|
+
var ChoiceLayoutBreakpointPatchSchema5 = external_exports.object({
|
|
12793
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
12794
|
+
gap: NonNegativePxSchema5.optional(),
|
|
12795
|
+
columns: external_exports.number().int().min(1).max(6).optional()
|
|
12796
|
+
}).partial();
|
|
12797
|
+
var ChoiceLayoutBreakpointsSchema5 = external_exports.object({
|
|
12798
|
+
sm: ChoiceLayoutBreakpointPatchSchema5.optional(),
|
|
12799
|
+
md: ChoiceLayoutBreakpointPatchSchema5.optional(),
|
|
12800
|
+
lg: ChoiceLayoutBreakpointPatchSchema5.optional(),
|
|
12801
|
+
xl: ChoiceLayoutBreakpointPatchSchema5.optional(),
|
|
12802
|
+
"2xl": ChoiceLayoutBreakpointPatchSchema5.optional()
|
|
12803
|
+
}).partial().optional();
|
|
12804
|
+
var CarouselLayoutBreakpointPatchSchema5 = external_exports.object({
|
|
12805
|
+
pageAlignment: external_exports.enum(["top", "center", "bottom"]).optional(),
|
|
12806
|
+
pageSpacing: NonNegativePxSchema5.optional(),
|
|
12807
|
+
pagePeek: NonNegativePxSchema5.optional()
|
|
12808
|
+
}).partial();
|
|
12809
|
+
var CarouselLayoutBreakpointsSchema5 = external_exports.object({
|
|
12810
|
+
sm: CarouselLayoutBreakpointPatchSchema5.optional(),
|
|
12811
|
+
md: CarouselLayoutBreakpointPatchSchema5.optional(),
|
|
12812
|
+
lg: CarouselLayoutBreakpointPatchSchema5.optional(),
|
|
12813
|
+
xl: CarouselLayoutBreakpointPatchSchema5.optional(),
|
|
12814
|
+
"2xl": CarouselLayoutBreakpointPatchSchema5.optional()
|
|
12815
|
+
}).partial().optional();
|
|
12816
|
+
var DecisionNodeJumpIdSchema5 = external_exports.string().min(1).max(64).regex(/^dec_[a-z0-9_]+$/i);
|
|
12817
|
+
var ExternalSurfaceJumpIdSchema5 = external_exports.string().min(1).max(64).regex(/^surf_[a-z0-9_]+$/i);
|
|
12818
|
+
var FlowGraphNodeJumpTargetSchema5 = ScreenIdSchema5.or(DecisionNodeJumpIdSchema5).or(
|
|
12819
|
+
ExternalSurfaceJumpIdSchema5
|
|
12820
|
+
);
|
|
12821
|
+
var OS_PERMISSION_KEYS5 = [
|
|
12822
|
+
"notifications",
|
|
12823
|
+
"camera",
|
|
12824
|
+
"microphone",
|
|
12825
|
+
"photo_library",
|
|
12826
|
+
"contacts",
|
|
12827
|
+
"calendar",
|
|
12828
|
+
"reminders",
|
|
12829
|
+
"location_when_in_use",
|
|
12830
|
+
"location_always",
|
|
12831
|
+
"motion",
|
|
12832
|
+
"bluetooth",
|
|
12833
|
+
"app_tracking_transparency",
|
|
12834
|
+
"speech_recognition",
|
|
12835
|
+
"face_id",
|
|
12836
|
+
"health_kit",
|
|
12837
|
+
"media_library",
|
|
12838
|
+
"local_network",
|
|
12839
|
+
"nearby_interactions",
|
|
12840
|
+
"nfc",
|
|
12841
|
+
"full_screen_intent_android",
|
|
12842
|
+
"sms_android",
|
|
12843
|
+
"phone_android"
|
|
12844
|
+
];
|
|
12845
|
+
var OsPermissionKeySchema5 = external_exports.enum(OS_PERMISSION_KEYS5);
|
|
12846
|
+
var PERMISSION_OUTCOME_VALUES5 = ["granted", "denied", "blocked"];
|
|
12847
|
+
external_exports.enum(PERMISSION_OUTCOME_VALUES5);
|
|
12848
|
+
var OS_PERMISSION_OUTCOME_CONTINUE5 = "continue";
|
|
12849
|
+
var OS_PERMISSION_OUTCOME_END5 = "end";
|
|
12850
|
+
var OsPermissionOutcomeBranchTargetSchema5 = FlowGraphNodeJumpTargetSchema5.or(
|
|
12851
|
+
external_exports.literal(OS_PERMISSION_OUTCOME_CONTINUE5)
|
|
12852
|
+
).or(external_exports.literal(OS_PERMISSION_OUTCOME_END5));
|
|
12853
|
+
var OsPermissionOutcomesSchema5 = external_exports.object({
|
|
12854
|
+
granted: OsPermissionOutcomeBranchTargetSchema5,
|
|
12855
|
+
denied: OsPermissionOutcomeBranchTargetSchema5,
|
|
12856
|
+
blocked: OsPermissionOutcomeBranchTargetSchema5
|
|
12857
|
+
}).strict();
|
|
12858
|
+
var APP_REVIEW_OUTCOMES5 = ["not_shown", "dismissed"];
|
|
12859
|
+
external_exports.enum(APP_REVIEW_OUTCOMES5);
|
|
12860
|
+
var CAROUSEL_ADVANCE_ON_LAST5 = ["noop", "complete"];
|
|
12861
|
+
var CarouselAdvanceOnLastSchema5 = external_exports.enum(CAROUSEL_ADVANCE_ON_LAST5);
|
|
12862
|
+
var ButtonActionSchema5 = external_exports.discriminatedUnion("kind", [
|
|
12863
|
+
external_exports.object({ kind: external_exports.literal("none") }),
|
|
12864
|
+
external_exports.object({ kind: external_exports.literal("continue") }),
|
|
12865
|
+
external_exports.object({ kind: external_exports.literal("skip") }),
|
|
12866
|
+
external_exports.object({ kind: external_exports.literal("end_flow") }),
|
|
12867
|
+
external_exports.object({
|
|
12868
|
+
kind: external_exports.literal("go_back_one_screen"),
|
|
12869
|
+
fallbackScreenId: ScreenIdSchema5.optional()
|
|
12870
|
+
}),
|
|
12871
|
+
external_exports.object({ kind: external_exports.literal("go_to_step"), screenId: FlowGraphNodeJumpTargetSchema5 }),
|
|
12872
|
+
external_exports.object({
|
|
12873
|
+
kind: external_exports.literal("request_os_permission"),
|
|
12874
|
+
permissionKey: OsPermissionKeySchema5,
|
|
12875
|
+
outcomes: OsPermissionOutcomesSchema5
|
|
12876
|
+
}),
|
|
12877
|
+
external_exports.object({
|
|
12878
|
+
kind: external_exports.literal("play_media"),
|
|
12879
|
+
targetLayerIds: external_exports.array(external_exports.string().min(1)).min(1)
|
|
12880
|
+
}),
|
|
12881
|
+
external_exports.object({ kind: external_exports.literal("request_app_review") }),
|
|
12882
|
+
external_exports.object({
|
|
12883
|
+
kind: external_exports.literal("advance_carousel"),
|
|
12884
|
+
targetLayerId: external_exports.string().min(1),
|
|
12885
|
+
onLast: CarouselAdvanceOnLastSchema5.optional()
|
|
12886
|
+
}),
|
|
12887
|
+
external_exports.object({ kind: external_exports.literal("dismiss_banner") })
|
|
12888
|
+
]);
|
|
12889
|
+
var TEXT_INPUT_TYPES5 = ["plain", "email", "phone", "url", "number", "multiline"];
|
|
12890
|
+
var TextInputTypeSchema5 = external_exports.enum(TEXT_INPUT_TYPES5);
|
|
12891
|
+
var COUNTER_DISPLAY_KINDS5 = ["number", "time"];
|
|
12892
|
+
var COUNTER_TIME_FORMATS5 = ["mm_ss", "hh_mm_ss", "dd_hh_mm_ss"];
|
|
12893
|
+
var CheckboxGlyphStyleSchema5 = external_exports.object({
|
|
12894
|
+
/** Square edge length in px. */
|
|
12895
|
+
size: external_exports.number().int().min(8).max(128).optional(),
|
|
12896
|
+
radius: external_exports.number().int().min(0).max(96).optional(),
|
|
12897
|
+
background: ThemedColorSchema5.optional(),
|
|
12898
|
+
border: BorderSchema5.optional(),
|
|
12899
|
+
shadow: DropShadowSchema5.optional(),
|
|
12900
|
+
opacity: external_exports.number().min(0).max(1).optional(),
|
|
12901
|
+
/** Fill color for the check mark when checked. */
|
|
12902
|
+
checkColor: ThemedColorSchema5.optional()
|
|
12903
|
+
}).partial();
|
|
12904
|
+
var OAUTH_LOGIN_PRESETS5 = ["github", "google", "apple"];
|
|
12905
|
+
var OAuthPresetButtonChromeSchema5 = CommonStyleSchema5.pick({
|
|
12906
|
+
width: true,
|
|
12907
|
+
padding: true,
|
|
12908
|
+
margin: true,
|
|
12909
|
+
radius: true
|
|
12910
|
+
}).partial();
|
|
12911
|
+
var OAuthPresetButtonChromeBreakpointsSchema5 = external_exports.object({
|
|
12912
|
+
sm: OAuthPresetButtonChromeSchema5.partial().optional(),
|
|
12913
|
+
md: OAuthPresetButtonChromeSchema5.partial().optional(),
|
|
12914
|
+
lg: OAuthPresetButtonChromeSchema5.partial().optional(),
|
|
12915
|
+
xl: OAuthPresetButtonChromeSchema5.partial().optional(),
|
|
12916
|
+
"2xl": OAuthPresetButtonChromeSchema5.partial().optional()
|
|
12917
|
+
}).partial().optional();
|
|
12918
|
+
var EMAIL_PASSWORD_AUTH_MODES5 = ["sign_in", "sign_up"];
|
|
12919
|
+
var EMAIL_PASSWORD_SLOTS5 = ["email", "password", "confirm"];
|
|
12920
|
+
var lazyLayer10 = () => layerSchemaStore5.schema;
|
|
12921
|
+
var ButtonLayerSchema5 = external_exports.object({
|
|
12922
|
+
...baseLayerShape5,
|
|
12923
|
+
kind: external_exports.literal("button"),
|
|
12924
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer10())),
|
|
12925
|
+
action: ButtonActionSchema5,
|
|
12926
|
+
variant: ButtonLayerVariantSchema5,
|
|
12927
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
12928
|
+
gap: external_exports.number().int().min(0).optional(),
|
|
12929
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
12930
|
+
distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
12931
|
+
style: ButtonStyleSchema5.optional(),
|
|
12932
|
+
styleBreakpoints: ButtonStyleBreakpointsSchema5,
|
|
12933
|
+
buttonLayoutBreakpoints: ButtonLayoutBreakpointsSchema5
|
|
12934
|
+
});
|
|
12935
|
+
var BackButtonLayerSchema5 = external_exports.object({
|
|
12936
|
+
...baseLayerShape5,
|
|
12937
|
+
kind: external_exports.literal("back_button"),
|
|
12938
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer10())),
|
|
12939
|
+
variant: ButtonLayerVariantSchema5,
|
|
12940
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
12941
|
+
gap: external_exports.number().int().min(0).optional(),
|
|
12942
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
12943
|
+
distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
12944
|
+
style: ButtonStyleSchema5.optional(),
|
|
12945
|
+
styleBreakpoints: ButtonStyleBreakpointsSchema5,
|
|
12946
|
+
buttonLayoutBreakpoints: ButtonLayoutBreakpointsSchema5,
|
|
12947
|
+
fallbackScreenId: ScreenIdSchema5.optional()
|
|
12948
|
+
});
|
|
12949
|
+
var ProgressLayerSchema5 = external_exports.object({
|
|
12950
|
+
...baseLayerShape5,
|
|
12951
|
+
kind: external_exports.literal("progress"),
|
|
12952
|
+
trackColor: ThemedColorSchema5.optional(),
|
|
12953
|
+
fillColor: ThemedColorSchema5.optional(),
|
|
12954
|
+
style: CommonStyleSchema5.optional(),
|
|
12955
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
12956
|
+
});
|
|
12957
|
+
var LoaderOnCompleteSchema5 = external_exports.discriminatedUnion("mode", [
|
|
12958
|
+
external_exports.object({ mode: external_exports.literal("none") }),
|
|
12959
|
+
external_exports.object({ mode: external_exports.literal("next") }),
|
|
12960
|
+
external_exports.object({ mode: external_exports.literal("screen"), screenId: FlowGraphNodeJumpTargetSchema5 })
|
|
12961
|
+
]);
|
|
12962
|
+
var LoaderLayerSchema5 = external_exports.object({
|
|
12963
|
+
...baseLayerShape5,
|
|
12964
|
+
kind: external_exports.literal("loader"),
|
|
12965
|
+
variant: external_exports.enum(["linear", "circular"]).optional(),
|
|
12966
|
+
targetPercent: external_exports.number().int().min(0).max(100).optional(),
|
|
12967
|
+
fillDelayMs: external_exports.number().int().min(0).max(1e4).optional(),
|
|
12968
|
+
durationMs: external_exports.number().int().min(0).max(36e5).optional(),
|
|
12969
|
+
onComplete: LoaderOnCompleteSchema5.optional(),
|
|
12970
|
+
trackColor: ThemedColorSchema5.optional(),
|
|
12971
|
+
trackOpacity: external_exports.number().min(0).max(1).optional(),
|
|
12972
|
+
fillColor: ThemedColorSchema5.optional(),
|
|
12973
|
+
/** Horizontal alignment of the bar or ring within the layer box (default start). */
|
|
12974
|
+
align: external_exports.enum(["start", "center", "end"]).optional(),
|
|
12975
|
+
style: CommonStyleSchema5.optional(),
|
|
12976
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
12977
|
+
}).superRefine((data, ctx) => {
|
|
12978
|
+
if (data.variant !== "circular") return;
|
|
12979
|
+
const w = data.style?.width;
|
|
12980
|
+
const h = data.style?.height;
|
|
12981
|
+
if (typeof w === "number" && typeof h === "number" && w !== h) {
|
|
12982
|
+
ctx.addIssue({
|
|
12983
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12984
|
+
message: "circular loader requires style.width === style.height",
|
|
12985
|
+
path: ["style", "height"]
|
|
12986
|
+
});
|
|
12987
|
+
}
|
|
12988
|
+
});
|
|
12989
|
+
var CounterLayerSchema5 = external_exports.object({
|
|
12990
|
+
...baseLayerShape5,
|
|
12991
|
+
kind: external_exports.literal("counter"),
|
|
12992
|
+
startValue: external_exports.number().finite(),
|
|
12993
|
+
endValue: external_exports.number().finite(),
|
|
12994
|
+
durationMs: external_exports.number().int().min(0).max(36e5).optional(),
|
|
12995
|
+
delayMs: external_exports.number().int().min(0).max(36e5).optional(),
|
|
12996
|
+
decimalPlaces: external_exports.number().int().min(0).max(10).optional(),
|
|
12997
|
+
displayKind: external_exports.enum(COUNTER_DISPLAY_KINDS5).optional(),
|
|
12998
|
+
timeFormat: external_exports.enum(COUNTER_TIME_FORMATS5).optional(),
|
|
12999
|
+
style: TextStyleSchema5.optional(),
|
|
13000
|
+
styleBreakpoints: TextStyleBreakpointsSchema5
|
|
13001
|
+
});
|
|
13002
|
+
var CheckboxLayerSchema5 = external_exports.object({
|
|
13003
|
+
...baseLayerShape5,
|
|
13004
|
+
kind: external_exports.literal("checkbox"),
|
|
13005
|
+
fieldKey: external_exports.string().min(1),
|
|
13006
|
+
blocking: external_exports.boolean().optional(),
|
|
13007
|
+
uncheckedStyle: CheckboxGlyphStyleSchema5.optional(),
|
|
13008
|
+
checkedStyle: CheckboxGlyphStyleSchema5.optional(),
|
|
13009
|
+
style: CommonStyleSchema5.optional(),
|
|
13010
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
13011
|
+
});
|
|
13012
|
+
var lazyLayer25 = () => layerSchemaStore5.schema;
|
|
13013
|
+
var migrateStackJustifyForParse5 = (raw) => {
|
|
13014
|
+
if (!raw || typeof raw !== "object") return raw;
|
|
13015
|
+
const o = { ...raw };
|
|
13016
|
+
if (o.justify != null && o.distribution == null) o.distribution = o.justify;
|
|
13017
|
+
delete o.justify;
|
|
13018
|
+
return o;
|
|
13019
|
+
};
|
|
13020
|
+
var StackLayerSchema5 = external_exports.preprocess(
|
|
13021
|
+
migrateStackJustifyForParse5,
|
|
13022
|
+
external_exports.object({
|
|
13023
|
+
...baseLayerShape5,
|
|
13024
|
+
kind: external_exports.literal("stack"),
|
|
13025
|
+
style: CommonStyleSchema5.optional(),
|
|
13026
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5,
|
|
13027
|
+
stackLayoutBreakpoints: StackLayoutBreakpointsSchema5,
|
|
13028
|
+
selectedStyle: CommonStyleSchema5.optional(),
|
|
13029
|
+
selectedStyleBreakpoints: CommonStyleBreakpointsSchema5,
|
|
13030
|
+
direction: external_exports.enum(["vertical", "horizontal"]),
|
|
13031
|
+
gap: external_exports.number().int().min(0).optional(),
|
|
13032
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
13033
|
+
distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
13034
|
+
wrap: external_exports.boolean().optional(),
|
|
13035
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer25()))
|
|
13036
|
+
})
|
|
13037
|
+
);
|
|
13038
|
+
var TextLayerSchema5 = external_exports.object({
|
|
13039
|
+
...baseLayerShape5,
|
|
13040
|
+
kind: external_exports.literal("text"),
|
|
13041
|
+
text: LocalizedTextSchema6,
|
|
13042
|
+
style: TextStyleSchema5.optional(),
|
|
13043
|
+
styleBreakpoints: TextStyleBreakpointsSchema5,
|
|
13044
|
+
/** Merged on top of resolved `style` when this layer is inside a selected choice option. */
|
|
13045
|
+
selectedStyle: TextStyleSchema5.optional()
|
|
13046
|
+
});
|
|
13047
|
+
var migrateLegacyHyperlinkForParse5 = (raw) => {
|
|
13048
|
+
if (!raw || typeof raw !== "object") return raw;
|
|
13049
|
+
const o = raw;
|
|
13050
|
+
if (o.kind !== "hyperlink") return raw;
|
|
13051
|
+
const existing = o.children;
|
|
13052
|
+
if (Array.isArray(existing) && existing.length > 0) return raw;
|
|
13053
|
+
const idSrc = typeof o.id === "string" ? o.id.replace(/[^a-zA-Z0-9_]/g, "_") : "lyr_hyperlink";
|
|
13054
|
+
const textChildId = `${idSrc}_lnktxt`.slice(0, 64);
|
|
13055
|
+
const children = [
|
|
13056
|
+
{
|
|
13057
|
+
id: textChildId,
|
|
13058
|
+
kind: "text",
|
|
13059
|
+
text: o.text ?? { default: "Link" },
|
|
13060
|
+
...typeof o.style === "object" && o.style !== null ? { style: o.style } : {},
|
|
13061
|
+
...typeof o.styleBreakpoints === "object" && o.styleBreakpoints !== null ? { styleBreakpoints: o.styleBreakpoints } : {}
|
|
13062
|
+
}
|
|
13063
|
+
];
|
|
13064
|
+
const next = {
|
|
13065
|
+
...o,
|
|
13066
|
+
children
|
|
13067
|
+
};
|
|
13068
|
+
delete next.text;
|
|
13069
|
+
delete next.style;
|
|
13070
|
+
delete next.styleBreakpoints;
|
|
13071
|
+
return next;
|
|
13072
|
+
};
|
|
13073
|
+
var HyperlinkLayerSchemaInner5 = external_exports.object({
|
|
13074
|
+
...baseLayerShape5,
|
|
13075
|
+
kind: external_exports.literal("hyperlink"),
|
|
13076
|
+
href: external_exports.string().min(1).max(2048),
|
|
13077
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer25()).min(1)),
|
|
13078
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
13079
|
+
gap: external_exports.number().int().min(0).optional(),
|
|
13080
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
13081
|
+
distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
13082
|
+
wrap: external_exports.boolean().optional(),
|
|
13083
|
+
style: CommonStyleSchema5.optional(),
|
|
13084
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5,
|
|
13085
|
+
hyperlinkLayoutBreakpoints: StackLayoutBreakpointsSchema5
|
|
13086
|
+
}).superRefine((data, ctx) => {
|
|
13087
|
+
const p = parseHyperlinkHref5(data.href.trim());
|
|
13088
|
+
if (!p.ok) {
|
|
13089
|
+
ctx.addIssue({
|
|
13090
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13091
|
+
message: "hyperlink href must be a valid https: or mailto: URL",
|
|
13092
|
+
path: ["href"]
|
|
13093
|
+
});
|
|
13094
|
+
}
|
|
13095
|
+
});
|
|
13096
|
+
var HyperlinkLayerSchema5 = external_exports.preprocess(
|
|
13097
|
+
migrateLegacyHyperlinkForParse5,
|
|
13098
|
+
HyperlinkLayerSchemaInner5
|
|
13099
|
+
);
|
|
13100
|
+
var ImageLayerSchema5 = external_exports.object({
|
|
13101
|
+
...baseLayerShape5,
|
|
13102
|
+
kind: external_exports.literal("image"),
|
|
13103
|
+
media: MediaReferenceSchema5.optional(),
|
|
13104
|
+
alt: external_exports.string().max(280).optional(),
|
|
13105
|
+
style: ImageStyleSchema5.optional(),
|
|
13106
|
+
styleBreakpoints: ImageStyleBreakpointsSchema5,
|
|
13107
|
+
selectedStyle: ImageStyleSchema5.optional()
|
|
13108
|
+
});
|
|
13109
|
+
var LottieLayerSchema5 = external_exports.object({
|
|
13110
|
+
...baseLayerShape5,
|
|
13111
|
+
kind: external_exports.literal("lottie"),
|
|
13112
|
+
media: MediaReferenceSchema5.optional(),
|
|
13113
|
+
loop: external_exports.boolean().optional(),
|
|
13114
|
+
autoPlay: external_exports.boolean().optional(),
|
|
13115
|
+
triggerLayerId: external_exports.string().min(1).optional(),
|
|
13116
|
+
onComplete: LoaderOnCompleteSchema5.optional(),
|
|
13117
|
+
style: ImageStyleSchema5.optional(),
|
|
13118
|
+
styleBreakpoints: ImageStyleBreakpointsSchema5,
|
|
13119
|
+
selectedStyle: ImageStyleSchema5.optional()
|
|
13120
|
+
});
|
|
13121
|
+
var VideoLayerSchema5 = external_exports.object({
|
|
13122
|
+
...baseLayerShape5,
|
|
13123
|
+
kind: external_exports.literal("video"),
|
|
13124
|
+
media: MediaReferenceSchema5.optional(),
|
|
13125
|
+
loop: external_exports.boolean().optional(),
|
|
13126
|
+
autoPlay: external_exports.boolean().optional(),
|
|
13127
|
+
triggerLayerId: external_exports.string().min(1).optional(),
|
|
13128
|
+
onComplete: LoaderOnCompleteSchema5.optional(),
|
|
13129
|
+
audioEnabled: external_exports.boolean().optional(),
|
|
13130
|
+
style: ImageStyleSchema5.optional(),
|
|
13131
|
+
styleBreakpoints: ImageStyleBreakpointsSchema5,
|
|
13132
|
+
selectedStyle: ImageStyleSchema5.optional()
|
|
13133
|
+
});
|
|
13134
|
+
var IconLayerSchema5 = external_exports.object({
|
|
13135
|
+
...baseLayerShape5,
|
|
13136
|
+
kind: external_exports.literal("icon"),
|
|
13137
|
+
family: external_exports.enum(ICON_FAMILIES5),
|
|
13138
|
+
iconName: external_exports.string().min(1).max(128),
|
|
13139
|
+
style: IconStyleSchema5.optional(),
|
|
13140
|
+
styleBreakpoints: IconStyleBreakpointsSchema5,
|
|
13141
|
+
selectedStyle: IconStyleSchema5.optional()
|
|
13142
|
+
});
|
|
13143
|
+
var lazyLayer35 = () => layerSchemaStore5.schema;
|
|
13144
|
+
var OAuthProviderPresetLayerSchema5 = external_exports.object({
|
|
13145
|
+
...baseLayerShape5,
|
|
13146
|
+
kind: external_exports.literal("oauth_provider"),
|
|
13147
|
+
variant: external_exports.literal("preset"),
|
|
13148
|
+
provider: external_exports.enum(OAUTH_LOGIN_PRESETS5),
|
|
13149
|
+
label: LocalizedTextSchema6.optional(),
|
|
13150
|
+
style: OAuthPresetButtonChromeSchema5.optional(),
|
|
13151
|
+
styleBreakpoints: OAuthPresetButtonChromeBreakpointsSchema5.optional()
|
|
13152
|
+
});
|
|
13153
|
+
var migrateOAuthProviderCustomIncoming5 = (raw) => {
|
|
13154
|
+
if (!raw || typeof raw !== "object") return raw;
|
|
13155
|
+
const o = raw;
|
|
13156
|
+
if (o.kind !== "oauth_provider" || o.variant !== "custom") return raw;
|
|
13157
|
+
const ch = o.children;
|
|
13158
|
+
if (Array.isArray(ch) && ch.length > 0) {
|
|
13159
|
+
const next2 = { ...o };
|
|
13160
|
+
if (next2.buttonVariant === void 0) next2.buttonVariant = "secondary";
|
|
13161
|
+
return next2;
|
|
13162
|
+
}
|
|
13163
|
+
const pid = typeof o.id === "string" ? o.id : "lyr_oauth_custom";
|
|
13164
|
+
const slug = pid.replace(/[^a-z0-9_]/gi, "_").slice(0, 40) || "oauth";
|
|
13165
|
+
const label = o.label ?? { default: "Custom" };
|
|
13166
|
+
let family = o.family ?? "ionicons";
|
|
13167
|
+
let iconName = o.iconName ?? "shield-outline";
|
|
13168
|
+
if (family === "sf_symbol") {
|
|
13169
|
+
family = "ionicons";
|
|
13170
|
+
iconName = "star-outline";
|
|
13171
|
+
}
|
|
13172
|
+
const cid = slug;
|
|
13173
|
+
const iconId = `lyr_${cid}_ico`.slice(0, 64);
|
|
13174
|
+
const textId = `lyr_${cid}_txt`.slice(0, 64);
|
|
13175
|
+
const next = { ...o };
|
|
13176
|
+
delete next.label;
|
|
13177
|
+
delete next.family;
|
|
13178
|
+
delete next.iconName;
|
|
13179
|
+
return {
|
|
13180
|
+
...next,
|
|
13181
|
+
buttonVariant: o.buttonVariant ?? "secondary",
|
|
13182
|
+
children: [
|
|
13183
|
+
{ id: iconId, kind: "icon", family, iconName },
|
|
13184
|
+
{ id: textId, kind: "text", text: label }
|
|
13185
|
+
]
|
|
13186
|
+
};
|
|
13187
|
+
};
|
|
13188
|
+
var OAuthProviderCustomLayerSchemaValidated5 = external_exports.object({
|
|
13189
|
+
...baseLayerShape5,
|
|
13190
|
+
kind: external_exports.literal("oauth_provider"),
|
|
13191
|
+
variant: external_exports.literal("custom"),
|
|
13192
|
+
rowId: external_exports.string().uuid(),
|
|
13193
|
+
buttonVariant: ButtonLayerVariantSchema5,
|
|
13194
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
13195
|
+
gap: external_exports.number().int().min(0).optional(),
|
|
13196
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
13197
|
+
distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
13198
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer35()).min(1)),
|
|
13199
|
+
style: ButtonStyleSchema5.optional(),
|
|
13200
|
+
styleBreakpoints: ButtonStyleBreakpointsSchema5,
|
|
13201
|
+
buttonLayoutBreakpoints: ButtonLayoutBreakpointsSchema5
|
|
13202
|
+
});
|
|
13203
|
+
var OAuthProviderCustomLayerSchema5 = external_exports.preprocess(
|
|
13204
|
+
migrateOAuthProviderCustomIncoming5,
|
|
13205
|
+
OAuthProviderCustomLayerSchemaValidated5
|
|
13206
|
+
);
|
|
13207
|
+
var OAuthProviderLayerSchema5 = external_exports.union([
|
|
13208
|
+
OAuthProviderPresetLayerSchema5,
|
|
13209
|
+
OAuthProviderCustomLayerSchema5
|
|
13210
|
+
]);
|
|
13211
|
+
var OAuthLoginPresetProviderSchema5 = external_exports.object({
|
|
13212
|
+
type: external_exports.literal("preset"),
|
|
13213
|
+
provider: external_exports.enum(OAUTH_LOGIN_PRESETS5)
|
|
13214
|
+
});
|
|
13215
|
+
var OAuthLoginCustomProviderSchema5 = external_exports.object({
|
|
13216
|
+
type: external_exports.literal("custom"),
|
|
13217
|
+
rowId: external_exports.string().uuid(),
|
|
13218
|
+
label: LocalizedTextSchema6,
|
|
13219
|
+
family: external_exports.enum(ICON_FAMILIES5),
|
|
13220
|
+
iconName: external_exports.string().min(1).max(128)
|
|
13221
|
+
});
|
|
13222
|
+
var OAuthLoginProviderSchema5 = external_exports.discriminatedUnion("type", [
|
|
13223
|
+
OAuthLoginPresetProviderSchema5,
|
|
13224
|
+
OAuthLoginCustomProviderSchema5
|
|
13225
|
+
]);
|
|
13226
|
+
var oauthLoginChildrenUniquePresets5 = (children, ctx) => {
|
|
13227
|
+
const seen = /* @__PURE__ */ new Set();
|
|
13228
|
+
for (let i = 0; i < children.length; i++) {
|
|
13229
|
+
const c = children[i];
|
|
13230
|
+
if (!c || c.kind !== "oauth_provider" || c.variant !== "preset") continue;
|
|
13231
|
+
const preset = c.provider;
|
|
13232
|
+
if (seen.has(preset)) {
|
|
13233
|
+
ctx.addIssue({
|
|
13234
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13235
|
+
message: `duplicate OAuth preset "${preset}"`,
|
|
13236
|
+
path: ["children", i, "provider"]
|
|
13237
|
+
});
|
|
13238
|
+
return;
|
|
13239
|
+
}
|
|
13240
|
+
seen.add(preset);
|
|
13241
|
+
}
|
|
13242
|
+
};
|
|
13243
|
+
var migrateOAuthLoginIncoming5 = (raw) => {
|
|
13244
|
+
if (!raw || typeof raw !== "object") return raw;
|
|
13245
|
+
const o = raw;
|
|
13246
|
+
if (o.kind !== "oauth_login") return raw;
|
|
13247
|
+
if (Array.isArray(o.children) && o.children.length > 0) return raw;
|
|
13248
|
+
const provs = o.providers;
|
|
13249
|
+
if (!Array.isArray(provs) || provs.length === 0) return raw;
|
|
13250
|
+
const pid = typeof o.id === "string" ? o.id : "lyr_oauth_legacy";
|
|
13251
|
+
const slug = pid.replace(/^lyr_/i, "").replace(/[^a-z0-9_]/gi, "_").replace(/^_+/, "").slice(0, 48) || "oauth";
|
|
13252
|
+
const children = provs.map((p, idx) => {
|
|
13253
|
+
const prov = p ?? {};
|
|
13254
|
+
const cid = `lyr_${slug}_opr_${idx}`.slice(0, 64);
|
|
13255
|
+
if (prov.type === "preset") {
|
|
13256
|
+
return {
|
|
13257
|
+
id: cid,
|
|
13258
|
+
kind: "oauth_provider",
|
|
13259
|
+
variant: "preset",
|
|
13260
|
+
provider: prov.provider
|
|
13261
|
+
};
|
|
13262
|
+
}
|
|
13263
|
+
return {
|
|
13264
|
+
id: cid,
|
|
13265
|
+
kind: "oauth_provider",
|
|
13266
|
+
variant: "custom",
|
|
13267
|
+
rowId: String(prov.rowId),
|
|
13268
|
+
buttonVariant: "secondary",
|
|
13269
|
+
children: [
|
|
13270
|
+
{
|
|
13271
|
+
id: `${cid}_ico`.slice(0, 64),
|
|
13272
|
+
kind: "icon",
|
|
13273
|
+
family: prov.family ?? "ionicons",
|
|
13274
|
+
iconName: String(prov.iconName ?? "shield")
|
|
13275
|
+
},
|
|
13276
|
+
{
|
|
13277
|
+
id: `${cid}_txt`.slice(0, 64),
|
|
13278
|
+
kind: "text",
|
|
13279
|
+
text: prov.label ?? { default: "Custom" }
|
|
13280
|
+
}
|
|
13281
|
+
]
|
|
13282
|
+
};
|
|
13283
|
+
});
|
|
13284
|
+
const { providers: _omit, ...rest } = o;
|
|
13285
|
+
return { ...rest, children };
|
|
13286
|
+
};
|
|
13287
|
+
var OAuthLoginLayerSchemaValidated5 = external_exports.object({
|
|
13288
|
+
...baseLayerShape5,
|
|
13289
|
+
kind: external_exports.literal("oauth_login"),
|
|
13290
|
+
children: external_exports.lazy(
|
|
13291
|
+
() => external_exports.array(OAuthProviderLayerSchema5).min(1).superRefine(oauthLoginChildrenUniquePresets5)
|
|
13292
|
+
),
|
|
13293
|
+
gap: external_exports.number().int().min(0).optional(),
|
|
13294
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
13295
|
+
authLayoutBreakpoints: AuthLayoutBreakpointsSchema5,
|
|
13296
|
+
style: CommonStyleSchema5.optional(),
|
|
13297
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
13298
|
+
});
|
|
13299
|
+
var OAuthLoginLayerSchema5 = external_exports.preprocess(
|
|
13300
|
+
migrateOAuthLoginIncoming5,
|
|
13301
|
+
OAuthLoginLayerSchemaValidated5
|
|
13302
|
+
);
|
|
13303
|
+
external_exports.array(OAuthLoginProviderSchema5).min(1).superRefine((providers, ctx) => {
|
|
13304
|
+
const seen = /* @__PURE__ */ new Set();
|
|
13305
|
+
for (let i = 0; i < providers.length; i++) {
|
|
13306
|
+
const p = providers[i];
|
|
13307
|
+
if (!p || p.type !== "preset") continue;
|
|
13308
|
+
const preset = p.provider;
|
|
13309
|
+
if (seen.has(preset)) {
|
|
13310
|
+
ctx.addIssue({
|
|
13311
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13312
|
+
message: `duplicate OAuth preset "${preset}"`,
|
|
13313
|
+
path: [i, "provider"]
|
|
13314
|
+
});
|
|
13315
|
+
return;
|
|
13316
|
+
}
|
|
13317
|
+
seen.add(preset);
|
|
13318
|
+
}
|
|
13319
|
+
});
|
|
13320
|
+
var FIELD_KEY_RE6 = /^[a-z][a-z0-9_]*$/;
|
|
13321
|
+
var FieldKeySchema6 = external_exports.string().min(1).max(64).regex(FIELD_KEY_RE6, "field key must be snake_case");
|
|
13322
|
+
var FieldClassificationSchema6 = external_exports.enum(FIELD_CLASSIFICATIONS6);
|
|
13323
|
+
var lazyLayer45 = () => layerSchemaStore5.schema;
|
|
13324
|
+
var EmailPasswordAuthModeSchema5 = external_exports.enum(EMAIL_PASSWORD_AUTH_MODES5);
|
|
13325
|
+
var PasswordRulesSchema5 = external_exports.object({
|
|
13326
|
+
minLength: external_exports.number().int().min(4).max(128).optional(),
|
|
13327
|
+
maxLength: external_exports.number().int().min(4).max(128).optional(),
|
|
13328
|
+
requireUppercase: external_exports.boolean().optional(),
|
|
13329
|
+
requireLowercase: external_exports.boolean().optional(),
|
|
13330
|
+
requireDigit: external_exports.boolean().optional(),
|
|
13331
|
+
requireSpecial: external_exports.boolean().optional()
|
|
13332
|
+
}).strict().superRefine((data, ctx) => {
|
|
13333
|
+
if (data.minLength !== void 0 && data.maxLength !== void 0 && data.maxLength < data.minLength) {
|
|
13334
|
+
ctx.addIssue({
|
|
13335
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13336
|
+
message: "passwordRules.maxLength must be >= minLength",
|
|
13337
|
+
path: ["maxLength"]
|
|
13338
|
+
});
|
|
13339
|
+
}
|
|
13340
|
+
});
|
|
13341
|
+
var migrateEmailPasswordAuthIncoming5 = (raw) => {
|
|
13342
|
+
if (!raw || typeof raw !== "object") return raw;
|
|
13343
|
+
const o = raw;
|
|
13344
|
+
if (o.kind !== "email_password_auth") return raw;
|
|
13345
|
+
if (Array.isArray(o.children) && o.children.length > 0) return raw;
|
|
13346
|
+
const idBase = typeof o.id === "string" ? o.id : "lyr_email_password_auth";
|
|
13347
|
+
const slugRaw = idBase.replace(/^lyr_/i, "").replace(/[^a-z0-9_]/gi, "_");
|
|
13348
|
+
const slug = slugRaw.length > 0 ? slugRaw.slice(0, 40) : "ep_auth";
|
|
13349
|
+
const mode = o.mode === "sign_up" ? "sign_up" : "sign_in";
|
|
13350
|
+
const pickLt = (v, fallback) => v && typeof v === "object" && v !== null && "default" in v ? v : { default: fallback };
|
|
13351
|
+
const mkField = (suf, slot, labelSource, fallbackPlaceholder) => ({
|
|
13352
|
+
id: `lyr_${slug}_fld_${suf}`.slice(0, 64),
|
|
13353
|
+
kind: "email_password_field",
|
|
13354
|
+
slot,
|
|
13355
|
+
...labelSource ? { placeholder: pickLt(labelSource, fallbackPlaceholder) } : { placeholder: { default: fallbackPlaceholder } },
|
|
13356
|
+
children: []
|
|
13357
|
+
});
|
|
13358
|
+
const children = [];
|
|
13359
|
+
children.push(mkField("email", "email", o.emailLabel, "Email"));
|
|
13360
|
+
children.push(mkField("pw", "password", o.passwordLabel, "Password"));
|
|
13361
|
+
if (mode === "sign_up") {
|
|
13362
|
+
children.push(mkField("cf", "confirm", o.confirmPasswordLabel, "Confirm password"));
|
|
13363
|
+
}
|
|
13364
|
+
const submitLbl = o.submitLabel ?? { default: mode === "sign_in" ? "Sign in" : "Create account" };
|
|
13365
|
+
children.push({
|
|
13366
|
+
id: `lyr_${slug}_submit`.slice(0, 64),
|
|
13367
|
+
kind: "email_password_submit",
|
|
13368
|
+
buttonVariant: "primary",
|
|
13369
|
+
direction: "horizontal",
|
|
13370
|
+
align: "center",
|
|
13371
|
+
distribution: "center",
|
|
13372
|
+
gap: 8,
|
|
13373
|
+
children: [
|
|
13374
|
+
{
|
|
13375
|
+
id: `lyr_${slug}_submit_txt`.slice(0, 64),
|
|
13376
|
+
kind: "text",
|
|
13377
|
+
text: submitLbl
|
|
13378
|
+
}
|
|
13379
|
+
]
|
|
13380
|
+
});
|
|
13381
|
+
const {
|
|
13382
|
+
emailLabel: _e,
|
|
13383
|
+
passwordLabel: _p,
|
|
13384
|
+
confirmPasswordLabel: _c,
|
|
13385
|
+
submitLabel: _s,
|
|
13386
|
+
...rest
|
|
13387
|
+
} = o;
|
|
13388
|
+
return { ...rest, mode, children };
|
|
13389
|
+
};
|
|
13390
|
+
var refineEmailPasswordAuthChildren5 = (data, ctx) => {
|
|
13391
|
+
const fields = data.children.filter((c) => c.kind === "email_password_field");
|
|
13392
|
+
const submits = data.children.filter((c) => c.kind === "email_password_submit");
|
|
13393
|
+
const slotSeen = /* @__PURE__ */ new Set();
|
|
13394
|
+
for (const f of fields) {
|
|
13395
|
+
if (slotSeen.has(f.slot)) {
|
|
13396
|
+
ctx.addIssue({
|
|
13397
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13398
|
+
message: `duplicate email_password_field slot "${f.slot}"`,
|
|
13399
|
+
path: ["children"]
|
|
13400
|
+
});
|
|
13401
|
+
}
|
|
13402
|
+
slotSeen.add(f.slot);
|
|
13403
|
+
}
|
|
13404
|
+
const slotHas = new Set(fields.map((f) => f.slot));
|
|
13405
|
+
const requiredSlots = data.mode === "sign_up" ? ["email", "password", "confirm"] : ["email", "password"];
|
|
13406
|
+
for (const s of requiredSlots) {
|
|
13407
|
+
if (!slotHas.has(s)) {
|
|
13408
|
+
ctx.addIssue({
|
|
13409
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13410
|
+
message: data.mode === "sign_up" ? `sign_up requires an email_password_field with slot "${s}"` : `sign_in requires an email_password_field with slot "${s}"`,
|
|
13411
|
+
path: ["children"]
|
|
13412
|
+
});
|
|
13413
|
+
}
|
|
13414
|
+
}
|
|
13415
|
+
if (data.mode === "sign_in" && slotHas.has("confirm")) {
|
|
13416
|
+
ctx.addIssue({
|
|
13417
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13418
|
+
message: 'sign_in must not include email_password_field with slot "confirm"',
|
|
13419
|
+
path: ["children"]
|
|
13420
|
+
});
|
|
13421
|
+
}
|
|
13422
|
+
if (submits.length !== 1) {
|
|
13423
|
+
ctx.addIssue({
|
|
13424
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13425
|
+
message: `email_password_auth must have exactly one email_password_submit (found ${submits.length})`,
|
|
13426
|
+
path: ["children"]
|
|
13427
|
+
});
|
|
13428
|
+
}
|
|
13429
|
+
};
|
|
13430
|
+
var EmailPasswordFieldLayerSchema5 = external_exports.object({
|
|
13431
|
+
...baseLayerShape5,
|
|
13432
|
+
kind: external_exports.literal("email_password_field"),
|
|
13433
|
+
slot: external_exports.enum(EMAIL_PASSWORD_SLOTS5),
|
|
13434
|
+
placeholder: LocalizedTextSchema6.optional(),
|
|
13435
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer45())).optional(),
|
|
13436
|
+
style: CommonStyleSchema5.optional(),
|
|
13437
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
13438
|
+
});
|
|
13439
|
+
var EmailPasswordSubmitLayerSchema5 = external_exports.object({
|
|
13440
|
+
...baseLayerShape5,
|
|
13441
|
+
kind: external_exports.literal("email_password_submit"),
|
|
13442
|
+
buttonVariant: ButtonLayerVariantSchema5,
|
|
13443
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
13444
|
+
gap: external_exports.number().int().min(0).optional(),
|
|
13445
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
13446
|
+
distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
13447
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer45()).min(1)),
|
|
13448
|
+
style: ButtonStyleSchema5.optional(),
|
|
13449
|
+
styleBreakpoints: ButtonStyleBreakpointsSchema5,
|
|
13450
|
+
buttonLayoutBreakpoints: ButtonLayoutBreakpointsSchema5
|
|
13451
|
+
});
|
|
13452
|
+
var EmailPasswordAuthLayerSchemaValidated5 = external_exports.object({
|
|
13453
|
+
...baseLayerShape5,
|
|
13454
|
+
kind: external_exports.literal("email_password_auth"),
|
|
13455
|
+
mode: EmailPasswordAuthModeSchema5,
|
|
13456
|
+
fieldKey: FieldKeySchema6,
|
|
13457
|
+
/** @deprecated Prefer `passwordRules.minLength`. Kept for backward compatibility. */
|
|
13458
|
+
minPasswordLength: external_exports.number().int().min(4).max(128).optional(),
|
|
13459
|
+
/** Composition rules beyond minimum length (uppercase, digit, special, max). */
|
|
13460
|
+
passwordRules: PasswordRulesSchema5.optional(),
|
|
13461
|
+
children: external_exports.lazy(
|
|
13462
|
+
() => external_exports.array(external_exports.union([EmailPasswordFieldLayerSchema5, EmailPasswordSubmitLayerSchema5])).min(1)
|
|
13463
|
+
),
|
|
13464
|
+
gap: external_exports.number().int().min(0).optional(),
|
|
13465
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
13466
|
+
authLayoutBreakpoints: AuthLayoutBreakpointsSchema5,
|
|
13467
|
+
style: CommonStyleSchema5.optional(),
|
|
13468
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
13469
|
+
}).superRefine(refineEmailPasswordAuthChildren5);
|
|
13470
|
+
var EmailPasswordAuthLayerSchema5 = external_exports.preprocess(
|
|
13471
|
+
migrateEmailPasswordAuthIncoming5,
|
|
13472
|
+
EmailPasswordAuthLayerSchemaValidated5
|
|
13473
|
+
);
|
|
13474
|
+
var ChoiceOptionBindingSchema5 = external_exports.object({
|
|
13475
|
+
optionId: external_exports.string().min(1).max(64),
|
|
13476
|
+
rootLayerId: LayerIdSchema5
|
|
13477
|
+
});
|
|
13478
|
+
var BranchConditionSchema5 = external_exports.object({
|
|
13479
|
+
choiceId: external_exports.string().min(1),
|
|
13480
|
+
goTo: FlowGraphNodeJumpTargetSchema5
|
|
13481
|
+
});
|
|
13482
|
+
var ChoiceBranchingSchema5 = external_exports.object({
|
|
13483
|
+
enabled: external_exports.boolean(),
|
|
13484
|
+
conditions: external_exports.array(BranchConditionSchema5)
|
|
13485
|
+
});
|
|
13486
|
+
var lazyLayer55 = () => layerSchemaStore5.schema;
|
|
13487
|
+
var SingleChoiceLayerSchema5 = external_exports.object({
|
|
13488
|
+
...baseLayerShape5,
|
|
13489
|
+
kind: external_exports.literal("single_choice"),
|
|
13490
|
+
fieldKey: FieldKeySchema6,
|
|
13491
|
+
children: external_exports.lazy(
|
|
13492
|
+
() => external_exports.array(StackLayerSchema5).min(2)
|
|
13493
|
+
),
|
|
13494
|
+
optionBindings: external_exports.array(ChoiceOptionBindingSchema5).min(2),
|
|
13495
|
+
branching: ChoiceBranchingSchema5,
|
|
13496
|
+
direction: external_exports.enum(["vertical", "horizontal", "grid"]).optional(),
|
|
13497
|
+
gap: external_exports.number().int().min(0).optional(),
|
|
13498
|
+
columns: external_exports.number().int().min(1).max(12).optional(),
|
|
13499
|
+
style: CommonStyleSchema5.optional(),
|
|
13500
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5,
|
|
13501
|
+
choiceLayoutBreakpoints: ChoiceLayoutBreakpointsSchema5
|
|
13502
|
+
});
|
|
13503
|
+
var MultipleChoiceLayerSchema5 = external_exports.object({
|
|
13504
|
+
...baseLayerShape5,
|
|
13505
|
+
kind: external_exports.literal("multiple_choice"),
|
|
13506
|
+
fieldKey: FieldKeySchema6,
|
|
13507
|
+
children: external_exports.lazy(
|
|
13508
|
+
() => external_exports.array(StackLayerSchema5).min(2)
|
|
13509
|
+
),
|
|
13510
|
+
optionBindings: external_exports.array(ChoiceOptionBindingSchema5).min(2),
|
|
13511
|
+
minSelections: external_exports.number().int().nonnegative().optional(),
|
|
13512
|
+
maxSelections: external_exports.number().int().positive().optional(),
|
|
13513
|
+
branching: ChoiceBranchingSchema5,
|
|
13514
|
+
direction: external_exports.enum(["vertical", "horizontal", "grid"]).optional(),
|
|
13515
|
+
gap: external_exports.number().int().min(0).optional(),
|
|
13516
|
+
columns: external_exports.number().int().min(1).max(12).optional(),
|
|
13517
|
+
style: CommonStyleSchema5.optional(),
|
|
13518
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5,
|
|
13519
|
+
choiceLayoutBreakpoints: ChoiceLayoutBreakpointsSchema5
|
|
13520
|
+
});
|
|
13521
|
+
var TextInputFieldStyleSchema5 = external_exports.object({
|
|
13522
|
+
fontFamily: external_exports.string().min(1).max(128).optional(),
|
|
13523
|
+
fontSize: external_exports.number().int().min(8).max(96).optional(),
|
|
13524
|
+
fontWeight: external_exports.number().int().min(100).max(900).optional(),
|
|
13525
|
+
color: ThemedColorSchema5.optional(),
|
|
13526
|
+
align: external_exports.enum(["left", "center", "right"]).optional(),
|
|
13527
|
+
lineHeight: external_exports.number().min(0.8).max(3).optional(),
|
|
13528
|
+
letterSpacing: external_exports.number().min(-0.5).max(1).optional(),
|
|
13529
|
+
opacity: external_exports.number().min(0).max(1).optional()
|
|
13530
|
+
}).partial();
|
|
13531
|
+
var TextInputAutoCapitalizeSchema5 = external_exports.enum([
|
|
13532
|
+
"none",
|
|
13533
|
+
"sentences",
|
|
13534
|
+
"words",
|
|
13535
|
+
"characters"
|
|
13536
|
+
]);
|
|
13537
|
+
var TextInputReturnKeyTypeSchema5 = external_exports.enum([
|
|
13538
|
+
"done",
|
|
13539
|
+
"next",
|
|
13540
|
+
"go",
|
|
13541
|
+
"send",
|
|
13542
|
+
"search",
|
|
13543
|
+
"default"
|
|
13544
|
+
]);
|
|
13545
|
+
var TextInputValidationModeSchema5 = external_exports.enum(["onBlur", "onSubmit", "live"]);
|
|
13546
|
+
var TextInputLayerSchema5 = external_exports.object({
|
|
13547
|
+
...baseLayerShape5,
|
|
13548
|
+
kind: external_exports.literal("text_input"),
|
|
13549
|
+
fieldKey: FieldKeySchema6,
|
|
13550
|
+
placeholder: LocalizedTextSchema6.optional(),
|
|
13551
|
+
/** Optional helper copy shown under the field when valid / untouched. */
|
|
13552
|
+
helperText: LocalizedTextSchema6.optional(),
|
|
13553
|
+
inputType: TextInputTypeSchema5.optional(),
|
|
13554
|
+
required: external_exports.boolean().optional(),
|
|
13555
|
+
minLength: external_exports.number().int().min(0).max(2e3).optional(),
|
|
13556
|
+
maxLength: external_exports.number().int().positive().max(2e3).optional(),
|
|
13557
|
+
classification: FieldClassificationSchema6,
|
|
13558
|
+
/** Override autocapitalize (defaults from `inputType` when omitted). */
|
|
13559
|
+
autoCapitalize: TextInputAutoCapitalizeSchema5.optional(),
|
|
13560
|
+
/** Soft keyboard return key label. */
|
|
13561
|
+
returnKeyType: TextInputReturnKeyTypeSchema5.optional(),
|
|
13562
|
+
/** When to show inline validation errors (default `onBlur`). */
|
|
13563
|
+
validationMode: TextInputValidationModeSchema5.optional(),
|
|
13564
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer55())).optional(),
|
|
13565
|
+
/** Typography for the native input's typed text. */
|
|
13566
|
+
fieldStyle: TextInputFieldStyleSchema5.optional(),
|
|
13567
|
+
style: CommonStyleSchema5.optional(),
|
|
13568
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
13569
|
+
});
|
|
13570
|
+
var ScaleInputLabelStyleSchema5 = external_exports.object({
|
|
13571
|
+
fontFamily: external_exports.string().min(1).max(128).optional(),
|
|
13572
|
+
fontSize: external_exports.number().int().min(8).max(96).optional(),
|
|
13573
|
+
fontWeight: external_exports.number().int().min(100).max(900).optional(),
|
|
13574
|
+
color: ThemedColorSchema5.optional(),
|
|
13575
|
+
align: external_exports.enum(["left", "center", "right"]).optional(),
|
|
13576
|
+
lineHeight: external_exports.number().min(0.8).max(3).optional(),
|
|
13577
|
+
letterSpacing: external_exports.number().min(-0.5).max(1).optional(),
|
|
13578
|
+
opacity: external_exports.number().min(0).max(1).optional()
|
|
13579
|
+
}).partial();
|
|
13580
|
+
var ScaleInputLayerSchema5 = external_exports.object({
|
|
13581
|
+
...baseLayerShape5,
|
|
13582
|
+
kind: external_exports.literal("scale_input"),
|
|
13583
|
+
fieldKey: FieldKeySchema6,
|
|
13584
|
+
min: external_exports.number(),
|
|
13585
|
+
max: external_exports.number(),
|
|
13586
|
+
step: external_exports.number().positive().optional(),
|
|
13587
|
+
defaultValue: external_exports.number().optional(),
|
|
13588
|
+
minLabel: LocalizedTextSchema6.optional(),
|
|
13589
|
+
maxLabel: LocalizedTextSchema6.optional(),
|
|
13590
|
+
labelStyle: ScaleInputLabelStyleSchema5.optional(),
|
|
13591
|
+
valueStyle: ScaleInputLabelStyleSchema5.optional(),
|
|
13592
|
+
showLabels: external_exports.boolean().optional(),
|
|
13593
|
+
showValue: external_exports.boolean().optional(),
|
|
13594
|
+
trackHeight: external_exports.number().int().min(2).max(32).optional(),
|
|
13595
|
+
trackColor: ThemedColorSchema5.optional(),
|
|
13596
|
+
fillColor: ThemedColorSchema5.optional(),
|
|
13597
|
+
thumbSize: external_exports.number().int().min(8).max(48).optional(),
|
|
13598
|
+
thumbColor: ThemedColorSchema5.optional(),
|
|
13599
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer55())).optional(),
|
|
13600
|
+
style: CommonStyleSchema5.optional(),
|
|
13601
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
13602
|
+
});
|
|
13603
|
+
var WheelPickerOptionSchema5 = external_exports.object({
|
|
10491
13604
|
optionId: external_exports.string().min(1).max(64),
|
|
10492
|
-
label:
|
|
13605
|
+
label: LocalizedTextSchema6
|
|
10493
13606
|
});
|
|
10494
|
-
var
|
|
13607
|
+
var WheelPickerItemStyleSchema5 = external_exports.object({
|
|
10495
13608
|
fontFamily: external_exports.string().min(1).max(128).optional(),
|
|
10496
13609
|
fontSize: external_exports.number().int().min(8).max(96).optional(),
|
|
10497
13610
|
fontWeight: external_exports.number().int().min(100).max(900).optional(),
|
|
10498
|
-
color:
|
|
13611
|
+
color: ThemedColorSchema5.optional(),
|
|
10499
13612
|
opacity: external_exports.number().min(0).max(1).optional()
|
|
10500
13613
|
}).partial();
|
|
10501
|
-
var
|
|
10502
|
-
...
|
|
13614
|
+
var WheelPickerLayerSchema5 = external_exports.object({
|
|
13615
|
+
...baseLayerShape5,
|
|
10503
13616
|
kind: external_exports.literal("wheel_picker"),
|
|
10504
|
-
fieldKey:
|
|
13617
|
+
fieldKey: FieldKeySchema6,
|
|
10505
13618
|
mode: external_exports.enum(["options", "date"]).optional(),
|
|
10506
|
-
options: external_exports.array(
|
|
13619
|
+
options: external_exports.array(WheelPickerOptionSchema5).min(2).optional(),
|
|
10507
13620
|
defaultOptionId: external_exports.string().optional(),
|
|
10508
13621
|
datePart: external_exports.enum(["year", "month", "day"]).optional(),
|
|
10509
13622
|
minYear: external_exports.number().int().min(1e3).max(9999).optional(),
|
|
10510
13623
|
maxYear: external_exports.number().int().min(1e3).max(9999).optional(),
|
|
10511
13624
|
defaultValue: external_exports.string().optional(),
|
|
10512
|
-
placeholder:
|
|
13625
|
+
placeholder: LocalizedTextSchema6.optional(),
|
|
10513
13626
|
itemHeight: external_exports.number().int().min(28).max(72).optional(),
|
|
10514
13627
|
visibleItemCount: external_exports.number().int().min(3).max(9).optional(),
|
|
10515
|
-
selectionBackgroundColor:
|
|
10516
|
-
itemStyle:
|
|
10517
|
-
selectedItemStyle:
|
|
10518
|
-
children: external_exports.lazy(() => external_exports.array(
|
|
10519
|
-
style:
|
|
10520
|
-
styleBreakpoints:
|
|
13628
|
+
selectionBackgroundColor: ThemedColorSchema5.optional(),
|
|
13629
|
+
itemStyle: WheelPickerItemStyleSchema5.optional(),
|
|
13630
|
+
selectedItemStyle: WheelPickerItemStyleSchema5.optional(),
|
|
13631
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer55())).optional(),
|
|
13632
|
+
style: CommonStyleSchema5.optional(),
|
|
13633
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
10521
13634
|
});
|
|
10522
|
-
var
|
|
13635
|
+
var DATE_TIME_INPUT_MODES5 = ["date", "time", "datetime"];
|
|
13636
|
+
var NUMBER_STEPPER_BUTTON_ROLES5 = ["decrement", "increment"];
|
|
13637
|
+
var ADDRESS_INPUT_FIELDS5 = [
|
|
13638
|
+
"line1",
|
|
13639
|
+
"line2",
|
|
13640
|
+
"city",
|
|
13641
|
+
"region",
|
|
13642
|
+
"postalCode",
|
|
13643
|
+
"country"
|
|
13644
|
+
];
|
|
13645
|
+
var lazyLayer65 = () => layerSchemaStore5.schema;
|
|
13646
|
+
var CountryCodeSchema5 = external_exports.string().length(2).regex(/^[A-Za-z]{2}$/u).transform((s) => s.toUpperCase());
|
|
13647
|
+
var DateTimeInputModeSchema5 = external_exports.enum(DATE_TIME_INPUT_MODES5);
|
|
13648
|
+
var DateTimeInputLayerSchema5 = external_exports.object({
|
|
13649
|
+
...baseLayerShape5,
|
|
13650
|
+
kind: external_exports.literal("date_time_input"),
|
|
13651
|
+
fieldKey: FieldKeySchema6,
|
|
13652
|
+
mode: DateTimeInputModeSchema5.optional(),
|
|
13653
|
+
required: external_exports.boolean().optional(),
|
|
13654
|
+
min: external_exports.string().min(1).max(64).optional(),
|
|
13655
|
+
max: external_exports.string().min(1).max(64).optional(),
|
|
13656
|
+
defaultValue: external_exports.string().min(1).max(64).optional(),
|
|
13657
|
+
placeholder: LocalizedTextSchema6.optional(),
|
|
13658
|
+
classification: FieldClassificationSchema6,
|
|
13659
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer65())).optional(),
|
|
13660
|
+
fieldStyle: TextInputFieldStyleSchema5.optional(),
|
|
13661
|
+
style: CommonStyleSchema5.optional(),
|
|
13662
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
13663
|
+
});
|
|
13664
|
+
var NumberStepperButtonRoleSchema5 = external_exports.enum(NUMBER_STEPPER_BUTTON_ROLES5);
|
|
13665
|
+
var NumberStepperButtonLayerSchema5 = external_exports.object({
|
|
13666
|
+
...baseLayerShape5,
|
|
13667
|
+
kind: external_exports.literal("number_stepper_button"),
|
|
13668
|
+
role: NumberStepperButtonRoleSchema5,
|
|
13669
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer65())).optional(),
|
|
13670
|
+
style: CommonStyleSchema5.optional(),
|
|
13671
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
13672
|
+
});
|
|
13673
|
+
var NumberStepperValueLayerSchema5 = external_exports.object({
|
|
13674
|
+
...baseLayerShape5,
|
|
13675
|
+
kind: external_exports.literal("number_stepper_value"),
|
|
13676
|
+
unitLabel: LocalizedTextSchema6.optional(),
|
|
13677
|
+
style: TextStyleSchema5.optional(),
|
|
13678
|
+
styleBreakpoints: TextStyleBreakpointsSchema5
|
|
13679
|
+
});
|
|
13680
|
+
var migrateNumberStepperIncoming5 = (raw) => {
|
|
13681
|
+
if (!raw || typeof raw !== "object") return raw;
|
|
13682
|
+
const o = raw;
|
|
13683
|
+
if (o.kind !== "number_stepper") return raw;
|
|
13684
|
+
if (Array.isArray(o.children) && o.children.length > 0) return raw;
|
|
13685
|
+
const idBase = typeof o.id === "string" ? o.id : "lyr_number_stepper";
|
|
13686
|
+
const slugRaw = idBase.replace(/^lyr_/i, "").replace(/[^a-z0-9_]/gi, "_");
|
|
13687
|
+
const slug = slugRaw.length > 0 ? slugRaw.slice(0, 40) : "stepper";
|
|
13688
|
+
const valueStyle = o.valueStyle && typeof o.valueStyle === "object" ? o.valueStyle : void 0;
|
|
13689
|
+
const buttonColor = o.buttonColor;
|
|
13690
|
+
const mkButton = (role, glyph) => {
|
|
13691
|
+
const suf = role === "decrement" ? "dec" : "inc";
|
|
13692
|
+
return {
|
|
13693
|
+
id: `lyr_${slug}_btn_${suf}`.slice(0, 64),
|
|
13694
|
+
kind: "number_stepper_button",
|
|
13695
|
+
role,
|
|
13696
|
+
style: {
|
|
13697
|
+
width: 36,
|
|
13698
|
+
height: 36,
|
|
13699
|
+
radius: 8
|
|
13700
|
+
},
|
|
13701
|
+
children: [
|
|
13702
|
+
{
|
|
13703
|
+
id: `lyr_${slug}_btn_${suf}_txt`.slice(0, 64),
|
|
13704
|
+
kind: "text",
|
|
13705
|
+
text: { default: glyph },
|
|
13706
|
+
style: {
|
|
13707
|
+
fontSize: 20,
|
|
13708
|
+
align: "center",
|
|
13709
|
+
...buttonColor !== void 0 ? { color: buttonColor } : {}
|
|
13710
|
+
}
|
|
13711
|
+
}
|
|
13712
|
+
]
|
|
13713
|
+
};
|
|
13714
|
+
};
|
|
13715
|
+
const valueChild = {
|
|
13716
|
+
id: `lyr_${slug}_value`.slice(0, 64),
|
|
13717
|
+
kind: "number_stepper_value",
|
|
13718
|
+
style: {
|
|
13719
|
+
fontSize: typeof valueStyle?.fontSize === "number" ? valueStyle.fontSize : 14,
|
|
13720
|
+
width: "full",
|
|
13721
|
+
...typeof valueStyle?.fontFamily === "string" ? { fontFamily: valueStyle.fontFamily } : {},
|
|
13722
|
+
...typeof valueStyle?.fontWeight === "number" ? { fontWeight: valueStyle.fontWeight } : {},
|
|
13723
|
+
...valueStyle?.color !== void 0 ? { color: valueStyle.color } : {},
|
|
13724
|
+
...typeof valueStyle?.lineHeight === "number" ? { lineHeight: valueStyle.lineHeight } : {},
|
|
13725
|
+
...typeof valueStyle?.letterSpacing === "number" ? { letterSpacing: valueStyle.letterSpacing } : {},
|
|
13726
|
+
...typeof valueStyle?.opacity === "number" ? { opacity: valueStyle.opacity } : {},
|
|
13727
|
+
align: typeof valueStyle?.align === "string" ? valueStyle.align : "center"
|
|
13728
|
+
}
|
|
13729
|
+
};
|
|
13730
|
+
if (o.unitLabel !== void 0) valueChild.unitLabel = o.unitLabel;
|
|
13731
|
+
const {
|
|
13732
|
+
valueStyle: _vs,
|
|
13733
|
+
buttonColor: _bc,
|
|
13734
|
+
unitLabel: _ul,
|
|
13735
|
+
...rest
|
|
13736
|
+
} = o;
|
|
13737
|
+
return {
|
|
13738
|
+
...rest,
|
|
13739
|
+
direction: typeof o.direction === "string" ? o.direction : "horizontal",
|
|
13740
|
+
gap: typeof o.gap === "number" ? o.gap : 12,
|
|
13741
|
+
align: typeof o.align === "string" ? o.align : "center",
|
|
13742
|
+
...typeof o.distribution === "string" ? { distribution: o.distribution } : {},
|
|
13743
|
+
children: [mkButton("decrement", "-"), valueChild, mkButton("increment", "+")]
|
|
13744
|
+
};
|
|
13745
|
+
};
|
|
13746
|
+
var refineNumberStepperChildren5 = (data, ctx) => {
|
|
13747
|
+
const buttons = data.children.filter((c) => c.kind === "number_stepper_button");
|
|
13748
|
+
const values = data.children.filter((c) => c.kind === "number_stepper_value");
|
|
13749
|
+
const other = data.children.filter(
|
|
13750
|
+
(c) => c.kind !== "number_stepper_button" && c.kind !== "number_stepper_value"
|
|
13751
|
+
);
|
|
13752
|
+
if (other.length > 0) {
|
|
13753
|
+
ctx.addIssue({
|
|
13754
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13755
|
+
message: "number_stepper children must be number_stepper_button or number_stepper_value",
|
|
13756
|
+
path: ["children"]
|
|
13757
|
+
});
|
|
13758
|
+
}
|
|
13759
|
+
const roles = /* @__PURE__ */ new Set();
|
|
13760
|
+
for (const b of buttons) {
|
|
13761
|
+
if (b.kind !== "number_stepper_button") continue;
|
|
13762
|
+
if (roles.has(b.role)) {
|
|
13763
|
+
ctx.addIssue({
|
|
13764
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13765
|
+
message: `duplicate number_stepper_button role "${b.role}"`,
|
|
13766
|
+
path: ["children"]
|
|
13767
|
+
});
|
|
13768
|
+
}
|
|
13769
|
+
roles.add(b.role);
|
|
13770
|
+
}
|
|
13771
|
+
for (const role of NUMBER_STEPPER_BUTTON_ROLES5) {
|
|
13772
|
+
if (!roles.has(role)) {
|
|
13773
|
+
ctx.addIssue({
|
|
13774
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13775
|
+
message: `number_stepper requires a number_stepper_button with role "${role}"`,
|
|
13776
|
+
path: ["children"]
|
|
13777
|
+
});
|
|
13778
|
+
}
|
|
13779
|
+
}
|
|
13780
|
+
if (values.length !== 1) {
|
|
13781
|
+
ctx.addIssue({
|
|
13782
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13783
|
+
message: `number_stepper must have exactly one number_stepper_value (found ${values.length})`,
|
|
13784
|
+
path: ["children"]
|
|
13785
|
+
});
|
|
13786
|
+
}
|
|
13787
|
+
};
|
|
13788
|
+
var NumberStepperLayerSchemaValidated5 = external_exports.object({
|
|
13789
|
+
...baseLayerShape5,
|
|
13790
|
+
kind: external_exports.literal("number_stepper"),
|
|
13791
|
+
fieldKey: FieldKeySchema6,
|
|
13792
|
+
min: external_exports.number(),
|
|
13793
|
+
max: external_exports.number(),
|
|
13794
|
+
step: external_exports.number().positive().optional(),
|
|
13795
|
+
defaultValue: external_exports.number().optional(),
|
|
13796
|
+
classification: FieldClassificationSchema6,
|
|
13797
|
+
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
13798
|
+
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
13799
|
+
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
13800
|
+
distribution: external_exports.enum(["start", "center", "end", "between", "around"]).optional(),
|
|
13801
|
+
children: external_exports.lazy(
|
|
13802
|
+
() => external_exports.array(external_exports.union([NumberStepperButtonLayerSchema5, NumberStepperValueLayerSchema5])).min(1)
|
|
13803
|
+
),
|
|
13804
|
+
style: CommonStyleSchema5.optional(),
|
|
13805
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
13806
|
+
}).superRefine(refineNumberStepperChildren5);
|
|
13807
|
+
var NumberStepperLayerSchema5 = external_exports.preprocess(
|
|
13808
|
+
migrateNumberStepperIncoming5,
|
|
13809
|
+
NumberStepperLayerSchemaValidated5
|
|
13810
|
+
);
|
|
13811
|
+
var PhoneInputLayerSchema5 = external_exports.object({
|
|
13812
|
+
...baseLayerShape5,
|
|
13813
|
+
kind: external_exports.literal("phone_input"),
|
|
13814
|
+
fieldKey: FieldKeySchema6,
|
|
13815
|
+
defaultCountryCode: CountryCodeSchema5.optional(),
|
|
13816
|
+
allowedCountryCodes: external_exports.array(CountryCodeSchema5).min(1).max(250).optional(),
|
|
13817
|
+
required: external_exports.boolean().optional(),
|
|
13818
|
+
placeholder: LocalizedTextSchema6.optional(),
|
|
13819
|
+
classification: FieldClassificationSchema6,
|
|
13820
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer65())).optional(),
|
|
13821
|
+
fieldStyle: TextInputFieldStyleSchema5.optional(),
|
|
13822
|
+
style: CommonStyleSchema5.optional(),
|
|
13823
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
13824
|
+
});
|
|
13825
|
+
var AddressInputFieldSchema5 = external_exports.enum(ADDRESS_INPUT_FIELDS5);
|
|
13826
|
+
var AddressInputPlaceholdersSchema5 = external_exports.object({
|
|
13827
|
+
line1: LocalizedTextSchema6.optional(),
|
|
13828
|
+
line2: LocalizedTextSchema6.optional(),
|
|
13829
|
+
city: LocalizedTextSchema6.optional(),
|
|
13830
|
+
region: LocalizedTextSchema6.optional(),
|
|
13831
|
+
postalCode: LocalizedTextSchema6.optional(),
|
|
13832
|
+
country: LocalizedTextSchema6.optional()
|
|
13833
|
+
}).partial();
|
|
13834
|
+
var AddressInputLayerSchema5 = external_exports.object({
|
|
13835
|
+
...baseLayerShape5,
|
|
13836
|
+
kind: external_exports.literal("address_input"),
|
|
13837
|
+
fieldKey: FieldKeySchema6,
|
|
13838
|
+
requiredFields: external_exports.array(AddressInputFieldSchema5).min(1).max(6).optional(),
|
|
13839
|
+
showLine2: external_exports.boolean().optional(),
|
|
13840
|
+
showRegion: external_exports.boolean().optional(),
|
|
13841
|
+
defaultCountryCode: CountryCodeSchema5.optional(),
|
|
13842
|
+
placeholders: AddressInputPlaceholdersSchema5.optional(),
|
|
13843
|
+
classification: FieldClassificationSchema6,
|
|
13844
|
+
children: external_exports.lazy(() => external_exports.array(lazyLayer65())).optional(),
|
|
13845
|
+
fieldStyle: TextInputFieldStyleSchema5.optional(),
|
|
13846
|
+
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
13847
|
+
style: CommonStyleSchema5.optional(),
|
|
13848
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5
|
|
13849
|
+
});
|
|
13850
|
+
var CarouselIndicatorsStyleSchema5 = external_exports.object({
|
|
10523
13851
|
width: external_exports.number().int().min(1).max(64).optional(),
|
|
10524
13852
|
height: external_exports.number().int().min(1).max(64).optional(),
|
|
10525
|
-
defaultColor:
|
|
13853
|
+
defaultColor: ThemedColorSchema5.optional(),
|
|
10526
13854
|
defaultOpacity: external_exports.number().min(0).max(1).optional(),
|
|
10527
|
-
activeColor:
|
|
13855
|
+
activeColor: ThemedColorSchema5.optional(),
|
|
10528
13856
|
activeOpacity: external_exports.number().min(0).max(1).optional(),
|
|
10529
13857
|
activeWidth: external_exports.number().int().min(1).max(64).optional(),
|
|
10530
13858
|
activeHeight: external_exports.number().int().min(1).max(64).optional(),
|
|
10531
|
-
border:
|
|
10532
|
-
activeBorder:
|
|
13859
|
+
border: BorderSchema5.optional(),
|
|
13860
|
+
activeBorder: BorderSchema5.optional()
|
|
10533
13861
|
}).partial();
|
|
10534
|
-
var
|
|
13862
|
+
var CarouselPageControlSchema5 = external_exports.object({
|
|
10535
13863
|
position: external_exports.enum(["top", "bottom"]),
|
|
10536
13864
|
spacing: external_exports.number().int().min(0).optional(),
|
|
10537
|
-
padding:
|
|
10538
|
-
margin:
|
|
10539
|
-
indicators:
|
|
10540
|
-
border:
|
|
10541
|
-
shadow:
|
|
13865
|
+
padding: PaddingSchema5.optional(),
|
|
13866
|
+
margin: PaddingSchema5.optional(),
|
|
13867
|
+
indicators: CarouselIndicatorsStyleSchema5.optional(),
|
|
13868
|
+
border: BorderSchema5.optional(),
|
|
13869
|
+
shadow: DropShadowSchema5.optional()
|
|
10542
13870
|
});
|
|
10543
|
-
var
|
|
10544
|
-
...
|
|
13871
|
+
var CarouselLayerSchema5 = external_exports.object({
|
|
13872
|
+
...baseLayerShape5,
|
|
10545
13873
|
kind: external_exports.literal("carousel"),
|
|
10546
|
-
slides: external_exports.lazy(() => external_exports.array(
|
|
13874
|
+
slides: external_exports.lazy(() => external_exports.array(StackLayerSchema5).min(1)),
|
|
10547
13875
|
pageAlignment: external_exports.enum(["top", "center", "bottom"]).optional(),
|
|
10548
13876
|
pageSpacing: external_exports.number().int().min(0).optional(),
|
|
10549
13877
|
pagePeek: external_exports.number().int().min(0).max(400).optional(),
|
|
@@ -10551,23 +13879,23 @@ var CarouselLayerSchema4 = external_exports.object({
|
|
|
10551
13879
|
loop: external_exports.boolean().optional(),
|
|
10552
13880
|
autoAdvance: external_exports.boolean().optional(),
|
|
10553
13881
|
autoAdvanceMs: external_exports.number().int().min(500).max(6e4).optional(),
|
|
10554
|
-
pageControl:
|
|
10555
|
-
style:
|
|
10556
|
-
styleBreakpoints:
|
|
10557
|
-
carouselLayoutBreakpoints:
|
|
13882
|
+
pageControl: CarouselPageControlSchema5.optional(),
|
|
13883
|
+
style: CommonStyleSchema5.optional(),
|
|
13884
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5,
|
|
13885
|
+
carouselLayoutBreakpoints: CarouselLayoutBreakpointsSchema5
|
|
10558
13886
|
});
|
|
10559
|
-
var
|
|
10560
|
-
var
|
|
10561
|
-
external_exports.object({ kind: external_exports.literal("builtin"), name:
|
|
13887
|
+
var DecisionBuiltinNameSchema5 = external_exports.enum(["locale", "platform"]);
|
|
13888
|
+
var DecisionVariableRefSchema5 = external_exports.discriminatedUnion("kind", [
|
|
13889
|
+
external_exports.object({ kind: external_exports.literal("builtin"), name: DecisionBuiltinNameSchema5 }),
|
|
10562
13890
|
external_exports.object({ kind: external_exports.literal("sdk"), key: external_exports.string().min(1).max(128) }),
|
|
10563
13891
|
external_exports.object({ kind: external_exports.literal("field"), fieldKey: external_exports.string().min(1).max(128) })
|
|
10564
13892
|
]);
|
|
10565
|
-
var
|
|
13893
|
+
var DecisionStringPredicateSchema5 = external_exports.discriminatedUnion("op", [
|
|
10566
13894
|
external_exports.object({ op: external_exports.literal("eq"), value: external_exports.string() }),
|
|
10567
13895
|
external_exports.object({ op: external_exports.literal("neq"), value: external_exports.string() }),
|
|
10568
13896
|
external_exports.object({ op: external_exports.literal("contains"), value: external_exports.string() })
|
|
10569
13897
|
]);
|
|
10570
|
-
var
|
|
13898
|
+
var DecisionNumberPredicateSchema5 = external_exports.discriminatedUnion("op", [
|
|
10571
13899
|
external_exports.object({ op: external_exports.literal("eq"), value: external_exports.number() }),
|
|
10572
13900
|
external_exports.object({ op: external_exports.literal("neq"), value: external_exports.number() }),
|
|
10573
13901
|
external_exports.object({ op: external_exports.literal("lt"), value: external_exports.number() }),
|
|
@@ -10575,11 +13903,11 @@ var DecisionNumberPredicateSchema4 = external_exports.discriminatedUnion("op", [
|
|
|
10575
13903
|
external_exports.object({ op: external_exports.literal("gt"), value: external_exports.number() }),
|
|
10576
13904
|
external_exports.object({ op: external_exports.literal("gte"), value: external_exports.number() })
|
|
10577
13905
|
]);
|
|
10578
|
-
var
|
|
13906
|
+
var DecisionChoicePredicateSchema5 = external_exports.discriminatedUnion("op", [
|
|
10579
13907
|
external_exports.object({ op: external_exports.literal("eq"), optionId: external_exports.string().min(1) }),
|
|
10580
13908
|
external_exports.object({ op: external_exports.literal("one_of"), optionIds: external_exports.array(external_exports.string().min(1)).min(1) })
|
|
10581
13909
|
]);
|
|
10582
|
-
var
|
|
13910
|
+
var DecisionMultiPredicateSchema5 = external_exports.discriminatedUnion("op", [
|
|
10583
13911
|
external_exports.object({
|
|
10584
13912
|
op: external_exports.literal("intersects"),
|
|
10585
13913
|
optionIds: external_exports.array(external_exports.string().min(1)).min(1)
|
|
@@ -10593,160 +13921,166 @@ var DecisionMultiPredicateSchema4 = external_exports.discriminatedUnion("op", [
|
|
|
10593
13921
|
optionIds: external_exports.array(external_exports.string().min(1)).min(1)
|
|
10594
13922
|
})
|
|
10595
13923
|
]);
|
|
10596
|
-
var
|
|
13924
|
+
var DecisionBooleanPredicateSchema5 = external_exports.discriminatedUnion("op", [
|
|
10597
13925
|
external_exports.object({ op: external_exports.literal("eq"), value: external_exports.boolean() }),
|
|
10598
13926
|
external_exports.object({ op: external_exports.literal("neq"), value: external_exports.boolean() })
|
|
10599
13927
|
]);
|
|
10600
|
-
var
|
|
10601
|
-
external_exports.object({ type: external_exports.literal("string"), pred:
|
|
10602
|
-
external_exports.object({ type: external_exports.literal("number"), pred:
|
|
10603
|
-
external_exports.object({ type: external_exports.literal("boolean"), pred:
|
|
10604
|
-
external_exports.object({ type: external_exports.literal("choice"), pred:
|
|
10605
|
-
external_exports.object({ type: external_exports.literal("multi"), pred:
|
|
13928
|
+
var DecisionPredicatePayloadSchema5 = external_exports.discriminatedUnion("type", [
|
|
13929
|
+
external_exports.object({ type: external_exports.literal("string"), pred: DecisionStringPredicateSchema5 }),
|
|
13930
|
+
external_exports.object({ type: external_exports.literal("number"), pred: DecisionNumberPredicateSchema5 }),
|
|
13931
|
+
external_exports.object({ type: external_exports.literal("boolean"), pred: DecisionBooleanPredicateSchema5 }),
|
|
13932
|
+
external_exports.object({ type: external_exports.literal("choice"), pred: DecisionChoicePredicateSchema5 }),
|
|
13933
|
+
external_exports.object({ type: external_exports.literal("multi"), pred: DecisionMultiPredicateSchema5 })
|
|
10606
13934
|
]);
|
|
10607
|
-
var
|
|
13935
|
+
var DecisionExprSchema5 = external_exports.lazy(
|
|
10608
13936
|
() => external_exports.discriminatedUnion("kind", [
|
|
10609
13937
|
external_exports.object({ kind: external_exports.literal("empty") }),
|
|
10610
13938
|
external_exports.object({
|
|
10611
13939
|
kind: external_exports.literal("group"),
|
|
10612
13940
|
op: external_exports.enum(["and", "or"]),
|
|
10613
|
-
children: external_exports.array(
|
|
13941
|
+
children: external_exports.array(DecisionExprSchema5).min(1)
|
|
10614
13942
|
}),
|
|
10615
13943
|
external_exports.object({
|
|
10616
13944
|
kind: external_exports.literal("predicate"),
|
|
10617
|
-
variable:
|
|
10618
|
-
predicate:
|
|
13945
|
+
variable: DecisionVariableRefSchema5,
|
|
13946
|
+
predicate: DecisionPredicatePayloadSchema5
|
|
10619
13947
|
})
|
|
10620
13948
|
])
|
|
10621
13949
|
);
|
|
10622
|
-
var
|
|
10623
|
-
var
|
|
13950
|
+
var CONDITIONAL_MAX_CASES5 = 16;
|
|
13951
|
+
var ConditionalCaseSchema5 = external_exports.object({
|
|
10624
13952
|
id: external_exports.string().min(1).max(80),
|
|
10625
13953
|
name: external_exports.string().min(1).max(80).optional(),
|
|
10626
|
-
expression:
|
|
10627
|
-
rootLayerId:
|
|
13954
|
+
expression: DecisionExprSchema5,
|
|
13955
|
+
rootLayerId: LayerIdSchema5
|
|
10628
13956
|
});
|
|
10629
|
-
var
|
|
10630
|
-
...
|
|
13957
|
+
var ConditionalLayerSchema5 = external_exports.object({
|
|
13958
|
+
...baseLayerShape5,
|
|
10631
13959
|
kind: external_exports.literal("conditional"),
|
|
10632
|
-
cases: external_exports.array(
|
|
10633
|
-
elseRootLayerId:
|
|
10634
|
-
children: external_exports.lazy(() => external_exports.array(
|
|
13960
|
+
cases: external_exports.array(ConditionalCaseSchema5).min(1).max(CONDITIONAL_MAX_CASES5),
|
|
13961
|
+
elseRootLayerId: LayerIdSchema5,
|
|
13962
|
+
children: external_exports.lazy(() => external_exports.array(StackLayerSchema5).min(2))
|
|
10635
13963
|
});
|
|
10636
|
-
|
|
13964
|
+
layerSchemaStore5.schema = external_exports.lazy(
|
|
10637
13965
|
() => external_exports.union([
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
13966
|
+
StackLayerSchema5,
|
|
13967
|
+
TextLayerSchema5,
|
|
13968
|
+
HyperlinkLayerSchema5,
|
|
13969
|
+
ImageLayerSchema5,
|
|
13970
|
+
LottieLayerSchema5,
|
|
13971
|
+
VideoLayerSchema5,
|
|
13972
|
+
IconLayerSchema5,
|
|
13973
|
+
ButtonLayerSchema5,
|
|
13974
|
+
BackButtonLayerSchema5,
|
|
13975
|
+
ProgressLayerSchema5,
|
|
13976
|
+
LoaderLayerSchema5,
|
|
13977
|
+
CounterLayerSchema5,
|
|
13978
|
+
CheckboxLayerSchema5,
|
|
13979
|
+
SingleChoiceLayerSchema5,
|
|
13980
|
+
MultipleChoiceLayerSchema5,
|
|
13981
|
+
TextInputLayerSchema5,
|
|
13982
|
+
ScaleInputLayerSchema5,
|
|
13983
|
+
WheelPickerLayerSchema5,
|
|
13984
|
+
DateTimeInputLayerSchema5,
|
|
13985
|
+
NumberStepperLayerSchema5,
|
|
13986
|
+
NumberStepperButtonLayerSchema5,
|
|
13987
|
+
NumberStepperValueLayerSchema5,
|
|
13988
|
+
PhoneInputLayerSchema5,
|
|
13989
|
+
AddressInputLayerSchema5,
|
|
13990
|
+
OAuthLoginLayerSchema5,
|
|
13991
|
+
OAuthProviderPresetLayerSchema5,
|
|
13992
|
+
OAuthProviderCustomLayerSchema5,
|
|
13993
|
+
EmailPasswordAuthLayerSchema5,
|
|
13994
|
+
EmailPasswordFieldLayerSchema5,
|
|
13995
|
+
EmailPasswordSubmitLayerSchema5,
|
|
13996
|
+
CarouselLayerSchema5,
|
|
13997
|
+
ConditionalLayerSchema5
|
|
10664
13998
|
])
|
|
10665
13999
|
);
|
|
10666
|
-
var
|
|
10667
|
-
var
|
|
10668
|
-
color:
|
|
14000
|
+
var ScreenBackgroundFitSchema3 = external_exports.enum(["cover", "contain", "fill"]);
|
|
14001
|
+
var ScreenBackgroundScrimSchema3 = external_exports.object({
|
|
14002
|
+
color: ThemedColorSchema5.optional(),
|
|
10669
14003
|
opacity: external_exports.number().min(0).max(1).optional()
|
|
10670
14004
|
}).partial();
|
|
10671
|
-
var
|
|
10672
|
-
media:
|
|
10673
|
-
fit:
|
|
14005
|
+
var screenBackgroundMediaShape3 = {
|
|
14006
|
+
media: MediaReferenceSchema5.optional(),
|
|
14007
|
+
fit: ScreenBackgroundFitSchema3.optional(),
|
|
10674
14008
|
opacity: external_exports.number().min(0).max(1).optional(),
|
|
10675
|
-
scrim:
|
|
14009
|
+
scrim: ScreenBackgroundScrimSchema3.optional()
|
|
10676
14010
|
};
|
|
10677
|
-
var
|
|
14011
|
+
var ScreenBackgroundColorFillSchema3 = external_exports.object({
|
|
10678
14012
|
kind: external_exports.literal("color"),
|
|
10679
|
-
color:
|
|
14013
|
+
color: ThemedColorSchema5.optional(),
|
|
10680
14014
|
opacity: external_exports.number().min(0).max(1).optional()
|
|
10681
14015
|
});
|
|
10682
|
-
var
|
|
14016
|
+
var ScreenBackgroundImageFillSchema3 = external_exports.object({
|
|
10683
14017
|
kind: external_exports.literal("image"),
|
|
10684
|
-
...
|
|
14018
|
+
...screenBackgroundMediaShape3
|
|
10685
14019
|
});
|
|
10686
|
-
var
|
|
14020
|
+
var ScreenBackgroundVideoFillSchema3 = external_exports.object({
|
|
10687
14021
|
kind: external_exports.literal("video"),
|
|
10688
|
-
...
|
|
14022
|
+
...screenBackgroundMediaShape3,
|
|
10689
14023
|
loop: external_exports.boolean().optional(),
|
|
10690
14024
|
autoPlay: external_exports.boolean().optional(),
|
|
10691
14025
|
triggerLayerId: external_exports.string().min(1).optional(),
|
|
10692
|
-
onComplete:
|
|
14026
|
+
onComplete: LoaderOnCompleteSchema5.optional(),
|
|
10693
14027
|
audioEnabled: external_exports.boolean().optional()
|
|
10694
14028
|
});
|
|
10695
|
-
var
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
14029
|
+
var ScreenBackgroundFillSchema3 = external_exports.discriminatedUnion("kind", [
|
|
14030
|
+
ScreenBackgroundColorFillSchema3,
|
|
14031
|
+
ScreenBackgroundImageFillSchema3,
|
|
14032
|
+
ScreenBackgroundVideoFillSchema3
|
|
10699
14033
|
]);
|
|
10700
|
-
var
|
|
10701
|
-
color:
|
|
10702
|
-
fit:
|
|
14034
|
+
var ScreenBackgroundFillPatchSchema3 = external_exports.object({
|
|
14035
|
+
color: ThemedColorSchema5.optional(),
|
|
14036
|
+
fit: ScreenBackgroundFitSchema3.optional(),
|
|
10703
14037
|
opacity: external_exports.number().min(0).max(1).optional(),
|
|
10704
|
-
scrim:
|
|
14038
|
+
scrim: ScreenBackgroundScrimSchema3.optional(),
|
|
10705
14039
|
loop: external_exports.boolean().optional(),
|
|
10706
14040
|
autoPlay: external_exports.boolean().optional(),
|
|
10707
14041
|
triggerLayerId: external_exports.string().min(1).optional(),
|
|
10708
|
-
onComplete:
|
|
14042
|
+
onComplete: LoaderOnCompleteSchema5.optional(),
|
|
10709
14043
|
audioEnabled: external_exports.boolean().optional()
|
|
10710
14044
|
}).partial();
|
|
10711
|
-
var
|
|
10712
|
-
padding:
|
|
10713
|
-
margin:
|
|
14045
|
+
var ScreenContainerBreakpointPatchSchema3 = external_exports.object({
|
|
14046
|
+
padding: PaddingSchema5.optional(),
|
|
14047
|
+
margin: PaddingSchema5.optional(),
|
|
10714
14048
|
insetSafeArea: external_exports.boolean().optional(),
|
|
10715
|
-
backgroundFillPatch:
|
|
14049
|
+
backgroundFillPatch: ScreenBackgroundFillPatchSchema3.optional()
|
|
10716
14050
|
}).partial();
|
|
10717
|
-
var
|
|
10718
|
-
sm:
|
|
10719
|
-
md:
|
|
10720
|
-
lg:
|
|
10721
|
-
xl:
|
|
10722
|
-
"2xl":
|
|
14051
|
+
var ScreenContainerStyleBreakpointsSchema3 = external_exports.object({
|
|
14052
|
+
sm: ScreenContainerBreakpointPatchSchema3.optional(),
|
|
14053
|
+
md: ScreenContainerBreakpointPatchSchema3.optional(),
|
|
14054
|
+
lg: ScreenContainerBreakpointPatchSchema3.optional(),
|
|
14055
|
+
xl: ScreenContainerBreakpointPatchSchema3.optional(),
|
|
14056
|
+
"2xl": ScreenContainerBreakpointPatchSchema3.optional()
|
|
10723
14057
|
}).partial().optional();
|
|
10724
|
-
var
|
|
10725
|
-
var
|
|
10726
|
-
var
|
|
10727
|
-
var
|
|
10728
|
-
var
|
|
10729
|
-
var
|
|
14058
|
+
var DecisionNodeIdSchema4 = external_exports.string().min(1).max(64).regex(/^dec_[a-z0-9_]+$/i, "decision node id must look like dec_<id>");
|
|
14059
|
+
var ExternalSurfaceJumpIdSchema25 = external_exports.string().min(1).max(64).regex(/^surf_[a-z0-9_]+$/i, "external surface node id must look like surf_<id>");
|
|
14060
|
+
var EXTERNAL_SURFACE_NO_NEXT4 = "__onb_surface_no_next__";
|
|
14061
|
+
var ExternalSurfaceTerminalTargetSchema4 = external_exports.literal(EXTERNAL_SURFACE_NO_NEXT4);
|
|
14062
|
+
var FlowJumpTargetSchema4 = ScreenIdSchema5.or(DecisionNodeIdSchema4).or(ExternalSurfaceJumpIdSchema25).or(ExternalSurfaceTerminalTargetSchema4).nullable();
|
|
14063
|
+
var DecisionCaseSchema4 = external_exports.object({
|
|
10730
14064
|
id: external_exports.string().min(1).max(80),
|
|
10731
14065
|
/** Display label in the editor (e.g. “Engaged users”). */
|
|
10732
14066
|
name: external_exports.string().min(1).max(80).optional(),
|
|
10733
|
-
expression:
|
|
10734
|
-
next:
|
|
14067
|
+
expression: DecisionExprSchema5,
|
|
14068
|
+
next: FlowJumpTargetSchema4
|
|
10735
14069
|
});
|
|
10736
14070
|
external_exports.object({
|
|
10737
|
-
id:
|
|
14071
|
+
id: DecisionNodeIdSchema4,
|
|
10738
14072
|
name: external_exports.string().min(1).max(80).optional(),
|
|
10739
|
-
cases: external_exports.array(
|
|
10740
|
-
elseNext:
|
|
14073
|
+
cases: external_exports.array(DecisionCaseSchema4).min(1).max(16),
|
|
14074
|
+
elseNext: FlowJumpTargetSchema4
|
|
10741
14075
|
});
|
|
10742
|
-
var
|
|
14076
|
+
var ANIMATABLE_PROPERTIES3 = [
|
|
10743
14077
|
"opacity",
|
|
10744
14078
|
"translateX",
|
|
10745
14079
|
"translateY",
|
|
10746
14080
|
"scale"
|
|
10747
14081
|
];
|
|
10748
|
-
var
|
|
10749
|
-
var
|
|
14082
|
+
var AnimatablePropertySchema3 = external_exports.enum(ANIMATABLE_PROPERTIES3);
|
|
14083
|
+
var EASING_TOKENS3 = [
|
|
10750
14084
|
"linear",
|
|
10751
14085
|
"ease-in",
|
|
10752
14086
|
"ease-out",
|
|
@@ -10754,16 +14088,16 @@ var EASING_TOKENS2 = [
|
|
|
10754
14088
|
"standard",
|
|
10755
14089
|
"emphasized"
|
|
10756
14090
|
];
|
|
10757
|
-
var
|
|
10758
|
-
var
|
|
14091
|
+
var EasingTokenSchema3 = external_exports.enum(EASING_TOKENS3);
|
|
14092
|
+
var KeyframeSchema3 = external_exports.object({
|
|
10759
14093
|
t: external_exports.number().min(0).max(1),
|
|
10760
14094
|
value: external_exports.number(),
|
|
10761
14095
|
/** Easing applied from this keyframe to the next; defaults to linear. */
|
|
10762
|
-
easing:
|
|
14096
|
+
easing: EasingTokenSchema3.optional()
|
|
10763
14097
|
}).strict();
|
|
10764
|
-
var
|
|
10765
|
-
property:
|
|
10766
|
-
keyframes: external_exports.array(
|
|
14098
|
+
var KeyframeTrackSchema3 = external_exports.object({
|
|
14099
|
+
property: AnimatablePropertySchema3,
|
|
14100
|
+
keyframes: external_exports.array(KeyframeSchema3).min(2)
|
|
10767
14101
|
}).strict().superRefine((track, ctx) => {
|
|
10768
14102
|
let last = -Infinity;
|
|
10769
14103
|
for (const k of track.keyframes) {
|
|
@@ -10789,19 +14123,19 @@ var KeyframeTrackSchema2 = external_exports.object({
|
|
|
10789
14123
|
});
|
|
10790
14124
|
}
|
|
10791
14125
|
});
|
|
10792
|
-
var
|
|
10793
|
-
var
|
|
10794
|
-
var
|
|
14126
|
+
var ANIMATION_TRIGGERS3 = ["mount", "stagger", "unmount"];
|
|
14127
|
+
var AnimationTriggerSchema3 = external_exports.enum(ANIMATION_TRIGGERS3);
|
|
14128
|
+
var AnimationClipSchema3 = external_exports.object({
|
|
10795
14129
|
id: external_exports.string().min(1).max(64),
|
|
10796
|
-
targetLayerId:
|
|
10797
|
-
trigger:
|
|
14130
|
+
targetLayerId: LayerIdSchema5,
|
|
14131
|
+
trigger: AnimationTriggerSchema3,
|
|
10798
14132
|
/** Position in the screen's stagger order. Required when trigger is `stagger`. */
|
|
10799
14133
|
staggerIndex: external_exports.number().int().min(0).max(64).optional(),
|
|
10800
14134
|
/** Total clip duration in milliseconds (renderer scales 0..1 keyframes by this). */
|
|
10801
14135
|
durationMs: external_exports.number().int().min(0).max(36e5),
|
|
10802
14136
|
/** Pre-roll delay before the clip begins, in ms. Stagger adds on top of this. */
|
|
10803
14137
|
delayMs: external_exports.number().int().min(0).max(36e5).optional(),
|
|
10804
|
-
tracks: external_exports.array(
|
|
14138
|
+
tracks: external_exports.array(KeyframeTrackSchema3).min(1)
|
|
10805
14139
|
}).strict().superRefine((clip, ctx) => {
|
|
10806
14140
|
if (clip.trigger === "unmount" && clip.staggerIndex !== void 0) {
|
|
10807
14141
|
ctx.addIssue({
|
|
@@ -10828,37 +14162,37 @@ var AnimationClipSchema2 = external_exports.object({
|
|
|
10828
14162
|
seenProps.add(track.property);
|
|
10829
14163
|
}
|
|
10830
14164
|
});
|
|
10831
|
-
var
|
|
14165
|
+
var ScreenStaggerSchema3 = external_exports.object({
|
|
10832
14166
|
/** Per-index delay multiplier in ms. */
|
|
10833
14167
|
stepMs: external_exports.number().int().min(0).max(2e3)
|
|
10834
14168
|
}).strict();
|
|
10835
|
-
var
|
|
10836
|
-
default:
|
|
14169
|
+
var ScreenNextSchema3 = external_exports.object({
|
|
14170
|
+
default: FlowJumpTargetSchema4
|
|
10837
14171
|
});
|
|
10838
|
-
var
|
|
10839
|
-
header:
|
|
10840
|
-
body:
|
|
10841
|
-
footer:
|
|
14172
|
+
var ScreenRegionsSchema3 = external_exports.object({
|
|
14173
|
+
header: StackLayerSchema5.optional(),
|
|
14174
|
+
body: StackLayerSchema5,
|
|
14175
|
+
footer: StackLayerSchema5.optional()
|
|
10842
14176
|
});
|
|
10843
|
-
var
|
|
10844
|
-
padding:
|
|
10845
|
-
margin:
|
|
14177
|
+
var ScreenContainerStyleSchema3 = external_exports.object({
|
|
14178
|
+
padding: PaddingSchema5.optional(),
|
|
14179
|
+
margin: PaddingSchema5.optional(),
|
|
10846
14180
|
/** When true, runtimes add device safe-area insets to shell padding (in addition to manual padding). */
|
|
10847
14181
|
insetSafeArea: external_exports.boolean().optional(),
|
|
10848
|
-
backgroundFill:
|
|
14182
|
+
backgroundFill: ScreenBackgroundFillSchema3.optional()
|
|
10849
14183
|
}).partial();
|
|
10850
|
-
var
|
|
10851
|
-
id:
|
|
14184
|
+
var ScreenSchema3 = external_exports.object({
|
|
14185
|
+
id: ScreenIdSchema5,
|
|
10852
14186
|
name: external_exports.string().min(1).max(80),
|
|
10853
|
-
regions:
|
|
10854
|
-
next:
|
|
14187
|
+
regions: ScreenRegionsSchema3,
|
|
14188
|
+
next: ScreenNextSchema3,
|
|
10855
14189
|
/** Ordered animation clips bound to layers on this screen. */
|
|
10856
|
-
animations: external_exports.array(
|
|
14190
|
+
animations: external_exports.array(AnimationClipSchema3).optional(),
|
|
10857
14191
|
/** Defaults for clips with `trigger: stagger`. */
|
|
10858
|
-
stagger:
|
|
14192
|
+
stagger: ScreenStaggerSchema3.optional(),
|
|
10859
14193
|
/** Chrome on the outer screen container (wraps all regions). */
|
|
10860
|
-
containerStyle:
|
|
10861
|
-
containerStyleBreakpoints:
|
|
14194
|
+
containerStyle: ScreenContainerStyleSchema3.optional(),
|
|
14195
|
+
containerStyleBreakpoints: ScreenContainerStyleBreakpointsSchema3
|
|
10862
14196
|
});
|
|
10863
14197
|
|
|
10864
14198
|
// ../../node_modules/@getrheo/flow-runtime/dist/index.js
|
|
@@ -10891,7 +14225,7 @@ var walkLayers = (root, fn) => {
|
|
|
10891
14225
|
else if (l.kind === "hyperlink") l.children.forEach((c) => visit(c, depth + 1));
|
|
10892
14226
|
else if (l.kind === "single_choice" || l.kind === "multiple_choice") {
|
|
10893
14227
|
l.children.forEach((c) => visit(c, depth + 1));
|
|
10894
|
-
} else if (l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker") {
|
|
14228
|
+
} 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") {
|
|
10895
14229
|
l.children?.forEach((c) => visit(c, depth + 1));
|
|
10896
14230
|
} else if (l.kind === "oauth_login") {
|
|
10897
14231
|
l.children.forEach((c) => visit(c, depth + 1));
|
|
@@ -10903,6 +14237,10 @@ var walkLayers = (root, fn) => {
|
|
|
10903
14237
|
l.children?.forEach((c) => visit(c, depth + 1));
|
|
10904
14238
|
} else if (l.kind === "email_password_submit") {
|
|
10905
14239
|
l.children.forEach((c) => visit(c, depth + 1));
|
|
14240
|
+
} else if (l.kind === "number_stepper") {
|
|
14241
|
+
l.children.forEach((c) => visit(c, depth + 1));
|
|
14242
|
+
} else if (l.kind === "number_stepper_button") {
|
|
14243
|
+
l.children?.forEach((c) => visit(c, depth + 1));
|
|
10906
14244
|
}
|
|
10907
14245
|
};
|
|
10908
14246
|
visit(root, 0);
|
|
@@ -11134,7 +14472,8 @@ var validatePublishable = (manifest) => {
|
|
|
11134
14472
|
}
|
|
11135
14473
|
return { ok: issues.length === 0, issues, warnings };
|
|
11136
14474
|
};
|
|
11137
|
-
var
|
|
14475
|
+
var isManualSubmitKind = (kind) => MANUAL_SUBMIT_INPUT_KINDS.includes(kind);
|
|
14476
|
+
var FIELD_KEY_RE7 = /^[a-z][a-z0-9_]*$/;
|
|
11138
14477
|
var styleBucketHasColor = (s) => s !== void 0 && s.color !== void 0;
|
|
11139
14478
|
var textLayerHasAuthoringColor = (l) => {
|
|
11140
14479
|
if (styleBucketHasColor(l.style)) return true;
|
|
@@ -11239,14 +14578,14 @@ var collectFlowBuilderIssues = (manifest) => {
|
|
|
11239
14578
|
}
|
|
11240
14579
|
if (isInputLayer(l)) {
|
|
11241
14580
|
inputCount += 1;
|
|
11242
|
-
if (l.kind
|
|
14581
|
+
if (isManualSubmitKind(l.kind)) {
|
|
11243
14582
|
needsManualSubmit = true;
|
|
11244
14583
|
}
|
|
11245
14584
|
const key = l.fieldKey;
|
|
11246
14585
|
const label = screen.name || screen.id;
|
|
11247
14586
|
if (!key || key.length === 0) {
|
|
11248
14587
|
issues.push(`Screen "${label}" is missing a variable name (fieldKey).`);
|
|
11249
|
-
} else if (!
|
|
14588
|
+
} else if (!FIELD_KEY_RE7.test(key)) {
|
|
11250
14589
|
issues.push(
|
|
11251
14590
|
`Screen "${label}" has an invalid variable name "${key}" \u2014 use snake_case (a\u2013z, 0\u20139, _).`
|
|
11252
14591
|
);
|
|
@@ -11436,7 +14775,7 @@ var collectFlowBuilderIssues = (manifest) => {
|
|
|
11436
14775
|
}
|
|
11437
14776
|
if (needsManualSubmit && !hasContinueButton) {
|
|
11438
14777
|
issues.push(
|
|
11439
|
-
`Screen "${screen.name || screen.id}" has a
|
|
14778
|
+
`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.`
|
|
11440
14779
|
);
|
|
11441
14780
|
}
|
|
11442
14781
|
}
|
|
@@ -11681,6 +15020,20 @@ var scanLayer = (issues, screen, layer, branding) => {
|
|
|
11681
15020
|
branding
|
|
11682
15021
|
);
|
|
11683
15022
|
return;
|
|
15023
|
+
case "date_time_input":
|
|
15024
|
+
case "phone_input":
|
|
15025
|
+
case "address_input":
|
|
15026
|
+
walkCommonBreakpoints(issues, stepId, id, layer.style, void 0, branding);
|
|
15027
|
+
return;
|
|
15028
|
+
case "number_stepper":
|
|
15029
|
+
walkCommonBreakpoints(issues, stepId, id, layer.style, layer.styleBreakpoints, branding);
|
|
15030
|
+
return;
|
|
15031
|
+
case "number_stepper_button":
|
|
15032
|
+
walkCommonBreakpoints(issues, stepId, id, layer.style, layer.styleBreakpoints, branding);
|
|
15033
|
+
return;
|
|
15034
|
+
case "number_stepper_value":
|
|
15035
|
+
walkTextBreakpoints(issues, stepId, id, layer.style, layer.styleBreakpoints, branding);
|
|
15036
|
+
return;
|
|
11684
15037
|
case "oauth_login":
|
|
11685
15038
|
walkCommonBreakpoints(issues, stepId, id, layer.style, layer.styleBreakpoints, branding);
|
|
11686
15039
|
return;
|
|
@@ -11766,6 +15119,62 @@ var RESTING_MOTION_KEYFRAMES_CSS = `
|
|
|
11766
15119
|
100% { transform: rotate(var(--ob-rm-rotate-peak, 5deg)); }
|
|
11767
15120
|
}
|
|
11768
15121
|
`.trim();
|
|
15122
|
+
var COUNTRY_DIAL_ENTRIES = [
|
|
15123
|
+
{ code: "US", dial: "1", label: "United States" },
|
|
15124
|
+
{ code: "CA", dial: "1", label: "Canada" },
|
|
15125
|
+
{ code: "GB", dial: "44", label: "United Kingdom" },
|
|
15126
|
+
{ code: "AU", dial: "61", label: "Australia" },
|
|
15127
|
+
{ code: "NZ", dial: "64", label: "New Zealand" },
|
|
15128
|
+
{ code: "IE", dial: "353", label: "Ireland" },
|
|
15129
|
+
{ code: "DE", dial: "49", label: "Germany" },
|
|
15130
|
+
{ code: "FR", dial: "33", label: "France" },
|
|
15131
|
+
{ code: "ES", dial: "34", label: "Spain" },
|
|
15132
|
+
{ code: "IT", dial: "39", label: "Italy" },
|
|
15133
|
+
{ code: "PT", dial: "351", label: "Portugal" },
|
|
15134
|
+
{ code: "NL", dial: "31", label: "Netherlands" },
|
|
15135
|
+
{ code: "BE", dial: "32", label: "Belgium" },
|
|
15136
|
+
{ code: "CH", dial: "41", label: "Switzerland" },
|
|
15137
|
+
{ code: "AT", dial: "43", label: "Austria" },
|
|
15138
|
+
{ code: "SE", dial: "46", label: "Sweden" },
|
|
15139
|
+
{ code: "NO", dial: "47", label: "Norway" },
|
|
15140
|
+
{ code: "DK", dial: "45", label: "Denmark" },
|
|
15141
|
+
{ code: "FI", dial: "358", label: "Finland" },
|
|
15142
|
+
{ code: "PL", dial: "48", label: "Poland" },
|
|
15143
|
+
{ code: "CZ", dial: "420", label: "Czechia" },
|
|
15144
|
+
{ code: "RO", dial: "40", label: "Romania" },
|
|
15145
|
+
{ code: "HU", dial: "36", label: "Hungary" },
|
|
15146
|
+
{ code: "GR", dial: "30", label: "Greece" },
|
|
15147
|
+
{ code: "TR", dial: "90", label: "Turkey" },
|
|
15148
|
+
{ code: "UA", dial: "380", label: "Ukraine" },
|
|
15149
|
+
{ code: "RU", dial: "7", label: "Russia" },
|
|
15150
|
+
{ code: "IN", dial: "91", label: "India" },
|
|
15151
|
+
{ code: "PK", dial: "92", label: "Pakistan" },
|
|
15152
|
+
{ code: "BD", dial: "880", label: "Bangladesh" },
|
|
15153
|
+
{ code: "JP", dial: "81", label: "Japan" },
|
|
15154
|
+
{ code: "KR", dial: "82", label: "South Korea" },
|
|
15155
|
+
{ code: "CN", dial: "86", label: "China" },
|
|
15156
|
+
{ code: "TW", dial: "886", label: "Taiwan" },
|
|
15157
|
+
{ code: "HK", dial: "852", label: "Hong Kong" },
|
|
15158
|
+
{ code: "SG", dial: "65", label: "Singapore" },
|
|
15159
|
+
{ code: "MY", dial: "60", label: "Malaysia" },
|
|
15160
|
+
{ code: "TH", dial: "66", label: "Thailand" },
|
|
15161
|
+
{ code: "VN", dial: "84", label: "Vietnam" },
|
|
15162
|
+
{ code: "PH", dial: "63", label: "Philippines" },
|
|
15163
|
+
{ code: "ID", dial: "62", label: "Indonesia" },
|
|
15164
|
+
{ code: "BR", dial: "55", label: "Brazil" },
|
|
15165
|
+
{ code: "MX", dial: "52", label: "Mexico" },
|
|
15166
|
+
{ code: "AR", dial: "54", label: "Argentina" },
|
|
15167
|
+
{ code: "CL", dial: "56", label: "Chile" },
|
|
15168
|
+
{ code: "CO", dial: "57", label: "Colombia" },
|
|
15169
|
+
{ code: "PE", dial: "51", label: "Peru" },
|
|
15170
|
+
{ code: "ZA", dial: "27", label: "South Africa" },
|
|
15171
|
+
{ code: "NG", dial: "234", label: "Nigeria" },
|
|
15172
|
+
{ code: "EG", dial: "20", label: "Egypt" },
|
|
15173
|
+
{ code: "IL", dial: "972", label: "Israel" },
|
|
15174
|
+
{ code: "AE", dial: "971", label: "United Arab Emirates" },
|
|
15175
|
+
{ code: "SA", dial: "966", label: "Saudi Arabia" }
|
|
15176
|
+
];
|
|
15177
|
+
var byCode = new Map(COUNTRY_DIAL_ENTRIES.map((e) => [e.code, e]));
|
|
11769
15178
|
var extractLiquidTemplateBodies = (s) => {
|
|
11770
15179
|
const out = [];
|
|
11771
15180
|
let i = 0;
|
|
@@ -11779,10 +15188,20 @@ var extractLiquidTemplateBodies = (s) => {
|
|
|
11779
15188
|
}
|
|
11780
15189
|
return out;
|
|
11781
15190
|
};
|
|
11782
|
-
var FIELD_KEY_SOURCE =
|
|
15191
|
+
var FIELD_KEY_SOURCE = FIELD_KEY_RE5.source.replace(/^\^|\$$/g, "");
|
|
15192
|
+
var QUOTED_PIPE_RE = /^(.*?)\s*\|\s*"((?:\\.|[^"\\])*)"\s*$/;
|
|
15193
|
+
var unescapeQuotedFallback = (raw) => raw.replace(/\\"/g, '"').replace(/\\\\/g, "\\");
|
|
15194
|
+
var parseQuotedPipeFallback = (inner) => {
|
|
15195
|
+
const quoted = inner.match(QUOTED_PIPE_RE);
|
|
15196
|
+
const exprPart = quoted?.[1]?.trim();
|
|
15197
|
+
if (!quoted || quoted[2] === void 0 || !exprPart) return null;
|
|
15198
|
+
return { exprPart, defaultValue: unescapeQuotedFallback(quoted[2]) };
|
|
15199
|
+
};
|
|
11783
15200
|
var parseDefaultFilter = (inner) => {
|
|
11784
15201
|
const m = inner.match(/\s*\|\s*default\s*:/i);
|
|
11785
|
-
if (!m || m.index === void 0)
|
|
15202
|
+
if (!m || m.index === void 0) {
|
|
15203
|
+
return parseQuotedPipeFallback(inner) ?? { exprPart: inner.trim() };
|
|
15204
|
+
}
|
|
11786
15205
|
const exprPart = inner.slice(0, m.index).trim();
|
|
11787
15206
|
let tail = inner.slice(m.index + m[0].length).trim();
|
|
11788
15207
|
if (tail.startsWith('"')) {
|
|
@@ -12044,6 +15463,8 @@ var GAP_BY_KIND = {
|
|
|
12044
15463
|
oauth_login: 8,
|
|
12045
15464
|
email_password_auth: 8,
|
|
12046
15465
|
email_password_submit: 8,
|
|
15466
|
+
number_stepper: 12,
|
|
15467
|
+
address_input: 8,
|
|
12047
15468
|
button: 8,
|
|
12048
15469
|
back_button: 8,
|
|
12049
15470
|
oauth_provider: 8,
|
|
@@ -12095,13 +15516,21 @@ var defaultLayoutStyleForKind = (kind) => {
|
|
|
12095
15516
|
case "oauth_provider":
|
|
12096
15517
|
case "email_password_submit":
|
|
12097
15518
|
return LAYOUT_FULL_HUG;
|
|
15519
|
+
case "number_stepper_button":
|
|
15520
|
+
return LAYOUT_HUG_HUG;
|
|
12098
15521
|
case "text_input":
|
|
12099
15522
|
case "scale_input":
|
|
12100
15523
|
case "wheel_picker":
|
|
15524
|
+
case "date_time_input":
|
|
15525
|
+
case "number_stepper":
|
|
15526
|
+
case "phone_input":
|
|
15527
|
+
case "address_input":
|
|
12101
15528
|
case "email_password_auth":
|
|
12102
15529
|
case "email_password_field":
|
|
12103
15530
|
case "oauth_login":
|
|
12104
15531
|
return LAYOUT_FULL_FILL;
|
|
15532
|
+
case "number_stepper_value":
|
|
15533
|
+
return LAYOUT_FULL_HUG;
|
|
12105
15534
|
case "progress":
|
|
12106
15535
|
return LAYOUT_PROGRESS;
|
|
12107
15536
|
case "loader":
|
|
@@ -12313,7 +15742,7 @@ var walkLayers2 = (root, fn) => {
|
|
|
12313
15742
|
else if (l.kind === "hyperlink") l.children.forEach((c) => visit(c, depth + 1));
|
|
12314
15743
|
else if (l.kind === "single_choice" || l.kind === "multiple_choice") {
|
|
12315
15744
|
l.children.forEach((c) => visit(c, depth + 1));
|
|
12316
|
-
} else if (l.kind === "text_input" || l.kind === "scale_input" || l.kind === "wheel_picker") {
|
|
15745
|
+
} 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") {
|
|
12317
15746
|
l.children?.forEach((c) => visit(c, depth + 1));
|
|
12318
15747
|
} else if (l.kind === "oauth_login") {
|
|
12319
15748
|
l.children.forEach((c) => visit(c, depth + 1));
|
|
@@ -12325,6 +15754,10 @@ var walkLayers2 = (root, fn) => {
|
|
|
12325
15754
|
l.children?.forEach((c) => visit(c, depth + 1));
|
|
12326
15755
|
} else if (l.kind === "email_password_submit") {
|
|
12327
15756
|
l.children.forEach((c) => visit(c, depth + 1));
|
|
15757
|
+
} else if (l.kind === "number_stepper") {
|
|
15758
|
+
l.children.forEach((c) => visit(c, depth + 1));
|
|
15759
|
+
} else if (l.kind === "number_stepper_button") {
|
|
15760
|
+
l.children?.forEach((c) => visit(c, depth + 1));
|
|
12328
15761
|
}
|
|
12329
15762
|
};
|
|
12330
15763
|
visit(root, 0);
|
|
@@ -12390,7 +15823,12 @@ var IMPORT_PUBLISH_INTEGRATIONS = {
|
|
|
12390
15823
|
defaultOfferingId: "default",
|
|
12391
15824
|
defaultPlacementId: ""
|
|
12392
15825
|
},
|
|
12393
|
-
|
|
15826
|
+
superwall: {
|
|
15827
|
+
enabled: true,
|
|
15828
|
+
defaultPlacementId: "campaign_trigger"
|
|
15829
|
+
},
|
|
15830
|
+
appsflyer: { enabled: false },
|
|
15831
|
+
stripe: { enabled: true }
|
|
12394
15832
|
};
|
|
12395
15833
|
var toBlocking = (issues, fixForCode) => issues.map((issue) => ({
|
|
12396
15834
|
severity: "blocking",
|
|
@@ -12466,8 +15904,11 @@ var fixForBuilderMessage = (message) => {
|
|
|
12466
15904
|
if (message.includes("RevenueCat")) {
|
|
12467
15905
|
return "Enable RevenueCat in App settings \u2192 Integrations, or remove RevenueCat external surfaces from the import manifest.";
|
|
12468
15906
|
}
|
|
15907
|
+
if (message.includes("Superwall")) {
|
|
15908
|
+
return "Enable Superwall in App settings \u2192 Integrations, or remove Superwall external surfaces from the import manifest.";
|
|
15909
|
+
}
|
|
12469
15910
|
if (message.includes("integration provider")) {
|
|
12470
|
-
return "Set externalSurfaceNodes[].config.provider to a real provider (e.g. revenuecat), not unspecified.";
|
|
15911
|
+
return "Set externalSurfaceNodes[].config.provider to a real provider (e.g. revenuecat or superwall), not unspecified.";
|
|
12471
15912
|
}
|
|
12472
15913
|
if (message.includes("Fallback edge")) {
|
|
12473
15914
|
return "Connect every external surface fallback to the next screen/decision/surface when no specific outcome is mapped.";
|
|
@@ -12492,6 +15933,16 @@ var collectIntegrationIssues = (manifest, integrations) => {
|
|
|
12492
15933
|
`External surface "${node.name ?? node.id}" uses RevenueCat, but the integration is disabled. Enable it in App Settings \u2192 Integrations.`
|
|
12493
15934
|
);
|
|
12494
15935
|
}
|
|
15936
|
+
if (node.config.provider === "superwall" && !integrations.superwall.enabled) {
|
|
15937
|
+
issues.push(
|
|
15938
|
+
`External surface "${node.name ?? node.id}" uses Superwall, but the integration is disabled. Enable it in App Settings \u2192 Integrations.`
|
|
15939
|
+
);
|
|
15940
|
+
}
|
|
15941
|
+
if (node.config.provider === "stripe" && !integrations.stripe.enabled) {
|
|
15942
|
+
issues.push(
|
|
15943
|
+
`External surface "${node.name ?? node.id}" uses Stripe, but the integration is disabled. Enable it in App Settings \u2192 Integrations.`
|
|
15944
|
+
);
|
|
15945
|
+
}
|
|
12495
15946
|
}
|
|
12496
15947
|
return issues.map((message) => ({
|
|
12497
15948
|
severity: "blocking",
|
|
@@ -14730,7 +18181,7 @@ var renderPublishGateMarkdown = (manifestPath, result) => {
|
|
|
14730
18181
|
"- Schema: valid FlowManifest (Zod)",
|
|
14731
18182
|
"- Builder: text/icon `style.color`, Continue on manual-submit inputs, one input per screen, valid graph targets, media triggers",
|
|
14732
18183
|
"- Publishable: entry connected, completion path, decision branches wired",
|
|
14733
|
-
"- Integrations: external surfaces have provider + fallback; RevenueCat enabled when used",
|
|
18184
|
+
"- Integrations: external surfaces have provider + fallback; RevenueCat / Superwall enabled when used",
|
|
14734
18185
|
"- Canvas gates: no disabled layer types (default import assumes all enabled)",
|
|
14735
18186
|
"- Branding gradients: `$brandGradient:` only on backgrounds; known preset ids when branding is provided",
|
|
14736
18187
|
"",
|
|
@@ -15039,7 +18490,7 @@ var ScreenSpecSchema = external_exports.object({
|
|
|
15039
18490
|
var ExternalSurfaceSpecSchema = external_exports.object({
|
|
15040
18491
|
id: external_exports.string().min(1).max(64),
|
|
15041
18492
|
name: external_exports.string().min(1).max(80).optional(),
|
|
15042
|
-
provider: external_exports.enum(["revenuecat", "headless", "unspecified"]),
|
|
18493
|
+
provider: external_exports.enum(["revenuecat", "superwall", "headless", "unspecified"]),
|
|
15043
18494
|
offeringId: external_exports.string().min(1).max(128).optional(),
|
|
15044
18495
|
placementId: external_exports.string().min(1).max(128).optional(),
|
|
15045
18496
|
presentation: external_exports.enum(["paywall", "paywall_if_needed"]).optional(),
|
|
@@ -15556,6 +19007,9 @@ var buildExternalSurface = (surface) => {
|
|
|
15556
19007
|
...surface.offeringId ? { offeringId: surface.offeringId } : {},
|
|
15557
19008
|
...surface.placementId ? { placementId: surface.placementId } : {},
|
|
15558
19009
|
...surface.presentation ? { presentation: surface.presentation } : {}
|
|
19010
|
+
} : surface.provider === "superwall" ? {
|
|
19011
|
+
provider: "superwall",
|
|
19012
|
+
...surface.placementId ? { placementId: surface.placementId } : {}
|
|
15559
19013
|
} : surface.provider === "headless" ? {
|
|
15560
19014
|
provider: "headless",
|
|
15561
19015
|
...surface.hostKey ? { hostKey: surface.hostKey } : {}
|