@everfur/sdk 0.12.0 → 0.13.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 +174 -0
- package/README.md +2 -1
- package/dist/{Chat-BOG0SXKV.d.cts → Chat.d-DUNTfzqC.d.ts} +170 -8
- package/dist/{Chat-CIolBgjJ.d.ts → Chat.d-Dts8u_1a.d.cts} +170 -8
- package/dist/{DepthViews-BR6VQ3Ta.d.cts → DepthViews.d-BIp599lz.d.cts} +1 -1
- package/dist/{DepthViews-280t3BcQ.d.ts → DepthViews.d-BMU2jFPw.d.cts} +1 -1
- package/dist/{DepthViews-DlBuFsgN.d.ts → DepthViews.d-Ce2Zhnrb.d.ts} +1 -1
- package/dist/{DepthViews-BTbF_DJY.d.cts → DepthViews.d-CubkMPbU.d.ts} +1 -1
- package/dist/{ErrorPolicyPort-10s3HJCt.d.cts → ErrorPolicyPort.d-68yrE3BE.d.ts} +1 -1
- package/dist/{ErrorPolicyPort-C3nNSS_j.d.ts → ErrorPolicyPort.d-DirW9hgO.d.cts} +1 -1
- package/dist/{EverfurError-DeBqRpQV.d.cts → EverfurError.d-8NHtlgzA.d.cts} +11 -1
- package/dist/{EverfurError-DeBqRpQV.d.ts → EverfurError.d-8NHtlgzA.d.ts} +11 -1
- package/dist/{EverfurResult-ClPTS0P2.d.ts → EverfurResult.d-BFH-3s6E.d.cts} +1 -1
- package/dist/{EverfurResult-COlXj1wq.d.cts → EverfurResult.d-D_-254ZY.d.ts} +1 -1
- package/dist/{IntakeMedia-BH0fYDT2.d.cts → IntakeMedia.d-4a89XrP7.d.ts} +1 -1
- package/dist/{IntakeMedia-B-_vA9ZB.d.cts → IntakeMedia.d-DGxrhgIW.d.ts} +1 -1
- package/dist/{IntakeMedia-CIoTXAWs.d.ts → IntakeMedia.d-DUPR4lVM.d.cts} +1 -1
- package/dist/{IntakeMedia-Bavl7E4Z.d.ts → IntakeMedia.d-JJCUvQu7.d.cts} +1 -1
- package/dist/LifecyclePort.d-Cr1p33a7.d.cts +23 -0
- package/dist/LifecyclePort.d-Cr1p33a7.d.ts +23 -0
- package/dist/{PhotoController-vzY5bfY_.d.ts → PhotoController.d-BzCJOE7e.d.cts} +2 -2
- package/dist/{PhotoController-3l7MT9jA.d.cts → PhotoController.d-D0XiUUOl.d.ts} +2 -2
- package/dist/animations/index.cjs +5 -1
- package/dist/animations/index.d.cts +24 -24
- package/dist/animations/index.d.ts +24 -24
- package/dist/animations/index.js +5 -1
- package/dist/{attachments-CGxvnYu4.d.ts → attachments.d-Bp2qbHxn.d.cts} +22 -26
- package/dist/{attachments-CWNj1ZkM.d.ts → attachments.d-D1yhJjcZ.d.ts} +4 -4
- package/dist/{attachments-waXcJWCp.d.cts → attachments.d-DisnvB9R.d.cts} +4 -4
- package/dist/{attachments-B6h4cJU-.d.cts → attachments.d-Djy9z_0Z.d.ts} +22 -26
- package/dist/{bookingCopy-CjPKeg75.d.ts → bookingCopy.d-BJF6gd1A.d.ts} +24 -9
- package/dist/{bookingCopy-8aEU6ZmR.d.cts → bookingCopy.d-BlBmhAJc.d.cts} +24 -9
- package/dist/{branding-DJf4h12Q.d.ts → branding.d-DI8S400y.d.cts} +9 -2
- package/dist/{branding-BCfwLj0h.d.cts → branding.d-OIGLbQeM.d.ts} +9 -2
- package/dist/{callRoom-BhIdadyV.d.cts → callRoom.d-B1DoYdJe.d.cts} +1 -1
- package/dist/{callRoom-B92eH_ij.d.ts → callRoom.d-Dqm1rUqT.d.ts} +1 -1
- package/dist/{casesRepository-CGdhvzTu.d.cts → casesRepository.d-CT2LTicS.d.cts} +3 -3
- package/dist/{casesRepository-ZG9Sg0e4.d.ts → casesRepository.d-UsWOz9bv.d.ts} +3 -3
- package/dist/chat/index.cjs +132 -57
- package/dist/chat/index.d.cts +18 -16
- package/dist/chat/index.d.ts +18 -16
- package/dist/chat/index.js +133 -58
- package/dist/client/index.cjs +15 -10
- package/dist/client/index.d.cts +19 -18
- package/dist/client/index.d.ts +19 -18
- package/dist/client/index.js +15 -10
- package/dist/{config-B0p6Lygh.d.cts → config.d-BR3DT9ho.d.cts} +3 -3
- package/dist/{config-DmFAZJOx.d.ts → config.d-Dy6igYlH.d.ts} +3 -3
- package/dist/consent/index.cjs +5 -1
- package/dist/consent/index.d.cts +10 -10
- package/dist/consent/index.d.ts +10 -10
- package/dist/consent/index.js +5 -1
- package/dist/{context-BNreNLtL.d.ts → context.d-Cwks0p3C.d.cts} +15 -15
- package/dist/{context-BgS2a57J.d.cts → context.d-QcCgguzA.d.ts} +15 -15
- package/dist/{copy-DLJriGQS.d.ts → copy.d-CiMn2IIt.d.ts} +6 -6
- package/dist/{copy-lWp-Lkv5.d.cts → copy.d-DLJTyRfT.d.cts} +6 -6
- package/dist/core/index.cjs +17 -13
- package/dist/core/index.d.cts +33 -29
- package/dist/core/index.d.ts +33 -29
- package/dist/core/index.js +17 -13
- package/dist/{depth-BYb3RXoA.d.cts → depth.d-CjPGVPDL.d.cts} +9 -115
- package/dist/{depth-COz-sSG5.d.ts → depth.d-OSALbYM7.d.ts} +9 -115
- package/dist/{entitlementRepository-D-Lse67w.d.cts → entitlementRepository.d-CVQa1DA1.d.cts} +10 -5
- package/dist/{entitlementRepository-CrTOP_-o.d.ts → entitlementRepository.d-Cf3LbTwD.d.ts} +10 -5
- package/dist/features.d-fNsGcg0R.d.cts +108 -0
- package/dist/features.d-fNsGcg0R.d.ts +108 -0
- package/dist/focus.d-DMg2ngHI.d.ts +1178 -0
- package/dist/focus.d-az9cqUz3.d.cts +1178 -0
- package/dist/health-plan/index.cjs +370 -0
- package/dist/health-plan/index.d.cts +251 -0
- package/dist/health-plan/index.d.ts +251 -0
- package/dist/health-plan/index.js +370 -0
- package/dist/idempotency.d-D461_DPD.d.cts +910 -0
- package/dist/idempotency.d-WpXx9zQo.d.ts +910 -0
- package/dist/{identity-Cw07BKZp.d.ts → identity.d-60LeJt_s.d.cts} +3 -3
- package/dist/{identity-DFVGYn1o.d.cts → identity.d-DzTijonw.d.ts} +3 -3
- package/dist/index.cjs +141 -66
- package/dist/index.d.cts +31 -29
- package/dist/index.d.ts +31 -29
- package/dist/index.js +142 -67
- package/dist/{models-A4A5S7AG.d.cts → models.d-BagXhafD.d.ts} +8 -3
- package/dist/{models-CnXY5LuO.d.ts → models.d-BnLm3VAA.d.cts} +8 -3
- package/dist/notifications/index.cjs +5 -1
- package/dist/notifications/index.d.cts +9 -9
- package/dist/notifications/index.d.ts +9 -9
- package/dist/notifications/index.js +5 -1
- package/dist/optInView.d-CEyHR6PK.d.cts +325 -0
- package/dist/optInView.d-acKpV8V2.d.ts +325 -0
- package/dist/parse.d-C8CXyS58.d.ts +210 -0
- package/dist/parse.d-tEzufgJX.d.cts +210 -0
- package/dist/{pets-BYALZTSu.d.ts → pets.d-C_53_fzo.d.ts} +3 -3
- package/dist/{pets-CcyPQS-H.d.cts → pets.d-NbJvP_kh.d.cts} +3 -3
- package/dist/{petsRepository-B_Q1gFkE.d.cts → petsRepository.d-BuGHymNx.d.ts} +4 -4
- package/dist/{petsRepository-518QkPxH.d.ts → petsRepository.d-lp1BHRqM.d.cts} +4 -4
- package/dist/photo/index.cjs +6 -2
- package/dist/photo/index.d.cts +9 -9
- package/dist/photo/index.d.ts +9 -9
- package/dist/photo/index.js +6 -2
- package/dist/{ports-BN6RHF9W.d.ts → ports.d-BX4f4UsB.d.cts} +14 -1
- package/dist/{ports-BN6RHF9W.d.cts → ports.d-BX4f4UsB.d.ts} +14 -1
- package/dist/{ports-RuNJmBA-.d.cts → ports.d-CEROoqnA.d.cts} +16 -10
- package/dist/{ports-DmQeMArX.d.ts → ports.d-COIyN624.d.ts} +16 -10
- package/dist/presentation.d-DMbdad7G.d.cts +90 -0
- package/dist/presentation.d-DMbdad7G.d.ts +90 -0
- package/dist/records/depth/index.cjs +11 -7
- package/dist/records/depth/index.d.cts +14 -12
- package/dist/records/depth/index.d.ts +14 -12
- package/dist/records/depth/index.js +11 -7
- package/dist/records/index.cjs +225 -62
- package/dist/records/index.d.cts +159 -20
- package/dist/records/index.d.ts +159 -20
- package/dist/records/index.js +225 -62
- package/dist/recordsAsk.d-C5CGSi3j.d.cts +14 -0
- package/dist/recordsAsk.d-C5CGSi3j.d.ts +14 -0
- package/dist/{requestFunnel-B9fdXMi5.d.ts → requestFunnel.d-CXUMPw1K.d.ts} +5 -5
- package/dist/{requestFunnel-BBjNNwc9.d.cts → requestFunnel.d-DWQQpjFR.d.cts} +5 -5
- package/dist/{resolve-D4Ywz5OS.d.ts → resolve.d-jI8FmBj3.d.cts} +3 -3
- package/dist/{resolve-D4Ywz5OS.d.cts → resolve.d-jI8FmBj3.d.ts} +3 -3
- package/dist/{runtimeTypes-CstDBX8w.d.cts → runtimeTypes.d-4yFNNuYR.d.ts} +20 -13
- package/dist/{runtimeTypes-N_K4BVZB.d.ts → runtimeTypes.d-D6N_fhxx.d.cts} +20 -13
- package/dist/server/events/index.cjs +7 -3
- package/dist/server/events/index.d.cts +51 -9
- package/dist/server/events/index.d.ts +51 -9
- package/dist/server/events/index.js +7 -3
- package/dist/server/index.cjs +12 -6
- package/dist/server/index.d.cts +152 -8
- package/dist/server/index.d.ts +152 -8
- package/dist/server/index.js +12 -6
- package/dist/sheetCopy.d-CAhLOxjc.d.cts +4 -0
- package/dist/sheetCopy.d-CAhLOxjc.d.ts +4 -0
- package/dist/sheetSeam.d-Cviqk89n.d.ts +45 -0
- package/dist/sheetSeam.d-DCS3LW8g.d.cts +45 -0
- package/dist/shop/index.cjs +262 -0
- package/dist/shop/index.d.cts +193 -0
- package/dist/shop/index.d.ts +193 -0
- package/dist/shop/index.js +262 -0
- package/dist/televet/booking/index.cjs +16 -12
- package/dist/televet/booking/index.d.cts +36 -22
- package/dist/televet/booking/index.d.ts +36 -22
- package/dist/televet/booking/index.js +16 -12
- package/dist/televet/call/index.d.cts +5 -5
- package/dist/televet/call/index.d.ts +5 -5
- package/dist/televet/index.cjs +7 -3
- package/dist/televet/index.d.cts +12 -12
- package/dist/televet/index.d.ts +12 -12
- package/dist/televet/index.js +7 -3
- package/dist/{televetGlobal-C5dTUACe.d.cts → televetGlobal.d-CC-DrqkQ.d.ts} +7 -2
- package/dist/{televetGlobal-CnjrfhT4.d.ts → televetGlobal.d-CKwDCbmN.d.cts} +7 -2
- package/dist/testing/index.cjs +7 -3
- package/dist/testing/index.d.cts +3 -3
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +7 -3
- package/dist/testing/rn/index.cjs +5 -1
- package/dist/testing/rn/index.d.cts +23 -22
- package/dist/testing/rn/index.d.ts +23 -22
- package/dist/testing/rn/index.js +5 -1
- package/dist/testing/web/index.cjs +5 -1
- package/dist/testing/web/index.d.cts +23 -22
- package/dist/testing/web/index.d.ts +23 -22
- package/dist/testing/web/index.js +5 -1
- package/dist/texting/index.cjs +158 -0
- package/dist/texting/index.d.cts +36 -0
- package/dist/texting/index.d.ts +36 -0
- package/dist/texting/index.js +158 -0
- package/dist/threadOptions.d-B1pTMmDF.d.cts +260 -0
- package/dist/threadOptions.d-B1pTMmDF.d.ts +260 -0
- package/dist/{timelineRows-7yjHyh8i.d.ts → timelineRows.d-BNxgzYRW.d.cts} +1 -1
- package/dist/{timelineRows-WvnL-Lds.d.cts → timelineRows.d-CU5GvvLk.d.ts} +1 -1
- package/dist/{tokens-DLj8OnLH.d.cts → tokens.d-DarDaV39.d.cts} +10 -2
- package/dist/{tokens-DLj8OnLH.d.ts → tokens.d-DarDaV39.d.ts} +10 -2
- package/dist/{typeStyle-BxVyF71R.d.ts → typeStyle.d-Bl8pzbBy.d.cts} +2 -2
- package/dist/{typeStyle-DJedEu14.d.cts → typeStyle.d-C1HBRAI3.d.ts} +2 -2
- package/dist/{uploadTransport-BM_pnEWj.d.cts → uploadTransport.d-CWL7CdWP.d.cts} +1 -1
- package/dist/{uploadTransport-C6kGP1Kd.d.ts → uploadTransport.d-EGoUl7gX.d.ts} +1 -1
- package/dist/usePresentation.d-D6qsFzBz.d.cts +9 -0
- package/dist/usePresentation.d-DuGQe_Do.d.ts +9 -0
- package/dist/useRecords.d-Cb-36SF5.d.cts +121 -0
- package/dist/useRecords.d-aQTzQZoV.d.ts +121 -0
- package/dist/{useRecordsDepth-Bp6L4M5P.d.ts → useRecordsDepth.d-DFcCfiXm.d.ts} +8 -20
- package/dist/{useRecordsDepth-DPdAK_81.d.cts → useRecordsDepth.d-sAq2Qkhr.d.cts} +8 -20
- package/dist/{useVetVisit-DmWa7lt1.d.ts → useVetVisit.d-BtdwhmgD.d.cts} +15 -4
- package/dist/{useVetVisit-PtBjNwZr.d.cts → useVetVisit.d-DoYQimyt.d.ts} +15 -4
- package/dist/video/index.cjs +6 -2
- package/dist/video/index.d.cts +7 -7
- package/dist/video/index.d.ts +7 -7
- package/dist/video/index.js +6 -2
- package/dist/{view-C6go2uUt.d.ts → view.d-C-SNpDJX.d.ts} +10 -122
- package/dist/{view-CiF_HVFQ.d.cts → view.d-Dps5C8-s.d.cts} +10 -122
- package/dist/web/consent/index.cjs +5 -1
- package/dist/web/consent/index.d.cts +10 -10
- package/dist/web/consent/index.d.ts +10 -10
- package/dist/web/consent/index.js +5 -1
- package/dist/web/health-plan/index.cjs +414 -0
- package/dist/web/health-plan/index.d.cts +335 -0
- package/dist/web/health-plan/index.d.ts +335 -0
- package/dist/web/health-plan/index.js +414 -0
- package/dist/web/index.cjs +150 -82
- package/dist/web/index.d.cts +152 -38
- package/dist/web/index.d.ts +152 -38
- package/dist/web/index.js +150 -82
- package/dist/web/notifications/index.cjs +16 -3
- package/dist/web/notifications/index.d.cts +39 -209
- package/dist/web/notifications/index.d.ts +39 -209
- package/dist/web/notifications/index.js +16 -3
- package/dist/web/records/depth/index.cjs +11 -7
- package/dist/web/records/depth/index.d.cts +14 -12
- package/dist/web/records/depth/index.d.ts +14 -12
- package/dist/web/records/depth/index.js +11 -7
- package/dist/web/records/index.cjs +95 -68
- package/dist/web/records/index.d.cts +66 -21
- package/dist/web/records/index.d.ts +66 -21
- package/dist/web/records/index.js +95 -68
- package/dist/web/records/upload/index.d.cts +2 -2
- package/dist/web/records/upload/index.d.ts +2 -2
- package/dist/web/records-sheet/index.cjs +278 -0
- package/dist/web/records-sheet/index.d.cts +102 -0
- package/dist/web/records-sheet/index.d.ts +102 -0
- package/dist/web/records-sheet/index.js +278 -0
- package/dist/web/shop/index.cjs +301 -0
- package/dist/web/shop/index.d.cts +42 -0
- package/dist/web/shop/index.d.ts +42 -0
- package/dist/web/shop/index.js +301 -0
- package/dist/web/televet/booking/index.cjs +16 -12
- package/dist/web/televet/booking/index.d.cts +37 -23
- package/dist/web/televet/booking/index.d.ts +37 -23
- package/dist/web/televet/booking/index.js +16 -12
- package/dist/web/televet/call/index.d.cts +4 -4
- package/dist/web/televet/call/index.d.ts +4 -4
- package/dist/web/televet/index.cjs +7 -3
- package/dist/web/televet/index.d.cts +12 -12
- package/dist/web/televet/index.d.ts +12 -12
- package/dist/web/televet/index.js +7 -3
- package/dist/web/texting/index.cjs +157 -0
- package/dist/web/texting/index.d.cts +36 -0
- package/dist/web/texting/index.d.ts +36 -0
- package/dist/web/texting/index.js +157 -0
- package/health-plan/package.json +8 -0
- package/package.json +106 -4
- package/shop/package.json +8 -0
- package/texting/package.json +8 -0
- package/web/health-plan/native-blocked.cjs +12 -0
- package/web/health-plan/package.json +8 -0
- package/web/records-sheet/native-blocked.cjs +12 -0
- package/web/records-sheet/package.json +8 -0
- package/web/shop/native-blocked.cjs +12 -0
- package/web/shop/package.json +8 -0
- package/web/texting/native-blocked.cjs +12 -0
- package/web/texting/package.json +8 -0
- /package/dist/{CameraPort-Cv31Pz7g.d.cts → CameraPort.d-Cv31Pz7g.d.cts} +0 -0
- /package/dist/{CameraPort-Cv31Pz7g.d.ts → CameraPort.d-Cv31Pz7g.d.ts} +0 -0
- /package/dist/{TelemetryPort-BDNr00hu.d.cts → TelemetryPort.d-BDNr00hu.d.cts} +0 -0
- /package/dist/{TelemetryPort-BDNr00hu.d.ts → TelemetryPort.d-BDNr00hu.d.ts} +0 -0
- /package/dist/{cacheEpoch-DknKn3S0.d.cts → cacheEpoch.d-DknKn3S0.d.cts} +0 -0
- /package/dist/{cacheEpoch-DknKn3S0.d.ts → cacheEpoch.d-DknKn3S0.d.ts} +0 -0
- /package/dist/{callCopy-Bw6oZT54.d.cts → callCopy.d-Bw6oZT54.d.cts} +0 -0
- /package/dist/{callCopy-Bw6oZT54.d.ts → callCopy.d-Bw6oZT54.d.ts} +0 -0
- /package/dist/{ids-B2GAAifq.d.cts → ids.d-B2GAAifq.d.cts} +0 -0
- /package/dist/{ids-B2GAAifq.d.ts → ids.d-B2GAAifq.d.ts} +0 -0
- /package/dist/{optionalModule-DbJmsq5f.d.cts → optionalModule.d-DbJmsq5f.d.cts} +0 -0
- /package/dist/{optionalModule-DbJmsq5f.d.ts → optionalModule.d-DbJmsq5f.d.ts} +0 -0
- /package/dist/{profile-CSs1wlXT.d.cts → profile.d-CSs1wlXT.d.cts} +0 -0
- /package/dist/{profile-CSs1wlXT.d.ts → profile.d-CSs1wlXT.d.ts} +0 -0
- /package/dist/{projection-CeIUsbSk.d.cts → projection.d-CeIUsbSk.d.cts} +0 -0
- /package/dist/{projection-CeIUsbSk.d.ts → projection.d-CeIUsbSk.d.ts} +0 -0
- /package/dist/{species-BXAIMh7I.d.cts → species.d-BXAIMh7I.d.cts} +0 -0
- /package/dist/{species-BXAIMh7I.d.ts → species.d-BXAIMh7I.d.ts} +0 -0
- /package/dist/{visitIntent-D7_yVp1I.d.cts → visitIntent.d-D7_yVp1I.d.cts} +0 -0
- /package/dist/{visitIntent-D7_yVp1I.d.ts → visitIntent.d-D7_yVp1I.d.ts} +0 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
/** What `renderEmptyHeader` receives: ask a question in this thread, with no screen in between. */
|
|
4
|
+
interface EverfurChatEmptyHeaderContext {
|
|
5
|
+
/** Send `prompt` as the member's next message in the open thread (the same path as a starter chip). */
|
|
6
|
+
ask(prompt: string): void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The history bar: a "Chats" control with the member's thread count that opens the history drawer, and a "New
|
|
10
|
+
* chat" control. For a surface that passes `header={false}` and still wants the member's past chats.
|
|
11
|
+
*/
|
|
12
|
+
interface EverfurChatHistoryBar {
|
|
13
|
+
/** The history control's words ("Chats"). */
|
|
14
|
+
readonly chats: string;
|
|
15
|
+
/** The new-chat control's words ("New chat"). */
|
|
16
|
+
readonly newChat: string;
|
|
17
|
+
/** Classes per element; a class drops that element's inline default. */
|
|
18
|
+
readonly classNames?: {
|
|
19
|
+
readonly bar?: string;
|
|
20
|
+
readonly chats?: string;
|
|
21
|
+
readonly count?: string;
|
|
22
|
+
readonly newChat?: string;
|
|
23
|
+
/** The dot on "Chats" while some thread carries an unread reply. */
|
|
24
|
+
readonly unreadDot?: string;
|
|
25
|
+
};
|
|
26
|
+
/** Draw the two icons your way. */
|
|
27
|
+
readonly renderIcon?: (icon: 'history' | 'edit') => ReactNode;
|
|
28
|
+
/** Your own control after "Chats" (a pill that reopens a card you closed). Absent, nothing is drawn. */
|
|
29
|
+
readonly extra?: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The empty thread's own title and layout, for a host that draws it its way. The words are yours; a class drops
|
|
33
|
+
* that element's inline layout default (a starter chip keeps its tint). Absent, the empty state is Everfur's own.
|
|
34
|
+
*/
|
|
35
|
+
interface EverfurChatEmptyState {
|
|
36
|
+
/** The title over the starter chips, in place of "What can we help {pet} with today?". */
|
|
37
|
+
readonly title?: string;
|
|
38
|
+
readonly classNames?: {
|
|
39
|
+
/** The block that holds the title and the chips (under `renderEmptyHeader`'s card). */
|
|
40
|
+
readonly start?: string;
|
|
41
|
+
readonly title?: string;
|
|
42
|
+
readonly list?: string;
|
|
43
|
+
readonly chip?: string;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Fills for the chips that bring none of their own (Everfur's built-in chips, the backend's suggestions, a starter
|
|
47
|
+
* prompt without a `tint`), taken in turn: the first chip the first fill, and round again. Each is a fill (any CSS
|
|
48
|
+
* colour) and its ink. Absent or empty, those chips keep the theme's paint.
|
|
49
|
+
*/
|
|
50
|
+
readonly chipTints?: readonly {
|
|
51
|
+
readonly tint: string;
|
|
52
|
+
readonly ink?: string;
|
|
53
|
+
}[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The card a thread opened from a notification starts with, in place of the member's first bubble: drawn while
|
|
57
|
+
* the first message of the open thread is the surface's `initialAsk`.
|
|
58
|
+
*/
|
|
59
|
+
interface EverfurChatOpeningCard {
|
|
60
|
+
/** The line over the title ("Notification · 9:41 AM"). */
|
|
61
|
+
readonly kicker: string;
|
|
62
|
+
readonly title: string;
|
|
63
|
+
readonly body?: string;
|
|
64
|
+
/** The brand mark in the card's corner. */
|
|
65
|
+
readonly icon?: ReactNode;
|
|
66
|
+
/** Classes per element; a class drops that element's inline default. */
|
|
67
|
+
readonly classNames?: {
|
|
68
|
+
readonly card?: string;
|
|
69
|
+
readonly icon?: string;
|
|
70
|
+
readonly body?: string;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* One card under an answer in the cards answer style (presentation `chat_answer_style: "cards"`): a record (a tile, the
|
|
75
|
+
* title, a meta line, a status pill and a chevron), a stat (the title, a meta line and a value), or a link to one of your
|
|
76
|
+
* screens. The words and the data are yours; Everfur holds none of them.
|
|
77
|
+
*/
|
|
78
|
+
interface EverfurChatAnswerCard {
|
|
79
|
+
/** Stable key within the answer. */
|
|
80
|
+
readonly key: string;
|
|
81
|
+
readonly title: string;
|
|
82
|
+
/** The small line under the title. */
|
|
83
|
+
readonly meta?: string;
|
|
84
|
+
/** A status pill; `tone` picks `classNames.pillTone[tone]`. */
|
|
85
|
+
readonly pill?: {
|
|
86
|
+
readonly label: string;
|
|
87
|
+
readonly tone?: string;
|
|
88
|
+
};
|
|
89
|
+
/** A stat card's value (`14` with the unit `lb`): drawn in place of the pill and the chevron. */
|
|
90
|
+
readonly value?: {
|
|
91
|
+
readonly amount: string;
|
|
92
|
+
readonly unit?: string;
|
|
93
|
+
};
|
|
94
|
+
/** The tile at the start: an icon of yours, or an image (https, or a path on your own origin); `tone` picks `classNames.tileTone[tone]`. */
|
|
95
|
+
readonly tile?: {
|
|
96
|
+
readonly icon?: ReactNode;
|
|
97
|
+
readonly imageUrl?: string;
|
|
98
|
+
readonly tone?: string;
|
|
99
|
+
};
|
|
100
|
+
/** Picks `classNames.cardVariant[variant]` (for example a highlighted plan card). */
|
|
101
|
+
readonly variant?: string;
|
|
102
|
+
/** Given, the card is a button that calls this. Absent, a static card. */
|
|
103
|
+
readonly onPress?: () => void;
|
|
104
|
+
/**
|
|
105
|
+
* A card of your own (the host card slot): given, Everfur draws this node in the card's place, inside the card's
|
|
106
|
+
* class (`classNames.card` plus `cardVariant[variant]`), and ignores the tile, the pill, the value and `onPress`.
|
|
107
|
+
* Use it for a card Everfur's shapes do not cover (for example a breed-mix chart). If it throws, the slot draws
|
|
108
|
+
* nothing and the answer still draws. `title` stays its accessible name.
|
|
109
|
+
*/
|
|
110
|
+
readonly render?: () => ReactNode;
|
|
111
|
+
}
|
|
112
|
+
/** What `answerCards.cards` receives: the settled answer's text and the question it answered. */
|
|
113
|
+
interface EverfurChatAnswerContext {
|
|
114
|
+
readonly answer: string;
|
|
115
|
+
readonly question: string | null;
|
|
116
|
+
/** The answer's message id, stable for the life of the thread. */
|
|
117
|
+
readonly messageId: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The cards answer style's content and classes (used while presentation `chat_answer_style` is `cards`). Every part is
|
|
121
|
+
* optional; absent, the answer is drawn open (no bubble) with Everfur's own sources and footer. The words are yours.
|
|
122
|
+
*/
|
|
123
|
+
interface EverfurChatAnswerCards {
|
|
124
|
+
/** The line over each answer (an icon and your words, "Read her test results"). Absent, the assistant's name line. */
|
|
125
|
+
readonly byline?: {
|
|
126
|
+
readonly label: string;
|
|
127
|
+
readonly icon?: ReactNode;
|
|
128
|
+
};
|
|
129
|
+
/** Your cards under a settled answer (records, stats, a link to your plan). A throw draws none. */
|
|
130
|
+
readonly cards?: (context: EverfurChatAnswerContext) => readonly EverfurChatAnswerCard[];
|
|
131
|
+
/**
|
|
132
|
+
* Two feedback chips in place of the footer's thumbs, mapped to thumbs up and thumbs down; the footer's Copy control
|
|
133
|
+
* stays beside them (`classNames.copy`). Absent, Everfur's own footer.
|
|
134
|
+
*/
|
|
135
|
+
readonly feedback?: {
|
|
136
|
+
readonly helpful: string;
|
|
137
|
+
readonly notHelpful: string;
|
|
138
|
+
};
|
|
139
|
+
/** Your own rows at the top of the follow-ups ("See her Health Plan"), for the answer it receives. */
|
|
140
|
+
readonly followUpActions?: (context: EverfurChatAnswerContext) => readonly EverfurChatFollowUpAction[];
|
|
141
|
+
/** Draw the chevron your way. Absent, Everfur's glyph. */
|
|
142
|
+
readonly renderIcon?: (icon: 'chevron') => ReactNode;
|
|
143
|
+
/** Classes per element; a class drops that element's inline default. */
|
|
144
|
+
readonly classNames?: {
|
|
145
|
+
/** The answer row (the by-line, the body, the cards, the feedback). */
|
|
146
|
+
readonly answer?: string;
|
|
147
|
+
readonly byline?: string;
|
|
148
|
+
readonly body?: string;
|
|
149
|
+
/** The owner's question bubble. */
|
|
150
|
+
readonly question?: string;
|
|
151
|
+
readonly cards?: string;
|
|
152
|
+
readonly card?: string;
|
|
153
|
+
readonly cardStat?: string;
|
|
154
|
+
readonly cardVariant?: Readonly<Record<string, string>>;
|
|
155
|
+
readonly tile?: string;
|
|
156
|
+
readonly tileTone?: Readonly<Record<string, string>>;
|
|
157
|
+
readonly title?: string;
|
|
158
|
+
readonly meta?: string;
|
|
159
|
+
readonly pill?: string;
|
|
160
|
+
readonly pillTone?: Readonly<Record<string, string>>;
|
|
161
|
+
readonly value?: string;
|
|
162
|
+
readonly feedback?: string;
|
|
163
|
+
/** The Copy control beside the feedback chips. */
|
|
164
|
+
readonly copy?: string;
|
|
165
|
+
/** The block of follow-ups under the answer, its label and each row. */
|
|
166
|
+
readonly followUps?: string;
|
|
167
|
+
readonly followUpsLabel?: string;
|
|
168
|
+
readonly followUp?: string;
|
|
169
|
+
readonly followUpAction?: string;
|
|
170
|
+
/** The safety disclaimer when presentation `safety_disclaimer_placement` is `answer_footer`. */
|
|
171
|
+
readonly disclaimer?: string;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/** A row of yours at the top of the follow-ups under an answer. */
|
|
175
|
+
interface EverfurChatFollowUpAction {
|
|
176
|
+
readonly key: string;
|
|
177
|
+
readonly label: string;
|
|
178
|
+
readonly icon?: ReactNode;
|
|
179
|
+
readonly onPress: () => void;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* The card at the top of the empty thread (presentation `chat_top_card: "focus"`): one finding, in your words, with
|
|
183
|
+
* an action of yours and a question it can ask in the thread. A close control folds it into a pill beside "Chats" in
|
|
184
|
+
* the history bar, which opens it again.
|
|
185
|
+
*/
|
|
186
|
+
interface EverfurChatTopCard {
|
|
187
|
+
/** The small heading ("Her focus"). */
|
|
188
|
+
readonly kicker: string;
|
|
189
|
+
/** A source badge ("<your brand> results"). */
|
|
190
|
+
readonly badge?: string;
|
|
191
|
+
readonly title: string;
|
|
192
|
+
/** The finding: a bold lead and the rest of the sentence. */
|
|
193
|
+
readonly lead?: string;
|
|
194
|
+
readonly body?: string;
|
|
195
|
+
/** Your action ("See her Health Plan"). */
|
|
196
|
+
readonly action?: {
|
|
197
|
+
readonly label: string;
|
|
198
|
+
readonly onPress: () => void;
|
|
199
|
+
};
|
|
200
|
+
/** A question the card asks in this thread ("What does it mean?" sends `prompt`). */
|
|
201
|
+
readonly ask?: {
|
|
202
|
+
readonly label: string;
|
|
203
|
+
readonly prompt: string;
|
|
204
|
+
};
|
|
205
|
+
/** The close control's accessible name; given, the card can close to the pill. */
|
|
206
|
+
readonly closeLabel?: string;
|
|
207
|
+
/** The pill's words while the card is closed (defaults to `kicker`). */
|
|
208
|
+
readonly pill?: string;
|
|
209
|
+
/** Draw the close glyph your way. */
|
|
210
|
+
readonly renderIcon?: (icon: 'close') => ReactNode;
|
|
211
|
+
/** Classes per element; a class drops that element's inline default. */
|
|
212
|
+
readonly classNames?: {
|
|
213
|
+
readonly wrap?: string;
|
|
214
|
+
readonly card?: string;
|
|
215
|
+
readonly kicker?: string;
|
|
216
|
+
readonly badges?: string;
|
|
217
|
+
readonly badge?: string;
|
|
218
|
+
readonly close?: string;
|
|
219
|
+
readonly title?: string;
|
|
220
|
+
readonly content?: string;
|
|
221
|
+
readonly finding?: string;
|
|
222
|
+
readonly dot?: string;
|
|
223
|
+
readonly actions?: string;
|
|
224
|
+
readonly action?: string;
|
|
225
|
+
readonly ask?: string;
|
|
226
|
+
readonly pill?: string;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* The history bottom sheet (presentation `chat_history_style: "sheet"`): the member's chats by day, each with its
|
|
231
|
+
* preview, and a new chat button. Its words and classes; absent, Everfur's own words and inline look.
|
|
232
|
+
*/
|
|
233
|
+
interface EverfurChatHistorySheet {
|
|
234
|
+
/** The sheet's small title ("Chats with Ask <your brand>"). Absent, Everfur's history heading. */
|
|
235
|
+
readonly title?: string;
|
|
236
|
+
/** Where the sheet and its scrim mount (your app frame), so the scrim covers it. Absent, inside the chat. */
|
|
237
|
+
readonly container?: () => HTMLElement | null;
|
|
238
|
+
/** Draw the icons your way. */
|
|
239
|
+
readonly renderIcon?: (icon: 'close' | 'chat' | 'edit') => ReactNode;
|
|
240
|
+
readonly classNames?: {
|
|
241
|
+
readonly scrim?: string;
|
|
242
|
+
readonly sheet?: string;
|
|
243
|
+
/** Added to the scrim and the sheet while open (for a stylesheet that animates them in). */
|
|
244
|
+
readonly open?: string;
|
|
245
|
+
readonly grab?: string;
|
|
246
|
+
readonly top?: string;
|
|
247
|
+
readonly title?: string;
|
|
248
|
+
readonly close?: string;
|
|
249
|
+
readonly day?: string;
|
|
250
|
+
readonly row?: string;
|
|
251
|
+
readonly icon?: string;
|
|
252
|
+
readonly time?: string;
|
|
253
|
+
/** A row's time while it carries an unread reply (with `time`), and the dot under it. */
|
|
254
|
+
readonly timeUnread?: string;
|
|
255
|
+
readonly unreadDot?: string;
|
|
256
|
+
readonly newChat?: string;
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export type { EverfurChatTopCard as E, EverfurChatEmptyHeaderContext as a, EverfurChatEmptyState as b, EverfurChatHistoryBar as c, EverfurChatOpeningCard as d, EverfurChatAnswerCards as e, EverfurChatHistorySheet as f, EverfurChatAnswerCard as g, EverfurChatAnswerContext as h, EverfurChatFollowUpAction as i };
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
/** What `renderEmptyHeader` receives: ask a question in this thread, with no screen in between. */
|
|
4
|
+
interface EverfurChatEmptyHeaderContext {
|
|
5
|
+
/** Send `prompt` as the member's next message in the open thread (the same path as a starter chip). */
|
|
6
|
+
ask(prompt: string): void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The history bar: a "Chats" control with the member's thread count that opens the history drawer, and a "New
|
|
10
|
+
* chat" control. For a surface that passes `header={false}` and still wants the member's past chats.
|
|
11
|
+
*/
|
|
12
|
+
interface EverfurChatHistoryBar {
|
|
13
|
+
/** The history control's words ("Chats"). */
|
|
14
|
+
readonly chats: string;
|
|
15
|
+
/** The new-chat control's words ("New chat"). */
|
|
16
|
+
readonly newChat: string;
|
|
17
|
+
/** Classes per element; a class drops that element's inline default. */
|
|
18
|
+
readonly classNames?: {
|
|
19
|
+
readonly bar?: string;
|
|
20
|
+
readonly chats?: string;
|
|
21
|
+
readonly count?: string;
|
|
22
|
+
readonly newChat?: string;
|
|
23
|
+
/** The dot on "Chats" while some thread carries an unread reply. */
|
|
24
|
+
readonly unreadDot?: string;
|
|
25
|
+
};
|
|
26
|
+
/** Draw the two icons your way. */
|
|
27
|
+
readonly renderIcon?: (icon: 'history' | 'edit') => ReactNode;
|
|
28
|
+
/** Your own control after "Chats" (a pill that reopens a card you closed). Absent, nothing is drawn. */
|
|
29
|
+
readonly extra?: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The empty thread's own title and layout, for a host that draws it its way. The words are yours; a class drops
|
|
33
|
+
* that element's inline layout default (a starter chip keeps its tint). Absent, the empty state is Everfur's own.
|
|
34
|
+
*/
|
|
35
|
+
interface EverfurChatEmptyState {
|
|
36
|
+
/** The title over the starter chips, in place of "What can we help {pet} with today?". */
|
|
37
|
+
readonly title?: string;
|
|
38
|
+
readonly classNames?: {
|
|
39
|
+
/** The block that holds the title and the chips (under `renderEmptyHeader`'s card). */
|
|
40
|
+
readonly start?: string;
|
|
41
|
+
readonly title?: string;
|
|
42
|
+
readonly list?: string;
|
|
43
|
+
readonly chip?: string;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Fills for the chips that bring none of their own (Everfur's built-in chips, the backend's suggestions, a starter
|
|
47
|
+
* prompt without a `tint`), taken in turn: the first chip the first fill, and round again. Each is a fill (any CSS
|
|
48
|
+
* colour) and its ink. Absent or empty, those chips keep the theme's paint.
|
|
49
|
+
*/
|
|
50
|
+
readonly chipTints?: readonly {
|
|
51
|
+
readonly tint: string;
|
|
52
|
+
readonly ink?: string;
|
|
53
|
+
}[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The card a thread opened from a notification starts with, in place of the member's first bubble: drawn while
|
|
57
|
+
* the first message of the open thread is the surface's `initialAsk`.
|
|
58
|
+
*/
|
|
59
|
+
interface EverfurChatOpeningCard {
|
|
60
|
+
/** The line over the title ("Notification · 9:41 AM"). */
|
|
61
|
+
readonly kicker: string;
|
|
62
|
+
readonly title: string;
|
|
63
|
+
readonly body?: string;
|
|
64
|
+
/** The brand mark in the card's corner. */
|
|
65
|
+
readonly icon?: ReactNode;
|
|
66
|
+
/** Classes per element; a class drops that element's inline default. */
|
|
67
|
+
readonly classNames?: {
|
|
68
|
+
readonly card?: string;
|
|
69
|
+
readonly icon?: string;
|
|
70
|
+
readonly body?: string;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* One card under an answer in the cards answer style (presentation `chat_answer_style: "cards"`): a record (a tile, the
|
|
75
|
+
* title, a meta line, a status pill and a chevron), a stat (the title, a meta line and a value), or a link to one of your
|
|
76
|
+
* screens. The words and the data are yours; Everfur holds none of them.
|
|
77
|
+
*/
|
|
78
|
+
interface EverfurChatAnswerCard {
|
|
79
|
+
/** Stable key within the answer. */
|
|
80
|
+
readonly key: string;
|
|
81
|
+
readonly title: string;
|
|
82
|
+
/** The small line under the title. */
|
|
83
|
+
readonly meta?: string;
|
|
84
|
+
/** A status pill; `tone` picks `classNames.pillTone[tone]`. */
|
|
85
|
+
readonly pill?: {
|
|
86
|
+
readonly label: string;
|
|
87
|
+
readonly tone?: string;
|
|
88
|
+
};
|
|
89
|
+
/** A stat card's value (`14` with the unit `lb`): drawn in place of the pill and the chevron. */
|
|
90
|
+
readonly value?: {
|
|
91
|
+
readonly amount: string;
|
|
92
|
+
readonly unit?: string;
|
|
93
|
+
};
|
|
94
|
+
/** The tile at the start: an icon of yours, or an image (https, or a path on your own origin); `tone` picks `classNames.tileTone[tone]`. */
|
|
95
|
+
readonly tile?: {
|
|
96
|
+
readonly icon?: ReactNode;
|
|
97
|
+
readonly imageUrl?: string;
|
|
98
|
+
readonly tone?: string;
|
|
99
|
+
};
|
|
100
|
+
/** Picks `classNames.cardVariant[variant]` (for example a highlighted plan card). */
|
|
101
|
+
readonly variant?: string;
|
|
102
|
+
/** Given, the card is a button that calls this. Absent, a static card. */
|
|
103
|
+
readonly onPress?: () => void;
|
|
104
|
+
/**
|
|
105
|
+
* A card of your own (the host card slot): given, Everfur draws this node in the card's place, inside the card's
|
|
106
|
+
* class (`classNames.card` plus `cardVariant[variant]`), and ignores the tile, the pill, the value and `onPress`.
|
|
107
|
+
* Use it for a card Everfur's shapes do not cover (for example a breed-mix chart). If it throws, the slot draws
|
|
108
|
+
* nothing and the answer still draws. `title` stays its accessible name.
|
|
109
|
+
*/
|
|
110
|
+
readonly render?: () => ReactNode;
|
|
111
|
+
}
|
|
112
|
+
/** What `answerCards.cards` receives: the settled answer's text and the question it answered. */
|
|
113
|
+
interface EverfurChatAnswerContext {
|
|
114
|
+
readonly answer: string;
|
|
115
|
+
readonly question: string | null;
|
|
116
|
+
/** The answer's message id, stable for the life of the thread. */
|
|
117
|
+
readonly messageId: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The cards answer style's content and classes (used while presentation `chat_answer_style` is `cards`). Every part is
|
|
121
|
+
* optional; absent, the answer is drawn open (no bubble) with Everfur's own sources and footer. The words are yours.
|
|
122
|
+
*/
|
|
123
|
+
interface EverfurChatAnswerCards {
|
|
124
|
+
/** The line over each answer (an icon and your words, "Read her test results"). Absent, the assistant's name line. */
|
|
125
|
+
readonly byline?: {
|
|
126
|
+
readonly label: string;
|
|
127
|
+
readonly icon?: ReactNode;
|
|
128
|
+
};
|
|
129
|
+
/** Your cards under a settled answer (records, stats, a link to your plan). A throw draws none. */
|
|
130
|
+
readonly cards?: (context: EverfurChatAnswerContext) => readonly EverfurChatAnswerCard[];
|
|
131
|
+
/**
|
|
132
|
+
* Two feedback chips in place of the footer's thumbs, mapped to thumbs up and thumbs down; the footer's Copy control
|
|
133
|
+
* stays beside them (`classNames.copy`). Absent, Everfur's own footer.
|
|
134
|
+
*/
|
|
135
|
+
readonly feedback?: {
|
|
136
|
+
readonly helpful: string;
|
|
137
|
+
readonly notHelpful: string;
|
|
138
|
+
};
|
|
139
|
+
/** Your own rows at the top of the follow-ups ("See her Health Plan"), for the answer it receives. */
|
|
140
|
+
readonly followUpActions?: (context: EverfurChatAnswerContext) => readonly EverfurChatFollowUpAction[];
|
|
141
|
+
/** Draw the chevron your way. Absent, Everfur's glyph. */
|
|
142
|
+
readonly renderIcon?: (icon: 'chevron') => ReactNode;
|
|
143
|
+
/** Classes per element; a class drops that element's inline default. */
|
|
144
|
+
readonly classNames?: {
|
|
145
|
+
/** The answer row (the by-line, the body, the cards, the feedback). */
|
|
146
|
+
readonly answer?: string;
|
|
147
|
+
readonly byline?: string;
|
|
148
|
+
readonly body?: string;
|
|
149
|
+
/** The owner's question bubble. */
|
|
150
|
+
readonly question?: string;
|
|
151
|
+
readonly cards?: string;
|
|
152
|
+
readonly card?: string;
|
|
153
|
+
readonly cardStat?: string;
|
|
154
|
+
readonly cardVariant?: Readonly<Record<string, string>>;
|
|
155
|
+
readonly tile?: string;
|
|
156
|
+
readonly tileTone?: Readonly<Record<string, string>>;
|
|
157
|
+
readonly title?: string;
|
|
158
|
+
readonly meta?: string;
|
|
159
|
+
readonly pill?: string;
|
|
160
|
+
readonly pillTone?: Readonly<Record<string, string>>;
|
|
161
|
+
readonly value?: string;
|
|
162
|
+
readonly feedback?: string;
|
|
163
|
+
/** The Copy control beside the feedback chips. */
|
|
164
|
+
readonly copy?: string;
|
|
165
|
+
/** The block of follow-ups under the answer, its label and each row. */
|
|
166
|
+
readonly followUps?: string;
|
|
167
|
+
readonly followUpsLabel?: string;
|
|
168
|
+
readonly followUp?: string;
|
|
169
|
+
readonly followUpAction?: string;
|
|
170
|
+
/** The safety disclaimer when presentation `safety_disclaimer_placement` is `answer_footer`. */
|
|
171
|
+
readonly disclaimer?: string;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/** A row of yours at the top of the follow-ups under an answer. */
|
|
175
|
+
interface EverfurChatFollowUpAction {
|
|
176
|
+
readonly key: string;
|
|
177
|
+
readonly label: string;
|
|
178
|
+
readonly icon?: ReactNode;
|
|
179
|
+
readonly onPress: () => void;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* The card at the top of the empty thread (presentation `chat_top_card: "focus"`): one finding, in your words, with
|
|
183
|
+
* an action of yours and a question it can ask in the thread. A close control folds it into a pill beside "Chats" in
|
|
184
|
+
* the history bar, which opens it again.
|
|
185
|
+
*/
|
|
186
|
+
interface EverfurChatTopCard {
|
|
187
|
+
/** The small heading ("Her focus"). */
|
|
188
|
+
readonly kicker: string;
|
|
189
|
+
/** A source badge ("<your brand> results"). */
|
|
190
|
+
readonly badge?: string;
|
|
191
|
+
readonly title: string;
|
|
192
|
+
/** The finding: a bold lead and the rest of the sentence. */
|
|
193
|
+
readonly lead?: string;
|
|
194
|
+
readonly body?: string;
|
|
195
|
+
/** Your action ("See her Health Plan"). */
|
|
196
|
+
readonly action?: {
|
|
197
|
+
readonly label: string;
|
|
198
|
+
readonly onPress: () => void;
|
|
199
|
+
};
|
|
200
|
+
/** A question the card asks in this thread ("What does it mean?" sends `prompt`). */
|
|
201
|
+
readonly ask?: {
|
|
202
|
+
readonly label: string;
|
|
203
|
+
readonly prompt: string;
|
|
204
|
+
};
|
|
205
|
+
/** The close control's accessible name; given, the card can close to the pill. */
|
|
206
|
+
readonly closeLabel?: string;
|
|
207
|
+
/** The pill's words while the card is closed (defaults to `kicker`). */
|
|
208
|
+
readonly pill?: string;
|
|
209
|
+
/** Draw the close glyph your way. */
|
|
210
|
+
readonly renderIcon?: (icon: 'close') => ReactNode;
|
|
211
|
+
/** Classes per element; a class drops that element's inline default. */
|
|
212
|
+
readonly classNames?: {
|
|
213
|
+
readonly wrap?: string;
|
|
214
|
+
readonly card?: string;
|
|
215
|
+
readonly kicker?: string;
|
|
216
|
+
readonly badges?: string;
|
|
217
|
+
readonly badge?: string;
|
|
218
|
+
readonly close?: string;
|
|
219
|
+
readonly title?: string;
|
|
220
|
+
readonly content?: string;
|
|
221
|
+
readonly finding?: string;
|
|
222
|
+
readonly dot?: string;
|
|
223
|
+
readonly actions?: string;
|
|
224
|
+
readonly action?: string;
|
|
225
|
+
readonly ask?: string;
|
|
226
|
+
readonly pill?: string;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* The history bottom sheet (presentation `chat_history_style: "sheet"`): the member's chats by day, each with its
|
|
231
|
+
* preview, and a new chat button. Its words and classes; absent, Everfur's own words and inline look.
|
|
232
|
+
*/
|
|
233
|
+
interface EverfurChatHistorySheet {
|
|
234
|
+
/** The sheet's small title ("Chats with Ask <your brand>"). Absent, Everfur's history heading. */
|
|
235
|
+
readonly title?: string;
|
|
236
|
+
/** Where the sheet and its scrim mount (your app frame), so the scrim covers it. Absent, inside the chat. */
|
|
237
|
+
readonly container?: () => HTMLElement | null;
|
|
238
|
+
/** Draw the icons your way. */
|
|
239
|
+
readonly renderIcon?: (icon: 'close' | 'chat' | 'edit') => ReactNode;
|
|
240
|
+
readonly classNames?: {
|
|
241
|
+
readonly scrim?: string;
|
|
242
|
+
readonly sheet?: string;
|
|
243
|
+
/** Added to the scrim and the sheet while open (for a stylesheet that animates them in). */
|
|
244
|
+
readonly open?: string;
|
|
245
|
+
readonly grab?: string;
|
|
246
|
+
readonly top?: string;
|
|
247
|
+
readonly title?: string;
|
|
248
|
+
readonly close?: string;
|
|
249
|
+
readonly day?: string;
|
|
250
|
+
readonly row?: string;
|
|
251
|
+
readonly icon?: string;
|
|
252
|
+
readonly time?: string;
|
|
253
|
+
/** A row's time while it carries an unread reply (with `time`), and the dot under it. */
|
|
254
|
+
readonly timeUnread?: string;
|
|
255
|
+
readonly unreadDot?: string;
|
|
256
|
+
readonly newChat?: string;
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export type { EverfurChatTopCard as E, EverfurChatEmptyHeaderContext as a, EverfurChatEmptyState as b, EverfurChatHistoryBar as c, EverfurChatOpeningCard as d, EverfurChatAnswerCards as e, EverfurChatHistorySheet as f, EverfurChatAnswerCard as g, EverfurChatAnswerContext as h, EverfurChatFollowUpAction as i };
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
/** The fixed set of slot names, in the order the surfaces list them. */
|
|
2
|
-
declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link", "header", "banner", "chip", "card", "input", "tab", "bookingStep", "dialog"];
|
|
2
|
+
declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link", "header", "banner", "chip", "card", "input", "tab", "bookingStep", "dialog", "cartBar", "planCard", "planReasonLabel"];
|
|
3
3
|
type EverfurThemeSlotName = (typeof THEME_SLOT_NAMES)[number];
|
|
4
4
|
/** The allow-listed paint keys a slot accepts. */
|
|
5
5
|
declare const THEME_SLOT_KEYS: readonly ["backgroundColor", "borderColor", "borderRadius", "textColor"];
|
|
6
6
|
type EverfurThemeSlotKey = (typeof THEME_SLOT_KEYS)[number];
|
|
7
|
+
/**
|
|
8
|
+
* The slots that accept only a subset of `THEME_SLOT_KEYS`, as EFBackend branding_slots.py
|
|
9
|
+
* `SLOT_PAINT_KEYS_BY_SLOT` says (contract digest 9a37e095). Every other slot accepts all four. A key outside the
|
|
10
|
+
* subset is dropped when the slot is parsed, so the SDK paints exactly what the console can save.
|
|
11
|
+
*/
|
|
12
|
+
declare const THEME_SLOT_KEYS_BY_SLOT: Readonly<Partial<Record<EverfurThemeSlotName, readonly EverfurThemeSlotKey[]>>>;
|
|
13
|
+
/** The paint keys `name` accepts. */
|
|
14
|
+
declare function themeSlotKeysFor(name: EverfurThemeSlotName): readonly EverfurThemeSlotKey[];
|
|
7
15
|
/** One slot's paint: every key optional; a key that is absent keeps the surface's own token. */
|
|
8
16
|
interface EverfurThemeSlot {
|
|
9
17
|
/** Normalized colour (`#RRGGBB` or `rgba(...)`). */
|
|
@@ -460,4 +468,4 @@ declare const EVERFUR_LIGHT: EverfurTheme;
|
|
|
460
468
|
/** The compiled DARK default (deeply frozen). */
|
|
461
469
|
declare const EVERFUR_DARK: EverfurTheme;
|
|
462
470
|
|
|
463
|
-
export {
|
|
471
|
+
export { EVERFUR_LIGHT as A, type EverfurEasingCurve as B, type EverfurTextScaleTier as C, DEFAULT_MAX_FONT_SCALE as D, type EverfurColorTokens as E, SLOT_MIN_CONTRAST as F, SYSTEM_FONT_FAMILY as G, SYSTEM_MONO_FAMILY as H, type SlotGrounds as I, type SlotSurrounds as J, TEXT_SCALE_TIER_CAPS as K, cssCubicBezier as L, deepFreeze as M, guardSlotContrast as N, mergeThemeSlots as O, parseThemeSlots as P, SLOT_MIN_BORDER_CONTRAST as S, THEME_SLOT_KEYS as T, type EverfurFontFaceKey as a, type EverfurFontFamilies as b, type EverfurFontSource as c, type EverfurFontWeight as d, type EverfurLetterSpacingTokens as e, type EverfurLineHeightTokens as f, type EverfurMotionDurationTokens as g, type EverfurMotionTokens as h, type EverfurRadiusTokens as i, type EverfurSpaceTokens as j, type EverfurSpringToken as k, type EverfurTextColorTokens as l, type EverfurTheme as m, type EverfurThemeMeta as n, type EverfurThemeSlot as o, type EverfurThemeSlotKey as p, type EverfurThemeSlotName as q, type EverfurThemeSlots as r, type EverfurTypeSizeTokens as s, type EverfurTypeTokens as t, type EverfurWeightTokens as u, THEME_SLOT_KEYS_BY_SLOT as v, THEME_SLOT_NAMES as w, themeSlotKeysFor as x, EASING_CURVES as y, EVERFUR_DARK as z };
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
/** The fixed set of slot names, in the order the surfaces list them. */
|
|
2
|
-
declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link", "header", "banner", "chip", "card", "input", "tab", "bookingStep", "dialog"];
|
|
2
|
+
declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link", "header", "banner", "chip", "card", "input", "tab", "bookingStep", "dialog", "cartBar", "planCard", "planReasonLabel"];
|
|
3
3
|
type EverfurThemeSlotName = (typeof THEME_SLOT_NAMES)[number];
|
|
4
4
|
/** The allow-listed paint keys a slot accepts. */
|
|
5
5
|
declare const THEME_SLOT_KEYS: readonly ["backgroundColor", "borderColor", "borderRadius", "textColor"];
|
|
6
6
|
type EverfurThemeSlotKey = (typeof THEME_SLOT_KEYS)[number];
|
|
7
|
+
/**
|
|
8
|
+
* The slots that accept only a subset of `THEME_SLOT_KEYS`, as EFBackend branding_slots.py
|
|
9
|
+
* `SLOT_PAINT_KEYS_BY_SLOT` says (contract digest 9a37e095). Every other slot accepts all four. A key outside the
|
|
10
|
+
* subset is dropped when the slot is parsed, so the SDK paints exactly what the console can save.
|
|
11
|
+
*/
|
|
12
|
+
declare const THEME_SLOT_KEYS_BY_SLOT: Readonly<Partial<Record<EverfurThemeSlotName, readonly EverfurThemeSlotKey[]>>>;
|
|
13
|
+
/** The paint keys `name` accepts. */
|
|
14
|
+
declare function themeSlotKeysFor(name: EverfurThemeSlotName): readonly EverfurThemeSlotKey[];
|
|
7
15
|
/** One slot's paint: every key optional; a key that is absent keeps the surface's own token. */
|
|
8
16
|
interface EverfurThemeSlot {
|
|
9
17
|
/** Normalized colour (`#RRGGBB` or `rgba(...)`). */
|
|
@@ -460,4 +468,4 @@ declare const EVERFUR_LIGHT: EverfurTheme;
|
|
|
460
468
|
/** The compiled DARK default (deeply frozen). */
|
|
461
469
|
declare const EVERFUR_DARK: EverfurTheme;
|
|
462
470
|
|
|
463
|
-
export {
|
|
471
|
+
export { EVERFUR_LIGHT as A, type EverfurEasingCurve as B, type EverfurTextScaleTier as C, DEFAULT_MAX_FONT_SCALE as D, type EverfurColorTokens as E, SLOT_MIN_CONTRAST as F, SYSTEM_FONT_FAMILY as G, SYSTEM_MONO_FAMILY as H, type SlotGrounds as I, type SlotSurrounds as J, TEXT_SCALE_TIER_CAPS as K, cssCubicBezier as L, deepFreeze as M, guardSlotContrast as N, mergeThemeSlots as O, parseThemeSlots as P, SLOT_MIN_BORDER_CONTRAST as S, THEME_SLOT_KEYS as T, type EverfurFontFaceKey as a, type EverfurFontFamilies as b, type EverfurFontSource as c, type EverfurFontWeight as d, type EverfurLetterSpacingTokens as e, type EverfurLineHeightTokens as f, type EverfurMotionDurationTokens as g, type EverfurMotionTokens as h, type EverfurRadiusTokens as i, type EverfurSpaceTokens as j, type EverfurSpringToken as k, type EverfurTextColorTokens as l, type EverfurTheme as m, type EverfurThemeMeta as n, type EverfurThemeSlot as o, type EverfurThemeSlotKey as p, type EverfurThemeSlotName as q, type EverfurThemeSlots as r, type EverfurTypeSizeTokens as s, type EverfurTypeTokens as t, type EverfurWeightTokens as u, THEME_SLOT_KEYS_BY_SLOT as v, THEME_SLOT_NAMES as w, themeSlotKeysFor as x, EASING_CURVES as y, EVERFUR_DARK as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ClientBranding, E as EverfurThemeInput } from './branding-
|
|
2
|
-
import { m as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens-
|
|
1
|
+
import { C as ClientBranding, E as EverfurThemeInput } from './branding.d-DI8S400y.cjs';
|
|
2
|
+
import { m as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens.d-DarDaV39.cjs';
|
|
3
3
|
|
|
4
4
|
/** One partner input the contrast guard adjusted. */
|
|
5
5
|
interface EverfurThemeAdjustment {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ClientBranding, E as EverfurThemeInput } from './branding-
|
|
2
|
-
import { m as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens-
|
|
1
|
+
import { C as ClientBranding, E as EverfurThemeInput } from './branding.d-OIGLbQeM.js';
|
|
2
|
+
import { m as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens.d-DarDaV39.js';
|
|
3
3
|
|
|
4
4
|
/** One partner input the contrast guard adjusted. */
|
|
5
5
|
interface EverfurThemeAdjustment {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { i as EverfurPresentationInput, h as EverfurPresentation } from './presentation.d-DMbdad7G.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The tenant's presentation settings resolved against `client` (the explicit props; leave a field undefined to
|
|
5
|
+
* take the console value). Total: always every field.
|
|
6
|
+
*/
|
|
7
|
+
declare function useEverfurPresentation(client?: EverfurPresentationInput | null): EverfurPresentation;
|
|
8
|
+
|
|
9
|
+
export { useEverfurPresentation as u };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { i as EverfurPresentationInput, h as EverfurPresentation } from './presentation.d-DMbdad7G.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The tenant's presentation settings resolved against `client` (the explicit props; leave a field undefined to
|
|
5
|
+
* take the console value). Total: always every field.
|
|
6
|
+
*/
|
|
7
|
+
declare function useEverfurPresentation(client?: EverfurPresentationInput | null): EverfurPresentation;
|
|
8
|
+
|
|
9
|
+
export { useEverfurPresentation as u };
|