@lostgradient/cinder 0.25.1 → 0.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/CHANGELOG.md +237 -0
  2. package/components.json +13 -6
  3. package/dist/components/alert-dialog/index.js +2 -2
  4. package/dist/components/approval-card/index.js +2 -2
  5. package/dist/components/area-chart/area-chart.css +23 -0
  6. package/dist/components/area-chart/index.js +2 -2
  7. package/dist/components/autocomplete/index.js +2 -2
  8. package/dist/components/avatar-group/index.js +2 -2
  9. package/dist/components/backdrop/index.js +2 -2
  10. package/dist/components/bar-chart/bar-chart.css +23 -0
  11. package/dist/components/bar-chart/index.js +2 -2
  12. package/dist/components/button/button.css +1 -1
  13. package/dist/components/checkbox/index.js +2 -2
  14. package/dist/components/code-block/index.js +2 -2
  15. package/dist/components/color-field/index.js +2 -2
  16. package/dist/components/combobox/index.js +2 -2
  17. package/dist/components/command-menu/index.js +2 -2
  18. package/dist/components/command-palette/command-palette.css +50 -46
  19. package/dist/components/command-palette/index.js +2 -2
  20. package/dist/components/confirm-dialog/index.js +2 -2
  21. package/dist/components/context-menu/index.js +2 -2
  22. package/dist/components/data-table/index.js +2 -2
  23. package/dist/components/date-picker/index.js +2 -2
  24. package/dist/components/date-range-field/index.js +2 -2
  25. package/dist/components/drawer/index.js +2 -2
  26. package/dist/components/dropdown/index.js +2 -2
  27. package/dist/components/dropdown-menu/index.js +2 -2
  28. package/dist/components/find-bar/find-bar.css +9 -1
  29. package/dist/components/focus-trap/index.js +2 -2
  30. package/dist/components/form-field/index.js +2 -2
  31. package/dist/components/guidance-region/index.css +1 -1
  32. package/dist/components/hover-card/index.js +2 -2
  33. package/dist/components/inline-confirm/index.js +2 -2
  34. package/dist/components/input/index.js +2 -2
  35. package/dist/components/input/input.css +95 -6
  36. package/dist/components/invocation-rule-builder/index.js +2 -2
  37. package/dist/components/json-editor/index.js +2 -2
  38. package/dist/components/json-schema-editor/index.js +4 -4
  39. package/dist/components/key-value-editor/index.css +1 -1
  40. package/dist/components/line-chart/index.js +2 -2
  41. package/dist/components/line-chart/line-chart.css +23 -0
  42. package/dist/components/matrix-chart/index.js +2 -2
  43. package/dist/components/mega-menu/mega-menu.css +7 -1
  44. package/dist/components/menu-bar/index.js +3 -3
  45. package/dist/components/modal/index.js +2 -2
  46. package/dist/components/modal-region/index.css +1 -1
  47. package/dist/components/multi-select/index.js +2 -2
  48. package/dist/components/navigation-bar/index.js +2 -2
  49. package/dist/components/parameter-field/index.js +2 -2
  50. package/dist/components/parameter-field/parameter-field.css +7 -1
  51. package/dist/components/permission-matrix/index.js +2 -2
  52. package/dist/components/policy-lock/index.js +2 -2
  53. package/dist/components/popover/index.js +2 -2
  54. package/dist/components/popover/popover.css +86 -0
  55. package/dist/components/radio-group/index.js +2 -2
  56. package/dist/components/resizable-panels/resizable-panels.css +10 -7
  57. package/dist/components/schedule-builder/index.js +2 -2
  58. package/dist/components/schema-form/index.js +2 -2
  59. package/dist/components/scroll-area/index.js +2 -2
  60. package/dist/components/select/index.js +2 -2
  61. package/dist/components/select/select.css +12 -2
  62. package/dist/components/selection-popover/index.js +2 -2
  63. package/dist/components/share-card/index.js +2 -2
  64. package/dist/components/sidebar/index.js +2 -2
  65. package/dist/components/slider/slider.css +7 -1
  66. package/dist/components/sortable-list/sortable-list.css +11 -7
  67. package/dist/components/speed-dial/index.js +2 -2
  68. package/dist/components/statistic-group/index.js +2 -2
  69. package/dist/components/statistic-group/statistic-group.css +116 -66
  70. package/dist/components/table/index.js +2 -2
  71. package/dist/components/textarea/index.js +2 -2
  72. package/dist/components/time-field/index.js +2 -2
  73. package/dist/components/time-field/time-field.css +9 -8
  74. package/dist/components/toast-region/index.js +2 -2
  75. package/dist/components/tooltip/index.js +2 -2
  76. package/dist/components/transfer-list/index.js +2 -2
  77. package/dist/components/virtual-list/_internal/adaptive-overscan.d.ts +87 -0
  78. package/dist/components/virtual-list/_internal/edge-proximity.d.ts +75 -0
  79. package/dist/components/virtual-list/_internal/frame-scheduler.d.ts +76 -0
  80. package/dist/components/virtual-list/_internal/geometry.d.ts +170 -0
  81. package/dist/components/virtual-list/_internal/list-semantics.d.ts +93 -0
  82. package/dist/components/virtual-list/_internal/measurement-window.d.ts +125 -0
  83. package/dist/components/virtual-list/_internal/reverse-order.d.ts +87 -0
  84. package/dist/components/virtual-list/_internal/scroll-restoration.d.ts +98 -0
  85. package/dist/components/virtual-list/_internal/sticky-items.d.ts +48 -0
  86. package/dist/components/virtual-list/_internal/virtual-list-measurement-store.svelte.d.ts +69 -0
  87. package/dist/components/virtual-list/index.d.ts +1 -1
  88. package/dist/components/virtual-list/index.js +2 -2
  89. package/dist/components/virtual-list/virtual-list.css +153 -0
  90. package/dist/components/virtual-list/virtual-list.schema.js +69 -6
  91. package/dist/components/virtual-list/virtual-list.svelte.d.ts +11 -8
  92. package/dist/components/virtual-list/virtual-list.types.d.ts +177 -4
  93. package/dist/index.browser.css +1 -1
  94. package/dist/index.d.ts +1 -1
  95. package/dist/index.js +18 -18
  96. package/dist/server/components/alert-dialog/index.js +1 -1
  97. package/dist/server/components/approval-card/index.js +1 -1
  98. package/dist/server/components/area-chart/index.js +1 -1
  99. package/dist/server/components/autocomplete/index.js +1 -1
  100. package/dist/server/components/avatar-group/index.js +1 -1
  101. package/dist/server/components/backdrop/index.js +1 -1
  102. package/dist/server/components/bar-chart/index.js +1 -1
  103. package/dist/server/components/checkbox/index.js +1 -1
  104. package/dist/server/components/code-block/index.js +1 -1
  105. package/dist/server/components/color-field/index.js +1 -1
  106. package/dist/server/components/combobox/index.js +1 -1
  107. package/dist/server/components/command-menu/index.js +1 -1
  108. package/dist/server/components/command-palette/index.js +2 -2
  109. package/dist/server/components/confirm-dialog/index.js +1 -1
  110. package/dist/server/components/context-menu/index.js +1 -1
  111. package/dist/server/components/data-table/index.js +1 -1
  112. package/dist/server/components/date-picker/index.js +1 -1
  113. package/dist/server/components/date-range-field/index.js +1 -1
  114. package/dist/server/components/drawer/index.js +1 -1
  115. package/dist/server/components/dropdown/index.js +1 -1
  116. package/dist/server/components/dropdown-menu/index.js +2 -2
  117. package/dist/server/components/focus-trap/index.js +1 -1
  118. package/dist/server/components/form-field/index.js +1 -1
  119. package/dist/server/components/hover-card/index.js +1 -1
  120. package/dist/server/components/inline-confirm/index.js +1 -1
  121. package/dist/server/components/input/index.js +1 -1
  122. package/dist/server/components/invocation-rule-builder/index.js +1 -1
  123. package/dist/server/components/json-editor/index.js +1 -1
  124. package/dist/server/components/json-schema-editor/index.js +1 -1
  125. package/dist/server/components/line-chart/index.js +1 -1
  126. package/dist/server/components/matrix-chart/index.js +1 -1
  127. package/dist/server/components/menu-bar/index.js +2 -2
  128. package/dist/server/components/modal/index.js +1 -1
  129. package/dist/server/components/multi-select/index.js +1 -1
  130. package/dist/server/components/navigation-bar/index.js +2 -2
  131. package/dist/server/components/parameter-field/index.js +1 -1
  132. package/dist/server/components/permission-matrix/index.js +1 -1
  133. package/dist/server/components/policy-lock/index.js +1 -1
  134. package/dist/server/components/popover/index.js +1 -1
  135. package/dist/server/components/radio-group/index.js +1 -1
  136. package/dist/server/components/schedule-builder/index.js +1 -1
  137. package/dist/server/components/schema-form/index.js +1 -1
  138. package/dist/server/components/scroll-area/index.js +1 -1
  139. package/dist/server/components/select/index.js +1 -1
  140. package/dist/server/components/selection-popover/index.js +1 -1
  141. package/dist/server/components/share-card/index.js +1 -1
  142. package/dist/server/components/sidebar/index.js +1 -1
  143. package/dist/server/components/speed-dial/index.js +2 -2
  144. package/dist/server/components/statistic-group/index.js +1 -1
  145. package/dist/server/components/table/index.js +1 -1
  146. package/dist/server/components/textarea/index.js +1 -1
  147. package/dist/server/components/time-field/index.js +1 -1
  148. package/dist/server/components/toast-region/index.js +1 -1
  149. package/dist/server/components/tooltip/index.js +1 -1
  150. package/dist/server/components/transfer-list/index.js +1 -1
  151. package/dist/server/components/virtual-list/index.js +2 -2
  152. package/dist/server/index.js +2 -2
  153. package/dist/server/{index.server-skq0f5sr.js → index.server-0jw25w9w.js} +1 -1
  154. package/dist/server/index.server-0kk20wvp.js +4 -0
  155. package/dist/server/{index.server-fzsqdajc.js → index.server-2awq6q9m.js} +1 -1
  156. package/dist/server/{index.server-e4hmhaeh.js → index.server-3xwvw6w2.js} +3 -3
  157. package/dist/server/{index.server-95h7xy01.js → index.server-428dh2t9.js} +2 -2
  158. package/dist/server/{index.server-jd88r74m.js → index.server-5dq66aja.js} +2 -2
  159. package/dist/server/{index.server-dvwfhf77.js → index.server-5s94r0kk.js} +2 -2
  160. package/dist/server/{index.server-qv6z5ta3.js → index.server-80qgcjnm.js} +1 -1
  161. package/dist/server/{index.server-7k2732ky.js → index.server-81abtrsw.js} +1 -1
  162. package/dist/server/{index.server-csmqnx5w.js → index.server-83q1gv2c.js} +1 -1
  163. package/dist/server/{index.server-qw8k9rjg.js → index.server-8fyav10d.js} +1 -1
  164. package/dist/server/{index.server-4dgjj4k1.js → index.server-8h5caecr.js} +2 -2
  165. package/dist/server/{index.server-emyqytmm.js → index.server-90n8sd9e.js} +1 -1
  166. package/dist/server/{index.server-0xrdyzvh.js → index.server-99penx1m.js} +1 -1
  167. package/dist/server/{index.server-p94j3jah.js → index.server-9g9d15z1.js} +1 -1
  168. package/dist/server/{index.server-xp9hkc81.js → index.server-9kbdx511.js} +1 -1
  169. package/dist/server/index.server-a2yhk45s.js +3 -0
  170. package/dist/server/{index.server-g8d2m2tk.js → index.server-acq55gjs.js} +1 -1
  171. package/dist/server/{index.server-ewze54tv.js → index.server-afjftjmr.js} +1 -1
  172. package/dist/server/{index.server-ejyye4gv.js → index.server-bfed6a8a.js} +1 -1
  173. package/dist/server/{index.server-z5ng08q2.js → index.server-c1746s0z.js} +1 -1
  174. package/dist/server/{index.server-gt1tfc1w.js → index.server-dmeztywe.js} +1 -1
  175. package/dist/server/{index.server-kzsppq0n.js → index.server-dyj3jdx9.js} +1 -1
  176. package/dist/server/index.server-dz92zvx6.js +4 -0
  177. package/dist/server/{index.server-3md8kdcr.js → index.server-e6682k08.js} +1 -1
  178. package/dist/server/{index.server-t1pshh65.js → index.server-ewkv461x.js} +1 -1
  179. package/dist/server/{index.server-zfgwhtmp.js → index.server-fa449wd3.js} +1 -1
  180. package/dist/server/{index.server-1kgwayct.js → index.server-fhfypmgw.js} +1 -1
  181. package/dist/server/{index.server-s4z8hsby.js → index.server-ge4adxs2.js} +1 -1
  182. package/dist/server/{index.server-68xyfsg3.js → index.server-gggkq22y.js} +2 -2
  183. package/dist/server/{index.server-acgwdamx.js → index.server-j52rbk57.js} +1 -1
  184. package/dist/server/{index.server-z0nwftx6.js → index.server-jm89hxfb.js} +1 -1
  185. package/dist/server/{index.server-xa98r8p2.js → index.server-jw0v64se.js} +1 -1
  186. package/dist/server/index.server-m321p69g.js +3 -0
  187. package/dist/server/{index.server-xyervw3d.js → index.server-m7q2tc41.js} +1 -1
  188. package/dist/server/{index.server-tnrxy86j.js → index.server-mak7dmj2.js} +1 -1
  189. package/dist/server/{index.server-n5g5h5k1.js → index.server-mw5r2524.js} +1 -1
  190. package/dist/server/{index.server-caf7s6m7.js → index.server-nwq1cg55.js} +1 -1
  191. package/dist/server/{index.server-3wdvs0wr.js → index.server-p423fy4q.js} +2 -2
  192. package/dist/server/{index.server-ks7fvwxt.js → index.server-prk5syj2.js} +1 -1
  193. package/dist/server/{index.server-6w9fp018.js → index.server-q4hytsq3.js} +1 -1
  194. package/dist/server/{index.server-5w2qw8fm.js → index.server-q597a1ck.js} +1 -1
  195. package/dist/server/{index.server-fz1pkvda.js → index.server-qgne9v2w.js} +1 -1
  196. package/dist/server/{index.server-1f2app32.js → index.server-rvdavf92.js} +1 -1
  197. package/dist/server/index.server-rwq20a22.js +3 -0
  198. package/dist/server/{index.server-0rvmnrw2.js → index.server-s9tjs45r.js} +1 -1
  199. package/dist/server/{index.server-cm2prec7.js → index.server-sqgxyfsw.js} +1 -1
  200. package/dist/server/{index.server-v6777tgn.js → index.server-t761nwvb.js} +1 -1
  201. package/dist/server/index.server-tbds8nwq.js +4 -0
  202. package/dist/server/index.server-tyhta5n3.js +3 -0
  203. package/dist/server/{index.server-yw7rah51.js → index.server-v5dxham4.js} +1 -1
  204. package/dist/server/index.server-va98cpyf.js +3 -0
  205. package/dist/server/index.server-vq1k69xt.js +3 -0
  206. package/dist/server/{index.server-egd355s6.js → index.server-wnf9btp7.js} +2 -2
  207. package/dist/server/{index.server-sjcbaztf.js → index.server-y3zgdtbv.js} +1 -1
  208. package/dist/server/{index.server-4tjtgzf9.js → index.server-y6vtbmyj.js} +1 -1
  209. package/dist/server/{index.server-2p2mjzzb.js → index.server-zff2qp1v.js} +1 -1
  210. package/dist/server/tokens/registry.generated.js +2 -2
  211. package/dist/tokens/registry.generated.js +2 -2
  212. package/package.json +2 -2
  213. package/src/_internal/form-field-frame.svelte +5 -0
  214. package/src/_internal/overlay.ts +14 -1
  215. package/src/components/_internal/create-command-list-state.svelte.ts +4 -0
  216. package/src/components/area-chart/area-chart.css +23 -0
  217. package/src/components/bar-chart/bar-chart.css +23 -0
  218. package/src/components/button/button.css +1 -1
  219. package/src/components/command-menu/command-menu.svelte +63 -7
  220. package/src/components/command-palette/command-palette.css +50 -46
  221. package/src/components/command-palette/command-palette.svelte +68 -78
  222. package/src/components/dropdown/dropdown.svelte +73 -18
  223. package/src/components/dropdown-menu/dropdown-menu.svelte +63 -7
  224. package/src/components/find-bar/find-bar.css +9 -1
  225. package/src/components/hover-card/hover-card.examples.json +11 -4
  226. package/src/components/input/input.css +95 -6
  227. package/src/components/input/input.svelte +44 -81
  228. package/src/components/line-chart/line-chart.css +23 -0
  229. package/src/components/mega-menu/mega-menu.css +7 -1
  230. package/src/components/menu-bar/menu-bar.svelte +12 -1
  231. package/src/components/multi-select/multi-select.svelte +7 -0
  232. package/src/components/navigation-bar/navigation-bar.svelte +82 -6
  233. package/src/components/parameter-field/parameter-field.css +7 -1
  234. package/src/components/popover/popover.css +86 -0
  235. package/src/components/resizable-panels/resizable-panels.css +10 -7
  236. package/src/components/select/select.css +12 -2
  237. package/src/components/selection-popover/selection-popover.svelte +24 -10
  238. package/src/components/share-card/share-card.svelte +24 -44
  239. package/src/components/slider/slider.css +7 -1
  240. package/src/components/sortable-list/sortable-list.css +11 -7
  241. package/src/components/speed-dial/speed-dial.svelte +23 -5
  242. package/src/components/statistic-group/statistic-group.css +116 -66
  243. package/src/components/statistic-group/statistic-group.examples.json +6 -0
  244. package/src/components/statistic-group/statistic-group.svelte +13 -1
  245. package/src/components/time-field/time-field.css +9 -8
  246. package/src/components/toast-region/toast-region.svelte +9 -0
  247. package/src/components/virtual-list/_internal/adaptive-overscan.ts +248 -0
  248. package/src/components/virtual-list/_internal/edge-proximity.ts +130 -0
  249. package/src/components/virtual-list/_internal/frame-scheduler.ts +136 -0
  250. package/src/components/virtual-list/_internal/geometry.ts +236 -0
  251. package/src/components/virtual-list/_internal/list-semantics.ts +151 -0
  252. package/src/components/virtual-list/_internal/measurement-window.ts +300 -0
  253. package/src/components/virtual-list/_internal/reverse-order.ts +146 -0
  254. package/src/components/virtual-list/_internal/scroll-restoration.ts +209 -0
  255. package/src/components/virtual-list/_internal/sticky-items.ts +111 -0
  256. package/src/components/virtual-list/_internal/virtual-list-measurement-store.svelte.ts +145 -0
  257. package/src/components/virtual-list/index.ts +7 -1
  258. package/src/components/virtual-list/virtual-list.css +153 -0
  259. package/src/components/virtual-list/virtual-list.examples.json +42 -0
  260. package/src/components/virtual-list/virtual-list.schema.json +53 -3
  261. package/src/components/virtual-list/virtual-list.schema.ts +64 -3
  262. package/src/components/virtual-list/virtual-list.svelte +1527 -36
  263. package/src/components/virtual-list/virtual-list.types.ts +181 -4
  264. package/src/index.ts +3 -0
  265. package/src/styles/tokens-base.css +29 -21
  266. package/src/tokens/cinder.resolver.json +8 -0
  267. package/src/tokens/index.json +1 -1
  268. package/src/tokens/registry.generated.json +29 -3
  269. package/src/tokens/registry.generated.ts +31 -3
  270. package/src/tokens/resolved/dark-reduced-motion.json +46 -16
  271. package/src/tokens/resolved/dark.json +46 -16
  272. package/src/tokens/resolved/light-reduced-motion.json +47 -17
  273. package/src/tokens/resolved/light.json +47 -17
  274. package/src/tokens/sets/semantic.tokens.json +120 -30
  275. package/src/tokens/themes/dark.tokens.json +115 -19
  276. package/src/tokens/themes/light.tokens.json +51 -3
  277. package/dist/server/index.server-191cnacw.js +0 -3
  278. package/dist/server/index.server-25dqx151.js +0 -3
  279. package/dist/server/index.server-77jyqvbv.js +0 -4
  280. package/dist/server/index.server-bgjrzr70.js +0 -3
  281. package/dist/server/index.server-khsp90vh.js +0 -3
  282. package/dist/server/index.server-ryk2pgbe.js +0 -4
  283. package/dist/server/index.server-tajr81bm.js +0 -3
  284. package/dist/server/index.server-vjzcrw3d.js +0 -4
  285. package/dist/server/index.server-zg3fx1n1.js +0 -3
@@ -212,6 +212,13 @@ function clearSelection(event) {
212
212
  triggerElement?.focus();
213
213
  }
214
214
  function handleListNavigationKeydown(event) {
215
+ // Fallback-guard, matching Combobox's pattern (CIN-428): in a real
216
+ // browser the capture-phase escape-stack handler (registered via
217
+ // `commandList.bindDismissal` below) runs first and already
218
+ // preventDefault()s + stopPropagation()s — this bails rather than
219
+ // redundantly re-closing an already-closed menu.
220
+ if (event.key === 'Escape' && event.defaultPrevented)
221
+ return;
215
222
  commandList.handleKeydown({
216
223
  event,
217
224
  onEnter: (itemId) => {
@@ -3,10 +3,11 @@ export {};
3
3
  </script>
4
4
 
5
5
  <script lang="ts">
6
- import { onDestroy } from 'svelte';
6
+ import { flushSync, onDestroy } from 'svelte';
7
7
  import { BROWSER as browser } from 'esm-env';
8
8
  import { createAnchoredOverlay } from '../../_internal/anchored-overlay.svelte.ts';
9
9
  import { createAnchoredOverlayExitState } from '../../_internal/anchored-overlay-exit.svelte.ts';
10
+ import { pushEscapeHandler } from '../../_internal/overlay.ts';
10
11
  import { classNames } from '../../utilities/class-names.ts';
11
12
  import { getSequentialFocusTargets, getTabIndexValue } from '../../utilities/focus.ts';
12
13
  import { useReducedMotion } from '../../utilities/use-reduced-motion.svelte.ts';
@@ -399,6 +400,69 @@ function focusMenuToggle() {
399
400
  const focusTarget = findFocusTargetBeforeNavigationItems(navigationBarElement, toggleElement, false);
400
401
  focusTarget?.focus();
401
402
  }
403
+ // Escape ownership (CIN-428). The escape-stack registration is the single
404
+ // Escape dispatch path, firing whenever the mobile panel is open
405
+ // regardless of focus location — so a dispatch that originates outside the
406
+ // bar's own DOM tree (`pressing Escape outside the navbar still closes the
407
+ // mobile menu`) still closes it, swallowing the key uniformly like every
408
+ // other escape-stack overlay.
409
+ //
410
+ // Escape dispatched *inside* the bar's tree is different: this handler
411
+ // runs at the window capture phase, which is necessarily reached before
412
+ // the event arrives at its actual target — before a nested control (a
413
+ // search field, a disclosure) or the consumer's own composed `<nav
414
+ // onkeydown>` ever sees it. Closing unconditionally here would make it
415
+ // impossible for either to call `preventDefault()` and cancel the close,
416
+ // contradicting the cooperative Escape contract in
417
+ // navigation-bar.a11y.md's "Cooperative Escape semantics" section. So for
418
+ // an in-tree target, stash the event and let it keep propagating — the
419
+ // decision happens in `handleKeyDown` below (the bar's own bubble-phase
420
+ // listener on `<nav>`), which runs *after* the target's own handler and
421
+ // the composed consumer handler, once `event.defaultPrevented` reflects
422
+ // their answer. Identity comparison against `pendingEscapeEvent` makes a
423
+ // stale stash harmless (it's only ever consulted for the exact event that
424
+ // set it).
425
+ let pendingEscapeEvent = null;
426
+ function closeMobilePanel(event) {
427
+ event?.preventDefault();
428
+ // Once the panel actually accepts the dismissal — whether immediately,
429
+ // for a dispatch outside the bar's tree, or after the deferred in-tree
430
+ // decision in `handleKeyDown` below — stop the key from leaking past
431
+ // here to unrelated ancestor keydown handlers (review findings from
432
+ // both Copilot and Codex). This still preserves the cooperative path
433
+ // above: propagation is only cut off once the close is decided, never
434
+ // before a nested control or the composed consumer handler got a look.
435
+ event?.stopPropagation();
436
+ mobileMenuOpen = false;
437
+ focusMenuToggle();
438
+ }
439
+ function dismissMobilePanel(event) {
440
+ const target = event?.target;
441
+ // The open mobile panel is portaled to `document.body` by default (no
442
+ // enclosing top layer to anchor to — see `itemsPortalScope` above), so a
443
+ // target inside it is no longer a DOM descendant of `navigationBarElement`
444
+ // once open. Check `itemsRegionElement` too: portaling re-parents that
445
+ // wrapper but never changes its own descendants, so this still correctly
446
+ // recognizes "inside the bar" regardless of where the wrapper currently
447
+ // sits. The original portaled-target event never reaches `handleKeyDown`
448
+ // directly (it isn't a DOM ancestor anymore), but `bridgePortaledEvents`
449
+ // below re-dispatches a bridged copy at `navigationBarElement` — which
450
+ // re-enters this same handler with a *new* event object, re-stashing
451
+ // `pendingEscapeEvent` to the one `handleKeyDown` will actually see.
452
+ if (event &&
453
+ target instanceof Node &&
454
+ (navigationBarElement?.contains(target) || itemsRegionElement?.contains(target))) {
455
+ pendingEscapeEvent = event;
456
+ return;
457
+ }
458
+ closeMobilePanel(event);
459
+ }
460
+ $effect(() => {
461
+ if (!isCollapsible || !mobilePanelOpen)
462
+ return;
463
+ const releaseEscape = pushEscapeHandler(dismissMobilePanel);
464
+ return releaseEscape;
465
+ });
402
466
  function getFocusTargetBeforeItems(navigationItem = null) {
403
467
  return findFocusTargetBeforeNavigationItems(navigationBarElement, toggleElement, menuTogglePlacement === 'before-brand', navigationItem);
404
468
  }
@@ -527,15 +591,27 @@ function handleKeyDown(event) {
527
591
  if (consumerOnKeyDown) {
528
592
  consumerOnKeyDown(withNavigationCurrentTarget(event));
529
593
  }
594
+ // Resolve an Escape stashed by `dismissMobilePanel` above (CIN-428): by
595
+ // the time this bubble-phase listener on `<nav>` runs, any nested
596
+ // control's own keydown handler (fired at the target phase, before
597
+ // bubbling reaches here) and the consumer handler just above have both
598
+ // had their chance to call `preventDefault()`.
599
+ if (event.key === 'Escape' && pendingEscapeEvent === event) {
600
+ pendingEscapeEvent = null;
601
+ // `handleKeyDown` runs as a plain, un-flushed consequence of the DOM's
602
+ // own bubble-phase dispatch to <nav> (see overlay.ts's `onEscapeKeydown`
603
+ // for the same reasoning) — flush explicitly so a second Escape
604
+ // dispatched immediately afterward observes this close (and this
605
+ // handler's stack release) synchronously, matching the guarantee the
606
+ // shared escape stack gives every other overlay.
607
+ if (!event.defaultPrevented)
608
+ flushSync(() => closeMobilePanel(event));
609
+ return;
610
+ }
530
611
  if (event.defaultPrevented)
531
612
  return;
532
613
  if (bridgeBrandTabToPortaledPanel(event))
533
614
  return;
534
- if (event.key === 'Escape' && isCollapsible && isMobileLayout && mobileMenuOpen) {
535
- mobileMenuOpen = false;
536
- focusMenuToggle();
537
- return;
538
- }
539
615
  const navigationItem = getEventNavigationItem(event);
540
616
  if (event.key === 'Tab' &&
541
617
  event.target instanceof HTMLElement &&
@@ -31,9 +31,15 @@
31
31
  align-items: stretch;
32
32
  }
33
33
 
34
+ /*
35
+ * CIN-603: this rail is a persistent state indicator (it fills the whole
36
+ * body height alongside the editor, not a decorative divider), so it moved
37
+ * from `border.muted` (a 1.4:1 decorative-hairline tier) to
38
+ * `border.control` (the 3:1 functional tier).
39
+ */
34
40
  .cinder-parameter-field__rail {
35
41
  border-radius: var(--cinder-radius-full);
36
- background: var(--cinder-border-muted);
42
+ background: var(--cinder-border);
37
43
  }
38
44
 
39
45
  .cinder-parameter-field[data-cinder-overridden] .cinder-parameter-field__rail {
@@ -82,6 +82,31 @@
82
82
  height: 0;
83
83
  }
84
84
 
85
+ /*
86
+ * CIN-606: `background-clip` defaults to `border-box`, so the PANEL's own
87
+ * `background: var(--cinder-surface-raised)` paints under its translucent
88
+ * `border.control` edge — the panel border always composites over
89
+ * `surface-raised`. The arrow, being a zero-size border-triangle with no
90
+ * background of its own, used to paint its outer (`--cinder-border`)
91
+ * triangle straight onto whatever the popover floats over instead — the
92
+ * same translucent ink composited over a different backdrop than the
93
+ * panel edge, which was invisible while both tokens were opaque and is
94
+ * not now.
95
+ *
96
+ * The fix gives the outer triangle a backdrop rather than changing what
97
+ * the panel does. An element's own background/border always paints
98
+ * before its own `::before`/`::after`, so the three layers are built in
99
+ * that fixed order: this rule (the arrow's OWN border) is now the OPAQUE
100
+ * `surface-raised` backdrop, painted first; `::before` repeats the exact
101
+ * same triangle in the translucent `--cinder-border` ink, composited over
102
+ * that backdrop; `::after` is unchanged, the existing opaque 7px triangle
103
+ * that covers the inner two-thirds and leaves only the outer ~2px rim
104
+ * showing the (now correctly backed) translucent color. The net result:
105
+ * the visible rim composites over `surface-raised` in every placement,
106
+ * matching the panel edge on every backdrop instead of only on
107
+ * `surface-raised` itself.
108
+ */
109
+
85
110
  /* Panel is BELOW trigger - arrow tip points UP.
86
111
  Floating UI's arrow middleware writes `left` directly to center the
87
112
  border-box (offsetWidth=16 because of the 8px L+R borders) on the
@@ -91,6 +116,24 @@
91
116
  /* stylelint-disable csstools/use-logical */
92
117
  border-left: 8px solid transparent;
93
118
  border-right: 8px solid transparent;
119
+ border-bottom: 8px solid var(--cinder-surface-raised);
120
+ /* stylelint-enable csstools/use-logical */
121
+ }
122
+
123
+ .cinder-popover[data-cinder-placement^='bottom'] .cinder-popover__arrow::before {
124
+ content: '';
125
+ position: absolute;
126
+ top: 0;
127
+ /* The containing block for an absolutely positioned pseudo-element of a
128
+ zero-size (width:0/height:0) parent is a POINT at that parent's padding
129
+ edge, not its border-box origin -- and that point is inset from the
130
+ parent's own top-left by the parent's own border widths. This parent's
131
+ border-left is 8px, so `left: 0` here would start 8px right of the
132
+ outer triangle's actual left edge; -8px cancels that inset back to 0. */
133
+ left: -8px;
134
+ /* stylelint-disable csstools/use-logical */
135
+ border-left: 8px solid transparent;
136
+ border-right: 8px solid transparent;
94
137
  border-bottom: 8px solid var(--cinder-border);
95
138
  /* stylelint-enable csstools/use-logical */
96
139
  }
@@ -114,6 +157,20 @@
114
157
  /* stylelint-disable csstools/use-logical */
115
158
  border-left: 8px solid transparent;
116
159
  border-right: 8px solid transparent;
160
+ border-top: 8px solid var(--cinder-surface-raised);
161
+ /* stylelint-enable csstools/use-logical */
162
+ }
163
+
164
+ .cinder-popover[data-cinder-placement^='top'] .cinder-popover__arrow::before {
165
+ content: '';
166
+ position: absolute;
167
+ bottom: 0;
168
+ /* See the bottom-placement `::before` comment above -- the containing
169
+ block's left inset equals this parent's own border-left (8px). */
170
+ left: -8px;
171
+ /* stylelint-disable csstools/use-logical */
172
+ border-left: 8px solid transparent;
173
+ border-right: 8px solid transparent;
117
174
  border-top: 8px solid var(--cinder-border);
118
175
  /* stylelint-enable csstools/use-logical */
119
176
  }
@@ -138,6 +195,22 @@
138
195
  /* stylelint-disable csstools/use-logical */
139
196
  border-top: 8px solid transparent;
140
197
  border-bottom: 8px solid transparent;
198
+ border-right: 8px solid var(--cinder-surface-raised);
199
+ /* stylelint-enable csstools/use-logical */
200
+ }
201
+
202
+ .cinder-popover[data-cinder-placement^='right'] .cinder-popover__arrow::before {
203
+ content: '';
204
+ position: absolute;
205
+ /* Same containing-block inset as the bottom/top `::before` rules above,
206
+ but on the perpendicular axis: this parent's border-top is 8px, so the
207
+ padding-edge point sits 8px below its own border-box top. -8px cancels
208
+ that back to 0. */
209
+ top: -8px;
210
+ left: 0;
211
+ /* stylelint-disable csstools/use-logical */
212
+ border-top: 8px solid transparent;
213
+ border-bottom: 8px solid transparent;
141
214
  border-right: 8px solid var(--cinder-border);
142
215
  /* stylelint-enable csstools/use-logical */
143
216
  }
@@ -161,6 +234,19 @@
161
234
  /* stylelint-disable csstools/use-logical */
162
235
  border-top: 8px solid transparent;
163
236
  border-bottom: 8px solid transparent;
237
+ border-left: 8px solid var(--cinder-surface-raised);
238
+ /* stylelint-enable csstools/use-logical */
239
+ }
240
+
241
+ .cinder-popover[data-cinder-placement^='left'] .cinder-popover__arrow::before {
242
+ content: '';
243
+ position: absolute;
244
+ /* See the right-placement `::before` comment above. */
245
+ top: -8px;
246
+ right: 0;
247
+ /* stylelint-disable csstools/use-logical */
248
+ border-top: 8px solid transparent;
249
+ border-bottom: 8px solid transparent;
164
250
  border-left: 8px solid var(--cinder-border);
165
251
  /* stylelint-enable csstools/use-logical */
166
252
  }
@@ -52,11 +52,20 @@
52
52
  touch-action: none;
53
53
  }
54
54
 
55
+ /*
56
+ * CIN-603: this line is the handle's only visible affordance, so it needs
57
+ * to clear the 3:1 functional floor on its own. It used to sit at
58
+ * `border.strong` (58% alpha) diluted further by `opacity: 0.5` on this
59
+ * rule — a resting effective alpha of ~29%, easy to miss because the tier
60
+ * lives on the PARENT (`.handle`'s `color`) and the opacity on this CHILD.
61
+ * Dropping the opacity leaves the line at `border.strong`'s full,
62
+ * undiluted alpha, which the seam audit's per-tier contrast table already
63
+ * shows clears 3:1 in both arms.
64
+ */
55
65
  .cinder-resizable-panels__handle-line {
56
66
  display: block;
57
67
  border-radius: var(--cinder-radius-full);
58
68
  background: currentColor;
59
- opacity: 0.5;
60
69
  }
61
70
 
62
71
  .cinder-resizable-panels__handle[data-cinder-orientation='horizontal']
@@ -80,12 +89,6 @@
80
89
  transform: translate(-50%, -50%);
81
90
  }
82
91
 
83
- @media (hover: hover) {
84
- .cinder-resizable-panels__handle:hover .cinder-resizable-panels__handle-line {
85
- opacity: 0.9;
86
- }
87
- }
88
-
89
92
  .cinder-resizable-panels__handle:focus-visible {
90
93
  outline: var(--cinder-ring-width) solid transparent;
91
94
  box-shadow: var(--_cinder-focus-ring-shadow);
@@ -93,10 +93,20 @@
93
93
  cursor: not-allowed;
94
94
  }
95
95
 
96
- /* Empty guard — visual indicator when no options are available */
96
+ /*
97
+ * Empty guard — visual indicator when no options are available. Not
98
+ * `disabled` (the field's `disabled` binding stays false here), so the
99
+ * WCAG 1.4.11 3:1 floor still applies: the dashed border is the affordance
100
+ * that carries the "unavailable" meaning, so it must not be diluted.
101
+ * CIN-603: this used to be `opacity: 0.5` on the whole control, which
102
+ * multiplied the base rule's `border.control` boundary down to ~24%
103
+ * effective alpha along with everything else. Dimming the text color
104
+ * instead of the element keeps the dashed border at its tier's full,
105
+ * undiluted alpha.
106
+ */
97
107
  .cinder-select[data-cinder-empty='true'] {
98
108
  border-style: dashed;
99
- opacity: 0.5;
109
+ color: var(--cinder-text-muted);
100
110
  cursor: not-allowed;
101
111
  }
102
112
 
@@ -6,6 +6,7 @@ export {};
6
6
  import { onDestroy, tick } from 'svelte';
7
7
  import { createAnchoredOverlay } from '../../_internal/anchored-overlay.svelte.ts';
8
8
  import { createAnchoredOverlayExitState } from '../../_internal/anchored-overlay-exit.svelte.ts';
9
+ import { pushEscapeHandler } from '../../_internal/overlay.ts';
9
10
  import { createClickOutside } from '../../utilities/attachments.ts';
10
11
  import { classNames } from '../../utilities/class-names.ts';
11
12
  import { useReducedMotion } from '../../utilities/use-reduced-motion.svelte.ts';
@@ -249,17 +250,30 @@ function handleSubmit() {
249
250
  commentBody = '';
250
251
  restoreFocus();
251
252
  }
252
- function handleKeydown(event) {
253
- if (event.key === 'Escape' && !event.defaultPrevented) {
254
- event.preventDefault();
255
- if (expanded) {
256
- handleCancel();
257
- }
258
- else {
259
- closePopover();
260
- }
261
- return;
253
+ // Escape ownership (CIN-428). The shared internal function below holds the
254
+ // dismiss logic — expanded-restore/cancel first stage, else close — and
255
+ // the escape-stack registration further down is the ONLY caller: this is
256
+ // no longer duplicated as a local `onkeydown` branch, so it fires
257
+ // regardless of where focus sits while the popover is open, not just
258
+ // while focus is inside its own DOM tree.
259
+ function dismissEscape(event) {
260
+ // Uniform swallow-at-the-top (CIN-428): both stages consume the key.
261
+ event?.preventDefault();
262
+ event?.stopPropagation();
263
+ if (expanded) {
264
+ handleCancel();
265
+ }
266
+ else {
267
+ closePopover();
262
268
  }
269
+ }
270
+ $effect(() => {
271
+ if (!isPositionedOpen)
272
+ return;
273
+ const releaseEscape = pushEscapeHandler(dismissEscape);
274
+ return releaseEscape;
275
+ });
276
+ function handleKeydown(event) {
263
277
  if ((event.key === 'Enter' || event.key === ' ') && !expanded && !event.defaultPrevented) {
264
278
  event.preventDefault();
265
279
  handleExpand();
@@ -83,6 +83,9 @@ const valueFieldAttachment = (element) => {
83
83
  // the actions render OUTSIDE the field instead, as a normal full-width
84
84
  // sibling row (the pre-existing layout this redesign started from).
85
85
  const hasLabelSnippetAction = $derived(!!actions?.some((action) => !!action.labelSnippet));
86
+ function valueFieldAddon(row) {
87
+ return hasLabelSnippetAction ? {} : { trailing: row, trailingInteractive: true };
88
+ }
86
89
  // Track which action is in the "copied" state by its key.
87
90
  let copiedKey = $state(null);
88
91
  let resetTimer;
@@ -314,52 +317,29 @@ const resolvedActions = $derived(actions ?? defaultActions);
314
317
  is present, `Input`'s trailing slot is too narrow for rich content
315
318
  (`max-inline-size: 40%`), so the actions render OUTSIDE the field as
316
319
  a normal full-width row instead of being clipped inside it. -->
317
- <!-- Two `Input` arms rather than one call site with the addon applied conditionally.
318
- That would be preferable — a review rightly noted that switching arms tears the
319
- value field down, so a parent reactively updating `actions` across the
320
- `labelSnippet` boundary drops the user's focus and selection. Both alternatives
321
- were tried and neither works here:
322
-
323
- A conditional spread (`{...cond ? {} : { trailing, trailingInteractive }}`) does
324
- not typecheck: `InputProps` pairs `leading`/`trailing` in a union that requires
325
- both, and spreading widens `trailing` to optional, which no longer satisfies
326
- either branch under `exactOptionalPropertyTypes`.
327
-
328
- And it would not have fixed the teardown regardless: `Input` wraps its `<input>`
329
- in `.cinder-input-group` only when `trailing` is set (input.svelte's
330
- `{#if hasGroupWrapper}`), so the element is recreated INSIDE `Input` when the
331
- addon appears or disappears, whatever this file does. Preserving it across that
332
- switch is a change to the shared primitive, affecting every consumer, and is
333
- tracked separately. -->
320
+ <!-- One `Input` call site. `Input` keeps its native element when an addon
321
+ appears or disappears (CIN-500), so moving the actions between the trailing
322
+ addon and the sibling row is a prop update on the same instance, and a parent
323
+ reactively changing `actions` across the `labelSnippet` boundary no longer
324
+ drops the user's focus and selection in the value field. The addon is built by
325
+ `valueFieldAddon`, whose return type is already narrowed to the `InputProps`
326
+ leading/trailing union; a conditional spread written inline would widen
327
+ `trailing` to optional first and fail `exactOptionalPropertyTypes`. -->
328
+ <Input
329
+ id={valueFieldId}
330
+ {value}
331
+ readonly
332
+ variant="code"
333
+ class="cinder-share-card__value"
334
+ title={value}
335
+ aria-label={valueRegionLabel}
336
+ inputAttachment={valueFieldAttachment}
337
+ oncopy={handleFieldCopy}
338
+ onfocus={(event) => event.currentTarget.select()}
339
+ {...valueFieldAddon(actionsRow)}
340
+ />
334
341
  {#if hasLabelSnippetAction}
335
- <Input
336
- id={valueFieldId}
337
- {value}
338
- readonly
339
- variant="code"
340
- class="cinder-share-card__value"
341
- title={value}
342
- aria-label={valueRegionLabel}
343
- inputAttachment={valueFieldAttachment}
344
- oncopy={handleFieldCopy}
345
- onfocus={(event) => event.currentTarget.select()}
346
- />
347
342
  {@render actionsRow()}
348
- {:else}
349
- <Input
350
- id={valueFieldId}
351
- {value}
352
- readonly
353
- variant="code"
354
- class="cinder-share-card__value"
355
- title={value}
356
- aria-label={valueRegionLabel}
357
- inputAttachment={valueFieldAttachment}
358
- oncopy={handleFieldCopy}
359
- onfocus={(event) => event.currentTarget.select()}
360
- trailing={actionsRow}
361
- trailingInteractive
362
- />
363
343
  {/if}
364
344
  </div>
365
345
 
@@ -76,6 +76,13 @@
76
76
  pointer-events: none;
77
77
  }
78
78
 
79
+ /*
80
+ * CIN-603: decorative scale marking, but the `opacity: 0.6` compounding
81
+ * `border.control`'s own alpha down to ~29% was redundant now that
82
+ * `border.control` alone clears the tier's own decorative floor — removed
83
+ * rather than left needlessly fainter for no reason tied to this tick's
84
+ * (non-functional) role.
85
+ */
79
86
  .cinder-slider__tick {
80
87
  position: absolute;
81
88
  top: 50%;
@@ -85,7 +92,6 @@
85
92
  background: var(--cinder-border, currentColor);
86
93
  transform: translate(-50%, -50%);
87
94
  border-radius: var(--cinder-radius-full);
88
- opacity: 0.6;
89
95
  }
90
96
 
91
97
  .cinder-slider__thumb {
@@ -45,10 +45,19 @@
45
45
  * the box model. Adding a border where none exists at rest would shift box
46
46
  * dimensions by 2px on each side, causing layout jitter and skewing the
47
47
  * midpoint geometry used by drop-target calculations.
48
+ *
49
+ * CIN-603: this box has no other visible content — its children are
50
+ * `visibility: hidden` and its own background/box-shadow are already
51
+ * suppressed below — so the element's own `opacity` only ever diluted this
52
+ * outline. That made the drop indicator, the one thing this state exists to
53
+ * convey, read at `border.muted` (a 1.4:1 decorative-hairline tier) further
54
+ * cut to ~40% by element opacity: well under half of `border.muted`'s own
55
+ * already-sub-3:1 weight. Moving to `border.control` (the 3:1 functional
56
+ * tier) and dropping the element opacity — nothing else in this box needs
57
+ * it — puts the indicator at its tier's full, undiluted alpha instead.
48
58
  */
49
59
  .cinder-sortable-item--placeholder {
50
- opacity: 0.4;
51
- outline: 2px dashed var(--cinder-border-muted);
60
+ outline: 2px dashed var(--cinder-border);
52
61
  outline-offset: -1px;
53
62
  border-radius: var(--cinder-radius-md);
54
63
  box-shadow: none;
@@ -79,11 +88,6 @@
79
88
  transform: none;
80
89
  box-shadow: var(--cinder-shadow-lg);
81
90
  }
82
-
83
- :root:not([data-cinder-reduced-motion='false']):not([data-reduced-motion='off'])
84
- .cinder-sortable-item--placeholder {
85
- opacity: 0.6;
86
- }
87
91
  }
88
92
 
89
93
  .cinder-sortable-handle {
@@ -5,6 +5,7 @@ export {};
5
5
  <script lang="ts">
6
6
  import { untrack } from 'svelte';
7
7
  import { createAnchoredOverlay } from '../../_internal/anchored-overlay.svelte.ts';
8
+ import { pushEscapeHandler } from '../../_internal/overlay.ts';
8
9
  import { classNames } from '../../utilities/class-names.ts';
9
10
  import { handleRovingKeydown } from '../../utilities/roving-tabindex.ts';
10
11
  import { useReducedMotion } from '../../utilities/use-reduced-motion.svelte.ts';
@@ -209,12 +210,29 @@ function handleTriggerKeydown(event) {
209
210
  open = true;
210
211
  queueMicrotask(() => getEnabledActionButtons()[0]?.focus());
211
212
  }
212
- function handleActionsKeydown(event) {
213
- if (event.key === 'Escape') {
214
- event.preventDefault();
215
- close({ focusTrigger: true });
213
+ // Escape ownership (CIN-428). The local Escape branch (previously here,
214
+ // only reachable while focus was inside the portalled actions panel) is
215
+ // deleted — the escape-stack registration below is the single Escape
216
+ // dispatch path, firing whenever the speed dial is open regardless of
217
+ // focus location.
218
+ function dismissSpeedDial(event) {
219
+ event?.preventDefault();
220
+ event?.stopPropagation();
221
+ close({ focusTrigger: true });
222
+ }
223
+ $effect(() => {
224
+ // A consumer can set `hidden` on an already-open dial (or supply
225
+ // `open={true}` together with `hidden={true}`): the control and its
226
+ // actions go `aria-hidden`/`inert` but `open` itself doesn't flip. Gate
227
+ // on `!hidden` too, consistent with the other `hidden`-gated effects
228
+ // above, so this invisible dial doesn't sit on top of the escape stack
229
+ // and swallow Escape meant for whatever overlay is actually visible.
230
+ if (!open || hidden)
216
231
  return;
217
- }
232
+ const releaseEscape = pushEscapeHandler(dismissSpeedDial);
233
+ return releaseEscape;
234
+ });
235
+ function handleActionsKeydown(event) {
218
236
  const target = event.target instanceof HTMLButtonElement ? event.target : null;
219
237
  if (!target)
220
238
  return;