@everfur/sdk 0.9.1 → 0.9.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/CHANGELOG.md +56 -0
- package/README.md +1 -1
- package/dist/{Chat-DbHkTbqz.d.cts → Chat-Bkv-MLLu.d.cts} +3 -3
- package/dist/{Chat-BoVmqEeF.d.ts → Chat-Dy1L27a8.d.ts} +3 -3
- package/dist/{DepthViews-yO1H371y.d.ts → DepthViews-BwyzpEyX.d.ts} +1 -1
- package/dist/{DepthViews-DK7EJ6Hp.d.cts → DepthViews-CBalhef3.d.cts} +1 -1
- package/dist/{DepthViews-BzwflaJ3.d.ts → DepthViews-De6yb5Tq.d.ts} +1 -1
- package/dist/{DepthViews-Chyp69Ue.d.cts → DepthViews-eRdy2ayE.d.cts} +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/{attachments-BmMrn9tU.d.ts → attachments-BAcQdIz7.d.ts} +5 -5
- package/dist/{attachments-Dcb19rMP.d.ts → attachments-Brt7ivEo.d.ts} +2 -2
- package/dist/{attachments-B7TrtyfH.d.cts → attachments-DhGAelCA.d.cts} +2 -2
- package/dist/{attachments-Dnpqk1Gl.d.cts → attachments-tPWJ0DJI.d.cts} +5 -5
- package/dist/{bookingCopy-DR0-SmqH.d.ts → bookingCopy-CJLAgEgK.d.ts} +2 -2
- package/dist/{bookingCopy-C153FHEC.d.cts → bookingCopy-Ds2JGcPE.d.cts} +2 -2
- package/dist/{callCopy-DHjem0R-.d.cts → callCopy-Bw6oZT54.d.cts} +7 -2
- package/dist/{callCopy-DHjem0R-.d.ts → callCopy-Bw6oZT54.d.ts} +7 -2
- package/dist/{casesRepository-DC9lEQez.d.cts → casesRepository-D0aQSXkb.d.cts} +1 -1
- package/dist/{casesRepository-BXdwCWQF.d.ts → casesRepository-DjhMfm_n.d.ts} +1 -1
- package/dist/chat/index.cjs +9 -8
- package/dist/chat/index.d.cts +9 -9
- package/dist/chat/index.d.ts +9 -9
- package/dist/chat/index.js +9 -8
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +6 -6
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +1 -1
- package/dist/{config-BRyNmzhx.d.cts → config-C68HTCf4.d.cts} +1 -1
- package/dist/{config-DdK2czhD.d.ts → config-DeUmccwl.d.ts} +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/{context-jaONuHXM.d.cts → context-DY9pcjdK.d.cts} +5 -5
- package/dist/{context-_EyjBNKI.d.ts → context-D_2sCvoo.d.ts} +5 -5
- package/dist/{copy-D8iSBQE6.d.cts → copy-tYW0C83H.d.cts} +2 -2
- package/dist/{copy-BJpRsqK-.d.ts → copy-wAnv8ldC.d.ts} +2 -2
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +12 -12
- package/dist/core/index.d.ts +12 -12
- package/dist/core/index.js +1 -1
- package/dist/{depth-bKpg3L9r.d.ts → depth-C7RIscDR.d.ts} +2 -2
- package/dist/{depth-DJ1KGMww.d.cts → depth-jbSWsweM.d.cts} +2 -2
- package/dist/{entitlementRepository-4x_tBE73.d.cts → entitlementRepository-Ccc6K6wB.d.cts} +2 -2
- package/dist/{entitlementRepository-CojBLazH.d.ts → entitlementRepository-D7Fc7OdG.d.ts} +2 -2
- package/dist/{identity-A8fVB518.d.ts → identity-BTT6YtH5.d.ts} +1 -1
- package/dist/{identity-CmxZ4GR0.d.cts → identity-ScajqjK5.d.cts} +1 -1
- package/dist/index.cjs +10 -9
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +10 -9
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/{pets-e5RjSP6O.d.ts → pets-CqeoV1Jv.d.ts} +1 -1
- package/dist/{pets-DjBlY7yg.d.cts → pets-uKMldfz0.d.cts} +1 -1
- package/dist/{petsRepository-DkQ2fwZY.d.cts → petsRepository-BYe7_MUo.d.cts} +1 -1
- package/dist/{petsRepository-CQh8paML.d.ts → petsRepository-BdfbY9Oe.d.ts} +1 -1
- package/dist/{ports-CzVBbI_A.d.ts → ports-D4FQKTBS.d.ts} +4 -4
- package/dist/{ports-2voZkqty.d.cts → ports-okLpXkpu.d.cts} +4 -4
- package/dist/records/depth/index.cjs +6 -4
- package/dist/records/depth/index.d.cts +7 -7
- package/dist/records/depth/index.d.ts +7 -7
- package/dist/records/depth/index.js +6 -4
- package/dist/records/index.cjs +19 -17
- package/dist/records/index.d.cts +9 -9
- package/dist/records/index.d.ts +9 -9
- package/dist/records/index.js +19 -17
- package/dist/{requestFunnel-CQ42Kf9G.d.ts → requestFunnel-Dhaj0yUq.d.ts} +2 -2
- package/dist/{requestFunnel-CA0ANsWj.d.cts → requestFunnel-u8qnM5Ll.d.cts} +2 -2
- package/dist/{runtimeTypes-C0tI7s-V.d.ts → runtimeTypes-BFes64Vp.d.ts} +4 -4
- package/dist/{runtimeTypes-BxtQXaYi.d.cts → runtimeTypes-C67itXfp.d.cts} +4 -4
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.d.cts +2 -2
- package/dist/server/events/index.d.ts +2 -2
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/televet/booking/index.cjs +1 -1
- package/dist/televet/booking/index.d.cts +6 -6
- package/dist/televet/booking/index.d.ts +6 -6
- package/dist/televet/booking/index.js +1 -1
- package/dist/televet/call/index.cjs +3 -5
- package/dist/televet/call/index.d.cts +1 -1
- package/dist/televet/call/index.d.ts +1 -1
- package/dist/televet/call/index.js +3 -5
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/rn/index.d.cts +7 -7
- package/dist/testing/rn/index.d.ts +7 -7
- package/dist/testing/web/index.d.cts +7 -7
- package/dist/testing/web/index.d.ts +7 -7
- package/dist/{timelineRows-WFv_3EOi.d.cts → timelineRows-CDSO3ElK.d.cts} +1 -1
- package/dist/{timelineRows-GSpzKLla.d.ts → timelineRows-pd4wYVbe.d.ts} +1 -1
- package/dist/{useRecordsDepth-BQF0Zynl.d.ts → useRecordsDepth-CqSMkcyR.d.ts} +1 -1
- package/dist/{useRecordsDepth-BL5Pf3oK.d.cts → useRecordsDepth-W3UAKQRN.d.cts} +1 -1
- package/dist/{view-rgB1iqWO.d.ts → view-CKfIaJYp.d.ts} +8 -2
- package/dist/{view-D3kOelPL.d.cts → view-h7RPJAEe.d.cts} +8 -2
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/index.cjs +7 -5
- package/dist/web/index.d.cts +14 -14
- package/dist/web/index.d.ts +14 -14
- package/dist/web/index.js +7 -5
- package/dist/web/notifications/index.d.cts +3 -3
- package/dist/web/notifications/index.d.ts +3 -3
- package/dist/web/records/depth/index.cjs +5 -4
- package/dist/web/records/depth/index.d.cts +7 -7
- package/dist/web/records/depth/index.d.ts +7 -7
- package/dist/web/records/depth/index.js +6 -5
- package/dist/web/records/index.cjs +10 -9
- package/dist/web/records/index.d.cts +9 -9
- package/dist/web/records/index.d.ts +9 -9
- package/dist/web/records/index.js +10 -9
- package/dist/web/televet/booking/index.cjs +1 -1
- package/dist/web/televet/booking/index.d.cts +6 -6
- package/dist/web/televet/booking/index.d.ts +6 -6
- package/dist/web/televet/booking/index.js +1 -1
- package/dist/web/televet/call/index.cjs +3 -5
- package/dist/web/televet/call/index.d.cts +1 -1
- package/dist/web/televet/call/index.d.ts +1 -1
- package/dist/web/televet/call/index.js +3 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,62 @@ changes that has not been earned by any production integration yet.
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.9.3] - 2026-10-06
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **The chat header no longer draws the `Vet` entry over the partner logo (React Native and web).** On React
|
|
18
|
+
Native the logo sat in a layer laid over the whole bar and the vet entry was laid out in the row on top of it, so
|
|
19
|
+
the logo was hidden whenever a pet was in scope. On the web the logo kept its full width on a narrow box and
|
|
20
|
+
painted under the entry. The header is now three slots in one row: the history controls at the leading edge, the
|
|
21
|
+
logo in the centre, and the vet entry then the pet avatar at the trailing edge. The logo is centred on the bar
|
|
22
|
+
when there is room; with less room it moves off centre rather than under a control, and on a very narrow bar it
|
|
23
|
+
shrinks inside its own slot (contained, never cropped). The `header` slot paint covers the whole bar as before,
|
|
24
|
+
the bar mirrors under right-to-left layouts, and the logo keeps the partner's display name as its accessible
|
|
25
|
+
name. No API change.
|
|
26
|
+
|
|
27
|
+
## [0.9.2] - 2026-10-04
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- **The records screens no longer say a clinic was emailed on a test account (web and React Native).** A test
|
|
32
|
+
account (a sandbox tenant, entitlements `livemode: false`) never emails a clinic, yet the request rail read
|
|
33
|
+
`Clinic notified` with `A secure request went to {email}.`, and the consent step for a clinic added by email
|
|
34
|
+
read `We'll email this clinic directly...`. On a test account every records screen now draws one line under
|
|
35
|
+
its header, `Test account: clinics are never contacted. Use records test mode to move a request forward.`; rail
|
|
36
|
+
step 2 reads `Clinic not contacted` with `This is a test account, so no email went to {email}.`; and the consent
|
|
37
|
+
note reads `This is a test account, so this clinic will not be emailed.` A live tenant, and a verdict with no
|
|
38
|
+
`livemode`, read exactly as before. The check is the visit simulator's (`livemode === false`, the server's
|
|
39
|
+
value). `buildRequestTimeline` takes a new optional `sandbox` flag for the rail words. Owner-approved wording
|
|
40
|
+
(2026-10-04, rows O1 to O4).
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
|
|
44
|
+
- **Owner-approved copy (2026-10-04).** The in-app vet call strings (`VET_CALL_COPY`, rows Q1 to Q19), the chat's
|
|
45
|
+
unnamed-vet label `Your vet` (L1) and the partner docs slots (R1 to R4) are approved as written, with these
|
|
46
|
+
changes:
|
|
47
|
+
- the vet call lobby no longer shows `Usually under a minute` (Q10): a timing promise nothing measures.
|
|
48
|
+
`VET_CALL_COPY.lobbySubtitle` stays on the public type so this release is not breaking, but it is now an
|
|
49
|
+
empty string marked `@deprecated` that no SDK surface draws. A host that read it should drop the line too;
|
|
50
|
+
- `VET_CALL_COPY.lobbyPrepLabel` is `While you wait` (Q11), sentence case. The React Native label still draws
|
|
51
|
+
it in capitals through its style; the web tips heading draws it as written;
|
|
52
|
+
- the web clinic picker's spoken result count reads `Showing {n} clinics`, or `Showing 1 clinic` (M1), in
|
|
53
|
+
place of a draft slot;
|
|
54
|
+
- the partner demo apps' records consent text is `This is an Everfur demo app. Tap Allow to let it show your
|
|
55
|
+
pet's medical records from Everfur here.` (N1).
|
|
56
|
+
|
|
57
|
+
### Deprecated
|
|
58
|
+
|
|
59
|
+
- **`VET_CALL_COPY.lobbySubtitle`** (`@everfur/sdk/televet/call` and `@everfur/sdk/web/televet/call`). Its value is
|
|
60
|
+
now `''` and nothing in the SDK renders it; it is kept only so code written against `^0.9.0` still compiles.
|
|
61
|
+
Stop reading it. It may be removed in a later minor release.
|
|
62
|
+
|
|
63
|
+
### Documentation
|
|
64
|
+
|
|
65
|
+
- 00-QUICKSTART opens with the sandbox sentence (R1). 10-TESTING names the console action, "Create a test
|
|
66
|
+
account" (R2), and quotes the live/test switch and its test banner (R3). 15-EVENTS-AND-WEBHOOKS opens with the
|
|
67
|
+
approved line (R4); the rest of that chapter's prose is still marked as awaiting approval.
|
|
68
|
+
|
|
13
69
|
## [0.9.1] - 2026-10-04
|
|
14
70
|
|
|
15
71
|
### Added
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ features without shipping an app update.
|
|
|
10
10
|
a blank screen, and cannot be force-enabled client-side.
|
|
11
11
|
- The app never holds a secret. See [The security model](#the-security-model).
|
|
12
12
|
|
|
13
|
-
> `0.9.
|
|
13
|
+
> `0.9.3`, MIT licensed, public on npm. Requires React Native `>=0.74` (or React `>=18` with `react-dom`
|
|
14
14
|
> for the web entry), and Node `>=18` on the backend that mints sessions.
|
|
15
15
|
|
|
16
16
|
<!-- DRAFT COPY slot PD1-2 (owner): the README's invitation to get started (self-serve sandbox sign-up), in the owner's words. The factual paragraph below stands without it. -->
|
|
@@ -2,9 +2,9 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import { P as PetRef, C as ConversationId } from './ids-B2GAAifq.cjs';
|
|
4
4
|
import { F as FileHandle } from './ports-BN6RHF9W.cjs';
|
|
5
|
-
import { a as ChatCheckinTarget } from './ports-
|
|
6
|
-
import { W as WidgetPet, P as PetProfileInput } from './petsRepository-
|
|
7
|
-
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from './attachments-
|
|
5
|
+
import { a as ChatCheckinTarget } from './ports-okLpXkpu.cjs';
|
|
6
|
+
import { W as WidgetPet, P as PetProfileInput } from './petsRepository-BYe7_MUo.cjs';
|
|
7
|
+
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from './attachments-tPWJ0DJI.cjs';
|
|
8
8
|
|
|
9
9
|
/** Where a picked image comes from: the host's photo library, or its camera. */
|
|
10
10
|
type AttachmentSource = 'photo' | 'camera';
|
|
@@ -2,9 +2,9 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import { P as PetRef, C as ConversationId } from './ids-B2GAAifq.js';
|
|
4
4
|
import { F as FileHandle } from './ports-BN6RHF9W.js';
|
|
5
|
-
import { a as ChatCheckinTarget } from './ports-
|
|
6
|
-
import { W as WidgetPet, P as PetProfileInput } from './petsRepository-
|
|
7
|
-
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from './attachments-
|
|
5
|
+
import { a as ChatCheckinTarget } from './ports-D4FQKTBS.js';
|
|
6
|
+
import { W as WidgetPet, P as PetProfileInput } from './petsRepository-BdfbY9Oe.js';
|
|
7
|
+
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from './attachments-BAcQdIz7.js';
|
|
8
8
|
|
|
9
9
|
/** Where a picked image comes from: the host's photo library, or its camera. */
|
|
10
10
|
type AttachmentSource = 'photo' | 'camera';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { f as RecordsScreenBaseProps } from './useRecordsDepth-
|
|
2
|
+
import { f as RecordsScreenBaseProps } from './useRecordsDepth-CqSMkcyR.js';
|
|
3
3
|
|
|
4
4
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
5
5
|
readonly style?: CSSProperties;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { f as RecordsScreenBaseProps } from './useRecordsDepth-
|
|
2
|
+
import { f as RecordsScreenBaseProps } from './useRecordsDepth-W3UAKQRN.cjs';
|
|
3
3
|
|
|
4
4
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
5
5
|
readonly style?: CSSProperties;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { f as RecordsScreenBaseProps } from './useRecordsDepth-
|
|
3
|
+
import { f as RecordsScreenBaseProps } from './useRecordsDepth-CqSMkcyR.js';
|
|
4
4
|
|
|
5
5
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
6
6
|
readonly style?: StyleProp<ViewStyle>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { f as RecordsScreenBaseProps } from './useRecordsDepth-
|
|
3
|
+
import { f as RecordsScreenBaseProps } from './useRecordsDepth-W3UAKQRN.cjs';
|
|
4
4
|
|
|
5
5
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
6
6
|
readonly style?: StyleProp<ViewStyle>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import { E as EverfurResult } from '../EverfurResult-COlXj1wq.cjs';
|
|
4
|
-
import { A as AuthContext } from '../identity-
|
|
5
|
-
export { I as IdentityProvider, n as newSessionId } from '../identity-
|
|
4
|
+
import { A as AuthContext } from '../identity-ScajqjK5.cjs';
|
|
5
|
+
export { I as IdentityProvider, n as newSessionId } from '../identity-ScajqjK5.cjs';
|
|
6
6
|
import { P as PetRef } from '../ids-B2GAAifq.cjs';
|
|
7
7
|
export { B as Brand, U as UserRef, _ as __brand } from '../ids-B2GAAifq.cjs';
|
|
8
8
|
import { z } from 'zod';
|
|
@@ -13,7 +13,7 @@ import { E as EverfurError } from '../EverfurError-DeBqRpQV.cjs';
|
|
|
13
13
|
export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError-DeBqRpQV.cjs';
|
|
14
14
|
import { D as DisabledLevel, a as CapabilityDecision } from '../resolve-D4Ywz5OS.cjs';
|
|
15
15
|
export { b as CapabilityDisabled, C as CapabilityName } from '../resolve-D4Ywz5OS.cjs';
|
|
16
|
-
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-
|
|
16
|
+
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-C68HTCf4.cjs';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* The full /state payload. `degraded` + `cache_epoch` + `cache_key` are additive fields an older backend
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import { E as EverfurResult } from '../EverfurResult-ClPTS0P2.js';
|
|
4
|
-
import { A as AuthContext } from '../identity-
|
|
5
|
-
export { I as IdentityProvider, n as newSessionId } from '../identity-
|
|
4
|
+
import { A as AuthContext } from '../identity-BTT6YtH5.js';
|
|
5
|
+
export { I as IdentityProvider, n as newSessionId } from '../identity-BTT6YtH5.js';
|
|
6
6
|
import { P as PetRef } from '../ids-B2GAAifq.js';
|
|
7
7
|
export { B as Brand, U as UserRef, _ as __brand } from '../ids-B2GAAifq.js';
|
|
8
8
|
import { z } from 'zod';
|
|
@@ -13,7 +13,7 @@ import { E as EverfurError } from '../EverfurError-DeBqRpQV.js';
|
|
|
13
13
|
export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError-DeBqRpQV.js';
|
|
14
14
|
import { D as DisabledLevel, a as CapabilityDecision } from '../resolve-D4Ywz5OS.js';
|
|
15
15
|
export { b as CapabilityDisabled, C as CapabilityName } from '../resolve-D4Ywz5OS.js';
|
|
16
|
-
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-
|
|
16
|
+
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-DeUmccwl.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* The full /state payload. `degraded` + `cache_epoch` + `cache_key` are additive fields an older backend
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.js';
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult-ClPTS0P2.js';
|
|
3
3
|
import { C as ConversationId, P as PetRef, b as ResponseId } from './ids-B2GAAifq.js';
|
|
4
|
-
import { f as ChatFeedbackType, l as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-
|
|
5
|
-
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-
|
|
6
|
-
import { i as UrgencyLevel } from './config-
|
|
7
|
-
import { W as WidgetPet } from './petsRepository-
|
|
4
|
+
import { f as ChatFeedbackType, l as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-D4FQKTBS.js';
|
|
5
|
+
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-DjhMfm_n.js';
|
|
6
|
+
import { i as UrgencyLevel } from './config-DeUmccwl.js';
|
|
7
|
+
import { W as WidgetPet } from './petsRepository-BdfbY9Oe.js';
|
|
8
8
|
import { U as UploadTransport, F as FileHandle } from './ports-BN6RHF9W.js';
|
|
9
|
-
import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-
|
|
9
|
+
import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-Brt7ivEo.js';
|
|
10
10
|
|
|
11
11
|
/** The three thumbs. `'neutral'` is the app's rotated thumbs-down glyph. */
|
|
12
12
|
type ChatSentiment = 'up' | 'neutral' | 'down';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.js';
|
|
2
|
-
import { R as RequestFunnel } from './requestFunnel-
|
|
2
|
+
import { R as RequestFunnel } from './requestFunnel-Dhaj0yUq.js';
|
|
3
3
|
import { F as FileHandle, U as UploadTransport, a as UploadPolicyWire } from './ports-BN6RHF9W.js';
|
|
4
|
-
import { R as ReadableStore, T as Timers } from './ports-
|
|
4
|
+
import { R as ReadableStore, T as Timers } from './ports-D4FQKTBS.js';
|
|
5
5
|
|
|
6
6
|
/** The image MIME types the chat accepts (the server's `CHAT_ATTACHMENT` rule, plus the `image/jpg` alias). */
|
|
7
7
|
declare const ATTACHMENT_MIME_TYPES: readonly string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.cjs';
|
|
2
|
-
import { R as RequestFunnel } from './requestFunnel-
|
|
2
|
+
import { R as RequestFunnel } from './requestFunnel-u8qnM5Ll.cjs';
|
|
3
3
|
import { F as FileHandle, U as UploadTransport, a as UploadPolicyWire } from './ports-BN6RHF9W.cjs';
|
|
4
|
-
import { R as ReadableStore, T as Timers } from './ports-
|
|
4
|
+
import { R as ReadableStore, T as Timers } from './ports-okLpXkpu.cjs';
|
|
5
5
|
|
|
6
6
|
/** The image MIME types the chat accepts (the server's `CHAT_ATTACHMENT` rule, plus the `image/jpg` alias). */
|
|
7
7
|
declare const ATTACHMENT_MIME_TYPES: readonly string[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.cjs';
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult-COlXj1wq.cjs';
|
|
3
3
|
import { C as ConversationId, P as PetRef, b as ResponseId } from './ids-B2GAAifq.cjs';
|
|
4
|
-
import { f as ChatFeedbackType, l as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-
|
|
5
|
-
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-
|
|
6
|
-
import { i as UrgencyLevel } from './config-
|
|
7
|
-
import { W as WidgetPet } from './petsRepository-
|
|
4
|
+
import { f as ChatFeedbackType, l as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-okLpXkpu.cjs';
|
|
5
|
+
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-D0aQSXkb.cjs';
|
|
6
|
+
import { i as UrgencyLevel } from './config-C68HTCf4.cjs';
|
|
7
|
+
import { W as WidgetPet } from './petsRepository-BYe7_MUo.cjs';
|
|
8
8
|
import { U as UploadTransport, F as FileHandle } from './ports-BN6RHF9W.cjs';
|
|
9
|
-
import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-
|
|
9
|
+
import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-DhGAelCA.cjs';
|
|
10
10
|
|
|
11
11
|
/** The three thumbs. `'neutral'` is the app's rotated thumbs-down glyph. */
|
|
12
12
|
type ChatSentiment = 'up' | 'neutral' | 'down';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as TelevetStatePolicy, k as TelevetBookingEntitlement, l as TelevetCancellationPolicy, m as TelevetClinician, c as TelevetSlot, n as TelevetSlotHold, j as TelevetBookingBody, T as TelevetConsult, b as TelevetCancelReceipt, p as TelevetTriageVerdict, h as ConsultStatus } from './televetGlobal-CnjrfhT4.js';
|
|
2
2
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.js';
|
|
3
3
|
import { E as EverfurResult } from './EverfurResult-ClPTS0P2.js';
|
|
4
|
-
import { R as RequestFunnel } from './requestFunnel-
|
|
5
|
-
import { A as AuthContext } from './identity-
|
|
4
|
+
import { R as RequestFunnel } from './requestFunnel-Dhaj0yUq.js';
|
|
5
|
+
import { A as AuthContext } from './identity-BTT6YtH5.js';
|
|
6
6
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort-C3nNSS_j.js';
|
|
7
7
|
import { T as TelemetryPort } from './TelemetryPort-BDNr00hu.js';
|
|
8
8
|
import { b as VetCallCredential, c as VetCallJoinRefusal } from './callRoom-B92eH_ij.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as TelevetStatePolicy, k as TelevetBookingEntitlement, l as TelevetCancellationPolicy, m as TelevetClinician, c as TelevetSlot, n as TelevetSlotHold, j as TelevetBookingBody, T as TelevetConsult, b as TelevetCancelReceipt, p as TelevetTriageVerdict, h as ConsultStatus } from './televetGlobal-C5dTUACe.cjs';
|
|
2
2
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.cjs';
|
|
3
3
|
import { E as EverfurResult } from './EverfurResult-COlXj1wq.cjs';
|
|
4
|
-
import { R as RequestFunnel } from './requestFunnel-
|
|
5
|
-
import { A as AuthContext } from './identity-
|
|
4
|
+
import { R as RequestFunnel } from './requestFunnel-u8qnM5Ll.cjs';
|
|
5
|
+
import { A as AuthContext } from './identity-ScajqjK5.cjs';
|
|
6
6
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort-10s3HJCt.cjs';
|
|
7
7
|
import { T as TelemetryPort } from './TelemetryPort-BDNr00hu.cjs';
|
|
8
8
|
import { b as VetCallCredential, c as VetCallJoinRefusal } from './callRoom-BhIdadyV.cjs';
|
|
@@ -22,8 +22,13 @@ declare const VET_CALL_COPY: Readonly<{
|
|
|
22
22
|
speakerOnCta: "Speaker on";
|
|
23
23
|
/** The lobby: the member is in the room and the clinician is not. */
|
|
24
24
|
lobbyTitleNoName: "Your vet is joining";
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Since 0.9.2. Always an empty string, and no SDK surface draws it. The owner dropped
|
|
27
|
+
* "Usually under a minute" (2026-10-04, Q10): a timing promise nothing measures. Kept only so a host that
|
|
28
|
+
* read it still builds on `^0.9.0`; drop the line from your lobby. It may be removed in a later minor release.
|
|
29
|
+
*/
|
|
30
|
+
lobbySubtitle: "";
|
|
31
|
+
lobbyPrepLabel: "While you wait";
|
|
27
32
|
lobbyPrepNoPet: "Have your pet nearby and somewhere well lit.";
|
|
28
33
|
/** `{name}` is DATA from the consult, never a key. Absent, `lobbyTitleNoName` is used instead. */
|
|
29
34
|
lobbyTitle: (clinicianName: string | null | undefined) => string;
|
|
@@ -22,8 +22,13 @@ declare const VET_CALL_COPY: Readonly<{
|
|
|
22
22
|
speakerOnCta: "Speaker on";
|
|
23
23
|
/** The lobby: the member is in the room and the clinician is not. */
|
|
24
24
|
lobbyTitleNoName: "Your vet is joining";
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Since 0.9.2. Always an empty string, and no SDK surface draws it. The owner dropped
|
|
27
|
+
* "Usually under a minute" (2026-10-04, Q10): a timing promise nothing measures. Kept only so a host that
|
|
28
|
+
* read it still builds on `^0.9.0`; drop the line from your lobby. It may be removed in a later minor release.
|
|
29
|
+
*/
|
|
30
|
+
lobbySubtitle: "";
|
|
31
|
+
lobbyPrepLabel: "While you wait";
|
|
27
32
|
lobbyPrepNoPet: "Have your pet nearby and somewhere well lit.";
|
|
28
33
|
/** `{name}` is DATA from the consult, never a key. Absent, `lobbyTitleNoName` is used instead. */
|
|
29
34
|
lobbyTitle: (clinicianName: string | null | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EverfurResult } from './EverfurResult-COlXj1wq.cjs';
|
|
2
|
-
import { A as AuthContext } from './identity-
|
|
2
|
+
import { A as AuthContext } from './identity-ScajqjK5.cjs';
|
|
3
3
|
import { P as PetRef } from './ids-B2GAAifq.cjs';
|
|
4
4
|
|
|
5
5
|
/** The owner's answer to a check-in, the wire values of the consumer `CheckinResponse` enum. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EverfurResult } from './EverfurResult-ClPTS0P2.js';
|
|
2
|
-
import { A as AuthContext } from './identity-
|
|
2
|
+
import { A as AuthContext } from './identity-BTT6YtH5.js';
|
|
3
3
|
import { P as PetRef } from './ids-B2GAAifq.js';
|
|
4
4
|
|
|
5
5
|
/** The owner's answer to a check-in, the wire values of the consumer `CheckinResponse` enum. */
|
package/dist/chat/index.cjs
CHANGED
|
@@ -177,7 +177,7 @@ return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[null,
|
|
|
177
177
|
return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[
|
|
178
178
|
/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>{if(!(busy||settling.current)){if(!redirecting){let request={...petRef!==void 0?{petRef:petRef}:{},...usState!==void 0?{usState:usState}:{},...visitRef!=null?{visitRef:visitRef,intent:intent??null}:{}};openVetVisitInApp(request,onStartInApp)===null&&callHost(onError,"unavailable",null);return}settling.current=true,(visitRef==null?visit.open():visit.openVisit(visitRef,intent??null)).then(result=>{result.opened?callHost(onOpened,result.flowId??null):result.reason!=="cancelled"&&callHost(onError,result.reason,result.error)}).finally(()=>{settling.current=false})}},accessibilityRole:"button",accessibilityLabel:text3,accessibilityState:{busy:busy,disabled:busy},style:[styles2.button,busy?styles2.busy:null,style],children:/* @__PURE__ */jsxRuntime.jsx(Text,{style:[styles2.label,labelStyle],children:text3})}),
|
|
179
179
|
/* @__PURE__ */jsxRuntime.jsx(EverfurTelevetHost,{})]})}function makeStyles4(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme;return reactNative.StyleSheet.create({button:{minHeight:MIN_TOUCH_TARGET,minWidth:MIN_TOUCH_TARGET,alignItems:"center",justifyContent:"center",paddingHorizontal:space.xl,paddingVertical:space.sm,borderRadius:radius.pill,backgroundColor:color.primary,...slotBox(slots.vetVisitButton)},busy:{opacity:BUSY_OPACITY},label:{...face(theme,"medium"),color:color.onPrimary,fontSize:type.size.body,lineHeight:type.size.body*type.lineHeight.snug,...slotText(slots.vetVisitButton)}})}function useBrandImage(uri){let[failed,setFailed]=react.useState(null);return{shown:uri!==null&&failed!==uri,onError:()=>setFailed(uri)}}function BrandImage({uri:uri,label:label,decorative:decorative=false,style:style,resizeMode:resizeMode="contain",fallback:fallback=null,onError:onError,testID:testID}){let image=useBrandImage(uri);if(uri===null||!image.shown)return fallback;let a11y=decorative?{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}:{accessible:true,accessibilityRole:"image",...label===void 0?{}:{accessibilityLabel:label}};/* @__PURE__ */
|
|
180
|
-
return jsxRuntime.jsx(reactNative.Image,{source:{uri:uri},style:style,resizeMode:resizeMode,...a11y,onError:()=>{image.onError(),onError?.()},...testID===void 0?{}:{testID:testID}})}function BrandLogo({logoUrl:logoUrl,name:name,barStyle:barStyle,logoStyle:logoStyle,testID:testID}){let image=useBrandImage(logoUrl);return logoUrl===null||!image.shown?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:barStyle,...testID===void 0?{}:{testID:testID},children:/* @__PURE__ */jsxRuntime.jsx(reactNative.Image,{source:{uri:logoUrl},style:logoStyle,resizeMode:"contain",accessible:true,accessibilityRole:"image",accessibilityLabel:name,onError:image.onError})})}function grounds(c){return[c.surface,c.surfaceCream,c.surfaceSubtle,c.background,c.chatGround,c.composerFill]}function isEverfurLightLook(theme){if(theme.brightness!=="light")return false;let compiled=EVERFUR_LIGHT.color,c=theme.color,same=(a,b)=>parseColor(a)===parseColor(b),own=new Set(grounds(compiled));return same(c.brand,compiled.brand)&&same(c.accent,compiled.accent)&&grounds(c).every(ground=>own.has(ground))}function brandedStatus(theme){let compiled=(theme.brightness==="dark"?EVERFUR_DARK:EVERFUR_LIGHT).color,c=theme.color,same=(a,b)=>parseColor(a)===parseColor(b);return{success:!same(c.success,compiled.success),warning:!same(c.warningStrong,compiled.warningStrong)||!same(c.cautionAccent,compiled.cautionAccent),info:!(same(c.info,c.brandInk)&&same(c.badgeBgInfo,c.brandSoft)&&same(c.infoEdge,c.structureEdge))}}function speciesOf(species){return canonicalPetSpecies(species)==="cat"?"cat":"dog"}function petAgeYears(ageYears){return typeof ageYears!="number"||!Number.isFinite(ageYears)||ageYears<0?null:Math.floor(ageYears)}function formatPetMeta(pet){let ageYears=petAgeYears(pet.ageYears),speciesLabel=speciesOf(pet.species)==="cat"?"Cat":"Dog";if(ageYears==null)return speciesLabel;let ageLabel=ageYears===1?"1 yr":`${ageYears} yrs`;return`${speciesLabel} · ${ageLabel}`}var INITIALS_PALETTE=/* @__PURE__ */Object.freeze([
|
|
180
|
+
return jsxRuntime.jsx(reactNative.Image,{source:{uri:uri},style:style,resizeMode:resizeMode,...a11y,onError:()=>{image.onError(),onError?.()},...testID===void 0?{}:{testID:testID}})}function BrandLogo({logoUrl:logoUrl,name:name,barStyle:barStyle,logoStyle:logoStyle,testID:testID}){let image=useBrandImage(logoUrl);return logoUrl===null||!image.shown?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:barStyle,...testID===void 0?{}:{testID:testID},children:/* @__PURE__ */jsxRuntime.jsx(reactNative.Image,{source:{uri:logoUrl},style:logoStyle,resizeMode:"contain",accessible:true,accessibilityRole:"image",accessibilityLabel:name,onError:image.onError})})}var UNMEASURED=/* @__PURE__ */Object.freeze({row:null,leading:null,trailing:null}),NO_BALANCE=/* @__PURE__ */Object.freeze({leading:void 0,trailing:void 0});function balanceHeaderSides(m,reserved,logoWidth){if(m.row===null||m.leading===null||m.trailing===null)return NO_BALANCE;let difference=Math.abs(m.leading-m.trailing);if(difference<.5)return NO_BALANCE;let centre=m.row-reserved-m.leading-m.trailing,spare=Math.min(difference,Math.max(0,centre-logoWidth));return spare<.5?NO_BALANCE:m.leading<m.trailing?{leading:m.leading+spare,trailing:void 0}:{leading:void 0,trailing:m.trailing+spare}}function nextMeasures(prev,key,width){let old=prev[key];return old!==null&&Math.abs(old-width)<.5?prev:{...prev,[key]:width}}function grounds(c){return[c.surface,c.surfaceCream,c.surfaceSubtle,c.background,c.chatGround,c.composerFill]}function isEverfurLightLook(theme){if(theme.brightness!=="light")return false;let compiled=EVERFUR_LIGHT.color,c=theme.color,same=(a,b)=>parseColor(a)===parseColor(b),own=new Set(grounds(compiled));return same(c.brand,compiled.brand)&&same(c.accent,compiled.accent)&&grounds(c).every(ground=>own.has(ground))}function brandedStatus(theme){let compiled=(theme.brightness==="dark"?EVERFUR_DARK:EVERFUR_LIGHT).color,c=theme.color,same=(a,b)=>parseColor(a)===parseColor(b);return{success:!same(c.success,compiled.success),warning:!same(c.warningStrong,compiled.warningStrong)||!same(c.cautionAccent,compiled.cautionAccent),info:!(same(c.info,c.brandInk)&&same(c.badgeBgInfo,c.brandSoft)&&same(c.infoEdge,c.structureEdge))}}function speciesOf(species){return canonicalPetSpecies(species)==="cat"?"cat":"dog"}function petAgeYears(ageYears){return typeof ageYears!="number"||!Number.isFinite(ageYears)||ageYears<0?null:Math.floor(ageYears)}function formatPetMeta(pet){let ageYears=petAgeYears(pet.ageYears),speciesLabel=speciesOf(pet.species)==="cat"?"Cat":"Dog";if(ageYears==null)return speciesLabel;let ageLabel=ageYears===1?"1 yr":`${ageYears} yrs`;return`${speciesLabel} · ${ageLabel}`}var INITIALS_PALETTE=/* @__PURE__ */Object.freeze([
|
|
181
181
|
/* @__PURE__ */Object.freeze({background:"#ffbdbd",foreground:"#6d1d14"}),
|
|
182
182
|
/* @__PURE__ */Object.freeze({background:"#a0c4f6",foreground:"#0b3a73"}),
|
|
183
183
|
/* @__PURE__ */Object.freeze({background:"#fbc558",foreground:"#10462e"}),
|
|
@@ -196,16 +196,17 @@ return jsxRuntime.jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel
|
|
|
196
196
|
/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:styles2.meta,numberOfLines:1,children:isActive?`${CHAT_COPY.activePrefix}${meta}`:meta})]}),isActive?/* @__PURE__ */jsxRuntime.jsx(CheckGlyph,{size:CHECK_SIZE,color:theme.color.brandInk}):null]},pet.petRef)})}),onAddPet!==null?/* @__PURE__ */jsxRuntime.jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.addAnotherPet,style:styles2.addRow,onPress:onAddPet,children:[
|
|
197
197
|
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.addDisc,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles2.addPlus,children:"+"})}),
|
|
198
198
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.addLabel,children:CHAT_COPY.addAnotherPet})]}):null,
|
|
199
|
-
/* @__PURE__ */jsxRuntime.jsx(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.close,containerStyle:styles2.closeSlot,style:styles2.closeButton,onPress:onClose,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles2.closeText,children:CHAT_COPY.close})})]})]})}):null}function makeStyles6(theme){let c=theme.color,r=theme.radius,dialogText=slotText(theme.slots.dialog);return reactNative.StyleSheet.create({root:{flex:1,justifyContent:"flex-end"},backdrop:{flex:1,backgroundColor:BACKDROP2},panel:{backgroundColor:c.surface,paddingHorizontal:20,paddingTop:20,paddingBottom:32,borderTopLeftRadius:PANEL_RADIUS,borderTopRightRadius:PANEL_RADIUS,gap:14,maxHeight:PANEL_MAX_HEIGHT,...sheetSlotBox(theme.slots.dialog)},title:{...headingFace(theme,"bold"),fontSize:18,lineHeight:22,color:c.brandInk,...dialogText},list:{maxHeight:LIST_MAX_HEIGHT,flexShrink:1},listContent:{gap:10},addRow:{flexDirection:"row",alignItems:"center",gap:12,minHeight:MIN_TOUCH_TARGET2,paddingHorizontal:8},addDisc:{width:ROW_RING_SIZE,height:ROW_RING_SIZE,borderRadius:r.pill,alignItems:"center",justifyContent:"center",borderWidth:ROW_RING_STROKE,borderStyle:"dashed",borderColor:c.brandBorder,backgroundColor:c.surfaceCream},addPlus:{...face(theme,"bold"),fontSize:20,lineHeight:22,color:c.brandInk},addLabel:{...face(theme,"bold"),fontSize:15,lineHeight:20,color:c.text.primary,...dialogText},row:{flexDirection:"row",alignItems:"center",gap:12,padding:12,borderRadius:r.md,borderWidth:1,borderColor:c.brandBorder,backgroundColor:c.surface},rowActive:{borderColor:c.brandInk,backgroundColor:c.brandSoft},copy:{flex:1,gap:2},name:{...face(theme,"bold"),fontSize:15,lineHeight:18,color:c.text.primary},meta:{...face(theme,"monoBold"),fontSize:11,lineHeight:13,color:c.text.muted,textTransform:"uppercase",letterSpacing:META_TRACKING},closeSlot:{alignSelf:"flex-end"},closeButton:{paddingHorizontal:18,paddingVertical:10,borderRadius:CLOSE_RADIUS,backgroundColor:c.brandSoft},closeText:{...face(theme,"bold"),color:c.brandInk,fontSize:13,lineHeight:16,letterSpacing:META_TRACKING}})}var MIN_TOUCH_TARGET3=44,ICON_BUTTON_SIZE=36,MENU_GLYPH_SIZE=22,UNREAD_DOT_SIZE=9,UNREAD_DOT_RING=1.5,UNREAD_DOT_INSET=6,HEADER_AVATAR_SIZE=35,HEADER_RING_STROKE=1.75,ADD_BADGE_SIZE=12.4,ADD_BADGE_BORDER=.5,ADD_BADGE_GLYPH=8,LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160;function headerPet(pets,petRef){return headerPetOf(pets,petRef)}function ChatHeader({pets:pets,petRef:petRef,historyUnread:historyUnread,onOpenHistory:onOpenHistory,onPetChange:onPetChange,onAddPet:onAddPet,vet:vet}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles7(theme),[theme]),[switcherOpen,setSwitcherOpen]=react.useState(false),shown=headerPet(pets.pets,petRef),canSwitch=pets.pets.length>=2,shownPetRef=petRef??shown?.petRef??null,name=petDisplayName(shown),select=next=>{setSwitcherOpen(false),pets.setActivePet(next),callHost(onPetChange,next)},addPet=onAddPet===void 0?null:()=>{setSwitcherOpen(false),callHost(onAddPet)};/* @__PURE__ */
|
|
200
|
-
return jsxRuntime.jsxs(reactNative.View,{style:styles2.row,children:[
|
|
201
|
-
/* @__PURE__ */jsxRuntime.jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:historyUnread?`${CHAT_COPY.openHistoryNative}${CHAT_COPY.newReplySuffix}`:CHAT_COPY.openHistoryNative,containerStyle:styles2.iconSlot,style:styles2.iconButton,onPress:onOpenHistory,children:[
|
|
202
|
-
/* @__PURE__ */jsxRuntime.jsx(MenuGlyph,{size:MENU_GLYPH_SIZE,color:theme.slots.header?.textColor??theme.color.text.primary,strokeWidth:2}),historyUnread?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.unreadDot,pointerEvents:"none"}):null]}),
|
|
203
|
-
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.
|
|
199
|
+
/* @__PURE__ */jsxRuntime.jsx(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.close,containerStyle:styles2.closeSlot,style:styles2.closeButton,onPress:onClose,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles2.closeText,children:CHAT_COPY.close})})]})]})}):null}function makeStyles6(theme){let c=theme.color,r=theme.radius,dialogText=slotText(theme.slots.dialog);return reactNative.StyleSheet.create({root:{flex:1,justifyContent:"flex-end"},backdrop:{flex:1,backgroundColor:BACKDROP2},panel:{backgroundColor:c.surface,paddingHorizontal:20,paddingTop:20,paddingBottom:32,borderTopLeftRadius:PANEL_RADIUS,borderTopRightRadius:PANEL_RADIUS,gap:14,maxHeight:PANEL_MAX_HEIGHT,...sheetSlotBox(theme.slots.dialog)},title:{...headingFace(theme,"bold"),fontSize:18,lineHeight:22,color:c.brandInk,...dialogText},list:{maxHeight:LIST_MAX_HEIGHT,flexShrink:1},listContent:{gap:10},addRow:{flexDirection:"row",alignItems:"center",gap:12,minHeight:MIN_TOUCH_TARGET2,paddingHorizontal:8},addDisc:{width:ROW_RING_SIZE,height:ROW_RING_SIZE,borderRadius:r.pill,alignItems:"center",justifyContent:"center",borderWidth:ROW_RING_STROKE,borderStyle:"dashed",borderColor:c.brandBorder,backgroundColor:c.surfaceCream},addPlus:{...face(theme,"bold"),fontSize:20,lineHeight:22,color:c.brandInk},addLabel:{...face(theme,"bold"),fontSize:15,lineHeight:20,color:c.text.primary,...dialogText},row:{flexDirection:"row",alignItems:"center",gap:12,padding:12,borderRadius:r.md,borderWidth:1,borderColor:c.brandBorder,backgroundColor:c.surface},rowActive:{borderColor:c.brandInk,backgroundColor:c.brandSoft},copy:{flex:1,gap:2},name:{...face(theme,"bold"),fontSize:15,lineHeight:18,color:c.text.primary},meta:{...face(theme,"monoBold"),fontSize:11,lineHeight:13,color:c.text.muted,textTransform:"uppercase",letterSpacing:META_TRACKING},closeSlot:{alignSelf:"flex-end"},closeButton:{paddingHorizontal:18,paddingVertical:10,borderRadius:CLOSE_RADIUS,backgroundColor:c.brandSoft},closeText:{...face(theme,"bold"),color:c.brandInk,fontSize:13,lineHeight:16,letterSpacing:META_TRACKING}})}var MIN_TOUCH_TARGET3=44,ICON_BUTTON_SIZE=36,MENU_GLYPH_SIZE=22,UNREAD_DOT_SIZE=9,UNREAD_DOT_RING=1.5,UNREAD_DOT_INSET=6,HEADER_AVATAR_SIZE=35,HEADER_RING_STROKE=1.75,ADD_BADGE_SIZE=12.4,ADD_BADGE_BORDER=.5,ADD_BADGE_GLYPH=8,LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160,ROW_PADDING=16,CENTRE_GAP=8;function headerPet(pets,petRef){return headerPetOf(pets,petRef)}function ChatHeader({pets:pets,petRef:petRef,historyUnread:historyUnread,onOpenHistory:onOpenHistory,onPetChange:onPetChange,onAddPet:onAddPet,vet:vet}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles7(theme),[theme]),[switcherOpen,setSwitcherOpen]=react.useState(false),shown=headerPet(pets.pets,petRef),canSwitch=pets.pets.length>=2,shownPetRef=petRef??shown?.petRef??null,name=petDisplayName(shown),[measures,setMeasures]=react.useState(UNMEASURED),measure=react.useCallback(key=>event=>{let width=event.nativeEvent.layout.width;setMeasures(prev=>nextMeasures(prev,key,width))},[]),onRowLayout=react.useMemo(()=>measure("row"),[measure]),onLeadingLayout=react.useMemo(()=>measure("leading"),[measure]),onTrailingLayout=react.useMemo(()=>measure("trailing"),[measure]),reserved=2*ROW_PADDING+2*(theme.slots.header?.borderColor!==void 0?1:0)+2*CENTRE_GAP,sideMins=balanceHeaderSides(measures,reserved,LOGO_MAX_WIDTH),select=next=>{setSwitcherOpen(false),pets.setActivePet(next),callHost(onPetChange,next)},addPet=onAddPet===void 0?null:()=>{setSwitcherOpen(false),callHost(onAddPet)};/* @__PURE__ */
|
|
200
|
+
return jsxRuntime.jsxs(reactNative.View,{style:styles2.row,onLayout:onRowLayout,children:[
|
|
201
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles2.leading,sideMins.leading===void 0?null:{minWidth:sideMins.leading}],children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.sideContent,onLayout:onLeadingLayout,children:/* @__PURE__ */jsxRuntime.jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:historyUnread?`${CHAT_COPY.openHistoryNative}${CHAT_COPY.newReplySuffix}`:CHAT_COPY.openHistoryNative,containerStyle:styles2.iconSlot,style:styles2.iconButton,onPress:onOpenHistory,children:[
|
|
202
|
+
/* @__PURE__ */jsxRuntime.jsx(MenuGlyph,{size:MENU_GLYPH_SIZE,color:theme.slots.header?.textColor??theme.color.text.primary,strokeWidth:2}),historyUnread?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.unreadDot,pointerEvents:"none"}):null]})})}),
|
|
203
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.centre,pointerEvents:"box-none",children:/* @__PURE__ */jsxRuntime.jsx(BrandLogo,{logoUrl:theme.meta.logoUrl,name:theme.meta.displayName,barStyle:styles2.logoBar,logoStyle:styles2.logo})}),
|
|
204
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles2.trailing,sideMins.trailing===void 0?null:{minWidth:sideMins.trailing}],children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.trailingContent,onLayout:onTrailingLayout,children:[shownPetRef===null?null:/* @__PURE__ */jsxRuntime.jsx(VetVisitButton,{entry:"chat",petRef:shownPetRef,...vet?.returnTo!==void 0?{returnTo:vet.returnTo}:{},...vet?.usState!==void 0?{usState:vet.usState}:{},...vet?.prefer!==void 0?{prefer:vet.prefer}:{},style:styles2.vetEntry,labelStyle:styles2.vetEntryLabel}),
|
|
204
205
|
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.right,children:canSwitch?/* @__PURE__ */jsxRuntime.jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:fillCopy(CHAT_COPY.switchActivePet,{name:name}),containerStyle:styles2.avatarSlot,style:styles2.avatarWrap,onPress:()=>setSwitcherOpen(true),children:[
|
|
205
206
|
/* @__PURE__ */jsxRuntime.jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE}),
|
|
206
207
|
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.addBadge,pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsxRuntime.jsx(PlusGlyph,{size:ADD_BADGE_GLYPH,color:theme.color.brandInk,strokeWidth:2})})]}):pets.loading&&shown===null?
|
|
207
|
-
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.avatarWrap,accessible:true,accessibilityLabel:CHAT_COPY.yourPet,children:/* @__PURE__ */jsxRuntime.jsx(Ring,{size:HEADER_AVATAR_SIZE,strokeWidth:HEADER_RING_STROKE,color:theme.color.mark,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.placeholderDisc})})}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.avatarWrap,accessible:true,accessibilityRole:"image",accessibilityLabel:shown===null?CHAT_COPY.yourPet:name,children:/* @__PURE__ */jsxRuntime.jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE})})}),
|
|
208
|
-
/* @__PURE__ */jsxRuntime.jsx(PetSwitcherSheet,{visible:switcherOpen,pets:pets.pets,activePetRef:shown?.petRef??null,onSelect:select,onAddPet:addPet,onClose:()=>setSwitcherOpen(false)})]})}function makeStyles7(theme){let c=theme.color,placeholderInner=HEADER_AVATAR_SIZE-HEADER_RING_STROKE*2,header=theme.slots.header;return reactNative.StyleSheet.create({vetEntry:{minHeight:MIN_TOUCH_TARGET3,justifyContent:"center",paddingHorizontal:12,borderRadius:theme.radius.pill,backgroundColor:c.surfaceCream,borderWidth:reactNative.StyleSheet.hairlineWidth,borderColor:c.controlEdge},vetEntryLabel:{...face(theme,"bold"),color:c.brandInk,fontSize:theme.type.size.caption},row:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:
|
|
208
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.avatarWrap,accessible:true,accessibilityLabel:CHAT_COPY.yourPet,children:/* @__PURE__ */jsxRuntime.jsx(Ring,{size:HEADER_AVATAR_SIZE,strokeWidth:HEADER_RING_STROKE,color:theme.color.mark,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.placeholderDisc})})}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.avatarWrap,accessible:true,accessibilityRole:"image",accessibilityLabel:shown===null?CHAT_COPY.yourPet:name,children:/* @__PURE__ */jsxRuntime.jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE})})})]})}),
|
|
209
|
+
/* @__PURE__ */jsxRuntime.jsx(PetSwitcherSheet,{visible:switcherOpen,pets:pets.pets,activePetRef:shown?.petRef??null,onSelect:select,onAddPet:addPet,onClose:()=>setSwitcherOpen(false)})]})}function makeStyles7(theme){let c=theme.color,placeholderInner=HEADER_AVATAR_SIZE-HEADER_RING_STROKE*2,header=theme.slots.header;return reactNative.StyleSheet.create({vetEntry:{minHeight:MIN_TOUCH_TARGET3,justifyContent:"center",paddingHorizontal:12,borderRadius:theme.radius.pill,backgroundColor:c.surfaceCream,borderWidth:reactNative.StyleSheet.hairlineWidth,borderColor:c.controlEdge},vetEntryLabel:{...face(theme,"bold"),color:c.brandInk,fontSize:theme.type.size.caption},row:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:ROW_PADDING,paddingVertical:10,backgroundColor:c.surface,...slotBox(header)},iconSlot:{borderRadius:ICON_BUTTON_SIZE/2},iconButton:{width:ICON_BUTTON_SIZE,height:ICON_BUTTON_SIZE,borderRadius:ICON_BUTTON_SIZE/2,alignItems:"center",justifyContent:"center"},unreadDot:{position:"absolute",top:UNREAD_DOT_INSET,right:UNREAD_DOT_INSET,width:UNREAD_DOT_SIZE,height:UNREAD_DOT_SIZE,borderRadius:UNREAD_DOT_SIZE,backgroundColor:c.danger,borderWidth:UNREAD_DOT_RING,borderColor:header?.backgroundColor??c.surface},leading:{flexShrink:0,alignItems:"flex-start"},trailing:{flexShrink:0,alignItems:"flex-end"},sideContent:{flexDirection:"row",alignItems:"center"},trailingContent:{flexDirection:"row",alignItems:"center",gap:theme.space.sm},centre:{flexGrow:1,flexShrink:1,flexBasis:0,minWidth:0,marginHorizontal:CENTRE_GAP,alignItems:"center",justifyContent:"center"},logoBar:{alignSelf:"stretch",alignItems:"center"},logo:{height:LOGO_HEIGHT,width:LOGO_MAX_WIDTH,maxWidth:"100%"},right:{alignItems:"flex-end"},avatarSlot:{borderRadius:HEADER_AVATAR_SIZE/2},avatarWrap:{width:HEADER_AVATAR_SIZE,height:HEADER_AVATAR_SIZE,position:"relative"},placeholderDisc:{width:placeholderInner,height:placeholderInner,borderRadius:placeholderInner/2,backgroundColor:c.brandSoft},addBadge:{position:"absolute",bottom:0,right:0,width:ADD_BADGE_SIZE,height:ADD_BADGE_SIZE,borderRadius:ADD_BADGE_SIZE/2,borderWidth:ADD_BADGE_BORDER,borderColor:c.mark,backgroundColor:c.surface,alignItems:"center",justifyContent:"center"}})}var MIN_TOUCH_TARGET4=44,SCRIM="rgba(17,17,17,0.55)",SHEET_RADIUS=26,HANDLE_WIDTH=36,HANDLE_HEIGHT=4,RADIO_SIZE=20,BADGE_SIZE=38,BADGE_GLYPH=18,RADIO_CHECK=12;function FeedbackReasons({visible:visible,onSubmit:onSubmit,onSkip:onSkip}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles8(theme),[theme]),[reason,setReason]=react.useState(null),[note,setNote]=react.useState(""),[pending,setPending]=react.useState(false),[failed,setFailed]=react.useState(false),reset=()=>{setReason(null),setNote(""),setPending(false),setFailed(false)},skip=()=>{pending||(reset(),onSkip())},submit=async()=>{if(pending)return;setPending(true),setFailed(false);let trimmed=note.trim();await onSubmit(reason,trimmed.length>0?trimmed:null)?reset():(setPending(false),setFailed(true))};if(!visible)return null;let overLimit=[...note].length>FEEDBACK_NOTES_MAX_CHARS;/* @__PURE__ */
|
|
209
210
|
return jsxRuntime.jsx(reactNative.Modal,{visible:true,transparent:true,animationType:theme.motion.reducedMotion?"none":"slide",onRequestClose:skip,children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.KeyboardAvoidingView,{behavior:reactNative.Platform.OS==="ios"?"padding":void 0,style:styles2.root,children:[
|
|
210
211
|
/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{style:styles2.scrim,onPress:skip,accessibilityRole:"button",accessibilityLabel:CHAT_COPY.feedbackSkipA11y}),
|
|
211
212
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.sheet,accessibilityViewIsModal:true,accessibilityLiveRegion:"polite",children:[
|
package/dist/chat/index.d.cts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-
|
|
2
|
-
export { A as AttachmentSource, E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps, R as RenderVetAction } from '../Chat-
|
|
1
|
+
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-tPWJ0DJI.cjs';
|
|
2
|
+
export { A as AttachmentSource, E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps, R as RenderVetAction } from '../Chat-Bkv-MLLu.cjs';
|
|
3
3
|
import { U as UploadTransport } from '../ports-BN6RHF9W.cjs';
|
|
4
|
-
export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, h as ChatMessagePage } from '../ports-
|
|
5
|
-
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-
|
|
6
|
-
export { P as EverfurChatPet, W as WidgetPet } from '../petsRepository-
|
|
7
|
-
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-
|
|
4
|
+
export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, h as ChatMessagePage } from '../ports-okLpXkpu.cjs';
|
|
5
|
+
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-D0aQSXkb.cjs';
|
|
6
|
+
export { P as EverfurChatPet, W as WidgetPet } from '../petsRepository-BYe7_MUo.cjs';
|
|
7
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-DhGAelCA.cjs';
|
|
8
8
|
import '../EverfurError-DeBqRpQV.cjs';
|
|
9
9
|
import '../EverfurResult-COlXj1wq.cjs';
|
|
10
10
|
import '../ids-B2GAAifq.cjs';
|
|
11
|
-
import '../config-
|
|
11
|
+
import '../config-C68HTCf4.cjs';
|
|
12
12
|
import 'react';
|
|
13
13
|
import 'react-native';
|
|
14
|
-
import '../identity-
|
|
15
|
-
import '../requestFunnel-
|
|
14
|
+
import '../identity-ScajqjK5.cjs';
|
|
15
|
+
import '../requestFunnel-u8qnM5Ll.cjs';
|
|
16
16
|
import '../ErrorPolicyPort-10s3HJCt.cjs';
|
|
17
17
|
import '../TelemetryPort-BDNr00hu.cjs';
|
|
18
18
|
import '../profile-CSs1wlXT.cjs';
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-
|
|
2
|
-
export { A as AttachmentSource, E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps, R as RenderVetAction } from '../Chat-
|
|
1
|
+
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-BAcQdIz7.js';
|
|
2
|
+
export { A as AttachmentSource, E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps, R as RenderVetAction } from '../Chat-Dy1L27a8.js';
|
|
3
3
|
import { U as UploadTransport } from '../ports-BN6RHF9W.js';
|
|
4
|
-
export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, h as ChatMessagePage } from '../ports-
|
|
5
|
-
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-
|
|
6
|
-
export { P as EverfurChatPet, W as WidgetPet } from '../petsRepository-
|
|
7
|
-
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-
|
|
4
|
+
export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, h as ChatMessagePage } from '../ports-D4FQKTBS.js';
|
|
5
|
+
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-DjhMfm_n.js';
|
|
6
|
+
export { P as EverfurChatPet, W as WidgetPet } from '../petsRepository-BdfbY9Oe.js';
|
|
7
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-Brt7ivEo.js';
|
|
8
8
|
import '../EverfurError-DeBqRpQV.js';
|
|
9
9
|
import '../EverfurResult-ClPTS0P2.js';
|
|
10
10
|
import '../ids-B2GAAifq.js';
|
|
11
|
-
import '../config-
|
|
11
|
+
import '../config-DeUmccwl.js';
|
|
12
12
|
import 'react';
|
|
13
13
|
import 'react-native';
|
|
14
|
-
import '../identity-
|
|
15
|
-
import '../requestFunnel-
|
|
14
|
+
import '../identity-BTT6YtH5.js';
|
|
15
|
+
import '../requestFunnel-Dhaj0yUq.js';
|
|
16
16
|
import '../ErrorPolicyPort-C3nNSS_j.js';
|
|
17
17
|
import '../TelemetryPort-BDNr00hu.js';
|
|
18
18
|
import '../profile-CSs1wlXT.js';
|
package/dist/chat/index.js
CHANGED
|
@@ -177,7 +177,7 @@ return jsxs(Fragment,{children:[null,
|
|
|
177
177
|
return jsxs(Fragment,{children:[
|
|
178
178
|
/* @__PURE__ */jsx(Pressable,{onPress:()=>{if(!(busy||settling.current)){if(!redirecting){let request={...petRef!==void 0?{petRef:petRef}:{},...usState!==void 0?{usState:usState}:{},...visitRef!=null?{visitRef:visitRef,intent:intent??null}:{}};openVetVisitInApp(request,onStartInApp)===null&&callHost(onError,"unavailable",null);return}settling.current=true,(visitRef==null?visit.open():visit.openVisit(visitRef,intent??null)).then(result=>{result.opened?callHost(onOpened,result.flowId??null):result.reason!=="cancelled"&&callHost(onError,result.reason,result.error)}).finally(()=>{settling.current=false})}},accessibilityRole:"button",accessibilityLabel:text3,accessibilityState:{busy:busy,disabled:busy},style:[styles2.button,busy?styles2.busy:null,style],children:/* @__PURE__ */jsx(Text,{style:[styles2.label,labelStyle],children:text3})}),
|
|
179
179
|
/* @__PURE__ */jsx(EverfurTelevetHost,{})]})}function makeStyles4(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme;return StyleSheet.create({button:{minHeight:MIN_TOUCH_TARGET,minWidth:MIN_TOUCH_TARGET,alignItems:"center",justifyContent:"center",paddingHorizontal:space.xl,paddingVertical:space.sm,borderRadius:radius.pill,backgroundColor:color.primary,...slotBox(slots.vetVisitButton)},busy:{opacity:BUSY_OPACITY},label:{...face(theme,"medium"),color:color.onPrimary,fontSize:type.size.body,lineHeight:type.size.body*type.lineHeight.snug,...slotText(slots.vetVisitButton)}})}function useBrandImage(uri){let[failed,setFailed]=useState(null);return{shown:uri!==null&&failed!==uri,onError:()=>setFailed(uri)}}function BrandImage({uri:uri,label:label,decorative:decorative=false,style:style,resizeMode:resizeMode="contain",fallback:fallback=null,onError:onError,testID:testID}){let image=useBrandImage(uri);if(uri===null||!image.shown)return fallback;let a11y=decorative?{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}:{accessible:true,accessibilityRole:"image",...label===void 0?{}:{accessibilityLabel:label}};/* @__PURE__ */
|
|
180
|
-
return jsx(Image,{source:{uri:uri},style:style,resizeMode:resizeMode,...a11y,onError:()=>{image.onError(),onError?.()},...testID===void 0?{}:{testID:testID}})}function BrandLogo({logoUrl:logoUrl,name:name,barStyle:barStyle,logoStyle:logoStyle,testID:testID}){let image=useBrandImage(logoUrl);return logoUrl===null||!image.shown?null:/* @__PURE__ */jsx(View,{style:barStyle,...testID===void 0?{}:{testID:testID},children:/* @__PURE__ */jsx(Image,{source:{uri:logoUrl},style:logoStyle,resizeMode:"contain",accessible:true,accessibilityRole:"image",accessibilityLabel:name,onError:image.onError})})}function grounds(c){return[c.surface,c.surfaceCream,c.surfaceSubtle,c.background,c.chatGround,c.composerFill]}function isEverfurLightLook(theme){if(theme.brightness!=="light")return false;let compiled=EVERFUR_LIGHT.color,c=theme.color,same=(a,b)=>parseColor(a)===parseColor(b),own=new Set(grounds(compiled));return same(c.brand,compiled.brand)&&same(c.accent,compiled.accent)&&grounds(c).every(ground=>own.has(ground))}function brandedStatus(theme){let compiled=(theme.brightness==="dark"?EVERFUR_DARK:EVERFUR_LIGHT).color,c=theme.color,same=(a,b)=>parseColor(a)===parseColor(b);return{success:!same(c.success,compiled.success),warning:!same(c.warningStrong,compiled.warningStrong)||!same(c.cautionAccent,compiled.cautionAccent),info:!(same(c.info,c.brandInk)&&same(c.badgeBgInfo,c.brandSoft)&&same(c.infoEdge,c.structureEdge))}}function speciesOf(species){return canonicalPetSpecies(species)==="cat"?"cat":"dog"}function petAgeYears(ageYears){return typeof ageYears!="number"||!Number.isFinite(ageYears)||ageYears<0?null:Math.floor(ageYears)}function formatPetMeta(pet){let ageYears=petAgeYears(pet.ageYears),speciesLabel=speciesOf(pet.species)==="cat"?"Cat":"Dog";if(ageYears==null)return speciesLabel;let ageLabel=ageYears===1?"1 yr":`${ageYears} yrs`;return`${speciesLabel} · ${ageLabel}`}var INITIALS_PALETTE=/* @__PURE__ */Object.freeze([
|
|
180
|
+
return jsx(Image,{source:{uri:uri},style:style,resizeMode:resizeMode,...a11y,onError:()=>{image.onError(),onError?.()},...testID===void 0?{}:{testID:testID}})}function BrandLogo({logoUrl:logoUrl,name:name,barStyle:barStyle,logoStyle:logoStyle,testID:testID}){let image=useBrandImage(logoUrl);return logoUrl===null||!image.shown?null:/* @__PURE__ */jsx(View,{style:barStyle,...testID===void 0?{}:{testID:testID},children:/* @__PURE__ */jsx(Image,{source:{uri:logoUrl},style:logoStyle,resizeMode:"contain",accessible:true,accessibilityRole:"image",accessibilityLabel:name,onError:image.onError})})}var UNMEASURED=/* @__PURE__ */Object.freeze({row:null,leading:null,trailing:null}),NO_BALANCE=/* @__PURE__ */Object.freeze({leading:void 0,trailing:void 0});function balanceHeaderSides(m,reserved,logoWidth){if(m.row===null||m.leading===null||m.trailing===null)return NO_BALANCE;let difference=Math.abs(m.leading-m.trailing);if(difference<.5)return NO_BALANCE;let centre=m.row-reserved-m.leading-m.trailing,spare=Math.min(difference,Math.max(0,centre-logoWidth));return spare<.5?NO_BALANCE:m.leading<m.trailing?{leading:m.leading+spare,trailing:void 0}:{leading:void 0,trailing:m.trailing+spare}}function nextMeasures(prev,key,width){let old=prev[key];return old!==null&&Math.abs(old-width)<.5?prev:{...prev,[key]:width}}function grounds(c){return[c.surface,c.surfaceCream,c.surfaceSubtle,c.background,c.chatGround,c.composerFill]}function isEverfurLightLook(theme){if(theme.brightness!=="light")return false;let compiled=EVERFUR_LIGHT.color,c=theme.color,same=(a,b)=>parseColor(a)===parseColor(b),own=new Set(grounds(compiled));return same(c.brand,compiled.brand)&&same(c.accent,compiled.accent)&&grounds(c).every(ground=>own.has(ground))}function brandedStatus(theme){let compiled=(theme.brightness==="dark"?EVERFUR_DARK:EVERFUR_LIGHT).color,c=theme.color,same=(a,b)=>parseColor(a)===parseColor(b);return{success:!same(c.success,compiled.success),warning:!same(c.warningStrong,compiled.warningStrong)||!same(c.cautionAccent,compiled.cautionAccent),info:!(same(c.info,c.brandInk)&&same(c.badgeBgInfo,c.brandSoft)&&same(c.infoEdge,c.structureEdge))}}function speciesOf(species){return canonicalPetSpecies(species)==="cat"?"cat":"dog"}function petAgeYears(ageYears){return typeof ageYears!="number"||!Number.isFinite(ageYears)||ageYears<0?null:Math.floor(ageYears)}function formatPetMeta(pet){let ageYears=petAgeYears(pet.ageYears),speciesLabel=speciesOf(pet.species)==="cat"?"Cat":"Dog";if(ageYears==null)return speciesLabel;let ageLabel=ageYears===1?"1 yr":`${ageYears} yrs`;return`${speciesLabel} · ${ageLabel}`}var INITIALS_PALETTE=/* @__PURE__ */Object.freeze([
|
|
181
181
|
/* @__PURE__ */Object.freeze({background:"#ffbdbd",foreground:"#6d1d14"}),
|
|
182
182
|
/* @__PURE__ */Object.freeze({background:"#a0c4f6",foreground:"#0b3a73"}),
|
|
183
183
|
/* @__PURE__ */Object.freeze({background:"#fbc558",foreground:"#10462e"}),
|
|
@@ -196,16 +196,17 @@ return jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:fillCopy(i
|
|
|
196
196
|
/* @__PURE__ */jsx(Text,{tier:"compact",style:styles2.meta,numberOfLines:1,children:isActive?`${CHAT_COPY.activePrefix}${meta}`:meta})]}),isActive?/* @__PURE__ */jsx(CheckGlyph,{size:CHECK_SIZE,color:theme.color.brandInk}):null]},pet.petRef)})}),onAddPet!==null?/* @__PURE__ */jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.addAnotherPet,style:styles2.addRow,onPress:onAddPet,children:[
|
|
197
197
|
/* @__PURE__ */jsx(View,{style:styles2.addDisc,children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles2.addPlus,children:"+"})}),
|
|
198
198
|
/* @__PURE__ */jsx(Text,{style:styles2.addLabel,children:CHAT_COPY.addAnotherPet})]}):null,
|
|
199
|
-
/* @__PURE__ */jsx(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.close,containerStyle:styles2.closeSlot,style:styles2.closeButton,onPress:onClose,children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles2.closeText,children:CHAT_COPY.close})})]})]})}):null}function makeStyles6(theme){let c=theme.color,r=theme.radius,dialogText=slotText(theme.slots.dialog);return StyleSheet.create({root:{flex:1,justifyContent:"flex-end"},backdrop:{flex:1,backgroundColor:BACKDROP2},panel:{backgroundColor:c.surface,paddingHorizontal:20,paddingTop:20,paddingBottom:32,borderTopLeftRadius:PANEL_RADIUS,borderTopRightRadius:PANEL_RADIUS,gap:14,maxHeight:PANEL_MAX_HEIGHT,...sheetSlotBox(theme.slots.dialog)},title:{...headingFace(theme,"bold"),fontSize:18,lineHeight:22,color:c.brandInk,...dialogText},list:{maxHeight:LIST_MAX_HEIGHT,flexShrink:1},listContent:{gap:10},addRow:{flexDirection:"row",alignItems:"center",gap:12,minHeight:MIN_TOUCH_TARGET2,paddingHorizontal:8},addDisc:{width:ROW_RING_SIZE,height:ROW_RING_SIZE,borderRadius:r.pill,alignItems:"center",justifyContent:"center",borderWidth:ROW_RING_STROKE,borderStyle:"dashed",borderColor:c.brandBorder,backgroundColor:c.surfaceCream},addPlus:{...face(theme,"bold"),fontSize:20,lineHeight:22,color:c.brandInk},addLabel:{...face(theme,"bold"),fontSize:15,lineHeight:20,color:c.text.primary,...dialogText},row:{flexDirection:"row",alignItems:"center",gap:12,padding:12,borderRadius:r.md,borderWidth:1,borderColor:c.brandBorder,backgroundColor:c.surface},rowActive:{borderColor:c.brandInk,backgroundColor:c.brandSoft},copy:{flex:1,gap:2},name:{...face(theme,"bold"),fontSize:15,lineHeight:18,color:c.text.primary},meta:{...face(theme,"monoBold"),fontSize:11,lineHeight:13,color:c.text.muted,textTransform:"uppercase",letterSpacing:META_TRACKING},closeSlot:{alignSelf:"flex-end"},closeButton:{paddingHorizontal:18,paddingVertical:10,borderRadius:CLOSE_RADIUS,backgroundColor:c.brandSoft},closeText:{...face(theme,"bold"),color:c.brandInk,fontSize:13,lineHeight:16,letterSpacing:META_TRACKING}})}var MIN_TOUCH_TARGET3=44,ICON_BUTTON_SIZE=36,MENU_GLYPH_SIZE=22,UNREAD_DOT_SIZE=9,UNREAD_DOT_RING=1.5,UNREAD_DOT_INSET=6,HEADER_AVATAR_SIZE=35,HEADER_RING_STROKE=1.75,ADD_BADGE_SIZE=12.4,ADD_BADGE_BORDER=.5,ADD_BADGE_GLYPH=8,LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160;function headerPet(pets,petRef){return headerPetOf(pets,petRef)}function ChatHeader({pets:pets,petRef:petRef,historyUnread:historyUnread,onOpenHistory:onOpenHistory,onPetChange:onPetChange,onAddPet:onAddPet,vet:vet}){let theme=useEverfurTheme(),styles2=useMemo(()=>makeStyles7(theme),[theme]),[switcherOpen,setSwitcherOpen]=useState(false),shown=headerPet(pets.pets,petRef),canSwitch=pets.pets.length>=2,shownPetRef=petRef??shown?.petRef??null,name=petDisplayName(shown),select=next=>{setSwitcherOpen(false),pets.setActivePet(next),callHost(onPetChange,next)},addPet=onAddPet===void 0?null:()=>{setSwitcherOpen(false),callHost(onAddPet)};/* @__PURE__ */
|
|
200
|
-
return jsxs(View,{style:styles2.row,children:[
|
|
201
|
-
/* @__PURE__ */jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:historyUnread?`${CHAT_COPY.openHistoryNative}${CHAT_COPY.newReplySuffix}`:CHAT_COPY.openHistoryNative,containerStyle:styles2.iconSlot,style:styles2.iconButton,onPress:onOpenHistory,children:[
|
|
202
|
-
/* @__PURE__ */jsx(MenuGlyph,{size:MENU_GLYPH_SIZE,color:theme.slots.header?.textColor??theme.color.text.primary,strokeWidth:2}),historyUnread?/* @__PURE__ */jsx(View,{style:styles2.unreadDot,pointerEvents:"none"}):null]}),
|
|
203
|
-
/* @__PURE__ */jsx(View,{style:styles2.
|
|
199
|
+
/* @__PURE__ */jsx(PressScale,{accessibilityRole:"button",accessibilityLabel:CHAT_COPY.close,containerStyle:styles2.closeSlot,style:styles2.closeButton,onPress:onClose,children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles2.closeText,children:CHAT_COPY.close})})]})]})}):null}function makeStyles6(theme){let c=theme.color,r=theme.radius,dialogText=slotText(theme.slots.dialog);return StyleSheet.create({root:{flex:1,justifyContent:"flex-end"},backdrop:{flex:1,backgroundColor:BACKDROP2},panel:{backgroundColor:c.surface,paddingHorizontal:20,paddingTop:20,paddingBottom:32,borderTopLeftRadius:PANEL_RADIUS,borderTopRightRadius:PANEL_RADIUS,gap:14,maxHeight:PANEL_MAX_HEIGHT,...sheetSlotBox(theme.slots.dialog)},title:{...headingFace(theme,"bold"),fontSize:18,lineHeight:22,color:c.brandInk,...dialogText},list:{maxHeight:LIST_MAX_HEIGHT,flexShrink:1},listContent:{gap:10},addRow:{flexDirection:"row",alignItems:"center",gap:12,minHeight:MIN_TOUCH_TARGET2,paddingHorizontal:8},addDisc:{width:ROW_RING_SIZE,height:ROW_RING_SIZE,borderRadius:r.pill,alignItems:"center",justifyContent:"center",borderWidth:ROW_RING_STROKE,borderStyle:"dashed",borderColor:c.brandBorder,backgroundColor:c.surfaceCream},addPlus:{...face(theme,"bold"),fontSize:20,lineHeight:22,color:c.brandInk},addLabel:{...face(theme,"bold"),fontSize:15,lineHeight:20,color:c.text.primary,...dialogText},row:{flexDirection:"row",alignItems:"center",gap:12,padding:12,borderRadius:r.md,borderWidth:1,borderColor:c.brandBorder,backgroundColor:c.surface},rowActive:{borderColor:c.brandInk,backgroundColor:c.brandSoft},copy:{flex:1,gap:2},name:{...face(theme,"bold"),fontSize:15,lineHeight:18,color:c.text.primary},meta:{...face(theme,"monoBold"),fontSize:11,lineHeight:13,color:c.text.muted,textTransform:"uppercase",letterSpacing:META_TRACKING},closeSlot:{alignSelf:"flex-end"},closeButton:{paddingHorizontal:18,paddingVertical:10,borderRadius:CLOSE_RADIUS,backgroundColor:c.brandSoft},closeText:{...face(theme,"bold"),color:c.brandInk,fontSize:13,lineHeight:16,letterSpacing:META_TRACKING}})}var MIN_TOUCH_TARGET3=44,ICON_BUTTON_SIZE=36,MENU_GLYPH_SIZE=22,UNREAD_DOT_SIZE=9,UNREAD_DOT_RING=1.5,UNREAD_DOT_INSET=6,HEADER_AVATAR_SIZE=35,HEADER_RING_STROKE=1.75,ADD_BADGE_SIZE=12.4,ADD_BADGE_BORDER=.5,ADD_BADGE_GLYPH=8,LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160,ROW_PADDING=16,CENTRE_GAP=8;function headerPet(pets,petRef){return headerPetOf(pets,petRef)}function ChatHeader({pets:pets,petRef:petRef,historyUnread:historyUnread,onOpenHistory:onOpenHistory,onPetChange:onPetChange,onAddPet:onAddPet,vet:vet}){let theme=useEverfurTheme(),styles2=useMemo(()=>makeStyles7(theme),[theme]),[switcherOpen,setSwitcherOpen]=useState(false),shown=headerPet(pets.pets,petRef),canSwitch=pets.pets.length>=2,shownPetRef=petRef??shown?.petRef??null,name=petDisplayName(shown),[measures,setMeasures]=useState(UNMEASURED),measure=useCallback(key=>event=>{let width=event.nativeEvent.layout.width;setMeasures(prev=>nextMeasures(prev,key,width))},[]),onRowLayout=useMemo(()=>measure("row"),[measure]),onLeadingLayout=useMemo(()=>measure("leading"),[measure]),onTrailingLayout=useMemo(()=>measure("trailing"),[measure]),reserved=2*ROW_PADDING+2*(theme.slots.header?.borderColor!==void 0?1:0)+2*CENTRE_GAP,sideMins=balanceHeaderSides(measures,reserved,LOGO_MAX_WIDTH),select=next=>{setSwitcherOpen(false),pets.setActivePet(next),callHost(onPetChange,next)},addPet=onAddPet===void 0?null:()=>{setSwitcherOpen(false),callHost(onAddPet)};/* @__PURE__ */
|
|
200
|
+
return jsxs(View,{style:styles2.row,onLayout:onRowLayout,children:[
|
|
201
|
+
/* @__PURE__ */jsx(View,{style:[styles2.leading,sideMins.leading===void 0?null:{minWidth:sideMins.leading}],children:/* @__PURE__ */jsx(View,{style:styles2.sideContent,onLayout:onLeadingLayout,children:/* @__PURE__ */jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:historyUnread?`${CHAT_COPY.openHistoryNative}${CHAT_COPY.newReplySuffix}`:CHAT_COPY.openHistoryNative,containerStyle:styles2.iconSlot,style:styles2.iconButton,onPress:onOpenHistory,children:[
|
|
202
|
+
/* @__PURE__ */jsx(MenuGlyph,{size:MENU_GLYPH_SIZE,color:theme.slots.header?.textColor??theme.color.text.primary,strokeWidth:2}),historyUnread?/* @__PURE__ */jsx(View,{style:styles2.unreadDot,pointerEvents:"none"}):null]})})}),
|
|
203
|
+
/* @__PURE__ */jsx(View,{style:styles2.centre,pointerEvents:"box-none",children:/* @__PURE__ */jsx(BrandLogo,{logoUrl:theme.meta.logoUrl,name:theme.meta.displayName,barStyle:styles2.logoBar,logoStyle:styles2.logo})}),
|
|
204
|
+
/* @__PURE__ */jsx(View,{style:[styles2.trailing,sideMins.trailing===void 0?null:{minWidth:sideMins.trailing}],children:/* @__PURE__ */jsxs(View,{style:styles2.trailingContent,onLayout:onTrailingLayout,children:[shownPetRef===null?null:/* @__PURE__ */jsx(VetVisitButton,{entry:"chat",petRef:shownPetRef,...vet?.returnTo!==void 0?{returnTo:vet.returnTo}:{},...vet?.usState!==void 0?{usState:vet.usState}:{},...vet?.prefer!==void 0?{prefer:vet.prefer}:{},style:styles2.vetEntry,labelStyle:styles2.vetEntryLabel}),
|
|
204
205
|
/* @__PURE__ */jsx(View,{style:styles2.right,children:canSwitch?/* @__PURE__ */jsxs(PressScale,{accessibilityRole:"button",accessibilityLabel:fillCopy(CHAT_COPY.switchActivePet,{name:name}),containerStyle:styles2.avatarSlot,style:styles2.avatarWrap,onPress:()=>setSwitcherOpen(true),children:[
|
|
205
206
|
/* @__PURE__ */jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE}),
|
|
206
207
|
/* @__PURE__ */jsx(View,{style:styles2.addBadge,pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsx(PlusGlyph,{size:ADD_BADGE_GLYPH,color:theme.color.brandInk,strokeWidth:2})})]}):pets.loading&&shown===null?
|
|
207
|
-
/* @__PURE__ */jsx(View,{style:styles2.avatarWrap,accessible:true,accessibilityLabel:CHAT_COPY.yourPet,children:/* @__PURE__ */jsx(Ring,{size:HEADER_AVATAR_SIZE,strokeWidth:HEADER_RING_STROKE,color:theme.color.mark,children:/* @__PURE__ */jsx(View,{style:styles2.placeholderDisc})})}):/* @__PURE__ */jsx(View,{style:styles2.avatarWrap,accessible:true,accessibilityRole:"image",accessibilityLabel:shown===null?CHAT_COPY.yourPet:name,children:/* @__PURE__ */jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE})})}),
|
|
208
|
-
/* @__PURE__ */jsx(PetSwitcherSheet,{visible:switcherOpen,pets:pets.pets,activePetRef:shown?.petRef??null,onSelect:select,onAddPet:addPet,onClose:()=>setSwitcherOpen(false)})]})}function makeStyles7(theme){let c=theme.color,placeholderInner=HEADER_AVATAR_SIZE-HEADER_RING_STROKE*2,header=theme.slots.header;return StyleSheet.create({vetEntry:{minHeight:MIN_TOUCH_TARGET3,justifyContent:"center",paddingHorizontal:12,borderRadius:theme.radius.pill,backgroundColor:c.surfaceCream,borderWidth:StyleSheet.hairlineWidth,borderColor:c.controlEdge},vetEntryLabel:{...face(theme,"bold"),color:c.brandInk,fontSize:theme.type.size.caption},row:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:
|
|
208
|
+
/* @__PURE__ */jsx(View,{style:styles2.avatarWrap,accessible:true,accessibilityLabel:CHAT_COPY.yourPet,children:/* @__PURE__ */jsx(Ring,{size:HEADER_AVATAR_SIZE,strokeWidth:HEADER_RING_STROKE,color:theme.color.mark,children:/* @__PURE__ */jsx(View,{style:styles2.placeholderDisc})})}):/* @__PURE__ */jsx(View,{style:styles2.avatarWrap,accessible:true,accessibilityRole:"image",accessibilityLabel:shown===null?CHAT_COPY.yourPet:name,children:/* @__PURE__ */jsx(PetDisc,{pet:shown,size:HEADER_AVATAR_SIZE,ringStroke:HEADER_RING_STROKE})})})]})}),
|
|
209
|
+
/* @__PURE__ */jsx(PetSwitcherSheet,{visible:switcherOpen,pets:pets.pets,activePetRef:shown?.petRef??null,onSelect:select,onAddPet:addPet,onClose:()=>setSwitcherOpen(false)})]})}function makeStyles7(theme){let c=theme.color,placeholderInner=HEADER_AVATAR_SIZE-HEADER_RING_STROKE*2,header=theme.slots.header;return StyleSheet.create({vetEntry:{minHeight:MIN_TOUCH_TARGET3,justifyContent:"center",paddingHorizontal:12,borderRadius:theme.radius.pill,backgroundColor:c.surfaceCream,borderWidth:StyleSheet.hairlineWidth,borderColor:c.controlEdge},vetEntryLabel:{...face(theme,"bold"),color:c.brandInk,fontSize:theme.type.size.caption},row:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:ROW_PADDING,paddingVertical:10,backgroundColor:c.surface,...slotBox(header)},iconSlot:{borderRadius:ICON_BUTTON_SIZE/2},iconButton:{width:ICON_BUTTON_SIZE,height:ICON_BUTTON_SIZE,borderRadius:ICON_BUTTON_SIZE/2,alignItems:"center",justifyContent:"center"},unreadDot:{position:"absolute",top:UNREAD_DOT_INSET,right:UNREAD_DOT_INSET,width:UNREAD_DOT_SIZE,height:UNREAD_DOT_SIZE,borderRadius:UNREAD_DOT_SIZE,backgroundColor:c.danger,borderWidth:UNREAD_DOT_RING,borderColor:header?.backgroundColor??c.surface},leading:{flexShrink:0,alignItems:"flex-start"},trailing:{flexShrink:0,alignItems:"flex-end"},sideContent:{flexDirection:"row",alignItems:"center"},trailingContent:{flexDirection:"row",alignItems:"center",gap:theme.space.sm},centre:{flexGrow:1,flexShrink:1,flexBasis:0,minWidth:0,marginHorizontal:CENTRE_GAP,alignItems:"center",justifyContent:"center"},logoBar:{alignSelf:"stretch",alignItems:"center"},logo:{height:LOGO_HEIGHT,width:LOGO_MAX_WIDTH,maxWidth:"100%"},right:{alignItems:"flex-end"},avatarSlot:{borderRadius:HEADER_AVATAR_SIZE/2},avatarWrap:{width:HEADER_AVATAR_SIZE,height:HEADER_AVATAR_SIZE,position:"relative"},placeholderDisc:{width:placeholderInner,height:placeholderInner,borderRadius:placeholderInner/2,backgroundColor:c.brandSoft},addBadge:{position:"absolute",bottom:0,right:0,width:ADD_BADGE_SIZE,height:ADD_BADGE_SIZE,borderRadius:ADD_BADGE_SIZE/2,borderWidth:ADD_BADGE_BORDER,borderColor:c.mark,backgroundColor:c.surface,alignItems:"center",justifyContent:"center"}})}var MIN_TOUCH_TARGET4=44,SCRIM="rgba(17,17,17,0.55)",SHEET_RADIUS=26,HANDLE_WIDTH=36,HANDLE_HEIGHT=4,RADIO_SIZE=20,BADGE_SIZE=38,BADGE_GLYPH=18,RADIO_CHECK=12;function FeedbackReasons({visible:visible,onSubmit:onSubmit,onSkip:onSkip}){let theme=useEverfurTheme(),styles2=useMemo(()=>makeStyles8(theme),[theme]),[reason,setReason]=useState(null),[note,setNote]=useState(""),[pending,setPending]=useState(false),[failed,setFailed]=useState(false),reset=()=>{setReason(null),setNote(""),setPending(false),setFailed(false)},skip=()=>{pending||(reset(),onSkip())},submit=async()=>{if(pending)return;setPending(true),setFailed(false);let trimmed=note.trim();await onSubmit(reason,trimmed.length>0?trimmed:null)?reset():(setPending(false),setFailed(true))};if(!visible)return null;let overLimit=[...note].length>FEEDBACK_NOTES_MAX_CHARS;/* @__PURE__ */
|
|
209
210
|
return jsx(Modal,{visible:true,transparent:true,animationType:theme.motion.reducedMotion?"none":"slide",onRequestClose:skip,children:/* @__PURE__ */jsxs(KeyboardAvoidingView,{behavior:Platform.OS==="ios"?"padding":void 0,style:styles2.root,children:[
|
|
210
211
|
/* @__PURE__ */jsx(Pressable,{style:styles2.scrim,onPress:skip,accessibilityRole:"button",accessibilityLabel:CHAT_COPY.feedbackSkipA11y}),
|
|
211
212
|
/* @__PURE__ */jsxs(View,{style:styles2.sheet,accessibilityViewIsModal:true,accessibilityLiveRegion:"polite",children:[
|