@alfadocs/ui-kit-debug 1.36.0 → 1.37.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 (230) hide show
  1. package/dist/_chunks/appointment-peek-5S4O1VQP.js +115 -0
  2. package/dist/_chunks/appointment-peek-5S4O1VQP.js.map +1 -0
  3. package/dist/_chunks/appointment-peek.agent-C539tNFM.js +17 -0
  4. package/dist/_chunks/appointment-peek.agent-C539tNFM.js.map +1 -0
  5. package/dist/_chunks/building-2-D33bLCWL.js +24 -0
  6. package/dist/_chunks/building-2-D33bLCWL.js.map +1 -0
  7. package/dist/_chunks/calendar-workspace-BqKBj26r.js +9715 -0
  8. package/dist/_chunks/calendar-workspace-BqKBj26r.js.map +1 -0
  9. package/dist/_chunks/{control-room-rail-Ds45_g4f.js → control-room-rail-DQoHdE1U.js} +2 -2
  10. package/dist/_chunks/{control-room-rail-Ds45_g4f.js.map → control-room-rail-DQoHdE1U.js.map} +1 -1
  11. package/dist/_chunks/editable-description-BOfAeY3T.js +112 -0
  12. package/dist/_chunks/editable-description-BOfAeY3T.js.map +1 -0
  13. package/dist/_chunks/editable-description.agent-Bm_LBV2j.js +21 -0
  14. package/dist/_chunks/editable-description.agent-Bm_LBV2j.js.map +1 -0
  15. package/dist/_chunks/{money.agent-Dw55UxUA.js → money-BY-HmKhZ.js} +33 -47
  16. package/dist/_chunks/money-BY-HmKhZ.js.map +1 -0
  17. package/dist/_chunks/money.agent-BjJ6gOkx.js +17 -0
  18. package/dist/_chunks/money.agent-BjJ6gOkx.js.map +1 -0
  19. package/dist/_chunks/notes-panel-4y5JioWN.js +556 -0
  20. package/dist/_chunks/notes-panel-4y5JioWN.js.map +1 -0
  21. package/dist/_chunks/panel-subview-BNXN8OEL.js +160 -0
  22. package/dist/_chunks/panel-subview-BNXN8OEL.js.map +1 -0
  23. package/dist/_chunks/panel-subview.agent-BIBvE-IW.js +17 -0
  24. package/dist/_chunks/panel-subview.agent-BIBvE-IW.js.map +1 -0
  25. package/dist/_chunks/{patient-details-f7SSXkTJ.js → patient-details-2cIaL-Zb.js} +2 -2
  26. package/dist/_chunks/{patient-details-f7SSXkTJ.js.map → patient-details-2cIaL-Zb.js.map} +1 -1
  27. package/dist/_chunks/{patient-field-row-BQZoP4m2.js → patient-field-row-IHb2VFc2.js} +193 -172
  28. package/dist/_chunks/patient-field-row-IHb2VFc2.js.map +1 -0
  29. package/dist/_chunks/{patient-summary-card-Bz7KdUin.js → patient-summary-card-BzmJH9a-.js} +2 -2
  30. package/dist/_chunks/{patient-summary-card-Bz7KdUin.js.map → patient-summary-card-BzmJH9a-.js.map} +1 -1
  31. package/dist/_chunks/{section-card.agent-W18CHEgX.js → section-card-XR2bW1Ie.js} +20 -34
  32. package/dist/_chunks/{section-card.agent-W18CHEgX.js.map → section-card-XR2bW1Ie.js.map} +1 -1
  33. package/dist/_chunks/section-card.agent-Bz1BhM_j.js +17 -0
  34. package/dist/_chunks/section-card.agent-Bz1BhM_j.js.map +1 -0
  35. package/dist/_chunks/smartphone-DaPcFw-X.js +32 -0
  36. package/dist/_chunks/smartphone-DaPcFw-X.js.map +1 -0
  37. package/dist/_chunks/{task-card-BalrLkSz.js → task-card-qTKD1fIT.js} +39 -57
  38. package/dist/_chunks/task-card-qTKD1fIT.js.map +1 -0
  39. package/dist/_chunks/{task-tray-wl9eti6J.js → task-tray-CQ8UAR2j.js} +2 -2
  40. package/dist/_chunks/{task-tray-wl9eti6J.js.map → task-tray-CQ8UAR2j.js.map} +1 -1
  41. package/dist/_chunks/{tasks-panel-BDNB7hsZ.js → tasks-panel-CBGMtQ_f.js} +2 -2
  42. package/dist/_chunks/{tasks-panel-BDNB7hsZ.js.map → tasks-panel-CBGMtQ_f.js.map} +1 -1
  43. package/dist/_chunks/{tool-rail-Bq5eiFMG.js → tool-rail-BP8sjxCw.js} +310 -231
  44. package/dist/_chunks/tool-rail-BP8sjxCw.js.map +1 -0
  45. package/dist/_chunks/treatment-receipt-D4kOLXOk.js +94 -0
  46. package/dist/_chunks/treatment-receipt-D4kOLXOk.js.map +1 -0
  47. package/dist/_chunks/treatment-receipt.agent-bpFm2RPH.js +21 -0
  48. package/dist/_chunks/treatment-receipt.agent-bpFm2RPH.js.map +1 -0
  49. package/dist/_chunks/use-presence-transition-cDwWUXV-.js +58 -0
  50. package/dist/_chunks/use-presence-transition-cDwWUXV-.js.map +1 -0
  51. package/dist/_chunks/{workflow-map-D-LEni11.js → workflow-map-CXdsxvUj.js} +140 -156
  52. package/dist/_chunks/workflow-map-CXdsxvUj.js.map +1 -0
  53. package/dist/agent-catalog.json +65 -1
  54. package/dist/components/appointment-peek/appointment-peek.agent.d.ts +3 -0
  55. package/dist/components/appointment-peek/appointment-peek.agent.d.ts.map +1 -0
  56. package/dist/components/appointment-peek/appointment-peek.d.ts +45 -0
  57. package/dist/components/appointment-peek/appointment-peek.d.ts.map +1 -0
  58. package/dist/components/appointment-peek/index.d.ts +4 -0
  59. package/dist/components/appointment-peek/index.d.ts.map +1 -0
  60. package/dist/components/appointment-peek/index.js +7 -0
  61. package/dist/components/appointment-peek/index.js.map +1 -0
  62. package/dist/components/control-room-rail/index.js +1 -1
  63. package/dist/components/editable-description/editable-description.agent.d.ts +3 -0
  64. package/dist/components/editable-description/editable-description.agent.d.ts.map +1 -0
  65. package/dist/components/editable-description/editable-description.d.ts +20 -0
  66. package/dist/components/editable-description/editable-description.d.ts.map +1 -0
  67. package/dist/components/editable-description/index.d.ts +4 -0
  68. package/dist/components/editable-description/index.d.ts.map +1 -0
  69. package/dist/components/editable-description/index.js +7 -0
  70. package/dist/components/editable-description/index.js.map +1 -0
  71. package/dist/components/index.d.ts +4 -0
  72. package/dist/components/index.d.ts.map +1 -1
  73. package/dist/components/money/index.js +2 -1
  74. package/dist/components/money/index.js.map +1 -1
  75. package/dist/components/notes-panel/index.js +1 -1
  76. package/dist/components/notes-panel/notes-panel.d.ts +16 -0
  77. package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
  78. package/dist/components/panel-subview/index.d.ts +4 -0
  79. package/dist/components/panel-subview/index.d.ts.map +1 -0
  80. package/dist/components/panel-subview/index.js +7 -0
  81. package/dist/components/panel-subview/index.js.map +1 -0
  82. package/dist/components/panel-subview/panel-subview.agent.d.ts +3 -0
  83. package/dist/components/panel-subview/panel-subview.agent.d.ts.map +1 -0
  84. package/dist/components/panel-subview/panel-subview.d.ts +32 -0
  85. package/dist/components/panel-subview/panel-subview.d.ts.map +1 -0
  86. package/dist/components/patient-details/index.js +1 -1
  87. package/dist/components/patient-summary-card/index.js +1 -1
  88. package/dist/components/section-card/index.js +4 -3
  89. package/dist/components/section-card/index.js.map +1 -1
  90. package/dist/components/task-card/index.js +1 -1
  91. package/dist/components/task-tray/index.js +1 -1
  92. package/dist/components/tasks-panel/index.js +1 -1
  93. package/dist/components/tool-rail/index.js +1 -1
  94. package/dist/components/tool-rail/tool-rail.d.ts.map +1 -1
  95. package/dist/components/treatment-receipt/index.d.ts +4 -0
  96. package/dist/components/treatment-receipt/index.d.ts.map +1 -0
  97. package/dist/components/treatment-receipt/index.js +7 -0
  98. package/dist/components/treatment-receipt/index.js.map +1 -0
  99. package/dist/components/treatment-receipt/treatment-receipt.agent.d.ts +3 -0
  100. package/dist/components/treatment-receipt/treatment-receipt.agent.d.ts.map +1 -0
  101. package/dist/components/treatment-receipt/treatment-receipt.d.ts +30 -0
  102. package/dist/components/treatment-receipt/treatment-receipt.d.ts.map +1 -0
  103. package/dist/components/workflow/index.js +1 -1
  104. package/dist/hooks/index.d.ts +1 -0
  105. package/dist/hooks/index.d.ts.map +1 -1
  106. package/dist/hooks/index.js +9 -7
  107. package/dist/hooks/index.js.map +1 -1
  108. package/dist/hooks/use-presence-transition.d.ts +40 -0
  109. package/dist/hooks/use-presence-transition.d.ts.map +1 -0
  110. package/dist/host-compat.css +7 -1
  111. package/dist/i18n/locales/ar.d.ts +29 -5
  112. package/dist/i18n/locales/ar.d.ts.map +1 -1
  113. package/dist/i18n/locales/ar.js +29 -5
  114. package/dist/i18n/locales/ar.js.map +1 -1
  115. package/dist/i18n/locales/de.d.ts +29 -5
  116. package/dist/i18n/locales/de.d.ts.map +1 -1
  117. package/dist/i18n/locales/de.js +29 -5
  118. package/dist/i18n/locales/de.js.map +1 -1
  119. package/dist/i18n/locales/el.d.ts +29 -5
  120. package/dist/i18n/locales/el.d.ts.map +1 -1
  121. package/dist/i18n/locales/el.js +29 -5
  122. package/dist/i18n/locales/el.js.map +1 -1
  123. package/dist/i18n/locales/en.d.ts +29 -5
  124. package/dist/i18n/locales/en.d.ts.map +1 -1
  125. package/dist/i18n/locales/en.js +29 -5
  126. package/dist/i18n/locales/en.js.map +1 -1
  127. package/dist/i18n/locales/es.d.ts +29 -5
  128. package/dist/i18n/locales/es.d.ts.map +1 -1
  129. package/dist/i18n/locales/es.js +29 -5
  130. package/dist/i18n/locales/es.js.map +1 -1
  131. package/dist/i18n/locales/fr.d.ts +29 -5
  132. package/dist/i18n/locales/fr.d.ts.map +1 -1
  133. package/dist/i18n/locales/fr.js +29 -5
  134. package/dist/i18n/locales/fr.js.map +1 -1
  135. package/dist/i18n/locales/hi.d.ts +29 -5
  136. package/dist/i18n/locales/hi.d.ts.map +1 -1
  137. package/dist/i18n/locales/hi.js +29 -5
  138. package/dist/i18n/locales/hi.js.map +1 -1
  139. package/dist/i18n/locales/it.d.ts +29 -5
  140. package/dist/i18n/locales/it.d.ts.map +1 -1
  141. package/dist/i18n/locales/it.js +29 -5
  142. package/dist/i18n/locales/it.js.map +1 -1
  143. package/dist/i18n/locales/ja.d.ts +29 -5
  144. package/dist/i18n/locales/ja.d.ts.map +1 -1
  145. package/dist/i18n/locales/ja.js +29 -5
  146. package/dist/i18n/locales/ja.js.map +1 -1
  147. package/dist/i18n/locales/nl.d.ts +29 -5
  148. package/dist/i18n/locales/nl.d.ts.map +1 -1
  149. package/dist/i18n/locales/nl.js +29 -5
  150. package/dist/i18n/locales/nl.js.map +1 -1
  151. package/dist/i18n/locales/pl.d.ts +29 -5
  152. package/dist/i18n/locales/pl.d.ts.map +1 -1
  153. package/dist/i18n/locales/pl.js +29 -5
  154. package/dist/i18n/locales/pl.js.map +1 -1
  155. package/dist/i18n/locales/pt.d.ts +29 -5
  156. package/dist/i18n/locales/pt.d.ts.map +1 -1
  157. package/dist/i18n/locales/pt.js +29 -5
  158. package/dist/i18n/locales/pt.js.map +1 -1
  159. package/dist/i18n/locales/ro.d.ts +29 -5
  160. package/dist/i18n/locales/ro.d.ts.map +1 -1
  161. package/dist/i18n/locales/ro.js +29 -5
  162. package/dist/i18n/locales/ro.js.map +1 -1
  163. package/dist/i18n/locales/ru.d.ts +29 -5
  164. package/dist/i18n/locales/ru.d.ts.map +1 -1
  165. package/dist/i18n/locales/ru.js +29 -5
  166. package/dist/i18n/locales/ru.js.map +1 -1
  167. package/dist/i18n/locales/sq.d.ts +29 -5
  168. package/dist/i18n/locales/sq.d.ts.map +1 -1
  169. package/dist/i18n/locales/sq.js +29 -5
  170. package/dist/i18n/locales/sq.js.map +1 -1
  171. package/dist/i18n/locales/sv.d.ts +29 -5
  172. package/dist/i18n/locales/sv.d.ts.map +1 -1
  173. package/dist/i18n/locales/sv.js +29 -5
  174. package/dist/i18n/locales/sv.js.map +1 -1
  175. package/dist/i18n/locales/tr.d.ts +29 -5
  176. package/dist/i18n/locales/tr.d.ts.map +1 -1
  177. package/dist/i18n/locales/tr.js +29 -5
  178. package/dist/i18n/locales/tr.js.map +1 -1
  179. package/dist/i18n/locales/zh.d.ts +29 -5
  180. package/dist/i18n/locales/zh.d.ts.map +1 -1
  181. package/dist/i18n/locales/zh.js +29 -5
  182. package/dist/i18n/locales/zh.js.map +1 -1
  183. package/dist/index.js +958 -940
  184. package/dist/index.js.map +1 -1
  185. package/dist/locales/ar.json +29 -5
  186. package/dist/locales/de.json +29 -5
  187. package/dist/locales/el.json +29 -5
  188. package/dist/locales/en.json +29 -5
  189. package/dist/locales/es.json +29 -5
  190. package/dist/locales/fr.json +29 -5
  191. package/dist/locales/hi.json +29 -5
  192. package/dist/locales/it.json +29 -5
  193. package/dist/locales/ja.json +29 -5
  194. package/dist/locales/nl.json +29 -5
  195. package/dist/locales/pl.json +29 -5
  196. package/dist/locales/pt.json +29 -5
  197. package/dist/locales/ro.json +29 -5
  198. package/dist/locales/ru.json +29 -5
  199. package/dist/locales/sq.json +29 -5
  200. package/dist/locales/sv.json +29 -5
  201. package/dist/locales/tr.json +29 -5
  202. package/dist/locales/zh.json +29 -5
  203. package/dist/patterns/calendar/calendar-appointment-details.d.ts +15 -6
  204. package/dist/patterns/calendar/calendar-appointment-details.d.ts.map +1 -1
  205. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +23 -23
  206. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts.map +1 -1
  207. package/dist/patterns/calendar/calendar-info-hover.d.ts +18 -0
  208. package/dist/patterns/calendar/calendar-info-hover.d.ts.map +1 -0
  209. package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
  210. package/dist/patterns/calendar/calendar.journey.d.ts +10 -0
  211. package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
  212. package/dist/patterns/calendar/calendar.sheets.d.ts +2 -2
  213. package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
  214. package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
  215. package/dist/patterns/calendar/index.js +1 -1
  216. package/dist/tokens.css +1 -1
  217. package/package.json +17 -1
  218. package/dist/_chunks/calendar-workspace-Duv_5B4j.js +0 -9471
  219. package/dist/_chunks/calendar-workspace-Duv_5B4j.js.map +0 -1
  220. package/dist/_chunks/hourglass-BEAzW1wE.js +0 -26
  221. package/dist/_chunks/hourglass-BEAzW1wE.js.map +0 -1
  222. package/dist/_chunks/money.agent-Dw55UxUA.js.map +0 -1
  223. package/dist/_chunks/notes-panel-Co8D3uDd.js +0 -469
  224. package/dist/_chunks/notes-panel-Co8D3uDd.js.map +0 -1
  225. package/dist/_chunks/patient-field-row-BQZoP4m2.js.map +0 -1
  226. package/dist/_chunks/smartphone-C0rFF2if.js +0 -15
  227. package/dist/_chunks/smartphone-C0rFF2if.js.map +0 -1
  228. package/dist/_chunks/task-card-BalrLkSz.js.map +0 -1
  229. package/dist/_chunks/tool-rail-Bq5eiFMG.js.map +0 -1
  230. package/dist/_chunks/workflow-map-D-LEni11.js.map +0 -1
@@ -1,17 +1,19 @@
1
- import { jsxs as x, jsx as f } from "react/jsx-runtime";
2
- import { forwardRef as Le, useRef as g, useState as T, useMemo as k, useId as Ve, useEffect as ie, useCallback as O, useImperativeHandle as je, Fragment as Ke } from "react";
1
+ import { jsxs as T, jsx as f } from "react/jsx-runtime";
2
+ import { forwardRef as Ue, useRef as v, useState as k, useMemo as D, useId as We, useCallback as P, useEffect as ge, useImperativeHandle as $e, Fragment as Ze } from "react";
3
3
  import { c as w } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Me } from "react-i18next";
5
- import { I as oe } from "./icon-button-8xqRnkdG.js";
6
- import { S as Pe } from "./scroll-area-BZOvUhwQ.js";
7
- import { a as Be } from "./tooltip-Cp-PLePW.js";
8
- import { u as qe } from "./use-controllable-state-BiY4xTzM.js";
9
- import { u as Fe } from "./use-edge-resize-ZnGG7gyO.js";
10
- import { u as le } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
11
- import { a as Oe, u as Ue, R as We } from "./use-list-reflow-Cw43nxw5.js";
12
- import { u as He } from "./use-theme-CAuo6EYT.js";
13
- import { u as $e } from "./registry-DvAUVLHh.js";
14
- const Ze = {
4
+ import { useTranslation as Xe } from "react-i18next";
5
+ import { I as be } from "./icon-button-8xqRnkdG.js";
6
+ import { S as Ye } from "./scroll-area-BZOvUhwQ.js";
7
+ import { a as Ge } from "./tooltip-Cp-PLePW.js";
8
+ import { u as Je } from "./use-controllable-state-BiY4xTzM.js";
9
+ import { u as Qe } from "./use-edge-resize-ZnGG7gyO.js";
10
+ import { u as M } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
11
+ import { a as et, u as tt, R as st } from "./use-list-reflow-Cw43nxw5.js";
12
+ import { u as at } from "./use-prefers-reduced-motion-BMwIQRjB.js";
13
+ import { u as nt } from "./use-presence-transition-cDwWUXV-.js";
14
+ import { u as rt } from "./use-theme-CAuo6EYT.js";
15
+ import { u as it } from "./registry-DvAUVLHh.js";
16
+ const ot = {
15
17
  id: "tool-rail",
16
18
  capabilities: ["open", "close", "select_single"],
17
19
  state: {
@@ -83,7 +85,7 @@ const Ze = {
83
85
  description: "Stable tool id emitted on each strip IconButton. The active icon also carries data-active set to its id."
84
86
  }
85
87
  }
86
- }, Xe = "ds:[inline-size:3rem]", Ye = "ds:[inline-size:var(--tool-rail-panel-inline-size,var(--ai-tools-rail-panel-inline-size,22rem))]", de = "--tool-rail-panel-inline-size", Ge = 288, Je = 880, Qe = 352, es = w(
88
+ }, dt = "ds:[inline-size:3rem]", lt = "ds:[inline-size:var(--tool-rail-panel-inline-size,var(--ai-tools-rail-panel-inline-size,22rem))]", he = "--tool-rail-panel-inline-size", ct = 288, ut = 880, ft = 352, pt = w(
87
89
  ["ds:flex ds:shrink-0 ds:h-full", "ds:bg-[var(--background)]"].join(" "),
88
90
  {
89
91
  variants: {
@@ -101,23 +103,46 @@ const Ze = {
101
103
  },
102
104
  defaultVariants: { side: "end" }
103
105
  }
104
- ), ss = w(
106
+ ), vt = w(
105
107
  [
106
108
  "ds:flex ds:shrink-0 ds:flex-col ds:items-center",
107
109
  "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
108
110
  "ds:gap-[var(--spacing-xs)]",
109
- Xe
111
+ dt
110
112
  ].join(" ")
111
- ), ts = w(
113
+ ), mt = w(
112
114
  [
113
115
  "ds:relative ds:flex ds:min-h-0 ds:flex-col ds:h-full",
114
116
  "ds:bg-[var(--background)]",
115
- Ye,
116
- // Defensive: the panel doesn't animate its width today, but if a
117
- // consumer adds a transition on the var, suppress it mid-drag.
117
+ lt,
118
+ // Open / collapse: the panel fades and slides from the strip. The WIDTH
119
+ // snaps on purpose — animating it would re-lay-out the main area (a
120
+ // calendar grid) on every frame. Declared at rest so both directions
121
+ // have a value to move from.
122
+ "ds:transition-[opacity,translate] ds:duration-[var(--animation-duration)]",
123
+ "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none",
124
+ "ds:data-[presence=entering]:opacity-0 ds:data-[presence=leaving]:opacity-0",
125
+ "ds:data-[presence=leaving]:pointer-events-none",
118
126
  "ds:data-[resizing]:transition-none"
127
+ ].join(" "),
128
+ {
129
+ variants: {
130
+ // Slide toward the strip the panel belongs to, mirrored in RTL.
131
+ side: {
132
+ end: "ds:data-[presence=entering]:translate-x-[var(--spacing-md)] ds:data-[presence=leaving]:translate-x-[var(--spacing-md)] ds:rtl:data-[presence=entering]:-translate-x-[var(--spacing-md)] ds:rtl:data-[presence=leaving]:-translate-x-[var(--spacing-md)]",
133
+ start: "ds:data-[presence=entering]:-translate-x-[var(--spacing-md)] ds:data-[presence=leaving]:-translate-x-[var(--spacing-md)] ds:rtl:data-[presence=entering]:translate-x-[var(--spacing-md)] ds:rtl:data-[presence=leaving]:translate-x-[var(--spacing-md)]"
134
+ }
135
+ },
136
+ defaultVariants: { side: "end" }
137
+ }
138
+ ), gt = w(
139
+ [
140
+ "ds:flex ds:min-h-0 ds:flex-1 ds:flex-col",
141
+ "ds:transition-opacity ds:duration-[var(--animation-duration)]",
142
+ "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none",
143
+ "ds:data-[presence=entering]:opacity-0"
119
144
  ].join(" ")
120
- ), as = w(
145
+ ), bt = w(
121
146
  [
122
147
  "ds:absolute ds:[inset-block:0] ds:z-[1] ds:select-none ds:touch-none",
123
148
  "ds:[inline-size:var(--resizable-handle-size)] ds:cursor-col-resize",
@@ -141,7 +166,7 @@ const Ze = {
141
166
  },
142
167
  defaultVariants: { edge: "inline-start" }
143
168
  }
144
- ), rs = w(
169
+ ), ht = w(
145
170
  [
146
171
  "ds:absolute ds:-top-[var(--spacing-xs)] ds:-end-[var(--spacing-xs)]",
147
172
  "ds:inline-flex ds:items-center ds:justify-center",
@@ -154,7 +179,7 @@ const Ze = {
154
179
  "ds:pointer-events-none ds:select-none",
155
180
  "ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText]"
156
181
  ].join(" ")
157
- ), ce = w(
182
+ ), ye = w(
158
183
  // `group/rail-tool` lets an affordance overlay (e.g. a pin star) reveal on
159
184
  // hover / focus-within of the whole slot.
160
185
  ["ds:group/rail-tool ds:relative", "ds:rounded-[var(--radius-sm)]"],
@@ -176,203 +201,247 @@ const Ze = {
176
201
  reorderable: !1
177
202
  }
178
203
  }
179
- ), ns = "ds:opacity-0", ue = [
204
+ ), yt = "ds:opacity-0", we = [
180
205
  "ds:transition-opacity ds:duration-[var(--animation-duration)]",
181
206
  "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
182
207
  ].join(" ");
183
- function is(l, a) {
208
+ function wt(l, a) {
184
209
  return l > 99 ? a : String(l);
185
210
  }
186
- const os = Le(
211
+ const xt = Ue(
187
212
  ({
188
213
  id: l,
189
214
  tools: a,
190
- activeToolId: fe,
191
- defaultActiveToolId: pe = null,
192
- onActiveToolChange: ve,
193
- side: S = "end",
194
- railLabel: ge,
195
- resizablePanel: _ = !1,
196
- onReorder: z,
197
- formatReorderAnnouncement: N,
198
- renderToolAffordance: C,
199
- renderPanelHeader: U,
200
- dataComponent: me = "tool-rail",
201
- agentAdapter: be = Ze,
202
- className: he
203
- }, ye) => {
204
- var ae;
205
- const { t: p } = Me(), [we, v] = qe({
206
- value: fe,
207
- defaultValue: pe,
208
- onChange: ve
209
- }), m = we ?? null, L = g([]), A = g(null), [V, j] = T(0), h = g(!1), K = g(!1), b = k(
210
- () => a.findIndex((e) => e.id === m),
211
- [a, m]
212
- ), d = b >= 0 ? a[b] : null, Ie = k(
215
+ activeToolId: xe,
216
+ defaultActiveToolId: Ie = null,
217
+ onActiveToolChange: Re,
218
+ side: A = "end",
219
+ railLabel: Te,
220
+ resizablePanel: N = !1,
221
+ onReorder: L,
222
+ formatReorderAnnouncement: F,
223
+ renderToolAffordance: K,
224
+ renderPanelHeader: Q,
225
+ dataComponent: ke = "tool-rail",
226
+ agentAdapter: Ae = ot,
227
+ className: Se
228
+ }, Ee) => {
229
+ var pe;
230
+ const { t: m } = Xe(), [_e, g] = Je({
231
+ value: xe,
232
+ defaultValue: Ie,
233
+ onChange: Re
234
+ }), b = _e ?? null, q = v([]), S = v(null), [B, H] = k(0), x = v(!1), O = v(!1), h = D(
235
+ () => a.findIndex((e) => e.id === b),
236
+ [a, b]
237
+ ), d = h >= 0 ? a[h] : null, U = v(d);
238
+ d && (U.current = d);
239
+ const ze = D(
213
240
  () => a.findIndex((e) => !e.disabled),
214
241
  [a]
215
- ), W = k(() => {
216
- var s;
217
- const e = (s = a[0]) == null ? void 0 : s.scope;
218
- return e ? a.findIndex((t) => t.scope && t.scope !== e) : -1;
219
- }, [a]), Re = W > 0, c = k(() => {
242
+ ), ee = D(() => {
220
243
  var t;
244
+ const e = (t = a[0]) == null ? void 0 : t.scope;
245
+ return e ? a.findIndex((s) => s.scope && s.scope !== e) : -1;
246
+ }, [a]), De = ee > 0, c = D(() => {
247
+ var s;
221
248
  const e = a.findIndex((n) => n.reorderable);
222
249
  if (e < 0) return null;
223
- let s = e;
224
- for (; s + 1 < a.length && ((t = a[s + 1]) != null && t.reorderable); ) s += 1;
225
- return { first: e, last: s };
226
- }, [a]), H = !!z && c !== null, xe = Ve(), [I, M] = T(null), [$, E] = T(null), { resolvedTheme: Te } = He(), Z = Te.endsWith("-accessible") || void 0, { containerRef: ke } = Oe({
250
+ let t = e;
251
+ for (; t + 1 < a.length && ((s = a[t + 1]) != null && s.reorderable); ) t += 1;
252
+ return { first: e, last: t };
253
+ }, [a]), te = !!L && c !== null, Ne = We(), [E, W] = k(null), [se, C] = k(null), { resolvedTheme: Le } = rt(), V = Le.endsWith("-accessible") || void 0, { containerRef: Ce } = et({
227
254
  key: a.map((e) => e.id).join(),
228
- reduceMotion: Z
229
- }), P = Ue({ reduceMotion: Z }), [Se, X] = T([]), Y = g(a);
230
- ie(() => {
231
- const e = Y.current, s = new Set(a.map((n) => n.id)), t = e.filter((n) => !s.has(n.id));
232
- if (t.length > 0) {
233
- X((n) => {
255
+ reduceMotion: V
256
+ }), $ = tt({ reduceMotion: V }), Z = nt(
257
+ d !== null,
258
+ { reduceMotion: V }
259
+ ), y = d === null && Z.mounted, p = d ?? (y ? U.current : null), { ref: ae } = Z, Ve = P(
260
+ (e) => {
261
+ S.current = e, ae(e);
262
+ },
263
+ [ae]
264
+ );
265
+ M(() => {
266
+ var s, n;
267
+ const e = S.current;
268
+ if (!e) return;
269
+ const t = document.activeElement;
270
+ if (y && t instanceof HTMLElement && e.contains(t)) {
271
+ const i = (s = U.current) == null ? void 0 : s.id, o = i ? (n = z.current) == null ? void 0 : n.querySelector(
272
+ `[data-tool-id="${CSS.escape(i)}"]`
273
+ ) : null;
274
+ t.blur(), e.setAttribute("inert", ""), o == null || o.focus();
275
+ return;
276
+ }
277
+ e.toggleAttribute("inert", y);
278
+ }, [y]);
279
+ const je = at(), [j, ne] = k(
280
+ (d == null ? void 0 : d.id) ?? null
281
+ ), I = (d == null ? void 0 : d.id) ?? null, X = !V && !je && I !== null && j !== null && j !== I;
282
+ M(() => {
283
+ if (j === I) return;
284
+ if (!X) {
285
+ ne(I);
286
+ return;
287
+ }
288
+ let e = 0;
289
+ const t = () => ne(I), s = requestAnimationFrame(() => {
290
+ e = requestAnimationFrame(t);
291
+ }), n = window.setTimeout(t, 64);
292
+ return () => {
293
+ cancelAnimationFrame(s), cancelAnimationFrame(e), window.clearTimeout(n);
294
+ };
295
+ }, [I, j, X]);
296
+ const [Pe, re] = k([]), ie = v(a);
297
+ ge(() => {
298
+ const e = ie.current, t = new Set(a.map((n) => n.id)), s = e.filter((n) => !t.has(n.id));
299
+ if (s.length > 0) {
300
+ re((n) => {
234
301
  const i = new Set(n.map((o) => o.id));
235
302
  return [
236
303
  ...n,
237
- ...t.filter((o) => !i.has(o.id))
304
+ ...s.filter((o) => !i.has(o.id))
238
305
  ];
239
306
  });
240
- for (const n of t)
241
- P.leave(n.id, () => {
242
- X(
307
+ for (const n of s)
308
+ $.leave(n.id, () => {
309
+ re(
243
310
  (i) => i.filter((o) => o.id !== n.id)
244
311
  );
245
312
  });
246
313
  }
247
- Y.current = a;
248
- }, [a, P]);
249
- const [_e, ze] = T(""), B = g(!1), G = O(
250
- (e, s) => {
251
- if (!z || !c) return;
252
- const t = Math.max(
314
+ ie.current = a;
315
+ }, [a, $]);
316
+ const [Me, Fe] = k(""), Y = v(!1), oe = P(
317
+ (e, t) => {
318
+ if (!L || !c) return;
319
+ const s = Math.max(
253
320
  c.first,
254
- Math.min(c.last, s)
321
+ Math.min(c.last, t)
255
322
  );
256
- if (t === e) return;
257
- z(e, t);
323
+ if (s === e) return;
324
+ L(e, s);
258
325
  const n = a[e];
259
326
  if (n) {
260
- const i = N ? N({ tool: n, from: e, to: t }) : p("toolRail.reorderAnnounce", {
327
+ const i = F ? F({ tool: n, from: e, to: s }) : m("toolRail.reorderAnnounce", {
261
328
  tool: n.label,
262
- to: t - c.first + 1,
329
+ to: s - c.first + 1,
263
330
  total: c.last - c.first + 1,
264
331
  defaultValue: "{{tool}} moved to position {{to}} of {{total}}"
265
332
  });
266
- i && (B.current = !B.current, ze(B.current ? i : `${i}​`));
333
+ i && (Y.current = !Y.current, Fe(Y.current ? i : `${i}​`));
267
334
  }
268
335
  },
269
- [z, c, a, p, N]
270
- ), R = b >= 0 ? b : V >= 0 && !((ae = a[V]) != null && ae.disabled) ? V : Ie, Ae = O(
271
- (e, s) => {
272
- const t = a.find((n) => n.id === e);
273
- !t || t.disabled || (h.current = s, v(m === e ? null : e));
336
+ [L, c, a, m, F]
337
+ ), _ = h >= 0 ? h : B >= 0 && !((pe = a[B]) != null && pe.disabled) ? B : ze, Ke = P(
338
+ (e, t) => {
339
+ const s = a.find((n) => n.id === e);
340
+ !s || s.disabled || (x.current = t, g(b === e ? null : e));
274
341
  },
275
- [a, m, v]
276
- ), Ee = O(
342
+ [a, b, g]
343
+ ), qe = P(
277
344
  (e) => {
278
- var y, r, u;
279
- const s = a.length;
280
- if (s === 0 || e.altKey) return;
281
- let t = null;
282
- if (e.key === "ArrowDown" ? t = (R + 1) % s : e.key === "ArrowUp" ? t = (R - 1 + s) % s : e.key === "Home" ? t = 0 : e.key === "End" && (t = s - 1), t === null) return;
345
+ var R, r, u;
346
+ const t = a.length;
347
+ if (t === 0 || e.altKey) return;
348
+ let s = null;
349
+ if (e.key === "ArrowDown" ? s = (_ + 1) % t : e.key === "ArrowUp" ? s = (_ - 1 + t) % t : e.key === "Home" ? s = 0 : e.key === "End" && (s = t - 1), s === null) return;
283
350
  const n = e.key === "ArrowUp" || e.key === "End";
284
- let i = t, o = 0;
285
- for (; o < s && ((y = a[i]) != null && y.disabled); )
286
- i = n ? (i - 1 + s) % s : (i + 1) % s, o += 1;
287
- (r = a[i]) != null && r.disabled || (e.preventDefault(), j(i), (u = L.current[i]) == null || u.focus());
351
+ let i = s, o = 0;
352
+ for (; o < t && ((R = a[i]) != null && R.disabled); )
353
+ i = n ? (i - 1 + t) % t : (i + 1) % t, o += 1;
354
+ (r = a[i]) != null && r.disabled || (e.preventDefault(), H(i), (u = q.current[i]) == null || u.focus());
288
355
  },
289
- [a, R]
290
- ), D = g(null);
291
- ie(() => {
292
- const e = D.current;
356
+ [a, _]
357
+ ), z = v(null);
358
+ ge(() => {
359
+ const e = z.current;
293
360
  if (!e) return;
294
- const s = (t) => {
295
- if (t.key !== "Escape" || b < 0) return;
296
- t.preventDefault();
297
- const n = b;
298
- v(null), j(n), requestAnimationFrame(() => {
361
+ const t = (s) => {
362
+ if (s.key !== "Escape" || h < 0) return;
363
+ s.preventDefault();
364
+ const n = h;
365
+ g(null), H(n), requestAnimationFrame(() => {
299
366
  var i;
300
- (i = L.current[n]) == null || i.focus();
367
+ (i = q.current[n]) == null || i.focus();
301
368
  });
302
369
  };
303
- return e.addEventListener("keydown", s), () => e.removeEventListener("keydown", s);
304
- }, [b, v]), le(() => {
370
+ return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
371
+ }, [h, g]), M(() => {
305
372
  var e;
306
- d && h.current && ((e = A.current) == null || e.focus()), h.current = !1;
373
+ d && x.current && ((e = S.current) == null || e.focus()), x.current = !1;
307
374
  }, [d]);
308
- const J = S === "end" ? "inline-start" : "inline-end", { separatorProps: Q, isResizing: ee, isResized: se } = Fe({
309
- edge: J,
310
- targetRef: A,
311
- cssProperty: de,
312
- minSize: Ge,
313
- maxSize: Je,
314
- defaultSize: Qe,
315
- disabled: !_
316
- }), te = Q["aria-valuenow"];
317
- le(() => {
375
+ const de = A === "end" ? "inline-start" : "inline-end", { separatorProps: le, isResizing: ce, isResized: ue } = Qe({
376
+ edge: de,
377
+ targetRef: S,
378
+ cssProperty: he,
379
+ minSize: ct,
380
+ maxSize: ut,
381
+ defaultSize: ft,
382
+ disabled: !N
383
+ }), fe = le["aria-valuenow"];
384
+ M(() => {
318
385
  var e;
319
- !_ || !se || !d || (e = A.current) == null || e.style.setProperty(
320
- de,
321
- `${te}px`
386
+ !N || !ue || !d || (e = S.current) == null || e.style.setProperty(
387
+ he,
388
+ `${fe}px`
322
389
  );
323
- }, [d, _, se, te]);
324
- const q = g(m);
325
- q.current = m;
326
- const F = k(
390
+ }, [d, N, ue, fe]);
391
+ const G = v(b);
392
+ G.current = b;
393
+ const J = D(
327
394
  () => ({
328
- getActiveToolId: () => q.current,
395
+ getActiveToolId: () => G.current,
329
396
  setActiveTool: (e) => {
330
- h.current = !1, v(e);
397
+ x.current = !1, g(e);
331
398
  },
332
399
  open: (e) => {
333
- const s = a.find((t) => t.id === e);
334
- !s || s.disabled || (h.current = !1, v(e));
400
+ const t = a.find((s) => s.id === e);
401
+ !t || t.disabled || (x.current = !1, g(e));
335
402
  },
336
403
  close: () => {
337
- const e = q.current;
338
- h.current = !1, v(null), e != null && requestAnimationFrame(() => {
339
- var s, t;
340
- (t = (s = D.current) == null ? void 0 : s.querySelector(
404
+ const e = G.current;
405
+ x.current = !1, g(null), e != null && requestAnimationFrame(() => {
406
+ var t, s;
407
+ (s = (t = z.current) == null ? void 0 : t.querySelector(
341
408
  `[data-tool-id="${CSS.escape(e)}"]`
342
- )) == null || t.focus();
409
+ )) == null || s.focus();
343
410
  });
344
411
  }
345
412
  }),
346
- [a, v]
413
+ [a, g]
347
414
  );
348
- je(ye, () => F, [F]), $e(be, F, l);
349
- const De = p("toolRail.badgeCountOverflow", {
415
+ $e(Ee, () => J, [J]), it(Ae, J, l);
416
+ const Be = m("toolRail.badgeCountOverflow", {
350
417
  defaultValue: "99+"
351
418
  });
352
- return /* @__PURE__ */ x(
419
+ return /* @__PURE__ */ T(
353
420
  "div",
354
421
  {
355
- ref: D,
356
- "data-component": me,
422
+ ref: z,
423
+ "data-component": ke,
357
424
  "data-component-id": l,
358
- "data-side": S,
359
- className: [es({ side: S }), he].filter(Boolean).join(" "),
425
+ "data-side": A,
426
+ className: [pt({ side: A }), Se].filter(Boolean).join(" "),
360
427
  children: [
361
- H ? /* @__PURE__ */ f("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: _e }) : null,
362
- d ? /* @__PURE__ */ x(
428
+ te ? /* @__PURE__ */ f("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: Me }) : null,
429
+ p ? /* @__PURE__ */ T(
363
430
  "aside",
364
431
  {
365
- ref: A,
432
+ ref: Ve,
366
433
  tabIndex: -1,
367
- "aria-label": p("toolRail.panelLabel", {
368
- tool: d.label,
434
+ "aria-label": m("toolRail.panelLabel", {
435
+ tool: p.label,
369
436
  defaultValue: "{{tool}} panel"
370
437
  }),
371
- "data-tool-rail-state": "expanded",
372
- "data-active-tool": d.id,
373
- "data-resizing": ee ? "" : void 0,
438
+ "aria-hidden": y || void 0,
439
+ "data-tool-rail-state": y ? "collapsing" : "expanded",
440
+ "data-presence": Z.phase,
441
+ "data-active-tool": p.id,
442
+ "data-resizing": ce ? "" : void 0,
374
443
  className: [
375
- ts(),
444
+ mt({ side: A }),
376
445
  // Subtle shadow — not a line — separating the panel from the
377
446
  // icon strip (the tab row). The panel casts a soft chrome
378
447
  // shadow toward the strip on its strip-facing edge. `z-[1]`
@@ -384,57 +453,67 @@ const os = Le(
384
453
  // theme the soft shadow becomes a solid 1px border on that same
385
454
  // strip-facing edge.
386
455
  "ds:z-[1]",
387
- S === "end" ? "ds:shadow-[var(--shadow-chrome-end)] ds:[.theme-accessible_&]:border-e ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none" : "ds:shadow-[var(--shadow-chrome-start)] ds:[.theme-accessible_&]:border-s ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none",
456
+ A === "end" ? "ds:shadow-[var(--shadow-chrome-end)] ds:[.theme-accessible_&]:border-e ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none" : "ds:shadow-[var(--shadow-chrome-start)] ds:[.theme-accessible_&]:border-s ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none",
388
457
  "ds:focus-visible:outline-none"
389
458
  ].join(" "),
390
459
  children: [
391
- U ? U(d, { isActive: !0 }) : null,
392
- d.header ? /* @__PURE__ */ f("div", { className: "ds:shrink-0", children: d.header }) : null,
393
- d.fill ? (
394
- // data-tool-fill: a self-scrolling panel owns its own native
395
- // scroll (it can't use the rail's ScrollArea), so a token rule
396
- // paints its scrollbar to match the 8px overlay. See tokens/index.css.
397
- /* @__PURE__ */ f("div", { "data-tool-fill": "", className: "ds:flex-1 ds:min-h-0", children: d.panel })
398
- ) : /* @__PURE__ */ f(
399
- Pe,
460
+ Q ? Q(p, { isActive: !y }) : null,
461
+ /* @__PURE__ */ T(
462
+ "div",
400
463
  {
401
- orientation: "vertical",
402
- className: "ds:flex-1 ds:min-h-0",
403
- children: d.panel
404
- }
464
+ "data-presence": X ? "entering" : "present",
465
+ className: gt(),
466
+ children: [
467
+ p.header ? /* @__PURE__ */ f("div", { className: "ds:shrink-0", children: p.header }) : null,
468
+ p.fill ? (
469
+ // data-tool-fill: a self-scrolling panel owns its own native
470
+ // scroll (it can't use the rail's ScrollArea), so a token rule
471
+ // paints its scrollbar to match the 8px overlay. See tokens/index.css.
472
+ /* @__PURE__ */ f("div", { "data-tool-fill": "", className: "ds:flex-1 ds:min-h-0", children: p.panel })
473
+ ) : /* @__PURE__ */ f(
474
+ Ye,
475
+ {
476
+ orientation: "vertical",
477
+ className: "ds:flex-1 ds:min-h-0",
478
+ children: p.panel
479
+ }
480
+ )
481
+ ]
482
+ },
483
+ p.id
405
484
  ),
406
- _ ? /* @__PURE__ */ f(
485
+ N ? /* @__PURE__ */ f(
407
486
  "div",
408
487
  {
409
- ...Q,
410
- "aria-label": p("toolRail.resizePanel", {
488
+ ...le,
489
+ "aria-label": m("toolRail.resizePanel", {
411
490
  defaultValue: "Resize tool panel"
412
491
  }),
413
- "data-resizing": ee ? "" : void 0,
414
- className: as({ edge: J })
492
+ "data-resizing": ce ? "" : void 0,
493
+ className: bt({ edge: de })
415
494
  }
416
495
  ) : null
417
496
  ]
418
497
  }
419
498
  ) : null,
420
- /* @__PURE__ */ f(Be, { children: /* @__PURE__ */ x(
499
+ /* @__PURE__ */ f(Ge, { children: /* @__PURE__ */ T(
421
500
  "div",
422
501
  {
423
- ref: ke,
502
+ ref: Ce,
424
503
  role: "toolbar",
425
504
  "aria-orientation": "vertical",
426
- "aria-label": ge ?? p("toolRail.railLabel", { defaultValue: "Tools" }),
427
- className: ss(),
428
- onKeyDown: Ee,
505
+ "aria-label": Te ?? m("toolRail.railLabel", { defaultValue: "Tools" }),
506
+ className: vt(),
507
+ onKeyDown: qe,
429
508
  children: [
430
- a.map((e, s) => {
431
- const t = e.id === m, n = typeof e.badgeCount == "number" && e.badgeCount > 0, i = n ? p("toolRail.toolWithCount", {
509
+ a.map((e, t) => {
510
+ const s = e.id === b, n = typeof e.badgeCount == "number" && e.badgeCount > 0, i = n ? m("toolRail.toolWithCount", {
432
511
  tool: e.label,
433
512
  count: e.badgeCount,
434
513
  defaultValue: "{{tool}}, {{count}} updates"
435
- }) : e.label, o = H && !!e.reorderable && !e.disabled, y = o ? `${xe}-${e.id}` : void 0;
436
- return /* @__PURE__ */ x(Ke, { children: [
437
- Re && s === W ? /* @__PURE__ */ f(
514
+ }) : e.label, o = te && !!e.reorderable && !e.disabled, R = o ? `${Ne}-${e.id}` : void 0;
515
+ return /* @__PURE__ */ T(Ze, { children: [
516
+ De && t === ee ? /* @__PURE__ */ f(
438
517
  "div",
439
518
  {
440
519
  role: "separator",
@@ -442,45 +521,45 @@ const os = Le(
442
521
  className: "ds:my-[var(--spacing-2xs)] ds:h-px ds:w-[var(--spacing-lg)] ds:shrink-0 ds:bg-[var(--border)] ds:forced-colors:bg-[CanvasText]"
443
522
  }
444
523
  ) : null,
445
- /* @__PURE__ */ x(
524
+ /* @__PURE__ */ T(
446
525
  "div",
447
526
  {
448
527
  className: [
449
- ce({
450
- dragging: I === s,
451
- dropTarget: $ === s && I !== s,
528
+ ye({
529
+ dragging: E === t,
530
+ dropTarget: se === t && E !== t,
452
531
  reorderable: o
453
532
  }),
454
- ue,
455
- We
533
+ we,
534
+ st
456
535
  ].filter(Boolean).join(" "),
457
536
  "data-reflow-id": e.id,
458
- "data-dragging": I === s ? "" : void 0,
537
+ "data-dragging": E === t ? "" : void 0,
459
538
  draggable: o || void 0,
460
539
  onDragStart: o ? (r) => {
461
- M(s), r.dataTransfer.effectAllowed = "move", r.dataTransfer.setData(
540
+ W(t), r.dataTransfer.effectAllowed = "move", r.dataTransfer.setData(
462
541
  "text/plain",
463
- String(s)
542
+ String(t)
464
543
  );
465
544
  } : void 0,
466
545
  onDragOver: o ? (r) => {
467
- I !== null && (r.preventDefault(), r.dataTransfer.dropEffect = "move", $ !== s && E(s));
546
+ E !== null && (r.preventDefault(), r.dataTransfer.dropEffect = "move", se !== t && C(t));
468
547
  } : void 0,
469
- onDragLeave: o ? () => E((r) => r === s ? null : r) : void 0,
548
+ onDragLeave: o ? () => C((r) => r === t ? null : r) : void 0,
470
549
  onDrop: o ? (r) => {
471
550
  r.preventDefault();
472
- const u = I;
473
- E(null), M(null), !(u === null || u === s) && G(u, s);
551
+ const u = E;
552
+ C(null), W(null), !(u === null || u === t) && oe(u, t);
474
553
  } : void 0,
475
554
  onDragEnd: o ? () => {
476
- M(null), E(null);
555
+ W(null), C(null);
477
556
  } : void 0,
478
557
  children: [
479
558
  /* @__PURE__ */ f(
480
- oe,
559
+ be,
481
560
  {
482
561
  ref: (r) => {
483
- L.current[s] = r;
562
+ q.current[t] = r;
484
563
  },
485
564
  icon: e.icon,
486
565
  tooltip: e.label,
@@ -488,54 +567,54 @@ const os = Le(
488
567
  intent: "ghost",
489
568
  size: "sm",
490
569
  disabled: e.disabled,
491
- "aria-pressed": t,
492
- "aria-expanded": t,
493
- "data-active": t ? e.id : void 0,
570
+ "aria-pressed": s,
571
+ "aria-expanded": s,
572
+ "data-active": s ? e.id : void 0,
494
573
  "data-tool-id": e.id,
495
- "aria-describedby": y,
574
+ "aria-describedby": R,
496
575
  "aria-keyshortcuts": o ? "Alt+ArrowUp Alt+ArrowDown" : void 0,
497
- tabIndex: s === R ? 0 : -1,
576
+ tabIndex: t === _ ? 0 : -1,
498
577
  onFocus: () => {
499
- e.disabled || j(s);
578
+ e.disabled || H(t);
500
579
  },
501
- onClick: () => Ae(e.id, K.current),
580
+ onClick: () => Ke(e.id, O.current),
502
581
  onKeyDown: (r) => {
503
582
  if (r.key === "Enter" || r.key === " ") {
504
- K.current = !0;
583
+ O.current = !0;
505
584
  return;
506
585
  }
507
586
  if (o && r.altKey && c) {
508
587
  let u = null;
509
- if (r.key === "ArrowUp" ? u = s - 1 : r.key === "ArrowDown" ? u = s + 1 : r.key === "Home" ? u = c.first : r.key === "End" && (u = c.last), u !== null) {
588
+ if (r.key === "ArrowUp" ? u = t - 1 : r.key === "ArrowDown" ? u = t + 1 : r.key === "Home" ? u = c.first : r.key === "End" && (u = c.last), u !== null) {
510
589
  r.preventDefault();
511
- const Ne = Math.max(
590
+ const He = Math.max(
512
591
  c.first,
513
592
  Math.min(c.last, u)
514
- ), Ce = e.id;
515
- G(s, Ne), requestAnimationFrame(() => {
516
- var re, ne;
517
- (ne = (re = D.current) == null ? void 0 : re.querySelector(
518
- `[data-tool-id="${CSS.escape(Ce)}"]`
519
- )) == null || ne.focus();
593
+ ), Oe = e.id;
594
+ oe(t, He), requestAnimationFrame(() => {
595
+ var ve, me;
596
+ (me = (ve = z.current) == null ? void 0 : ve.querySelector(
597
+ `[data-tool-id="${CSS.escape(Oe)}"]`
598
+ )) == null || me.focus();
520
599
  });
521
600
  }
522
601
  }
523
602
  },
524
603
  onKeyUp: (r) => {
525
- (r.key === "Enter" || r.key === " ") && (K.current = !1);
604
+ (r.key === "Enter" || r.key === " ") && (O.current = !1);
526
605
  }
527
606
  }
528
607
  ),
529
- n ? /* @__PURE__ */ f("span", { "aria-hidden": "true", className: rs(), children: is(
608
+ n ? /* @__PURE__ */ f("span", { "aria-hidden": "true", className: ht(), children: wt(
530
609
  e.badgeCount,
531
- De
610
+ Be
532
611
  ) }) : null,
533
- C == null ? void 0 : C(e, {
534
- index: s,
535
- isActive: t,
536
- isRovingTarget: s === R
612
+ K == null ? void 0 : K(e, {
613
+ index: t,
614
+ isActive: s,
615
+ isRovingTarget: t === _
537
616
  }),
538
- y ? /* @__PURE__ */ f("span", { id: y, className: "ds:sr-only", children: p("toolRail.reorderInstructions", {
617
+ R ? /* @__PURE__ */ f("span", { id: R, className: "ds:sr-only", children: m("toolRail.reorderInstructions", {
539
618
  tool: e.label,
540
619
  defaultValue: "Reorder {{tool}}. Press Alt + Up or Alt + Down to move."
541
620
  }) }) : null
@@ -544,22 +623,22 @@ const os = Le(
544
623
  )
545
624
  ] }, e.id);
546
625
  }),
547
- Se.map(
548
- (e) => P.isLeaving(e.id) ? /* @__PURE__ */ f(
626
+ Pe.map(
627
+ (e) => $.isLeaving(e.id) ? /* @__PURE__ */ f(
549
628
  "div",
550
629
  {
551
630
  className: [
552
- ce({
631
+ ye({
553
632
  dragging: !1,
554
633
  dropTarget: !1,
555
634
  reorderable: !1
556
635
  }),
557
- ue,
558
- ns
636
+ we,
637
+ yt
559
638
  ].filter(Boolean).join(" "),
560
639
  "aria-hidden": "true",
561
640
  children: /* @__PURE__ */ f(
562
- oe,
641
+ be,
563
642
  {
564
643
  icon: e.icon,
565
644
  intent: "ghost",
@@ -580,9 +659,9 @@ const os = Le(
580
659
  );
581
660
  }
582
661
  );
583
- os.displayName = "ToolRail";
662
+ xt.displayName = "ToolRail";
584
663
  export {
585
- os as T,
586
- Ze as t
664
+ xt as T,
665
+ ot as t
587
666
  };
588
- //# sourceMappingURL=tool-rail-Bq5eiFMG.js.map
667
+ //# sourceMappingURL=tool-rail-BP8sjxCw.js.map