@alfadocs/ui-kit 1.41.1 → 1.42.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.
@@ -1,28 +1,28 @@
1
- import { jsxs as o, jsx as n, Fragment as Ue } from "react/jsx-runtime";
2
- import { forwardRef as Xe, useRef as f, useState as w, useId as Ze, useCallback as T, useEffect as me, useImperativeHandle as et, useMemo as tt } from "react";
1
+ import { jsxs as o, jsx as n, Fragment as st } from "react/jsx-runtime";
2
+ import { forwardRef as lt, useRef as f, useState as w, useId as rt, useCallback as T, useEffect as me, useImperativeHandle as ot, useMemo as dt } from "react";
3
3
  import { c as Ce } from "./index-D2ZczOXr.js";
4
- import { useTranslation as nt } from "react-i18next";
5
- import { u as at } from "./registry-DvAUVLHh.js";
6
- import { C as it } from "./clinical-note-card-DdsGYMmI.js";
7
- import { R as st } from "./rich-text-editor-DUMeifwc.js";
8
- import { T as lt } from "./text-area-Bt3p7Pt0.js";
4
+ import { useTranslation as ct } from "react-i18next";
5
+ import { u as ut } from "./registry-DvAUVLHh.js";
6
+ import { C as ft } from "./clinical-note-card-DdsGYMmI.js";
7
+ import { R as pt } from "./rich-text-editor-DUMeifwc.js";
8
+ import { T as mt } from "./text-area-Bt3p7Pt0.js";
9
9
  import { A as I } from "./alert-CiQ5Pa3Q.js";
10
10
  import { B as z } from "./button-CaUe1uyd.js";
11
11
  import { I as ge } from "./icon-button-CehAeZoP.js";
12
- import { C as rt } from "./checkbox-CZkipDn7.js";
12
+ import { C as gt } from "./checkbox-CZkipDn7.js";
13
13
  import { C as he } from "./card-DPmk26CL.js";
14
- import { C as ot, S as M } from "./skeleton-B1KTdJ4N.js";
14
+ import { C as ht, S as M } from "./skeleton-B1KTdJ4N.js";
15
15
  import { D as v } from "./dialog-BJiLqhx6.js";
16
- import { P as dt } from "./panel-header-D_mTdhUp.js";
17
- import { a as ct, u as ut, R as ft } from "./use-list-reflow-Cw43nxw5.js";
18
- import { u as pt } from "./use-theme-CAuo6EYT.js";
19
- import { N as mt } from "./notebook-pen-CO7HoM-W.js";
20
- import { P as gt } from "./pencil-B1sKKyuT.js";
21
- import { T as ht } from "./trash-2-uumy3fy1.js";
16
+ import { P as vt } from "./panel-header-D_mTdhUp.js";
17
+ import { a as yt, u as bt, R as Ct } from "./use-list-reflow-Cw43nxw5.js";
18
+ import { u as Pt } from "./use-theme-CAuo6EYT.js";
19
+ import { N as xt } from "./notebook-pen-CO7HoM-W.js";
20
+ import { P as wt } from "./pencil-B1sKKyuT.js";
21
+ import { T as Tt } from "./trash-2-uumy3fy1.js";
22
22
  function ve(i, c) {
23
23
  return typeof i == "object" && i !== null && "message" in i && typeof i.message == "string" && i.message.trim() ? i.message : c;
24
24
  }
25
- const vt = {
25
+ const Et = {
26
26
  id: "notes-panel",
27
27
  // 'submit' backs add_note (compose + commit a note). pin / flag are toggles
28
28
  // with no dedicated capability in the closed vocabulary.
@@ -121,7 +121,7 @@ const vt = {
121
121
  description: "Sourced from the id prop. Required to address a specific notes panel from the agent."
122
122
  }
123
123
  }
124
- }, yt = "ds:isolate ds:[&_[data-component=card]>*]:relative ds:[&_[data-component=card]>*]:z-[1]", bt = Ce(
124
+ }, Nt = "ds:isolate ds:[&_[data-component=card]>*]:relative ds:[&_[data-component=card]>*]:z-[1]", Vt = Ce(
125
125
  "ds:relative ds:flex ds:flex-col ds:rounded-[var(--radius-lg)]",
126
126
  {
127
127
  variants: {
@@ -129,7 +129,7 @@ const vt = {
129
129
  true: "ds:focus:outline-[length:var(--focus-ring-width)] ds:focus:outline-solid ds:focus:outline-[color:var(--ring)] ds:focus:outline-offset-[length:var(--focus-ring-offset)]",
130
130
  false: ""
131
131
  },
132
- washed: { true: yt, false: "" }
132
+ washed: { true: Nt, false: "" }
133
133
  },
134
134
  defaultVariants: { current: !1, washed: !1 }
135
135
  }
@@ -148,14 +148,14 @@ const vt = {
148
148
  }
149
149
  }
150
150
  }
151
- ), Ct = "ds:opacity-0", Pt = [
151
+ ), Rt = "ds:opacity-0", kt = [
152
152
  "ds:transition-opacity ds:duration-[var(--animation-duration)]",
153
153
  "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
154
- ].join(" "), xt = [3, 2, 3];
154
+ ].join(" "), _t = [3, 2, 3];
155
155
  function be(i) {
156
156
  return i ? /<img\b/i.test(i) ? !0 : i.replace(/<[^>]*>/g, "").replace(/&nbsp;/gi, " ").trim().length > 0 : !1;
157
157
  }
158
- const Kt = Xe(
158
+ const Xt = lt(
159
159
  function({
160
160
  id: c,
161
161
  notes: j,
@@ -179,24 +179,32 @@ const Kt = Xe(
179
179
  onProofread: _e,
180
180
  onAutoFormat: Se,
181
181
  aiConsent: Ie,
182
+ variables: ze,
183
+ validateVariable: je,
184
+ onVariableValidityChange: Ae,
185
+ renderHelpMeWrite: Le,
186
+ onUploadImage: He,
187
+ onAiCreditsExhausted: Oe,
188
+ composerBefore: Be,
189
+ composerAfter: We,
182
190
  onTogglePin: L,
183
191
  onToggleFlag: H,
184
192
  noteActions: ee,
185
193
  onEditNote: N,
186
- editClinical: ze = !1,
194
+ editClinical: De = !1,
187
195
  onDeleteNote: h,
188
196
  confirmDelete: $ = !0,
189
- title: je,
190
- composerPlaceholder: Ae,
191
- addNoteLabel: Le,
192
- emptyState: He,
193
- className: Oe,
197
+ title: qe,
198
+ composerPlaceholder: Fe,
199
+ addNoteLabel: Ke,
200
+ emptyState: Me,
201
+ className: $e,
194
202
  "aria-label": G,
195
- ...Be
196
- }, We) {
197
- const { t: a, i18n: te } = nt(), b = f(null), [P, V] = w(""), [O, B] = w(E), [u, ne] = w(!1), [ae, R] = w(null), [r, Y] = w(null), ie = f(!1);
203
+ ...Ge
204
+ }, Ye) {
205
+ const { t: a, i18n: te } = ct(), b = f(null), [P, V] = w(""), [O, B] = w(E), [u, ne] = w(!1), [ae, R] = w(null), [r, Y] = w(null), ie = f(!1);
198
206
  C === "loading" && (ie.current = !0);
199
- const De = ie.current ? ot : "", qe = je ?? a("notesPanel.title", { defaultValue: "Notes" }), se = Ze(), le = Ae ?? a("notesPanel.placeholder", { defaultValue: "Add a note…" }), re = r !== null ? a("notesPanel.edit", { defaultValue: "Edit note" }) : a("notesPanel.composerLabel", { defaultValue: "New note" }), Fe = g === "rich" ? be(P) : P.trim().length > 0, Ke = T(() => {
207
+ const Je = ie.current ? ht : "", Qe = qe ?? a("notesPanel.title", { defaultValue: "Notes" }), se = rt(), le = Fe ?? a("notesPanel.placeholder", { defaultValue: "Add a note…" }), re = r !== null ? a("notesPanel.edit", { defaultValue: "Edit note" }) : a("notesPanel.composerLabel", { defaultValue: "New note" }), Ue = g === "rich" ? be(P) : P.trim().length > 0, Xe = T(() => {
200
208
  var x;
201
209
  if (!(r !== null ? N : m) || u) return;
202
210
  const t = g === "rich", d = t ? ((x = b.current) == null ? void 0 : x.getHTML()) ?? P : P.trim();
@@ -228,7 +236,7 @@ const Kt = Xe(
228
236
  N,
229
237
  u,
230
238
  a
231
- ]), oe = Te && (r === null || ze), de = T(
239
+ ]), oe = Te && (r === null || De), de = T(
232
240
  (e) => {
233
241
  try {
234
242
  return new Intl.DateTimeFormat(te.language, {
@@ -243,7 +251,7 @@ const Kt = Xe(
243
251
  }
244
252
  },
245
253
  [te.language]
246
- ), Me = T(
254
+ ), Ze = T(
247
255
  (e) => {
248
256
  var d, l, s;
249
257
  if (!e.id || u) return;
@@ -260,15 +268,15 @@ const Kt = Xe(
260
268
  }, [ce, W]);
261
269
  const k = [...j].sort(
262
270
  (e, t) => Number(t.pinned ?? !1) - Number(e.pinned ?? !1)
263
- ), { resolvedTheme: $e } = pt(), ue = $e.endsWith("-accessible") || void 0, { containerRef: Ge } = ct({
271
+ ), { resolvedTheme: et } = Pt(), ue = et.endsWith("-accessible") || void 0, { containerRef: tt } = yt({
264
272
  key: k.map((e) => e.id).join(),
265
273
  reduceMotion: ue
266
- }), _ = ut({ reduceMotion: ue }), [D, q] = w(null), Ye = T(
274
+ }), _ = bt({ reduceMotion: ue }), [D, q] = w(null), nt = T(
267
275
  (e) => {
268
276
  h && ($ ? q(e) : _.leave(e, () => h(e)));
269
277
  },
270
278
  [$, _, h]
271
- ), Je = T(() => {
279
+ ), at = T(() => {
272
280
  if (!D || !h) return;
273
281
  const e = D;
274
282
  q(null), _.leave(e, () => h(e));
@@ -290,8 +298,8 @@ const Kt = Xe(
290
298
  const fe = f(y);
291
299
  fe.current = y;
292
300
  const pe = f(null);
293
- et(We, () => pe.current, []);
294
- const Qe = tt(
301
+ ot(Ye, () => pe.current, []);
302
+ const it = dt(
295
303
  () => ({
296
304
  // Ids + flags only — never the note body or author (both PHI).
297
305
  getNotes: () => Q.current.map((e) => ({
@@ -320,7 +328,7 @@ const Kt = Xe(
320
328
  }),
321
329
  []
322
330
  );
323
- return at(vt, Qe, c), /* @__PURE__ */ o(
331
+ return ut(Et, it, c), /* @__PURE__ */ o(
324
332
  "section",
325
333
  {
326
334
  ref: pe,
@@ -328,14 +336,14 @@ const Kt = Xe(
328
336
  "data-component-id": c,
329
337
  "aria-labelledby": G ? void 0 : se,
330
338
  "aria-label": G,
331
- className: ["ds:flex ds:flex-col", Oe].filter(Boolean).join(" "),
332
- ...Be,
339
+ className: ["ds:flex ds:flex-col", $e].filter(Boolean).join(" "),
340
+ ...Ge,
333
341
  children: [
334
342
  /* @__PURE__ */ n(
335
- dt,
343
+ vt,
336
344
  {
337
- title: qe,
338
- icon: /* @__PURE__ */ n(mt, { "aria-hidden": "true" }),
345
+ title: Qe,
346
+ icon: /* @__PURE__ */ n(xt, { "aria-hidden": "true" }),
339
347
  headingId: G ? void 0 : se,
340
348
  sticky: !0,
341
349
  divider: !0
@@ -348,8 +356,9 @@ const Kt = Xe(
348
356
  "data-notes-panel-composer": r !== null ? "edit" : "add",
349
357
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
350
358
  children: [
359
+ Be,
351
360
  g === "rich" ? /* @__PURE__ */ n(
352
- st,
361
+ pt,
353
362
  {
354
363
  ref: b,
355
364
  ariaLabel: re,
@@ -367,10 +376,16 @@ const Kt = Xe(
367
376
  onProofread: _e,
368
377
  onAutoFormat: Se,
369
378
  aiConsent: Ie,
379
+ variables: ze,
380
+ validateVariable: je,
381
+ onVariableValidityChange: Ae,
382
+ renderHelpMeWrite: Le,
383
+ onUploadImage: He,
384
+ onAiCreditsExhausted: Oe,
370
385
  aiConsentHeadingLevel: 3
371
386
  }
372
387
  ) : /* @__PURE__ */ n(
373
- lt,
388
+ mt,
374
389
  {
375
390
  value: P,
376
391
  readOnly: u,
@@ -391,7 +406,7 @@ const Kt = Xe(
391
406
  ].join(" "),
392
407
  children: [
393
408
  oe ? /* @__PURE__ */ n(
394
- rt,
409
+ gt,
395
410
  {
396
411
  size: "sm",
397
412
  label: a("notesPanel.clinicalToggle", {
@@ -422,17 +437,18 @@ const Kt = Xe(
422
437
  {
423
438
  type: "button",
424
439
  size: "sm",
425
- onClick: Ke,
426
- disabled: !Fe,
440
+ onClick: Xe,
441
+ disabled: !Ue,
427
442
  loading: u,
428
- children: r !== null ? a("notesPanel.saveEdit", { defaultValue: "Save note" }) : Le ?? a("notesPanel.add", { defaultValue: "Add note" })
443
+ children: r !== null ? a("notesPanel.saveEdit", { defaultValue: "Save note" }) : Ke ?? a("notesPanel.add", { defaultValue: "Add note" })
429
444
  }
430
445
  )
431
446
  ] })
432
447
  ]
433
448
  }
434
449
  ),
435
- ae ? /* @__PURE__ */ n(I, { variant: "error", children: /* @__PURE__ */ n(I.Description, { children: ae }) }) : null
450
+ ae ? /* @__PURE__ */ n(I, { variant: "error", children: /* @__PURE__ */ n(I.Description, { children: ae }) }) : null,
451
+ We
436
452
  ]
437
453
  }
438
454
  ) : null,
@@ -448,7 +464,7 @@ const Kt = Xe(
448
464
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
449
465
  children: [
450
466
  /* @__PURE__ */ n("span", { role: "status", className: "ds:sr-only", children: a("notesPanel.loading") }),
451
- xt.map((e, t) => /* @__PURE__ */ n(he, { variant: "elevated", "aria-hidden": "true", children: /* @__PURE__ */ n(he.Body, { children: /* @__PURE__ */ o("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
467
+ _t.map((e, t) => /* @__PURE__ */ n(he, { variant: "elevated", "aria-hidden": "true", children: /* @__PURE__ */ n(he.Body, { children: /* @__PURE__ */ o("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
452
468
  /* @__PURE__ */ o("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
453
469
  /* @__PURE__ */ n(
454
470
  M,
@@ -500,9 +516,9 @@ const Kt = Xe(
500
516
  k.length > 0 ? /* @__PURE__ */ n(
501
517
  "ul",
502
518
  {
503
- ref: Ge,
519
+ ref: tt,
504
520
  "aria-busy": C === "loading" || void 0,
505
- className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${De}`.trim(),
521
+ className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${Je}`.trim(),
506
522
  children: k.map(({ actions: e, ...t }, d) => {
507
523
  const l = y != null && t.id === y, s = t.id, x = s != null && r === s, p = s != null && _.isLeaving(s);
508
524
  return /* @__PURE__ */ o(
@@ -515,13 +531,13 @@ const Kt = Xe(
515
531
  "data-leaving": p ? "" : void 0,
516
532
  "data-editing": x ? "" : void 0,
517
533
  className: [
518
- bt({
534
+ Vt({
519
535
  current: l,
520
536
  washed: l || x
521
537
  }),
522
- Pt,
523
- ft,
524
- p ? Ct : ""
538
+ kt,
539
+ Ct,
540
+ p ? Rt : ""
525
541
  ].filter(Boolean).join(" "),
526
542
  children: [
527
543
  l ? /* @__PURE__ */ n("span", { className: "ds:sr-only", children: a("notesPanel.current", {
@@ -544,16 +560,16 @@ const Kt = Xe(
544
560
  `${y}:${Z ?? ""}`
545
561
  ) : null,
546
562
  /* @__PURE__ */ n(
547
- it,
563
+ ft,
548
564
  {
549
565
  surface: "elevated",
550
566
  truncate: !l,
551
- headerActions: /* @__PURE__ */ o(Ue, { children: [
567
+ headerActions: /* @__PURE__ */ o(st, { children: [
552
568
  ee ? ee({ ...t, actions: e }) : null,
553
569
  N && s && !t.deleted && (e == null ? void 0 : e.edit) !== !1 ? /* @__PURE__ */ n(
554
570
  ge,
555
571
  {
556
- icon: /* @__PURE__ */ n(gt, {}),
572
+ icon: /* @__PURE__ */ n(wt, {}),
557
573
  intent: "ghost",
558
574
  size: "sm",
559
575
  "aria-label": a("notesPanel.editNamed", {
@@ -566,13 +582,13 @@ const Kt = Xe(
566
582
  "aria-pressed": r === s,
567
583
  disabled: u,
568
584
  "data-notes-panel-edit": "",
569
- onClick: () => r === s ? W() : Me(t)
585
+ onClick: () => r === s ? W() : Ze(t)
570
586
  }
571
587
  ) : null,
572
588
  h && s && !t.deleted ? /* @__PURE__ */ n(
573
589
  ge,
574
590
  {
575
- icon: /* @__PURE__ */ n(ht, {}),
591
+ icon: /* @__PURE__ */ n(Tt, {}),
576
592
  intent: "ghost",
577
593
  size: "sm",
578
594
  "aria-label": a("notesPanel.deleteNamed", {
@@ -582,7 +598,7 @@ const Kt = Xe(
582
598
  tooltip: a("notesPanel.delete", {
583
599
  defaultValue: "Delete note"
584
600
  }),
585
- onClick: () => Ye(s)
601
+ onClick: () => nt(s)
586
602
  }
587
603
  ) : null
588
604
  ] }),
@@ -597,7 +613,7 @@ const Kt = Xe(
597
613
  );
598
614
  })
599
615
  }
600
- ) : C !== "ready" ? null : He ?? /* @__PURE__ */ n("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: a("notesPanel.empty", { defaultValue: "No notes yet." }) })
616
+ ) : C !== "ready" ? null : Me ?? /* @__PURE__ */ n("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: a("notesPanel.empty", { defaultValue: "No notes yet." }) })
601
617
  ] }),
602
618
  h && $ ? /* @__PURE__ */ n(
603
619
  v,
@@ -628,7 +644,7 @@ const Kt = Xe(
628
644
  {
629
645
  intent: "destructive",
630
646
  size: "sm",
631
- onClick: Je,
647
+ onClick: at,
632
648
  children: a("notesPanel.deleteConfirmAction", {
633
649
  defaultValue: "Delete"
634
650
  })
@@ -644,7 +660,7 @@ const Kt = Xe(
644
660
  }
645
661
  );
646
662
  export {
647
- Kt as N,
663
+ Xt as N,
648
664
  ve as g
649
665
  };
650
- //# sourceMappingURL=notes-panel-Daq5T_cS.js.map
666
+ //# sourceMappingURL=notes-panel-CRAovkjx.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "1.41.1",
3
+ "packageVersion": "1.42.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -1,4 +1,4 @@
1
- import { N as a } from "../../_chunks/notes-panel-Daq5T_cS.js";
1
+ import { N as a } from "../../_chunks/notes-panel-CRAovkjx.js";
2
2
  export {
3
3
  a as NotesPanel
4
4
  };
@@ -145,6 +145,38 @@ export interface NotesPanelProps extends Omit<HTMLAttributes<HTMLElement>, 'titl
145
145
  * neither affordance).
146
146
  */
147
147
  aiConsent?: AiConsentGate;
148
+ /**
149
+ * Template variables for the rich composer's "Insert variable" menu and
150
+ * `[[TOKEN]]` chip rendering. Forwarded straight to `RichTextEditor`.
151
+ * Ignored by the `'plain'` composer.
152
+ */
153
+ variables?: RichTextEditorProps['variables'];
154
+ /** Decide whether a `[[TOKEN]]` is valid. See `RichTextEditor`. */
155
+ validateVariable?: RichTextEditorProps['validateVariable'];
156
+ /** The invalid `[[TOKEN]]`s in the draft, reported by the rich composer. */
157
+ onVariableValidityChange?: RichTextEditorProps['onVariableValidityChange'];
158
+ /**
159
+ * Bring your own Help-me-write surface (e.g. practice templates) into the
160
+ * composer, forwarded straight to `RichTextEditor`. See
161
+ * `RichTextEditorProps['renderHelpMeWrite']`.
162
+ */
163
+ renderHelpMeWrite?: RichTextEditorProps['renderHelpMeWrite'];
164
+ /** Upload an image yourself and resolve its URL. See `RichTextEditor`. */
165
+ onUploadImage?: RichTextEditorProps['onUploadImage'];
166
+ /** An AI call ran out of credits. See `RichTextEditor`. */
167
+ onAiCreditsExhausted?: RichTextEditorProps['onAiCreditsExhausted'];
168
+ /**
169
+ * Rendered just above the composer — e.g. the Help-me-write templates
170
+ * pattern's `undoNotice`. Renders in both add and edit mode, whenever the
171
+ * composer itself is mounted.
172
+ */
173
+ composerBefore?: ReactNode;
174
+ /**
175
+ * Rendered just after the composer — e.g. the Help-me-write templates
176
+ * pattern's `manager` dialog. Renders in both add and edit mode, whenever
177
+ * the composer itself is mounted.
178
+ */
179
+ composerAfter?: ReactNode;
148
180
  /** Toggle a note's pinned state — renders an inline pin button per note. */
149
181
  onTogglePin?: (id: string) => void;
150
182
  /** Toggle a note's flagged state — renders an inline flag button per note. */
package/dist/index.js CHANGED
@@ -153,7 +153,7 @@ import { M as Cm, m as Tm } from "./_chunks/message-tray-CrRIHfiQ.js";
153
153
  import { N as um, i as Pm } from "./_chunks/notification-card-B2gLO6dK.js";
154
154
  import { n as Em } from "./_chunks/notification-card.agent-DxGBZb8T.js";
155
155
  import { N as _m, n as bm } from "./_chunks/notification-tray-BOEKegVV.js";
156
- import { N as Dm } from "./_chunks/notes-panel-Daq5T_cS.js";
156
+ import { N as Dm } from "./_chunks/notes-panel-CRAovkjx.js";
157
157
  import { P as Om, p as Fm } from "./_chunks/popover-DO-pssF3.js";
158
158
  import { R as Mm, I as ym, r as km } from "./_chunks/radiograph-panel.agent-LrILY2lN.js";
159
159
  import { P as Gm, R as Hm, T as vm, a as wm, p as Wm, r as Um } from "./_chunks/pregnancy-weight-gain-Bfq4Kwt5.js";
@@ -238,7 +238,7 @@ import { W as xC, a as uC, w as PC } from "./_chunks/workflow-status-xeaJTzD3.js
238
238
  import { C as EC, W as RC, a as _C, b as bC, c as NC, i as DC, l as hC, m as OC, r as FC, w as LC, d as MC, e as yC, f as kC } from "./_chunks/workflow-map-DhR_h5yw.js";
239
239
  import { A as GC, a as HC, b as vC, c as wC } from "./_chunks/alia-sidebar-CUqaJNPQ.js";
240
240
  import { A as UC, a as VC, L as KC, P as YC, S as XC, T as qC, b as zC, c as jC, d as QC, e as ZC, f as JC, g as $C, h as aT, i as eT, j as sT, k as rT, l as oT, m as tT, n as nT, o as iT, p as pT, r as mT, q as lT, s as dT, t as AT, u as cT } from "./_chunks/anamnesis-summary-rows-DQUqwWc1.js";
241
- import { C as gT, a as ST, b as CT, c as TT, D as xT, d as uT, S as PT, V as IT, W as ET, e as RT, i as _T, m as bT, r as NT, u as DT, f as hT, g as OT } from "./_chunks/calendar-workspace-Bx8xxvic.js";
241
+ import { C as gT, a as ST, b as CT, c as TT, D as xT, d as uT, S as PT, V as IT, W as ET, e as RT, i as _T, m as bT, r as NT, u as DT, f as hT, g as OT } from "./_chunks/calendar-workspace-qlxrxCqm.js";
242
242
  import { A as LT, a as MT, b as yT, H as kT, c as BT, u as GT } from "./_chunks/help-me-write-templates-B-m7zgJa.js";
243
243
  import { C as vT, M as wT, P as WT } from "./_chunks/marketplace-app-shell-D_g9BaDI.js";
244
244
  import { P as VT } from "./_chunks/payment-automation-upsell-BKmBXU4i.js";
@@ -13,6 +13,7 @@
13
13
  import type { CalendarEventStatus } from '../../components/calendar';
14
14
  import type { Dispatch, SetStateAction } from 'react';
15
15
  import type { NotesPanelNote, NotesPanelProps, NotesPanelSubmission, AiConsentGate } from '../../components/notes-panel';
16
+ import type { PatientNotesSeam } from './calendar.sheets';
16
17
  import type { AvailabilityContext, BacklogFilter, BacklogItem, CalendarFreeSlot, CalendarRow, DisplaySettings, DraftSlot, EditorDraft, EditorPrefill, FindSlotsSeed, HistoryInput, RailFocus, SlotPatch, WaitingEntryDraft } from './calendar.model';
17
18
  import type { DeleteOptions, EditorDraftExtras, RecurringScope } from './calendar-workspace.model';
18
19
  import type { CalendarHistoryEntry, CalendarSignChannel, CalendarWaitingEntry } from './calendar.types';
@@ -168,5 +169,15 @@ export interface CalendarJourney {
168
169
  * `ic_internal_api_post_patient_ai_consent` grant route.
169
170
  */
170
171
  noteAiConsentFor?: (patientId: string) => AiConsentGate | undefined;
172
+ /**
173
+ * The notes composer's template-variable, Help-me-write and image-upload
174
+ * seams for one patient, read as the details panel opens them — one hook
175
+ * instead of six props, mirroring `noteAiConsentFor`. Omit any key (or the
176
+ * whole hook) and that affordance is not offered: the kit ships no
177
+ * variables, no bring-your-own Help-me-write surface and no image upload
178
+ * of its own. Typically backed by the host's own `useHelpMeWriteTemplates`
179
+ * call, built once per patient and passed straight through.
180
+ */
181
+ noteComposerExtrasFor?: (patientId: string) => Partial<Pick<PatientNotesSeam, 'variables' | 'validateVariable' | 'onVariableValidityChange' | 'renderHelpMeWrite' | 'onUploadImage' | 'onAiCreditsExhausted' | 'composerBefore' | 'composerAfter'>> | undefined;
171
182
  }
172
183
  //# sourceMappingURL=calendar.journey.d.ts.map
@@ -82,6 +82,26 @@ export interface PatientNotesSeam {
82
82
  * mics. Omitted → today's ungated behaviour (matches `NotesPanel`).
83
83
  */
84
84
  aiConsent?: AiConsentGate;
85
+ /** Template variables for the composer's "Insert variable" menu. See
86
+ * `RichTextEditor`. */
87
+ variables?: NotesPanelProps['variables'];
88
+ /** Decide whether a `[[TOKEN]]` is valid. See `RichTextEditor`. */
89
+ validateVariable?: NotesPanelProps['validateVariable'];
90
+ /** The invalid `[[TOKEN]]`s in the draft. See `RichTextEditor`. */
91
+ onVariableValidityChange?: NotesPanelProps['onVariableValidityChange'];
92
+ /** Bring your own Help-me-write surface (e.g. practice templates). See
93
+ * `RichTextEditor`. */
94
+ renderHelpMeWrite?: NotesPanelProps['renderHelpMeWrite'];
95
+ /** Upload an image yourself and resolve its URL. See `RichTextEditor`. */
96
+ onUploadImage?: NotesPanelProps['onUploadImage'];
97
+ /** An AI call ran out of credits. See `RichTextEditor`. */
98
+ onAiCreditsExhausted?: NotesPanelProps['onAiCreditsExhausted'];
99
+ /** Rendered just above the composer — e.g. the templates pattern's
100
+ * `undoNotice`. See `NotesPanel`. */
101
+ composerBefore?: NotesPanelProps['composerBefore'];
102
+ /** Rendered just after the composer — e.g. the templates pattern's
103
+ * `manager`. See `NotesPanel`. */
104
+ composerAfter?: NotesPanelProps['composerAfter'];
85
105
  /** The host's read. Absent while `onLoad` is present reads as loading. */
86
106
  status?: 'loading' | 'ready' | 'error';
87
107
  total?: number | null;
@@ -1,4 +1,4 @@
1
- import { C as s, a as r, b as E, c as P, D as S, d as o, S as C, V as t, W as d, e as A, i, m as n, r as D, u as W, f as _, g as c } from "../../_chunks/calendar-workspace-Bx8xxvic.js";
1
+ import { C as s, a as r, b as E, c as P, D as S, d as o, S as C, V as t, W as d, e as A, i, m as n, r as D, u as W, f as _, g as c } from "../../_chunks/calendar-workspace-qlxrxCqm.js";
2
2
  export {
3
3
  s as CALENDAR_PREFERENCE_KEYS,
4
4
  r as CalendarDataProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "1.41.1",
3
+ "version": "1.42.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",