@learncard/react 2.12.1 → 2.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{BoostGenericCard-71899305.js → BoostGenericCard-72cab860.js} +3 -3
- package/dist/cjs/{BoostGenericCard-71899305.js.map → BoostGenericCard-72cab860.js.map} +1 -1
- package/dist/cjs/{CertificateDisplayCard-f10b46b1.js → CertificateDisplayCard-a036cdc5.js} +20 -14
- package/dist/cjs/CertificateDisplayCard-a036cdc5.js.map +1 -0
- package/dist/cjs/{MeritBadgeDisplayCard-d50cfb5e.js → MeritBadgeDisplayCard-2e4edd20.js} +4 -4
- package/dist/cjs/MeritBadgeDisplayCard-2e4edd20.js.map +1 -0
- package/dist/cjs/{MeritBadgeSkillsCount-e46503f5.js → MeritBadgeSkillsCount-472542c1.js} +2 -2
- package/dist/cjs/{MeritBadgeSkillsCount-e46503f5.js.map → MeritBadgeSkillsCount-472542c1.js.map} +1 -1
- package/dist/cjs/{SchoolIDCard-2d3cbb2c.js → SchoolIDCard-10796199.js} +1184 -3
- package/dist/cjs/SchoolIDCard-10796199.js.map +1 -0
- package/dist/cjs/{VCCard-42479c97.js → VCCard-ebbbda88.js} +3 -3
- package/dist/cjs/{VCCard-42479c97.js.map → VCCard-ebbbda88.js.map} +1 -1
- package/dist/cjs/{VCDisplayBackFace-d1cf9f73.js → VCDisplayBackFace-13c73f23.js} +3 -3
- package/dist/cjs/{VCDisplayBackFace-d1cf9f73.js.map → VCDisplayBackFace-13c73f23.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard-cf46c224.js → VCDisplayCard-3720145a.js} +3 -3
- package/dist/cjs/{VCDisplayCard-cf46c224.js.map → VCDisplayCard-3720145a.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-4a201a8a.js → VCDisplayCard2-ae93ccd2.js} +38 -30
- package/dist/cjs/VCDisplayCard2-ae93ccd2.js.map +1 -0
- package/dist/cjs/{VCVerificationPill-6c9dcf80.js → VCVerificationPill-a1607dff.js} +2 -2
- package/dist/cjs/{VCVerificationPill-6c9dcf80.js.map → VCVerificationPill-a1607dff.js.map} +1 -1
- package/dist/cjs/{VerifierStateBadgeAndText-934239ab.js → VerifierStateBadgeAndText-5f10743e.js} +166 -107
- package/dist/cjs/VerifierStateBadgeAndText-5f10743e.js.map +1 -0
- package/dist/cjs/{credential.helpers-17a10601.js → credential.helpers-65ea507a.js} +2 -2
- package/dist/cjs/{credential.helpers-17a10601.js.map → credential.helpers-65ea507a.js.map} +1 -1
- package/dist/cjs/{i18n-8fd90b2f.js → i18n-ddbb18e7.js} +12 -1
- package/dist/cjs/{i18n-8fd90b2f.js.map → i18n-ddbb18e7.js.map} +1 -1
- package/dist/cjs/index.js +14 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index14.js +14 -15
- package/dist/cjs/index14.js.map +1 -1
- package/dist/cjs/index22.js +6 -6
- package/dist/cjs/index31.js +1 -2
- package/dist/cjs/index31.js.map +1 -1
- package/dist/cjs/index39.js +11 -12
- package/dist/cjs/index39.js.map +1 -1
- package/dist/cjs/index4.js +4 -4
- package/dist/cjs/index40.js +4 -4
- package/dist/cjs/index41.js +5 -5
- package/dist/cjs/index42.js +7 -8
- package/dist/cjs/index42.js.map +1 -1
- package/dist/cjs/index43.js +1 -1
- package/dist/cjs/index46.js +2 -2
- package/dist/cjs/index7.js +5 -4
- package/dist/cjs/index7.js.map +1 -1
- package/dist/cjs/{types.esm-73624b33.js → types.esm-50b3eecd.js} +46 -3
- package/dist/cjs/types.esm-50b3eecd.js.map +1 -0
- package/dist/esm/{BoostGenericCard-3b3ff784.js → BoostGenericCard-2f586072.js} +3 -3
- package/dist/esm/{BoostGenericCard-3b3ff784.js.map → BoostGenericCard-2f586072.js.map} +1 -1
- package/dist/esm/{CertificateDisplayCard-f26ef278.js → CertificateDisplayCard-ff1ae869.js} +20 -14
- package/dist/esm/CertificateDisplayCard-ff1ae869.js.map +1 -0
- package/dist/esm/{MeritBadgeDisplayCard-0d0b28c7.js → MeritBadgeDisplayCard-b8b904d2.js} +4 -4
- package/dist/esm/MeritBadgeDisplayCard-b8b904d2.js.map +1 -0
- package/dist/esm/{MeritBadgeSkillsCount-09e211fc.js → MeritBadgeSkillsCount-46d9c24b.js} +2 -2
- package/dist/esm/{MeritBadgeSkillsCount-09e211fc.js.map → MeritBadgeSkillsCount-46d9c24b.js.map} +1 -1
- package/dist/esm/{SchoolIDCard-fbd1cf6c.js → SchoolIDCard-f82e40bc.js} +1183 -2
- package/dist/esm/SchoolIDCard-f82e40bc.js.map +1 -0
- package/dist/esm/{VCCard-7e5e00d7.js → VCCard-e2ebb922.js} +3 -3
- package/dist/esm/{VCCard-7e5e00d7.js.map → VCCard-e2ebb922.js.map} +1 -1
- package/dist/esm/{VCDisplayBackFace-ae74476d.js → VCDisplayBackFace-4f2d700d.js} +3 -3
- package/dist/esm/{VCDisplayBackFace-ae74476d.js.map → VCDisplayBackFace-4f2d700d.js.map} +1 -1
- package/dist/esm/{VCDisplayCard-ac1f367a.js → VCDisplayCard-32e126f8.js} +3 -3
- package/dist/esm/{VCDisplayCard-ac1f367a.js.map → VCDisplayCard-32e126f8.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-7011596e.js → VCDisplayCard2-ec2177de.js} +38 -30
- package/dist/esm/VCDisplayCard2-ec2177de.js.map +1 -0
- package/dist/esm/{VCVerificationPill-04ffdf56.js → VCVerificationPill-0c336075.js} +2 -2
- package/dist/esm/{VCVerificationPill-04ffdf56.js.map → VCVerificationPill-0c336075.js.map} +1 -1
- package/dist/esm/{VerifierStateBadgeAndText-750a6c24.js → VerifierStateBadgeAndText-0a4e0c63.js} +167 -108
- package/dist/esm/VerifierStateBadgeAndText-0a4e0c63.js.map +1 -0
- package/dist/esm/{credential.helpers-4fbdd8e8.js → credential.helpers-61005784.js} +2 -2
- package/dist/esm/{credential.helpers-4fbdd8e8.js.map → credential.helpers-61005784.js.map} +1 -1
- package/dist/esm/{i18n-08b606cb.js → i18n-35209bfa.js} +12 -1
- package/dist/esm/{i18n-08b606cb.js.map → i18n-35209bfa.js.map} +1 -1
- package/dist/esm/index.js +14 -15
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index14.js +14 -15
- package/dist/esm/index14.js.map +1 -1
- package/dist/esm/index22.js +6 -6
- package/dist/esm/index31.js +1 -2
- package/dist/esm/index31.js.map +1 -1
- package/dist/esm/index39.js +11 -12
- package/dist/esm/index39.js.map +1 -1
- package/dist/esm/index4.js +4 -4
- package/dist/esm/index40.js +4 -4
- package/dist/esm/index41.js +5 -5
- package/dist/esm/index42.js +7 -8
- package/dist/esm/index42.js.map +1 -1
- package/dist/esm/index43.js +1 -1
- package/dist/esm/index46.js +2 -2
- package/dist/esm/index7.js +5 -4
- package/dist/esm/index7.js.map +1 -1
- package/dist/esm/{types.esm-5f75bd4a.js → types.esm-2762569e.js} +42 -4
- package/dist/esm/types.esm-2762569e.js.map +1 -0
- package/dist/index.d.ts +20 -2
- package/dist/main.css +1 -1
- package/dist/main.js +1 -1
- package/package.json +6 -10
- package/src/assets/styles/main.css +24 -18
- package/src/components/CertificateDisplayCard/AlignmentRow.tsx +4 -2
- package/src/components/CertificateDisplayCard/AlignmentsBox.tsx +12 -9
- package/src/components/CertificateDisplayCard/InfoBox.tsx +3 -1
- package/src/components/CertificateDisplayCard/VerifierStateBadgeAndText.tsx +10 -6
- package/src/components/CircleIcon/__tests__/CircleIcon.test.tsx +1 -1
- package/src/components/MeritBadgeDisplayCard/MediaAttachmentsBox.tsx +3 -2
- package/src/components/VCDisplayCard2/InfoBox.tsx +3 -1
- package/src/components/VCDisplayCard2/TruncateTextBox.tsx +4 -2
- package/src/components/VCDisplayCard2/VC2BackFace.tsx +6 -4
- package/src/components/VCDisplayCard2/VC2FrontFaceInfo.tsx +22 -22
- package/src/components/VCDisplayCard2/VCDisplayCard2.tsx +10 -2
- package/src/components/VCDisplayCard2/__tests__/VC2LocalizedLabels.test.tsx +122 -0
- package/src/helpers/credential.helpers.test.ts +1 -1
- package/src/i18n/index.tsx +12 -0
- package/dist/cjs/CertificateDisplayCard-f10b46b1.js.map +0 -1
- package/dist/cjs/MeritBadgeDisplayCard-d50cfb5e.js.map +0 -1
- package/dist/cjs/SchoolIDCard-2d3cbb2c.js.map +0 -1
- package/dist/cjs/VCDisplayCard2-4a201a8a.js.map +0 -1
- package/dist/cjs/VerifierStateBadgeAndText-934239ab.js.map +0 -1
- package/dist/cjs/index-47efbf5b.js +0 -1186
- package/dist/cjs/index-47efbf5b.js.map +0 -1
- package/dist/cjs/types.esm-73624b33.js.map +0 -1
- package/dist/esm/CertificateDisplayCard-f26ef278.js.map +0 -1
- package/dist/esm/MeritBadgeDisplayCard-0d0b28c7.js.map +0 -1
- package/dist/esm/SchoolIDCard-fbd1cf6c.js.map +0 -1
- package/dist/esm/VCDisplayCard2-7011596e.js.map +0 -1
- package/dist/esm/VerifierStateBadgeAndText-750a6c24.js.map +0 -1
- package/dist/esm/index-cbd2e9db.js +0 -1184
- package/dist/esm/index-cbd2e9db.js.map +0 -1
- package/dist/esm/types.esm-5f75bd4a.js.map +0 -1
package/dist/esm/{VerifierStateBadgeAndText-750a6c24.js → VerifierStateBadgeAndText-0a4e0c63.js}
RENAMED
|
@@ -9,7 +9,8 @@ import Social from './social.png';
|
|
|
9
9
|
import Stem from './stem.png';
|
|
10
10
|
import Trade from './trade.png';
|
|
11
11
|
import { P as PuzzlePiece } from './PuzzlePiece-a3d9cc62.js';
|
|
12
|
-
import { o as object, l as literal, n as number, s as string, u as union } from './types.esm-
|
|
12
|
+
import { _ as _coercedNumber, Z as ZodNumber, o as object, l as literal, n as number$1, s as string, u as union, p as preprocess, a as url, b as _enum } from './types.esm-2762569e.js';
|
|
13
|
+
import { u as useT } from './i18n-35209bfa.js';
|
|
13
14
|
|
|
14
15
|
const AcuteCheckmark = ({ className = "" }) => {
|
|
15
16
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -419,6 +420,10 @@ const VideoIcon = ({ className = "", size = "25" }) => {
|
|
|
419
420
|
);
|
|
420
421
|
};
|
|
421
422
|
|
|
423
|
+
function number(params) {
|
|
424
|
+
return _coercedNumber(ZodNumber, params);
|
|
425
|
+
}
|
|
426
|
+
|
|
422
427
|
const capitalize = (string) => {
|
|
423
428
|
return string ? string[0].toUpperCase() + string.slice(1) : "";
|
|
424
429
|
};
|
|
@@ -3146,12 +3151,11 @@ var produce = immer.produce;
|
|
|
3146
3151
|
*
|
|
3147
3152
|
* @author Dan Kogai (https://github.com/dankogai)
|
|
3148
3153
|
*/
|
|
3149
|
-
const version = '3.
|
|
3154
|
+
const version = '3.9.3';
|
|
3150
3155
|
/**
|
|
3151
3156
|
* @deprecated use lowercase `version`.
|
|
3152
3157
|
*/
|
|
3153
3158
|
const VERSION = version;
|
|
3154
|
-
const _hasBuffer = typeof Buffer === 'function';
|
|
3155
3159
|
const _TD = typeof TextDecoder === 'function' ? new TextDecoder('utf-8', { ignoreBOM: true }) : undefined;
|
|
3156
3160
|
const _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;
|
|
3157
3161
|
const b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
@@ -3195,10 +3199,8 @@ const btoaPolyfill = (bin) => {
|
|
|
3195
3199
|
* @returns {string} Base64-encoded string
|
|
3196
3200
|
*/
|
|
3197
3201
|
const _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)
|
|
3198
|
-
:
|
|
3199
|
-
|
|
3200
|
-
const _fromUint8Array = _hasBuffer
|
|
3201
|
-
? (u8a) => Buffer.from(u8a).toString('base64')
|
|
3202
|
+
: btoaPolyfill;
|
|
3203
|
+
const _fromUint8Array = typeof Uint8Array.prototype.toBase64 === 'function' ? (u8a) => u8a.toBase64()
|
|
3202
3204
|
: (u8a) => {
|
|
3203
3205
|
// cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326
|
|
3204
3206
|
const maxargs = 0x1000;
|
|
@@ -3237,7 +3239,7 @@ const cb_utob = (c) => {
|
|
|
3237
3239
|
+ _fromCC(0x80 | (cc & 0x3f)));
|
|
3238
3240
|
}
|
|
3239
3241
|
};
|
|
3240
|
-
const re_utob = /[\uD800-\uDBFF][\uDC00-\
|
|
3242
|
+
const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\x00-\x7F]/g;
|
|
3241
3243
|
/**
|
|
3242
3244
|
* @deprecated should have been internal use only.
|
|
3243
3245
|
* @param {string} src UTF-8 string
|
|
@@ -3245,11 +3247,9 @@ const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
|
3245
3247
|
*/
|
|
3246
3248
|
const utob = (u) => u.replace(re_utob, cb_utob);
|
|
3247
3249
|
//
|
|
3248
|
-
const _encode =
|
|
3249
|
-
? (s) =>
|
|
3250
|
-
:
|
|
3251
|
-
? (s) => _fromUint8Array(_TE.encode(s))
|
|
3252
|
-
: (s) => _btoa(utob(s));
|
|
3250
|
+
const _encode = _TE
|
|
3251
|
+
? (s) => _fromUint8Array(_TE.encode(s))
|
|
3252
|
+
: (s) => _btoa(utob(s));
|
|
3253
3253
|
/**
|
|
3254
3254
|
* converts a UTF-8-encoded string to a Base64 string.
|
|
3255
3255
|
* @param {boolean} [urlsafe] if `true` make the result URL-safe
|
|
@@ -3325,22 +3325,18 @@ const atobPolyfill = (asc) => {
|
|
|
3325
3325
|
* @returns {string} binary string
|
|
3326
3326
|
*/
|
|
3327
3327
|
const _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))
|
|
3328
|
-
:
|
|
3329
|
-
: atobPolyfill;
|
|
3328
|
+
: atobPolyfill;
|
|
3330
3329
|
//
|
|
3331
|
-
const _toUint8Array =
|
|
3332
|
-
? (a) => _U8Afrom(
|
|
3333
|
-
: (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));
|
|
3330
|
+
const _toUint8Array = typeof Uint8Array.fromBase64 === 'function'
|
|
3331
|
+
? (a) => Uint8Array.fromBase64(a) : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));
|
|
3334
3332
|
/**
|
|
3335
3333
|
* converts a Base64 string to a Uint8Array.
|
|
3336
3334
|
*/
|
|
3337
3335
|
const toUint8Array = (a) => _toUint8Array(_unURI(a));
|
|
3338
3336
|
//
|
|
3339
|
-
const _decode =
|
|
3340
|
-
? (a) =>
|
|
3341
|
-
:
|
|
3342
|
-
? (a) => _TD.decode(_toUint8Array(a))
|
|
3343
|
-
: (a) => btou(_atob(a));
|
|
3337
|
+
const _decode = _TD
|
|
3338
|
+
? (a) => _TD.decode(_toUint8Array(a))
|
|
3339
|
+
: (a) => btou(_atob(a));
|
|
3344
3340
|
const _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));
|
|
3345
3341
|
/**
|
|
3346
3342
|
* converts a Base64 string to a UTF-8 string.
|
|
@@ -3468,6 +3464,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3468
3464
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
3469
3465
|
});
|
|
3470
3466
|
};
|
|
3467
|
+
var _a;
|
|
3471
3468
|
var __create = Object.create;
|
|
3472
3469
|
var __defProp2 = Object.defineProperty;
|
|
3473
3470
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -3663,6 +3660,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
3663
3660
|
LCNBoostClaimLinkSigningAuthorityValidator: /* @__PURE__ */ __name(() => LCNBoostClaimLinkSigningAuthorityValidator, "LCNBoostClaimLinkSigningAuthorityValidator"),
|
|
3664
3661
|
LCNBoostStatus: /* @__PURE__ */ __name(() => LCNBoostStatus, "LCNBoostStatus"),
|
|
3665
3662
|
LCNConnectionProfileValidator: /* @__PURE__ */ __name(() => LCNConnectionProfileValidator, "LCNConnectionProfileValidator"),
|
|
3663
|
+
LCNConnectionPromptActionResultValidator: /* @__PURE__ */ __name(() => LCNConnectionPromptActionResultValidator, "LCNConnectionPromptActionResultValidator"),
|
|
3664
|
+
LCNConnectionPromptActionStatusValidator: /* @__PURE__ */ __name(() => LCNConnectionPromptActionStatusValidator, "LCNConnectionPromptActionStatusValidator"),
|
|
3665
|
+
LCNConnectionPromptMetadataValidator: /* @__PURE__ */ __name(() => LCNConnectionPromptMetadataValidator, "LCNConnectionPromptMetadataValidator"),
|
|
3666
|
+
LCNConnectionPromptStatusValidator: /* @__PURE__ */ __name(() => LCNConnectionPromptStatusValidator, "LCNConnectionPromptStatusValidator"),
|
|
3667
|
+
LCNConnectionPromptSurfaceValidator: /* @__PURE__ */ __name(() => LCNConnectionPromptSurfaceValidator, "LCNConnectionPromptSurfaceValidator"),
|
|
3668
|
+
LCNConnectionPromptValidator: /* @__PURE__ */ __name(() => LCNConnectionPromptValidator, "LCNConnectionPromptValidator"),
|
|
3666
3669
|
LCNDomainOrOriginValidator: /* @__PURE__ */ __name(() => LCNDomainOrOriginValidator, "LCNDomainOrOriginValidator"),
|
|
3667
3670
|
LCNInboxContactMethodValidator: /* @__PURE__ */ __name(() => LCNInboxContactMethodValidator, "LCNInboxContactMethodValidator"),
|
|
3668
3671
|
LCNInboxStatusEnumValidator: /* @__PURE__ */ __name(() => LCNInboxStatusEnumValidator, "LCNInboxStatusEnumValidator"),
|
|
@@ -3674,6 +3677,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
3674
3677
|
LCNNotificationDataValidator: /* @__PURE__ */ __name(() => LCNNotificationDataValidator, "LCNNotificationDataValidator"),
|
|
3675
3678
|
LCNNotificationInboxValidator: /* @__PURE__ */ __name(() => LCNNotificationInboxValidator, "LCNNotificationInboxValidator"),
|
|
3676
3679
|
LCNNotificationMessageValidator: /* @__PURE__ */ __name(() => LCNNotificationMessageValidator, "LCNNotificationMessageValidator"),
|
|
3680
|
+
LCNNotificationMetadataValidator: /* @__PURE__ */ __name(() => LCNNotificationMetadataValidator, "LCNNotificationMetadataValidator"),
|
|
3677
3681
|
LCNNotificationTypeEnumValidator: /* @__PURE__ */ __name(() => LCNNotificationTypeEnumValidator, "LCNNotificationTypeEnumValidator"),
|
|
3678
3682
|
LCNNotificationValidator: /* @__PURE__ */ __name(() => LCNNotificationValidator, "LCNNotificationValidator"),
|
|
3679
3683
|
LCNProfileConnectionStatusEnum: /* @__PURE__ */ __name(() => LCNProfileConnectionStatusEnum, "LCNProfileConnectionStatusEnum"),
|
|
@@ -4322,7 +4326,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
4322
4326
|
util: /* @__PURE__ */ __name(() => util_exports, "util"),
|
|
4323
4327
|
version: /* @__PURE__ */ __name(() => version, "version")
|
|
4324
4328
|
});
|
|
4325
|
-
var
|
|
4329
|
+
var _a2;
|
|
4326
4330
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
4327
4331
|
status: "aborted"
|
|
4328
4332
|
});
|
|
@@ -4402,7 +4406,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
4402
4406
|
this.name = "ZodEncodeError";
|
|
4403
4407
|
}
|
|
4404
4408
|
}, __name(_b, "$ZodEncodeError"), __name2(_b, "$ZodEncodeError"), _b);
|
|
4405
|
-
(_c = (
|
|
4409
|
+
(_c = (_a2 = globalThis).__zod_globalConfig) != null ? _c : _a2.__zod_globalConfig = {};
|
|
4406
4410
|
var globalConfig = globalThis.__zod_globalConfig;
|
|
4407
4411
|
function config(newConfig) {
|
|
4408
4412
|
if (newConfig)
|
|
@@ -14594,7 +14598,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
14594
14598
|
}
|
|
14595
14599
|
__name(yo_default, "yo_default");
|
|
14596
14600
|
__name2(yo_default, "default");
|
|
14597
|
-
var
|
|
14601
|
+
var _a22;
|
|
14598
14602
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
14599
14603
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
14600
14604
|
var $ZodRegistry = (_f = class {
|
|
@@ -14643,7 +14647,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
14643
14647
|
}
|
|
14644
14648
|
__name(registry, "registry");
|
|
14645
14649
|
__name2(registry, "registry");
|
|
14646
|
-
(_g = (
|
|
14650
|
+
(_g = (_a22 = globalThis).__zod_globalRegistry) != null ? _g : _a22.__zod_globalRegistry = registry();
|
|
14647
14651
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
14648
14652
|
// @__NO_SIDE_EFFECTS__
|
|
14649
14653
|
function _string(Class2, params) {
|
|
@@ -18608,7 +18612,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18608
18612
|
var ZodFirstPartyTypeKind;
|
|
18609
18613
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
18610
18614
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
18611
|
-
var
|
|
18615
|
+
var z3 = __spreadProps(__spreadValues(__spreadValues({}, schemas_exports2), checks_exports2), {
|
|
18612
18616
|
iso: iso_exports
|
|
18613
18617
|
});
|
|
18614
18618
|
var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -18720,7 +18724,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18720
18724
|
function convertBaseSchema(schema, ctx) {
|
|
18721
18725
|
if (schema.not !== void 0) {
|
|
18722
18726
|
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
18723
|
-
return
|
|
18727
|
+
return z3.never();
|
|
18724
18728
|
}
|
|
18725
18729
|
throw new Error("not is not supported in Zod (except { not: {} } for never)");
|
|
18726
18730
|
}
|
|
@@ -18742,7 +18746,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18742
18746
|
return ctx.refs.get(refPath);
|
|
18743
18747
|
}
|
|
18744
18748
|
if (ctx.processing.has(refPath)) {
|
|
18745
|
-
return
|
|
18749
|
+
return z3.lazy(() => {
|
|
18746
18750
|
if (!ctx.refs.has(refPath)) {
|
|
18747
18751
|
throw new Error(`Circular reference not resolved: ${refPath}`);
|
|
18748
18752
|
}
|
|
@@ -18759,25 +18763,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18759
18763
|
if (schema.enum !== void 0) {
|
|
18760
18764
|
const enumValues = schema.enum;
|
|
18761
18765
|
if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
|
|
18762
|
-
return
|
|
18766
|
+
return z3.null();
|
|
18763
18767
|
}
|
|
18764
18768
|
if (enumValues.length === 0) {
|
|
18765
|
-
return
|
|
18769
|
+
return z3.never();
|
|
18766
18770
|
}
|
|
18767
18771
|
if (enumValues.length === 1) {
|
|
18768
|
-
return
|
|
18772
|
+
return z3.literal(enumValues[0]);
|
|
18769
18773
|
}
|
|
18770
18774
|
if (enumValues.every((v) => typeof v === "string")) {
|
|
18771
|
-
return
|
|
18775
|
+
return z3.enum(enumValues);
|
|
18772
18776
|
}
|
|
18773
|
-
const literalSchemas = enumValues.map((v) =>
|
|
18777
|
+
const literalSchemas = enumValues.map((v) => z3.literal(v));
|
|
18774
18778
|
if (literalSchemas.length < 2) {
|
|
18775
18779
|
return literalSchemas[0];
|
|
18776
18780
|
}
|
|
18777
|
-
return
|
|
18781
|
+
return z3.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
|
|
18778
18782
|
}
|
|
18779
18783
|
if (schema.const !== void 0) {
|
|
18780
|
-
return
|
|
18784
|
+
return z3.literal(schema.const);
|
|
18781
18785
|
}
|
|
18782
18786
|
const type = schema.type;
|
|
18783
18787
|
if (Array.isArray(type)) {
|
|
@@ -18786,68 +18790,68 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18786
18790
|
return convertBaseSchema(typeSchema, ctx);
|
|
18787
18791
|
});
|
|
18788
18792
|
if (typeSchemas.length === 0) {
|
|
18789
|
-
return
|
|
18793
|
+
return z3.never();
|
|
18790
18794
|
}
|
|
18791
18795
|
if (typeSchemas.length === 1) {
|
|
18792
18796
|
return typeSchemas[0];
|
|
18793
18797
|
}
|
|
18794
|
-
return
|
|
18798
|
+
return z3.union(typeSchemas);
|
|
18795
18799
|
}
|
|
18796
18800
|
if (!type) {
|
|
18797
|
-
return
|
|
18801
|
+
return z3.any();
|
|
18798
18802
|
}
|
|
18799
18803
|
let zodSchema;
|
|
18800
18804
|
switch (type) {
|
|
18801
18805
|
case "string": {
|
|
18802
|
-
let stringSchema =
|
|
18806
|
+
let stringSchema = z3.string();
|
|
18803
18807
|
if (schema.format) {
|
|
18804
18808
|
const format = schema.format;
|
|
18805
18809
|
if (format === "email") {
|
|
18806
|
-
stringSchema = stringSchema.check(
|
|
18810
|
+
stringSchema = stringSchema.check(z3.email());
|
|
18807
18811
|
} else if (format === "uri" || format === "uri-reference") {
|
|
18808
|
-
stringSchema = stringSchema.check(
|
|
18812
|
+
stringSchema = stringSchema.check(z3.url());
|
|
18809
18813
|
} else if (format === "uuid" || format === "guid") {
|
|
18810
|
-
stringSchema = stringSchema.check(
|
|
18814
|
+
stringSchema = stringSchema.check(z3.uuid());
|
|
18811
18815
|
} else if (format === "date-time") {
|
|
18812
|
-
stringSchema = stringSchema.check(
|
|
18816
|
+
stringSchema = stringSchema.check(z3.iso.datetime());
|
|
18813
18817
|
} else if (format === "date") {
|
|
18814
|
-
stringSchema = stringSchema.check(
|
|
18818
|
+
stringSchema = stringSchema.check(z3.iso.date());
|
|
18815
18819
|
} else if (format === "time") {
|
|
18816
|
-
stringSchema = stringSchema.check(
|
|
18820
|
+
stringSchema = stringSchema.check(z3.iso.time());
|
|
18817
18821
|
} else if (format === "duration") {
|
|
18818
|
-
stringSchema = stringSchema.check(
|
|
18822
|
+
stringSchema = stringSchema.check(z3.iso.duration());
|
|
18819
18823
|
} else if (format === "ipv4") {
|
|
18820
|
-
stringSchema = stringSchema.check(
|
|
18824
|
+
stringSchema = stringSchema.check(z3.ipv4());
|
|
18821
18825
|
} else if (format === "ipv6") {
|
|
18822
|
-
stringSchema = stringSchema.check(
|
|
18826
|
+
stringSchema = stringSchema.check(z3.ipv6());
|
|
18823
18827
|
} else if (format === "mac") {
|
|
18824
|
-
stringSchema = stringSchema.check(
|
|
18828
|
+
stringSchema = stringSchema.check(z3.mac());
|
|
18825
18829
|
} else if (format === "cidr") {
|
|
18826
|
-
stringSchema = stringSchema.check(
|
|
18830
|
+
stringSchema = stringSchema.check(z3.cidrv4());
|
|
18827
18831
|
} else if (format === "cidr-v6") {
|
|
18828
|
-
stringSchema = stringSchema.check(
|
|
18832
|
+
stringSchema = stringSchema.check(z3.cidrv6());
|
|
18829
18833
|
} else if (format === "base64") {
|
|
18830
|
-
stringSchema = stringSchema.check(
|
|
18834
|
+
stringSchema = stringSchema.check(z3.base64());
|
|
18831
18835
|
} else if (format === "base64url") {
|
|
18832
|
-
stringSchema = stringSchema.check(
|
|
18836
|
+
stringSchema = stringSchema.check(z3.base64url());
|
|
18833
18837
|
} else if (format === "e164") {
|
|
18834
|
-
stringSchema = stringSchema.check(
|
|
18838
|
+
stringSchema = stringSchema.check(z3.e164());
|
|
18835
18839
|
} else if (format === "jwt") {
|
|
18836
|
-
stringSchema = stringSchema.check(
|
|
18840
|
+
stringSchema = stringSchema.check(z3.jwt());
|
|
18837
18841
|
} else if (format === "emoji") {
|
|
18838
|
-
stringSchema = stringSchema.check(
|
|
18842
|
+
stringSchema = stringSchema.check(z3.emoji());
|
|
18839
18843
|
} else if (format === "nanoid") {
|
|
18840
|
-
stringSchema = stringSchema.check(
|
|
18844
|
+
stringSchema = stringSchema.check(z3.nanoid());
|
|
18841
18845
|
} else if (format === "cuid") {
|
|
18842
|
-
stringSchema = stringSchema.check(
|
|
18846
|
+
stringSchema = stringSchema.check(z3.cuid());
|
|
18843
18847
|
} else if (format === "cuid2") {
|
|
18844
|
-
stringSchema = stringSchema.check(
|
|
18848
|
+
stringSchema = stringSchema.check(z3.cuid2());
|
|
18845
18849
|
} else if (format === "ulid") {
|
|
18846
|
-
stringSchema = stringSchema.check(
|
|
18850
|
+
stringSchema = stringSchema.check(z3.ulid());
|
|
18847
18851
|
} else if (format === "xid") {
|
|
18848
|
-
stringSchema = stringSchema.check(
|
|
18852
|
+
stringSchema = stringSchema.check(z3.xid());
|
|
18849
18853
|
} else if (format === "ksuid") {
|
|
18850
|
-
stringSchema = stringSchema.check(
|
|
18854
|
+
stringSchema = stringSchema.check(z3.ksuid());
|
|
18851
18855
|
}
|
|
18852
18856
|
}
|
|
18853
18857
|
if (typeof schema.minLength === "number") {
|
|
@@ -18864,7 +18868,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18864
18868
|
}
|
|
18865
18869
|
case "number":
|
|
18866
18870
|
case "integer": {
|
|
18867
|
-
let numberSchema = type === "integer" ?
|
|
18871
|
+
let numberSchema = type === "integer" ? z3.number().int() : z3.number();
|
|
18868
18872
|
if (typeof schema.minimum === "number") {
|
|
18869
18873
|
numberSchema = numberSchema.min(schema.minimum);
|
|
18870
18874
|
}
|
|
@@ -18888,11 +18892,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18888
18892
|
break;
|
|
18889
18893
|
}
|
|
18890
18894
|
case "boolean": {
|
|
18891
|
-
zodSchema =
|
|
18895
|
+
zodSchema = z3.boolean();
|
|
18892
18896
|
break;
|
|
18893
18897
|
}
|
|
18894
18898
|
case "null": {
|
|
18895
|
-
zodSchema =
|
|
18899
|
+
zodSchema = z3.null();
|
|
18896
18900
|
break;
|
|
18897
18901
|
}
|
|
18898
18902
|
case "object": {
|
|
@@ -18905,14 +18909,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18905
18909
|
}
|
|
18906
18910
|
if (schema.propertyNames) {
|
|
18907
18911
|
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
18908
|
-
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) :
|
|
18912
|
+
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z3.any();
|
|
18909
18913
|
if (Object.keys(shape).length === 0) {
|
|
18910
|
-
zodSchema =
|
|
18914
|
+
zodSchema = z3.record(keySchema, valueSchema);
|
|
18911
18915
|
break;
|
|
18912
18916
|
}
|
|
18913
|
-
const objectSchema2 =
|
|
18914
|
-
const recordSchema =
|
|
18915
|
-
zodSchema =
|
|
18917
|
+
const objectSchema2 = z3.object(shape).passthrough();
|
|
18918
|
+
const recordSchema = z3.looseRecord(keySchema, valueSchema);
|
|
18919
|
+
zodSchema = z3.intersection(objectSchema2, recordSchema);
|
|
18916
18920
|
break;
|
|
18917
18921
|
}
|
|
18918
18922
|
if (schema.patternProperties) {
|
|
@@ -18921,28 +18925,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18921
18925
|
const looseRecords = [];
|
|
18922
18926
|
for (const pattern of patternKeys) {
|
|
18923
18927
|
const patternValue = convertSchema(patternProps[pattern], ctx);
|
|
18924
|
-
const keySchema =
|
|
18925
|
-
looseRecords.push(
|
|
18928
|
+
const keySchema = z3.string().regex(new RegExp(pattern));
|
|
18929
|
+
looseRecords.push(z3.looseRecord(keySchema, patternValue));
|
|
18926
18930
|
}
|
|
18927
18931
|
const schemasToIntersect = [];
|
|
18928
18932
|
if (Object.keys(shape).length > 0) {
|
|
18929
|
-
schemasToIntersect.push(
|
|
18933
|
+
schemasToIntersect.push(z3.object(shape).passthrough());
|
|
18930
18934
|
}
|
|
18931
18935
|
schemasToIntersect.push(...looseRecords);
|
|
18932
18936
|
if (schemasToIntersect.length === 0) {
|
|
18933
|
-
zodSchema =
|
|
18937
|
+
zodSchema = z3.object({}).passthrough();
|
|
18934
18938
|
} else if (schemasToIntersect.length === 1) {
|
|
18935
18939
|
zodSchema = schemasToIntersect[0];
|
|
18936
18940
|
} else {
|
|
18937
|
-
let result =
|
|
18941
|
+
let result = z3.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
18938
18942
|
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
18939
|
-
result =
|
|
18943
|
+
result = z3.intersection(result, schemasToIntersect[i]);
|
|
18940
18944
|
}
|
|
18941
18945
|
zodSchema = result;
|
|
18942
18946
|
}
|
|
18943
18947
|
break;
|
|
18944
18948
|
}
|
|
18945
|
-
const objectSchema =
|
|
18949
|
+
const objectSchema = z3.object(shape);
|
|
18946
18950
|
if (schema.additionalProperties === false) {
|
|
18947
18951
|
zodSchema = objectSchema.strict();
|
|
18948
18952
|
} else if (typeof schema.additionalProperties === "object") {
|
|
@@ -18959,33 +18963,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18959
18963
|
const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
|
|
18960
18964
|
const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
|
|
18961
18965
|
if (rest) {
|
|
18962
|
-
zodSchema =
|
|
18966
|
+
zodSchema = z3.tuple(tupleItems).rest(rest);
|
|
18963
18967
|
} else {
|
|
18964
|
-
zodSchema =
|
|
18968
|
+
zodSchema = z3.tuple(tupleItems);
|
|
18965
18969
|
}
|
|
18966
18970
|
if (typeof schema.minItems === "number") {
|
|
18967
|
-
zodSchema = zodSchema.check(
|
|
18971
|
+
zodSchema = zodSchema.check(z3.minLength(schema.minItems));
|
|
18968
18972
|
}
|
|
18969
18973
|
if (typeof schema.maxItems === "number") {
|
|
18970
|
-
zodSchema = zodSchema.check(
|
|
18974
|
+
zodSchema = zodSchema.check(z3.maxLength(schema.maxItems));
|
|
18971
18975
|
}
|
|
18972
18976
|
} else if (Array.isArray(items)) {
|
|
18973
18977
|
const tupleItems = items.map((item) => convertSchema(item, ctx));
|
|
18974
18978
|
const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
|
|
18975
18979
|
if (rest) {
|
|
18976
|
-
zodSchema =
|
|
18980
|
+
zodSchema = z3.tuple(tupleItems).rest(rest);
|
|
18977
18981
|
} else {
|
|
18978
|
-
zodSchema =
|
|
18982
|
+
zodSchema = z3.tuple(tupleItems);
|
|
18979
18983
|
}
|
|
18980
18984
|
if (typeof schema.minItems === "number") {
|
|
18981
|
-
zodSchema = zodSchema.check(
|
|
18985
|
+
zodSchema = zodSchema.check(z3.minLength(schema.minItems));
|
|
18982
18986
|
}
|
|
18983
18987
|
if (typeof schema.maxItems === "number") {
|
|
18984
|
-
zodSchema = zodSchema.check(
|
|
18988
|
+
zodSchema = zodSchema.check(z3.maxLength(schema.maxItems));
|
|
18985
18989
|
}
|
|
18986
18990
|
} else if (items !== void 0) {
|
|
18987
18991
|
const element = convertSchema(items, ctx);
|
|
18988
|
-
let arraySchema =
|
|
18992
|
+
let arraySchema = z3.array(element);
|
|
18989
18993
|
if (typeof schema.minItems === "number") {
|
|
18990
18994
|
arraySchema = arraySchema.min(schema.minItems);
|
|
18991
18995
|
}
|
|
@@ -18994,7 +18998,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18994
18998
|
}
|
|
18995
18999
|
zodSchema = arraySchema;
|
|
18996
19000
|
} else {
|
|
18997
|
-
zodSchema =
|
|
19001
|
+
zodSchema = z3.array(z3.any());
|
|
18998
19002
|
}
|
|
18999
19003
|
break;
|
|
19000
19004
|
}
|
|
@@ -19007,37 +19011,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19007
19011
|
__name2(convertBaseSchema, "convertBaseSchema");
|
|
19008
19012
|
function convertSchema(schema, ctx) {
|
|
19009
19013
|
if (typeof schema === "boolean") {
|
|
19010
|
-
return schema ?
|
|
19014
|
+
return schema ? z3.any() : z3.never();
|
|
19011
19015
|
}
|
|
19012
19016
|
let baseSchema = convertBaseSchema(schema, ctx);
|
|
19013
19017
|
const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
|
|
19014
19018
|
if (schema.anyOf && Array.isArray(schema.anyOf)) {
|
|
19015
19019
|
const options = schema.anyOf.map((s) => convertSchema(s, ctx));
|
|
19016
|
-
const anyOfUnion =
|
|
19017
|
-
baseSchema = hasExplicitType ?
|
|
19020
|
+
const anyOfUnion = z3.union(options);
|
|
19021
|
+
baseSchema = hasExplicitType ? z3.intersection(baseSchema, anyOfUnion) : anyOfUnion;
|
|
19018
19022
|
}
|
|
19019
19023
|
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
19020
19024
|
const options = schema.oneOf.map((s) => convertSchema(s, ctx));
|
|
19021
|
-
const oneOfUnion =
|
|
19022
|
-
baseSchema = hasExplicitType ?
|
|
19025
|
+
const oneOfUnion = z3.xor(options);
|
|
19026
|
+
baseSchema = hasExplicitType ? z3.intersection(baseSchema, oneOfUnion) : oneOfUnion;
|
|
19023
19027
|
}
|
|
19024
19028
|
if (schema.allOf && Array.isArray(schema.allOf)) {
|
|
19025
19029
|
if (schema.allOf.length === 0) {
|
|
19026
|
-
baseSchema = hasExplicitType ? baseSchema :
|
|
19030
|
+
baseSchema = hasExplicitType ? baseSchema : z3.any();
|
|
19027
19031
|
} else {
|
|
19028
19032
|
let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
|
|
19029
19033
|
const startIdx = hasExplicitType ? 0 : 1;
|
|
19030
19034
|
for (let i = startIdx; i < schema.allOf.length; i++) {
|
|
19031
|
-
result =
|
|
19035
|
+
result = z3.intersection(result, convertSchema(schema.allOf[i], ctx));
|
|
19032
19036
|
}
|
|
19033
19037
|
baseSchema = result;
|
|
19034
19038
|
}
|
|
19035
19039
|
}
|
|
19036
19040
|
if (schema.nullable === true && ctx.version === "openapi-3.0") {
|
|
19037
|
-
baseSchema =
|
|
19041
|
+
baseSchema = z3.nullable(baseSchema);
|
|
19038
19042
|
}
|
|
19039
19043
|
if (schema.readOnly === true) {
|
|
19040
|
-
baseSchema =
|
|
19044
|
+
baseSchema = z3.readonly(baseSchema);
|
|
19041
19045
|
}
|
|
19042
19046
|
if (schema.default !== void 0) {
|
|
19043
19047
|
baseSchema = baseSchema.default(schema.default);
|
|
@@ -19073,7 +19077,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19073
19077
|
function fromJSONSchema(schema, params) {
|
|
19074
19078
|
var _a4;
|
|
19075
19079
|
if (typeof schema === "boolean") {
|
|
19076
|
-
return schema ?
|
|
19080
|
+
return schema ? z3.any() : z3.never();
|
|
19077
19081
|
}
|
|
19078
19082
|
let normalized;
|
|
19079
19083
|
try {
|
|
@@ -19765,6 +19769,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19765
19769
|
isServiceProfile: true,
|
|
19766
19770
|
display: true
|
|
19767
19771
|
});
|
|
19772
|
+
var LCNConnectionPromptStatusValidator = external_exports.enum(["PENDING", "SKIPPED", "CONNECTED"]);
|
|
19773
|
+
var LCNConnectionPromptSurfaceValidator = external_exports.enum(["POST_CLAIM", "NOTIFICATION"]);
|
|
19774
|
+
var LCNConnectionPromptActionStatusValidator = external_exports.enum([
|
|
19775
|
+
"PENDING",
|
|
19776
|
+
"SKIPPED",
|
|
19777
|
+
"CONNECTED",
|
|
19778
|
+
"STALE"
|
|
19779
|
+
]);
|
|
19780
|
+
var LCNConnectionPromptValidator = external_exports.object({
|
|
19781
|
+
promptId: external_exports.string().uuid(),
|
|
19782
|
+
status: LCNConnectionPromptStatusValidator,
|
|
19783
|
+
surface: LCNConnectionPromptSurfaceValidator,
|
|
19784
|
+
triggerId: external_exports.string(),
|
|
19785
|
+
triggeredAt: external_exports.iso.datetime(),
|
|
19786
|
+
updatedAt: external_exports.iso.datetime(),
|
|
19787
|
+
counterpart: LCNPublicProfileValidator
|
|
19788
|
+
});
|
|
19789
|
+
var LCNConnectionPromptActionResultValidator = external_exports.object({
|
|
19790
|
+
promptId: external_exports.string().uuid(),
|
|
19791
|
+
status: LCNConnectionPromptActionStatusValidator
|
|
19792
|
+
});
|
|
19793
|
+
var LCNConnectionPromptMetadataValidator = external_exports.object({
|
|
19794
|
+
promptId: external_exports.string().uuid(),
|
|
19795
|
+
counterpartProfileId: external_exports.string()
|
|
19796
|
+
});
|
|
19768
19797
|
var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
|
|
19769
19798
|
bio: LCNProfileValidator.shape.bio,
|
|
19770
19799
|
websiteLink: LCNProfileValidator.shape.websiteLink,
|
|
@@ -19773,7 +19802,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19773
19802
|
did: LCNProfileValidator.shape.did
|
|
19774
19803
|
});
|
|
19775
19804
|
var LCNConnectionProfileValidator = LCNAuthedProfileValidator.extend({
|
|
19776
|
-
email: LCNProfileValidator.shape.email
|
|
19805
|
+
email: LCNProfileValidator.shape.email,
|
|
19806
|
+
connectedAt: external_exports.iso.datetime().optional().describe("When the viewer and this profile became connected.")
|
|
19777
19807
|
});
|
|
19778
19808
|
var LCNVisibleProfileValidator = external_exports.union([
|
|
19779
19809
|
LCNConnectionProfileValidator.strict(),
|
|
@@ -20330,12 +20360,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20330
20360
|
}),
|
|
20331
20361
|
timestamp: external_exports.iso.datetime().optional()
|
|
20332
20362
|
});
|
|
20363
|
+
var LCNNotificationMetadataValidator = external_exports.object({
|
|
20364
|
+
connectionPrompt: LCNConnectionPromptMetadataValidator.optional()
|
|
20365
|
+
}).catchall(external_exports.unknown());
|
|
20333
20366
|
var LCNNotificationDataValidator = external_exports.object({
|
|
20334
20367
|
vcUris: external_exports.array(external_exports.string()).optional(),
|
|
20335
20368
|
vpUris: external_exports.array(external_exports.string()).optional(),
|
|
20336
20369
|
transaction: ConsentFlowTransactionValidator.optional(),
|
|
20337
20370
|
inbox: LCNNotificationInboxValidator.optional(),
|
|
20338
|
-
metadata:
|
|
20371
|
+
metadata: LCNNotificationMetadataValidator.optional()
|
|
20339
20372
|
}).loose();
|
|
20340
20373
|
var LCNNotificationValidator = external_exports.object({
|
|
20341
20374
|
type: LCNNotificationTypeEnumValidator,
|
|
@@ -21215,11 +21248,11 @@ var getFilestackHandle = /* @__PURE__ */ __name((url) => {
|
|
|
21215
21248
|
return urlParams[urlParams.length - 1];
|
|
21216
21249
|
}, "getFilestackHandle");
|
|
21217
21250
|
var getFileType = /* @__PURE__ */ __name((url) => __async(null, null, function* () {
|
|
21218
|
-
var
|
|
21251
|
+
var _a2;
|
|
21219
21252
|
const handle = getFilestackHandle(url);
|
|
21220
21253
|
try {
|
|
21221
21254
|
const data = yield (yield fetch(`https://www.filestackapi.com/api/file/${handle}/metadata`)).json();
|
|
21222
|
-
return (
|
|
21255
|
+
return (_a2 = data.mimetype) != null ? _a2 : "";
|
|
21223
21256
|
} catch (error) {
|
|
21224
21257
|
console.error(error);
|
|
21225
21258
|
return "";
|
|
@@ -21452,8 +21485,8 @@ function innerReactOuterReact(setState, field, value) {
|
|
|
21452
21485
|
__name(innerReactOuterReact, "innerReactOuterReact");
|
|
21453
21486
|
var curriedInnerReactOuterReact = /* @__PURE__ */ __name((setState) => (field, value) => innerReactOuterReact(setState, field, value), "curriedInnerReactOuterReact");
|
|
21454
21487
|
function curriedStateSlice(setState, options) {
|
|
21455
|
-
var
|
|
21456
|
-
if (((
|
|
21488
|
+
var _a2, _b, _c;
|
|
21489
|
+
if (((_a2 = options == null ? void 0 : options.outer) != null ? _a2 : "immer") === "immer") {
|
|
21457
21490
|
return ((_b = options == null ? void 0 : options.inner) != null ? _b : "immer") === "immer" ? curriedInnerImmerOuterImmer(setState) : curriedInnerReactOuterImmer(setState);
|
|
21458
21491
|
}
|
|
21459
21492
|
return ((_c = options == null ? void 0 : options.inner) != null ? _c : "immer") === "immer" ? curriedInnerImmerOuterReact(setState) : curriedInnerReactOuterReact(setState);
|
|
@@ -21462,13 +21495,38 @@ __name(curriedStateSlice, "curriedStateSlice");
|
|
|
21462
21495
|
var ImageResizingValidator = object({ type: literal("resizing") });
|
|
21463
21496
|
var ImageUploadingValidator = object({
|
|
21464
21497
|
type: literal("uploading"),
|
|
21465
|
-
progress: number().optional()
|
|
21498
|
+
progress: number$1().optional()
|
|
21466
21499
|
});
|
|
21467
21500
|
object({
|
|
21468
21501
|
image: string(),
|
|
21469
21502
|
loading: union([ImageResizingValidator, ImageUploadingValidator]).optional()
|
|
21470
21503
|
});
|
|
21471
21504
|
__toESM(require_dist());
|
|
21505
|
+
(_a = class extends Error {
|
|
21506
|
+
constructor(message) {
|
|
21507
|
+
super(message);
|
|
21508
|
+
this.name = "EnvironmentConfigurationError";
|
|
21509
|
+
}
|
|
21510
|
+
}, __name(_a, "EnvironmentConfigurationError"), _a);
|
|
21511
|
+
var requiredEnvironmentString = string().trim().min(1, "Required but missing");
|
|
21512
|
+
preprocess(
|
|
21513
|
+
(value) => value === "" ? void 0 : value,
|
|
21514
|
+
requiredEnvironmentString.optional()
|
|
21515
|
+
);
|
|
21516
|
+
preprocess(
|
|
21517
|
+
(value) => value === "" ? void 0 : value,
|
|
21518
|
+
url("Expected a valid URL").optional()
|
|
21519
|
+
);
|
|
21520
|
+
var environmentBoolean = _enum(["true", "false", "1", "0"]).transform((value) => value === "true" || value === "1");
|
|
21521
|
+
preprocess(
|
|
21522
|
+
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
21523
|
+
environmentBoolean.optional()
|
|
21524
|
+
);
|
|
21525
|
+
var environmentPort = number().int().min(1).max(65535);
|
|
21526
|
+
preprocess(
|
|
21527
|
+
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
21528
|
+
environmentPort.optional()
|
|
21529
|
+
);
|
|
21472
21530
|
var isAppDidWeb = /* @__PURE__ */ __name((did) => {
|
|
21473
21531
|
if (!did) return false;
|
|
21474
21532
|
const LCN_APP_DID_WEB_REGEX = /^did:web:.*:app:([^:]+)$/;
|
|
@@ -21608,8 +21666,9 @@ const VERIFIER_STATES = {
|
|
|
21608
21666
|
};
|
|
21609
21667
|
const VerifierStateBadgeAndText = forwardRef(
|
|
21610
21668
|
({ verifierState, className = "", unknownVerifierTitle, onClick }, ref) => {
|
|
21669
|
+
const t = useT();
|
|
21611
21670
|
const effectiveState = unknownVerifierTitle && verifierState !== VERIFIER_STATES.selfVerified && verifierState !== VERIFIER_STATES.untrustedVerifier && verifierState !== VERIFIER_STATES.appIssuer ? VERIFIER_STATES.trustedVerifier : verifierState;
|
|
21612
|
-
const content = /* @__PURE__ */ React.createElement(React.Fragment, null, effectiveState === VERIFIER_STATES.selfVerified && /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-0.5 font-poppins font-[500] text-[12px] leading-tight text-green-dark" }, /* @__PURE__ */ React.createElement(PersonBadge, null), /* @__PURE__ */ React.createElement("span", { className: "whitespace-nowrap" }, "
|
|
21671
|
+
const content = /* @__PURE__ */ React.createElement(React.Fragment, null, effectiveState === VERIFIER_STATES.selfVerified && /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-0.5 font-poppins font-[500] text-[12px] leading-tight text-green-dark" }, /* @__PURE__ */ React.createElement(PersonBadge, null), /* @__PURE__ */ React.createElement("span", { className: "whitespace-nowrap" }, t("verification.selfIssued"))), effectiveState === VERIFIER_STATES.trustedVerifier && /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-0.5 font-poppins font-[500] text-[12px] leading-tight text-green-600" }, /* @__PURE__ */ React.createElement(VerifiedBadge, null), /* @__PURE__ */ React.createElement("span", { className: "whitespace-nowrap" }, unknownVerifierTitle != null ? unknownVerifierTitle : t("verification.trustedIssuer"))), effectiveState === VERIFIER_STATES.unknownVerifier && /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-0.5 font-poppins font-[500] text-[12px] leading-tight text-orange-800" }, /* @__PURE__ */ React.createElement(UnknownVerifierBadge, null), /* @__PURE__ */ React.createElement("span", { className: "whitespace-nowrap" }, unknownVerifierTitle != null ? unknownVerifierTitle : t("verification.unknownIssuer"))), effectiveState === VERIFIER_STATES.appIssuer && /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-0.5 font-poppins font-[500] text-[12px] leading-tight text-cyan-600" }, /* @__PURE__ */ React.createElement(VerifiedBadge, null), /* @__PURE__ */ React.createElement("span", { className: "whitespace-nowrap" }, t("verification.appIssuer"))), effectiveState === VERIFIER_STATES.untrustedVerifier && /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-0.5 font-poppins font-[500] text-[12px] leading-tight text-red-mastercard" }, /* @__PURE__ */ React.createElement(RedFlag, null), /* @__PURE__ */ React.createElement("span", { className: "whitespace-nowrap" }, t("verification.untrustedIssuer"))));
|
|
21613
21672
|
return /* @__PURE__ */ React.createElement("div", { className: `flex justify-center ${className}` }, onClick ? /* @__PURE__ */ React.createElement(
|
|
21614
21673
|
"button",
|
|
21615
21674
|
{
|
|
@@ -21630,4 +21689,4 @@ const VerifierStateBadgeAndText = forwardRef(
|
|
|
21630
21689
|
VerifierStateBadgeAndText.displayName = "VerifierStateBadgeAndText";
|
|
21631
21690
|
|
|
21632
21691
|
export { AcuteCheckmark as A, Camera as C, ExclamationPoint as E, FatArrow as F, GenericDocumentIcon as G, InfoIcon as I, LinkIcon as L, PersonBadge as P, RoundedCorner as R, SelectedSkills as S, UnknownVerifierBadge as U, VERIFIER_STATES as V, isLearnCardNetworkDid as a, getAvatarColorFromString as b, capitalize as c, getBaseUrl as d, VideoIcon as e, formatDidDisplayName as f, getAvatarLetterFromDid as g, LeftArrow as h, isDid as i, SkillsBox as j, IssuerSeal as k, isAppDidWeb as l, VerifierStateBadgeAndText as m, VerifiedBadge as n, RedFlag as o, prettyBytes as p, resolveProfileDisplay as r };
|
|
21633
|
-
//# sourceMappingURL=VerifierStateBadgeAndText-
|
|
21692
|
+
//# sourceMappingURL=VerifierStateBadgeAndText-0a4e0c63.js.map
|