@alfadocs/ui-kit 1.3.13 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/agenda-card.agent-Cb5tuEh3.js +28 -0
- package/dist/_chunks/{alia-sidebar-DzNz1gDf.js → alia-sidebar-DSBZMick.js} +3 -3
- package/dist/_chunks/{anamnesis-i18n-CfC0qYzy.js → anamnesis-i18n-DZcrt8dP.js} +2141 -2069
- package/dist/_chunks/{antenatal-schedule-timeline-BMMpi2lb.js → antenatal-schedule-timeline-u8TsS2QJ.js} +27 -26
- package/dist/_chunks/{appointment-timeline-B630OT_J.js → appointment-timeline-Bqf1sTU5.js} +2 -2
- package/dist/_chunks/{ar-THMLfSoN.js → ar-BR1FGFP2.js} +14 -14
- package/dist/_chunks/{bmi-calculator-CM0-G2mg.js → bmi-calculator-CpyY13MV.js} +2 -2
- package/dist/_chunks/{booking-DjNbd7C1.js → booking-BjsA7j1-.js} +699 -688
- package/dist/_chunks/calculator-dialog-12d3Sxaz.js +48 -0
- package/dist/_chunks/{care-plan-card-1G_f4I5s.js → care-plan-card-BvQy366X.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-DmBsffHS.js → care-plan-entry-card-apk_5B3O.js} +2 -2
- package/dist/_chunks/{chat-container-HlFnoEIl.js → chat-container-CYYego1W.js} +105 -81
- package/dist/_chunks/cycle-calculator-B7fyH-h4.js +425 -0
- package/dist/_chunks/{date-picker-ZHejTVAJ.js → date-picker-Bp64zk2p.js} +19 -19
- package/dist/_chunks/date-picker-variants-pKAJfnWr.js +2089 -0
- package/dist/_chunks/{date-range-picker-pEG3Ln3i.js → date-range-picker-CDrZ8Zh0.js} +27 -27
- package/dist/_chunks/{date-time-picker-695QvBGj.js → date-time-picker-DafkGDGO.js} +10 -10
- package/dist/_chunks/{de-DmZ-8rTN.js → de-3iM4rGqo.js} +7 -7
- package/dist/_chunks/{document-preview-D3gg4MXB.js → document-preview-DOrsqiN1.js} +2 -2
- package/dist/_chunks/due-date-calculator-CnkbbAej.js +571 -0
- package/dist/_chunks/{editor-overlay-DE3esyio.js → editor-overlay-B1tr2i7B.js} +22 -21
- package/dist/_chunks/{el-Bela9mxs.js → el-C96rGJvU.js} +2 -2
- package/dist/_chunks/{es-BNncHKex.js → es-Cxiqjx8r.js} +12 -12
- package/dist/_chunks/fetal-weight-avlj-l-S.js +223 -0
- package/dist/_chunks/format-4HNwNGrN.js +1315 -0
- package/dist/_chunks/{fr-CH8ADfhN.js → fr-Bhr6SYKj.js} +21 -21
- package/dist/_chunks/{freemium-paywall-C_Ue6wxU.js → freemium-paywall-DRDdWuOg.js} +3 -3
- package/dist/_chunks/gestational-age-calculator-BljY_DVJ.js +488 -0
- package/dist/_chunks/hcg-doubling-Cv_vH61p.js +312 -0
- package/dist/_chunks/header-settings-Cn5fPXCE.js +335 -0
- package/dist/_chunks/{hi-Bppfxp8l.js → hi-BxXX26d_.js} +12 -12
- package/dist/_chunks/isSameWeek-B73MagWB.js +13 -0
- package/dist/_chunks/{it-B4ySaRyK.js → it-Xmjomvyj.js} +24 -24
- package/dist/_chunks/{ja-CGF6Io9P.js → ja-mfZvt1ZV.js} +16 -16
- package/dist/_chunks/{link-cell-renderer-C5XLwVXQ.js → link-cell-renderer-CJ_gk7gl.js} +3 -3
- package/dist/_chunks/{locale-picker-BfBUdT1m.js → locale-picker-D9Kv2zrK.js} +153 -132
- package/dist/_chunks/map-view-2yZCQW2l.js +445 -0
- package/dist/_chunks/{marketplace-app-shell-DwcFMxzp.js → marketplace-app-shell-BLRvg-M0.js} +49 -40
- package/dist/_chunks/{nl-DuShqwuV.js → nl-DDs-KEnD.js} +15 -15
- package/dist/_chunks/{notes-panel-DPsgB4Mv.js → notes-panel-CiFN3sLW.js} +2 -2
- package/dist/_chunks/{number-input-DrozbZAU.js → number-input-DOe5VYei.js} +64 -64
- package/dist/_chunks/{optical-prescription-BDHJr8Zz.js → optical-prescription-CRemE8fL.js} +2 -2
- package/dist/_chunks/{parse-DvA97ro9.js → parse-JqixfsU0.js} +43 -43
- package/dist/_chunks/parseISO-fOGpHKXm.js +120 -0
- package/dist/_chunks/{patient-details-DqjjwPmt.js → patient-details-CpunD0qx.js} +3 -3
- package/dist/_chunks/{patient-table-BmIDrLIS.js → patient-table-2eWx-Rrk.js} +2 -2
- package/dist/_chunks/{payment-form-h-BZ8onk.js → payment-form-Ds1I9KqB.js} +308 -231
- package/dist/_chunks/{pdf-viewer-Ddx-T053.js → pdf-viewer-DUIsV9s5.js} +429 -369
- package/dist/_chunks/{pl-CKQwX9Fk.js → pl-BYYMnEWP.js} +18 -18
- package/dist/_chunks/{practice-results-B-HPc13W.js → practice-results-SjCniMd2.js} +2 -2
- package/dist/_chunks/pregnancy-dating-BmpHScZ0.js +770 -0
- package/dist/_chunks/pregnancy-weight-gain-B5KSJzdc.js +553 -0
- package/dist/_chunks/progress-CK8otcQ-.js +343 -0
- package/dist/_chunks/{pt-_njpXyOZ.js → pt-BSPnVrQ7.js} +20 -20
- package/dist/_chunks/{radiograph-panel.agent-BQZ64Riy.js → radiograph-panel.agent-CtFtNMzk.js} +3 -3
- package/dist/_chunks/{rich-text-editor-CfeXPPWs.js → rich-text-editor-BedTpWzL.js} +2 -2
- package/dist/_chunks/{ro-3X6_4FcN.js → ro-BbiylGmG.js} +14 -14
- package/dist/_chunks/{ru-bAcgmnS-.js → ru-BX_qsV67.js} +14 -14
- package/dist/_chunks/{session-countdown-Bc70VXN1.js → session-countdown-BL-Psg8u.js} +2 -2
- package/dist/_chunks/{sign-document-CW_ByDUh.js → sign-document-jF4fZDJ5.js} +2 -2
- package/dist/_chunks/slot-grid-DNiUcXy2.js +640 -0
- package/dist/_chunks/{sparkline-BTY4B5tv.js → sparkline-BmGcEyZO.js} +209 -164
- package/dist/_chunks/{sq-jYFqr4Ga.js → sq-i9UOk4P7.js} +10 -10
- package/dist/_chunks/subDays-CAUv47M1.js +8 -0
- package/dist/_chunks/{sv-BSGEJ-8B.js → sv-CpTdtmDQ.js} +8 -8
- package/dist/_chunks/{tab-bar-Axhk6xzx.js → tab-bar-BYESZINM.js} +83 -77
- package/dist/_chunks/task-card.agent-CF2N_uu4.js +29 -0
- package/dist/_chunks/{tr-CTpgUtw6.js → tr-DXG2QN1K.js} +17 -17
- package/dist/_chunks/{unit-converter-COgkN7YP.js → unit-converter-CHPDuV7W.js} +2 -2
- package/dist/_chunks/{warning-stack-BtjmJChC.js → warning-stack-B7t_8jRE.js} +42 -37
- package/dist/_chunks/{zh-CN-BgM0Io2O.js → zh-CN-vPkPEK6H.js} +18 -18
- package/dist/agent-catalog.json +6426 -3382
- package/dist/agent-i18n/en.json +234 -15
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/chat-container/chat-container.d.ts +14 -0
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.agent.d.ts +4 -0
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +42 -0
- package/dist/components/cycle-calculator/index.d.ts +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.agent.d.ts +4 -0
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +61 -1
- package/dist/components/due-date-calculator/index.d.ts +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editor-overlay/editor-overlay.d.ts +7 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/fetal-weight/fetal-weight.agent.d.ts +4 -0
- package/dist/components/fetal-weight/fetal-weight.d.ts +26 -0
- package/dist/components/fetal-weight/index.d.ts +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.agent.d.ts +4 -0
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +44 -2
- package/dist/components/gestational-age-calculator/index.d.ts +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/hcg-doubling.agent.d.ts +4 -0
- package/dist/components/hcg-doubling/hcg-doubling.d.ts +30 -0
- package/dist/components/hcg-doubling/index.d.ts +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +13 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/locale-picker/locale-picker.d.ts +9 -0
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +22 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +2 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-form/index.d.ts +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts +32 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +13 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.d.ts +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-dating/pregnancy-dating.agent.d.ts +4 -0
- package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +65 -1
- package/dist/components/pregnancy-weight-gain/index.d.ts +2 -1
- package/dist/components/pregnancy-weight-gain/index.js +6 -5
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.agent.d.ts +4 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +35 -0
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/progress.d.ts +13 -0
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/slot-grid/index.d.ts +2 -1
- package/dist/components/slot-grid/index.js +5 -4
- package/dist/components/slot-grid/slot-grid.agent.d.ts +4 -0
- package/dist/components/slot-grid/slot-grid.d.ts +34 -0
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +10 -0
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +13 -0
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/index.js +630 -627
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/anamnesis-derive.d.ts +27 -8
- package/dist/patterns/anamnesis/anamnesis-format.d.ts +11 -3
- package/dist/patterns/anamnesis/anamnesis-highlight.d.ts +6 -0
- package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +23 -9
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +7 -0
- package/dist/patterns/anamnesis/anamnesis.d.ts +16 -7
- package/dist/patterns/anamnesis/index.d.ts +3 -2
- package/dist/patterns/anamnesis/index.js +7 -6
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +6 -0
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/agenda-card.agent-mTCrkKSZ.js +0 -27
- package/dist/_chunks/calculator-dialog-DuXMQSdm.js +0 -40
- package/dist/_chunks/cycle-calculator-BwqYVPB4.js +0 -252
- package/dist/_chunks/date-picker-variants-eL6HjWvw.js +0 -3363
- package/dist/_chunks/due-date-calculator-CwfsFd3T.js +0 -256
- package/dist/_chunks/fetal-weight-ePlLjJPc.js +0 -122
- package/dist/_chunks/gestational-age-calculator-DdgbH69Z.js +0 -311
- package/dist/_chunks/hcg-doubling-BBqD2wI2.js +0 -170
- package/dist/_chunks/header-settings--pjYOe6g.js +0 -284
- package/dist/_chunks/isSameDay-DUEiAT0G.js +0 -39
- package/dist/_chunks/isSameWeek-CK4HS9lH.js +0 -14
- package/dist/_chunks/map-view-CsaHfoo6.js +0 -378
- package/dist/_chunks/pregnancy-dating-DzYTlBkT.js +0 -421
- package/dist/_chunks/pregnancy-weight-gain-O6J0sUIi.js +0 -322
- package/dist/_chunks/progress-DA413-zn.js +0 -299
- package/dist/_chunks/slot-grid-CQSULZjd.js +0 -502
- package/dist/_chunks/subDays-BcNi04uf.js +0 -8
- package/dist/_chunks/task-card.agent-Bt14CzUd.js +0 -25
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsxs as a, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { D as r } from "./dialog-UbKJCi1X.js";
|
|
4
|
+
const u = p(
|
|
5
|
+
({
|
|
6
|
+
trigger: i,
|
|
7
|
+
title: t,
|
|
8
|
+
description: o,
|
|
9
|
+
children: n,
|
|
10
|
+
size: c = "lg",
|
|
11
|
+
open: d,
|
|
12
|
+
defaultOpen: m,
|
|
13
|
+
onOpenChange: s,
|
|
14
|
+
id: e,
|
|
15
|
+
className: g
|
|
16
|
+
}, h) => /* @__PURE__ */ a(
|
|
17
|
+
r,
|
|
18
|
+
{
|
|
19
|
+
open: d,
|
|
20
|
+
defaultOpen: m,
|
|
21
|
+
onOpenChange: s,
|
|
22
|
+
id: e,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ l(r.Trigger, { asChild: !0, children: i }),
|
|
25
|
+
/* @__PURE__ */ a(r.Content, { ref: h, size: c, children: [
|
|
26
|
+
/* @__PURE__ */ a(r.Header, { children: [
|
|
27
|
+
/* @__PURE__ */ l(r.Title, { children: t }),
|
|
28
|
+
o ? /* @__PURE__ */ l(r.Description, { children: o }) : null
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ l(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
"data-component": "calculator-dialog",
|
|
34
|
+
"data-component-id": e,
|
|
35
|
+
className: g,
|
|
36
|
+
children: n
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
);
|
|
44
|
+
u.displayName = "CalculatorDialog";
|
|
45
|
+
export {
|
|
46
|
+
u as C
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=calculator-dialog-12d3Sxaz.js.map
|
|
@@ -3,11 +3,11 @@ import { forwardRef as H, useId as P } from "react";
|
|
|
3
3
|
import { useTranslation as M } from "react-i18next";
|
|
4
4
|
import { B as N } from "./badge-DCOqV9mI.js";
|
|
5
5
|
import { L as F } from "./link-CPb_pZPr.js";
|
|
6
|
-
import { P as A } from "./progress-
|
|
6
|
+
import { P as A } from "./progress-CK8otcQ-.js";
|
|
7
7
|
import { T as C } from "./timestamp-BV2lC-wV.js";
|
|
8
8
|
import { T as L } from "./transaction-chip-DJCstquX.js";
|
|
9
9
|
import { A as O, b as G, c as Y, a as $ } from "./accordion-C11v9ouP.js";
|
|
10
|
-
import { C as q } from "./care-plan-entry-card-
|
|
10
|
+
import { C as q } from "./care-plan-entry-card-apk_5B3O.js";
|
|
11
11
|
import { u as J } from "./registry-DvAUVLHh.js";
|
|
12
12
|
import { C as Q, e as W } from "./entity-card-9_62gY7l.js";
|
|
13
13
|
import { i as X } from "./is-safe-url-DkETxeHz.js";
|
|
@@ -253,4 +253,4 @@ export {
|
|
|
253
253
|
de as C,
|
|
254
254
|
Z as c
|
|
255
255
|
};
|
|
256
|
-
//# sourceMappingURL=care-plan-card-
|
|
256
|
+
//# sourceMappingURL=care-plan-card-BvQy366X.js.map
|
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as _, useId as v } from "react";
|
|
3
3
|
import { useTranslation as R } from "react-i18next";
|
|
4
4
|
import { B as c } from "./badge-DCOqV9mI.js";
|
|
5
|
-
import { P as O } from "./progress-
|
|
5
|
+
import { P as O } from "./progress-CK8otcQ-.js";
|
|
6
6
|
import { T as q } from "./tag-3wgkwwDB.js";
|
|
7
7
|
import { T as b } from "./timestamp-BV2lC-wV.js";
|
|
8
8
|
import { T as G } from "./transaction-chip-DJCstquX.js";
|
|
@@ -319,4 +319,4 @@ export {
|
|
|
319
319
|
le as C,
|
|
320
320
|
re as c
|
|
321
321
|
};
|
|
322
|
-
//# sourceMappingURL=care-plan-entry-card-
|
|
322
|
+
//# sourceMappingURL=care-plan-entry-card-apk_5B3O.js.map
|
|
@@ -1,19 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
1
|
+
import { jsxs as u, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as V, useRef as i, useState as M, useCallback as H, useImperativeHandle as L, useMemo as S, useEffect as j } from "react";
|
|
3
|
+
import { c as k } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as E } from "react-i18next";
|
|
5
|
-
import { u as
|
|
5
|
+
import { u as K } from "./registry-DvAUVLHh.js";
|
|
6
6
|
import { u as O } from "./index-CJE9uQmb.js";
|
|
7
|
-
import { F
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { C as
|
|
11
|
-
const
|
|
7
|
+
import { F } from "./floating-action-button-pojvb9gG.js";
|
|
8
|
+
import { u as P } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
9
|
+
import { u as $ } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
10
|
+
import { C as D } from "./chevron-down-DWE7GSq9.js";
|
|
11
|
+
const U = {
|
|
12
12
|
id: "chat-container",
|
|
13
13
|
// Scrolling the log viewport is pure ephemeral view state — `scroll`,
|
|
14
14
|
// not `navigate` (nothing routes; the conversation stays in place).
|
|
15
15
|
capabilities: ["scroll"],
|
|
16
|
-
|
|
16
|
+
// A9 / §7 is the live constraint here: the message log is PHI-bearing
|
|
17
|
+
// on the Alia surfaces, so the slots stay at scroll position and a
|
|
18
|
+
// count. `ChatContainerHandle.getScrollViewport()` is deliberately NOT
|
|
19
|
+
// surfaced — it returns a live DOM node whose subtree is the whole
|
|
20
|
+
// transcript.
|
|
21
|
+
state: {
|
|
22
|
+
isAtBottom: {
|
|
23
|
+
type: "boolean",
|
|
24
|
+
descriptionKey: "ui.agent.chatContainer.state.isAtBottom",
|
|
25
|
+
description: "True when the viewport is pinned to the newest message. The read-back for `scroll_to_bottom` — the direct confirmation that the latest turn is on screen.",
|
|
26
|
+
read: (t) => t.isAtBottom()
|
|
27
|
+
},
|
|
28
|
+
messageCount: {
|
|
29
|
+
type: "number",
|
|
30
|
+
descriptionKey: "ui.agent.chatContainer.state.messageCount",
|
|
31
|
+
description: "Number of messages currently rendered in the log. Count only — never message content.",
|
|
32
|
+
read: (t) => t.getMessageCount()
|
|
33
|
+
}
|
|
34
|
+
},
|
|
17
35
|
actions: {
|
|
18
36
|
scroll_to_bottom: {
|
|
19
37
|
safety: "read",
|
|
@@ -29,9 +47,9 @@ const $ = {
|
|
|
29
47
|
},
|
|
30
48
|
idempotent: !0,
|
|
31
49
|
descriptionKey: "ui.agent.chatContainer.actions.scrollToBottom",
|
|
32
|
-
description: "Scroll the conversation viewport to the latest message.",
|
|
33
|
-
invoke: (
|
|
34
|
-
|
|
50
|
+
description: "Scroll the conversation viewport to the latest message. Read the `isAtBottom` slot afterwards to confirm the viewport settled there.",
|
|
51
|
+
invoke: (t, d) => {
|
|
52
|
+
t.scrollToBottom(d);
|
|
35
53
|
}
|
|
36
54
|
}
|
|
37
55
|
},
|
|
@@ -43,7 +61,7 @@ const $ = {
|
|
|
43
61
|
description: "Sourced from the id prop."
|
|
44
62
|
}
|
|
45
63
|
}
|
|
46
|
-
},
|
|
64
|
+
}, X = k(
|
|
47
65
|
"ds:relative ds:flex ds:w-full ds:flex-col ds:overflow-hidden ds:bg-background",
|
|
48
66
|
{
|
|
49
67
|
variants: {
|
|
@@ -54,7 +72,7 @@ const $ = {
|
|
|
54
72
|
},
|
|
55
73
|
defaultVariants: { density: "default" }
|
|
56
74
|
}
|
|
57
|
-
),
|
|
75
|
+
), Y = k(
|
|
58
76
|
[
|
|
59
77
|
"ds:flex-1 ds:min-h-0 ds:overflow-y-auto ds:overflow-x-hidden",
|
|
60
78
|
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
@@ -74,114 +92,120 @@ const $ = {
|
|
|
74
92
|
"ds:[.theme-accessible_&]:[mask-image:none]",
|
|
75
93
|
"ds:forced-colors:[mask-image:none]"
|
|
76
94
|
].join(" ")
|
|
77
|
-
),
|
|
95
|
+
), Z = 100, q = 48, G = V(
|
|
78
96
|
({
|
|
79
|
-
messages:
|
|
80
|
-
composer:
|
|
81
|
-
density:
|
|
82
|
-
className:
|
|
83
|
-
id:
|
|
84
|
-
onAutoScrollChange:
|
|
85
|
-
showScrollToLatest:
|
|
86
|
-
...
|
|
87
|
-
},
|
|
88
|
-
const { t: f } = E(),
|
|
97
|
+
messages: t,
|
|
98
|
+
composer: d,
|
|
99
|
+
density: C = "default",
|
|
100
|
+
className: T,
|
|
101
|
+
id: p,
|
|
102
|
+
onAutoScrollChange: c,
|
|
103
|
+
showScrollToLatest: N = !1,
|
|
104
|
+
..._
|
|
105
|
+
}, B) => {
|
|
106
|
+
const { t: f } = E(), n = i(null), h = i(null), [a, I] = M(!0), g = P(), r = H(
|
|
89
107
|
(e) => {
|
|
90
|
-
const s =
|
|
108
|
+
const s = n.current;
|
|
91
109
|
if (!s) return;
|
|
92
|
-
const
|
|
110
|
+
const l = ((e == null ? void 0 : e.smooth) ?? !0) && !g;
|
|
93
111
|
s.scrollTo({
|
|
94
112
|
top: s.scrollHeight,
|
|
95
|
-
behavior:
|
|
113
|
+
behavior: l ? "smooth" : "auto"
|
|
96
114
|
});
|
|
97
115
|
},
|
|
98
|
-
[
|
|
99
|
-
),
|
|
100
|
-
L(
|
|
116
|
+
[g]
|
|
117
|
+
), v = i(null);
|
|
118
|
+
L(B, () => v.current, []);
|
|
119
|
+
const b = i(a);
|
|
120
|
+
b.current = a;
|
|
121
|
+
const x = i(t.length);
|
|
122
|
+
x.current = t.length;
|
|
101
123
|
const R = S(
|
|
102
124
|
() => ({
|
|
103
|
-
scrollToBottom:
|
|
104
|
-
getScrollViewport: () =>
|
|
125
|
+
scrollToBottom: r,
|
|
126
|
+
getScrollViewport: () => n.current,
|
|
127
|
+
isAtBottom: () => b.current,
|
|
128
|
+
getMessageCount: () => x.current
|
|
105
129
|
}),
|
|
106
|
-
[
|
|
130
|
+
[r]
|
|
107
131
|
);
|
|
108
|
-
|
|
109
|
-
const e =
|
|
132
|
+
K(U, R, p), j(() => {
|
|
133
|
+
const e = n.current, s = h.current;
|
|
110
134
|
if (!e || !s) return;
|
|
111
|
-
const
|
|
112
|
-
(
|
|
113
|
-
const
|
|
114
|
-
|
|
135
|
+
const l = new IntersectionObserver(
|
|
136
|
+
(z) => {
|
|
137
|
+
const w = z[0];
|
|
138
|
+
I(w.isIntersecting), c == null || c(w.isIntersecting);
|
|
115
139
|
},
|
|
116
140
|
{
|
|
117
141
|
root: e,
|
|
118
142
|
// Fire when the sentinel is within BOTTOM_SLACK_PX of being visible.
|
|
119
|
-
rootMargin: `0px 0px ${
|
|
143
|
+
rootMargin: `0px 0px ${q}px 0px`,
|
|
120
144
|
threshold: 0
|
|
121
145
|
}
|
|
122
146
|
);
|
|
123
|
-
return
|
|
124
|
-
}, [
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}, [
|
|
129
|
-
const
|
|
130
|
-
count:
|
|
131
|
-
getScrollElement: () =>
|
|
147
|
+
return l.observe(s), () => l.disconnect();
|
|
148
|
+
}, [c]);
|
|
149
|
+
const A = t.length;
|
|
150
|
+
$(() => {
|
|
151
|
+
a && r({ smooth: !1 });
|
|
152
|
+
}, [A, a, r]);
|
|
153
|
+
const y = t.length > Z, m = O({
|
|
154
|
+
count: y ? t.length : 0,
|
|
155
|
+
getScrollElement: () => n.current,
|
|
132
156
|
estimateSize: () => 80,
|
|
133
157
|
overscan: 6,
|
|
134
158
|
getItemKey: (e) => {
|
|
135
159
|
var s;
|
|
136
|
-
return ((s =
|
|
160
|
+
return ((s = t[e]) == null ? void 0 : s.id) ?? e;
|
|
137
161
|
}
|
|
138
162
|
});
|
|
139
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ u(
|
|
140
164
|
"div",
|
|
141
165
|
{
|
|
142
|
-
ref:
|
|
143
|
-
className:
|
|
166
|
+
ref: v,
|
|
167
|
+
className: X({ density: C, className: T }),
|
|
144
168
|
"data-component": "chat-container",
|
|
145
|
-
"data-component-id":
|
|
146
|
-
...
|
|
169
|
+
"data-component-id": p,
|
|
170
|
+
..._,
|
|
147
171
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ u("div", { className: "ds:relative ds:flex-1 ds:min-h-0 ds:flex ds:flex-col", children: [
|
|
173
|
+
/* @__PURE__ */ u(
|
|
150
174
|
"div",
|
|
151
175
|
{
|
|
152
|
-
ref:
|
|
176
|
+
ref: n,
|
|
153
177
|
role: "log",
|
|
154
178
|
"aria-live": "polite",
|
|
155
179
|
"aria-relevant": "additions",
|
|
156
180
|
"aria-label": f("chat.container"),
|
|
157
181
|
tabIndex: 0,
|
|
158
|
-
className:
|
|
182
|
+
className: Y(),
|
|
159
183
|
children: [
|
|
160
|
-
|
|
184
|
+
y ? /* @__PURE__ */ o(
|
|
161
185
|
"ol",
|
|
162
186
|
{
|
|
163
187
|
className: "ds:relative ds:list-none ds:ps-0 ds:m-0",
|
|
164
|
-
style: { blockSize: `${
|
|
165
|
-
children:
|
|
166
|
-
const s =
|
|
167
|
-
return s ? /* @__PURE__ */
|
|
188
|
+
style: { blockSize: `${m.getTotalSize()}px` },
|
|
189
|
+
children: m.getVirtualItems().map((e) => {
|
|
190
|
+
const s = t[e.index];
|
|
191
|
+
return s ? /* @__PURE__ */ o(
|
|
168
192
|
"li",
|
|
169
193
|
{
|
|
170
194
|
"data-index": e.index,
|
|
171
|
-
ref:
|
|
195
|
+
ref: m.measureElement,
|
|
172
196
|
className: "ds:absolute ds:start-0 ds:end-0 ds:top-0 ds:w-full",
|
|
173
197
|
style: { transform: `translateY(${e.start}px)` },
|
|
174
|
-
children: /* @__PURE__ */
|
|
198
|
+
children: /* @__PURE__ */ o("div", { className: "ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]", children: s.node })
|
|
175
199
|
},
|
|
176
200
|
s.id
|
|
177
201
|
) : null;
|
|
178
202
|
})
|
|
179
203
|
}
|
|
180
|
-
) : /* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
204
|
+
) : /* @__PURE__ */ o("ol", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:list-none ds:ps-0 ds:m-0", children: t.map((e) => /* @__PURE__ */ o("li", { children: e.node }, e.id)) }),
|
|
205
|
+
/* @__PURE__ */ o(
|
|
182
206
|
"div",
|
|
183
207
|
{
|
|
184
|
-
ref:
|
|
208
|
+
ref: h,
|
|
185
209
|
"aria-hidden": "true",
|
|
186
210
|
className: "ds:h-1 ds:w-full"
|
|
187
211
|
}
|
|
@@ -189,7 +213,7 @@ const $ = {
|
|
|
189
213
|
]
|
|
190
214
|
}
|
|
191
215
|
),
|
|
192
|
-
|
|
216
|
+
N && !a ? /* @__PURE__ */ o(
|
|
193
217
|
"div",
|
|
194
218
|
{
|
|
195
219
|
className: [
|
|
@@ -208,29 +232,29 @@ const $ = {
|
|
|
208
232
|
"ds:motion-safe:animate-in ds:motion-safe:fade-in-0 ds:motion-safe:zoom-in-95",
|
|
209
233
|
"ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]"
|
|
210
234
|
].join(" "),
|
|
211
|
-
children: /* @__PURE__ */
|
|
212
|
-
|
|
235
|
+
children: /* @__PURE__ */ o("div", { className: "ds:pointer-events-auto", children: /* @__PURE__ */ o(
|
|
236
|
+
F,
|
|
213
237
|
{
|
|
214
|
-
icon: /* @__PURE__ */
|
|
238
|
+
icon: /* @__PURE__ */ o(D, {}),
|
|
215
239
|
"aria-label": f("chat.scrollToLatest"),
|
|
216
240
|
size: "sm",
|
|
217
241
|
variant: "secondary",
|
|
218
242
|
position: "static",
|
|
219
|
-
onClick: () =>
|
|
243
|
+
onClick: () => r({ smooth: !0 })
|
|
220
244
|
}
|
|
221
245
|
) })
|
|
222
246
|
}
|
|
223
247
|
) : null
|
|
224
248
|
] }),
|
|
225
|
-
|
|
249
|
+
d ? /* @__PURE__ */ o("div", { className: "ds:shrink-0 ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)] ds:bg-background", children: d }) : null
|
|
226
250
|
]
|
|
227
251
|
}
|
|
228
252
|
);
|
|
229
253
|
}
|
|
230
254
|
);
|
|
231
|
-
|
|
255
|
+
G.displayName = "ChatContainer";
|
|
232
256
|
export {
|
|
233
|
-
|
|
234
|
-
|
|
257
|
+
G as C,
|
|
258
|
+
U as c
|
|
235
259
|
};
|
|
236
|
-
//# sourceMappingURL=chat-container-
|
|
260
|
+
//# sourceMappingURL=chat-container-CYYego1W.js.map
|