@getrheo/rheo-skill 2.6.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 +24 -3
- package/rheo/rheo-best-practices/references/product-model.md +66 -0
- package/rheo/rheo-best-practices/references/react-native-bare.md +2 -0
- package/rheo/rheo-best-practices/references/react-native-expo.md +3 -2
- package/rheo/rheo-best-practices/references/react-web.md +78 -0
- package/rheo/rheo-best-practices/references/swiftui.md +20 -51
- package/rheo/rheo-best-practices/references/troubleshooting.md +13 -0
- package/rheo/rheo-flow-import/SKILL.md +4 -2
- package/rheo/rheo-flow-import/references/capabilities.md +1 -0
- package/rheo/rheo-flow-import/scripts/lib/rheo-cli.mjs +2289 -53
|
@@ -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);
|
|
@@ -5973,7 +5974,8 @@ var ButtonActionSchema2 = external_exports.discriminatedUnion("kind", [
|
|
|
5973
5974
|
kind: external_exports.literal("advance_carousel"),
|
|
5974
5975
|
targetLayerId: external_exports.string().min(1),
|
|
5975
5976
|
onLast: CarouselAdvanceOnLastSchema2.optional()
|
|
5976
|
-
})
|
|
5977
|
+
}),
|
|
5978
|
+
external_exports.object({ kind: external_exports.literal("dismiss_banner") })
|
|
5977
5979
|
]);
|
|
5978
5980
|
var TEXT_INPUT_TYPES2 = ["plain", "email", "phone", "url", "number", "multiline"];
|
|
5979
5981
|
var TextInputTypeSchema2 = external_exports.enum(TEXT_INPUT_TYPES2);
|
|
@@ -7179,7 +7181,9 @@ var EVENT_NAMES = [
|
|
|
7179
7181
|
/** Emitted once per provider id when merged SDK attributes first expose that attribution source (used for integration health checks). */
|
|
7180
7182
|
"attribution_context_observed",
|
|
7181
7183
|
/** Successful in-app purchase from an external surface (e.g. RevenueCat paywall); commerce fields live in `properties`. */
|
|
7182
|
-
"iap_purchase"
|
|
7184
|
+
"iap_purchase",
|
|
7185
|
+
"banner_impression",
|
|
7186
|
+
"banner_dismissed"
|
|
7183
7187
|
];
|
|
7184
7188
|
var MediaTypeSchema3 = external_exports.enum(MEDIA_TYPES3);
|
|
7185
7189
|
var MediaReferenceSchema3 = external_exports.object({
|
|
@@ -7552,7 +7556,8 @@ var ButtonActionSchema3 = external_exports.discriminatedUnion("kind", [
|
|
|
7552
7556
|
kind: external_exports.literal("advance_carousel"),
|
|
7553
7557
|
targetLayerId: external_exports.string().min(1),
|
|
7554
7558
|
onLast: CarouselAdvanceOnLastSchema3.optional()
|
|
7555
|
-
})
|
|
7559
|
+
}),
|
|
7560
|
+
external_exports.object({ kind: external_exports.literal("dismiss_banner") })
|
|
7556
7561
|
]);
|
|
7557
7562
|
var TEXT_INPUT_TYPES3 = ["plain", "email", "phone", "url", "number", "multiline"];
|
|
7558
7563
|
var TextInputTypeSchema3 = external_exports.enum(TEXT_INPUT_TYPES3);
|
|
@@ -9257,7 +9262,13 @@ var NORMALIZED_SURFACE_OUTCOMES = [
|
|
|
9257
9262
|
"back"
|
|
9258
9263
|
];
|
|
9259
9264
|
var NormalizedSurfaceOutcomeSchema = external_exports.enum(NORMALIZED_SURFACE_OUTCOMES);
|
|
9260
|
-
var SurfaceProviderSchema = external_exports.enum([
|
|
9265
|
+
var SurfaceProviderSchema = external_exports.enum([
|
|
9266
|
+
"unspecified",
|
|
9267
|
+
"revenuecat",
|
|
9268
|
+
"superwall",
|
|
9269
|
+
"stripe",
|
|
9270
|
+
"headless"
|
|
9271
|
+
]);
|
|
9261
9272
|
var UnspecifiedExternalSurfaceConfigSchema = external_exports.object({
|
|
9262
9273
|
provider: external_exports.literal("unspecified")
|
|
9263
9274
|
});
|
|
@@ -9272,6 +9283,22 @@ var SuperwallSurfaceConfigSchema = external_exports.object({
|
|
|
9272
9283
|
provider: external_exports.literal("superwall"),
|
|
9273
9284
|
placementId: external_exports.string().min(1).max(128).optional()
|
|
9274
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
|
+
});
|
|
9275
9302
|
var ExternalSurfaceHostKeySchema = external_exports.string().min(1).max(64).regex(
|
|
9276
9303
|
/^[a-zA-Z][a-zA-Z0-9_]*$/,
|
|
9277
9304
|
"host key must start with a letter and contain only letters, digits, or underscores"
|
|
@@ -9285,6 +9312,7 @@ var ExternalSurfaceConfigSchema = external_exports.discriminatedUnion("provider"
|
|
|
9285
9312
|
UnspecifiedExternalSurfaceConfigSchema,
|
|
9286
9313
|
RevenueCatSurfaceConfigSchema,
|
|
9287
9314
|
SuperwallSurfaceConfigSchema,
|
|
9315
|
+
StripeSurfaceConfigSchema,
|
|
9288
9316
|
HeadlessExternalSurfaceConfigSchema
|
|
9289
9317
|
]);
|
|
9290
9318
|
var ExternalSurfaceOutcomesMapSchema = external_exports.object({
|
|
@@ -9311,6 +9339,60 @@ var resolveExternalSurfaceHostKey = (node) => {
|
|
|
9311
9339
|
}
|
|
9312
9340
|
return node.id;
|
|
9313
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
|
+
});
|
|
9314
9396
|
var RESERVED_RC_SDK_KEYS = [
|
|
9315
9397
|
/** Last RC event observed by the SDK (e.g. `purchase_completed`, `purchase_cancelled`). */
|
|
9316
9398
|
"onb_rc_last_event",
|
|
@@ -9606,6 +9688,13 @@ var refineManifestGraph = (manifest, ctx, jumpTargets) => {
|
|
|
9606
9688
|
}
|
|
9607
9689
|
seenHostKey.add(hostKey);
|
|
9608
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
|
+
}
|
|
9609
9698
|
for (const [outcome, target] of Object.entries(sn.outcomes)) {
|
|
9610
9699
|
if (target != null && !jumpTargets.has(target)) {
|
|
9611
9700
|
ctx.addIssue({
|
|
@@ -9951,11 +10040,243 @@ var SdkIdentitySchema = external_exports.object({
|
|
|
9951
10040
|
customUserId: external_exports.string().min(1).optional(),
|
|
9952
10041
|
sessionId: external_exports.string().min(1).optional()
|
|
9953
10042
|
});
|
|
10043
|
+
var SdkAttributeValueSchema = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]);
|
|
9954
10044
|
var SdkContextSchema = external_exports.object({
|
|
9955
10045
|
platform: external_exports.enum(["ios", "android", "web"]).optional(),
|
|
9956
10046
|
appVersion: external_exports.string().optional(),
|
|
9957
10047
|
locale: external_exports.string().optional(),
|
|
9958
|
-
|
|
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)
|
|
9959
10280
|
});
|
|
9960
10281
|
var RevenueCatIntegrationSchema = external_exports.object({
|
|
9961
10282
|
enabled: external_exports.boolean(),
|
|
@@ -9969,15 +10290,20 @@ var SuperwallIntegrationSchema = external_exports.object({
|
|
|
9969
10290
|
var AppsFlyerIntegrationSchema = external_exports.object({
|
|
9970
10291
|
enabled: external_exports.boolean()
|
|
9971
10292
|
});
|
|
10293
|
+
var StripeIntegrationSchema = external_exports.object({
|
|
10294
|
+
enabled: external_exports.boolean()
|
|
10295
|
+
});
|
|
9972
10296
|
var ResolvedAppIntegrationsSchema = external_exports.object({
|
|
9973
10297
|
revenuecat: RevenueCatIntegrationSchema,
|
|
9974
10298
|
superwall: SuperwallIntegrationSchema,
|
|
9975
|
-
appsflyer: AppsFlyerIntegrationSchema
|
|
10299
|
+
appsflyer: AppsFlyerIntegrationSchema,
|
|
10300
|
+
stripe: StripeIntegrationSchema
|
|
9976
10301
|
});
|
|
9977
10302
|
var AppIntegrationsSchema = external_exports.object({
|
|
9978
10303
|
revenuecat: RevenueCatIntegrationSchema.partial().optional(),
|
|
9979
10304
|
superwall: SuperwallIntegrationSchema.partial().optional(),
|
|
9980
|
-
appsflyer: AppsFlyerIntegrationSchema.partial().optional()
|
|
10305
|
+
appsflyer: AppsFlyerIntegrationSchema.partial().optional(),
|
|
10306
|
+
stripe: StripeIntegrationSchema.partial().optional()
|
|
9981
10307
|
}).passthrough();
|
|
9982
10308
|
var DASHBOARD_ATTRIBUTION_INTEGRATION_PROVIDER_IDS = ["appsflyer"];
|
|
9983
10309
|
var DashboardAttributionIntegrationProviderIdSchema = external_exports.enum(
|
|
@@ -10053,7 +10379,13 @@ var SdkResolveRequestSchema = external_exports.object({
|
|
|
10053
10379
|
identity: SdkIdentitySchema,
|
|
10054
10380
|
context: SdkContextSchema.optional()
|
|
10055
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
|
+
});
|
|
10056
10387
|
var SdkResolveResponseSchema = external_exports.object({
|
|
10388
|
+
kind: external_exports.literal("flow"),
|
|
10057
10389
|
flowId: external_exports.string().uuid(),
|
|
10058
10390
|
versionId: external_exports.string().uuid(),
|
|
10059
10391
|
versionNumber: external_exports.number().int().positive(),
|
|
@@ -10064,6 +10396,7 @@ var SdkResolveResponseSchema = external_exports.object({
|
|
|
10064
10396
|
channelId: external_exports.string(),
|
|
10065
10397
|
experimentId: external_exports.string().uuid().nullable(),
|
|
10066
10398
|
variantId: external_exports.string().nullable(),
|
|
10399
|
+
experiment: SdkResolveExperimentSchema.nullable(),
|
|
10067
10400
|
manifest: FlowManifestSchema,
|
|
10068
10401
|
mediaMap: external_exports.record(external_exports.string(), external_exports.string().url()),
|
|
10069
10402
|
/** App branding (gradient presets, etc.) when present on the app record. */
|
|
@@ -10076,10 +10409,8 @@ var SdkResolveResponseSchema = external_exports.object({
|
|
|
10076
10409
|
/** Per-app integration toggles from the dashboard; SDK should respect these after resolve. */
|
|
10077
10410
|
integrations: ResolvedAppIntegrationsSchema
|
|
10078
10411
|
});
|
|
10079
|
-
var SdkResolveAllResponseSchema = external_exports.object({
|
|
10080
|
-
channels: external_exports.array(SdkResolveResponseSchema)
|
|
10081
|
-
});
|
|
10082
10412
|
var SdkResolveAssignmentSchema = external_exports.object({
|
|
10413
|
+
kind: external_exports.literal("flow"),
|
|
10083
10414
|
flowId: external_exports.string().uuid(),
|
|
10084
10415
|
versionId: external_exports.string().uuid(),
|
|
10085
10416
|
versionNumber: external_exports.number().int().positive(),
|
|
@@ -10088,6 +10419,7 @@ var SdkResolveAssignmentSchema = external_exports.object({
|
|
|
10088
10419
|
channelId: external_exports.string(),
|
|
10089
10420
|
experimentId: external_exports.string().uuid().nullable(),
|
|
10090
10421
|
variantId: external_exports.string().nullable(),
|
|
10422
|
+
experiment: SdkResolveExperimentSchema.nullable(),
|
|
10091
10423
|
branding: BrandingSchema.optional(),
|
|
10092
10424
|
features: external_exports.object({
|
|
10093
10425
|
attribution: external_exports.boolean()
|
|
@@ -10132,6 +10464,126 @@ var FlowTerminalSnapshotSchema = external_exports.object({
|
|
|
10132
10464
|
answersDetail: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
10133
10465
|
manifest: FlowManifestSchema.optional()
|
|
10134
10466
|
});
|
|
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
|
+
});
|
|
10135
10587
|
var EventNameSchema = external_exports.enum(EVENT_NAMES);
|
|
10136
10588
|
var SdkEventSchema = external_exports.object({
|
|
10137
10589
|
eventId: external_exports.string().uuid(),
|
|
@@ -10158,7 +10610,7 @@ var SdkEventBatchSchema = external_exports.object({
|
|
|
10158
10610
|
var IapPurchasePeriodTypeSchema = external_exports.enum(["normal", "intro", "trial"]);
|
|
10159
10611
|
var IapPurchaseEventPropertiesSchema = external_exports.object({
|
|
10160
10612
|
/** External surface provider that produced the purchase. */
|
|
10161
|
-
provider: external_exports.enum(["revenuecat", "superwall"]),
|
|
10613
|
+
provider: external_exports.enum(["revenuecat", "superwall", "stripe"]),
|
|
10162
10614
|
/** Manifest node id of the surface (e.g. `surf_paywall_welcome`). */
|
|
10163
10615
|
surface_node_id: external_exports.string().min(1).max(128),
|
|
10164
10616
|
/** Store product identifier (e.g. `pro_annual`). */
|
|
@@ -10265,19 +10717,13 @@ var collectCanvasGateViolations = (manifest, gates) => {
|
|
|
10265
10717
|
return issues;
|
|
10266
10718
|
};
|
|
10267
10719
|
|
|
10268
|
-
// ../../node_modules/@getrheo/contracts/dist/
|
|
10269
|
-
var FIELD_CLASSIFICATIONS4 = ["safe", "sensitive"];
|
|
10270
|
-
var FIELD_KEY_RE4 = /^[a-z][a-z0-9_]*$/;
|
|
10271
|
-
var FieldKeySchema4 = external_exports.string().min(1).max(64).regex(FIELD_KEY_RE4, "field key must be snake_case");
|
|
10272
|
-
var FieldClassificationSchema4 = external_exports.enum(FIELD_CLASSIFICATIONS4);
|
|
10273
|
-
|
|
10274
|
-
// ../../node_modules/@getrheo/contracts/dist/screens.js
|
|
10275
|
-
var layerSchemaStore4 = {};
|
|
10720
|
+
// ../../node_modules/@getrheo/contracts/dist/bannerManifest.js
|
|
10276
10721
|
var LocaleCode5 = external_exports.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/, 'locale must be like "en" or "en-US"');
|
|
10277
10722
|
var LocalizedTextSchema5 = external_exports.object({
|
|
10278
10723
|
default: external_exports.string().min(1, "default copy is required"),
|
|
10279
10724
|
translations: external_exports.record(LocaleCode5, external_exports.string()).optional()
|
|
10280
10725
|
});
|
|
10726
|
+
var layerSchemaStore4 = {};
|
|
10281
10727
|
var parseHyperlinkHref4 = (raw) => {
|
|
10282
10728
|
const t = raw.trim();
|
|
10283
10729
|
if (!t) return { ok: false };
|
|
@@ -10297,7 +10743,7 @@ var parseHyperlinkHref4 = (raw) => {
|
|
|
10297
10743
|
}
|
|
10298
10744
|
return { ok: false };
|
|
10299
10745
|
};
|
|
10300
|
-
var
|
|
10746
|
+
var FIELD_CLASSIFICATIONS4 = ["safe", "sensitive"];
|
|
10301
10747
|
var MEDIA_TYPES4 = ["image", "font", "lottie", "video"];
|
|
10302
10748
|
var MediaTypeSchema4 = external_exports.enum(MEDIA_TYPES4);
|
|
10303
10749
|
var MediaReferenceSchema4 = external_exports.object({
|
|
@@ -10664,7 +11110,8 @@ var ButtonActionSchema4 = external_exports.discriminatedUnion("kind", [
|
|
|
10664
11110
|
kind: external_exports.literal("advance_carousel"),
|
|
10665
11111
|
targetLayerId: external_exports.string().min(1),
|
|
10666
11112
|
onLast: CarouselAdvanceOnLastSchema4.optional()
|
|
10667
|
-
})
|
|
11113
|
+
}),
|
|
11114
|
+
external_exports.object({ kind: external_exports.literal("dismiss_banner") })
|
|
10668
11115
|
]);
|
|
10669
11116
|
var TEXT_INPUT_TYPES4 = ["plain", "email", "phone", "url", "number", "multiline"];
|
|
10670
11117
|
var TextInputTypeSchema4 = external_exports.enum(TEXT_INPUT_TYPES4);
|
|
@@ -11097,9 +11544,9 @@ external_exports.array(OAuthLoginProviderSchema4).min(1).superRefine((providers,
|
|
|
11097
11544
|
seen.add(preset);
|
|
11098
11545
|
}
|
|
11099
11546
|
});
|
|
11100
|
-
var
|
|
11101
|
-
var
|
|
11102
|
-
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);
|
|
11103
11550
|
var lazyLayer44 = () => layerSchemaStore4.schema;
|
|
11104
11551
|
var EmailPasswordAuthModeSchema4 = external_exports.enum(EMAIL_PASSWORD_AUTH_MODES4);
|
|
11105
11552
|
var PasswordRulesSchema4 = external_exports.object({
|
|
@@ -11233,7 +11680,7 @@ var EmailPasswordAuthLayerSchemaValidated4 = external_exports.object({
|
|
|
11233
11680
|
...baseLayerShape4,
|
|
11234
11681
|
kind: external_exports.literal("email_password_auth"),
|
|
11235
11682
|
mode: EmailPasswordAuthModeSchema4,
|
|
11236
|
-
fieldKey:
|
|
11683
|
+
fieldKey: FieldKeySchema4,
|
|
11237
11684
|
/** @deprecated Prefer `passwordRules.minLength`. Kept for backward compatibility. */
|
|
11238
11685
|
minPasswordLength: external_exports.number().int().min(4).max(128).optional(),
|
|
11239
11686
|
/** Composition rules beyond minimum length (uppercase, digit, special, max). */
|
|
@@ -11267,7 +11714,7 @@ var lazyLayer54 = () => layerSchemaStore4.schema;
|
|
|
11267
11714
|
var SingleChoiceLayerSchema4 = external_exports.object({
|
|
11268
11715
|
...baseLayerShape4,
|
|
11269
11716
|
kind: external_exports.literal("single_choice"),
|
|
11270
|
-
fieldKey:
|
|
11717
|
+
fieldKey: FieldKeySchema4,
|
|
11271
11718
|
children: external_exports.lazy(
|
|
11272
11719
|
() => external_exports.array(StackLayerSchema4).min(2)
|
|
11273
11720
|
),
|
|
@@ -11283,7 +11730,7 @@ var SingleChoiceLayerSchema4 = external_exports.object({
|
|
|
11283
11730
|
var MultipleChoiceLayerSchema4 = external_exports.object({
|
|
11284
11731
|
...baseLayerShape4,
|
|
11285
11732
|
kind: external_exports.literal("multiple_choice"),
|
|
11286
|
-
fieldKey:
|
|
11733
|
+
fieldKey: FieldKeySchema4,
|
|
11287
11734
|
children: external_exports.lazy(
|
|
11288
11735
|
() => external_exports.array(StackLayerSchema4).min(2)
|
|
11289
11736
|
),
|
|
@@ -11326,7 +11773,7 @@ var TextInputValidationModeSchema4 = external_exports.enum(["onBlur", "onSubmit"
|
|
|
11326
11773
|
var TextInputLayerSchema4 = external_exports.object({
|
|
11327
11774
|
...baseLayerShape4,
|
|
11328
11775
|
kind: external_exports.literal("text_input"),
|
|
11329
|
-
fieldKey:
|
|
11776
|
+
fieldKey: FieldKeySchema4,
|
|
11330
11777
|
placeholder: LocalizedTextSchema5.optional(),
|
|
11331
11778
|
/** Optional helper copy shown under the field when valid / untouched. */
|
|
11332
11779
|
helperText: LocalizedTextSchema5.optional(),
|
|
@@ -11334,7 +11781,7 @@ var TextInputLayerSchema4 = external_exports.object({
|
|
|
11334
11781
|
required: external_exports.boolean().optional(),
|
|
11335
11782
|
minLength: external_exports.number().int().min(0).max(2e3).optional(),
|
|
11336
11783
|
maxLength: external_exports.number().int().positive().max(2e3).optional(),
|
|
11337
|
-
classification:
|
|
11784
|
+
classification: FieldClassificationSchema4,
|
|
11338
11785
|
/** Override autocapitalize (defaults from `inputType` when omitted). */
|
|
11339
11786
|
autoCapitalize: TextInputAutoCapitalizeSchema4.optional(),
|
|
11340
11787
|
/** Soft keyboard return key label. */
|
|
@@ -11360,7 +11807,7 @@ var ScaleInputLabelStyleSchema4 = external_exports.object({
|
|
|
11360
11807
|
var ScaleInputLayerSchema4 = external_exports.object({
|
|
11361
11808
|
...baseLayerShape4,
|
|
11362
11809
|
kind: external_exports.literal("scale_input"),
|
|
11363
|
-
fieldKey:
|
|
11810
|
+
fieldKey: FieldKeySchema4,
|
|
11364
11811
|
min: external_exports.number(),
|
|
11365
11812
|
max: external_exports.number(),
|
|
11366
11813
|
step: external_exports.number().positive().optional(),
|
|
@@ -11394,7 +11841,7 @@ var WheelPickerItemStyleSchema4 = external_exports.object({
|
|
|
11394
11841
|
var WheelPickerLayerSchema4 = external_exports.object({
|
|
11395
11842
|
...baseLayerShape4,
|
|
11396
11843
|
kind: external_exports.literal("wheel_picker"),
|
|
11397
|
-
fieldKey:
|
|
11844
|
+
fieldKey: FieldKeySchema4,
|
|
11398
11845
|
mode: external_exports.enum(["options", "date"]).optional(),
|
|
11399
11846
|
options: external_exports.array(WheelPickerOptionSchema4).min(2).optional(),
|
|
11400
11847
|
defaultOptionId: external_exports.string().optional(),
|
|
@@ -11428,14 +11875,14 @@ var DateTimeInputModeSchema4 = external_exports.enum(DATE_TIME_INPUT_MODES4);
|
|
|
11428
11875
|
var DateTimeInputLayerSchema4 = external_exports.object({
|
|
11429
11876
|
...baseLayerShape4,
|
|
11430
11877
|
kind: external_exports.literal("date_time_input"),
|
|
11431
|
-
fieldKey:
|
|
11878
|
+
fieldKey: FieldKeySchema4,
|
|
11432
11879
|
mode: DateTimeInputModeSchema4.optional(),
|
|
11433
11880
|
required: external_exports.boolean().optional(),
|
|
11434
11881
|
min: external_exports.string().min(1).max(64).optional(),
|
|
11435
11882
|
max: external_exports.string().min(1).max(64).optional(),
|
|
11436
11883
|
defaultValue: external_exports.string().min(1).max(64).optional(),
|
|
11437
11884
|
placeholder: LocalizedTextSchema5.optional(),
|
|
11438
|
-
classification:
|
|
11885
|
+
classification: FieldClassificationSchema4,
|
|
11439
11886
|
children: external_exports.lazy(() => external_exports.array(lazyLayer64())).optional(),
|
|
11440
11887
|
fieldStyle: TextInputFieldStyleSchema4.optional(),
|
|
11441
11888
|
style: CommonStyleSchema4.optional(),
|
|
@@ -11568,12 +12015,12 @@ var refineNumberStepperChildren4 = (data, ctx) => {
|
|
|
11568
12015
|
var NumberStepperLayerSchemaValidated4 = external_exports.object({
|
|
11569
12016
|
...baseLayerShape4,
|
|
11570
12017
|
kind: external_exports.literal("number_stepper"),
|
|
11571
|
-
fieldKey:
|
|
12018
|
+
fieldKey: FieldKeySchema4,
|
|
11572
12019
|
min: external_exports.number(),
|
|
11573
12020
|
max: external_exports.number(),
|
|
11574
12021
|
step: external_exports.number().positive().optional(),
|
|
11575
12022
|
defaultValue: external_exports.number().optional(),
|
|
11576
|
-
classification:
|
|
12023
|
+
classification: FieldClassificationSchema4,
|
|
11577
12024
|
direction: external_exports.enum(["vertical", "horizontal"]).optional(),
|
|
11578
12025
|
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
11579
12026
|
align: external_exports.enum(["start", "center", "end", "stretch"]).optional(),
|
|
@@ -11591,12 +12038,12 @@ var NumberStepperLayerSchema4 = external_exports.preprocess(
|
|
|
11591
12038
|
var PhoneInputLayerSchema4 = external_exports.object({
|
|
11592
12039
|
...baseLayerShape4,
|
|
11593
12040
|
kind: external_exports.literal("phone_input"),
|
|
11594
|
-
fieldKey:
|
|
12041
|
+
fieldKey: FieldKeySchema4,
|
|
11595
12042
|
defaultCountryCode: CountryCodeSchema4.optional(),
|
|
11596
12043
|
allowedCountryCodes: external_exports.array(CountryCodeSchema4).min(1).max(250).optional(),
|
|
11597
12044
|
required: external_exports.boolean().optional(),
|
|
11598
12045
|
placeholder: LocalizedTextSchema5.optional(),
|
|
11599
|
-
classification:
|
|
12046
|
+
classification: FieldClassificationSchema4,
|
|
11600
12047
|
children: external_exports.lazy(() => external_exports.array(lazyLayer64())).optional(),
|
|
11601
12048
|
fieldStyle: TextInputFieldStyleSchema4.optional(),
|
|
11602
12049
|
style: CommonStyleSchema4.optional(),
|
|
@@ -11614,13 +12061,13 @@ var AddressInputPlaceholdersSchema4 = external_exports.object({
|
|
|
11614
12061
|
var AddressInputLayerSchema4 = external_exports.object({
|
|
11615
12062
|
...baseLayerShape4,
|
|
11616
12063
|
kind: external_exports.literal("address_input"),
|
|
11617
|
-
fieldKey:
|
|
12064
|
+
fieldKey: FieldKeySchema4,
|
|
11618
12065
|
requiredFields: external_exports.array(AddressInputFieldSchema4).min(1).max(6).optional(),
|
|
11619
12066
|
showLine2: external_exports.boolean().optional(),
|
|
11620
12067
|
showRegion: external_exports.boolean().optional(),
|
|
11621
12068
|
defaultCountryCode: CountryCodeSchema4.optional(),
|
|
11622
12069
|
placeholders: AddressInputPlaceholdersSchema4.optional(),
|
|
11623
|
-
classification:
|
|
12070
|
+
classification: FieldClassificationSchema4,
|
|
11624
12071
|
children: external_exports.lazy(() => external_exports.array(lazyLayer64())).optional(),
|
|
11625
12072
|
fieldStyle: TextInputFieldStyleSchema4.optional(),
|
|
11626
12073
|
gap: external_exports.number().int().min(0).max(64).optional(),
|
|
@@ -11974,15 +12421,1788 @@ var ScreenSchema2 = external_exports.object({
|
|
|
11974
12421
|
containerStyle: ScreenContainerStyleSchema2.optional(),
|
|
11975
12422
|
containerStyleBreakpoints: ScreenContainerStyleBreakpointsSchema2
|
|
11976
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
|
+
});
|
|
11977
12486
|
|
|
11978
|
-
// ../../node_modules/@getrheo/
|
|
11979
|
-
var
|
|
11980
|
-
var
|
|
11981
|
-
var
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
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({
|
|
13604
|
+
optionId: external_exports.string().min(1).max(64),
|
|
13605
|
+
label: LocalizedTextSchema6
|
|
13606
|
+
});
|
|
13607
|
+
var WheelPickerItemStyleSchema5 = external_exports.object({
|
|
13608
|
+
fontFamily: external_exports.string().min(1).max(128).optional(),
|
|
13609
|
+
fontSize: external_exports.number().int().min(8).max(96).optional(),
|
|
13610
|
+
fontWeight: external_exports.number().int().min(100).max(900).optional(),
|
|
13611
|
+
color: ThemedColorSchema5.optional(),
|
|
13612
|
+
opacity: external_exports.number().min(0).max(1).optional()
|
|
13613
|
+
}).partial();
|
|
13614
|
+
var WheelPickerLayerSchema5 = external_exports.object({
|
|
13615
|
+
...baseLayerShape5,
|
|
13616
|
+
kind: external_exports.literal("wheel_picker"),
|
|
13617
|
+
fieldKey: FieldKeySchema6,
|
|
13618
|
+
mode: external_exports.enum(["options", "date"]).optional(),
|
|
13619
|
+
options: external_exports.array(WheelPickerOptionSchema5).min(2).optional(),
|
|
13620
|
+
defaultOptionId: external_exports.string().optional(),
|
|
13621
|
+
datePart: external_exports.enum(["year", "month", "day"]).optional(),
|
|
13622
|
+
minYear: external_exports.number().int().min(1e3).max(9999).optional(),
|
|
13623
|
+
maxYear: external_exports.number().int().min(1e3).max(9999).optional(),
|
|
13624
|
+
defaultValue: external_exports.string().optional(),
|
|
13625
|
+
placeholder: LocalizedTextSchema6.optional(),
|
|
13626
|
+
itemHeight: external_exports.number().int().min(28).max(72).optional(),
|
|
13627
|
+
visibleItemCount: external_exports.number().int().min(3).max(9).optional(),
|
|
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
|
|
13634
|
+
});
|
|
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({
|
|
13851
|
+
width: external_exports.number().int().min(1).max(64).optional(),
|
|
13852
|
+
height: external_exports.number().int().min(1).max(64).optional(),
|
|
13853
|
+
defaultColor: ThemedColorSchema5.optional(),
|
|
13854
|
+
defaultOpacity: external_exports.number().min(0).max(1).optional(),
|
|
13855
|
+
activeColor: ThemedColorSchema5.optional(),
|
|
13856
|
+
activeOpacity: external_exports.number().min(0).max(1).optional(),
|
|
13857
|
+
activeWidth: external_exports.number().int().min(1).max(64).optional(),
|
|
13858
|
+
activeHeight: external_exports.number().int().min(1).max(64).optional(),
|
|
13859
|
+
border: BorderSchema5.optional(),
|
|
13860
|
+
activeBorder: BorderSchema5.optional()
|
|
13861
|
+
}).partial();
|
|
13862
|
+
var CarouselPageControlSchema5 = external_exports.object({
|
|
13863
|
+
position: external_exports.enum(["top", "bottom"]),
|
|
13864
|
+
spacing: external_exports.number().int().min(0).optional(),
|
|
13865
|
+
padding: PaddingSchema5.optional(),
|
|
13866
|
+
margin: PaddingSchema5.optional(),
|
|
13867
|
+
indicators: CarouselIndicatorsStyleSchema5.optional(),
|
|
13868
|
+
border: BorderSchema5.optional(),
|
|
13869
|
+
shadow: DropShadowSchema5.optional()
|
|
13870
|
+
});
|
|
13871
|
+
var CarouselLayerSchema5 = external_exports.object({
|
|
13872
|
+
...baseLayerShape5,
|
|
13873
|
+
kind: external_exports.literal("carousel"),
|
|
13874
|
+
slides: external_exports.lazy(() => external_exports.array(StackLayerSchema5).min(1)),
|
|
13875
|
+
pageAlignment: external_exports.enum(["top", "center", "bottom"]).optional(),
|
|
13876
|
+
pageSpacing: external_exports.number().int().min(0).optional(),
|
|
13877
|
+
pagePeek: external_exports.number().int().min(0).max(400).optional(),
|
|
13878
|
+
openOn: external_exports.number().int().min(0).optional(),
|
|
13879
|
+
loop: external_exports.boolean().optional(),
|
|
13880
|
+
autoAdvance: external_exports.boolean().optional(),
|
|
13881
|
+
autoAdvanceMs: external_exports.number().int().min(500).max(6e4).optional(),
|
|
13882
|
+
pageControl: CarouselPageControlSchema5.optional(),
|
|
13883
|
+
style: CommonStyleSchema5.optional(),
|
|
13884
|
+
styleBreakpoints: CommonStyleBreakpointsSchema5,
|
|
13885
|
+
carouselLayoutBreakpoints: CarouselLayoutBreakpointsSchema5
|
|
13886
|
+
});
|
|
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 }),
|
|
13890
|
+
external_exports.object({ kind: external_exports.literal("sdk"), key: external_exports.string().min(1).max(128) }),
|
|
13891
|
+
external_exports.object({ kind: external_exports.literal("field"), fieldKey: external_exports.string().min(1).max(128) })
|
|
13892
|
+
]);
|
|
13893
|
+
var DecisionStringPredicateSchema5 = external_exports.discriminatedUnion("op", [
|
|
13894
|
+
external_exports.object({ op: external_exports.literal("eq"), value: external_exports.string() }),
|
|
13895
|
+
external_exports.object({ op: external_exports.literal("neq"), value: external_exports.string() }),
|
|
13896
|
+
external_exports.object({ op: external_exports.literal("contains"), value: external_exports.string() })
|
|
13897
|
+
]);
|
|
13898
|
+
var DecisionNumberPredicateSchema5 = external_exports.discriminatedUnion("op", [
|
|
13899
|
+
external_exports.object({ op: external_exports.literal("eq"), value: external_exports.number() }),
|
|
13900
|
+
external_exports.object({ op: external_exports.literal("neq"), value: external_exports.number() }),
|
|
13901
|
+
external_exports.object({ op: external_exports.literal("lt"), value: external_exports.number() }),
|
|
13902
|
+
external_exports.object({ op: external_exports.literal("lte"), value: external_exports.number() }),
|
|
13903
|
+
external_exports.object({ op: external_exports.literal("gt"), value: external_exports.number() }),
|
|
13904
|
+
external_exports.object({ op: external_exports.literal("gte"), value: external_exports.number() })
|
|
13905
|
+
]);
|
|
13906
|
+
var DecisionChoicePredicateSchema5 = external_exports.discriminatedUnion("op", [
|
|
13907
|
+
external_exports.object({ op: external_exports.literal("eq"), optionId: external_exports.string().min(1) }),
|
|
13908
|
+
external_exports.object({ op: external_exports.literal("one_of"), optionIds: external_exports.array(external_exports.string().min(1)).min(1) })
|
|
13909
|
+
]);
|
|
13910
|
+
var DecisionMultiPredicateSchema5 = external_exports.discriminatedUnion("op", [
|
|
13911
|
+
external_exports.object({
|
|
13912
|
+
op: external_exports.literal("intersects"),
|
|
13913
|
+
optionIds: external_exports.array(external_exports.string().min(1)).min(1)
|
|
13914
|
+
}),
|
|
13915
|
+
external_exports.object({
|
|
13916
|
+
op: external_exports.literal("contains_all"),
|
|
13917
|
+
optionIds: external_exports.array(external_exports.string().min(1)).min(1)
|
|
13918
|
+
}),
|
|
13919
|
+
external_exports.object({
|
|
13920
|
+
op: external_exports.literal("subset_of"),
|
|
13921
|
+
optionIds: external_exports.array(external_exports.string().min(1)).min(1)
|
|
13922
|
+
})
|
|
13923
|
+
]);
|
|
13924
|
+
var DecisionBooleanPredicateSchema5 = external_exports.discriminatedUnion("op", [
|
|
13925
|
+
external_exports.object({ op: external_exports.literal("eq"), value: external_exports.boolean() }),
|
|
13926
|
+
external_exports.object({ op: external_exports.literal("neq"), value: external_exports.boolean() })
|
|
13927
|
+
]);
|
|
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 })
|
|
13934
|
+
]);
|
|
13935
|
+
var DecisionExprSchema5 = external_exports.lazy(
|
|
13936
|
+
() => external_exports.discriminatedUnion("kind", [
|
|
13937
|
+
external_exports.object({ kind: external_exports.literal("empty") }),
|
|
13938
|
+
external_exports.object({
|
|
13939
|
+
kind: external_exports.literal("group"),
|
|
13940
|
+
op: external_exports.enum(["and", "or"]),
|
|
13941
|
+
children: external_exports.array(DecisionExprSchema5).min(1)
|
|
13942
|
+
}),
|
|
13943
|
+
external_exports.object({
|
|
13944
|
+
kind: external_exports.literal("predicate"),
|
|
13945
|
+
variable: DecisionVariableRefSchema5,
|
|
13946
|
+
predicate: DecisionPredicatePayloadSchema5
|
|
13947
|
+
})
|
|
13948
|
+
])
|
|
13949
|
+
);
|
|
13950
|
+
var CONDITIONAL_MAX_CASES5 = 16;
|
|
13951
|
+
var ConditionalCaseSchema5 = external_exports.object({
|
|
13952
|
+
id: external_exports.string().min(1).max(80),
|
|
13953
|
+
name: external_exports.string().min(1).max(80).optional(),
|
|
13954
|
+
expression: DecisionExprSchema5,
|
|
13955
|
+
rootLayerId: LayerIdSchema5
|
|
13956
|
+
});
|
|
13957
|
+
var ConditionalLayerSchema5 = external_exports.object({
|
|
13958
|
+
...baseLayerShape5,
|
|
13959
|
+
kind: external_exports.literal("conditional"),
|
|
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))
|
|
13963
|
+
});
|
|
13964
|
+
layerSchemaStore5.schema = external_exports.lazy(
|
|
13965
|
+
() => external_exports.union([
|
|
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
|
|
13998
|
+
])
|
|
13999
|
+
);
|
|
14000
|
+
var ScreenBackgroundFitSchema3 = external_exports.enum(["cover", "contain", "fill"]);
|
|
14001
|
+
var ScreenBackgroundScrimSchema3 = external_exports.object({
|
|
14002
|
+
color: ThemedColorSchema5.optional(),
|
|
14003
|
+
opacity: external_exports.number().min(0).max(1).optional()
|
|
14004
|
+
}).partial();
|
|
14005
|
+
var screenBackgroundMediaShape3 = {
|
|
14006
|
+
media: MediaReferenceSchema5.optional(),
|
|
14007
|
+
fit: ScreenBackgroundFitSchema3.optional(),
|
|
14008
|
+
opacity: external_exports.number().min(0).max(1).optional(),
|
|
14009
|
+
scrim: ScreenBackgroundScrimSchema3.optional()
|
|
14010
|
+
};
|
|
14011
|
+
var ScreenBackgroundColorFillSchema3 = external_exports.object({
|
|
14012
|
+
kind: external_exports.literal("color"),
|
|
14013
|
+
color: ThemedColorSchema5.optional(),
|
|
14014
|
+
opacity: external_exports.number().min(0).max(1).optional()
|
|
14015
|
+
});
|
|
14016
|
+
var ScreenBackgroundImageFillSchema3 = external_exports.object({
|
|
14017
|
+
kind: external_exports.literal("image"),
|
|
14018
|
+
...screenBackgroundMediaShape3
|
|
14019
|
+
});
|
|
14020
|
+
var ScreenBackgroundVideoFillSchema3 = external_exports.object({
|
|
14021
|
+
kind: external_exports.literal("video"),
|
|
14022
|
+
...screenBackgroundMediaShape3,
|
|
14023
|
+
loop: external_exports.boolean().optional(),
|
|
14024
|
+
autoPlay: external_exports.boolean().optional(),
|
|
14025
|
+
triggerLayerId: external_exports.string().min(1).optional(),
|
|
14026
|
+
onComplete: LoaderOnCompleteSchema5.optional(),
|
|
14027
|
+
audioEnabled: external_exports.boolean().optional()
|
|
14028
|
+
});
|
|
14029
|
+
var ScreenBackgroundFillSchema3 = external_exports.discriminatedUnion("kind", [
|
|
14030
|
+
ScreenBackgroundColorFillSchema3,
|
|
14031
|
+
ScreenBackgroundImageFillSchema3,
|
|
14032
|
+
ScreenBackgroundVideoFillSchema3
|
|
14033
|
+
]);
|
|
14034
|
+
var ScreenBackgroundFillPatchSchema3 = external_exports.object({
|
|
14035
|
+
color: ThemedColorSchema5.optional(),
|
|
14036
|
+
fit: ScreenBackgroundFitSchema3.optional(),
|
|
14037
|
+
opacity: external_exports.number().min(0).max(1).optional(),
|
|
14038
|
+
scrim: ScreenBackgroundScrimSchema3.optional(),
|
|
14039
|
+
loop: external_exports.boolean().optional(),
|
|
14040
|
+
autoPlay: external_exports.boolean().optional(),
|
|
14041
|
+
triggerLayerId: external_exports.string().min(1).optional(),
|
|
14042
|
+
onComplete: LoaderOnCompleteSchema5.optional(),
|
|
14043
|
+
audioEnabled: external_exports.boolean().optional()
|
|
14044
|
+
}).partial();
|
|
14045
|
+
var ScreenContainerBreakpointPatchSchema3 = external_exports.object({
|
|
14046
|
+
padding: PaddingSchema5.optional(),
|
|
14047
|
+
margin: PaddingSchema5.optional(),
|
|
14048
|
+
insetSafeArea: external_exports.boolean().optional(),
|
|
14049
|
+
backgroundFillPatch: ScreenBackgroundFillPatchSchema3.optional()
|
|
14050
|
+
}).partial();
|
|
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()
|
|
14057
|
+
}).partial().optional();
|
|
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({
|
|
14064
|
+
id: external_exports.string().min(1).max(80),
|
|
14065
|
+
/** Display label in the editor (e.g. “Engaged users”). */
|
|
14066
|
+
name: external_exports.string().min(1).max(80).optional(),
|
|
14067
|
+
expression: DecisionExprSchema5,
|
|
14068
|
+
next: FlowJumpTargetSchema4
|
|
14069
|
+
});
|
|
14070
|
+
external_exports.object({
|
|
14071
|
+
id: DecisionNodeIdSchema4,
|
|
14072
|
+
name: external_exports.string().min(1).max(80).optional(),
|
|
14073
|
+
cases: external_exports.array(DecisionCaseSchema4).min(1).max(16),
|
|
14074
|
+
elseNext: FlowJumpTargetSchema4
|
|
14075
|
+
});
|
|
14076
|
+
var ANIMATABLE_PROPERTIES3 = [
|
|
14077
|
+
"opacity",
|
|
14078
|
+
"translateX",
|
|
14079
|
+
"translateY",
|
|
14080
|
+
"scale"
|
|
14081
|
+
];
|
|
14082
|
+
var AnimatablePropertySchema3 = external_exports.enum(ANIMATABLE_PROPERTIES3);
|
|
14083
|
+
var EASING_TOKENS3 = [
|
|
14084
|
+
"linear",
|
|
14085
|
+
"ease-in",
|
|
14086
|
+
"ease-out",
|
|
14087
|
+
"ease-in-out",
|
|
14088
|
+
"standard",
|
|
14089
|
+
"emphasized"
|
|
14090
|
+
];
|
|
14091
|
+
var EasingTokenSchema3 = external_exports.enum(EASING_TOKENS3);
|
|
14092
|
+
var KeyframeSchema3 = external_exports.object({
|
|
14093
|
+
t: external_exports.number().min(0).max(1),
|
|
14094
|
+
value: external_exports.number(),
|
|
14095
|
+
/** Easing applied from this keyframe to the next; defaults to linear. */
|
|
14096
|
+
easing: EasingTokenSchema3.optional()
|
|
14097
|
+
}).strict();
|
|
14098
|
+
var KeyframeTrackSchema3 = external_exports.object({
|
|
14099
|
+
property: AnimatablePropertySchema3,
|
|
14100
|
+
keyframes: external_exports.array(KeyframeSchema3).min(2)
|
|
14101
|
+
}).strict().superRefine((track, ctx) => {
|
|
14102
|
+
let last = -Infinity;
|
|
14103
|
+
for (const k of track.keyframes) {
|
|
14104
|
+
if (k.t < last) {
|
|
14105
|
+
ctx.addIssue({
|
|
14106
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14107
|
+
message: `keyframe times must be monotonically non-decreasing on track "${track.property}"`
|
|
14108
|
+
});
|
|
14109
|
+
return;
|
|
14110
|
+
}
|
|
14111
|
+
last = k.t;
|
|
14112
|
+
}
|
|
14113
|
+
if (track.keyframes[0].t !== 0) {
|
|
14114
|
+
ctx.addIssue({
|
|
14115
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14116
|
+
message: `track "${track.property}" first keyframe must start at t=0`
|
|
14117
|
+
});
|
|
14118
|
+
}
|
|
14119
|
+
if (track.keyframes[track.keyframes.length - 1].t !== 1) {
|
|
14120
|
+
ctx.addIssue({
|
|
14121
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14122
|
+
message: `track "${track.property}" last keyframe must end at t=1`
|
|
14123
|
+
});
|
|
14124
|
+
}
|
|
14125
|
+
});
|
|
14126
|
+
var ANIMATION_TRIGGERS3 = ["mount", "stagger", "unmount"];
|
|
14127
|
+
var AnimationTriggerSchema3 = external_exports.enum(ANIMATION_TRIGGERS3);
|
|
14128
|
+
var AnimationClipSchema3 = external_exports.object({
|
|
14129
|
+
id: external_exports.string().min(1).max(64),
|
|
14130
|
+
targetLayerId: LayerIdSchema5,
|
|
14131
|
+
trigger: AnimationTriggerSchema3,
|
|
14132
|
+
/** Position in the screen's stagger order. Required when trigger is `stagger`. */
|
|
14133
|
+
staggerIndex: external_exports.number().int().min(0).max(64).optional(),
|
|
14134
|
+
/** Total clip duration in milliseconds (renderer scales 0..1 keyframes by this). */
|
|
14135
|
+
durationMs: external_exports.number().int().min(0).max(36e5),
|
|
14136
|
+
/** Pre-roll delay before the clip begins, in ms. Stagger adds on top of this. */
|
|
14137
|
+
delayMs: external_exports.number().int().min(0).max(36e5).optional(),
|
|
14138
|
+
tracks: external_exports.array(KeyframeTrackSchema3).min(1)
|
|
14139
|
+
}).strict().superRefine((clip, ctx) => {
|
|
14140
|
+
if (clip.trigger === "unmount" && clip.staggerIndex !== void 0) {
|
|
14141
|
+
ctx.addIssue({
|
|
14142
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14143
|
+
message: `clip "${clip.id}" with trigger "unmount" must not set staggerIndex`,
|
|
14144
|
+
path: ["staggerIndex"]
|
|
14145
|
+
});
|
|
14146
|
+
}
|
|
14147
|
+
if (clip.trigger === "stagger" && clip.staggerIndex === void 0) {
|
|
14148
|
+
ctx.addIssue({
|
|
14149
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14150
|
+
message: `clip "${clip.id}" with trigger "stagger" must define staggerIndex`,
|
|
14151
|
+
path: ["staggerIndex"]
|
|
14152
|
+
});
|
|
14153
|
+
}
|
|
14154
|
+
const seenProps = /* @__PURE__ */ new Set();
|
|
14155
|
+
for (const track of clip.tracks) {
|
|
14156
|
+
if (seenProps.has(track.property)) {
|
|
14157
|
+
ctx.addIssue({
|
|
14158
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14159
|
+
message: `clip "${clip.id}" has duplicate track for property "${track.property}"`
|
|
14160
|
+
});
|
|
14161
|
+
}
|
|
14162
|
+
seenProps.add(track.property);
|
|
14163
|
+
}
|
|
14164
|
+
});
|
|
14165
|
+
var ScreenStaggerSchema3 = external_exports.object({
|
|
14166
|
+
/** Per-index delay multiplier in ms. */
|
|
14167
|
+
stepMs: external_exports.number().int().min(0).max(2e3)
|
|
14168
|
+
}).strict();
|
|
14169
|
+
var ScreenNextSchema3 = external_exports.object({
|
|
14170
|
+
default: FlowJumpTargetSchema4
|
|
14171
|
+
});
|
|
14172
|
+
var ScreenRegionsSchema3 = external_exports.object({
|
|
14173
|
+
header: StackLayerSchema5.optional(),
|
|
14174
|
+
body: StackLayerSchema5,
|
|
14175
|
+
footer: StackLayerSchema5.optional()
|
|
14176
|
+
});
|
|
14177
|
+
var ScreenContainerStyleSchema3 = external_exports.object({
|
|
14178
|
+
padding: PaddingSchema5.optional(),
|
|
14179
|
+
margin: PaddingSchema5.optional(),
|
|
14180
|
+
/** When true, runtimes add device safe-area insets to shell padding (in addition to manual padding). */
|
|
14181
|
+
insetSafeArea: external_exports.boolean().optional(),
|
|
14182
|
+
backgroundFill: ScreenBackgroundFillSchema3.optional()
|
|
14183
|
+
}).partial();
|
|
14184
|
+
var ScreenSchema3 = external_exports.object({
|
|
14185
|
+
id: ScreenIdSchema5,
|
|
14186
|
+
name: external_exports.string().min(1).max(80),
|
|
14187
|
+
regions: ScreenRegionsSchema3,
|
|
14188
|
+
next: ScreenNextSchema3,
|
|
14189
|
+
/** Ordered animation clips bound to layers on this screen. */
|
|
14190
|
+
animations: external_exports.array(AnimationClipSchema3).optional(),
|
|
14191
|
+
/** Defaults for clips with `trigger: stagger`. */
|
|
14192
|
+
stagger: ScreenStaggerSchema3.optional(),
|
|
14193
|
+
/** Chrome on the outer screen container (wraps all regions). */
|
|
14194
|
+
containerStyle: ScreenContainerStyleSchema3.optional(),
|
|
14195
|
+
containerStyleBreakpoints: ScreenContainerStyleBreakpointsSchema3
|
|
14196
|
+
});
|
|
14197
|
+
|
|
14198
|
+
// ../../node_modules/@getrheo/flow-runtime/dist/index.js
|
|
14199
|
+
var findScreen = (manifest, screenId) => manifest.screens.find((s) => s.id === screenId);
|
|
14200
|
+
var BRAND_GRADIENT_PREFIX = "$brandGradient:";
|
|
14201
|
+
var brandGradientToCss = (g) => {
|
|
14202
|
+
const stops = g.stops.map((s) => `${s.color} ${(s.offset * 100).toFixed(0)}%`).join(", ");
|
|
14203
|
+
if (g.type === "linear") {
|
|
14204
|
+
const angle = g.angle ?? 180;
|
|
14205
|
+
return `linear-gradient(${angle}deg, ${stops})`;
|
|
11986
14206
|
}
|
|
11987
14207
|
return `radial-gradient(circle, ${stops})`;
|
|
11988
14208
|
};
|
|
@@ -12253,7 +14473,7 @@ var validatePublishable = (manifest) => {
|
|
|
12253
14473
|
return { ok: issues.length === 0, issues, warnings };
|
|
12254
14474
|
};
|
|
12255
14475
|
var isManualSubmitKind = (kind) => MANUAL_SUBMIT_INPUT_KINDS.includes(kind);
|
|
12256
|
-
var
|
|
14476
|
+
var FIELD_KEY_RE7 = /^[a-z][a-z0-9_]*$/;
|
|
12257
14477
|
var styleBucketHasColor = (s) => s !== void 0 && s.color !== void 0;
|
|
12258
14478
|
var textLayerHasAuthoringColor = (l) => {
|
|
12259
14479
|
if (styleBucketHasColor(l.style)) return true;
|
|
@@ -12365,7 +14585,7 @@ var collectFlowBuilderIssues = (manifest) => {
|
|
|
12365
14585
|
const label = screen.name || screen.id;
|
|
12366
14586
|
if (!key || key.length === 0) {
|
|
12367
14587
|
issues.push(`Screen "${label}" is missing a variable name (fieldKey).`);
|
|
12368
|
-
} else if (!
|
|
14588
|
+
} else if (!FIELD_KEY_RE7.test(key)) {
|
|
12369
14589
|
issues.push(
|
|
12370
14590
|
`Screen "${label}" has an invalid variable name "${key}" \u2014 use snake_case (a\u2013z, 0\u20139, _).`
|
|
12371
14591
|
);
|
|
@@ -12968,10 +15188,20 @@ var extractLiquidTemplateBodies = (s) => {
|
|
|
12968
15188
|
}
|
|
12969
15189
|
return out;
|
|
12970
15190
|
};
|
|
12971
|
-
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
|
+
};
|
|
12972
15200
|
var parseDefaultFilter = (inner) => {
|
|
12973
15201
|
const m = inner.match(/\s*\|\s*default\s*:/i);
|
|
12974
|
-
if (!m || m.index === void 0)
|
|
15202
|
+
if (!m || m.index === void 0) {
|
|
15203
|
+
return parseQuotedPipeFallback(inner) ?? { exprPart: inner.trim() };
|
|
15204
|
+
}
|
|
12975
15205
|
const exprPart = inner.slice(0, m.index).trim();
|
|
12976
15206
|
let tail = inner.slice(m.index + m[0].length).trim();
|
|
12977
15207
|
if (tail.startsWith('"')) {
|
|
@@ -13597,7 +15827,8 @@ var IMPORT_PUBLISH_INTEGRATIONS = {
|
|
|
13597
15827
|
enabled: true,
|
|
13598
15828
|
defaultPlacementId: "campaign_trigger"
|
|
13599
15829
|
},
|
|
13600
|
-
appsflyer: { enabled: false }
|
|
15830
|
+
appsflyer: { enabled: false },
|
|
15831
|
+
stripe: { enabled: true }
|
|
13601
15832
|
};
|
|
13602
15833
|
var toBlocking = (issues, fixForCode) => issues.map((issue) => ({
|
|
13603
15834
|
severity: "blocking",
|
|
@@ -13707,6 +15938,11 @@ var collectIntegrationIssues = (manifest, integrations) => {
|
|
|
13707
15938
|
`External surface "${node.name ?? node.id}" uses Superwall, but the integration is disabled. Enable it in App Settings \u2192 Integrations.`
|
|
13708
15939
|
);
|
|
13709
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
|
+
}
|
|
13710
15946
|
}
|
|
13711
15947
|
return issues.map((message) => ({
|
|
13712
15948
|
severity: "blocking",
|