@alfadocs/ui-kit-debug 1.41.1 → 1.43.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.
Files changed (56) hide show
  1. package/dist/_chunks/{calendar-workspace-Bx8xxvic.js → calendar-workspace-DhXqqu-D.js} +1981 -1968
  2. package/dist/_chunks/calendar-workspace-DhXqqu-D.js.map +1 -0
  3. package/dist/_chunks/control-room-rail-Cv7GpMqX.js +354 -0
  4. package/dist/_chunks/control-room-rail-Cv7GpMqX.js.map +1 -0
  5. package/dist/_chunks/{marketplace-app-shell-D_g9BaDI.js → marketplace-app-shell-DdwPj03y.js} +3 -3
  6. package/dist/_chunks/{marketplace-app-shell-D_g9BaDI.js.map → marketplace-app-shell-DdwPj03y.js.map} +1 -1
  7. package/dist/_chunks/{notes-panel-Daq5T_cS.js → notes-panel-CRAovkjx.js} +84 -68
  8. package/dist/_chunks/notes-panel-CRAovkjx.js.map +1 -0
  9. package/dist/_chunks/{sidebar-ClTY9lLI.js → sidebar-DbZXLl8h.js} +2 -2
  10. package/dist/_chunks/{sidebar-ClTY9lLI.js.map → sidebar-DbZXLl8h.js.map} +1 -1
  11. package/dist/_chunks/tab-bar-Cw9UK18Z.js +228 -0
  12. package/dist/_chunks/tab-bar-Cw9UK18Z.js.map +1 -0
  13. package/dist/_chunks/{tool-rail-D89USYE6.js → tool-rail-CCFqDfAn.js} +282 -276
  14. package/dist/_chunks/tool-rail-CCFqDfAn.js.map +1 -0
  15. package/dist/_chunks/use-edge-resize-BHesP0kg.js +149 -0
  16. package/dist/_chunks/use-edge-resize-BHesP0kg.js.map +1 -0
  17. package/dist/_chunks/use-scroll-overflow-UbLrUfBo.js +72 -0
  18. package/dist/_chunks/use-scroll-overflow-UbLrUfBo.js.map +1 -0
  19. package/dist/agent-catalog.json +1 -1
  20. package/dist/components/control-room-rail/control-room-rail.d.ts +9 -0
  21. package/dist/components/control-room-rail/control-room-rail.d.ts.map +1 -1
  22. package/dist/components/control-room-rail/index.js +1 -1
  23. package/dist/components/notes-panel/index.js +1 -1
  24. package/dist/components/notes-panel/notes-panel.d.ts +32 -0
  25. package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
  26. package/dist/components/sidebar/index.js +1 -1
  27. package/dist/components/tab-bar/index.js +1 -1
  28. package/dist/components/tool-rail/index.js +1 -1
  29. package/dist/components/tool-rail/tool-rail.d.ts +16 -0
  30. package/dist/components/tool-rail/tool-rail.d.ts.map +1 -1
  31. package/dist/hooks/index.d.ts +2 -0
  32. package/dist/hooks/index.d.ts.map +1 -1
  33. package/dist/hooks/index.js +35 -32
  34. package/dist/hooks/index.js.map +1 -1
  35. package/dist/hooks/use-edge-resize.d.ts +13 -1
  36. package/dist/hooks/use-edge-resize.d.ts.map +1 -1
  37. package/dist/index.js +6 -6
  38. package/dist/patterns/calendar/calendar.journey.d.ts +11 -0
  39. package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
  40. package/dist/patterns/calendar/calendar.sheets.d.ts +20 -0
  41. package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
  42. package/dist/patterns/calendar/index.js +1 -1
  43. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  44. package/dist/tokens.css +1 -1
  45. package/package.json +1 -1
  46. package/dist/_chunks/calendar-workspace-Bx8xxvic.js.map +0 -1
  47. package/dist/_chunks/control-room-rail-CnNZusR5.js +0 -337
  48. package/dist/_chunks/control-room-rail-CnNZusR5.js.map +0 -1
  49. package/dist/_chunks/notes-panel-Daq5T_cS.js.map +0 -1
  50. package/dist/_chunks/tab-bar-rDkLiaA6.js +0 -268
  51. package/dist/_chunks/tab-bar-rDkLiaA6.js.map +0 -1
  52. package/dist/_chunks/tool-rail-D89USYE6.js.map +0 -1
  53. package/dist/_chunks/use-edge-resize-ZnGG7gyO.js +0 -139
  54. package/dist/_chunks/use-edge-resize-ZnGG7gyO.js.map +0 -1
  55. package/dist/_chunks/use-overflow-collapse-BIOzKbni.js +0 -32
  56. package/dist/_chunks/use-overflow-collapse-BIOzKbni.js.map +0 -1
@@ -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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notes-panel-CRAovkjx.js","sources":["../../src/components/_shared/get-error-message.ts","../../src/components/notes-panel/notes-panel.agent.ts","../../src/components/notes-panel/notes-panel.tsx"],"sourcesContent":["/** Read host error messages without relying on the host's JavaScript realm. */\nexport function getErrorMessage(error: unknown, fallback: string): string {\n if (\n typeof error === 'object' &&\n error !== null &&\n 'message' in error &&\n typeof error.message === 'string' &&\n error.message.trim()\n ) {\n return error.message;\n }\n return fallback;\n}\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — NotesPanel. */\n/* */\n/* The Notes tool: a composer over a note timeline. The agent reads the */\n/* timeline STRUCTURE (note ids + pinned / flagged / clinical flags — */\n/* never the note body or author, both PHI), composes and commits a new */\n/* note, and toggles a note's pinned / flagged state. `add_note` carries */\n/* the `phi` safety class: a note body is patient-identifiable clinical */\n/* content, so the host gates it behind the same confirm-before-act as a */\n/* destructive write and never auto-confirms. A clinical submission also */\n/* requires the host's `practice_add_clinical_note` permission (the */\n/* handle drops it when the gate is closed). Host-owned per-note */\n/* `noteActions` (edit, delete…) sit outside this handle — an agent */\n/* reaches them through the host's own adapters. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { NotesPanelHandle } from './notes-panel';\n\nexport const notesPanelAgent: AgentAdapter<NotesPanelHandle> = {\n id: 'notes-panel',\n // 'submit' backs add_note (compose + commit a note). pin / flag are toggles\n // with no dedicated capability in the closed vocabulary.\n capabilities: ['submit'],\n state: {\n notes: {\n type: 'Array<{ id?: string; pinned: boolean; flagged: boolean; clinical: boolean }>',\n descriptionKey: 'ui.agent.notesPanel.state.notes',\n description:\n 'Timeline note ids + pinned / flagged / clinical flags. Never the note body or author (both PHI).',\n read: (handle) => handle.getNotes(),\n },\n canAddClinical: {\n type: 'boolean',\n descriptionKey: 'ui.agent.notesPanel.state.canAddClinical',\n description:\n 'Whether the current user may write clinical notes (the practice_add_clinical_note permission gate).',\n read: (handle) => handle.canAddClinical(),\n },\n currentNoteId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.notesPanel.state.currentNoteId',\n description:\n 'Id of the note the host has addressed — the one marked, scrolled to and focused. Null when none is. An id only, never note content.',\n read: (handle) => handle.getCurrentNoteId(),\n },\n },\n actions: {\n add_note: {\n // Writes a clinical/admin note body — patient-identifiable content. PHI.\n safety: 'phi',\n argsType: '{ content: string; clinical: boolean }',\n argsSchema: {\n type: 'object',\n properties: {\n content: {\n type: 'string',\n description:\n 'Note body. Rich HTML for the rich composer, else plain text.',\n },\n clinical: {\n type: 'boolean',\n description:\n 'Whether the note is clinical. Requires the clinical-note permission; the submission is dropped when the gate is closed.',\n },\n },\n required: ['content', 'clinical'],\n },\n openWorld: true,\n descriptionKey: 'ui.agent.notesPanel.actions.addNote',\n description:\n 'Compose and commit a new note. A clinical note requires the clinical-note permission (read canAddClinical first).',\n examples: [\n {\n args: { content: 'Patient reported improvement.', clinical: true },\n note: 'Add a clinical note.',\n },\n ],\n invoke: (handle, args: { content: string; clinical: boolean }) => {\n return handle.addNote(args);\n },\n },\n toggle_pin: {\n // Re-orders the timeline (pinned notes lead) — reversible view write.\n safety: 'write',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: false,\n descriptionKey: 'ui.agent.notesPanel.actions.togglePin',\n description:\n 'Toggle the pinned state of the note with the given id. Refused for a deleted note or one whose actions.pin is false.',\n invoke: (handle, args: { id: string }) => {\n handle.togglePin(args.id);\n },\n },\n toggle_flag: {\n safety: 'write',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: false,\n descriptionKey: 'ui.agent.notesPanel.actions.toggleFlag',\n description: 'Toggle the flagged state of the note with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.toggleFlag(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'notes-panel',\n description: 'Marks the NotesPanel region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific notes panel from the agent.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { getErrorMessage } from '../_shared/get-error-message';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { notesPanelAgent } from './notes-panel.agent';\nimport { ClinicalNoteCard } from '../clinical-note-card';\nimport type { ClinicalNoteCardProps } from '../clinical-note-card';\nimport { RichTextEditor } from '../rich-text-editor';\nimport type {\n RichTextEditorHandle,\n RichTextEditorProps,\n RichTextEditorToolbar,\n RedactorFactory,\n AiConsentGate,\n} from '../rich-text-editor';\nimport { TextArea } from '../text-area';\nimport { Alert } from '../alert';\nimport { Button, IconButton } from '../button';\nimport { Checkbox } from '../checkbox';\nimport { Card } from '../card/card';\nimport { CONTENT_ENTER_CLASS, Skeleton } from '../skeleton/skeleton';\nimport { Dialog } from '../dialog';\nimport { NotebookPen, Pencil, Trash2 } from 'lucide-react';\nimport { PanelHeader } from '../panel-header';\nimport { REFLOW_ROW_CLASS, useListReflow } from '../../hooks/use-list-reflow';\nimport { useExitTransition } from '../../hooks/use-exit-transition';\nimport { useTheme } from '../../hooks/use-theme';\n\n/* ------------------------------------------------------------------ */\n/* NotesPanel — the Notes tool for the Control Room rail. */\n/* */\n/* A composer over an elevated ClinicalNoteCard timeline. Drops */\n/* into a ControlRoomRail tool `panel`, the patient profile, or the */\n/* care-plan editor — anywhere notes about the open entity belong. */\n/* The composer is the kit RichTextEditor by default (degrades to a */\n/* textarea where Redactor is absent), carries a permission-gated */\n/* \"clinical note\" toggle, and forwards the editor's AI affordances. */\n/* The note attaches to whatever entity the host is showing — the */\n/* host owns the attachment; the panel only emits content + clinical. */\n/* Pinned notes lead; pin / flag are inline per-note toggles. */\n/* ------------------------------------------------------------------ */\n\n/**\n * One note in the panel — the data subset of `ClinicalNoteCard`.\n *\n * `aria-label` names the card for assistive tech. Set it whenever a row is not\n * a clinical note: the card's fallback name is \"Clinical note\", so an entry\n * that is something else (a dated event, an import) is announced as one.\n */\nexport type NotesPanelNote = Pick<\n ClinicalNoteCardProps,\n | 'id'\n | 'dateIso'\n | 'createdAtIso'\n | 'author'\n | 'clinical'\n | 'attachedTo'\n | 'content'\n | 'contentFormat'\n | 'pinned'\n | 'flagged'\n | 'aria-label'\n | 'deleted'\n | 'operatorName'\n> & {\n /** What the host lets the reader do with this note. */\n actions?: NotesPanelNoteActions;\n};\n\n/** Per-note write permissions; an absent key means allowed. The panel hides\n * the pin toggle on `pin: false` and on a deleted note. */\nexport type NotesPanelNoteActions = {\n edit?: boolean;\n delete?: boolean;\n pin?: boolean;\n};\n\n/**\n * Curated agent handle for NotesPanel. Reads the note timeline's STRUCTURE\n * (ids + pinned / flagged / clinical flags — never the note body or author,\n * both PHI) and drives the composer + per-note toggles. See\n * `notes-panel.agent.ts`.\n */\nexport interface NotesPanelHandle {\n /** Timeline snapshot — ids + flags only, never note content (PHI). */\n getNotes: () => Array<{\n id?: string;\n pinned: boolean;\n flagged: boolean;\n clinical: boolean;\n }>;\n /** Whether the composer is mounted (onAddNote is wired). */\n canAddNote: () => boolean;\n /** Whether clinical notes may be written (the permission gate). */\n canAddClinical: () => boolean;\n /** Id of the note the host has addressed, or null when none is. */\n getCurrentNoteId: () => string | null;\n /** Commit a new note with explicit content (mirrors the composer's submit). */\n addNote: (submission: NotesPanelSubmission) => void | Promise<void>;\n /** Toggle a note's pinned state (mirrors onTogglePin, with its gate). */\n togglePin: (id: string) => void;\n /** Toggle a note's flagged state (mirrors onToggleFlag). */\n toggleFlag: (id: string) => void;\n}\n\n/** Payload handed to `onAddNote` when the composer commits. */\nexport interface NotesPanelSubmission {\n /** The note body — rich HTML (`composer='rich'`) or plain text. */\n content: string;\n /** Whether the \"clinical note\" toggle was set. */\n clinical: boolean;\n}\n\nexport interface NotesPanelProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title' | 'children'\n> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so an\n * agent / MCP UI bridge can address this specific notes panel.\n */\n id?: string;\n /** Notes to render, newest-first by convention. Pinned notes lead. */\n notes: NotesPanelNote[];\n /**\n * Commit a new note. Omit to hide the composer (read-only timeline). Return\n * a promise to keep the draft until the host has saved it: the draft clears\n * when it resolves, and a rejection keeps it and shows the error's message.\n */\n onAddNote?: (submission: NotesPanelSubmission) => void | Promise<void>;\n /** The host's notes read. `'loading'` and `'error'` never show the empty\n * text; notes already held still render. Default `'ready'`. */\n status?: 'ready' | 'loading' | 'error';\n /** Retry a failed read. Renders a retry button in the error state. */\n onRetry?: () => void;\n /**\n * The note the reader ASKED for, addressed by id from somewhere else in the\n * record — a marker in a chart, a row in a grid, an agent. The panel marks\n * it, scrolls it to the middle of its own scroll region and moves focus to\n * it, and renders it unclamped so the thing that was asked for is readable\n * in full without a second click.\n *\n * Opening a panel is not the same as answering a question: a rail's\n * `setActiveTool` moves no focus and announces nothing, so a control whose\n * name promises \"in the notes panel\" produces no perceivable change for a\n * keyboard or screen-reader reader unless the panel lands them on the note.\n * That is what this prop is for; without it, a host has to reach into the\n * panel's DOM to do the same job.\n *\n * Marked on three channels, never colour alone (WCAG 1.4.1): an accent\n * wash that fades in and out over the card (steady where motion is off),\n * the focus outline on the row, and `aria-current` plus a visually-hidden\n * sentence naming the mark. Nothing is left on the row once the wash ends.\n *\n * Ids that match no note are ignored. To address the SAME note twice — the\n * reader pressing the same marker again after scrolling away — bump\n * `currentNoteKey` alongside it; this prop alone is a value, not a request.\n */\n currentNoteId?: string;\n /**\n * Bump on every address to re-scroll and re-focus the note in `currentNoteId`\n * and replay its wash, even when the id has not changed.\n *\n * Addressing is a request, not a value: a reader who presses the same marker\n * a second time (having scrolled away, or having moved focus off the note) is\n * asking to be taken back, and a control whose name promises the notes panel\n * must do something perceivable every time it is pressed. Without this the\n * second press is inert — the panel is already showing that note, so nothing\n * re-runs. Hosts increment a counter in the same handler that opens the tool.\n */\n currentNoteKey?: string | number;\n\n /* ----- Composer ----- */\n /**\n * `'rich'` (default) mounts the kit `RichTextEditor` (Redactor; degrades to a\n * textarea where Redactor is absent). `'plain'` keeps a simple `TextArea` for\n * lightweight surfaces / deterministic tests.\n */\n composer?: 'rich' | 'plain';\n /** Toolbar preset for the rich composer. Defaults to `'standard'`. */\n editorToolbar?: RichTextEditorToolbar;\n /** Inject the Redactor factory for the rich composer (else `window.$R`). */\n redactor?: RedactorFactory;\n /** Consumer image-upload endpoint for the rich composer. */\n imageUploadUrl?: string;\n\n /* ----- Clinical flag (permission-gated) ----- */\n /** Show the \"clinical note\" toggle in the composer. Default `true`. */\n showClinicalToggle?: boolean;\n /**\n * Permission gate — when `false` the clinical toggle is disabled and shows\n * `clinicalGatedReason` on hover/focus. Mirrors platform's\n * `practice_add_clinical_note` permission. Default `true`.\n */\n canAddClinicalNote?: boolean;\n /** Tooltip shown when the clinical toggle is gated off. */\n clinicalGatedReason?: string;\n /** Initial state of the clinical toggle. Default `false`. */\n defaultClinical?: boolean;\n\n /* ----- AI assistance (forwarded to RichTextEditor) ----- */\n onRequestAiDraft?: RichTextEditorProps['onRequestAiDraft'];\n aiDraftFormat?: RichTextEditorProps['aiDraftFormat'];\n aiPrivacyNotice?: RichTextEditorProps['aiPrivacyNotice'];\n onDictate?: RichTextEditorProps['onDictate'];\n onProofread?: RichTextEditorProps['onProofread'];\n onAutoFormat?: RichTextEditorProps['onAutoFormat'];\n /**\n * Patient AI-consent gate for Help-me-write + both mics, forwarded\n * straight to the rich composer. See `AiConsentGate`. Omit for today's\n * ungated behaviour. Ignored by the `'plain'` composer (it offers\n * neither affordance).\n */\n aiConsent?: AiConsentGate;\n /**\n * Template variables for the rich composer's \"Insert variable\" menu and\n * `[[TOKEN]]` chip rendering. Forwarded straight to `RichTextEditor`.\n * Ignored by the `'plain'` composer.\n */\n variables?: RichTextEditorProps['variables'];\n /** Decide whether a `[[TOKEN]]` is valid. See `RichTextEditor`. */\n validateVariable?: RichTextEditorProps['validateVariable'];\n /** The invalid `[[TOKEN]]`s in the draft, reported by the rich composer. */\n onVariableValidityChange?: RichTextEditorProps['onVariableValidityChange'];\n /**\n * Bring your own Help-me-write surface (e.g. practice templates) into the\n * composer, forwarded straight to `RichTextEditor`. See\n * `RichTextEditorProps['renderHelpMeWrite']`.\n */\n renderHelpMeWrite?: RichTextEditorProps['renderHelpMeWrite'];\n /** Upload an image yourself and resolve its URL. See `RichTextEditor`. */\n onUploadImage?: RichTextEditorProps['onUploadImage'];\n /** An AI call ran out of credits. See `RichTextEditor`. */\n onAiCreditsExhausted?: RichTextEditorProps['onAiCreditsExhausted'];\n /**\n * Rendered just above the composer — e.g. the Help-me-write templates\n * pattern's `undoNotice`. Renders in both add and edit mode, whenever the\n * composer itself is mounted.\n */\n composerBefore?: ReactNode;\n /**\n * Rendered just after the composer — e.g. the Help-me-write templates\n * pattern's `manager` dialog. Renders in both add and edit mode, whenever\n * the composer itself is mounted.\n */\n composerAfter?: ReactNode;\n\n /* ----- Per-note actions ----- */\n /** Toggle a note's pinned state — renders an inline pin button per note. */\n onTogglePin?: (id: string) => void;\n /** Toggle a note's flagged state — renders an inline flag button per note. */\n onToggleFlag?: (id: string) => void;\n /**\n * Host-owned actions for each note (edit, delete, share…), rendered by\n * the note card beside its pin and flag,\n * aligned to the inline end. The host supplies labelled controls and owns\n * what they do — the panel stays a timeline and never edits a note itself.\n */\n noteActions?: (note: NotesPanelNote) => ReactNode;\n /**\n * Save an edit to an existing note. When provided, each note the reader may\n * edit gets a pencil; it loads the note into the SAME composer that writes\n * new notes, in place, so a rich note is edited as rich text and keeps its\n * formatting. Return a promise to hold the pending state; a rejection keeps\n * the draft. Hidden on `actions.edit: false` and on a deleted note.\n */\n onEditNote?: (\n id: string,\n submission: NotesPanelSubmission,\n ) => void | Promise<void>;\n /**\n * Let an edit change a note's clinical flag. Default `false`: the \"Clinical\n * note\" toggle is hidden while editing and the submission carries the\n * note's existing flag. Most hosts save a note's content only, and a live\n * toggle that changes nothing is a lie. Set `true` only when the host\n * persists `submission.clinical` on edit.\n */\n editClinical?: boolean;\n /**\n * Request the host to delete a note. When provided, the panel holds the\n * row on screen long enough to fade it out before calling this, so the\n * removal reads as a removal rather than a vanish. Omit to let the host\n * own the timing entirely (the reflow animation still closes the gap).\n */\n onDeleteNote?: (id: string) => void;\n /**\n * Show a confirmation dialog before calling `onDeleteNote`. When `true`\n * (the default when `onDeleteNote` is provided), the built-in delete\n * button opens an alert dialog first; the exit fade only starts after\n * the user confirms. Pass `false` to delete immediately on click.\n */\n confirmDelete?: boolean;\n\n /* ----- Labels / chrome ----- */\n /** Panel heading. Defaults to the localised \"Notes\". */\n title?: string;\n /** Composer placeholder. */\n composerPlaceholder?: string;\n /** Save-button label. */\n addNoteLabel?: string;\n /** Rendered when there are no notes. */\n emptyState?: ReactNode;\n /** Accessible name for the panel region (defaults to `title`). */\n 'aria-label'?: string;\n}\n\n/* Lifts the card's content above the wash layer, so the wash tints the card\n surface only: note text and badges keep their own colours and contrast. */\nconst NOTE_CONTENT_ABOVE_WASH =\n 'ds:isolate ds:[&_[data-component=card]>*]:relative ds:[&_[data-component=card]>*]:z-[1]';\n\n/* The timeline row. The addressed row takes the keyboard focus outline; its\n visual mark is the wash layer below, so no row carries a border stripe. */\nconst noteItemVariants = cva(\n 'ds:relative ds:flex ds:flex-col ds:rounded-[var(--radius-lg)]',\n {\n variants: {\n current: {\n 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)]',\n false: '',\n },\n washed: { true: NOTE_CONTENT_ABOVE_WASH, false: '' },\n },\n defaultVariants: { current: false, washed: false },\n },\n);\n\n/* The accent wash on a row's card surface. `addressed` arrives, holds and\n leaves no mark; `editing` is steady for as long as the edit lasts. With\n motion off (OS setting, accessible theme) `addressed` holds steady too. */\nconst noteWashVariants = cva(\n 'ds:pointer-events-none ds:absolute ds:inset-0 ds:rounded-[var(--radius-lg)] ds:bg-[color:var(--accent)]',\n {\n variants: {\n state: {\n addressed: [\n 'ds:opacity-0',\n 'ds:animate-[note-addressed_calc(var(--animation-duration)*9)_var(--ease-in-out)]',\n 'ds:motion-reduce:animate-none ds:motion-reduce:opacity-[var(--opacity-12)]',\n 'ds:[.theme-accessible_&]:animate-none ds:[.theme-accessible_&]:opacity-[var(--opacity-12)]',\n ].join(' '),\n editing: 'ds:opacity-[var(--opacity-12)]',\n },\n },\n },\n);\n\n/* A row on its way out fades in place; the reflow hook then slides the\n rows below up to close the gap. Declared at rest so the transition has\n a value to animate from the moment the leaving class lands. */\nconst noteLeavingClass = 'ds:opacity-0';\nconst noteElevationClass = [\n 'ds:transition-opacity ds:duration-[var(--animation-duration)]',\n 'ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none',\n].join(' ');\n\n/* Body lines per placeholder note. Uneven, so three cards do not read as one\n repeated stamp. */\nconst NOTE_SKELETON_LINES = [3, 2, 3] as const;\n\n/** Strip tags / entities to test whether a rich draft holds real content. */\nfunction hasRichContent(html: string): boolean {\n if (!html) return false;\n if (/<img\\b/i.test(html)) return true;\n return (\n html\n .replace(/<[^>]*>/g, '')\n .replace(/&nbsp;/gi, ' ')\n .trim().length > 0\n );\n}\n\nexport const NotesPanel = forwardRef<HTMLElement, NotesPanelProps>(\n function NotesPanel(\n {\n id,\n notes,\n onAddNote,\n status = 'ready',\n onRetry,\n currentNoteId,\n currentNoteKey,\n composer = 'rich',\n editorToolbar = 'standard',\n redactor,\n imageUploadUrl,\n showClinicalToggle = true,\n canAddClinicalNote = true,\n clinicalGatedReason,\n defaultClinical = false,\n onRequestAiDraft,\n aiDraftFormat,\n aiPrivacyNotice,\n onDictate,\n onProofread,\n onAutoFormat,\n aiConsent,\n variables,\n validateVariable,\n onVariableValidityChange,\n renderHelpMeWrite,\n onUploadImage,\n onAiCreditsExhausted,\n composerBefore,\n composerAfter,\n onTogglePin,\n onToggleFlag,\n noteActions,\n onEditNote,\n editClinical = false,\n onDeleteNote,\n confirmDelete = true,\n title,\n composerPlaceholder,\n addNoteLabel,\n emptyState,\n className,\n 'aria-label': ariaLabel,\n ...rest\n },\n ref,\n ) {\n const { t, i18n } = useTranslation();\n const editorRef = useRef<RichTextEditorHandle>(null);\n const [draft, setDraft] = useState('');\n const [clinical, setClinical] = useState(defaultClinical);\n const [pending, setPending] = useState(false);\n const [addError, setAddError] = useState<string | null>(null);\n // The note loaded into the composer for editing, or null when composing.\n const [editingId, setEditingId] = useState<string | null>(null);\n /* Settle in only when this content REPLACES a skeleton. Content that was\n simply there from the start must not fade: it would read as invisible\n for one animation to any test or reader that looks at once. */\n const followedLoading = useRef(false);\n if (status === 'loading') followedLoading.current = true;\n const enterClass = followedLoading.current ? CONTENT_ENTER_CLASS : '';\n\n const heading = title ?? t('notesPanel.title', { defaultValue: 'Notes' });\n const headingId = useId();\n const placeholder =\n composerPlaceholder ??\n t('notesPanel.placeholder', { defaultValue: 'Add a note…' });\n const composerLabel =\n editingId !== null\n ? t('notesPanel.edit', { defaultValue: 'Edit note' })\n : t('notesPanel.composerLabel', { defaultValue: 'New note' });\n\n // Live content check: plain reads the draft directly; rich strips the draft\n // (debounced) for the disabled state but commits from the editor handle.\n const hasContent =\n composer === 'rich' ? hasRichContent(draft) : draft.trim().length > 0;\n\n const commit = useCallback(() => {\n const save = editingId !== null ? onEditNote : onAddNote;\n if (!save || pending) return;\n const rich = composer === 'rich';\n const content = rich\n ? (editorRef.current?.getHTML() ?? draft)\n : draft.trim();\n if (rich ? !hasRichContent(content) : !content) return;\n const reset = () => {\n if (rich) editorRef.current?.clear();\n setDraft('');\n setClinical(defaultClinical);\n setEditingId(null);\n };\n setAddError(null);\n let result: void | Promise<void>;\n try {\n result =\n editingId !== null && onEditNote\n ? onEditNote(editingId, { content, clinical })\n : onAddNote?.({ content, clinical });\n } catch (error: unknown) {\n setAddError(getErrorMessage(error, t('notesPanel.addFailed')));\n return;\n }\n if (!result || typeof result.then !== 'function') return reset();\n // A failed save keeps the draft, so nothing typed is lost.\n setPending(true);\n Promise.resolve(result)\n .then(reset, (error: unknown) =>\n setAddError(getErrorMessage(error, t('notesPanel.addFailed'))),\n )\n .finally(() => setPending(false));\n }, [\n composer,\n draft,\n clinical,\n defaultClinical,\n editingId,\n onAddNote,\n onEditNote,\n pending,\n t,\n ]);\n\n const clinicalToggleShown =\n showClinicalToggle && (editingId === null || editClinical);\n\n /* Every row carries the SAME action words, so each accessible name adds\n the note's own date: otherwise a screen reader hears a list of\n identical \"Edit note\" buttons. The tooltip keeps the short words. */\n const noteStamp = useCallback(\n (note: NotesPanelNote): string => {\n try {\n return new Intl.DateTimeFormat(i18n.language, {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n }).format(new Date(note.dateIso));\n } catch {\n return note.dateIso;\n }\n },\n [i18n.language],\n );\n\n /* ----- Edit in place: the composer takes the note, and gives it back ----- */\n const startEdit = useCallback(\n (note: NotesPanelNote) => {\n if (!note.id || pending) return;\n const content = note.content ?? '';\n setAddError(null);\n setEditingId(note.id);\n setClinical(note.clinical ?? false);\n setDraft(content);\n if (composer === 'rich') {\n editorRef.current?.clear();\n editorRef.current?.insertAtCursor(content, { asHtml: true });\n }\n editorRef.current?.focus();\n },\n [composer, pending],\n );\n const cancelEdit = useCallback(() => {\n if (composer === 'rich') editorRef.current?.clear();\n setDraft('');\n setClinical(defaultClinical);\n setAddError(null);\n setEditingId(null);\n }, [composer, defaultClinical]);\n // The note being edited went away (deleted, or another patient's notes\n // arrived): its draft must not be saved against whatever comes next.\n const editingStillThere =\n editingId === null ||\n notes.some((note) => note.id === editingId && !note.deleted);\n useEffect(() => {\n if (!editingStillThere) cancelEdit();\n }, [editingStillThere, cancelEdit]);\n\n // Pinned notes lead; order within each group is preserved.\n const ordered = [...notes].sort(\n (a, b) => Number(b.pinned ?? false) - Number(a.pinned ?? false),\n );\n\n /* The accessible theme zeroes `--animation-duration`, so its CSS plays\n nothing — the JS must agree, or a row would sit still for the delay\n and then vanish anyway. `undefined` leaves the media query in charge. */\n const { resolvedTheme } = useTheme();\n const reduceMotion = resolvedTheme.endsWith('-accessible') || undefined;\n\n /* Closing the gap a removed row leaves: the rows below slide up rather\n than jumping, so the eye keeps its place in the list. Fires on add,\n delete, and re-order (pinning) — any change to the visible id\n sequence. */\n const { containerRef: reflowRef } = useListReflow<HTMLUListElement>({\n key: ordered.map((n) => n.id).join(),\n reduceMotion,\n });\n\n /* A note leaving the list fades out before the host drops it, so the\n removal reads as a removal rather than a vanish. The reflow hook\n then slides the rows below up to close the gap. */\n const deleteExit = useExitTransition({ reduceMotion });\n const [pendingDelete, setPendingDelete] = useState<string | null>(null);\n const handleDeleteNote = useCallback(\n (noteId: string) => {\n if (!onDeleteNote) return;\n if (confirmDelete) {\n setPendingDelete(noteId);\n } else {\n deleteExit.leave(noteId, () => onDeleteNote(noteId));\n }\n },\n [confirmDelete, deleteExit, onDeleteNote],\n );\n const confirmDeleteNote = useCallback(() => {\n if (!pendingDelete || !onDeleteNote) return;\n const noteId = pendingDelete;\n setPendingDelete(null);\n deleteExit.leave(noteId, () => onDeleteNote(noteId));\n }, [pendingDelete, onDeleteNote, deleteExit]);\n\n /* ----- The addressed note (see `currentNoteId`) ----- */\n const currentItemRef = useRef<HTMLLIElement>(null);\n useEffect(() => {\n if (!currentNoteId) return;\n // `center`, not `nearest`: nearest parks the note flush against the edge\n // of the scroll region, which is the least readable place to land.\n currentItemRef.current?.scrollIntoView({ block: 'center' });\n currentItemRef.current?.focus();\n // `currentNoteKey` is in the deps so a REPEAT address of the same note\n // re-runs — see the prop doc. Addressing is a request, not a value.\n }, [currentNoteId, currentNoteKey]);\n\n /* ----- Agent handle (structural reads + composer / toggles) ----- */\n const notesRef = useRef(notes);\n notesRef.current = notes;\n const onAddNoteRef = useRef(onAddNote);\n onAddNoteRef.current = onAddNote;\n const onTogglePinRef = useRef(onTogglePin);\n onTogglePinRef.current = onTogglePin;\n const onToggleFlagRef = useRef(onToggleFlag);\n onToggleFlagRef.current = onToggleFlag;\n const canAddClinicalRef = useRef(canAddClinicalNote);\n canAddClinicalRef.current = canAddClinicalNote;\n const currentNoteIdRef = useRef(currentNoteId);\n currentNoteIdRef.current = currentNoteId;\n\n const rootRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => rootRef.current as HTMLElement, []);\n\n const handle = useMemo<NotesPanelHandle>(\n () => ({\n // Ids + flags only — never the note body or author (both PHI).\n getNotes: () =>\n notesRef.current.map((n) => ({\n id: n.id,\n pinned: !!n.pinned,\n flagged: !!n.flagged,\n clinical: !!n.clinical,\n })),\n canAddNote: () => !!onAddNoteRef.current,\n canAddClinical: () => canAddClinicalRef.current,\n getCurrentNoteId: () => currentNoteIdRef.current ?? null,\n addNote: (submission) => {\n // A clinical submission requires the permission gate to be open.\n if (submission.clinical && !canAddClinicalRef.current) return;\n return onAddNoteRef.current?.(submission);\n },\n togglePin: (noteId) => {\n const note = notesRef.current.find((n) => n.id === noteId);\n if (note && (note.deleted || note.actions?.pin === false)) return;\n onTogglePinRef.current?.(noteId);\n },\n toggleFlag: (noteId) => onToggleFlagRef.current?.(noteId),\n }),\n [],\n );\n useAgentRegistration(notesPanelAgent, handle, id);\n\n return (\n <section\n ref={rootRef}\n data-component=\"notes-panel\"\n data-component-id={id}\n aria-labelledby={ariaLabel ? undefined : headingId}\n aria-label={ariaLabel}\n className={['ds:flex ds:flex-col', className].filter(Boolean).join(' ')}\n {...rest}\n >\n {/* Shared rail header — pins to the top of the panel's scroll region\n while the composer + note timeline scroll beneath it. The rail\n injects the favourite / close actions via PanelHeaderActionsProvider. */}\n <PanelHeader\n title={heading}\n icon={<NotebookPen aria-hidden=\"true\" />}\n headingId={ariaLabel ? undefined : headingId}\n sticky\n divider\n />\n\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]\">\n {onAddNote || editingId !== null ? (\n <div\n data-notes-panel-composer={editingId !== null ? 'edit' : 'add'}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n {composerBefore}\n {composer === 'rich' ? (\n <RichTextEditor\n ref={editorRef}\n ariaLabel={composerLabel}\n placeholder={placeholder}\n toolbar={editorToolbar}\n minHeight=\"fill\"\n redactor={redactor}\n imageUploadUrl={imageUploadUrl}\n readOnly={pending}\n onChange={({ html }) => setDraft(html)}\n onRequestAiDraft={onRequestAiDraft}\n aiDraftFormat={aiDraftFormat}\n aiPrivacyNotice={aiPrivacyNotice}\n onDictate={onDictate}\n onProofread={onProofread}\n onAutoFormat={onAutoFormat}\n aiConsent={aiConsent}\n variables={variables}\n validateVariable={validateVariable}\n onVariableValidityChange={onVariableValidityChange}\n renderHelpMeWrite={renderHelpMeWrite}\n onUploadImage={onUploadImage}\n onAiCreditsExhausted={onAiCreditsExhausted}\n // The panel's own title is an h2 (PanelHeader below); the\n // gate's banner nests one level under it so the h2 → h3\n // sequence stays valid (axe heading-order) instead of\n // jumping straight to the banner's own h5 default.\n aiConsentHeadingLevel={3}\n />\n ) : (\n <TextArea\n value={draft}\n readOnly={pending}\n onChange={(event) => setDraft(event.target.value)}\n placeholder={placeholder}\n autoResize\n minRows={2}\n maxRows={6}\n aria-label={composerLabel}\n />\n )}\n <div\n className={[\n 'ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]',\n clinicalToggleShown ? 'ds:justify-between' : 'ds:justify-end',\n ].join(' ')}\n >\n {clinicalToggleShown ? (\n <Checkbox\n size=\"sm\"\n label={t('notesPanel.clinicalToggle', {\n defaultValue: 'Clinical note',\n })}\n checked={clinical}\n onCheckedChange={(next) => setClinical(next === true)}\n disabled={pending || !canAddClinicalNote}\n disabledReason={\n canAddClinicalNote\n ? undefined\n : (clinicalGatedReason ??\n t('notesPanel.clinicalGated', {\n defaultValue:\n 'You do not have permission to write clinical notes.',\n }))\n }\n />\n ) : null}\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n {editingId !== null ? (\n <Button\n type=\"button\"\n size=\"sm\"\n intent=\"ghost\"\n onClick={cancelEdit}\n disabled={pending}\n >\n {t('notesPanel.cancelEdit', { defaultValue: 'Cancel' })}\n </Button>\n ) : null}\n <Button\n type=\"button\"\n size=\"sm\"\n onClick={commit}\n disabled={!hasContent}\n loading={pending}\n >\n {editingId !== null\n ? t('notesPanel.saveEdit', { defaultValue: 'Save note' })\n : (addNoteLabel ??\n t('notesPanel.add', { defaultValue: 'Add note' }))}\n </Button>\n </span>\n </div>\n {addError ? (\n <Alert variant=\"error\">\n <Alert.Description>{addError}</Alert.Description>\n </Alert>\n ) : null}\n {composerAfter}\n </div>\n ) : null}\n\n {status === 'loading' && ordered.length === 0 ? (\n /* Note-shaped placeholders, not a spinner: the reader sees where\n the notes will land and how many to expect. The status text is\n for assistive tech only; sighted readers get the motion. */\n <div\n data-notes-panel-loading=\"\"\n aria-busy=\"true\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n <span role=\"status\" className=\"ds:sr-only\">\n {t('notesPanel.loading')}\n </span>\n {NOTE_SKELETON_LINES.map((lines, index) => (\n <Card key={index} variant=\"elevated\" aria-hidden=\"true\">\n <Card.Body>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <Skeleton\n variant=\"circular\"\n size=\"sm\"\n stagger={index * 2}\n />\n <div className=\"ds:flex ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <Skeleton\n variant=\"text\"\n size=\"sm\"\n stagger={index * 2}\n width=\"40%\"\n />\n <Skeleton\n variant=\"text\"\n size=\"sm\"\n stagger={index * 2}\n width=\"25%\"\n />\n </div>\n </div>\n <Skeleton\n variant=\"text\"\n size=\"sm\"\n lines={lines}\n stagger={index * 2 + 1}\n />\n </div>\n </Card.Body>\n </Card>\n ))}\n </div>\n ) : status === 'error' ? (\n <Alert variant=\"error\">\n <Alert.Description>{t('notesPanel.loadError')}</Alert.Description>\n {onRetry ? (\n <Alert.Action>\n <Button intent=\"secondary\" size=\"sm\" onClick={onRetry}>\n {t('notesPanel.retry')}\n </Button>\n </Alert.Action>\n ) : null}\n </Alert>\n ) : null}\n\n {/* A refresh keeps the notes it has: real notes never give way to\n placeholders. The list is marked busy and says so to a reader. */}\n {status === 'loading' && ordered.length > 0 ? (\n <span role=\"status\" className=\"ds:sr-only\">\n {t('notesPanel.loading')}\n </span>\n ) : null}\n {ordered.length > 0 ? (\n <ul\n ref={reflowRef}\n aria-busy={status === 'loading' || undefined}\n className={`ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${enterClass}`.trim()}\n >\n {ordered.map(({ actions, ...note }, index) => {\n const isCurrent =\n currentNoteId != null && note.id === currentNoteId;\n const noteId = note.id as string | undefined;\n const isEditing = noteId != null && editingId === noteId;\n const leaving = noteId != null && deleteExit.isLeaving(noteId);\n return (\n <li\n key={note.id ?? index}\n ref={isCurrent ? currentItemRef : undefined}\n // Focus lands on the row, not inside the card, so the\n // sentence below and `aria-current` are read out before the\n // note — and the rail's own Escape still bubbles.\n tabIndex={isCurrent ? -1 : undefined}\n aria-current={isCurrent ? 'true' : undefined}\n data-reflow-id={noteId}\n data-leaving={leaving ? '' : undefined}\n data-editing={isEditing ? '' : undefined}\n className={[\n noteItemVariants({\n current: isCurrent,\n washed: isCurrent || isEditing,\n }),\n noteElevationClass,\n REFLOW_ROW_CLASS,\n leaving ? noteLeavingClass : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {isCurrent ? (\n <span className=\"ds:sr-only\">\n {t('notesPanel.current', {\n defaultValue: 'Current note',\n })}\n </span>\n ) : null}\n {/* Elevated card per note; the list gap (not a separator)\n spaces them. Bodies clamp to five lines with read-more —\n except the addressed one, which is what the reader came\n for and opens in full. */}\n {/* Keyed on the address, so a repeat address of the same\n note remounts the layer and the wash plays again. Editing\n wins: a steady state must not pulse. */}\n {isEditing ? (\n <span\n aria-hidden=\"true\"\n data-notes-panel-wash=\"editing\"\n className={noteWashVariants({ state: 'editing' })}\n />\n ) : isCurrent ? (\n <span\n key={`${currentNoteId}:${currentNoteKey ?? ''}`}\n aria-hidden=\"true\"\n data-notes-panel-wash=\"addressed\"\n className={noteWashVariants({ state: 'addressed' })}\n />\n ) : null}\n <ClinicalNoteCard\n surface=\"elevated\"\n truncate={!isCurrent}\n headerActions={\n <>\n {noteActions\n ? noteActions({ ...note, actions })\n : null}\n {onEditNote &&\n noteId &&\n !note.deleted &&\n actions?.edit !== false ? (\n <IconButton\n icon={<Pencil />}\n intent=\"ghost\"\n size=\"sm\"\n aria-label={t('notesPanel.editNamed', {\n date: noteStamp(note),\n defaultValue: 'Edit note · {{date}}',\n })}\n tooltip={t('notesPanel.edit', {\n defaultValue: 'Edit note',\n })}\n aria-pressed={editingId === noteId}\n disabled={pending}\n data-notes-panel-edit=\"\"\n onClick={() =>\n editingId === noteId\n ? cancelEdit()\n : startEdit(note)\n }\n />\n ) : null}\n {onDeleteNote && noteId && !note.deleted ? (\n <IconButton\n icon={<Trash2 />}\n intent=\"ghost\"\n size=\"sm\"\n aria-label={t('notesPanel.deleteNamed', {\n date: noteStamp(note),\n defaultValue: 'Delete note · {{date}}',\n })}\n tooltip={t('notesPanel.delete', {\n defaultValue: 'Delete note',\n })}\n onClick={() => handleDeleteNote(noteId)}\n />\n ) : null}\n </>\n }\n {...note}\n onTogglePin={\n onTogglePin &&\n note.id &&\n actions?.pin !== false &&\n !note.deleted\n ? () => onTogglePin(note.id as string)\n : undefined\n }\n onToggleFlag={\n onToggleFlag && note.id\n ? () => onToggleFlag(note.id as string)\n : undefined\n }\n />\n </li>\n );\n })}\n </ul>\n ) : status !== 'ready' ? null : (\n (emptyState ?? (\n <p className=\"ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {t('notesPanel.empty', { defaultValue: 'No notes yet.' })}\n </p>\n ))\n )}\n </div>\n\n {onDeleteNote && confirmDelete ? (\n <Dialog\n open={pendingDelete !== null}\n onOpenChange={(next) => !next && setPendingDelete(null)}\n >\n <Dialog.Content variant=\"alert\" size=\"sm\">\n <Dialog.Header>\n <Dialog.Title>\n {t('notesPanel.deleteConfirmTitle', {\n defaultValue: 'Delete this note?',\n })}\n </Dialog.Title>\n </Dialog.Header>\n <Dialog.Body>\n <Dialog.Description>\n {t('notesPanel.deleteConfirmBody', {\n defaultValue: 'The note will be removed from the record.',\n })}\n </Dialog.Description>\n </Dialog.Body>\n <Dialog.Footer>\n <Dialog.Close asChild>\n <Button\n intent=\"secondary\"\n size=\"sm\"\n onClick={() => setPendingDelete(null)}\n >\n {t('notesPanel.deleteConfirmCancel', {\n defaultValue: 'Cancel',\n })}\n </Button>\n </Dialog.Close>\n <Button\n intent=\"destructive\"\n size=\"sm\"\n onClick={confirmDeleteNote}\n >\n {t('notesPanel.deleteConfirmAction', {\n defaultValue: 'Delete',\n })}\n </Button>\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog>\n ) : null}\n </section>\n );\n },\n);\n"],"names":["getErrorMessage","error","fallback","notesPanelAgent","handle","args","NOTE_CONTENT_ABOVE_WASH","noteItemVariants","cva","noteWashVariants","noteLeavingClass","noteElevationClass","NOTE_SKELETON_LINES","hasRichContent","html","NotesPanel","forwardRef","id","notes","onAddNote","status","onRetry","currentNoteId","currentNoteKey","composer","editorToolbar","redactor","imageUploadUrl","showClinicalToggle","canAddClinicalNote","clinicalGatedReason","defaultClinical","onRequestAiDraft","aiDraftFormat","aiPrivacyNotice","onDictate","onProofread","onAutoFormat","aiConsent","variables","validateVariable","onVariableValidityChange","renderHelpMeWrite","onUploadImage","onAiCreditsExhausted","composerBefore","composerAfter","onTogglePin","onToggleFlag","noteActions","onEditNote","editClinical","onDeleteNote","confirmDelete","title","composerPlaceholder","addNoteLabel","emptyState","className","ariaLabel","rest","ref","t","i18n","useTranslation","editorRef","useRef","draft","setDraft","useState","clinical","setClinical","pending","setPending","addError","setAddError","editingId","setEditingId","followedLoading","enterClass","CONTENT_ENTER_CLASS","heading","headingId","useId","placeholder","composerLabel","hasContent","commit","useCallback","rich","content","_a","reset","result","clinicalToggleShown","noteStamp","note","startEdit","_b","_c","cancelEdit","editingStillThere","useEffect","ordered","a","b","resolvedTheme","useTheme","reduceMotion","reflowRef","useListReflow","n","deleteExit","useExitTransition","pendingDelete","setPendingDelete","handleDeleteNote","noteId","confirmDeleteNote","currentItemRef","notesRef","onAddNoteRef","onTogglePinRef","onToggleFlagRef","canAddClinicalRef","currentNoteIdRef","rootRef","useImperativeHandle","useMemo","submission","useAgentRegistration","jsxs","jsx","PanelHeader","NotebookPen","RichTextEditor","TextArea","event","Checkbox","next","Button","Alert","lines","index","Card","Skeleton","actions","isCurrent","isEditing","leaving","REFLOW_ROW_CLASS","ClinicalNoteCard","Fragment","IconButton","Pencil","Trash2","Dialog"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACO,SAASA,GAAgBC,GAAgBC,GAA0B;AACxE,SACE,OAAOD,KAAU,YACjBA,MAAU,QACV,aAAaA,KACb,OAAOA,EAAM,WAAY,YACzBA,EAAM,QAAQ,SAEPA,EAAM,UAERC;AACT;ACOO,MAAMC,KAAkD;AAAA,EAC7D,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,QAAQ;AAAA,EACvB,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,g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e,SAAQ,SAAQ,MAAK,MACnC,UAAA;AAAA,gBAAA,gBAAAxB,EAACwB,EAAO,QAAP,EACC,UAAA,gBAAAxB,EAACwB,EAAO,OAAP,EACE,YAAE,iCAAiC;AAAA,kBAClC,cAAc;AAAA,gBAAA,CACf,GACH,EAAA,CACF;AAAA,gBACA,gBAAAxB,EAACwB,EAAO,MAAP,EACC,4BAACA,EAAO,aAAP,EACE,UAAA9F,EAAE,gCAAgC;AAAA,kBACjC,cAAc;AAAA,gBAAA,CACf,GACH,EAAA,CACF;AAAA,gBACA,gBAAAqE,EAACyB,EAAO,QAAP,EACC,UAAA;AAAA,kBAAA,gBAAAxB,EAACwB,EAAO,OAAP,EAAa,SAAO,IACnB,UAAA,gBAAAxB;AAAA,oBAACQ;AAAA,oBAAA;AAAA,sBACC,QAAO;AAAA,sBACP,MAAK;AAAA,sBACL,SAAS,MAAMzB,EAAiB,IAAI;AAAA,sBAEnC,YAAE,kCAAkC;AAAA,wBACnC,cAAc;AAAA,sBAAA,CACf;AAAA,oBAAA;AAAA,kBAAA,GAEL;AAAA,kBACA,gBAAAiB;AAAA,oBAACQ;AAAA,oBAAA;AAAA,sBACC,QAAO;AAAA,sBACP,MAAK;AAAA,sBACL,SAAStB;AAAA,sBAER,YAAE,kCAAkC;AAAA,wBACnC,cAAc;AAAA,sBAAA,CACf;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACH,EAAA,CACF;AAAA,cAAA,EAAA,CACF;AAAA,YAAA;AAAA,UAAA,IAEA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;"}
@@ -10,7 +10,7 @@ import { Slot as ls } from "@radix-ui/react-slot";
10
10
  import { c as T } from "./index-D2ZczOXr.js";
11
11
  import { useTranslation as A } from "react-i18next";
12
12
  import { u as cs } from "./registry-DvAUVLHh.js";
13
- import { u as us } from "./use-edge-resize-ZnGG7gyO.js";
13
+ import { u as us } from "./use-edge-resize-BHesP0kg.js";
14
14
  import { c as ms } from "./compose-refs-C0k0tdqF.js";
15
15
  import { a as vs, b as ps, d as fs } from "./input-surface-xyERuLU_.js";
16
16
  import { X as gs } from "./x-B5YnXwCz.js";
@@ -1347,4 +1347,4 @@ export {
1347
1347
  Ss as s,
1348
1348
  N as u
1349
1349
  };
1350
- //# sourceMappingURL=sidebar-ClTY9lLI.js.map
1350
+ //# sourceMappingURL=sidebar-DbZXLl8h.js.map