@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
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import { E as EverfurProviderProps } from '../context-XvTzq1tE.cjs';
|
|
3
|
+
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from '../context-XvTzq1tE.cjs';
|
|
4
|
+
import { C as CapabilityName, a as CapabilityDecision } from '../resolve-D4Ywz5OS.cjs';
|
|
5
|
+
export { b as CapabilityDisabled, D as DisabledLevel } from '../resolve-D4Ywz5OS.cjs';
|
|
6
|
+
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from '../attachments-D8T5re7e.cjs';
|
|
7
|
+
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-D8T5re7e.cjs';
|
|
8
|
+
import { P as PetRef, C as ConversationId } from '../ids-B2GAAifq.cjs';
|
|
9
|
+
export { B as Brand, a as ClientId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as userRef } from '../ids-B2GAAifq.cjs';
|
|
10
|
+
import { a as ChatCheckinTarget } from '../ports-DEBzEhbp.cjs';
|
|
11
|
+
export { C as ChatCheckin, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatStatus, k as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from '../ports-DEBzEhbp.cjs';
|
|
12
|
+
import { P as PetProfileInput } from '../casesRepository-DHwtGRYY.cjs';
|
|
13
|
+
export { C as CheckinAnswer, a as CheckinOutcome, c as PetProfilePatch, R as RegisteredPet, W as WatchCase, b as WidgetPet, d as WidgetPetProfile } from '../casesRepository-DHwtGRYY.cjs';
|
|
14
|
+
export { d as EverfurConfigError, E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as EverfurResult, e as EverfurThrownError, f as categoryFor, i as isErr, g as isOk, h as isRetryableCode, u as unwrap, j as userFacingError } from '../EverfurResult-DN9pL2Ab.cjs';
|
|
15
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-CQgFrEQ7.cjs';
|
|
16
|
+
import { U as UploadTransport, F as FileHandle } from '../ports-BN6RHF9W.cjs';
|
|
17
|
+
export { b as FilePort, a as UploadPolicyWire } from '../ports-BN6RHF9W.cjs';
|
|
18
|
+
import { K as KvPort } from '../cacheEpoch-DknKn3S0.cjs';
|
|
19
|
+
export { I as ImageCachePort } from '../cacheEpoch-DknKn3S0.cjs';
|
|
20
|
+
export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from '../runtime-B8s-_hv8.cjs';
|
|
21
|
+
export { T as TelemetryPort } from '../TelemetryPort-BDNr00hu.cjs';
|
|
22
|
+
export { E as ErrorPolicyPort } from '../ErrorPolicyPort-CNf4uQZP.cjs';
|
|
23
|
+
export { C as CameraPort, a as CaptureOptions, M as MediaSource } from '../CameraPort-Cv31Pz7g.cjs';
|
|
24
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-CzTZGlfF.cjs';
|
|
25
|
+
import { c as EverfurThemeInput, E as EverfurFontWeight, a as EverfurTheme, b as EverfurFontFaceKey } from '../entitlementRepository-DKdXFgTo.cjs';
|
|
26
|
+
export { d as EverfurColorTokens, e as EverfurFontFamilies, f as EverfurLetterSpacingTokens, g as EverfurLineHeightTokens, h as EverfurMotionDurationTokens, i as EverfurMotionTokens, j as EverfurRadiusTokens, k as EverfurSpaceTokens, l as EverfurSpringToken, m as EverfurTextColorTokens, n as EverfurThemeFontFaceKey, o as EverfurThemeFontUrlsInput, p as EverfurThemeFontsInput, 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, T as THEME_SLOT_KEYS, A as THEME_SLOT_NAMES, B as previewTheme } from '../entitlementRepository-DKdXFgTo.cjs';
|
|
27
|
+
export { M as MintedToken, T as TokenProvider } from '../identity-DI4eVx9S.cjs';
|
|
28
|
+
export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../profile-CSs1wlXT.cjs';
|
|
29
|
+
export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from '../species-BXAIMh7I.cjs';
|
|
30
|
+
export { E as EverfurFaceStyle, f as face } from '../typeStyle-0TydiZ1w.cjs';
|
|
31
|
+
import '../requestFunnel-L-BQfi0z.cjs';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Wrap the tree ONCE, high. Mounting constructs the runtime (transport, identity, registry,
|
|
35
|
+
* entitlement repository, pollers) exactly once and starts fail-closed: a bad manifest/entitlement
|
|
36
|
+
* fetch falls to the compiled default and children render immediately, never a blank page.
|
|
37
|
+
* A config that cannot be resolved yields a DISABLED runtime (children still render, every capability
|
|
38
|
+
* off at `sdk_config`), never a throw: see `createEverfurRuntime`.
|
|
39
|
+
*/
|
|
40
|
+
declare function EverfurProvider(props: EverfurProviderProps): ReactNode;
|
|
41
|
+
|
|
42
|
+
interface CapabilityGateProps {
|
|
43
|
+
readonly capability: CapabilityName;
|
|
44
|
+
readonly children: ReactNode;
|
|
45
|
+
/** Override the default OffState. Receives the resolved decision (carries SAFE `disabled` copy). */
|
|
46
|
+
readonly renderDisabled?: (decision: CapabilityDecision) => ReactNode;
|
|
47
|
+
/** Override the default pending skeleton. */
|
|
48
|
+
readonly renderPending?: () => ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Merged over the gate's own container style. `| undefined` is admitted so a surface can forward its own
|
|
51
|
+
* exact-optional prop straight through.
|
|
52
|
+
*/
|
|
53
|
+
readonly style?: CSSProperties | undefined;
|
|
54
|
+
/** A class the host may hang its own layout rules on; the SDK sets no classes of its own. */
|
|
55
|
+
readonly className?: string | undefined;
|
|
56
|
+
}
|
|
57
|
+
declare function CapabilityGate(props: CapabilityGateProps): ReactNode;
|
|
58
|
+
|
|
59
|
+
interface EverfurChatProps {
|
|
60
|
+
readonly petRef?: PetRef;
|
|
61
|
+
readonly conversationId?: ConversationId;
|
|
62
|
+
/** Merged over the surface's own container style (and the gate's off-state). */
|
|
63
|
+
readonly style?: CSSProperties;
|
|
64
|
+
/** A class the host may hang its own layout rules on; the SDK sets no classes of its own. */
|
|
65
|
+
readonly className?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Your own placeholder for the two moments Everfur would otherwise draw a waiting view of its own: the
|
|
68
|
+
* entitlement verdict still pending, and the chat still bootstrapping on a cold mount. Return null to draw
|
|
69
|
+
* nothing. A mount `prepare()` warmed up never reaches either. Absent, Everfur's skeleton and delayed spinner.
|
|
70
|
+
*/
|
|
71
|
+
readonly renderPending?: () => ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* Called after the owner picks another pet in the header's switcher (the provider's active pet has already
|
|
74
|
+
* been switched through `handle.setActivePet`), so your own screen can follow.
|
|
75
|
+
*/
|
|
76
|
+
readonly onPetChange?: (petRef: PetRef) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Where the empty state's "Help me prep for {pet}'s vet visit" chip goes. Absent, the chip appears only while
|
|
79
|
+
* Everfur's own vet visit entry for chat is switched on for this user, and then opens that visit; without
|
|
80
|
+
* either, the chip is not shown (it is never sent as text).
|
|
81
|
+
*/
|
|
82
|
+
readonly onVetPrep?: (petRef: PetRef | null) => void;
|
|
83
|
+
/**
|
|
84
|
+
* The "Find a vet" action of an urgency banner when Everfur's own vet visit entry is not available to this
|
|
85
|
+
* user: called with the tier. Absent, the banner shows no action in that case.
|
|
86
|
+
*/
|
|
87
|
+
readonly onFindVet?: (level: UrgencyDisplayLevel) => void;
|
|
88
|
+
/** Your own node in the banner's action slot (wins over both the vet visit entry and `onFindVet`). */
|
|
89
|
+
readonly renderVetAction?: (level: UrgencyDisplayLevel) => ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* Image attachments on the composer. On by default (the browser is the picker and the uploader); `false`
|
|
92
|
+
* removes the control; `maxPerMessage` caps the slots per message (at most 5, the server's cap).
|
|
93
|
+
*/
|
|
94
|
+
readonly attachments?: false | {
|
|
95
|
+
readonly maxPerMessage?: number;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Voice dictation on the composer (the browser's own speech engine, no Everfur service). On by default; the
|
|
99
|
+
* control appears only in a browser that has an engine. `false` is the kill switch.
|
|
100
|
+
*/
|
|
101
|
+
readonly dictation?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* The pet this chat is about, as YOUR system holds it: the whole partner pet body (name, species, breed,
|
|
104
|
+
* age, weight, and every health field, allergies, medications, supplements and conditions included). Given
|
|
105
|
+
* with `petRef`, the surface registers it with Everfur once, before the first conversation, and then names
|
|
106
|
+
* it in the header and the switcher. Nothing is trimmed: what you pass is what is sent.
|
|
107
|
+
*/
|
|
108
|
+
readonly pet?: PetProfileInput;
|
|
109
|
+
/**
|
|
110
|
+
* Your own add-a-pet screen. Given, the switcher gets an `Add another pet` row, and a chat that cannot start
|
|
111
|
+
* because the `petRef` is not registered offers `Add a pet` in place of a retry that could only fail again.
|
|
112
|
+
* Absent, neither control is drawn: the partner plane never shows a route Everfur cannot honour.
|
|
113
|
+
*/
|
|
114
|
+
readonly onAddPet?: () => void;
|
|
115
|
+
/**
|
|
116
|
+
* The check-in a tapped Everfur push is about: the `case` target `parseEverfurNotification` returned. Chat
|
|
117
|
+
* opens that thread on mount, once per target, so a due follow-up question is the first thing the member
|
|
118
|
+
* sees instead of something they would have to find in the history drawer. Absent, chat opens as usual.
|
|
119
|
+
*/
|
|
120
|
+
readonly checkinTarget?: ChatCheckinTarget;
|
|
121
|
+
/**
|
|
122
|
+
* A question to ask on arrival, in a conversation of its own: the prompt one of your own screens built
|
|
123
|
+
* (an Everfur records "Ask Everfur" pill hands you one). It is asked once, after chat has finished
|
|
124
|
+
* opening, and the thread that was on screen is left behind so the answer is not buried in an unrelated
|
|
125
|
+
* conversation. Pass `composerSeed` instead when the user should decide whether to send it.
|
|
126
|
+
*/
|
|
127
|
+
readonly initialAsk?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Text to put in the composer on arrival. It is never sent for the user: they edit it, send it or clear
|
|
130
|
+
* it. Only an empty composer is seeded, so nothing they typed is ever replaced.
|
|
131
|
+
*/
|
|
132
|
+
readonly composerSeed?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Your app's lifecycle signals. Everfur has no socket and no polling here, so a message the platform
|
|
135
|
+
* writes into the thread (a follow-up check-in, a reminder) is not visible until something re-reads it.
|
|
136
|
+
* Tell Everfur when your page becomes visible again, when connectivity returns and when a push announced a
|
|
137
|
+
* change, and the thread and the unread dot catch up on that signal alone. Without this, chat refreshes
|
|
138
|
+
* only when the user does something.
|
|
139
|
+
*/
|
|
140
|
+
readonly lifecycle?: LifecyclePort;
|
|
141
|
+
/**
|
|
142
|
+
* Your own storage for an unsent draft. Given, what the user typed and did not send survives leaving this
|
|
143
|
+
* screen; absent, the draft lives in memory for as long as the surface is mounted and nowhere else.
|
|
144
|
+
* Everfur writes a draft down only through this.
|
|
145
|
+
*/
|
|
146
|
+
readonly draftStore?: EverfurChatDraftStore;
|
|
147
|
+
/**
|
|
148
|
+
* The KEY of a return destination your tenant registered with Everfur. Every vet entry inside chat (the
|
|
149
|
+
* header, the urgency banner's pill and the empty thread's vet-prep chip) then sends the user back to your
|
|
150
|
+
* app when the visit ends.
|
|
151
|
+
*/
|
|
152
|
+
readonly vetReturnTo?: string;
|
|
153
|
+
/**
|
|
154
|
+
* The user's US state (for example `'CA'`). Set it and no vet entry is drawn until Everfur confirms a visit
|
|
155
|
+
* is available there, so it is never offered to someone who could not book.
|
|
156
|
+
*/
|
|
157
|
+
readonly vetUsState?: string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Entitlement-gated, four-state chat surface. Entitlement-OFF renders the CapabilityGate OffState; otherwise
|
|
161
|
+
* the body maps the controller snapshot to exactly one deliberate state. The surface fills the box it is
|
|
162
|
+
* given (`height: 100%`): give its parent a height and the transcript scrolls inside it.
|
|
163
|
+
*/
|
|
164
|
+
declare function EverfurChat(props: EverfurChatProps): ReactNode;
|
|
165
|
+
|
|
166
|
+
interface WebAttachmentTransportOptions {
|
|
167
|
+
/** Test seam: the `fetch` to use. Defaults to the global one. A host has no reason to set it. */
|
|
168
|
+
readonly fetch?: typeof fetch;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* The browser chat attachment transport. The prebuilt web `EverfurChat` binds it on its own (the browser is
|
|
172
|
+
* the picker and the uploader; a host wires nothing). A handle with no `blob` rejects before any request.
|
|
173
|
+
*/
|
|
174
|
+
declare function createWebAttachmentTransport(options?: WebAttachmentTransportOptions): UploadTransport;
|
|
175
|
+
/**
|
|
176
|
+
* The chat `FileHandle` for a picked browser `File`: the bytes, the real size, the browser's type (the queue
|
|
177
|
+
* validates it against the accepted image types) and the local name, with a `blob:` preview URL as the `uri`.
|
|
178
|
+
* The caller owns the URL: `URL.revokeObjectURL(handle.uri)` when the preview is no longer shown.
|
|
179
|
+
*/
|
|
180
|
+
declare function fileToAttachmentHandle(file: File): FileHandle;
|
|
181
|
+
|
|
182
|
+
interface EverfurThemeProviderProps {
|
|
183
|
+
/**
|
|
184
|
+
* The clamped client `theme` prop, a first-paint/offline fallback merged UNDER the server branding. Any
|
|
185
|
+
* shape is tolerated (parsed defensively); unknown keys are ignored. Omit for the compiled default.
|
|
186
|
+
*/
|
|
187
|
+
readonly clientTheme?: EverfurThemeInput | null;
|
|
188
|
+
readonly children: ReactNode;
|
|
189
|
+
}
|
|
190
|
+
/** Compute + publish the resolved theme for a browser host. See `EverfurThemeProviderCore`. */
|
|
191
|
+
declare function EverfurThemeProvider(props: EverfurThemeProviderProps): ReactNode;
|
|
192
|
+
|
|
193
|
+
/** The CSS pair one face of the theme renders with. */
|
|
194
|
+
interface EverfurFaceCss {
|
|
195
|
+
readonly fontFamily: string;
|
|
196
|
+
readonly fontWeight: EverfurFontWeight;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The CSS `font-family` and `font-weight` of one face: the face's family (a text face ahead of the system
|
|
200
|
+
* stack, a mono face ahead of the mono stack) and the weight to request.
|
|
201
|
+
* - A base family (the platform font, `font_family`, or a `fonts` name repeated across weights) carries every
|
|
202
|
+
* weight itself, so the face's own weight token is requested (`monoBold` asks for 700 of the mono family).
|
|
203
|
+
* - A NAMED face (one per-weight name, the React Native convention: `Azeret-Bold`) has its weight baked in, so
|
|
204
|
+
* no weight of its own is added: it is requested at the normal weight, which is the weight the SDK loads it
|
|
205
|
+
* at (`loadBrandFont`) and the weight a host's plain `@font-face` declares. The browser matches it exactly
|
|
206
|
+
* and never synthesizes a second bold over a face that is already bold.
|
|
207
|
+
* The same `fonts` map therefore renders the same weights here and on React Native (`face()`).
|
|
208
|
+
*/
|
|
209
|
+
declare function faceCss(theme: EverfurTheme, weight: EverfurFontFaceKey): EverfurFaceCss;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* A KvPort over `localStorage`, namespaced. Every method resolves; none rejects. Absent storage reads as
|
|
213
|
+
* empty and writes as no-ops, which the runtime already handles as its in-memory posture.
|
|
214
|
+
*/
|
|
215
|
+
declare function createLocalStorageKv(): KvPort;
|
|
216
|
+
|
|
217
|
+
export { CapabilityDecision, CapabilityGate, type CapabilityGateProps, CapabilityName, ChatCheckinTarget, ConversationId, EverfurChat, EverfurChatDraftStore, type EverfurChatProps, type EverfurFaceCss, EverfurFontFaceKey, EverfurFontWeight, EverfurProvider, EverfurProviderProps, EverfurTheme, EverfurThemeInput, EverfurThemeProvider, type EverfurThemeProviderProps, FileHandle, KvPort, LifecyclePort, PetProfileInput, PetRef, UploadTransport, UrgencyDisplayLevel, type WebAttachmentTransportOptions, createLocalStorageKv, createWebAttachmentTransport, faceCss, fileToAttachmentHandle };
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import { E as EverfurProviderProps } from '../context-DXhqHlPU.js';
|
|
3
|
+
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from '../context-DXhqHlPU.js';
|
|
4
|
+
import { C as CapabilityName, a as CapabilityDecision } from '../resolve-D4Ywz5OS.js';
|
|
5
|
+
export { b as CapabilityDisabled, D as DisabledLevel } from '../resolve-D4Ywz5OS.js';
|
|
6
|
+
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from '../attachments-5NeobOCd.js';
|
|
7
|
+
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-5NeobOCd.js';
|
|
8
|
+
import { P as PetRef, C as ConversationId } from '../ids-B2GAAifq.js';
|
|
9
|
+
export { B as Brand, a as ClientId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as userRef } from '../ids-B2GAAifq.js';
|
|
10
|
+
import { a as ChatCheckinTarget } from '../ports-DMolTRzU.js';
|
|
11
|
+
export { C as ChatCheckin, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatStatus, k as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from '../ports-DMolTRzU.js';
|
|
12
|
+
import { P as PetProfileInput } from '../casesRepository-ClLv6qMl.js';
|
|
13
|
+
export { C as CheckinAnswer, a as CheckinOutcome, c as PetProfilePatch, R as RegisteredPet, W as WatchCase, b as WidgetPet, d as WidgetPetProfile } from '../casesRepository-ClLv6qMl.js';
|
|
14
|
+
export { d as EverfurConfigError, E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as EverfurResult, e as EverfurThrownError, f as categoryFor, i as isErr, g as isOk, h as isRetryableCode, u as unwrap, j as userFacingError } from '../EverfurResult-DN9pL2Ab.js';
|
|
15
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-Bw3iMQgu.js';
|
|
16
|
+
import { U as UploadTransport, F as FileHandle } from '../ports-BN6RHF9W.js';
|
|
17
|
+
export { b as FilePort, a as UploadPolicyWire } from '../ports-BN6RHF9W.js';
|
|
18
|
+
import { K as KvPort } from '../cacheEpoch-DknKn3S0.js';
|
|
19
|
+
export { I as ImageCachePort } from '../cacheEpoch-DknKn3S0.js';
|
|
20
|
+
export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from '../runtime-BR9ysG0J.js';
|
|
21
|
+
export { T as TelemetryPort } from '../TelemetryPort-BDNr00hu.js';
|
|
22
|
+
export { E as ErrorPolicyPort } from '../ErrorPolicyPort-CwbfmxzJ.js';
|
|
23
|
+
export { C as CameraPort, a as CaptureOptions, M as MediaSource } from '../CameraPort-Cv31Pz7g.js';
|
|
24
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-DW60uRb9.js';
|
|
25
|
+
import { c as EverfurThemeInput, E as EverfurFontWeight, a as EverfurTheme, b as EverfurFontFaceKey } from '../entitlementRepository-DSbzuyAW.js';
|
|
26
|
+
export { d as EverfurColorTokens, e as EverfurFontFamilies, f as EverfurLetterSpacingTokens, g as EverfurLineHeightTokens, h as EverfurMotionDurationTokens, i as EverfurMotionTokens, j as EverfurRadiusTokens, k as EverfurSpaceTokens, l as EverfurSpringToken, m as EverfurTextColorTokens, n as EverfurThemeFontFaceKey, o as EverfurThemeFontUrlsInput, p as EverfurThemeFontsInput, 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, T as THEME_SLOT_KEYS, A as THEME_SLOT_NAMES, B as previewTheme } from '../entitlementRepository-DSbzuyAW.js';
|
|
27
|
+
export { M as MintedToken, T as TokenProvider } from '../identity-BMx2SUOM.js';
|
|
28
|
+
export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../profile-CSs1wlXT.js';
|
|
29
|
+
export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from '../species-BXAIMh7I.js';
|
|
30
|
+
export { E as EverfurFaceStyle, f as face } from '../typeStyle-CWMsoe6b.js';
|
|
31
|
+
import '../requestFunnel-CjW7uDuA.js';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Wrap the tree ONCE, high. Mounting constructs the runtime (transport, identity, registry,
|
|
35
|
+
* entitlement repository, pollers) exactly once and starts fail-closed: a bad manifest/entitlement
|
|
36
|
+
* fetch falls to the compiled default and children render immediately, never a blank page.
|
|
37
|
+
* A config that cannot be resolved yields a DISABLED runtime (children still render, every capability
|
|
38
|
+
* off at `sdk_config`), never a throw: see `createEverfurRuntime`.
|
|
39
|
+
*/
|
|
40
|
+
declare function EverfurProvider(props: EverfurProviderProps): ReactNode;
|
|
41
|
+
|
|
42
|
+
interface CapabilityGateProps {
|
|
43
|
+
readonly capability: CapabilityName;
|
|
44
|
+
readonly children: ReactNode;
|
|
45
|
+
/** Override the default OffState. Receives the resolved decision (carries SAFE `disabled` copy). */
|
|
46
|
+
readonly renderDisabled?: (decision: CapabilityDecision) => ReactNode;
|
|
47
|
+
/** Override the default pending skeleton. */
|
|
48
|
+
readonly renderPending?: () => ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Merged over the gate's own container style. `| undefined` is admitted so a surface can forward its own
|
|
51
|
+
* exact-optional prop straight through.
|
|
52
|
+
*/
|
|
53
|
+
readonly style?: CSSProperties | undefined;
|
|
54
|
+
/** A class the host may hang its own layout rules on; the SDK sets no classes of its own. */
|
|
55
|
+
readonly className?: string | undefined;
|
|
56
|
+
}
|
|
57
|
+
declare function CapabilityGate(props: CapabilityGateProps): ReactNode;
|
|
58
|
+
|
|
59
|
+
interface EverfurChatProps {
|
|
60
|
+
readonly petRef?: PetRef;
|
|
61
|
+
readonly conversationId?: ConversationId;
|
|
62
|
+
/** Merged over the surface's own container style (and the gate's off-state). */
|
|
63
|
+
readonly style?: CSSProperties;
|
|
64
|
+
/** A class the host may hang its own layout rules on; the SDK sets no classes of its own. */
|
|
65
|
+
readonly className?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Your own placeholder for the two moments Everfur would otherwise draw a waiting view of its own: the
|
|
68
|
+
* entitlement verdict still pending, and the chat still bootstrapping on a cold mount. Return null to draw
|
|
69
|
+
* nothing. A mount `prepare()` warmed up never reaches either. Absent, Everfur's skeleton and delayed spinner.
|
|
70
|
+
*/
|
|
71
|
+
readonly renderPending?: () => ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* Called after the owner picks another pet in the header's switcher (the provider's active pet has already
|
|
74
|
+
* been switched through `handle.setActivePet`), so your own screen can follow.
|
|
75
|
+
*/
|
|
76
|
+
readonly onPetChange?: (petRef: PetRef) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Where the empty state's "Help me prep for {pet}'s vet visit" chip goes. Absent, the chip appears only while
|
|
79
|
+
* Everfur's own vet visit entry for chat is switched on for this user, and then opens that visit; without
|
|
80
|
+
* either, the chip is not shown (it is never sent as text).
|
|
81
|
+
*/
|
|
82
|
+
readonly onVetPrep?: (petRef: PetRef | null) => void;
|
|
83
|
+
/**
|
|
84
|
+
* The "Find a vet" action of an urgency banner when Everfur's own vet visit entry is not available to this
|
|
85
|
+
* user: called with the tier. Absent, the banner shows no action in that case.
|
|
86
|
+
*/
|
|
87
|
+
readonly onFindVet?: (level: UrgencyDisplayLevel) => void;
|
|
88
|
+
/** Your own node in the banner's action slot (wins over both the vet visit entry and `onFindVet`). */
|
|
89
|
+
readonly renderVetAction?: (level: UrgencyDisplayLevel) => ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* Image attachments on the composer. On by default (the browser is the picker and the uploader); `false`
|
|
92
|
+
* removes the control; `maxPerMessage` caps the slots per message (at most 5, the server's cap).
|
|
93
|
+
*/
|
|
94
|
+
readonly attachments?: false | {
|
|
95
|
+
readonly maxPerMessage?: number;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Voice dictation on the composer (the browser's own speech engine, no Everfur service). On by default; the
|
|
99
|
+
* control appears only in a browser that has an engine. `false` is the kill switch.
|
|
100
|
+
*/
|
|
101
|
+
readonly dictation?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* The pet this chat is about, as YOUR system holds it: the whole partner pet body (name, species, breed,
|
|
104
|
+
* age, weight, and every health field, allergies, medications, supplements and conditions included). Given
|
|
105
|
+
* with `petRef`, the surface registers it with Everfur once, before the first conversation, and then names
|
|
106
|
+
* it in the header and the switcher. Nothing is trimmed: what you pass is what is sent.
|
|
107
|
+
*/
|
|
108
|
+
readonly pet?: PetProfileInput;
|
|
109
|
+
/**
|
|
110
|
+
* Your own add-a-pet screen. Given, the switcher gets an `Add another pet` row, and a chat that cannot start
|
|
111
|
+
* because the `petRef` is not registered offers `Add a pet` in place of a retry that could only fail again.
|
|
112
|
+
* Absent, neither control is drawn: the partner plane never shows a route Everfur cannot honour.
|
|
113
|
+
*/
|
|
114
|
+
readonly onAddPet?: () => void;
|
|
115
|
+
/**
|
|
116
|
+
* The check-in a tapped Everfur push is about: the `case` target `parseEverfurNotification` returned. Chat
|
|
117
|
+
* opens that thread on mount, once per target, so a due follow-up question is the first thing the member
|
|
118
|
+
* sees instead of something they would have to find in the history drawer. Absent, chat opens as usual.
|
|
119
|
+
*/
|
|
120
|
+
readonly checkinTarget?: ChatCheckinTarget;
|
|
121
|
+
/**
|
|
122
|
+
* A question to ask on arrival, in a conversation of its own: the prompt one of your own screens built
|
|
123
|
+
* (an Everfur records "Ask Everfur" pill hands you one). It is asked once, after chat has finished
|
|
124
|
+
* opening, and the thread that was on screen is left behind so the answer is not buried in an unrelated
|
|
125
|
+
* conversation. Pass `composerSeed` instead when the user should decide whether to send it.
|
|
126
|
+
*/
|
|
127
|
+
readonly initialAsk?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Text to put in the composer on arrival. It is never sent for the user: they edit it, send it or clear
|
|
130
|
+
* it. Only an empty composer is seeded, so nothing they typed is ever replaced.
|
|
131
|
+
*/
|
|
132
|
+
readonly composerSeed?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Your app's lifecycle signals. Everfur has no socket and no polling here, so a message the platform
|
|
135
|
+
* writes into the thread (a follow-up check-in, a reminder) is not visible until something re-reads it.
|
|
136
|
+
* Tell Everfur when your page becomes visible again, when connectivity returns and when a push announced a
|
|
137
|
+
* change, and the thread and the unread dot catch up on that signal alone. Without this, chat refreshes
|
|
138
|
+
* only when the user does something.
|
|
139
|
+
*/
|
|
140
|
+
readonly lifecycle?: LifecyclePort;
|
|
141
|
+
/**
|
|
142
|
+
* Your own storage for an unsent draft. Given, what the user typed and did not send survives leaving this
|
|
143
|
+
* screen; absent, the draft lives in memory for as long as the surface is mounted and nowhere else.
|
|
144
|
+
* Everfur writes a draft down only through this.
|
|
145
|
+
*/
|
|
146
|
+
readonly draftStore?: EverfurChatDraftStore;
|
|
147
|
+
/**
|
|
148
|
+
* The KEY of a return destination your tenant registered with Everfur. Every vet entry inside chat (the
|
|
149
|
+
* header, the urgency banner's pill and the empty thread's vet-prep chip) then sends the user back to your
|
|
150
|
+
* app when the visit ends.
|
|
151
|
+
*/
|
|
152
|
+
readonly vetReturnTo?: string;
|
|
153
|
+
/**
|
|
154
|
+
* The user's US state (for example `'CA'`). Set it and no vet entry is drawn until Everfur confirms a visit
|
|
155
|
+
* is available there, so it is never offered to someone who could not book.
|
|
156
|
+
*/
|
|
157
|
+
readonly vetUsState?: string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Entitlement-gated, four-state chat surface. Entitlement-OFF renders the CapabilityGate OffState; otherwise
|
|
161
|
+
* the body maps the controller snapshot to exactly one deliberate state. The surface fills the box it is
|
|
162
|
+
* given (`height: 100%`): give its parent a height and the transcript scrolls inside it.
|
|
163
|
+
*/
|
|
164
|
+
declare function EverfurChat(props: EverfurChatProps): ReactNode;
|
|
165
|
+
|
|
166
|
+
interface WebAttachmentTransportOptions {
|
|
167
|
+
/** Test seam: the `fetch` to use. Defaults to the global one. A host has no reason to set it. */
|
|
168
|
+
readonly fetch?: typeof fetch;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* The browser chat attachment transport. The prebuilt web `EverfurChat` binds it on its own (the browser is
|
|
172
|
+
* the picker and the uploader; a host wires nothing). A handle with no `blob` rejects before any request.
|
|
173
|
+
*/
|
|
174
|
+
declare function createWebAttachmentTransport(options?: WebAttachmentTransportOptions): UploadTransport;
|
|
175
|
+
/**
|
|
176
|
+
* The chat `FileHandle` for a picked browser `File`: the bytes, the real size, the browser's type (the queue
|
|
177
|
+
* validates it against the accepted image types) and the local name, with a `blob:` preview URL as the `uri`.
|
|
178
|
+
* The caller owns the URL: `URL.revokeObjectURL(handle.uri)` when the preview is no longer shown.
|
|
179
|
+
*/
|
|
180
|
+
declare function fileToAttachmentHandle(file: File): FileHandle;
|
|
181
|
+
|
|
182
|
+
interface EverfurThemeProviderProps {
|
|
183
|
+
/**
|
|
184
|
+
* The clamped client `theme` prop, a first-paint/offline fallback merged UNDER the server branding. Any
|
|
185
|
+
* shape is tolerated (parsed defensively); unknown keys are ignored. Omit for the compiled default.
|
|
186
|
+
*/
|
|
187
|
+
readonly clientTheme?: EverfurThemeInput | null;
|
|
188
|
+
readonly children: ReactNode;
|
|
189
|
+
}
|
|
190
|
+
/** Compute + publish the resolved theme for a browser host. See `EverfurThemeProviderCore`. */
|
|
191
|
+
declare function EverfurThemeProvider(props: EverfurThemeProviderProps): ReactNode;
|
|
192
|
+
|
|
193
|
+
/** The CSS pair one face of the theme renders with. */
|
|
194
|
+
interface EverfurFaceCss {
|
|
195
|
+
readonly fontFamily: string;
|
|
196
|
+
readonly fontWeight: EverfurFontWeight;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The CSS `font-family` and `font-weight` of one face: the face's family (a text face ahead of the system
|
|
200
|
+
* stack, a mono face ahead of the mono stack) and the weight to request.
|
|
201
|
+
* - A base family (the platform font, `font_family`, or a `fonts` name repeated across weights) carries every
|
|
202
|
+
* weight itself, so the face's own weight token is requested (`monoBold` asks for 700 of the mono family).
|
|
203
|
+
* - A NAMED face (one per-weight name, the React Native convention: `Azeret-Bold`) has its weight baked in, so
|
|
204
|
+
* no weight of its own is added: it is requested at the normal weight, which is the weight the SDK loads it
|
|
205
|
+
* at (`loadBrandFont`) and the weight a host's plain `@font-face` declares. The browser matches it exactly
|
|
206
|
+
* and never synthesizes a second bold over a face that is already bold.
|
|
207
|
+
* The same `fonts` map therefore renders the same weights here and on React Native (`face()`).
|
|
208
|
+
*/
|
|
209
|
+
declare function faceCss(theme: EverfurTheme, weight: EverfurFontFaceKey): EverfurFaceCss;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* A KvPort over `localStorage`, namespaced. Every method resolves; none rejects. Absent storage reads as
|
|
213
|
+
* empty and writes as no-ops, which the runtime already handles as its in-memory posture.
|
|
214
|
+
*/
|
|
215
|
+
declare function createLocalStorageKv(): KvPort;
|
|
216
|
+
|
|
217
|
+
export { CapabilityDecision, CapabilityGate, type CapabilityGateProps, CapabilityName, ChatCheckinTarget, ConversationId, EverfurChat, EverfurChatDraftStore, type EverfurChatProps, type EverfurFaceCss, EverfurFontFaceKey, EverfurFontWeight, EverfurProvider, EverfurProviderProps, EverfurTheme, EverfurThemeInput, EverfurThemeProvider, type EverfurThemeProviderProps, FileHandle, KvPort, LifecyclePort, PetProfileInput, PetRef, UploadTransport, UrgencyDisplayLevel, type WebAttachmentTransportOptions, createLocalStorageKv, createWebAttachmentTransport, faceCss, fileToAttachmentHandle };
|