@everfur/sdk 0.1.0 → 0.3.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/CHANGELOG.md +648 -1
- package/README.md +58 -23
- package/consent/package.json +8 -0
- package/dist/Chat-DPUD6dnc.d.cts +128 -0
- package/dist/Chat-DwAC2vhB.d.ts +128 -0
- package/dist/DepthViews-DNEM96Se.d.ts +16 -0
- package/dist/DepthViews-DP0R-DhB.d.cts +19 -0
- package/dist/DepthViews-D_3hl4xk.d.ts +19 -0
- package/dist/DepthViews-DbFhR4Du.d.cts +16 -0
- package/dist/ErrorPolicyPort-CNf4uQZP.d.cts +22 -0
- package/dist/ErrorPolicyPort-CwbfmxzJ.d.ts +22 -0
- package/dist/{EverfurResult-D92-uL82.d.cts → EverfurResult-DN9pL2Ab.d.cts} +11 -10
- package/dist/{EverfurResult-D92-uL82.d.ts → EverfurResult-DN9pL2Ab.d.ts} +11 -10
- package/dist/{PhotoController-BItt5M7u.d.cts → PhotoController-3l7MT9jA.d.cts} +1 -1
- package/dist/{PhotoController-D8zMTdcW.d.ts → PhotoController-vzY5bfY_.d.ts} +1 -1
- package/dist/animations/index.cjs +1 -1997
- package/dist/animations/index.d.cts +35 -35
- package/dist/animations/index.d.ts +35 -35
- package/dist/animations/index.js +1 -1972
- package/dist/attachments-5NeobOCd.d.ts +256 -0
- package/dist/attachments-Bw3iMQgu.d.ts +146 -0
- package/dist/attachments-CQgFrEQ7.d.cts +146 -0
- package/dist/attachments-D8T5re7e.d.cts +256 -0
- package/dist/casesRepository-ClLv6qMl.d.ts +188 -0
- package/dist/casesRepository-DHwtGRYY.d.cts +188 -0
- package/dist/chat/index.cjs +1 -1170
- package/dist/chat/index.d.cts +31 -53
- package/dist/chat/index.d.ts +31 -53
- package/dist/chat/index.js +1 -1167
- package/dist/client/index.cjs +9 -2315
- package/dist/client/index.d.cts +77 -15
- package/dist/client/index.d.ts +77 -15
- package/dist/client/index.js +9 -2215
- package/dist/{config-CiJ0PVBB.d.ts → config-CzTZGlfF.d.cts} +63 -25
- package/dist/{config-BSjBdxrZ.d.cts → config-DW60uRb9.d.ts} +63 -25
- package/dist/consent/index.cjs +1 -0
- package/dist/consent/index.d.cts +33 -0
- package/dist/consent/index.d.ts +33 -0
- package/dist/consent/index.js +1 -0
- package/dist/context-DXhqHlPU.d.ts +159 -0
- package/dist/context-XvTzq1tE.d.cts +159 -0
- package/dist/copy-Mjoo91aS.d.ts +198 -0
- package/dist/copy-bKDNigLb.d.cts +198 -0
- package/dist/core/index.cjs +13 -3175
- package/dist/core/index.d.cts +58 -12
- package/dist/core/index.d.ts +58 -12
- package/dist/core/index.js +13 -3163
- package/dist/depth-CErXCU8J.d.cts +502 -0
- package/dist/depth-DjDcJ6kH.d.ts +502 -0
- package/dist/entitlementRepository-DKdXFgTo.d.cts +698 -0
- package/dist/entitlementRepository-DSbzuyAW.d.ts +698 -0
- package/dist/{identity-DK9zORrG.d.ts → identity-BMx2SUOM.d.ts} +19 -6
- package/dist/{identity-Brl-lDd6.d.cts → identity-DI4eVx9S.d.cts} +19 -6
- package/dist/{ids-CJ1S6adf.d.cts → ids-B2GAAifq.d.cts} +1 -1
- package/dist/{ids-CJ1S6adf.d.ts → ids-B2GAAifq.d.ts} +1 -1
- package/dist/index.cjs +12 -4488
- package/dist/index.d.cts +29 -121
- package/dist/index.d.ts +29 -121
- package/dist/index.js +12 -4464
- package/dist/models-B-Uh2LTf.d.ts +214 -0
- package/dist/models-D2EUxPZY.d.cts +214 -0
- package/dist/notifications/index.cjs +2 -0
- package/dist/notifications/index.d.cts +17 -0
- package/dist/notifications/index.d.ts +17 -0
- package/dist/notifications/index.js +2 -0
- package/dist/pets-CtQdRpWo.d.ts +92 -0
- package/dist/pets-aB8q0JyX.d.cts +92 -0
- package/dist/photo/index.cjs +1 -2189
- package/dist/photo/index.d.cts +6 -6
- package/dist/photo/index.d.ts +6 -6
- package/dist/photo/index.js +1 -2186
- package/dist/ports-BN6RHF9W.d.cts +48 -0
- package/dist/ports-BN6RHF9W.d.ts +48 -0
- package/dist/ports-DEBzEhbp.d.cts +386 -0
- package/dist/ports-DMolTRzU.d.ts +386 -0
- package/dist/profile-CSs1wlXT.d.cts +93 -0
- package/dist/profile-CSs1wlXT.d.ts +93 -0
- package/dist/records/depth/index.cjs +2 -0
- package/dist/records/depth/index.d.cts +13 -0
- package/dist/records/depth/index.d.ts +13 -0
- package/dist/records/depth/index.js +2 -0
- package/dist/records/index.cjs +3 -2839
- package/dist/records/index.d.cts +137 -203
- package/dist/records/index.d.ts +137 -203
- package/dist/records/index.js +3 -2833
- package/dist/requestFunnel-CjW7uDuA.d.ts +87 -0
- package/dist/requestFunnel-L-BQfi0z.d.cts +87 -0
- package/dist/{resolve-Dq_4_agU.d.ts → resolve-D4Ywz5OS.d.cts} +10 -4
- package/dist/{resolve-Dq_4_agU.d.cts → resolve-D4Ywz5OS.d.ts} +10 -4
- package/dist/{runtime-BgQnA594.d.cts → runtime-B8s-_hv8.d.cts} +134 -59
- package/dist/{runtime-CBA-LvdM.d.ts → runtime-BR9ysG0J.d.ts} +134 -59
- package/dist/server/events/index.cjs +2 -0
- package/dist/server/events/index.d.cts +550 -0
- package/dist/server/events/index.d.ts +550 -0
- package/dist/server/events/index.js +2 -0
- package/dist/server/index.cjs +2 -533
- package/dist/server/index.d.cts +73 -18
- package/dist/server/index.d.ts +73 -18
- package/dist/server/index.js +2 -530
- package/dist/species-BXAIMh7I.d.cts +9 -0
- package/dist/species-BXAIMh7I.d.ts +9 -0
- package/dist/televet/index.cjs +1 -0
- package/dist/televet/index.d.cts +60 -0
- package/dist/televet/index.d.ts +60 -0
- package/dist/televet/index.js +1 -0
- package/dist/testing/index.cjs +5 -823
- package/dist/testing/index.d.cts +17 -3
- package/dist/testing/index.d.ts +17 -3
- package/dist/testing/index.js +5 -820
- package/dist/testing/rn/index.cjs +1 -449
- package/dist/testing/rn/index.d.cts +17 -29
- package/dist/testing/rn/index.d.ts +17 -29
- package/dist/testing/rn/index.js +1 -444
- package/dist/testing/web/index.cjs +1 -0
- package/dist/testing/web/index.d.cts +131 -0
- package/dist/testing/web/index.d.ts +131 -0
- package/dist/testing/web/index.js +1 -0
- package/dist/timelineRows-CaohZzXS.d.cts +19 -0
- package/dist/timelineRows-DZed6dAM.d.ts +19 -0
- package/dist/typeStyle-0TydiZ1w.d.cts +19 -0
- package/dist/typeStyle-CWMsoe6b.d.ts +19 -0
- package/dist/uploadTransport-D0M0T4hN.d.ts +38 -0
- package/dist/uploadTransport-DKJHs3Yj.d.cts +38 -0
- package/dist/useRecordsDepth-BHBzJ76R.d.cts +237 -0
- package/dist/useRecordsDepth-BU-OhzH6.d.ts +237 -0
- package/dist/useVetVisit-Bc84hWUU.d.cts +187 -0
- package/dist/useVetVisit-CjmMa896.d.ts +187 -0
- package/dist/video/index.cjs +1 -1941
- package/dist/video/index.d.cts +4 -4
- package/dist/video/index.d.ts +4 -4
- package/dist/video/index.js +1 -1938
- package/dist/view-C3qPIXGX.d.cts +310 -0
- package/dist/view-DtSPYpKa.d.ts +310 -0
- package/dist/visitIntent-D7_yVp1I.d.cts +8 -0
- package/dist/visitIntent-D7_yVp1I.d.ts +8 -0
- package/dist/web/consent/index.cjs +1 -0
- package/dist/web/consent/index.d.cts +34 -0
- package/dist/web/consent/index.d.ts +34 -0
- package/dist/web/consent/index.js +1 -0
- package/dist/web/index.cjs +14 -0
- package/dist/web/index.d.cts +217 -0
- package/dist/web/index.d.ts +217 -0
- package/dist/web/index.js +14 -0
- package/dist/web/notifications/index.cjs +2 -0
- package/dist/web/notifications/index.d.cts +213 -0
- package/dist/web/notifications/index.d.ts +213 -0
- package/dist/web/notifications/index.js +2 -0
- package/dist/web/records/depth/index.cjs +2 -0
- package/dist/web/records/depth/index.d.cts +12 -0
- package/dist/web/records/depth/index.d.ts +12 -0
- package/dist/web/records/depth/index.js +2 -0
- package/dist/web/records/index.cjs +4 -0
- package/dist/web/records/index.d.cts +194 -0
- package/dist/web/records/index.d.ts +194 -0
- package/dist/web/records/index.js +4 -0
- package/dist/web/televet/index.cjs +1 -0
- package/dist/web/televet/index.d.cts +50 -0
- package/dist/web/televet/index.d.ts +50 -0
- package/dist/web/televet/index.js +1 -0
- package/notifications/package.json +8 -0
- package/package.json +197 -9
- package/records/depth/package.json +8 -0
- package/server/events/device-blocked.cjs +15 -0
- package/server/events/package.json +9 -0
- package/televet/package.json +8 -0
- package/testing/web/native-blocked.cjs +12 -0
- package/testing/web/package.json +8 -0
- package/web/consent/native-blocked.cjs +12 -0
- package/web/consent/package.json +8 -0
- package/web/native-blocked.cjs +12 -0
- package/web/notifications/native-blocked.cjs +12 -0
- package/web/notifications/package.json +8 -0
- package/web/package.json +8 -0
- package/web/records/depth/native-blocked.cjs +12 -0
- package/web/records/depth/package.json +8 -0
- package/web/records/native-blocked.cjs +12 -0
- package/web/records/package.json +8 -0
- package/web/televet/native-blocked.cjs +12 -0
- package/web/televet/package.json +8 -0
- package/dist/ChatController-CKdBvPj2.d.ts +0 -146
- package/dist/ChatController-CpUMvvZf.d.cts +0 -146
- package/dist/FilePort-BabWrv7I.d.cts +0 -22
- package/dist/FilePort-BabWrv7I.d.ts +0 -22
- package/dist/petsRepository-BEGb97M9.d.cts +0 -326
- package/dist/petsRepository-Bu18r2kK.d.ts +0 -326
- package/dist/requestFunnel-DuUH-kAe.d.cts +0 -28
- package/dist/requestFunnel-dio5OmR9.d.ts +0 -28
package/dist/client/index.d.cts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AUTO_RETRYABLE_CODES, B as BACKOFF_BASE_MS,
|
|
3
|
-
export { A as AcceptedFrame,
|
|
4
|
-
export { B as Brand,
|
|
5
|
-
export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { b as EverfurErrorCode } from '../EverfurResult-DN9pL2Ab.cjs';
|
|
2
|
+
export { A as AUTO_RETRYABLE_CODES, B as BACKOFF_BASE_MS, k as BACKOFF_CAP_MS, l as EVERFUR_ERROR_CATEGORIES, m as EVERFUR_ERROR_CODES, d as EverfurConfigError, E as EverfurError, a as EverfurErrorCategory, c as EverfurResult, e as EverfurThrownError, M as MAX_RETRY_ATTEMPTS, n as MakeEverfurErrorOptions, R as RETRYABLE_CONTRACT_CODES, o as backoffDelayMs, p as canRecreateOnNotFound, f as categoryFor, q as err, r as fromHttpStatus, s as fromWire, t as isAutoRetryable, i as isErr, g as isOk, h as isRetryableCode, v as makeEverfurError, w as ok, x as shouldRetry, u as unwrap, j as userFacingError } from '../EverfurResult-DN9pL2Ab.cjs';
|
|
3
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, k as ClientConfigFailureReason, l as ClientConfigOutcome, m as DEFAULT_CONTRACT_VERSION, D as DeltaFrame, c as DoneFrame, n as EMPTY_FRAME_ARRAYS, o as ENV_API_BASE_URL, E as ErrorFrame, p as EventSourceFactory, q as EventSourceInit, r as EventSourceLike, s as EventSourceMessage, t as EverfurConfig, d as EverfurRequest, e as EverfurRequestBase, u as FetchInit, j as FetchLike, v as FetchResponseLike, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, R as RawResponse, w as ReadableStreamLike, x as ResolveClientConfigOptions, y as ResolvedClientConfig, S as SDK_PLATFORM, z as SDK_VERSION, G as SdkPlatform, I as ServerRequestIdSource, J as TransportDeps, T as TransportPort, U as UnknownFrame, i as UrgencyLevel, K as acceptedFrame, L as analysisCompleteFrame, N as analysisStartedFrame, O as assertNever, P as bufferedTextByteSource, Q as buildBaseHeaders, V as checkPublishableKey, W as createHttpTransport, X as deltaFrame, Y as doneFrame, Z as errorFrame, _ as errorFromResponse, $ as eventSourceByteSource, a0 as eventSourceRequestId, a1 as fetchByteSource, a2 as getGlobalFetch, a3 as heartbeatFrame, a4 as networkError, a5 as parseSse, a6 as requestIdOf, a7 as requestJson, a8 as requestRaw, a9 as resolveApiBaseUrl, aa as resolveClientConfig, ab as tryResolveApiBaseUrl, ac as tryResolveClientConfig, ad as unknownFrame } from '../config-CzTZGlfF.cjs';
|
|
4
|
+
export { B as Brand, a as ClientId, C as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, d as unsafeClientId, e as unsafeConversationId, f as unsafeDocumentId, g as unsafeJobId, h as unsafePetRef, i as unsafeRecordsRequestId, j as unsafeResponseId, k as unsafeUserRef, u as userRef } from '../ids-B2GAAifq.cjs';
|
|
5
|
+
export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, M as MintedToken, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-DI4eVx9S.cjs';
|
|
6
|
+
export { a as CapabilityDecision, b as CapabilityDisabled, C as CapabilityName, c as DecideOptions, D as DisabledLevel, E as EntitlementDecision, L as LevelGrant, R as ResolvedEntitlements, d as decideCapability, e as deniedDecisionsFor, r as requires, f as resolveEntitlements } from '../resolve-D4Ywz5OS.cjs';
|
|
7
|
+
import { a as EverfurTheme } from '../entitlementRepository-DKdXFgTo.cjs';
|
|
8
|
+
export { C as ClientBranding, D as DEFAULT_MAX_FONT_SCALE, F as EASING_CURVES, G as ENTITLEMENTS_PATH, H as EVERFUR_DARK, I as EVERFUR_LIGHT, J as EntitlementResolution, d as EverfurColorTokens, K as EverfurEasingCurve, b as EverfurFontFaceKey, e as EverfurFontFamilies, E as EverfurFontWeight, f as EverfurLetterSpacingTokens, g as EverfurLineHeightTokens, h as EverfurMotionDurationTokens, i as EverfurMotionTokens, j as EverfurRadiusTokens, k as EverfurSpaceTokens, l as EverfurSpringToken, m as EverfurTextColorTokens, L as EverfurTextScaleTier, n as EverfurThemeFontFaceKey, o as EverfurThemeFontUrlsInput, p as EverfurThemeFontsInput, c as EverfurThemeInput, q as EverfurThemeMeta, r as EverfurThemeSlot, s as EverfurThemeSlotInput, t as EverfurThemeSlotKey, u as EverfurThemeSlotName, v as EverfurThemeSlots, w as EverfurThemeSlotsInput, x as EverfurTypeSizeTokens, y as EverfurTypeTokens, z as EverfurWeightTokens, M as FetchEntitlementsArgs, N as LOCKABLE_THEME_FIELDS, O as LockableThemeField, P as MAX_FONT_SCALE_CEILING, R as RadiusScale, Q as ResolveThemeInput, U as SLOT_LOCK_PREFIX, V as SLOT_MIN_BORDER_CONTRAST, W as SLOT_MIN_CONTRAST, X as SYSTEM_FONT_FAMILY, Y as SYSTEM_MONO_FAMILY, Z as SlotGrounds, _ as SlotLockName, S as SurfaceStyle, $ as TEXT_SCALE_FLOOR, a0 as TEXT_SCALE_TIER_CAPS, a1 as THEME_SCHEMA_VERSIONS, T as THEME_SLOT_KEYS, A as THEME_SLOT_NAMES, a2 as ThemeLockName, a3 as cssCubicBezier, a4 as deepFreeze, a5 as fetchEntitlements, a6 as guardSlotContrast, a7 as hardenHttpsUrl, a8 as isEmptyBranding, a9 as isKnownBrandingSchema, aa as lockedFieldsOf, ab as mergeThemeSlots, ac as parseClientBranding, ad as parseThemeSlots, B as previewTheme, ae as resolveTheme, af as withServerBranding } from '../entitlementRepository-DKdXFgTo.cjs';
|
|
9
|
+
export { F as FunnelSendOptions, R as RequestFunnel, a as RequestFunnelDeps, c as createRequestFunnel } from '../requestFunnel-L-BQfi0z.cjs';
|
|
10
|
+
export { E as EverfurFaceStyle, f as face } from '../typeStyle-0TydiZ1w.cjs';
|
|
11
|
+
export { e as CHECKIN_ANSWERS, f as CasesRepository, C as CheckinAnswer, a as CheckinOutcome, g as PET_AGE_YEARS_MAX, h as PET_BREED_MAX, i as PET_NAME_MAX, j as PET_SPECIES_MAX, k as PET_WEIGHT_KG_MAX, P as PetProfileInput, c as PetProfilePatch, l as PetsRepository, R as RegisteredPet, W as WatchCase, b as WidgetPet, m as createCasesRepository, n as createPetsRepository, w as widgetPetFromWire } from '../casesRepository-DHwtGRYY.cjs';
|
|
12
|
+
import '../ErrorPolicyPort-CNf4uQZP.cjs';
|
|
13
|
+
import '../profile-CSs1wlXT.cjs';
|
|
9
14
|
|
|
10
15
|
/** Which wire shape a code arrives in. The two envelopes are different objects, not casings. */
|
|
11
|
-
type ContractErrorEnvelope = "http_envelope" | "sse_frame";
|
|
16
|
+
type ContractErrorEnvelope = "http_envelope" | "oauth_error" | "sse_frame";
|
|
12
17
|
/** Every wire error code the contract declares, spelled EXACTLY as the server sends it. */
|
|
13
|
-
type ContractWireErrorCode = "AccessDeniedException" | "AuthorizationException" | "ConflictException" | "DAILY_QUOTA_EXCEEDED" | "IDEMPOTENCY_KEY_IN_FLIGHT" | "IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST" | "InternalFailureException" | "NotImplementedException" | "PaymentRequiredException" | "ResourceNotFoundException" | "ServiceUnavailableException" | "TIER_UPGRADE_REQUIRED" | "ThrottlingException" | "ValidationException" | "accessDenied" | "authExpired" | "internal_error" | "invalidRequest" | "not_found" | "session_required" | "timeout" | "unavailable";
|
|
18
|
+
type ContractWireErrorCode = "AccessDeniedException" | "AuthorizationException" | "ConflictException" | "DAILY_QUOTA_EXCEEDED" | "FILE_TOO_LARGE" | "IDEMPOTENCY_KEY_IN_FLIGHT" | "IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST" | "INVALID_CONTENT_TYPE" | "InternalFailureException" | "MethodNotAllowedException" | "NotImplementedException" | "PaymentRequiredException" | "ResourceNotFoundException" | "ServiceUnavailableException" | "TIER_UPGRADE_REQUIRED" | "ThrottlingException" | "ValidationException" | "accessDenied" | "access_denied" | "attachment_unreadable" | "authExpired" | "authRejected" | "consent_invalid" | "consent_required" | "consent_scope_wrong_route" | "device_cipher_unavailable" | "email_invalid" | "event_cursor_invalid" | "event_filter_invalid" | "event_payload_invalid" | "event_type_not_available" | "event_type_unknown" | "idempotency_key_invalid" | "idempotency_key_required" | "idempotency_key_reused" | "insufficientCapability" | "insufficient_scope" | "internal_error" | "invalidRequest" | "invalid_client" | "invalid_client_metadata" | "invalid_grant" | "invalid_redirect_uri" | "invalid_request" | "invalid_scope" | "invalid_target" | "mcp_connection_not_found" | "mcp_request_conflict" | "mcp_request_gone" | "mcp_request_not_found" | "not_found" | "partner_visit_link_conflict" | "partner_visit_owner_only" | "partner_visit_pet_already_mapped" | "payload_too_large" | "petRefInUse" | "pet_health_list_removals_unconfirmed" | "pet_health_species_unsupported" | "pet_not_registered" | "provider_unsupported" | "rateLimited" | "record_species_unsupported" | "record_subject_not_found" | "record_upload_invalid" | "records_consent_required" | "sandbox_only" | "session_required" | "share_limit_reached" | "slow_down" | "species_unsupported" | "tenant_filter_invalid" | "tenant_has_no_capabilities" | "tenant_resource_not_found" | "tenant_surface_not_enabled" | "timeout" | "token_invalid" | "unavailable" | "unsupported_grant_type" | "unsupported_response_type" | "verify_mint_rate_limited" | "verify_mint_refused" | "verify_mint_unavailable" | "verify_user_ref_invalid" | "webhook_endpoint_update_empty" | "webhook_endpoint_update_invalid" | "webhook_url_rejected";
|
|
14
19
|
|
|
15
20
|
/** One registry row, reduced to the facts the SDK needs at runtime. */
|
|
16
21
|
interface ContractErrorRow {
|
|
@@ -34,14 +39,23 @@ interface ContractErrorRow {
|
|
|
34
39
|
* exhaustive, so a code added to the contract fails `tsc` here rather than silently becoming `unknown`.
|
|
35
40
|
*/
|
|
36
41
|
declare const CONTRACT_ERROR_ROWS: readonly ContractErrorRow[];
|
|
37
|
-
/**
|
|
38
|
-
|
|
42
|
+
/**
|
|
43
|
+
* The registry row for a raw wire code, or undefined when the code is not in the contract.
|
|
44
|
+
*
|
|
45
|
+
* A code can ride SEVERAL envelopes as one row each (`unavailable`: the 503 body and the SSE frame a partner chat
|
|
46
|
+
* turn ends with). Pass the envelope the code arrived in when it is known (an SSE frame passes `'sse_frame'`) so
|
|
47
|
+
* such a code resolves to its own row; without one the HTTP row answers, as it did before the second row existed,
|
|
48
|
+
* and then every other envelope is searched in a fixed order. A code registered on only one envelope resolves
|
|
49
|
+
* whichever envelope is passed.
|
|
50
|
+
*/
|
|
51
|
+
declare function contractErrorFor(wireCode: string | null | undefined, envelope?: ContractErrorEnvelope): ContractErrorRow | undefined;
|
|
39
52
|
/**
|
|
40
53
|
* The registry's `doc_url` for a row. SITE-RELATIVE by construction: the contract records that there is
|
|
41
54
|
* no confirmed public documentation host to prefix it with, so the SDK publishes the path and never
|
|
42
55
|
* fabricates an origin. The SSE frames are namespaced (`#sse-timeout`) because a frame code and an HTTP
|
|
43
|
-
* code can share a name
|
|
44
|
-
*
|
|
56
|
+
* code can share a name, and the hosted MCP's OAuth codes the same way (`#oauth-invalid_grant`);
|
|
57
|
+
* `tests/contract/errorRegistry.test.ts` asserts this derivation reproduces the registry's own `doc_url`
|
|
58
|
+
* for every row, so the pattern cannot drift unnoticed.
|
|
45
59
|
*/
|
|
46
60
|
declare function contractDocUrl(entry: ContractErrorRow): string;
|
|
47
61
|
/**
|
|
@@ -62,4 +76,52 @@ declare const DOC_SITE_ORIGIN: string | null;
|
|
|
62
76
|
/** The emitted `docUrl`, or null while no page exists to point at. */
|
|
63
77
|
declare function publishedDocUrl(entry: ContractErrorRow): string | null;
|
|
64
78
|
|
|
65
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Parse a permissive colour into a normalized string (`#RRGGBB` when opaque, else `rgba(r,g,b,a)`), or null.
|
|
81
|
+
* Accepts `#RGB`, `#RRGGBB`, `#AARRGGBB`, `0xAARRGGBB` (string), a 32-bit ARGB `int`, and `rgb()/rgba()`.
|
|
82
|
+
* An empty string, whitespace, or an unrecognized value yields null.
|
|
83
|
+
*/
|
|
84
|
+
declare function parseColor(value: unknown): string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Return the more legible of near-black / white for `background` (WCAG 2.x contrast). Ported from Flutter
|
|
87
|
+
* `_readableOn`. Falls back to white for an unparseable background (never throws).
|
|
88
|
+
*/
|
|
89
|
+
declare function readableOn(background: string): string;
|
|
90
|
+
/**
|
|
91
|
+
* The WCAG contrast ratio between two colours (1..21). A translucent colour is composited onto the other before
|
|
92
|
+
* measuring, since that is what the eye sees. An unparseable colour measures as 1 (no contrast), never throws.
|
|
93
|
+
*/
|
|
94
|
+
declare function contrastRatio(a: string, b: string): number;
|
|
95
|
+
|
|
96
|
+
/** The SDK's dark `surfaceCream` (EVERFUR_DARK.color.surfaceCream): what the variant must read on. */
|
|
97
|
+
declare const DARK_VARIANT_GROUND = "#23272C";
|
|
98
|
+
/** The ratio the variant must reach on that ground and under the better of the two SDK inks (WCAG AA). */
|
|
99
|
+
declare const DARK_VARIANT_TARGET_RATIO = 4.5;
|
|
100
|
+
/** The tint band the lightness is clamped into, and the step it climbs by (HSL lightness, 0..1). */
|
|
101
|
+
declare const DARK_VARIANT_LIGHTNESS_FLOOR = 0.6;
|
|
102
|
+
declare const DARK_VARIANT_LIGHTNESS_CEILING = 0.9;
|
|
103
|
+
declare const DARK_VARIANT_LIGHTNESS_STEP = 0.02;
|
|
104
|
+
/**
|
|
105
|
+
* The dark-scheme twin of a light branding colour. The algorithm, step for step (the backend docstring is the
|
|
106
|
+
* reference; tests/unit/fixtures/dark_variant_vectors.json is the acceptance test):
|
|
107
|
+
* 1. parse the colour (any form `parseColor` reads; the backend takes `#RRGGBB` only);
|
|
108
|
+
* 2. HSL; keep h and s;
|
|
109
|
+
* 3. clamp l into 0.60..0.90 (a dark brand colour is lifted to the floor; a mid or light one keeps its
|
|
110
|
+
* lightness, capped);
|
|
111
|
+
* 4. for l_i = l_dark + i * 0.02 while l_i <= 0.90, return the first candidate that reaches 4.5:1 on the dark
|
|
112
|
+
* surface AND 4.5:1 under the better of white / near-black;
|
|
113
|
+
* 5. else the colour at the ceiling.
|
|
114
|
+
* Uppercase `#RRGGBB`; null for an unparseable colour (the backend raises there). Idempotent.
|
|
115
|
+
*/
|
|
116
|
+
declare function deriveDarkVariant(color: string): string | null;
|
|
117
|
+
/** The ratio text and borders are pushed toward under `prefers-contrast: more` (WCAG AAA body text). */
|
|
118
|
+
declare const HIGH_CONTRAST_TARGET_RATIO = 7;
|
|
119
|
+
/**
|
|
120
|
+
* The high-contrast derivation of a resolved theme. Text tokens and borders reach `HIGH_CONTRAST_TARGET_RATIO` on
|
|
121
|
+
* the palette's hardest surface (pushed toward black on light, white on dark); translucent washes become solid
|
|
122
|
+
* fills over `surface`. `onPrimary`/`onAccent` are left as the resolver computed them (already the legible pole).
|
|
123
|
+
* Pure: a new deeply-frozen theme with `highContrast: true`; the input is never mutated. Idempotent.
|
|
124
|
+
*/
|
|
125
|
+
declare function deriveHighContrast(theme: EverfurTheme): EverfurTheme;
|
|
126
|
+
|
|
127
|
+
export { CONTRACT_ERROR_ROWS, type ContractErrorEnvelope, type ContractErrorRow, type ContractWireErrorCode, DARK_VARIANT_GROUND, DARK_VARIANT_LIGHTNESS_CEILING, DARK_VARIANT_LIGHTNESS_FLOOR, DARK_VARIANT_LIGHTNESS_STEP, DARK_VARIANT_TARGET_RATIO, DOC_SITE_ORIGIN, EverfurErrorCode, EverfurTheme, HIGH_CONTRAST_TARGET_RATIO, contractDocUrl, contractErrorFor, contrastRatio, deriveDarkVariant, deriveHighContrast, parseColor, publishedDocUrl, readableOn };
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AUTO_RETRYABLE_CODES, B as BACKOFF_BASE_MS,
|
|
3
|
-
export { A as AcceptedFrame,
|
|
4
|
-
export { B as Brand,
|
|
5
|
-
export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { b as EverfurErrorCode } from '../EverfurResult-DN9pL2Ab.js';
|
|
2
|
+
export { A as AUTO_RETRYABLE_CODES, B as BACKOFF_BASE_MS, k as BACKOFF_CAP_MS, l as EVERFUR_ERROR_CATEGORIES, m as EVERFUR_ERROR_CODES, d as EverfurConfigError, E as EverfurError, a as EverfurErrorCategory, c as EverfurResult, e as EverfurThrownError, M as MAX_RETRY_ATTEMPTS, n as MakeEverfurErrorOptions, R as RETRYABLE_CONTRACT_CODES, o as backoffDelayMs, p as canRecreateOnNotFound, f as categoryFor, q as err, r as fromHttpStatus, s as fromWire, t as isAutoRetryable, i as isErr, g as isOk, h as isRetryableCode, v as makeEverfurError, w as ok, x as shouldRetry, u as unwrap, j as userFacingError } from '../EverfurResult-DN9pL2Ab.js';
|
|
3
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, k as ClientConfigFailureReason, l as ClientConfigOutcome, m as DEFAULT_CONTRACT_VERSION, D as DeltaFrame, c as DoneFrame, n as EMPTY_FRAME_ARRAYS, o as ENV_API_BASE_URL, E as ErrorFrame, p as EventSourceFactory, q as EventSourceInit, r as EventSourceLike, s as EventSourceMessage, t as EverfurConfig, d as EverfurRequest, e as EverfurRequestBase, u as FetchInit, j as FetchLike, v as FetchResponseLike, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, R as RawResponse, w as ReadableStreamLike, x as ResolveClientConfigOptions, y as ResolvedClientConfig, S as SDK_PLATFORM, z as SDK_VERSION, G as SdkPlatform, I as ServerRequestIdSource, J as TransportDeps, T as TransportPort, U as UnknownFrame, i as UrgencyLevel, K as acceptedFrame, L as analysisCompleteFrame, N as analysisStartedFrame, O as assertNever, P as bufferedTextByteSource, Q as buildBaseHeaders, V as checkPublishableKey, W as createHttpTransport, X as deltaFrame, Y as doneFrame, Z as errorFrame, _ as errorFromResponse, $ as eventSourceByteSource, a0 as eventSourceRequestId, a1 as fetchByteSource, a2 as getGlobalFetch, a3 as heartbeatFrame, a4 as networkError, a5 as parseSse, a6 as requestIdOf, a7 as requestJson, a8 as requestRaw, a9 as resolveApiBaseUrl, aa as resolveClientConfig, ab as tryResolveApiBaseUrl, ac as tryResolveClientConfig, ad as unknownFrame } from '../config-DW60uRb9.js';
|
|
4
|
+
export { B as Brand, a as ClientId, C as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, d as unsafeClientId, e as unsafeConversationId, f as unsafeDocumentId, g as unsafeJobId, h as unsafePetRef, i as unsafeRecordsRequestId, j as unsafeResponseId, k as unsafeUserRef, u as userRef } from '../ids-B2GAAifq.js';
|
|
5
|
+
export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, M as MintedToken, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-BMx2SUOM.js';
|
|
6
|
+
export { a as CapabilityDecision, b as CapabilityDisabled, C as CapabilityName, c as DecideOptions, D as DisabledLevel, E as EntitlementDecision, L as LevelGrant, R as ResolvedEntitlements, d as decideCapability, e as deniedDecisionsFor, r as requires, f as resolveEntitlements } from '../resolve-D4Ywz5OS.js';
|
|
7
|
+
import { a as EverfurTheme } from '../entitlementRepository-DSbzuyAW.js';
|
|
8
|
+
export { C as ClientBranding, D as DEFAULT_MAX_FONT_SCALE, F as EASING_CURVES, G as ENTITLEMENTS_PATH, H as EVERFUR_DARK, I as EVERFUR_LIGHT, J as EntitlementResolution, d as EverfurColorTokens, K as EverfurEasingCurve, b as EverfurFontFaceKey, e as EverfurFontFamilies, E as EverfurFontWeight, f as EverfurLetterSpacingTokens, g as EverfurLineHeightTokens, h as EverfurMotionDurationTokens, i as EverfurMotionTokens, j as EverfurRadiusTokens, k as EverfurSpaceTokens, l as EverfurSpringToken, m as EverfurTextColorTokens, L as EverfurTextScaleTier, n as EverfurThemeFontFaceKey, o as EverfurThemeFontUrlsInput, p as EverfurThemeFontsInput, c as EverfurThemeInput, q as EverfurThemeMeta, r as EverfurThemeSlot, s as EverfurThemeSlotInput, t as EverfurThemeSlotKey, u as EverfurThemeSlotName, v as EverfurThemeSlots, w as EverfurThemeSlotsInput, x as EverfurTypeSizeTokens, y as EverfurTypeTokens, z as EverfurWeightTokens, M as FetchEntitlementsArgs, N as LOCKABLE_THEME_FIELDS, O as LockableThemeField, P as MAX_FONT_SCALE_CEILING, R as RadiusScale, Q as ResolveThemeInput, U as SLOT_LOCK_PREFIX, V as SLOT_MIN_BORDER_CONTRAST, W as SLOT_MIN_CONTRAST, X as SYSTEM_FONT_FAMILY, Y as SYSTEM_MONO_FAMILY, Z as SlotGrounds, _ as SlotLockName, S as SurfaceStyle, $ as TEXT_SCALE_FLOOR, a0 as TEXT_SCALE_TIER_CAPS, a1 as THEME_SCHEMA_VERSIONS, T as THEME_SLOT_KEYS, A as THEME_SLOT_NAMES, a2 as ThemeLockName, a3 as cssCubicBezier, a4 as deepFreeze, a5 as fetchEntitlements, a6 as guardSlotContrast, a7 as hardenHttpsUrl, a8 as isEmptyBranding, a9 as isKnownBrandingSchema, aa as lockedFieldsOf, ab as mergeThemeSlots, ac as parseClientBranding, ad as parseThemeSlots, B as previewTheme, ae as resolveTheme, af as withServerBranding } from '../entitlementRepository-DSbzuyAW.js';
|
|
9
|
+
export { F as FunnelSendOptions, R as RequestFunnel, a as RequestFunnelDeps, c as createRequestFunnel } from '../requestFunnel-CjW7uDuA.js';
|
|
10
|
+
export { E as EverfurFaceStyle, f as face } from '../typeStyle-CWMsoe6b.js';
|
|
11
|
+
export { e as CHECKIN_ANSWERS, f as CasesRepository, C as CheckinAnswer, a as CheckinOutcome, g as PET_AGE_YEARS_MAX, h as PET_BREED_MAX, i as PET_NAME_MAX, j as PET_SPECIES_MAX, k as PET_WEIGHT_KG_MAX, P as PetProfileInput, c as PetProfilePatch, l as PetsRepository, R as RegisteredPet, W as WatchCase, b as WidgetPet, m as createCasesRepository, n as createPetsRepository, w as widgetPetFromWire } from '../casesRepository-ClLv6qMl.js';
|
|
12
|
+
import '../ErrorPolicyPort-CwbfmxzJ.js';
|
|
13
|
+
import '../profile-CSs1wlXT.js';
|
|
9
14
|
|
|
10
15
|
/** Which wire shape a code arrives in. The two envelopes are different objects, not casings. */
|
|
11
|
-
type ContractErrorEnvelope = "http_envelope" | "sse_frame";
|
|
16
|
+
type ContractErrorEnvelope = "http_envelope" | "oauth_error" | "sse_frame";
|
|
12
17
|
/** Every wire error code the contract declares, spelled EXACTLY as the server sends it. */
|
|
13
|
-
type ContractWireErrorCode = "AccessDeniedException" | "AuthorizationException" | "ConflictException" | "DAILY_QUOTA_EXCEEDED" | "IDEMPOTENCY_KEY_IN_FLIGHT" | "IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST" | "InternalFailureException" | "NotImplementedException" | "PaymentRequiredException" | "ResourceNotFoundException" | "ServiceUnavailableException" | "TIER_UPGRADE_REQUIRED" | "ThrottlingException" | "ValidationException" | "accessDenied" | "authExpired" | "internal_error" | "invalidRequest" | "not_found" | "session_required" | "timeout" | "unavailable";
|
|
18
|
+
type ContractWireErrorCode = "AccessDeniedException" | "AuthorizationException" | "ConflictException" | "DAILY_QUOTA_EXCEEDED" | "FILE_TOO_LARGE" | "IDEMPOTENCY_KEY_IN_FLIGHT" | "IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST" | "INVALID_CONTENT_TYPE" | "InternalFailureException" | "MethodNotAllowedException" | "NotImplementedException" | "PaymentRequiredException" | "ResourceNotFoundException" | "ServiceUnavailableException" | "TIER_UPGRADE_REQUIRED" | "ThrottlingException" | "ValidationException" | "accessDenied" | "access_denied" | "attachment_unreadable" | "authExpired" | "authRejected" | "consent_invalid" | "consent_required" | "consent_scope_wrong_route" | "device_cipher_unavailable" | "email_invalid" | "event_cursor_invalid" | "event_filter_invalid" | "event_payload_invalid" | "event_type_not_available" | "event_type_unknown" | "idempotency_key_invalid" | "idempotency_key_required" | "idempotency_key_reused" | "insufficientCapability" | "insufficient_scope" | "internal_error" | "invalidRequest" | "invalid_client" | "invalid_client_metadata" | "invalid_grant" | "invalid_redirect_uri" | "invalid_request" | "invalid_scope" | "invalid_target" | "mcp_connection_not_found" | "mcp_request_conflict" | "mcp_request_gone" | "mcp_request_not_found" | "not_found" | "partner_visit_link_conflict" | "partner_visit_owner_only" | "partner_visit_pet_already_mapped" | "payload_too_large" | "petRefInUse" | "pet_health_list_removals_unconfirmed" | "pet_health_species_unsupported" | "pet_not_registered" | "provider_unsupported" | "rateLimited" | "record_species_unsupported" | "record_subject_not_found" | "record_upload_invalid" | "records_consent_required" | "sandbox_only" | "session_required" | "share_limit_reached" | "slow_down" | "species_unsupported" | "tenant_filter_invalid" | "tenant_has_no_capabilities" | "tenant_resource_not_found" | "tenant_surface_not_enabled" | "timeout" | "token_invalid" | "unavailable" | "unsupported_grant_type" | "unsupported_response_type" | "verify_mint_rate_limited" | "verify_mint_refused" | "verify_mint_unavailable" | "verify_user_ref_invalid" | "webhook_endpoint_update_empty" | "webhook_endpoint_update_invalid" | "webhook_url_rejected";
|
|
14
19
|
|
|
15
20
|
/** One registry row, reduced to the facts the SDK needs at runtime. */
|
|
16
21
|
interface ContractErrorRow {
|
|
@@ -34,14 +39,23 @@ interface ContractErrorRow {
|
|
|
34
39
|
* exhaustive, so a code added to the contract fails `tsc` here rather than silently becoming `unknown`.
|
|
35
40
|
*/
|
|
36
41
|
declare const CONTRACT_ERROR_ROWS: readonly ContractErrorRow[];
|
|
37
|
-
/**
|
|
38
|
-
|
|
42
|
+
/**
|
|
43
|
+
* The registry row for a raw wire code, or undefined when the code is not in the contract.
|
|
44
|
+
*
|
|
45
|
+
* A code can ride SEVERAL envelopes as one row each (`unavailable`: the 503 body and the SSE frame a partner chat
|
|
46
|
+
* turn ends with). Pass the envelope the code arrived in when it is known (an SSE frame passes `'sse_frame'`) so
|
|
47
|
+
* such a code resolves to its own row; without one the HTTP row answers, as it did before the second row existed,
|
|
48
|
+
* and then every other envelope is searched in a fixed order. A code registered on only one envelope resolves
|
|
49
|
+
* whichever envelope is passed.
|
|
50
|
+
*/
|
|
51
|
+
declare function contractErrorFor(wireCode: string | null | undefined, envelope?: ContractErrorEnvelope): ContractErrorRow | undefined;
|
|
39
52
|
/**
|
|
40
53
|
* The registry's `doc_url` for a row. SITE-RELATIVE by construction: the contract records that there is
|
|
41
54
|
* no confirmed public documentation host to prefix it with, so the SDK publishes the path and never
|
|
42
55
|
* fabricates an origin. The SSE frames are namespaced (`#sse-timeout`) because a frame code and an HTTP
|
|
43
|
-
* code can share a name
|
|
44
|
-
*
|
|
56
|
+
* code can share a name, and the hosted MCP's OAuth codes the same way (`#oauth-invalid_grant`);
|
|
57
|
+
* `tests/contract/errorRegistry.test.ts` asserts this derivation reproduces the registry's own `doc_url`
|
|
58
|
+
* for every row, so the pattern cannot drift unnoticed.
|
|
45
59
|
*/
|
|
46
60
|
declare function contractDocUrl(entry: ContractErrorRow): string;
|
|
47
61
|
/**
|
|
@@ -62,4 +76,52 @@ declare const DOC_SITE_ORIGIN: string | null;
|
|
|
62
76
|
/** The emitted `docUrl`, or null while no page exists to point at. */
|
|
63
77
|
declare function publishedDocUrl(entry: ContractErrorRow): string | null;
|
|
64
78
|
|
|
65
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Parse a permissive colour into a normalized string (`#RRGGBB` when opaque, else `rgba(r,g,b,a)`), or null.
|
|
81
|
+
* Accepts `#RGB`, `#RRGGBB`, `#AARRGGBB`, `0xAARRGGBB` (string), a 32-bit ARGB `int`, and `rgb()/rgba()`.
|
|
82
|
+
* An empty string, whitespace, or an unrecognized value yields null.
|
|
83
|
+
*/
|
|
84
|
+
declare function parseColor(value: unknown): string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Return the more legible of near-black / white for `background` (WCAG 2.x contrast). Ported from Flutter
|
|
87
|
+
* `_readableOn`. Falls back to white for an unparseable background (never throws).
|
|
88
|
+
*/
|
|
89
|
+
declare function readableOn(background: string): string;
|
|
90
|
+
/**
|
|
91
|
+
* The WCAG contrast ratio between two colours (1..21). A translucent colour is composited onto the other before
|
|
92
|
+
* measuring, since that is what the eye sees. An unparseable colour measures as 1 (no contrast), never throws.
|
|
93
|
+
*/
|
|
94
|
+
declare function contrastRatio(a: string, b: string): number;
|
|
95
|
+
|
|
96
|
+
/** The SDK's dark `surfaceCream` (EVERFUR_DARK.color.surfaceCream): what the variant must read on. */
|
|
97
|
+
declare const DARK_VARIANT_GROUND = "#23272C";
|
|
98
|
+
/** The ratio the variant must reach on that ground and under the better of the two SDK inks (WCAG AA). */
|
|
99
|
+
declare const DARK_VARIANT_TARGET_RATIO = 4.5;
|
|
100
|
+
/** The tint band the lightness is clamped into, and the step it climbs by (HSL lightness, 0..1). */
|
|
101
|
+
declare const DARK_VARIANT_LIGHTNESS_FLOOR = 0.6;
|
|
102
|
+
declare const DARK_VARIANT_LIGHTNESS_CEILING = 0.9;
|
|
103
|
+
declare const DARK_VARIANT_LIGHTNESS_STEP = 0.02;
|
|
104
|
+
/**
|
|
105
|
+
* The dark-scheme twin of a light branding colour. The algorithm, step for step (the backend docstring is the
|
|
106
|
+
* reference; tests/unit/fixtures/dark_variant_vectors.json is the acceptance test):
|
|
107
|
+
* 1. parse the colour (any form `parseColor` reads; the backend takes `#RRGGBB` only);
|
|
108
|
+
* 2. HSL; keep h and s;
|
|
109
|
+
* 3. clamp l into 0.60..0.90 (a dark brand colour is lifted to the floor; a mid or light one keeps its
|
|
110
|
+
* lightness, capped);
|
|
111
|
+
* 4. for l_i = l_dark + i * 0.02 while l_i <= 0.90, return the first candidate that reaches 4.5:1 on the dark
|
|
112
|
+
* surface AND 4.5:1 under the better of white / near-black;
|
|
113
|
+
* 5. else the colour at the ceiling.
|
|
114
|
+
* Uppercase `#RRGGBB`; null for an unparseable colour (the backend raises there). Idempotent.
|
|
115
|
+
*/
|
|
116
|
+
declare function deriveDarkVariant(color: string): string | null;
|
|
117
|
+
/** The ratio text and borders are pushed toward under `prefers-contrast: more` (WCAG AAA body text). */
|
|
118
|
+
declare const HIGH_CONTRAST_TARGET_RATIO = 7;
|
|
119
|
+
/**
|
|
120
|
+
* The high-contrast derivation of a resolved theme. Text tokens and borders reach `HIGH_CONTRAST_TARGET_RATIO` on
|
|
121
|
+
* the palette's hardest surface (pushed toward black on light, white on dark); translucent washes become solid
|
|
122
|
+
* fills over `surface`. `onPrimary`/`onAccent` are left as the resolver computed them (already the legible pole).
|
|
123
|
+
* Pure: a new deeply-frozen theme with `highContrast: true`; the input is never mutated. Idempotent.
|
|
124
|
+
*/
|
|
125
|
+
declare function deriveHighContrast(theme: EverfurTheme): EverfurTheme;
|
|
126
|
+
|
|
127
|
+
export { CONTRACT_ERROR_ROWS, type ContractErrorEnvelope, type ContractErrorRow, type ContractWireErrorCode, DARK_VARIANT_GROUND, DARK_VARIANT_LIGHTNESS_CEILING, DARK_VARIANT_LIGHTNESS_FLOOR, DARK_VARIANT_LIGHTNESS_STEP, DARK_VARIANT_TARGET_RATIO, DOC_SITE_ORIGIN, EverfurErrorCode, EverfurTheme, HIGH_CONTRAST_TARGET_RATIO, contractDocUrl, contractErrorFor, contrastRatio, deriveDarkVariant, deriveHighContrast, parseColor, publishedDocUrl, readableOn };
|