@eifi1/ui-kit 0.53.0 → 0.55.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 (902) hide show
  1. package/README.md +96 -82
  2. package/dist/account/delete-account-setting.d.ts +3 -2
  3. package/dist/account/delete-account-setting.js.map +1 -1
  4. package/dist/admin/plan-change.js +2 -2
  5. package/dist/admin/plan-change.js.map +1 -1
  6. package/dist/admin/user-roster.d.ts +6 -0
  7. package/dist/admin/user-roster.js +4 -0
  8. package/dist/admin/user-roster.js.map +1 -1
  9. package/dist/auth/auth-errors.d.ts +36 -0
  10. package/dist/auth/auth-errors.js +20 -0
  11. package/dist/auth/auth-errors.js.map +1 -1
  12. package/dist/billing/billing-labels.d.ts +26 -0
  13. package/dist/billing/billing-labels.js +9 -0
  14. package/dist/billing/billing-labels.js.map +1 -1
  15. package/dist/billing/subscription-standing.d.ts +61 -0
  16. package/dist/billing/subscription-standing.js +51 -0
  17. package/dist/billing/subscription-standing.js.map +1 -0
  18. package/dist/billing/usage-meter.d.ts +52 -0
  19. package/dist/billing/usage-meter.js +52 -0
  20. package/dist/billing/usage-meter.js.map +1 -0
  21. package/dist/chart.d.ts +1 -0
  22. package/dist/chart.js +4 -0
  23. package/dist/chart.js.map +1 -1
  24. package/dist/components/alert-banner.js +2 -3
  25. package/dist/components/alert-banner.js.map +1 -1
  26. package/dist/components/amount-input.d.ts +2 -1
  27. package/dist/components/amount-input.js +3 -15
  28. package/dist/components/amount-input.js.map +1 -1
  29. package/dist/components/autocomplete.js +2 -2
  30. package/dist/components/autocomplete.js.map +1 -1
  31. package/dist/components/bulk-action-bar.js +2 -1
  32. package/dist/components/bulk-action-bar.js.map +1 -1
  33. package/dist/components/button.d.ts +35 -1
  34. package/dist/components/button.js +5 -9
  35. package/dist/components/button.js.map +1 -1
  36. package/dist/components/calendar-heatmap.js +6 -4
  37. package/dist/components/calendar-heatmap.js.map +1 -1
  38. package/dist/components/camera-button.d.ts +89 -0
  39. package/dist/components/camera-button.js +122 -0
  40. package/dist/components/camera-button.js.map +1 -0
  41. package/dist/components/camera-capture.d.ts +66 -0
  42. package/dist/components/camera-capture.js +190 -0
  43. package/dist/components/camera-capture.js.map +1 -0
  44. package/dist/components/camera-labels.d.ts +20 -0
  45. package/dist/components/camera-labels.js +15 -0
  46. package/dist/components/camera-labels.js.map +1 -0
  47. package/dist/components/chart-edge.d.ts +9 -0
  48. package/dist/components/chart-edge.js +14 -3
  49. package/dist/components/chart-edge.js.map +1 -1
  50. package/dist/components/chart-zoom-core.js +34 -29
  51. package/dist/components/chart-zoom-core.js.map +1 -1
  52. package/dist/components/checkbox-group.js +1 -1
  53. package/dist/components/checkbox-group.js.map +1 -1
  54. package/dist/components/combobox-core.js +3 -2
  55. package/dist/components/combobox-core.js.map +1 -1
  56. package/dist/components/combobox.js +2 -2
  57. package/dist/components/combobox.js.map +1 -1
  58. package/dist/components/consent-again-notice-labels.d.ts +25 -0
  59. package/dist/components/consent-again-notice-labels.js +15 -0
  60. package/dist/components/consent-again-notice-labels.js.map +1 -0
  61. package/dist/components/consent-again-notice.d.ts +85 -0
  62. package/dist/components/consent-again-notice.js +94 -0
  63. package/dist/components/consent-again-notice.js.map +1 -0
  64. package/dist/components/country-select.js +2 -7
  65. package/dist/components/country-select.js.map +1 -1
  66. package/dist/components/currency-option-list.d.ts +2 -1
  67. package/dist/components/currency-option-list.js +10 -3
  68. package/dist/components/currency-option-list.js.map +1 -1
  69. package/dist/components/currency-select.d.ts +3 -1
  70. package/dist/components/currency-select.js +2 -2
  71. package/dist/components/currency-select.js.map +1 -1
  72. package/dist/components/danger-confirm.d.ts +22 -1
  73. package/dist/components/danger-confirm.js +52 -30
  74. package/dist/components/danger-confirm.js.map +1 -1
  75. package/dist/components/data-table-column-settings.js +2 -2
  76. package/dist/components/data-table-column-settings.js.map +1 -1
  77. package/dist/components/data-table-filter-popover.d.ts +2 -1
  78. package/dist/components/data-table-filter-popover.js +3 -2
  79. package/dist/components/data-table-filter-popover.js.map +1 -1
  80. package/dist/components/data-table-filters.d.ts +33 -3
  81. package/dist/components/data-table-filters.js +6 -4
  82. package/dist/components/data-table-filters.js.map +1 -1
  83. package/dist/components/data-table-fit.js.map +1 -1
  84. package/dist/components/data-table-virtual.js +13 -3
  85. package/dist/components/data-table-virtual.js.map +1 -1
  86. package/dist/components/date-field.js +2 -2
  87. package/dist/components/date-field.js.map +1 -1
  88. package/dist/components/date-picker.js +2 -2
  89. package/dist/components/date-picker.js.map +1 -1
  90. package/dist/components/date-range-picker.js +2 -6
  91. package/dist/components/date-range-picker.js.map +1 -1
  92. package/dist/components/dialog-frame.d.ts +5 -1
  93. package/dist/components/dialog-frame.js +6 -2
  94. package/dist/components/dialog-frame.js.map +1 -1
  95. package/dist/components/dropdown.js +7 -3
  96. package/dist/components/dropdown.js.map +1 -1
  97. package/dist/components/entity-combobox.js +2 -2
  98. package/dist/components/entity-combobox.js.map +1 -1
  99. package/dist/components/field-parts.d.ts +108 -6
  100. package/dist/components/field-parts.js +59 -6
  101. package/dist/components/field-parts.js.map +1 -1
  102. package/dist/components/field-suggestion-labels.d.ts +2 -0
  103. package/dist/components/field-suggestion-labels.js +10 -0
  104. package/dist/components/field-suggestion-labels.js.map +1 -0
  105. package/dist/components/field.js +1 -1
  106. package/dist/components/field.js.map +1 -1
  107. package/dist/components/file-button.d.ts +1 -1
  108. package/dist/components/file-button.js.map +1 -1
  109. package/dist/components/floating-panel.d.ts +7 -6
  110. package/dist/components/floating-panel.js +3 -17
  111. package/dist/components/floating-panel.js.map +1 -1
  112. package/dist/components/form-actions.d.ts +3 -2
  113. package/dist/components/form-actions.js.map +1 -1
  114. package/dist/components/hover-menu.js +3 -2
  115. package/dist/components/hover-menu.js.map +1 -1
  116. package/dist/components/icon-button.d.ts +23 -5
  117. package/dist/components/icon-button.js +6 -8
  118. package/dist/components/icon-button.js.map +1 -1
  119. package/dist/components/inline-confirm.js +2 -1
  120. package/dist/components/inline-confirm.js.map +1 -1
  121. package/dist/components/inline-entity-combobox.js +2 -2
  122. package/dist/components/inline-entity-combobox.js.map +1 -1
  123. package/dist/components/input.js +2 -2
  124. package/dist/components/input.js.map +1 -1
  125. package/dist/components/jump-calendar.js +3 -3
  126. package/dist/components/jump-calendar.js.map +1 -1
  127. package/dist/components/legal.d.ts +13 -1
  128. package/dist/components/legal.js +12 -0
  129. package/dist/components/legal.js.map +1 -1
  130. package/dist/components/legended-series-chart.d.ts +80 -0
  131. package/dist/components/legended-series-chart.js +70 -0
  132. package/dist/components/legended-series-chart.js.map +1 -0
  133. package/dist/components/lightbox.js +2 -1
  134. package/dist/components/lightbox.js.map +1 -1
  135. package/dist/components/mini-calendar.js +16 -7
  136. package/dist/components/mini-calendar.js.map +1 -1
  137. package/dist/components/modal.d.ts +48 -0
  138. package/dist/components/modal.js +26 -6
  139. package/dist/components/modal.js.map +1 -1
  140. package/dist/components/month-picker.d.ts +1 -1
  141. package/dist/components/month-picker.js +6 -6
  142. package/dist/components/month-picker.js.map +1 -1
  143. package/dist/components/multi-entity-combobox.js +2 -2
  144. package/dist/components/multi-entity-combobox.js.map +1 -1
  145. package/dist/components/multi-select.js +2 -6
  146. package/dist/components/multi-select.js.map +1 -1
  147. package/dist/components/number-input.js +2 -2
  148. package/dist/components/number-input.js.map +1 -1
  149. package/dist/components/page-header-layout.d.ts +18 -0
  150. package/dist/components/page-header-layout.js +23 -0
  151. package/dist/components/page-header-layout.js.map +1 -0
  152. package/dist/components/page-header-skeleton.d.ts +41 -0
  153. package/dist/components/page-header-skeleton.js +52 -0
  154. package/dist/components/page-header-skeleton.js.map +1 -0
  155. package/dist/components/page-header.js +4 -17
  156. package/dist/components/page-header.js.map +1 -1
  157. package/dist/components/popover.js +7 -2
  158. package/dist/components/popover.js.map +1 -1
  159. package/dist/components/release-notes-labels.d.ts +16 -0
  160. package/dist/components/release-notes-labels.js +18 -0
  161. package/dist/components/release-notes-labels.js.map +1 -0
  162. package/dist/components/release-notes.d.ts +65 -0
  163. package/dist/components/release-notes.js +65 -0
  164. package/dist/components/release-notes.js.map +1 -0
  165. package/dist/components/select.js +2 -2
  166. package/dist/components/select.js.map +1 -1
  167. package/dist/components/series-chart-labels.d.ts +9 -0
  168. package/dist/components/series-chart-labels.js +3 -1
  169. package/dist/components/series-chart-labels.js.map +1 -1
  170. package/dist/components/series-chart.d.ts +5 -0
  171. package/dist/components/series-chart.js +89 -36
  172. package/dist/components/series-chart.js.map +1 -1
  173. package/dist/components/stat-tile.d.ts +21 -2
  174. package/dist/components/stat-tile.js +4 -2
  175. package/dist/components/stat-tile.js.map +1 -1
  176. package/dist/components/toggle-group.js +3 -2
  177. package/dist/components/toggle-group.js.map +1 -1
  178. package/dist/components/treemap-layout.js.map +1 -1
  179. package/dist/components/treemap.d.ts +17 -15
  180. package/dist/components/treemap.js +167 -85
  181. package/dist/components/treemap.js.map +1 -1
  182. package/dist/currencies.d.ts +16 -2
  183. package/dist/currencies.js +2 -1
  184. package/dist/currencies.js.map +1 -1
  185. package/dist/eslint/index.js +1 -1
  186. package/dist/eslint/role-utilities.d.ts +2 -2
  187. package/dist/eslint/role-utilities.js.map +1 -1
  188. package/dist/feedback/feedback-context-labels.js +2 -1
  189. package/dist/feedback/feedback-context-labels.js.map +1 -1
  190. package/dist/feedback/feedback-context.d.ts +19 -3
  191. package/dist/feedback/feedback-context.js +12 -1
  192. package/dist/feedback/feedback-context.js.map +1 -1
  193. package/dist/feedback/feedback-diagnostics.d.ts +17 -0
  194. package/dist/feedback/feedback-diagnostics.js +27 -0
  195. package/dist/feedback/feedback-diagnostics.js.map +1 -0
  196. package/dist/feedback/feedback-dialog.d.ts +10 -0
  197. package/dist/feedback/feedback-dialog.js +6 -4
  198. package/dist/feedback/feedback-dialog.js.map +1 -1
  199. package/dist/feedback/feedback-inbox-page.d.ts +260 -0
  200. package/dist/feedback/feedback-inbox-page.js +207 -0
  201. package/dist/feedback/feedback-inbox-page.js.map +1 -0
  202. package/dist/feedback/feedback-record.d.ts +5 -0
  203. package/dist/feedback/feedback-record.js.map +1 -1
  204. package/dist/feedback/feedback-row-detail-labels.js +1 -0
  205. package/dist/feedback/feedback-row-detail-labels.js.map +1 -1
  206. package/dist/feedback/feedback-row-detail.d.ts +3 -0
  207. package/dist/feedback/feedback-row-detail.js +3 -0
  208. package/dist/feedback/feedback-row-detail.js.map +1 -1
  209. package/dist/feedback/feedback-submit-dialog.d.ts +5 -1
  210. package/dist/feedback/feedback-submit-dialog.js +15 -3
  211. package/dist/feedback/feedback-submit-dialog.js.map +1 -1
  212. package/dist/feedback/feedback-submit.d.ts +30 -2
  213. package/dist/feedback/feedback-submit.js +5 -2
  214. package/dist/feedback/feedback-submit.js.map +1 -1
  215. package/dist/feedback/feedback-vocabulary.js +2 -2
  216. package/dist/feedback/feedback-vocabulary.js.map +1 -1
  217. package/dist/feedback.d.ts +1 -0
  218. package/dist/feedback.js +6 -0
  219. package/dist/feedback.js.map +1 -1
  220. package/dist/hooks/use-debounce.d.ts +32 -5
  221. package/dist/hooks/use-debounce.js +6 -5
  222. package/dist/hooks/use-debounce.js.map +1 -1
  223. package/dist/hooks/use-file-picker.d.ts +3 -1
  224. package/dist/hooks/use-file-picker.js.map +1 -1
  225. package/dist/hooks/use-focus-trap.d.ts +19 -3
  226. package/dist/hooks/use-focus-trap.js +15 -5
  227. package/dist/hooks/use-focus-trap.js.map +1 -1
  228. package/dist/hooks/use-has-camera.d.ts +36 -0
  229. package/dist/hooks/use-has-camera.js +53 -0
  230. package/dist/hooks/use-has-camera.js.map +1 -0
  231. package/dist/hooks/use-hotkey.js +2 -1
  232. package/dist/hooks/use-hotkey.js.map +1 -1
  233. package/dist/hooks/use-overlay-history.d.ts +6 -1
  234. package/dist/hooks/use-overlay-history.js +10 -2
  235. package/dist/hooks/use-overlay-history.js.map +1 -1
  236. package/dist/i18n/defaults.js +11 -1
  237. package/dist/i18n/defaults.js.map +1 -1
  238. package/dist/i18n/german.js +78 -4
  239. package/dist/i18n/german.js.map +1 -1
  240. package/dist/i18n/kit-labels.d.ts +20 -0
  241. package/dist/i18n/kit-labels.js.map +1 -1
  242. package/dist/i18n/locales/en.js +95 -5
  243. package/dist/i18n/locales/en.js.map +3 -3
  244. package/dist/i18n/locales/es.js +74 -4
  245. package/dist/i18n/locales/es.js.map +1 -1
  246. package/dist/i18n/locales/fr.js +75 -3
  247. package/dist/i18n/locales/fr.js.map +1 -1
  248. package/dist/i18n/locales/hu.js +77 -4
  249. package/dist/i18n/locales/hu.js.map +1 -1
  250. package/dist/i18n/locales/it.js +77 -4
  251. package/dist/i18n/locales/it.js.map +1 -1
  252. package/dist/i18n/locales/zh.js +74 -4
  253. package/dist/i18n/locales/zh.js.map +1 -1
  254. package/dist/i18n/review.js +22 -1
  255. package/dist/i18n/review.js.map +1 -1
  256. package/dist/index.d.ts +27 -8
  257. package/dist/index.js +41 -2
  258. package/dist/index.js.map +1 -1
  259. package/dist/landing/landing-labels.d.ts +8 -0
  260. package/dist/landing/landing-labels.js +2 -1
  261. package/dist/landing/landing-labels.js.map +1 -1
  262. package/dist/lib/changelog.d.ts +130 -0
  263. package/dist/lib/changelog.js +137 -0
  264. package/dist/lib/changelog.js.map +1 -0
  265. package/dist/lib/clipboard-minus.js +2 -2
  266. package/dist/lib/clipboard-minus.js.map +1 -1
  267. package/dist/lib/dates.d.ts +36 -4
  268. package/dist/lib/dates.js +49 -13
  269. package/dist/lib/dates.js.map +1 -1
  270. package/dist/lib/editable-content.d.ts +33 -0
  271. package/dist/lib/editable-content.js +15 -0
  272. package/dist/lib/editable-content.js.map +1 -0
  273. package/dist/lib/focus-left.d.ts +47 -1
  274. package/dist/lib/focus-left.js +11 -2
  275. package/dist/lib/focus-left.js.map +1 -1
  276. package/dist/lib/format.d.ts +37 -2
  277. package/dist/lib/format.js +25 -1
  278. package/dist/lib/format.js.map +1 -1
  279. package/dist/lib/intl-cache.d.ts +4 -2
  280. package/dist/lib/intl-cache.js.map +1 -1
  281. package/dist/lib/server-wake.d.ts +49 -9
  282. package/dist/lib/server-wake.js +25 -14
  283. package/dist/lib/server-wake.js.map +1 -1
  284. package/dist/lib/session-refresh.d.ts +53 -0
  285. package/dist/lib/session-refresh.js +27 -1
  286. package/dist/lib/session-refresh.js.map +1 -1
  287. package/dist/lib/translation-review.d.ts +26 -0
  288. package/dist/lib/translation-review.js +14 -0
  289. package/dist/lib/translation-review.js.map +1 -1
  290. package/dist/rhf/fields.js +3 -3
  291. package/dist/rhf/fields.js.map +1 -1
  292. package/dist/shell/app-shell.d.ts +25 -1
  293. package/dist/shell/app-shell.js +3 -1
  294. package/dist/shell/app-shell.js.map +1 -1
  295. package/dist/shell/dev-menu.d.ts +3 -0
  296. package/dist/shell/dev-menu.js +4 -2
  297. package/dist/shell/dev-menu.js.map +1 -1
  298. package/dist/shell/held-changes-banner-labels.d.ts +23 -0
  299. package/dist/shell/held-changes-banner-labels.js +14 -0
  300. package/dist/shell/held-changes-banner-labels.js.map +1 -0
  301. package/dist/shell/held-changes-banner.d.ts +75 -0
  302. package/dist/shell/held-changes-banner.js +106 -0
  303. package/dist/shell/held-changes-banner.js.map +1 -0
  304. package/dist/shell/sync-status-indicator.d.ts +27 -12
  305. package/dist/shell/sync-status-indicator.js +13 -4
  306. package/dist/shell/sync-status-indicator.js.map +1 -1
  307. package/dist/shell/top-bar-parts-labels.d.ts +5 -0
  308. package/dist/shell/top-bar-parts-labels.js +3 -1
  309. package/dist/shell/top-bar-parts-labels.js.map +1 -1
  310. package/dist/shell.d.ts +2 -0
  311. package/dist/shell.js +3 -0
  312. package/dist/shell.js.map +1 -1
  313. package/dist/sync/engine.d.ts +11 -2
  314. package/dist/sync/engine.js +13 -5
  315. package/dist/sync/engine.js.map +1 -1
  316. package/dist/sync/hooks.d.ts +3 -2
  317. package/dist/sync/hooks.js +4 -2
  318. package/dist/sync/hooks.js.map +1 -1
  319. package/dist/testing/css-variables.generated.d.ts +2 -2
  320. package/dist/testing/css-variables.generated.js +1 -1
  321. package/dist/testing/css-variables.generated.js.map +1 -1
  322. package/dist/theme/chart-palette.d.ts +18 -0
  323. package/dist/theme/chart-palette.js +17 -1
  324. package/dist/theme/chart-palette.js.map +1 -1
  325. package/dist/theme/contrast-tokens.d.ts +3 -3
  326. package/dist/theme/contrast-tokens.js.map +1 -1
  327. package/dist/theme/contrast.d.ts +4 -4
  328. package/dist/theme/contrast.js.map +1 -1
  329. package/dist/tour/tour-overlay.js +2 -1
  330. package/dist/tour/tour-overlay.js.map +1 -1
  331. package/package.json +5 -9
  332. package/tokens.css +19 -54
  333. package/src/account/account-parts.ts +0 -47
  334. package/src/account/account-settings-labels.ts +0 -240
  335. package/src/account/account-settings.tsx +0 -698
  336. package/src/account/data-export-setting-labels.ts +0 -20
  337. package/src/account/data-export-setting.tsx +0 -200
  338. package/src/account/delete-account-setting-labels.ts +0 -33
  339. package/src/account/delete-account-setting.tsx +0 -341
  340. package/src/account/email-change-setting-labels.ts +0 -31
  341. package/src/account/email-change-setting.tsx +0 -443
  342. package/src/account/passkeys-setting.tsx +0 -445
  343. package/src/account/sessions-setting-labels.ts +0 -24
  344. package/src/account/sessions-setting.tsx +0 -283
  345. package/src/admin/admin-action-confirm-labels.ts +0 -19
  346. package/src/admin/admin-action-confirm.tsx +0 -509
  347. package/src/admin/admin-action-log-labels.ts +0 -83
  348. package/src/admin/admin-action-log.tsx +0 -464
  349. package/src/admin/admin-area-labels.ts +0 -114
  350. package/src/admin/admin-forbidden.tsx +0 -75
  351. package/src/admin/admin-overview.tsx +0 -258
  352. package/src/admin/admin-parts.ts +0 -68
  353. package/src/admin/admin-sections.tsx +0 -208
  354. package/src/admin/admin-tool-links.tsx +0 -90
  355. package/src/admin/invitations-panel-labels.ts +0 -31
  356. package/src/admin/invitations-panel.tsx +0 -516
  357. package/src/admin/mail-test-card-labels.ts +0 -19
  358. package/src/admin/mail-test-card.tsx +0 -189
  359. package/src/admin/plan-change-labels.ts +0 -5
  360. package/src/admin/plan-change.tsx +0 -474
  361. package/src/admin/reviewer-scope-editor-labels.ts +0 -16
  362. package/src/admin/reviewer-scope-editor.tsx +0 -224
  363. package/src/admin/role-select-labels.ts +0 -16
  364. package/src/admin/role-select.tsx +0 -282
  365. package/src/admin/transfer-ownership-dialog-labels.ts +0 -20
  366. package/src/admin/transfer-ownership-dialog.tsx +0 -162
  367. package/src/admin/user-roster-labels.ts +0 -17
  368. package/src/admin/user-roster.tsx +0 -559
  369. package/src/auth/accept-invitation-labels.ts +0 -21
  370. package/src/auth/accept-invitation.tsx +0 -210
  371. package/src/auth/auth-errors-labels.ts +0 -23
  372. package/src/auth/auth-errors.ts +0 -370
  373. package/src/auth/complete-name-dialog-labels.ts +0 -16
  374. package/src/auth/complete-name-dialog.tsx +0 -253
  375. package/src/auth/email-tag.ts +0 -75
  376. package/src/auth/forgot-password-form-labels.ts +0 -20
  377. package/src/auth/forgot-password-form.tsx +0 -221
  378. package/src/auth/form-rules.ts +0 -40
  379. package/src/auth/new-password-fields.tsx +0 -85
  380. package/src/auth/not-found-page-labels.ts +0 -12
  381. package/src/auth/not-found-page.tsx +0 -95
  382. package/src/auth/register-form-labels.ts +0 -31
  383. package/src/auth/register-form.tsx +0 -456
  384. package/src/auth/reset-password-form-labels.ts +0 -27
  385. package/src/auth/reset-password-form.tsx +0 -341
  386. package/src/auth/sign-in-form-labels.ts +0 -44
  387. package/src/auth/sign-in-form.tsx +0 -858
  388. package/src/auth/status-parts.tsx +0 -132
  389. package/src/auth/verify-email-labels.ts +0 -26
  390. package/src/auth/verify-email.tsx +0 -445
  391. package/src/billing/billing-banner.tsx +0 -258
  392. package/src/billing/billing-labels.ts +0 -381
  393. package/src/billing/billing-lock.ts +0 -108
  394. package/src/billing/billing-overview.ts +0 -157
  395. package/src/billing/billing-standing.ts +0 -80
  396. package/src/billing/cancel-request.ts +0 -97
  397. package/src/billing/cancel-subscription.tsx +0 -98
  398. package/src/billing/checkout-processing.ts +0 -394
  399. package/src/billing/checkout-return.ts +0 -90
  400. package/src/billing/pay-page.ts +0 -330
  401. package/src/billing/plan-card.tsx +0 -562
  402. package/src/billing/plan-change-labels.ts +0 -66
  403. package/src/billing/plan-limit-notice.tsx +0 -148
  404. package/src/billing/plan-limit-toast.tsx +0 -90
  405. package/src/billing/plan-limit.ts +0 -52
  406. package/src/billing/plan-price.ts +0 -98
  407. package/src/billing/plan-switch.tsx +0 -216
  408. package/src/billing/provider-page.ts +0 -84
  409. package/src/billing/subscription-actions.tsx +0 -247
  410. package/src/billing/subscription-status-chip.tsx +0 -95
  411. package/src/chart.ts +0 -103
  412. package/src/components/account-chips-labels.ts +0 -16
  413. package/src/components/account-chips.tsx +0 -474
  414. package/src/components/alert-banner.tsx +0 -670
  415. package/src/components/amount-input.tsx +0 -815
  416. package/src/components/appearance-labels.ts +0 -63
  417. package/src/components/authed-image-labels.ts +0 -11
  418. package/src/components/authed-image.tsx +0 -209
  419. package/src/components/autocomplete.tsx +0 -645
  420. package/src/components/breadcrumbs-labels.ts +0 -10
  421. package/src/components/breadcrumbs.tsx +0 -205
  422. package/src/components/bulk-action-bar-labels.ts +0 -11
  423. package/src/components/bulk-action-bar.tsx +0 -443
  424. package/src/components/button-group.tsx +0 -223
  425. package/src/components/button-look.ts +0 -256
  426. package/src/components/button.tsx +0 -339
  427. package/src/components/calculator.tsx +0 -341
  428. package/src/components/calendar-heatmap-labels.ts +0 -15
  429. package/src/components/calendar-heatmap.tsx +0 -594
  430. package/src/components/card.tsx +0 -377
  431. package/src/components/chart-edge.ts +0 -106
  432. package/src/components/chart-figure.tsx +0 -35
  433. package/src/components/chart-height.ts +0 -30
  434. package/src/components/chart-zoom-core.tsx +0 -627
  435. package/src/components/chart-zoom.tsx +0 -22
  436. package/src/components/chart.tsx +0 -554
  437. package/src/components/checkbox-group.tsx +0 -247
  438. package/src/components/checkbox.tsx +0 -346
  439. package/src/components/chip-input.tsx +0 -370
  440. package/src/components/chip-labels.ts +0 -13
  441. package/src/components/chip.tsx +0 -843
  442. package/src/components/choice-card.tsx +0 -544
  443. package/src/components/column-mapper-labels.ts +0 -38
  444. package/src/components/column-mapper.tsx +0 -655
  445. package/src/components/combobox-core.tsx +0 -1321
  446. package/src/components/combobox-suggestions.tsx +0 -131
  447. package/src/components/combobox.tsx +0 -716
  448. package/src/components/confirm-context.ts +0 -7
  449. package/src/components/confirm-dialog-labels.ts +0 -13
  450. package/src/components/confirm-dialog.tsx +0 -341
  451. package/src/components/copy-button-labels.ts +0 -13
  452. package/src/components/copy-button.tsx +0 -192
  453. package/src/components/country-select-labels.ts +0 -11
  454. package/src/components/country-select.tsx +0 -539
  455. package/src/components/currency-option-list.tsx +0 -180
  456. package/src/components/currency-select.tsx +0 -341
  457. package/src/components/danger-confirm-labels.ts +0 -20
  458. package/src/components/danger-confirm.tsx +0 -934
  459. package/src/components/data-table-cells.tsx +0 -118
  460. package/src/components/data-table-column-settings.tsx +0 -198
  461. package/src/components/data-table-filter-popover.tsx +0 -281
  462. package/src/components/data-table-filters.ts +0 -287
  463. package/src/components/data-table-fit.ts +0 -301
  464. package/src/components/data-table-groups.tsx +0 -288
  465. package/src/components/data-table-head.tsx +0 -280
  466. package/src/components/data-table-labels.ts +0 -198
  467. package/src/components/data-table-leading-row.tsx +0 -58
  468. package/src/components/data-table-mobile.tsx +0 -1117
  469. package/src/components/data-table-pagination.tsx +0 -202
  470. package/src/components/data-table-resize.ts +0 -188
  471. package/src/components/data-table-row-actions.tsx +0 -302
  472. package/src/components/data-table-row.tsx +0 -496
  473. package/src/components/data-table-selection.ts +0 -71
  474. package/src/components/data-table-shared.tsx +0 -287
  475. package/src/components/data-table-sort.ts +0 -163
  476. package/src/components/data-table-virtual.ts +0 -576
  477. package/src/components/data-table.tsx +0 -2598
  478. package/src/components/date-field.tsx +0 -684
  479. package/src/components/date-format-setting.tsx +0 -64
  480. package/src/components/date-picker.tsx +0 -404
  481. package/src/components/date-range-picker.tsx +0 -518
  482. package/src/components/description-list-labels.ts +0 -9
  483. package/src/components/description-list.tsx +0 -386
  484. package/src/components/dialog-frame-labels.ts +0 -7
  485. package/src/components/dialog-frame.tsx +0 -276
  486. package/src/components/disclosure.tsx +0 -476
  487. package/src/components/dropdown.tsx +0 -461
  488. package/src/components/empty-state.tsx +0 -136
  489. package/src/components/entity-combobox.tsx +0 -422
  490. package/src/components/error-boundary-labels.ts +0 -20
  491. package/src/components/error-boundary.tsx +0 -675
  492. package/src/components/facing-pair.ts +0 -93
  493. package/src/components/field-base-labels.ts +0 -20
  494. package/src/components/field-base.tsx +0 -656
  495. package/src/components/field-parts.tsx +0 -825
  496. package/src/components/field-strip.tsx +0 -129
  497. package/src/components/field.tsx +0 -206
  498. package/src/components/file-button.tsx +0 -295
  499. package/src/components/file-dropzone.tsx +0 -559
  500. package/src/components/floating-panel-labels.ts +0 -10
  501. package/src/components/floating-panel.tsx +0 -828
  502. package/src/components/focus-ring.ts +0 -16
  503. package/src/components/form-actions-labels.ts +0 -11
  504. package/src/components/form-actions.tsx +0 -578
  505. package/src/components/full-bleed-dialog.tsx +0 -294
  506. package/src/components/grouped-picker.tsx +0 -184
  507. package/src/components/help-popover.tsx +0 -117
  508. package/src/components/hover-menu.tsx +0 -343
  509. package/src/components/iban-input-labels.ts +0 -14
  510. package/src/components/iban-input.tsx +0 -236
  511. package/src/components/icon-button.tsx +0 -959
  512. package/src/components/icon-picker-labels.ts +0 -13
  513. package/src/components/icon-picker.tsx +0 -232
  514. package/src/components/image-grid-labels.ts +0 -11
  515. package/src/components/image-grid.tsx +0 -202
  516. package/src/components/inline-confirm.tsx +0 -116
  517. package/src/components/inline-edit-field-labels.ts +0 -11
  518. package/src/components/inline-edit-field.tsx +0 -552
  519. package/src/components/inline-entity-combobox.tsx +0 -849
  520. package/src/components/input.tsx +0 -394
  521. package/src/components/jump-calendar.tsx +0 -265
  522. package/src/components/language-select.tsx +0 -93
  523. package/src/components/legal-labels.ts +0 -105
  524. package/src/components/legal-page.tsx +0 -711
  525. package/src/components/legal.tsx +0 -668
  526. package/src/components/lightbox-labels.ts +0 -18
  527. package/src/components/lightbox.tsx +0 -399
  528. package/src/components/line-items-labels.ts +0 -14
  529. package/src/components/line-items.tsx +0 -602
  530. package/src/components/list-labels.ts +0 -12
  531. package/src/components/list.tsx +0 -870
  532. package/src/components/loading-state.tsx +0 -78
  533. package/src/components/measured-grid-labels.ts +0 -25
  534. package/src/components/measured-grid.tsx +0 -837
  535. package/src/components/menu-item.tsx +0 -241
  536. package/src/components/mini-calendar-labels.ts +0 -17
  537. package/src/components/mini-calendar.tsx +0 -789
  538. package/src/components/modal.tsx +0 -505
  539. package/src/components/money-draft.ts +0 -83
  540. package/src/components/money-field.tsx +0 -76
  541. package/src/components/month-grid.tsx +0 -229
  542. package/src/components/month-picker-labels.ts +0 -22
  543. package/src/components/month-picker.tsx +0 -1087
  544. package/src/components/multi-entity-combobox.tsx +0 -369
  545. package/src/components/multi-select.tsx +0 -376
  546. package/src/components/nav-pills.tsx +0 -198
  547. package/src/components/number-field.tsx +0 -327
  548. package/src/components/number-input.tsx +0 -558
  549. package/src/components/numeric-field.ts +0 -169
  550. package/src/components/numpad-sheet.tsx +0 -285
  551. package/src/components/one-time-code-input.tsx +0 -270
  552. package/src/components/page-contents-labels.ts +0 -9
  553. package/src/components/page-contents.tsx +0 -282
  554. package/src/components/page-header-context.ts +0 -8
  555. package/src/components/page-header.tsx +0 -298
  556. package/src/components/password-strength-labels.ts +0 -22
  557. package/src/components/password-strength.tsx +0 -241
  558. package/src/components/phone-input-labels.ts +0 -10
  559. package/src/components/phone-input.tsx +0 -282
  560. package/src/components/picker-sheet.tsx +0 -330
  561. package/src/components/pie-chart-labels.ts +0 -40
  562. package/src/components/pie-chart.tsx +0 -480
  563. package/src/components/popover-labels.ts +0 -14
  564. package/src/components/popover.tsx +0 -268
  565. package/src/components/progress-bar-labels.ts +0 -10
  566. package/src/components/progress-bar.tsx +0 -479
  567. package/src/components/qr-code.tsx +0 -76
  568. package/src/components/reauth-dialog-labels.ts +0 -13
  569. package/src/components/reauth-dialog.tsx +0 -265
  570. package/src/components/row-actions-labels.ts +0 -12
  571. package/src/components/row-actions.tsx +0 -795
  572. package/src/components/scroll-area.tsx +0 -123
  573. package/src/components/search-field.tsx +0 -192
  574. package/src/components/select.tsx +0 -294
  575. package/src/components/separator.tsx +0 -33
  576. package/src/components/series-chart-axes.ts +0 -342
  577. package/src/components/series-chart-budget.ts +0 -150
  578. package/src/components/series-chart-labels.ts +0 -33
  579. package/src/components/series-chart-thin.ts +0 -180
  580. package/src/components/series-chart-ticks.ts +0 -194
  581. package/src/components/series-chart.tsx +0 -1906
  582. package/src/components/server-wake-labels.ts +0 -11
  583. package/src/components/server-wake.tsx +0 -129
  584. package/src/components/settings-fields.tsx +0 -237
  585. package/src/components/share-card-labels.ts +0 -30
  586. package/src/components/share-card.tsx +0 -675
  587. package/src/components/signature-pad-labels.ts +0 -24
  588. package/src/components/signature-pad.tsx +0 -747
  589. package/src/components/signed-amount-labels.ts +0 -10
  590. package/src/components/signed-amount.tsx +0 -336
  591. package/src/components/skeleton.tsx +0 -80
  592. package/src/components/slider.tsx +0 -338
  593. package/src/components/sparkline-labels.ts +0 -14
  594. package/src/components/sparkline.tsx +0 -322
  595. package/src/components/spinner.tsx +0 -81
  596. package/src/components/stat-tile-labels.ts +0 -15
  597. package/src/components/stat-tile.tsx +0 -725
  598. package/src/components/status-dot.tsx +0 -170
  599. package/src/components/swatch-picker-labels.ts +0 -10
  600. package/src/components/swatch-picker.tsx +0 -283
  601. package/src/components/swipeable-row.tsx +0 -386
  602. package/src/components/switch.tsx +0 -273
  603. package/src/components/table-skeleton.tsx +0 -136
  604. package/src/components/table.tsx +0 -647
  605. package/src/components/tabs-labels.ts +0 -13
  606. package/src/components/tabs.tsx +0 -693
  607. package/src/components/text-link.tsx +0 -359
  608. package/src/components/text.tsx +0 -150
  609. package/src/components/textarea.tsx +0 -330
  610. package/src/components/tile-radio.tsx +0 -332
  611. package/src/components/time-input.tsx +0 -121
  612. package/src/components/toast-labels.ts +0 -12
  613. package/src/components/toast.tsx +0 -519
  614. package/src/components/toggle-group.tsx +0 -752
  615. package/src/components/toggle-legend.tsx +0 -394
  616. package/src/components/tooltip.tsx +0 -1149
  617. package/src/components/translation-review-editor.tsx +0 -290
  618. package/src/components/translation-review-labels.ts +0 -181
  619. package/src/components/translation-review-parts.tsx +0 -272
  620. package/src/components/translation-review.tsx +0 -1240
  621. package/src/components/tree-view.tsx +0 -589
  622. package/src/components/treemap-labels.ts +0 -47
  623. package/src/components/treemap-layout.ts +0 -210
  624. package/src/components/treemap.tsx +0 -1184
  625. package/src/components/trigger-aria.ts +0 -44
  626. package/src/components/use-anchor-dir.ts +0 -20
  627. package/src/components/use-mobile-reveal.ts +0 -62
  628. package/src/components/use-table-state.ts +0 -753
  629. package/src/components/user-avatar.tsx +0 -116
  630. package/src/components/wizard-stepper.tsx +0 -42
  631. package/src/components/write-lock-labels.ts +0 -10
  632. package/src/components/write-lock.tsx +0 -253
  633. package/src/currencies.ts +0 -70
  634. package/src/data-table.ts +0 -42
  635. package/src/demo/demo-banner.tsx +0 -153
  636. package/src/demo/demo-countdown.ts +0 -136
  637. package/src/demo/demo-ended.tsx +0 -90
  638. package/src/demo/demo-labels.ts +0 -78
  639. package/src/demo/demo-session.ts +0 -32
  640. package/src/demo/demo-start.tsx +0 -156
  641. package/src/eslint/index.ts +0 -161
  642. package/src/eslint/role-utilities.generated.ts +0 -146
  643. package/src/eslint/role-utilities.ts +0 -233
  644. package/src/feedback/feedback-attachment-download.tsx +0 -77
  645. package/src/feedback/feedback-attachment-labels.ts +0 -37
  646. package/src/feedback/feedback-attachment.tsx +0 -1239
  647. package/src/feedback/feedback-capture.ts +0 -287
  648. package/src/feedback/feedback-comment-thread.tsx +0 -353
  649. package/src/feedback/feedback-context-labels.ts +0 -10
  650. package/src/feedback/feedback-context.tsx +0 -213
  651. package/src/feedback/feedback-crash.ts +0 -547
  652. package/src/feedback/feedback-dialog-labels.ts +0 -29
  653. package/src/feedback/feedback-dialog.tsx +0 -440
  654. package/src/feedback/feedback-entry-file.tsx +0 -150
  655. package/src/feedback/feedback-inbox.tsx +0 -552
  656. package/src/feedback/feedback-labels.ts +0 -144
  657. package/src/feedback/feedback-menu-labels.ts +0 -12
  658. package/src/feedback/feedback-menu.tsx +0 -177
  659. package/src/feedback/feedback-mutation.ts +0 -20
  660. package/src/feedback/feedback-page-link.ts +0 -90
  661. package/src/feedback/feedback-public-labels.ts +0 -81
  662. package/src/feedback/feedback-public-list.tsx +0 -524
  663. package/src/feedback/feedback-public-switch.tsx +0 -102
  664. package/src/feedback/feedback-public-types.ts +0 -101
  665. package/src/feedback/feedback-record.ts +0 -423
  666. package/src/feedback/feedback-replies-context.ts +0 -9
  667. package/src/feedback/feedback-replies.tsx +0 -343
  668. package/src/feedback/feedback-rework-entry-chip.tsx +0 -18
  669. package/src/feedback/feedback-row-detail-labels.ts +0 -30
  670. package/src/feedback/feedback-row-detail.tsx +0 -858
  671. package/src/feedback/feedback-status-undo.ts +0 -109
  672. package/src/feedback/feedback-submit-dialog.tsx +0 -118
  673. package/src/feedback/feedback-submit.tsx +0 -237
  674. package/src/feedback/feedback-swipe.tsx +0 -192
  675. package/src/feedback/feedback-table-labels.ts +0 -27
  676. package/src/feedback/feedback-table.tsx +0 -912
  677. package/src/feedback/feedback-thread-labels.ts +0 -22
  678. package/src/feedback/feedback-thread-parts-labels.ts +0 -41
  679. package/src/feedback/feedback-thread.tsx +0 -905
  680. package/src/feedback/feedback-vocabulary.ts +0 -263
  681. package/src/feedback/feedback-vote-button.tsx +0 -124
  682. package/src/feedback.ts +0 -116
  683. package/src/hooks/use-anchored-panel.ts +0 -396
  684. package/src/hooks/use-anchored-rect.ts +0 -77
  685. package/src/hooks/use-announce.ts +0 -85
  686. package/src/hooks/use-authed-src.ts +0 -167
  687. package/src/hooks/use-body-scroll-lock.ts +0 -119
  688. package/src/hooks/use-breakpoint.ts +0 -133
  689. package/src/hooks/use-close-transition.ts +0 -107
  690. package/src/hooks/use-copy-to-clipboard.ts +0 -122
  691. package/src/hooks/use-debounce.ts +0 -114
  692. package/src/hooks/use-dismiss.ts +0 -371
  693. package/src/hooks/use-document-title.ts +0 -33
  694. package/src/hooks/use-file-drop.ts +0 -121
  695. package/src/hooks/use-file-picker-labels.ts +0 -28
  696. package/src/hooks/use-file-picker.tsx +0 -359
  697. package/src/hooks/use-focus-trap.ts +0 -199
  698. package/src/hooks/use-hotkey.ts +0 -189
  699. package/src/hooks/use-large-text.ts +0 -41
  700. package/src/hooks/use-long-press.ts +0 -140
  701. package/src/hooks/use-media-query.ts +0 -39
  702. package/src/hooks/use-mounted.ts +0 -39
  703. package/src/hooks/use-noindex.ts +0 -37
  704. package/src/hooks/use-overlay-history.ts +0 -714
  705. package/src/hooks/use-row-swipe.ts +0 -207
  706. package/src/hooks/use-search-param-state.ts +0 -434
  707. package/src/hooks/use-windowed-rows.ts +0 -225
  708. package/src/i18n/defaults.ts +0 -267
  709. package/src/i18n/german.ts +0 -2057
  710. package/src/i18n/kit-labels.tsx +0 -1003
  711. package/src/i18n/languages.ts +0 -349
  712. package/src/i18n/locales/de-CH.ts +0 -24
  713. package/src/i18n/locales/en.ts +0 -267
  714. package/src/i18n/locales/es.ts +0 -1997
  715. package/src/i18n/locales/fr.ts +0 -2035
  716. package/src/i18n/locales/hu.ts +0 -2002
  717. package/src/i18n/locales/it.ts +0 -2012
  718. package/src/i18n/locales/zh.ts +0 -1910
  719. package/src/i18n/plurals.ts +0 -86
  720. package/src/i18n/review.ts +0 -475
  721. package/src/i18n/shared-labels.ts +0 -138
  722. package/src/i18n/swiss.ts +0 -29
  723. package/src/index.ts +0 -1179
  724. package/src/landing/access.ts +0 -93
  725. package/src/landing/landing-actions.tsx +0 -97
  726. package/src/landing/landing-labels.ts +0 -59
  727. package/src/landing/landing-sections.tsx +0 -341
  728. package/src/landing/page-seo.ts +0 -261
  729. package/src/landing/public-header.tsx +0 -121
  730. package/src/landing/public-page.tsx +0 -106
  731. package/src/landing/routing.tsx +0 -225
  732. package/src/lib/broadcast.ts +0 -52
  733. package/src/lib/calc.ts +0 -323
  734. package/src/lib/chip-edge-snap.ts +0 -212
  735. package/src/lib/clipboard-minus.ts +0 -107
  736. package/src/lib/clipping.ts +0 -34
  737. package/src/lib/cn.ts +0 -28
  738. package/src/lib/column-mapping.ts +0 -234
  739. package/src/lib/countries.ts +0 -91
  740. package/src/lib/data-attributes.ts +0 -14
  741. package/src/lib/date-format.ts +0 -227
  742. package/src/lib/dates.ts +0 -266
  743. package/src/lib/day-format.ts +0 -96
  744. package/src/lib/decimal-marks.ts +0 -108
  745. package/src/lib/describe-failure.ts +0 -18
  746. package/src/lib/device-settings.ts +0 -147
  747. package/src/lib/direction.ts +0 -74
  748. package/src/lib/document-navigation.ts +0 -17
  749. package/src/lib/document-title.ts +0 -41
  750. package/src/lib/download.ts +0 -172
  751. package/src/lib/float-clearance.ts +0 -70
  752. package/src/lib/floating-stack.ts +0 -70
  753. package/src/lib/focus-left.ts +0 -156
  754. package/src/lib/format.ts +0 -522
  755. package/src/lib/http-status.ts +0 -38
  756. package/src/lib/iban.ts +0 -251
  757. package/src/lib/ime.ts +0 -24
  758. package/src/lib/intl-cache.ts +0 -25
  759. package/src/lib/iso-day.ts +0 -13
  760. package/src/lib/lazy-with-fallback.ts +0 -82
  761. package/src/lib/logger.ts +0 -69
  762. package/src/lib/minus.ts +0 -50
  763. package/src/lib/path-pattern.ts +0 -55
  764. package/src/lib/person-name.ts +0 -155
  765. package/src/lib/phone.ts +0 -208
  766. package/src/lib/plain-text.ts +0 -22
  767. package/src/lib/presence.ts +0 -18
  768. package/src/lib/qr-encode.ts +0 -444
  769. package/src/lib/quiet-focus.ts +0 -32
  770. package/src/lib/reduced-motion.ts +0 -22
  771. package/src/lib/refs.ts +0 -22
  772. package/src/lib/round.ts +0 -43
  773. package/src/lib/safe-storage.ts +0 -119
  774. package/src/lib/server-wake.ts +0 -315
  775. package/src/lib/session-refresh.ts +0 -472
  776. package/src/lib/share-format.ts +0 -18
  777. package/src/lib/status-tone.ts +0 -43
  778. package/src/lib/strip-fade.ts +0 -287
  779. package/src/lib/table-text.ts +0 -554
  780. package/src/lib/text-case.ts +0 -19
  781. package/src/lib/text-match.ts +0 -169
  782. package/src/lib/thenable.ts +0 -19
  783. package/src/lib/translation-review.ts +0 -717
  784. package/src/notifications/device-zone-report.ts +0 -67
  785. package/src/notifications/feedback-notification-types-labels.ts +0 -33
  786. package/src/notifications/feedback-notification-types.ts +0 -71
  787. package/src/notifications/notification-bell.tsx +0 -119
  788. package/src/notifications/notification-inbox.tsx +0 -309
  789. package/src/notifications/notification-parts.tsx +0 -81
  790. package/src/notifications/notification-types-setting.tsx +0 -406
  791. package/src/notifications/notification-types.ts +0 -89
  792. package/src/notifications/notifications-labels.ts +0 -287
  793. package/src/notifications/push-device-setting.tsx +0 -230
  794. package/src/notifications/push-devices-setting.tsx +0 -374
  795. package/src/notifications/push-worker.ts +0 -168
  796. package/src/notifications/quiet-hours-setting.tsx +0 -238
  797. package/src/notifications/unsubscribe-panel.tsx +0 -200
  798. package/src/notifications/use-push-device.ts +0 -448
  799. package/src/offline/local-first.ts +0 -100
  800. package/src/offline/pwa-update-prompt-labels.ts +0 -9
  801. package/src/offline/pwa-update-prompt.tsx +0 -78
  802. package/src/offline/query-persistence.ts +0 -391
  803. package/src/offline/service-worker-updates.ts +0 -81
  804. package/src/offline/shared-computer-labels.ts +0 -8
  805. package/src/offline/shared-computer.tsx +0 -87
  806. package/src/offline/sign-out-pending-dialog-labels.ts +0 -21
  807. package/src/offline/sign-out-pending-dialog.tsx +0 -135
  808. package/src/offline.ts +0 -37
  809. package/src/push-worker.ts +0 -25
  810. package/src/rhf/fields.tsx +0 -2187
  811. package/src/rhf/form-core.tsx +0 -324
  812. package/src/rhf/form.tsx +0 -12
  813. package/src/rhf/line-items.tsx +0 -135
  814. package/src/rhf/use-rhf-wizard-step.ts +0 -104
  815. package/src/rhf.ts +0 -21
  816. package/src/search/command-palette-labels.ts +0 -16
  817. package/src/search/command-palette.tsx +0 -624
  818. package/src/search/global-search-labels.ts +0 -13
  819. package/src/search/global-search.tsx +0 -660
  820. package/src/search/search-index.ts +0 -283
  821. package/src/search/use-command-key.ts +0 -23
  822. package/src/search.ts +0 -14
  823. package/src/settings/device-reset-setting-labels.ts +0 -20
  824. package/src/settings/device-reset-setting.tsx +0 -116
  825. package/src/settings/settings-card-classes.ts +0 -11
  826. package/src/settings/settings-catalogue.ts +0 -150
  827. package/src/settings/settings-context.ts +0 -33
  828. package/src/settings/settings-heading.tsx +0 -67
  829. package/src/settings/settings-labels.ts +0 -87
  830. package/src/settings/settings-layout.tsx +0 -471
  831. package/src/settings/settings-section.tsx +0 -108
  832. package/src/settings/use-account-appearance.ts +0 -148
  833. package/src/settings/use-account-language.ts +0 -146
  834. package/src/settings/use-settings-focus.ts +0 -128
  835. package/src/settings/use-settings-route.ts +0 -258
  836. package/src/shell/account-menu-language.tsx +0 -130
  837. package/src/shell/account-menu-text-size.tsx +0 -80
  838. package/src/shell/admin-menu.tsx +0 -183
  839. package/src/shell/app-shell-labels.ts +0 -11
  840. package/src/shell/app-shell.tsx +0 -1560
  841. package/src/shell/auth-layout.tsx +0 -186
  842. package/src/shell/company-switcher-labels.ts +0 -13
  843. package/src/shell/company-switcher.tsx +0 -136
  844. package/src/shell/dev-menu.tsx +0 -257
  845. package/src/shell/fill-height.tsx +0 -45
  846. package/src/shell/language-code.ts +0 -5
  847. package/src/shell/option-switcher-menu.tsx +0 -84
  848. package/src/shell/sync-status-indicator.tsx +0 -303
  849. package/src/shell/top-bar-actions.tsx +0 -87
  850. package/src/shell/top-bar-brand.tsx +0 -78
  851. package/src/shell/top-bar-parts-labels.ts +0 -148
  852. package/src/shell/top-bar.tsx +0 -40
  853. package/src/shell/topbar-action-menu.tsx +0 -567
  854. package/src/shell/topbar-controls.tsx +0 -269
  855. package/src/shell/tour-menu.tsx +0 -187
  856. package/src/shell.ts +0 -108
  857. package/src/sync/db.ts +0 -129
  858. package/src/sync/engine.ts +0 -1011
  859. package/src/sync/hooks.ts +0 -98
  860. package/src/sync/testing.ts +0 -73
  861. package/src/sync/wire.ts +0 -61
  862. package/src/sync.ts +0 -37
  863. package/src/table-text.ts +0 -8
  864. package/src/testing/css-variables.generated.ts +0 -112
  865. package/src/testing/css-variables.ts +0 -189
  866. package/src/testing/index.ts +0 -29
  867. package/src/testing/react.ts +0 -58
  868. package/src/testing/tour.ts +0 -41
  869. package/src/testing/viewport.ts +0 -357
  870. package/src/theme/chart-palette.ts +0 -232
  871. package/src/theme/color.ts +0 -272
  872. package/src/theme/contrast-tokens.ts +0 -268
  873. package/src/theme/contrast.ts +0 -250
  874. package/src/theme/palette-derive.ts +0 -825
  875. package/src/theme/palette-presets.ts +0 -544
  876. package/src/theme/palette-store.ts +0 -108
  877. package/src/theme/text-size.ts +0 -289
  878. package/src/theme/theme-store.ts +0 -157
  879. package/src/tour/tour-catalogue-labels.ts +0 -75
  880. package/src/tour/tour-catalogue.tsx +0 -335
  881. package/src/tour/tour-dock.ts +0 -134
  882. package/src/tour/tour-engine.ts +0 -37
  883. package/src/tour/tour-gates.ts +0 -218
  884. package/src/tour/tour-guide-button.tsx +0 -64
  885. package/src/tour/tour-guide-labels.ts +0 -15
  886. package/src/tour/tour-info.ts +0 -144
  887. package/src/tour/tour-labels.ts +0 -23
  888. package/src/tour/tour-overlay.tsx +0 -1170
  889. package/src/tour/tour.tsx +0 -750
  890. package/src/tour/use-tour-progress.ts +0 -671
  891. package/src/tour/use-tour-url-sync.ts +0 -266
  892. package/src/tour.ts +0 -21
  893. package/src/vite-env.d.ts +0 -23
  894. package/src/wizard/stepper-nav.tsx +0 -360
  895. package/src/wizard/types.ts +0 -275
  896. package/src/wizard/use-wizard.ts +0 -560
  897. package/src/wizard/validation.ts +0 -39
  898. package/src/wizard/wizard-context.tsx +0 -74
  899. package/src/wizard/wizard-labels.ts +0 -29
  900. package/src/wizard/wizard-step.tsx +0 -76
  901. package/src/wizard/wizard-summary.tsx +0 -84
  902. package/src/wizard.ts +0 -15
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/tour/tour-overlay.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useEffectEvent,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n useSyncExternalStore,\n} from \"react\";\nimport type { CSSProperties, RefObject } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { cn } from \"../lib/cn\";\nimport { Button } from \"../components/button\";\nimport { firstTabStop, tabStops, useFocusTrap } from \"../hooks/use-focus-trap\";\nimport { useDismissLayer } from \"../hooks/use-dismiss\";\nimport { sameRect } from \"../hooks/use-anchored-rect\";\nimport { anchoredInline, viewportSize } from \"../hooks/use-anchored-panel\";\nimport { useBreakpoint } from \"../hooks/use-breakpoint\";\nimport { useCoarsePointer } from \"../hooks/use-large-text\";\nimport { dirOf, horizontalStep } from \"../lib/direction\";\nimport { isComposing } from \"../lib/ime\";\nimport { focusQuietly } from \"../lib/quiet-focus\";\nimport type { Direction } from \"../lib/direction\";\nimport type { TourLabels, TourPlacement, TourStep, TourStepContext } from \"./tour\";\nimport { devWarnings, isShown, stepContext, type GateRegistry } from \"./tour-gates\";\nimport { dockEdge, dockStyle, readBand, scrollIntoFreeHalf, type DockEdge } from \"./tour-dock\";\n\n/*\n * # The tour's overlay: the card, the spotlight and its shields, the placement, the dock\n *\n * Its own module since 0.52 (refactor audit 2026-10-30, MOD-1): `TourProvider` is mounted\n * above every app's routes and renders this only while a tour runs, so it is loaded by a\n * literal `import()` when a tour first starts (tour.tsx), not with the provider — about\n * 28.5 kB minified, 10.3 kB gzip that sat in each app's first load (measured at 0.51.6). Nothing here is public; what\n * the provider shares with it (the step context, `when`, the gates) is in tour-gates.ts.\n */\n\n/** The app's `refuse` on the step that awaits its key (§11.4). */\nexport interface Refusal {\n step: TourStep;\n reason?: string;\n /** Bumped per refusal, so the same words are announced again. */\n seq: number;\n}\n\nconst NOOP = () => {};\n\n/** The first step in [floor, index) shown now whose gate is published and unsatisfied, or -1. */\nfunction firstEmptied(steps: TourStep[], floor: number, index: number, gates: GateRegistry): number {\n const ctx = stepContext(gates, \"goto\");\n for (let j = floor; j < index; j++) {\n const key = steps[j].gate;\n if (key && gates.get(key) === false && isShown(steps[j], ctx)) return j;\n }\n return -1;\n}\n\ninterface Rect {\n top: number;\n left: number;\n width: number;\n height: number;\n}\n\nfunction isVisible(el: Element): boolean {\n // A non-zero box already rules out display:none on the element or any ancestor\n // (an unrendered element measures 0x0). We deliberately do NOT test\n // offsetParent: it is null for position:fixed elements even when fully visible,\n // which made the mobile bottom-nav bar (fixed) un-highlightable on mobile\n // (feedback #313). visibility:hidden keeps a box, so check it explicitly.\n const r = el.getBoundingClientRect();\n if (r.width <= 0 || r.height <= 0) return false;\n const style = getComputedStyle(el);\n return style.visibility !== \"hidden\" && style.display !== \"none\";\n}\n\n// The first VISIBLE element matching the selector, not merely the first in DOM\n// order. This lets a step target the same control across layouts with one\n// combined selector — e.g. the desktop sidebar link AND the mobile bottom-bar\n// link — where the off-layout copy is present but `display:none` (feedback\n// #313). Returns null while none is visible so the finder keeps retrying.\nfunction queryVisibleTarget(selector: string): Element | null {\n const els = document.querySelectorAll(selector);\n for (const el of els) {\n if (isVisible(el)) return el;\n }\n return null;\n}\n\nfunction rectOf(el: Element): Rect {\n const r = el.getBoundingClientRect();\n return { top: r.top, left: r.left, width: r.width, height: r.height };\n}\n\n/** The two-tone frame's width outside the spot (3px white, 2px keyline), plus a pixel. */\nconst RING_BAND = 6;\n\n/**\n * What a step's ring frames (keksdose S1, §11.6): the target, and on a FIELD step also the\n * lines that describe the field from outside it — the elements its `aria-describedby`\n * (on the target or a control inside) names that lie within the ring's reach of it (a\n * caption, a hint or warning line, an error drawn under or above the field). Without\n * them the ring's frame ran through such a line; with them it frames field and line, and\n * the line is lit, not under the scrim. A kit field's own caption and error are inside\n * its root already. A line far away (a tooltip, another part of the page) is not taken.\n */\nfunction spotRectOf(el: Element, step: TourStep): Rect {\n const own = rectOf(el);\n if (!isFieldStep(step)) return own;\n const ids = new Set<string>();\n const holders = [el, ...Array.from(el.querySelectorAll(\"[aria-describedby]\"))];\n for (const holder of holders) {\n for (const id of (holder.getAttribute(\"aria-describedby\") ?? \"\").split(/\\s+/)) if (id) ids.add(id);\n }\n if (ids.size === 0) return own;\n const lines: DOMRect[] = [];\n for (const id of ids) {\n const line = document.getElementById(id);\n if (!line || el.contains(line) || line.closest('[role=\"tooltip\"]') || !isVisible(line)) continue;\n const r = line.getBoundingClientRect();\n // An `sr-only` description measures 1×1: nothing to frame.\n if (r.width > 1 && r.height > 1) lines.push(r);\n }\n let top = own.top;\n let left = own.left;\n let right = own.left + own.width;\n let bottom = own.top + own.height;\n const reach = (step.padding ?? 8) + RING_BAND;\n // Grow until nothing more is in reach: a hint under the field, then an error under it.\n for (let grew = true; grew;) {\n grew = false;\n for (let i = lines.length - 1; i >= 0; i--) {\n const r = lines[i];\n const across = r.left < right && r.right > left;\n const gap = Math.max(r.top - bottom, top - r.bottom);\n if (!across || gap > reach) continue;\n top = Math.min(top, r.top);\n left = Math.min(left, r.left);\n right = Math.max(right, r.right);\n bottom = Math.max(bottom, r.bottom);\n lines.splice(i, 1);\n grew = true;\n }\n }\n return { top, left, width: right - left, height: bottom - top };\n}\n\n/**\n * What the finder established for ONE step: where its target is (`null` = no target,\n * or not on the page), and the reading direction the card takes from it.\n *\n * It carries the step it was found for, and the overlay only believes it for that\n * step — which is the whole fix for keksdose's tours audit 2026-10-02, §1.0 A (\"stale\n * spotlight on the step after a spotlighted one\", 15 steps in 16 tours, desktop and\n * phone, mouse and keyboard). When step N spotlit a target and step N+1 had none (or\n * its anchor was missing), N+1 kept N's hole and parked its card beside it, so a\n * centred \"You're all set\" read as pointing at the Import & Export link; Back→Next kept\n * it for as long as anyone watched.\n *\n * The overlay used to hold `rect` and `ready` as separate states and reset them\n * DURING RENDER when the step changed. React 19 does not keep a render-phase update\n * while an earlier, lower-priority update to the same hook is still queued — it only\n * writes the result to the base state \"unless the queue is empty\" — and the follow\n * interval below queues exactly such an update every 250 ms (eagerly bailed out because\n * the rect had not moved, but left in the queue for rebasing). So the click's render\n * showed the reset, and the very next render (the finder saying \"ready\") re-based on\n * the old rect. A deep link was fine because nothing had queued anything yet.\n *\n * Keying the result to its step does not depend on any of that ordering: a rect found\n * for another step is not this step's rect, whatever the queue does with it, and a\n * missing anchor reads as \"no target\" instead of as the last thing that was lit.\n */\ninterface Located {\n index: number;\n step: TourStep;\n rect: Rect | null;\n dir: Direction;\n /**\n * A field step's own container (§11.6): inserted right after the kit layer holding the\n * target (`host.after`), or at the end of <body> on the page. `null` on a plain step,\n * which is portalled to <body> at z-[60] as ever.\n */\n layer: HTMLElement | null;\n /** The host fills the visual viewport (a phone's FullBleedDialog): no scrim, no shields. */\n fullScreen: boolean;\n}\n\n/** The kit layer (`data-kit-layer`) holding `el`, if any. */\nfunction layerHost(el: Element): HTMLElement | null {\n return el.closest<HTMLElement>(\"[data-kit-layer]\");\n}\n\n/**\n * Does the host fill the visual viewport? A backdrop host (`data-kit-layer=\"backdrop\"`:\n * Modal, FullBleedDialog) is judged by its panel, the child holding the target.\n */\nfunction coversViewport(host: HTMLElement, el: Element): boolean {\n let surface: Element = host;\n if (host.getAttribute(\"data-kit-layer\") === \"backdrop\") {\n for (const child of Array.from(host.children)) {\n if (child.contains(el)) {\n surface = child;\n break;\n }\n }\n }\n const r = surface.getBoundingClientRect();\n const vv = window.visualViewport;\n // Without a visual viewport, the glass (`viewportSize`), not `innerWidth`: an overflow\n // grows the layout viewport, and a sheet as wide as the screen read as narrower than it\n // (refactor audit 2026-10-30, DUP-9; live #381).\n const view = viewportSize();\n const top = vv?.offsetTop ?? 0;\n const bottom = top + (vv?.height ?? view.height);\n const width = vv?.width ?? view.width;\n return r.width > 0 && r.left <= 1 && r.top <= top + 1 && r.right >= width - 1 && r.bottom >= bottom - 1;\n}\n\n/** Does this step's card dock now (§11.7)? Below `sm` (`phone`), and `\"dock\"` or a field\n * step with no placement while the provider docks on phones. */\nfunction docks(step: TourStep, dockOnPhones: boolean, phone: boolean): boolean {\n if (!phone || !step.target) return false;\n return step.placement === \"dock\" || (step.placement === undefined && dockOnPhones && isFieldStep(step));\n}\n\n/** A step whose control is for using: its card joins the layer stack above the field (§11.6). */\nfunction isFieldStep(step: TourStep): boolean {\n return !!(step.interactive || step.awaitInput || step.gate || step.awaitGate);\n}\n\nexport function TourOverlay({\n steps,\n index,\n via,\n floor,\n position,\n count,\n refusal,\n onGoTo,\n labels,\n gates,\n dockOnPhones,\n onNext,\n onPrev,\n onSkip,\n}: {\n steps: TourStep[];\n index: number;\n via: TourStepContext[\"via\"];\n floor: number;\n /** The app refused this step's save (§11.4). */\n refusal: Refusal | null;\n onGoTo: (index: number) => void;\n /** 1-based among the steps shown; Back is hidden on the first, Done on the last. */\n position: number;\n count: number;\n labels: TourLabels;\n gates: GateRegistry;\n dockOnPhones: boolean;\n onNext: () => void;\n onPrev: () => void;\n onSkip: () => void;\n}) {\n const step = steps[index];\n const isFirst = position <= 1;\n const isLast = position >= count;\n // A new step starts unlocated: whatever was found for another step (see `Located`)\n // is ignored, so the overlay renders nothing until the effect below has located THIS\n // step, and never the previous step's spotlight.\n const [located, setLocated] = useState<Located | null>(null);\n const current = located !== null && located.index === index && located.step === step ? located : null;\n const ready = current !== null;\n const rect = current?.rect ?? null;\n // The overlay is portalled to <body>, out of whatever `dir` subtree the app set, so it\n // takes the direction of the element it spotlights (the document's for a centered\n // step). Arrow keys and start/end placement read it.\n const dir: Direction = current?.dir ?? \"ltr\";\n const rootRef = useRef<HTMLDivElement>(null);\n const cardRef = useRef<HTMLDivElement>(null);\n const bodyId = useId();\n const hintId = useId();\n // Below `sm` at the text size in force (§3.3: 640 px at Normal, 800 at Large), the\n // question CSS's `max-sm:` asks — a fixed 640 docked nothing in a 700 px window at\n // Large, which lays the page out as a phone (refactor audit 2026-10-30, DUP-9).\n const phone = useBreakpoint(\"max-sm\");\n // A touch screen: the card takes focus, so no keyboard or pad opens before the step is\n // read (§11.8). Asked on arrival, not followed: a dependency of the arrival effect, a\n // 2-in-1's keyboard detached mid-step ran the arrival again and pulled the focus out of\n // the field being typed in (0.52 code review, tour-overlay.tsx).\n const coarse = useCoarsePointer();\n const coarseOnArrival = useEffectEvent(() => coarse);\n\n // The gate (§11.1). Re-rendered on every registry change while the tour runs.\n const gateVersion = useSyncExternalStore(gates.subscribe, gates.version, gates.version);\n const gateKey = step.gate;\n const enforced = !!gateKey && gates.has(gateKey);\n const locked = enforced && gates.get(gateKey) !== true;\n\n // The polite live region (§11.8): `gateReady` once a gate opens, the hint on a locked\n // Next. A repeat of the same words gets a trailing zero-width space so it is read again.\n const [polite, setPolite] = useState(\"\");\n const announce = useCallback((text: string) => {\n setPolite((prev) => (prev === text ? `${text}\\u200b` : text));\n }, []);\n\n // Run beforeStep, then locate the target (retrying across route/render lag).\n useEffect(() => {\n let cancelled = false;\n let raf = 0;\n // `null` = untargeted, or the finder gave up → the card centres, with no hole.\n const settle = (el: Element | null) => {\n let layer: HTMLElement | null = null;\n let fullScreen = false;\n if (el && isFieldStep(step)) {\n // §11.6: directly above the layer holding the field — DOM order decides between\n // the kit's z-50 body children, so this paints over the host and everything opened\n // before it, and under whatever the field opens next (a list, the number pad).\n const host = layerHost(el);\n layer = document.createElement(\"div\");\n layer.setAttribute(\"data-tour-layer\", \"\");\n if (host) host.after(layer);\n else document.body.appendChild(layer);\n fullScreen = !!host && coversViewport(host, el);\n }\n setLocated({ index, step, rect: el ? spotRectOf(el, step) : null, dir: dirOf(el), layer, fullScreen });\n };\n void (async () => {\n try {\n await step.beforeStep?.(stepContext(gates, via));\n } catch (error) {\n // The step is shown anyway (FLW-5): left unlocated, the tour stayed `active`\n // with no card, no scrim and no Escape layer, and everything keyed on \"a tour\n // runs\" (the `?tour=` mirror, the apps' PWA-update hold) stayed on with it. The\n // target may well be there regardless; if not, the finder gives up and centres.\n console.error(error);\n }\n if (cancelled) return;\n if (!step.target) {\n settle(null);\n return;\n }\n let tries = 0;\n const find = () => {\n if (cancelled) return;\n const el = queryVisibleTarget(step.target!);\n if (el) {\n // A docked step scrolls the field into the half the card leaves free, through\n // the field's own scroll container (§11.7); any other centres it, as ever.\n if (docks(step, dockOnPhones, phone)) scrollIntoFreeHalf(el, null, null);\n else el.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n settle(el);\n return;\n }\n if (tries++ < 45) raf = requestAnimationFrame(find);\n else settle(null); // give up → render centered\n };\n find();\n })();\n return () => {\n cancelled = true;\n cancelAnimationFrame(raf);\n };\n // `via` and the gates are read at arrival, not followed.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [index, step]);\n\n // Follow the target as the page scrolls / reflows — only once THIS step is located,\n // and only into this step's result.\n useEffect(() => {\n if (!step.target) return;\n const update = () => {\n const el = queryVisibleTarget(step.target!);\n if (el) {\n const next = spotRectOf(el, step);\n // A sheet that grows to full screen (or shrinks from it) takes or drops the scrim.\n const host = layerHost(el);\n const full = !!host && coversViewport(host, el);\n setLocated((prev) => {\n if (!prev || prev.index !== index || prev.step !== step) return prev;\n const fullScreen = prev.layer ? full : prev.fullScreen;\n if (sameRect(prev.rect, next) && fullScreen === prev.fullScreen) return prev;\n return { ...prev, rect: next, fullScreen };\n });\n }\n };\n window.addEventListener(\"scroll\", update, true);\n window.addEventListener(\"resize\", update);\n const id = window.setInterval(update, 250);\n return () => {\n window.removeEventListener(\"scroll\", update, true);\n window.removeEventListener(\"resize\", update);\n clearInterval(id);\n };\n }, [index, step]);\n\n // A field step's container goes with the step (and with the tour).\n const layer = located?.layer ?? null;\n useEffect(() => {\n if (!layer) return;\n return () => layer.remove();\n }, [layer]);\n\n // Escape (§11.6.4): the tour is a layer on the kit's Escape stack, pushed on each\n // arrival, so it sits above the sheet holding the form. Escape from the card skips the\n // tour and no longer also closes that sheet; a layer the field opens afterwards (a\n // list, the pad) is above the tour and takes Escape first. An Escape pressed in the\n // field itself belongs to the field: the tour lets it pass by doing nothing.\n useDismissLayer(\n ready,\n (e) => {\n if (interactive && step.target && e.target instanceof Node) {\n const el = queryVisibleTarget(step.target);\n if (el?.contains(e.target)) return;\n }\n onSkip();\n },\n // Not an overlay to `useOverlayOpen`: a floating launcher a tour spotlights stays.\n { overlay: false },\n );\n\n // awaitClick: advance when the *real* target is clicked. The spotlight hole is\n // click-through (see the shields in the render below) so the element's own\n // handler runs first; we step forward on the next macrotask.\n //\n // Re-armed when the target turns up after the finder gave up (the follow effect\n // lights it late): the card swaps Next for the \"click the highlighted element\" hint\n // as soon as there is a rect, so the click must work from that moment too.\n const spotted = rect !== null;\n useEffect(() => {\n if (!ready || !spotted || !step.awaitClick || !step.target) return;\n const el = queryVisibleTarget(step.target);\n if (!el) return;\n const onClick = () => window.setTimeout(() => onNext(), 0);\n el.addEventListener(\"click\", onClick, { once: true });\n return () => el.removeEventListener(\"click\", onClick);\n }, [ready, spotted, index, step, onNext]);\n\n // A field step (see `TourStep.interactive`): only while the target is lit — a step\n // whose target is missing centres its card over a full scrim, modal as ever. The one\n // `isFieldStep`, as the layer insertion in `settle` reads it: an inline copy of its\n // flags, and an alias of that, could drift from it (0.52 code review, tour-overlay.tsx).\n const interactive = spotted && !!step.target && isFieldStep(step);\n // A GUIDED field step (§11.8): focus goes to the field on a fine pointer, and Tab\n // cycles field + card. A plain `interactive` step keeps the card's own trap.\n const guided = interactive && !!(step.gate || step.awaitInput || step.awaitGate);\n // An awaitGate step whose target is lit: only `release` moves it (a missing Save\n // button would otherwise be a dead end, as for awaitClick).\n const awaitsRelease = spotted && !!step.target && !!step.awaitGate;\n\n // A gate nobody publishes is not enforced: Next opens, and a development build says why\n // (on arrival, or when its publisher unmounts under the step), once per step.\n const warnedGateRef = useRef<TourStep | null>(null);\n useEffect(() => {\n if (!ready || !gateKey || gates.has(gateKey) || !devWarnings() || warnedGateRef.current === step) return;\n warnedGateRef.current = step;\n console.warn(\n `[ui-kit] Tour step \"${step.title}\" waits for the gate \"${gateKey}\", which nothing publishes: its Next is open. ` +\n \"Publish it with useTourGate beside the field, or the form has closed under the tour.\",\n );\n }, [ready, gateKey, gates, step, gateVersion]);\n\n // `optional` means \"may stay EMPTY\": without a gate there is no value to compare.\n useEffect(() => {\n if (!ready || !step.optional || step.gate || !devWarnings()) return;\n console.warn(\n `[ui-kit] Tour step \"${step.title}\" is \\`optional\\` without a \\`gate\\`: it shows the Optional chip ` +\n 'and a plain Next. \"Leave empty\" needs a gate to compare.',\n );\n }, [ready, step]);\n\n // \"Ready\" once, when this step's gate turns satisfied (not when it arrives satisfied).\n const wasLockedRef = useRef<{ step: TourStep; locked: boolean } | null>(null);\n useEffect(() => {\n if (!ready || !gateKey) return;\n const before = wasLockedRef.current;\n if (before && before.step === step && before.locked && !locked && enforced) announce(labels.gateReady);\n wasLockedRef.current = { step, locked };\n }, [ready, gateKey, step, locked, enforced, announce, labels.gateReady]);\n\n // Arrival on a guided step: the field takes focus on a fine pointer, the card on a\n // coarse one; the field is described by the card's body while the step lasts.\n // Declared BEFORE the advance listeners below, so the focus it moves is not mistaken\n // for the person leaving the field.\n useEffect(() => {\n if (!ready || !guided || !step.target) return;\n const el = queryVisibleTarget(step.target);\n const control = el ? firstTabStop(el) : null;\n // Described BEFORE it is focused, so a screen reader reads the step with the field's\n // name. Focused quietly (0.50.1, keksdose B1): a picker that opens on focus stays\n // closed, or its list would cover the card; ArrowDown, typing or a click opens it.\n const previous = control ? control.getAttribute(\"aria-describedby\") : null;\n if (control) control.setAttribute(\"aria-describedby\", previous ? `${previous} ${bodyId}` : bodyId);\n if (coarseOnArrival() || !control) cardRef.current?.focus();\n else if (!el!.contains(document.activeElement)) focusQuietly(control);\n if (!control) return;\n return () => {\n if (previous === null) control.removeAttribute(\"aria-describedby\");\n else control.setAttribute(\"aria-describedby\", previous);\n };\n }, [ready, guided, index, step, bodyId]);\n\n // Tab on a guided step cycles field + card as one ring (§11.8): from the field's last\n // stop to the card's first, from the card's last back to the field. Captured on the\n // document, ahead of a sheet's own trap, which would wrap inside the sheet.\n useEffect(() => {\n if (!ready || !guided || !step.target) return;\n const onTab = (e: KeyboardEvent) => {\n if (e.key !== \"Tab\") return;\n const el = queryVisibleTarget(step.target!);\n const card = cardRef.current;\n if (!el || !card) return;\n const active = document.activeElement;\n const fieldStops = tabStops(el);\n const cardStops = tabStops(card);\n if (fieldStops.length === 0 || cardStops.length === 0) return;\n let to: HTMLElement | null = null;\n if (active instanceof Node && el.contains(active)) {\n if (!e.shiftKey && active === fieldStops[fieldStops.length - 1]) to = cardStops[0];\n else if (e.shiftKey && active === fieldStops[0]) to = cardStops[cardStops.length - 1];\n } else if (active instanceof Node && card.contains(active)) {\n if (!e.shiftKey && active === cardStops[cardStops.length - 1]) to = fieldStops[0];\n else if (e.shiftKey && (active === cardStops[0] || active === card)) to = fieldStops[fieldStops.length - 1];\n }\n if (!to) return;\n e.preventDefault();\n e.stopPropagation();\n to.focus();\n };\n document.addEventListener(\"keydown\", onTab, true);\n return () => document.removeEventListener(\"keydown\", onTab, true);\n }, [ready, guided, index, step]);\n\n // gate: once satisfied, advance on Enter in the field (unless the control took it, or\n // a textarea without Ctrl/Cmd) or on focus leaving the field to nowhere or to the card.\n // Checked on the next macrotask, after the field's own blur/Enter commit has rendered.\n useEffect(() => {\n if (!ready || !spotted || !gateKey || !step.target) return;\n const el = queryVisibleTarget(step.target) as HTMLElement | null;\n if (!el) return;\n const satisfied = () => !gates.has(gateKey) || gates.get(gateKey) === true;\n let timer = 0;\n // Focus that was in the field when the step settled, or went there since. A focus\n // move the tour made itself (the card taking it on a phone) is not a leave.\n let armed = el.contains(document.activeElement);\n const check = () => {\n window.clearTimeout(timer);\n timer = window.setTimeout(() => {\n if (satisfied()) onNext();\n }, 0);\n };\n const onFocusIn = () => {\n armed = true;\n };\n const onFocusOut = (e: FocusEvent) => {\n const to = e.relatedTarget;\n if (to instanceof Node && el.contains(to)) return;\n const wasArmed = armed;\n armed = false;\n if (!wasArmed) return;\n if (to === null || (to instanceof Node && rootRef.current?.contains(to))) check();\n };\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key !== \"Enter\" || !(e.target instanceof Node) || !el.contains(e.target)) return;\n // Heard at the document, after React's handlers: a combobox picking an option has\n // called preventDefault by now.\n if (e.defaultPrevented || isComposing(e)) return;\n if (e.target instanceof HTMLTextAreaElement && !(e.ctrlKey || e.metaKey)) return;\n check();\n };\n el.addEventListener(\"focusin\", onFocusIn);\n el.addEventListener(\"focusout\", onFocusOut);\n document.addEventListener(\"keydown\", onKeyDown);\n return () => {\n window.clearTimeout(timer);\n el.removeEventListener(\"focusin\", onFocusIn);\n el.removeEventListener(\"focusout\", onFocusOut);\n document.removeEventListener(\"keydown\", onKeyDown);\n };\n }, [ready, spotted, gateKey, gates, index, step, onNext]);\n\n // awaitInput: advance once the target's fields hold another value than when the step\n // was armed, checked when focus leaves the target or Enter is pressed in it — on the\n // next macrotask, after the field's own blur/Enter commit has rendered. A value the\n // number pad typed fires no native `change`, so comparing is what catches it.\n useEffect(() => {\n if (!ready || !spotted || !step.awaitInput || !step.target) return;\n const el = queryVisibleTarget(step.target) as HTMLElement | null;\n if (!el) return;\n const read = () => fieldValues(el);\n const before = read();\n let timer = 0;\n let done = false;\n const check = () => {\n window.clearTimeout(timer);\n timer = window.setTimeout(() => {\n if (done || read() === before) return;\n done = true;\n onNext();\n }, 0);\n };\n const onFocusOut = (e: FocusEvent) => {\n if (e.relatedTarget instanceof Node && el.contains(e.relatedTarget)) return;\n check();\n };\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Enter\") check();\n };\n el.addEventListener(\"focusout\", onFocusOut);\n el.addEventListener(\"keydown\", onKeyDown);\n el.addEventListener(\"change\", check);\n return () => {\n window.clearTimeout(timer);\n el.removeEventListener(\"focusout\", onFocusOut);\n el.removeEventListener(\"keydown\", onKeyDown);\n el.removeEventListener(\"change\", check);\n };\n }, [ready, spotted, index, step, onNext]);\n\n /** A press on the locked Next (or Enter / → from the card): no move; the field takes\n * focus and the hint is read again. */\n const gateHint = step.gateHint ?? labels.gateHint;\n const lockedNext = useCallback(() => {\n const el = step.target ? queryVisibleTarget(step.target) : null;\n const control = el ? firstTabStop(el) : null;\n // Quietly, as on arrival: the hint is read with the card in view, not under a list.\n if (control) focusQuietly(control);\n announce(gateHint);\n }, [step.target, announce, gateHint]);\n const tryNext = awaitsRelease ? NOOP : locked ? lockedNext : onNext;\n\n // After a refused save: the first earlier step shown whose field is now empty (§11.4).\n // Computed each render, which the gate subscription above triggers: a field filled\n // again drops the link.\n const backTo = refusal ? firstEmptied(steps, floor, index, gates) : -1;\n\n // Keyboard: Esc skips, Enter and the reading-direction arrow advance (→ in LTR,\n // ← in RTL), the other arrow goes back. On awaitClick steps Enter is ignored (it\n // would fire the target's click AND advance) — the forward arrow stays as an escape\n // hatch. On a locked gate step both are the locked Next.\n //\n // Enter on a focused control belongs to that control. This used to advance from\n // anywhere, so Enter on a focused Skip or Back ran the button's own click AND stepped\n // forward: Back moved nowhere, Skip skipped and then called `next` on a dead tour.\n // The same goes for arrows in a text field a step's `action` might contain.\n useEffect(() => {\n const onKey = (e: KeyboardEvent) => {\n // On an interactive step a key pressed in the target, or in a layer it opened (the\n // number pad's Escape, a menu's arrows), is the page's. The card's and the bare\n // page's (focus on <body>) stay the tour's.\n if (\n interactive &&\n e.target instanceof Node &&\n e.target !== document.body &&\n !rootRef.current?.contains(e.target)\n ) {\n return;\n }\n // Escape is the tour's Escape layer's (above) once the step is shown; while it is\n // still being located there is no layer yet, and the tour takes it here as in 0.49.\n if (e.key === \"Escape\") {\n if (!ready) onSkip();\n return;\n }\n // Nothing on screen to move on from: a step whose `beforeStep` is still running\n // (a route loading) is not passed over by an Enter or a → pressed on the bare\n // page (FLW-5). Escape, above, still leaves.\n if (!ready) return;\n if (e.key === \"Enter\") {\n if (step.awaitClick || step.awaitInput || ownsKey(e.target, \"Enter\")) return;\n e.preventDefault();\n tryNext();\n return;\n }\n if (ownsKey(e.target, e.key)) return;\n // The overlay root carries `dir`; before it paints, the document's answers.\n const delta = horizontalStep(e.key, rootRef.current);\n if (delta === 1) {\n e.preventDefault();\n tryNext();\n } else if (delta === -1) {\n if (!isFirst) onPrev();\n }\n };\n document.addEventListener(\"keydown\", onKey);\n return () => document.removeEventListener(\"keydown\", onKey);\n }, [isFirst, step, interactive, tryNext, onPrev, onSkip, ready]);\n\n if (!ready) return null;\n\n // No scrim, no shields: a field step inside a layer that fills the screen (§11.6.3).\n const bare = interactive && !!current?.fullScreen;\n const pad = step.padding ?? 8;\n const spot: Rect | null = rect\n ? { top: rect.top - pad, left: rect.left - pad, width: rect.width + pad * 2, height: rect.height + pad * 2 }\n : null;\n\n // `aria-modal` promises the page behind is out of reach, and the card's focus trap\n // keeps that promise for the keyboard. The pointer used to get no such treatment: the\n // root is `pointer-events-none` so that the spotlight hole can stay live for\n // `awaitClick`, and the scrim is a box-shadow, which takes no clicks — so every\n // control on the dimmed page stayed clickable. Four shields now tile the viewport\n // around the hole: the page is blocked, the card and the spotlighted target are not.\n // Keeping `aria-modal` (rather than dropping it) is the coherent half: the tour\n // really is modal — focus is trapped and Esc/Skip is the way out.\n return createPortal(\n <div\n ref={rootRef}\n // z-50 on a field step, in its own container right after the layer holding the field\n // (or at the end of <body>): over that layer and the page, under the z-50 layers the\n // field opens next (§11.6). z-[60] on a plain step, over everything.\n className={cn(\"pointer-events-none fixed inset-0\", interactive ? \"z-50\" : \"z-[60]\")}\n role=\"dialog\"\n aria-modal={interactive ? undefined : \"true\"}\n // A stable marker for the overlay, on every step (0.48, keksdose dev#611–613): an\n // app that hides its floating help launcher while a modal is open excepts the\n // tour, which may spotlight that launcher — `[aria-modal=\"true\"]:not([data-tour-overlay])`.\n // keksdose matched the `pointer-events-none` class until now, which is the kit's to change.\n data-tour-overlay=\"\"\n data-tour-interactive={interactive ? \"\" : undefined}\n data-tour-bare={bare ? \"\" : undefined}\n aria-label={step.title}\n dir={dir}\n >\n {/* In a full-screen layer (a phone's form sheet) no scrim and no shields: the rest of\n the form stays usable and scrollable, and the ring alone marks the field. */}\n {spot && !bare && <SpotlightShields spot={spot} />}\n {spot ? (\n <div\n className=\"pointer-events-none fixed rounded-lg transition-all duration-200 ease-out\"\n style={{\n top: spot.top,\n left: spot.left,\n width: spot.width,\n height: spot.height,\n // A two-tone frame, not a single translucent ring.\n //\n // The old treatment was `ring-2 ring-white/80` over a 55% scrim, and it\n // \"was barely visible\" on the app's blue-tinted surfaces. Two reasons,\n // and a single ring can't fix either: at 55% the surround stays bright\n // enough that the un-dimmed hole barely reads AS a hole, and a 80%-white\n // ring sitting on the edge of a light card is white-on-near-white.\n //\n // So: an opaque white band immediately around the target, a dark keyline\n // outside it, then the scrim. Whatever the target's own colour is, one of\n // the two bands is always in contrast with it and the other is always in\n // contrast with the dimmed surround — there is no background that can\n // swallow both. The blurred layer between them softens the step so the\n // frame reads as lighting rather than as a pasted-on rectangle.\n boxShadow: [\n \"0 0 0 3px rgba(255,255,255,0.98)\",\n \"0 0 0 5px rgba(15,23,42,0.92)\",\n \"0 0 18px 6px rgba(15,23,42,0.45)\",\n ...(bare ? [] : [\"0 0 0 9999px rgba(15,23,42,0.70)\"]),\n ].join(\", \"),\n }}\n />\n ) : (\n <div className=\"pointer-events-auto fixed inset-0 bg-black/70\" />\n )}\n <TourCard\n cardRef={cardRef}\n step={step}\n index={index}\n position={position}\n total={count}\n labels={labels}\n isFirst={isFirst}\n isLast={isLast}\n rect={spot}\n dir={dir}\n trap={!guided}\n bodyId={bodyId}\n hintId={hintId}\n locked={locked}\n gateHint={gateHint}\n onBack={onPrev}\n onNext={tryNext}\n onLeaveEmpty={onNext}\n onSkip={onSkip}\n awaitsRelease={awaitsRelease}\n docked={spot !== null && docks(step, dockOnPhones, phone)}\n refusal={refusal}\n backTo={backTo >= 0 ? { title: steps[backTo].title, go: () => onGoTo(backTo) } : null}\n />\n <div className=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">\n {polite}\n </div>\n </div>,\n (interactive && current?.layer) || document.body,\n );\n}\n\n/** The values of the fields at or inside `el`, as one string to compare (`awaitInput`). */\nfunction fieldValues(el: Element): string {\n const fields = el.matches(\"input,textarea,select\") ? [el] : Array.from(el.querySelectorAll(\"input,textarea,select\"));\n return fields\n .map((f) =>\n f instanceof HTMLInputElement && (f.type === \"checkbox\" || f.type === \"radio\")\n ? String(f.checked)\n : (f as HTMLInputElement).value,\n )\n .join(\"\\u0000\");\n}\n\n/** Does the focused element handle `key` itself? Enter on a button or link, and any\n * editing key in a text field or select, is the control's — not the tour's. */\nfunction ownsKey(target: EventTarget | null, key: string): boolean {\n if (!(target instanceof HTMLElement)) return false;\n if (target.isContentEditable) return true;\n const tag = target.tagName;\n if (tag === \"TEXTAREA\" || tag === \"SELECT\") return true;\n if (tag === \"INPUT\") {\n const type = (target as HTMLInputElement).type;\n // Enter on a checkbox does nothing natively, but ←/→ on a radio moves it.\n return key !== \"Enter\" || type !== \"checkbox\";\n }\n if (key !== \"Enter\") return false;\n return (\n tag === \"BUTTON\" ||\n (tag === \"A\" && target.hasAttribute(\"href\")) ||\n target.getAttribute(\"role\") === \"button\" ||\n target.getAttribute(\"role\") === \"link\"\n );\n}\n\n/**\n * Transparent pointer blockers tiling the viewport around the spotlight hole: one\n * full-width band above and below, one on each side at the hole's own height. The hole\n * itself stays uncovered, so the target keeps its clicks.\n */\nfunction SpotlightShields({ spot }: { spot: Rect }) {\n const shield = \"pointer-events-auto fixed\";\n const bottom = spot.top + spot.height;\n return (\n <>\n <div\n data-tour-shield=\"\"\n className={shield}\n style={{ top: 0, left: 0, right: 0, height: Math.max(0, spot.top) }}\n />\n <div data-tour-shield=\"\" className={shield} style={{ top: bottom, left: 0, right: 0, bottom: 0 }} />\n <div\n data-tour-shield=\"\"\n className={shield}\n style={{ top: spot.top, left: 0, width: Math.max(0, spot.left), height: spot.height }}\n />\n <div\n data-tour-shield=\"\"\n className={shield}\n style={{ top: spot.top, left: spot.left + spot.width, right: 0, height: spot.height }}\n />\n </>\n );\n}\n\n/**\n * Card position (viewport px) for the given placement relative to the padded\n * spotlight `rect`. Omitted placement keeps the original auto behavior\n * (below → above → vertically centered); an explicit side flips to its opposite\n * if it would overflow, then clamps into the viewport. \"center\" (or no rect)\n * centers on screen.\n */\nfunction placeCard(\n rect: Rect | null,\n cw: number,\n ch: number,\n vw: number,\n vh: number,\n m: number,\n placement?: TourPlacement,\n dir: Direction = \"ltr\",\n): { top: number; left: number } {\n // The logical sides resolve to a physical one here, and only here.\n if (placement === \"start\") placement = dir === \"rtl\" ? \"right\" : \"left\";\n else if (placement === \"end\") placement = dir === \"rtl\" ? \"left\" : \"right\";\n // Every anchored panel's inline clamp (`anchoredInline`; refactor audit 2026-10-30,\n // DUP-9): `m` inside the glass, and a card wider than the room keeps its START on it.\n const clampX = (x: number) =>\n anchoredInline({ left: x, right: x + cw }, cw, { dir, align: \"left\", edge: m, viewportWidth: vw }).left;\n if (!rect || placement === \"center\") {\n return { top: Math.max(m, (vh - ch) / 2), left: clampX((vw - cw) / 2) };\n }\n const clampY = (y: number) => Math.min(Math.max(m, y), Math.max(m, vh - ch - m));\n const centerX = clampX(rect.left + rect.width / 2 - cw / 2);\n const centerY = clampY(rect.top + rect.height / 2 - ch / 2);\n const belowTop = rect.top + rect.height + m;\n const aboveTop = rect.top - ch - m;\n const rightLeft = rect.left + rect.width + m;\n const leftLeft = rect.left - cw - m;\n const fitsBelow = belowTop + ch <= vh;\n const fitsAbove = aboveTop >= 0;\n const fitsRight = rightLeft + cw <= vw;\n const fitsLeft = leftLeft >= 0;\n\n switch (placement) {\n case \"top\":\n return { top: fitsAbove ? aboveTop : fitsBelow ? belowTop : clampY(aboveTop), left: centerX };\n case \"bottom\":\n return { top: fitsBelow ? belowTop : fitsAbove ? aboveTop : clampY(belowTop), left: centerX };\n case \"right\":\n return { top: centerY, left: fitsRight ? rightLeft : fitsLeft ? leftLeft : clampX(rightLeft) };\n case \"left\":\n return { top: centerY, left: fitsLeft ? leftLeft : fitsRight ? rightLeft : clampX(leftLeft) };\n default:\n if (fitsBelow) return { top: belowTop, left: centerX };\n if (fitsAbove) return { top: aboveTop, left: centerX };\n return { top: Math.max(m, (vh - ch) / 2), left: centerX };\n }\n}\n\nfunction TourCard({\n cardRef: ref,\n step,\n index,\n position,\n total,\n labels,\n isFirst,\n isLast,\n rect,\n dir,\n trap,\n bodyId,\n hintId,\n locked,\n gateHint,\n onBack,\n onNext,\n onLeaveEmpty,\n onSkip,\n awaitsRelease,\n docked,\n refusal,\n backTo,\n}: {\n cardRef: RefObject<HTMLDivElement | null>;\n step: TourStep;\n index: number;\n /** 1-based among the steps shown (§11.3). */\n position: number;\n /** How many steps the run shows. */\n total: number;\n labels: TourLabels;\n isFirst: boolean;\n isLast: boolean;\n rect: Rect | null;\n dir: Direction;\n /** The card's own focus trap; off on a guided step, where field + card are one ring. */\n trap: boolean;\n bodyId: string;\n hintId: string;\n /** A gate step whose field is not filled yet (§11.1). */\n locked: boolean;\n gateHint: string;\n onBack: () => void;\n onNext: () => void;\n /** Moves on past an `optional` field left empty. */\n onLeaveEmpty: () => void;\n onSkip: () => void;\n /** An awaitGate step with its target lit: the hint in place of Next. */\n awaitsRelease: boolean;\n /** Pinned to the band's edge away from the field (§11.7). */\n docked: boolean;\n refusal: Refusal | null;\n /** The \"Back to …\" link after a refused save. */\n backTo: { title: string; go: () => void } | null;\n}) {\n const [style, setStyle] = useState<CSSProperties>({ opacity: 0 });\n\n /**\n * The card holds the focus, because the card is what the tour IS.\n *\n * The overlay above declares `role=\"dialog\" aria-modal=\"true\"` — it always has — and\n * then left focus wherever the page had put it. For a tour that is the most pointed\n * version of the audit's *\"Only Modal manages focus\"*: the whole component exists to\n * say \"look here\", and for a keyboard user \"here\" is the focus ring. They were told\n * the page was hidden, given no way to reach the Next button without Tabbing through\n * it, and left on a control the screen reader would no longer describe.\n *\n * It re-engages on every step, without any bookkeeping here, because `TourOverlay`\n * returns null while it re-locates the next target: the card genuinely unmounts and\n * remounts between steps. That is what keeps focus honest when the BUTTONS change —\n * \"Back\" does not exist on the first step, so stepping back onto it destroys the\n * control the press came from, and focus would otherwise fall to `<body>`, outside\n * this trap's own listener, where Tab walks straight into the page the overlay claims\n * to have hidden.\n *\n * **The cost, written down:** on an `awaitClick` step the user is asked to click the\n * spotlighted element, and they can no longer Tab to it. ArrowRight still advances\n * (the key handler in `TourOverlay` is on the document and does not care where focus\n * is), which is the escape hatch that step already documents for the case where the\n * target cannot be found. Containment is worth that: an `awaitClick` step is a\n * minority of steps, while focus stranded behind `aria-modal` is every step.\n *\n * A guided field step (`gate`, `awaitInput`, 0.50) is the exception: the field is\n * what the step is about, so the overlay focuses it (or the card, on a touch screen)\n * and runs one Tab ring over field + card itself.\n */\n useFocusTrap(ref, { active: trap });\n\n // Docked (§11.7): the edge it last took, for the hysteresis, and a tick bumped when the\n // band moves under an unmoved field (a pad or keyboard opening).\n const edgeRef = useRef<DockEdge | null>(null);\n const [bandTick, setBandTick] = useState(0);\n const [edge, setEdge] = useState<DockEdge | null>(null);\n useEffect(() => {\n if (!docked) return;\n let last = \"\";\n const look = () => {\n const target = step.target ? queryVisibleTarget(step.target) : null;\n const band = readBand(target, ref.current);\n const key = `${band.top}:${band.bottom}`;\n if (key === last) return;\n last = key;\n // A field the pad or keyboard now covers is brought back into the free half.\n if (target) {\n const r = target.getBoundingClientRect();\n if (r.top < band.top || r.bottom > band.bottom) {\n edgeRef.current = scrollIntoFreeHalf(target, ref.current, edgeRef.current);\n }\n }\n setBandTick((t) => t + 1);\n };\n const vv = window.visualViewport;\n vv?.addEventListener(\"resize\", look);\n vv?.addEventListener(\"scroll\", look);\n window.addEventListener(\"resize\", look);\n // The follow tick's cadence: it catches a pad opening, which moves nothing.\n const id = window.setInterval(look, 250);\n return () => {\n vv?.removeEventListener(\"resize\", look);\n vv?.removeEventListener(\"scroll\", look);\n window.removeEventListener(\"resize\", look);\n clearInterval(id);\n };\n }, [docked, step.target, ref]);\n\n useLayoutEffect(() => {\n const card = ref.current;\n if (!card) return;\n if (docked) {\n const target = step.target ? queryVisibleTarget(step.target) : null;\n const band = readBand(target, card);\n const next = rect ? dockEdge(rect, band, edgeRef.current, card.offsetHeight) : \"bottom\";\n edgeRef.current = next;\n setEdge(next);\n setStyle(dockStyle(next, rect, band));\n return;\n }\n setEdge(null);\n // The glass, not `innerWidth`: on a phone whose page overflows that is the grown\n // layout viewport, and a centred card sat off-centre by half the overflow (DUP-9).\n const view = viewportSize();\n setStyle(placeCard(rect, card.offsetWidth, card.offsetHeight, view.width, view.height, 12, step.placement, dir));\n }, [ref, rect, index, step.placement, step.target, dir, docked, bandTick]);\n\n const awaitsTarget = ((step.awaitClick || step.awaitInput) && step.target && rect) || awaitsRelease;\n\n return (\n <div\n ref={ref}\n // Focusable but not tabbable: the trap above focuses the card itself rather than\n // its first button, so a screen reader reads the step's title and body before it\n // reads \"Next\" — and without this the container cannot take focus at all and the\n // trap silently does nothing.\n tabIndex={-1}\n style={style}\n data-tour-card=\"\"\n data-tour-docked={edge ?? undefined}\n className={cn(\n \"pointer-events-auto fixed z-[61] w-80 max-w-[calc(100vw-1.5rem)] rounded-lg border border-subtle bg-surface p-4 shadow-xl outline-none transition-all duration-200 ease-out\",\n // Docked, the height is capped: the body scrolls, the title and buttons stay.\n docked && \"flex flex-col\",\n )}\n >\n <div className=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm font-semibold text-primary\">\n <span>{step.title}</span>\n {step.optional && (\n <span className=\"rounded-full border border-subtle px-1.5 py-px text-xs font-normal text-muted\">\n {labels.optional}\n </span>\n )}\n </div>\n <div\n id={bodyId}\n className={cn(\"mt-1 text-sm leading-relaxed text-secondary\", docked && \"min-h-0 shrink overflow-y-auto\")}\n >\n {step.body}\n </div>\n {step.action && <div className=\"mt-3\">{step.action}</div>}\n <div className=\"mt-4 space-y-2\">\n <div className=\"flex items-center justify-between gap-2\">\n <button type=\"button\" onClick={onSkip} className=\"text-xs text-placeholder hover:text-secondary\">\n {labels.skip}\n </button>\n <div className=\"flex items-center gap-2\">\n <span className=\"whitespace-nowrap text-xs tabular-nums text-placeholder\">\n {labels.step(position, total)}\n </span>\n {!isFirst && (\n <Button variant=\"secondary\" onClick={onBack} className=\"px-2.5 py-1 text-xs\">\n {labels.back}\n </Button>\n )}\n {/* On an awaitClick step the Next button is replaced by a hint on its\n own row below, so it doesn't cram the counter + buttons and wrap.\n Only when the target was actually FOUND, though — `rect` is null\n when the finder gave up, and the click listener early-returns on\n the same absence. Keyed on `step.target` alone this hid the only\n way forward on any step whose anchor happens not to be rendered\n for this user (a guest sees no \"add account\" button), leaving the\n undocumented ArrowRight key as the sole escape. */}\n {/* \"Leave empty\" (§11.2): an optional field may stay empty, so the step can\n move on without it. Gone once the field is filled. */}\n {step.optional && locked && !awaitsTarget && (\n <Button variant=\"secondary\" onClick={onLeaveEmpty} className=\"px-2.5 py-1 text-xs\">\n {labels.leaveEmpty}\n </Button>\n )}\n {!awaitsTarget && (\n <Button\n variant=\"accent\"\n onClick={onNext}\n // Locked, not disabled (§11.1): it stays focusable, and a press focuses the\n // field and reads the hint again.\n aria-disabled={locked || undefined}\n aria-describedby={locked ? hintId : undefined}\n className={cn(\"px-2.5 py-1 text-xs\", locked && \"opacity-60\")}\n >\n {isLast ? labels.done : labels.next}\n </Button>\n )}\n </div>\n </div>\n {awaitsTarget && (\n <div className=\"text-center text-xs italic text-placeholder\">\n {awaitsRelease\n ? (step.awaitGateHint ?? labels.awaitGateHint)\n : step.awaitInput && !step.awaitClick\n ? labels.awaitInputHint\n : labels.awaitClickHint}\n </div>\n )}\n {/* Always mounted on an awaitGate step, so a refusal is read out (assertively)\n the moment it lands. */}\n {awaitsRelease && (\n <div aria-live=\"assertive\" aria-atomic=\"true\" className=\"space-y-1\">\n {refusal && (\n <p data-tour-refused=\"\" className=\"text-xs text-danger\">\n {refusal.reason ?? labels.awaitGateRefused}\n {refusal.seq % 2 === 0 ? \"\\u200b\" : \"\"}\n </p>\n )}\n {refusal && backTo && (\n <Button variant=\"link\" onClick={backTo.go} className=\"text-xs\">\n {labels.backToStep(backTo.title)}\n </Button>\n )}\n </div>\n )}\n {locked && !awaitsTarget && (\n <div id={hintId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sBAAQ,UAAU,OAAO;AAAA,cACzB,QAAQ,MAAM,MAAM,IAAI,WAAW;AAAA,eACtC;AAAA,YAED,WAAW,UACV,oBAAC,UAAO,SAAQ,QAAO,SAAS,OAAO,IAAI,WAAU,WAClD,iBAAO,WAAW,OAAO,KAAK,GACjC;AAAA,aAEJ;AAAA,UAED,UAAU,CAAC,gBACV,oBAAC,SAAI,IAAI,QAAQ,WAAU,+CACxB,oBACH;AAAA,WAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["layer"]}
1
+ {"version":3,"sources":["../../src/tour/tour-overlay.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useEffectEvent,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n useSyncExternalStore,\n} from \"react\";\nimport type { CSSProperties, RefObject } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { cn } from \"../lib/cn\";\nimport { Button } from \"../components/button\";\nimport { firstTabStop, tabStops, useFocusTrap } from \"../hooks/use-focus-trap\";\nimport { useDismissLayer } from \"../hooks/use-dismiss\";\nimport { sameRect } from \"../hooks/use-anchored-rect\";\nimport { anchoredInline, viewportSize } from \"../hooks/use-anchored-panel\";\nimport { useBreakpoint } from \"../hooks/use-breakpoint\";\nimport { useCoarsePointer } from \"../hooks/use-large-text\";\nimport { dirOf, horizontalStep } from \"../lib/direction\";\nimport { isEditableContent } from \"../lib/editable-content\";\nimport { isComposing } from \"../lib/ime\";\nimport { focusQuietly } from \"../lib/quiet-focus\";\nimport type { Direction } from \"../lib/direction\";\nimport type { TourLabels, TourPlacement, TourStep, TourStepContext } from \"./tour\";\nimport { devWarnings, isShown, stepContext, type GateRegistry } from \"./tour-gates\";\nimport { dockEdge, dockStyle, readBand, scrollIntoFreeHalf, type DockEdge } from \"./tour-dock\";\n\n/*\n * # The tour's overlay: the card, the spotlight and its shields, the placement, the dock\n *\n * Its own module since 0.52 (refactor audit 2026-10-30, MOD-1): `TourProvider` is mounted\n * above every app's routes and renders this only while a tour runs, so it is loaded by a\n * literal `import()` when a tour first starts (tour.tsx), not with the provider — about\n * 28.5 kB minified, 10.3 kB gzip that sat in each app's first load (measured at 0.51.6). Nothing here is public; what\n * the provider shares with it (the step context, `when`, the gates) is in tour-gates.ts.\n */\n\n/** The app's `refuse` on the step that awaits its key (§11.4). */\nexport interface Refusal {\n step: TourStep;\n reason?: string;\n /** Bumped per refusal, so the same words are announced again. */\n seq: number;\n}\n\nconst NOOP = () => {};\n\n/** The first step in [floor, index) shown now whose gate is published and unsatisfied, or -1. */\nfunction firstEmptied(steps: TourStep[], floor: number, index: number, gates: GateRegistry): number {\n const ctx = stepContext(gates, \"goto\");\n for (let j = floor; j < index; j++) {\n const key = steps[j].gate;\n if (key && gates.get(key) === false && isShown(steps[j], ctx)) return j;\n }\n return -1;\n}\n\ninterface Rect {\n top: number;\n left: number;\n width: number;\n height: number;\n}\n\nfunction isVisible(el: Element): boolean {\n // A non-zero box already rules out display:none on the element or any ancestor\n // (an unrendered element measures 0x0). We deliberately do NOT test\n // offsetParent: it is null for position:fixed elements even when fully visible,\n // which made the mobile bottom-nav bar (fixed) un-highlightable on mobile\n // (feedback #313). visibility:hidden keeps a box, so check it explicitly.\n const r = el.getBoundingClientRect();\n if (r.width <= 0 || r.height <= 0) return false;\n const style = getComputedStyle(el);\n return style.visibility !== \"hidden\" && style.display !== \"none\";\n}\n\n// The first VISIBLE element matching the selector, not merely the first in DOM\n// order. This lets a step target the same control across layouts with one\n// combined selector — e.g. the desktop sidebar link AND the mobile bottom-bar\n// link — where the off-layout copy is present but `display:none` (feedback\n// #313). Returns null while none is visible so the finder keeps retrying.\nfunction queryVisibleTarget(selector: string): Element | null {\n const els = document.querySelectorAll(selector);\n for (const el of els) {\n if (isVisible(el)) return el;\n }\n return null;\n}\n\nfunction rectOf(el: Element): Rect {\n const r = el.getBoundingClientRect();\n return { top: r.top, left: r.left, width: r.width, height: r.height };\n}\n\n/** The two-tone frame's width outside the spot (3px white, 2px keyline), plus a pixel. */\nconst RING_BAND = 6;\n\n/**\n * What a step's ring frames (keksdose S1, §11.6): the target, and on a FIELD step also the\n * lines that describe the field from outside it — the elements its `aria-describedby`\n * (on the target or a control inside) names that lie within the ring's reach of it (a\n * caption, a hint or warning line, an error drawn under or above the field). Without\n * them the ring's frame ran through such a line; with them it frames field and line, and\n * the line is lit, not under the scrim. A kit field's own caption and error are inside\n * its root already. A line far away (a tooltip, another part of the page) is not taken.\n */\nfunction spotRectOf(el: Element, step: TourStep): Rect {\n const own = rectOf(el);\n if (!isFieldStep(step)) return own;\n const ids = new Set<string>();\n const holders = [el, ...Array.from(el.querySelectorAll(\"[aria-describedby]\"))];\n for (const holder of holders) {\n for (const id of (holder.getAttribute(\"aria-describedby\") ?? \"\").split(/\\s+/)) if (id) ids.add(id);\n }\n if (ids.size === 0) return own;\n const lines: DOMRect[] = [];\n for (const id of ids) {\n const line = document.getElementById(id);\n if (!line || el.contains(line) || line.closest('[role=\"tooltip\"]') || !isVisible(line)) continue;\n const r = line.getBoundingClientRect();\n // An `sr-only` description measures 1×1: nothing to frame.\n if (r.width > 1 && r.height > 1) lines.push(r);\n }\n let top = own.top;\n let left = own.left;\n let right = own.left + own.width;\n let bottom = own.top + own.height;\n const reach = (step.padding ?? 8) + RING_BAND;\n // Grow until nothing more is in reach: a hint under the field, then an error under it.\n for (let grew = true; grew;) {\n grew = false;\n for (let i = lines.length - 1; i >= 0; i--) {\n const r = lines[i];\n const across = r.left < right && r.right > left;\n const gap = Math.max(r.top - bottom, top - r.bottom);\n if (!across || gap > reach) continue;\n top = Math.min(top, r.top);\n left = Math.min(left, r.left);\n right = Math.max(right, r.right);\n bottom = Math.max(bottom, r.bottom);\n lines.splice(i, 1);\n grew = true;\n }\n }\n return { top, left, width: right - left, height: bottom - top };\n}\n\n/**\n * What the finder established for ONE step: where its target is (`null` = no target,\n * or not on the page), and the reading direction the card takes from it.\n *\n * It carries the step it was found for, and the overlay only believes it for that\n * step — which is the whole fix for keksdose's tours audit 2026-10-02, §1.0 A (\"stale\n * spotlight on the step after a spotlighted one\", 15 steps in 16 tours, desktop and\n * phone, mouse and keyboard). When step N spotlit a target and step N+1 had none (or\n * its anchor was missing), N+1 kept N's hole and parked its card beside it, so a\n * centred \"You're all set\" read as pointing at the Import & Export link; Back→Next kept\n * it for as long as anyone watched.\n *\n * The overlay used to hold `rect` and `ready` as separate states and reset them\n * DURING RENDER when the step changed. React 19 does not keep a render-phase update\n * while an earlier, lower-priority update to the same hook is still queued — it only\n * writes the result to the base state \"unless the queue is empty\" — and the follow\n * interval below queues exactly such an update every 250 ms (eagerly bailed out because\n * the rect had not moved, but left in the queue for rebasing). So the click's render\n * showed the reset, and the very next render (the finder saying \"ready\") re-based on\n * the old rect. A deep link was fine because nothing had queued anything yet.\n *\n * Keying the result to its step does not depend on any of that ordering: a rect found\n * for another step is not this step's rect, whatever the queue does with it, and a\n * missing anchor reads as \"no target\" instead of as the last thing that was lit.\n */\ninterface Located {\n index: number;\n step: TourStep;\n rect: Rect | null;\n dir: Direction;\n /**\n * A field step's own container (§11.6): inserted right after the kit layer holding the\n * target (`host.after`), or at the end of <body> on the page. `null` on a plain step,\n * which is portalled to <body> at z-[60] as ever.\n */\n layer: HTMLElement | null;\n /** The host fills the visual viewport (a phone's FullBleedDialog): no scrim, no shields. */\n fullScreen: boolean;\n}\n\n/** The kit layer (`data-kit-layer`) holding `el`, if any. */\nfunction layerHost(el: Element): HTMLElement | null {\n return el.closest<HTMLElement>(\"[data-kit-layer]\");\n}\n\n/**\n * Does the host fill the visual viewport? A backdrop host (`data-kit-layer=\"backdrop\"`:\n * Modal, FullBleedDialog) is judged by its panel, the child holding the target.\n */\nfunction coversViewport(host: HTMLElement, el: Element): boolean {\n let surface: Element = host;\n if (host.getAttribute(\"data-kit-layer\") === \"backdrop\") {\n for (const child of Array.from(host.children)) {\n if (child.contains(el)) {\n surface = child;\n break;\n }\n }\n }\n const r = surface.getBoundingClientRect();\n const vv = window.visualViewport;\n // Without a visual viewport, the glass (`viewportSize`), not `innerWidth`: an overflow\n // grows the layout viewport, and a sheet as wide as the screen read as narrower than it\n // (refactor audit 2026-10-30, DUP-9; live #381).\n const view = viewportSize();\n const top = vv?.offsetTop ?? 0;\n const bottom = top + (vv?.height ?? view.height);\n const width = vv?.width ?? view.width;\n return r.width > 0 && r.left <= 1 && r.top <= top + 1 && r.right >= width - 1 && r.bottom >= bottom - 1;\n}\n\n/** Does this step's card dock now (§11.7)? Below `sm` (`phone`), and `\"dock\"` or a field\n * step with no placement while the provider docks on phones. */\nfunction docks(step: TourStep, dockOnPhones: boolean, phone: boolean): boolean {\n if (!phone || !step.target) return false;\n return step.placement === \"dock\" || (step.placement === undefined && dockOnPhones && isFieldStep(step));\n}\n\n/** A step whose control is for using: its card joins the layer stack above the field (§11.6). */\nfunction isFieldStep(step: TourStep): boolean {\n return !!(step.interactive || step.awaitInput || step.gate || step.awaitGate);\n}\n\nexport function TourOverlay({\n steps,\n index,\n via,\n floor,\n position,\n count,\n refusal,\n onGoTo,\n labels,\n gates,\n dockOnPhones,\n onNext,\n onPrev,\n onSkip,\n}: {\n steps: TourStep[];\n index: number;\n via: TourStepContext[\"via\"];\n floor: number;\n /** The app refused this step's save (§11.4). */\n refusal: Refusal | null;\n onGoTo: (index: number) => void;\n /** 1-based among the steps shown; Back is hidden on the first, Done on the last. */\n position: number;\n count: number;\n labels: TourLabels;\n gates: GateRegistry;\n dockOnPhones: boolean;\n onNext: () => void;\n onPrev: () => void;\n onSkip: () => void;\n}) {\n const step = steps[index];\n const isFirst = position <= 1;\n const isLast = position >= count;\n // A new step starts unlocated: whatever was found for another step (see `Located`)\n // is ignored, so the overlay renders nothing until the effect below has located THIS\n // step, and never the previous step's spotlight.\n const [located, setLocated] = useState<Located | null>(null);\n const current = located !== null && located.index === index && located.step === step ? located : null;\n const ready = current !== null;\n const rect = current?.rect ?? null;\n // The overlay is portalled to <body>, out of whatever `dir` subtree the app set, so it\n // takes the direction of the element it spotlights (the document's for a centered\n // step). Arrow keys and start/end placement read it.\n const dir: Direction = current?.dir ?? \"ltr\";\n const rootRef = useRef<HTMLDivElement>(null);\n const cardRef = useRef<HTMLDivElement>(null);\n const bodyId = useId();\n const hintId = useId();\n // Below `sm` at the text size in force (§3.3: 640 px at Normal, 800 at Large), the\n // question CSS's `max-sm:` asks — a fixed 640 docked nothing in a 700 px window at\n // Large, which lays the page out as a phone (refactor audit 2026-10-30, DUP-9).\n const phone = useBreakpoint(\"max-sm\");\n // A touch screen: the card takes focus, so no keyboard or pad opens before the step is\n // read (§11.8). Asked on arrival, not followed: a dependency of the arrival effect, a\n // 2-in-1's keyboard detached mid-step ran the arrival again and pulled the focus out of\n // the field being typed in (0.52 code review, tour-overlay.tsx).\n const coarse = useCoarsePointer();\n const coarseOnArrival = useEffectEvent(() => coarse);\n\n // The gate (§11.1). Re-rendered on every registry change while the tour runs.\n const gateVersion = useSyncExternalStore(gates.subscribe, gates.version, gates.version);\n const gateKey = step.gate;\n const enforced = !!gateKey && gates.has(gateKey);\n const locked = enforced && gates.get(gateKey) !== true;\n\n // The polite live region (§11.8): `gateReady` once a gate opens, the hint on a locked\n // Next. A repeat of the same words gets a trailing zero-width space so it is read again.\n const [polite, setPolite] = useState(\"\");\n const announce = useCallback((text: string) => {\n setPolite((prev) => (prev === text ? `${text}\\u200b` : text));\n }, []);\n\n // Run beforeStep, then locate the target (retrying across route/render lag).\n useEffect(() => {\n let cancelled = false;\n let raf = 0;\n // `null` = untargeted, or the finder gave up → the card centres, with no hole.\n const settle = (el: Element | null) => {\n let layer: HTMLElement | null = null;\n let fullScreen = false;\n if (el && isFieldStep(step)) {\n // §11.6: directly above the layer holding the field — DOM order decides between\n // the kit's z-50 body children, so this paints over the host and everything opened\n // before it, and under whatever the field opens next (a list, the number pad).\n const host = layerHost(el);\n layer = document.createElement(\"div\");\n layer.setAttribute(\"data-tour-layer\", \"\");\n if (host) host.after(layer);\n else document.body.appendChild(layer);\n fullScreen = !!host && coversViewport(host, el);\n }\n setLocated({ index, step, rect: el ? spotRectOf(el, step) : null, dir: dirOf(el), layer, fullScreen });\n };\n void (async () => {\n try {\n await step.beforeStep?.(stepContext(gates, via));\n } catch (error) {\n // The step is shown anyway (FLW-5): left unlocated, the tour stayed `active`\n // with no card, no scrim and no Escape layer, and everything keyed on \"a tour\n // runs\" (the `?tour=` mirror, the apps' PWA-update hold) stayed on with it. The\n // target may well be there regardless; if not, the finder gives up and centres.\n console.error(error);\n }\n if (cancelled) return;\n if (!step.target) {\n settle(null);\n return;\n }\n let tries = 0;\n const find = () => {\n if (cancelled) return;\n const el = queryVisibleTarget(step.target!);\n if (el) {\n // A docked step scrolls the field into the half the card leaves free, through\n // the field's own scroll container (§11.7); any other centres it, as ever.\n if (docks(step, dockOnPhones, phone)) scrollIntoFreeHalf(el, null, null);\n else el.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n settle(el);\n return;\n }\n if (tries++ < 45) raf = requestAnimationFrame(find);\n else settle(null); // give up → render centered\n };\n find();\n })();\n return () => {\n cancelled = true;\n cancelAnimationFrame(raf);\n };\n // `via` and the gates are read at arrival, not followed.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [index, step]);\n\n // Follow the target as the page scrolls / reflows — only once THIS step is located,\n // and only into this step's result.\n useEffect(() => {\n if (!step.target) return;\n const update = () => {\n const el = queryVisibleTarget(step.target!);\n if (el) {\n const next = spotRectOf(el, step);\n // A sheet that grows to full screen (or shrinks from it) takes or drops the scrim.\n const host = layerHost(el);\n const full = !!host && coversViewport(host, el);\n setLocated((prev) => {\n if (!prev || prev.index !== index || prev.step !== step) return prev;\n const fullScreen = prev.layer ? full : prev.fullScreen;\n if (sameRect(prev.rect, next) && fullScreen === prev.fullScreen) return prev;\n return { ...prev, rect: next, fullScreen };\n });\n }\n };\n window.addEventListener(\"scroll\", update, true);\n window.addEventListener(\"resize\", update);\n const id = window.setInterval(update, 250);\n return () => {\n window.removeEventListener(\"scroll\", update, true);\n window.removeEventListener(\"resize\", update);\n clearInterval(id);\n };\n }, [index, step]);\n\n // A field step's container goes with the step (and with the tour).\n const layer = located?.layer ?? null;\n useEffect(() => {\n if (!layer) return;\n return () => layer.remove();\n }, [layer]);\n\n // Escape (§11.6.4): the tour is a layer on the kit's Escape stack, pushed on each\n // arrival, so it sits above the sheet holding the form. Escape from the card skips the\n // tour and no longer also closes that sheet; a layer the field opens afterwards (a\n // list, the pad) is above the tour and takes Escape first. An Escape pressed in the\n // field itself belongs to the field: the tour lets it pass by doing nothing.\n useDismissLayer(\n ready,\n (e) => {\n if (interactive && step.target && e.target instanceof Node) {\n const el = queryVisibleTarget(step.target);\n if (el?.contains(e.target)) return;\n }\n onSkip();\n },\n // Not an overlay to `useOverlayOpen`: a floating launcher a tour spotlights stays.\n { overlay: false },\n );\n\n // awaitClick: advance when the *real* target is clicked. The spotlight hole is\n // click-through (see the shields in the render below) so the element's own\n // handler runs first; we step forward on the next macrotask.\n //\n // Re-armed when the target turns up after the finder gave up (the follow effect\n // lights it late): the card swaps Next for the \"click the highlighted element\" hint\n // as soon as there is a rect, so the click must work from that moment too.\n const spotted = rect !== null;\n useEffect(() => {\n if (!ready || !spotted || !step.awaitClick || !step.target) return;\n const el = queryVisibleTarget(step.target);\n if (!el) return;\n const onClick = () => window.setTimeout(() => onNext(), 0);\n el.addEventListener(\"click\", onClick, { once: true });\n return () => el.removeEventListener(\"click\", onClick);\n }, [ready, spotted, index, step, onNext]);\n\n // A field step (see `TourStep.interactive`): only while the target is lit — a step\n // whose target is missing centres its card over a full scrim, modal as ever. The one\n // `isFieldStep`, as the layer insertion in `settle` reads it: an inline copy of its\n // flags, and an alias of that, could drift from it (0.52 code review, tour-overlay.tsx).\n const interactive = spotted && !!step.target && isFieldStep(step);\n // A GUIDED field step (§11.8): focus goes to the field on a fine pointer, and Tab\n // cycles field + card. A plain `interactive` step keeps the card's own trap.\n const guided = interactive && !!(step.gate || step.awaitInput || step.awaitGate);\n // An awaitGate step whose target is lit: only `release` moves it (a missing Save\n // button would otherwise be a dead end, as for awaitClick).\n const awaitsRelease = spotted && !!step.target && !!step.awaitGate;\n\n // A gate nobody publishes is not enforced: Next opens, and a development build says why\n // (on arrival, or when its publisher unmounts under the step), once per step.\n const warnedGateRef = useRef<TourStep | null>(null);\n useEffect(() => {\n if (!ready || !gateKey || gates.has(gateKey) || !devWarnings() || warnedGateRef.current === step) return;\n warnedGateRef.current = step;\n console.warn(\n `[ui-kit] Tour step \"${step.title}\" waits for the gate \"${gateKey}\", which nothing publishes: its Next is open. ` +\n \"Publish it with useTourGate beside the field, or the form has closed under the tour.\",\n );\n }, [ready, gateKey, gates, step, gateVersion]);\n\n // `optional` means \"may stay EMPTY\": without a gate there is no value to compare.\n useEffect(() => {\n if (!ready || !step.optional || step.gate || !devWarnings()) return;\n console.warn(\n `[ui-kit] Tour step \"${step.title}\" is \\`optional\\` without a \\`gate\\`: it shows the Optional chip ` +\n 'and a plain Next. \"Leave empty\" needs a gate to compare.',\n );\n }, [ready, step]);\n\n // \"Ready\" once, when this step's gate turns satisfied (not when it arrives satisfied).\n const wasLockedRef = useRef<{ step: TourStep; locked: boolean } | null>(null);\n useEffect(() => {\n if (!ready || !gateKey) return;\n const before = wasLockedRef.current;\n if (before && before.step === step && before.locked && !locked && enforced) announce(labels.gateReady);\n wasLockedRef.current = { step, locked };\n }, [ready, gateKey, step, locked, enforced, announce, labels.gateReady]);\n\n // Arrival on a guided step: the field takes focus on a fine pointer, the card on a\n // coarse one; the field is described by the card's body while the step lasts.\n // Declared BEFORE the advance listeners below, so the focus it moves is not mistaken\n // for the person leaving the field.\n useEffect(() => {\n if (!ready || !guided || !step.target) return;\n const el = queryVisibleTarget(step.target);\n const control = el ? firstTabStop(el) : null;\n // Described BEFORE it is focused, so a screen reader reads the step with the field's\n // name. Focused quietly (0.50.1, keksdose B1): a picker that opens on focus stays\n // closed, or its list would cover the card; ArrowDown, typing or a click opens it.\n const previous = control ? control.getAttribute(\"aria-describedby\") : null;\n if (control) control.setAttribute(\"aria-describedby\", previous ? `${previous} ${bodyId}` : bodyId);\n if (coarseOnArrival() || !control) cardRef.current?.focus();\n else if (!el!.contains(document.activeElement)) focusQuietly(control);\n if (!control) return;\n return () => {\n if (previous === null) control.removeAttribute(\"aria-describedby\");\n else control.setAttribute(\"aria-describedby\", previous);\n };\n }, [ready, guided, index, step, bodyId]);\n\n // Tab on a guided step cycles field + card as one ring (§11.8): from the field's last\n // stop to the card's first, from the card's last back to the field. Captured on the\n // document, ahead of a sheet's own trap, which would wrap inside the sheet.\n useEffect(() => {\n if (!ready || !guided || !step.target) return;\n const onTab = (e: KeyboardEvent) => {\n if (e.key !== \"Tab\") return;\n const el = queryVisibleTarget(step.target!);\n const card = cardRef.current;\n if (!el || !card) return;\n const active = document.activeElement;\n const fieldStops = tabStops(el);\n const cardStops = tabStops(card);\n if (fieldStops.length === 0 || cardStops.length === 0) return;\n let to: HTMLElement | null = null;\n if (active instanceof Node && el.contains(active)) {\n if (!e.shiftKey && active === fieldStops[fieldStops.length - 1]) to = cardStops[0];\n else if (e.shiftKey && active === fieldStops[0]) to = cardStops[cardStops.length - 1];\n } else if (active instanceof Node && card.contains(active)) {\n if (!e.shiftKey && active === cardStops[cardStops.length - 1]) to = fieldStops[0];\n else if (e.shiftKey && (active === cardStops[0] || active === card)) to = fieldStops[fieldStops.length - 1];\n }\n if (!to) return;\n e.preventDefault();\n e.stopPropagation();\n to.focus();\n };\n document.addEventListener(\"keydown\", onTab, true);\n return () => document.removeEventListener(\"keydown\", onTab, true);\n }, [ready, guided, index, step]);\n\n // gate: once satisfied, advance on Enter in the field (unless the control took it, or\n // a textarea without Ctrl/Cmd) or on focus leaving the field to nowhere or to the card.\n // Checked on the next macrotask, after the field's own blur/Enter commit has rendered.\n useEffect(() => {\n if (!ready || !spotted || !gateKey || !step.target) return;\n const el = queryVisibleTarget(step.target) as HTMLElement | null;\n if (!el) return;\n const satisfied = () => !gates.has(gateKey) || gates.get(gateKey) === true;\n let timer = 0;\n // Focus that was in the field when the step settled, or went there since. A focus\n // move the tour made itself (the card taking it on a phone) is not a leave.\n let armed = el.contains(document.activeElement);\n const check = () => {\n window.clearTimeout(timer);\n timer = window.setTimeout(() => {\n if (satisfied()) onNext();\n }, 0);\n };\n const onFocusIn = () => {\n armed = true;\n };\n const onFocusOut = (e: FocusEvent) => {\n const to = e.relatedTarget;\n if (to instanceof Node && el.contains(to)) return;\n const wasArmed = armed;\n armed = false;\n if (!wasArmed) return;\n if (to === null || (to instanceof Node && rootRef.current?.contains(to))) check();\n };\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key !== \"Enter\" || !(e.target instanceof Node) || !el.contains(e.target)) return;\n // Heard at the document, after React's handlers: a combobox picking an option has\n // called preventDefault by now.\n if (e.defaultPrevented || isComposing(e)) return;\n if (e.target instanceof HTMLTextAreaElement && !(e.ctrlKey || e.metaKey)) return;\n check();\n };\n el.addEventListener(\"focusin\", onFocusIn);\n el.addEventListener(\"focusout\", onFocusOut);\n document.addEventListener(\"keydown\", onKeyDown);\n return () => {\n window.clearTimeout(timer);\n el.removeEventListener(\"focusin\", onFocusIn);\n el.removeEventListener(\"focusout\", onFocusOut);\n document.removeEventListener(\"keydown\", onKeyDown);\n };\n }, [ready, spotted, gateKey, gates, index, step, onNext]);\n\n // awaitInput: advance once the target's fields hold another value than when the step\n // was armed, checked when focus leaves the target or Enter is pressed in it — on the\n // next macrotask, after the field's own blur/Enter commit has rendered. A value the\n // number pad typed fires no native `change`, so comparing is what catches it.\n useEffect(() => {\n if (!ready || !spotted || !step.awaitInput || !step.target) return;\n const el = queryVisibleTarget(step.target) as HTMLElement | null;\n if (!el) return;\n const read = () => fieldValues(el);\n const before = read();\n let timer = 0;\n let done = false;\n const check = () => {\n window.clearTimeout(timer);\n timer = window.setTimeout(() => {\n if (done || read() === before) return;\n done = true;\n onNext();\n }, 0);\n };\n const onFocusOut = (e: FocusEvent) => {\n if (e.relatedTarget instanceof Node && el.contains(e.relatedTarget)) return;\n check();\n };\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Enter\") check();\n };\n el.addEventListener(\"focusout\", onFocusOut);\n el.addEventListener(\"keydown\", onKeyDown);\n el.addEventListener(\"change\", check);\n return () => {\n window.clearTimeout(timer);\n el.removeEventListener(\"focusout\", onFocusOut);\n el.removeEventListener(\"keydown\", onKeyDown);\n el.removeEventListener(\"change\", check);\n };\n }, [ready, spotted, index, step, onNext]);\n\n /** A press on the locked Next (or Enter / → from the card): no move; the field takes\n * focus and the hint is read again. */\n const gateHint = step.gateHint ?? labels.gateHint;\n const lockedNext = useCallback(() => {\n const el = step.target ? queryVisibleTarget(step.target) : null;\n const control = el ? firstTabStop(el) : null;\n // Quietly, as on arrival: the hint is read with the card in view, not under a list.\n if (control) focusQuietly(control);\n announce(gateHint);\n }, [step.target, announce, gateHint]);\n const tryNext = awaitsRelease ? NOOP : locked ? lockedNext : onNext;\n\n // After a refused save: the first earlier step shown whose field is now empty (§11.4).\n // Computed each render, which the gate subscription above triggers: a field filled\n // again drops the link.\n const backTo = refusal ? firstEmptied(steps, floor, index, gates) : -1;\n\n // Keyboard: Esc skips, Enter and the reading-direction arrow advance (→ in LTR,\n // ← in RTL), the other arrow goes back. On awaitClick steps Enter is ignored (it\n // would fire the target's click AND advance) — the forward arrow stays as an escape\n // hatch. On a locked gate step both are the locked Next.\n //\n // Enter on a focused control belongs to that control. This used to advance from\n // anywhere, so Enter on a focused Skip or Back ran the button's own click AND stepped\n // forward: Back moved nowhere, Skip skipped and then called `next` on a dead tour.\n // The same goes for arrows in a text field a step's `action` might contain.\n useEffect(() => {\n const onKey = (e: KeyboardEvent) => {\n // On an interactive step a key pressed in the target, or in a layer it opened (the\n // number pad's Escape, a menu's arrows), is the page's. The card's and the bare\n // page's (focus on <body>) stay the tour's.\n if (\n interactive &&\n e.target instanceof Node &&\n e.target !== document.body &&\n !rootRef.current?.contains(e.target)\n ) {\n return;\n }\n // Escape is the tour's Escape layer's (above) once the step is shown; while it is\n // still being located there is no layer yet, and the tour takes it here as in 0.49.\n if (e.key === \"Escape\") {\n if (!ready) onSkip();\n return;\n }\n // Nothing on screen to move on from: a step whose `beforeStep` is still running\n // (a route loading) is not passed over by an Enter or a → pressed on the bare\n // page (FLW-5). Escape, above, still leaves.\n if (!ready) return;\n if (e.key === \"Enter\") {\n if (step.awaitClick || step.awaitInput || ownsKey(e.target, \"Enter\")) return;\n e.preventDefault();\n tryNext();\n return;\n }\n if (ownsKey(e.target, e.key)) return;\n // The overlay root carries `dir`; before it paints, the document's answers.\n const delta = horizontalStep(e.key, rootRef.current);\n if (delta === 1) {\n e.preventDefault();\n tryNext();\n } else if (delta === -1) {\n if (!isFirst) onPrev();\n }\n };\n document.addEventListener(\"keydown\", onKey);\n return () => document.removeEventListener(\"keydown\", onKey);\n }, [isFirst, step, interactive, tryNext, onPrev, onSkip, ready]);\n\n if (!ready) return null;\n\n // No scrim, no shields: a field step inside a layer that fills the screen (§11.6.3).\n const bare = interactive && !!current?.fullScreen;\n const pad = step.padding ?? 8;\n const spot: Rect | null = rect\n ? { top: rect.top - pad, left: rect.left - pad, width: rect.width + pad * 2, height: rect.height + pad * 2 }\n : null;\n\n // `aria-modal` promises the page behind is out of reach, and the card's focus trap\n // keeps that promise for the keyboard. The pointer used to get no such treatment: the\n // root is `pointer-events-none` so that the spotlight hole can stay live for\n // `awaitClick`, and the scrim is a box-shadow, which takes no clicks — so every\n // control on the dimmed page stayed clickable. Four shields now tile the viewport\n // around the hole: the page is blocked, the card and the spotlighted target are not.\n // Keeping `aria-modal` (rather than dropping it) is the coherent half: the tour\n // really is modal — focus is trapped and Esc/Skip is the way out.\n return createPortal(\n <div\n ref={rootRef}\n // z-50 on a field step, in its own container right after the layer holding the field\n // (or at the end of <body>): over that layer and the page, under the z-50 layers the\n // field opens next (§11.6). z-[60] on a plain step, over everything.\n className={cn(\"pointer-events-none fixed inset-0\", interactive ? \"z-50\" : \"z-[60]\")}\n role=\"dialog\"\n aria-modal={interactive ? undefined : \"true\"}\n // A stable marker for the overlay, on every step (0.48, keksdose dev#611–613): an\n // app that hides its floating help launcher while a modal is open excepts the\n // tour, which may spotlight that launcher — `[aria-modal=\"true\"]:not([data-tour-overlay])`.\n // keksdose matched the `pointer-events-none` class until now, which is the kit's to change.\n data-tour-overlay=\"\"\n data-tour-interactive={interactive ? \"\" : undefined}\n data-tour-bare={bare ? \"\" : undefined}\n aria-label={step.title}\n dir={dir}\n >\n {/* In a full-screen layer (a phone's form sheet) no scrim and no shields: the rest of\n the form stays usable and scrollable, and the ring alone marks the field. */}\n {spot && !bare && <SpotlightShields spot={spot} />}\n {spot ? (\n <div\n className=\"pointer-events-none fixed rounded-lg transition-all duration-200 ease-out\"\n style={{\n top: spot.top,\n left: spot.left,\n width: spot.width,\n height: spot.height,\n // A two-tone frame, not a single translucent ring.\n //\n // The old treatment was `ring-2 ring-white/80` over a 55% scrim, and it\n // \"was barely visible\" on the app's blue-tinted surfaces. Two reasons,\n // and a single ring can't fix either: at 55% the surround stays bright\n // enough that the un-dimmed hole barely reads AS a hole, and a 80%-white\n // ring sitting on the edge of a light card is white-on-near-white.\n //\n // So: an opaque white band immediately around the target, a dark keyline\n // outside it, then the scrim. Whatever the target's own colour is, one of\n // the two bands is always in contrast with it and the other is always in\n // contrast with the dimmed surround — there is no background that can\n // swallow both. The blurred layer between them softens the step so the\n // frame reads as lighting rather than as a pasted-on rectangle.\n boxShadow: [\n \"0 0 0 3px rgba(255,255,255,0.98)\",\n \"0 0 0 5px rgba(15,23,42,0.92)\",\n \"0 0 18px 6px rgba(15,23,42,0.45)\",\n ...(bare ? [] : [\"0 0 0 9999px rgba(15,23,42,0.70)\"]),\n ].join(\", \"),\n }}\n />\n ) : (\n <div className=\"pointer-events-auto fixed inset-0 bg-black/70\" />\n )}\n <TourCard\n cardRef={cardRef}\n step={step}\n index={index}\n position={position}\n total={count}\n labels={labels}\n isFirst={isFirst}\n isLast={isLast}\n rect={spot}\n dir={dir}\n trap={!guided}\n bodyId={bodyId}\n hintId={hintId}\n locked={locked}\n gateHint={gateHint}\n onBack={onPrev}\n onNext={tryNext}\n onLeaveEmpty={onNext}\n onSkip={onSkip}\n awaitsRelease={awaitsRelease}\n docked={spot !== null && docks(step, dockOnPhones, phone)}\n refusal={refusal}\n backTo={backTo >= 0 ? { title: steps[backTo].title, go: () => onGoTo(backTo) } : null}\n />\n <div className=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">\n {polite}\n </div>\n </div>,\n (interactive && current?.layer) || document.body,\n );\n}\n\n/** The values of the fields at or inside `el`, as one string to compare (`awaitInput`). */\nfunction fieldValues(el: Element): string {\n const fields = el.matches(\"input,textarea,select\") ? [el] : Array.from(el.querySelectorAll(\"input,textarea,select\"));\n return fields\n .map((f) =>\n f instanceof HTMLInputElement && (f.type === \"checkbox\" || f.type === \"radio\")\n ? String(f.checked)\n : (f as HTMLInputElement).value,\n )\n .join(\"\\u0000\");\n}\n\n/** Does the focused element handle `key` itself? Enter on a button or link, and any\n * editing key in a text field, a select or editable content, is the control's — not the\n * tour's. Editable content by the kit's one rule (lib/editable-content, 0.54 follow-up):\n * `isContentEditable` alone is missing in jsdom and in any engine without it, and there\n * Enter and → in an editor a step's `action` held stepped the tour on. */\nfunction ownsKey(target: EventTarget | null, key: string): boolean {\n if (!(target instanceof HTMLElement)) return false;\n if (isEditableContent(target)) return true;\n const tag = target.tagName;\n if (tag === \"TEXTAREA\" || tag === \"SELECT\") return true;\n if (tag === \"INPUT\") {\n const type = (target as HTMLInputElement).type;\n // Enter on a checkbox does nothing natively, but ←/→ on a radio moves it.\n return key !== \"Enter\" || type !== \"checkbox\";\n }\n if (key !== \"Enter\") return false;\n return (\n tag === \"BUTTON\" ||\n (tag === \"A\" && target.hasAttribute(\"href\")) ||\n target.getAttribute(\"role\") === \"button\" ||\n target.getAttribute(\"role\") === \"link\"\n );\n}\n\n/**\n * Transparent pointer blockers tiling the viewport around the spotlight hole: one\n * full-width band above and below, one on each side at the hole's own height. The hole\n * itself stays uncovered, so the target keeps its clicks.\n */\nfunction SpotlightShields({ spot }: { spot: Rect }) {\n const shield = \"pointer-events-auto fixed\";\n const bottom = spot.top + spot.height;\n return (\n <>\n <div\n data-tour-shield=\"\"\n className={shield}\n style={{ top: 0, left: 0, right: 0, height: Math.max(0, spot.top) }}\n />\n <div data-tour-shield=\"\" className={shield} style={{ top: bottom, left: 0, right: 0, bottom: 0 }} />\n <div\n data-tour-shield=\"\"\n className={shield}\n style={{ top: spot.top, left: 0, width: Math.max(0, spot.left), height: spot.height }}\n />\n <div\n data-tour-shield=\"\"\n className={shield}\n style={{ top: spot.top, left: spot.left + spot.width, right: 0, height: spot.height }}\n />\n </>\n );\n}\n\n/**\n * Card position (viewport px) for the given placement relative to the padded\n * spotlight `rect`. Omitted placement keeps the original auto behavior\n * (below → above → vertically centered); an explicit side flips to its opposite\n * if it would overflow, then clamps into the viewport. \"center\" (or no rect)\n * centers on screen.\n */\nfunction placeCard(\n rect: Rect | null,\n cw: number,\n ch: number,\n vw: number,\n vh: number,\n m: number,\n placement?: TourPlacement,\n dir: Direction = \"ltr\",\n): { top: number; left: number } {\n // The logical sides resolve to a physical one here, and only here.\n if (placement === \"start\") placement = dir === \"rtl\" ? \"right\" : \"left\";\n else if (placement === \"end\") placement = dir === \"rtl\" ? \"left\" : \"right\";\n // Every anchored panel's inline clamp (`anchoredInline`; refactor audit 2026-10-30,\n // DUP-9): `m` inside the glass, and a card wider than the room keeps its START on it.\n const clampX = (x: number) =>\n anchoredInline({ left: x, right: x + cw }, cw, { dir, align: \"left\", edge: m, viewportWidth: vw }).left;\n if (!rect || placement === \"center\") {\n return { top: Math.max(m, (vh - ch) / 2), left: clampX((vw - cw) / 2) };\n }\n const clampY = (y: number) => Math.min(Math.max(m, y), Math.max(m, vh - ch - m));\n const centerX = clampX(rect.left + rect.width / 2 - cw / 2);\n const centerY = clampY(rect.top + rect.height / 2 - ch / 2);\n const belowTop = rect.top + rect.height + m;\n const aboveTop = rect.top - ch - m;\n const rightLeft = rect.left + rect.width + m;\n const leftLeft = rect.left - cw - m;\n const fitsBelow = belowTop + ch <= vh;\n const fitsAbove = aboveTop >= 0;\n const fitsRight = rightLeft + cw <= vw;\n const fitsLeft = leftLeft >= 0;\n\n switch (placement) {\n case \"top\":\n return { top: fitsAbove ? aboveTop : fitsBelow ? belowTop : clampY(aboveTop), left: centerX };\n case \"bottom\":\n return { top: fitsBelow ? belowTop : fitsAbove ? aboveTop : clampY(belowTop), left: centerX };\n case \"right\":\n return { top: centerY, left: fitsRight ? rightLeft : fitsLeft ? leftLeft : clampX(rightLeft) };\n case \"left\":\n return { top: centerY, left: fitsLeft ? leftLeft : fitsRight ? rightLeft : clampX(leftLeft) };\n default:\n if (fitsBelow) return { top: belowTop, left: centerX };\n if (fitsAbove) return { top: aboveTop, left: centerX };\n return { top: Math.max(m, (vh - ch) / 2), left: centerX };\n }\n}\n\nfunction TourCard({\n cardRef: ref,\n step,\n index,\n position,\n total,\n labels,\n isFirst,\n isLast,\n rect,\n dir,\n trap,\n bodyId,\n hintId,\n locked,\n gateHint,\n onBack,\n onNext,\n onLeaveEmpty,\n onSkip,\n awaitsRelease,\n docked,\n refusal,\n backTo,\n}: {\n cardRef: RefObject<HTMLDivElement | null>;\n step: TourStep;\n index: number;\n /** 1-based among the steps shown (§11.3). */\n position: number;\n /** How many steps the run shows. */\n total: number;\n labels: TourLabels;\n isFirst: boolean;\n isLast: boolean;\n rect: Rect | null;\n dir: Direction;\n /** The card's own focus trap; off on a guided step, where field + card are one ring. */\n trap: boolean;\n bodyId: string;\n hintId: string;\n /** A gate step whose field is not filled yet (§11.1). */\n locked: boolean;\n gateHint: string;\n onBack: () => void;\n onNext: () => void;\n /** Moves on past an `optional` field left empty. */\n onLeaveEmpty: () => void;\n onSkip: () => void;\n /** An awaitGate step with its target lit: the hint in place of Next. */\n awaitsRelease: boolean;\n /** Pinned to the band's edge away from the field (§11.7). */\n docked: boolean;\n refusal: Refusal | null;\n /** The \"Back to …\" link after a refused save. */\n backTo: { title: string; go: () => void } | null;\n}) {\n const [style, setStyle] = useState<CSSProperties>({ opacity: 0 });\n\n /**\n * The card holds the focus, because the card is what the tour IS.\n *\n * The overlay above declares `role=\"dialog\" aria-modal=\"true\"` — it always has — and\n * then left focus wherever the page had put it. For a tour that is the most pointed\n * version of the audit's *\"Only Modal manages focus\"*: the whole component exists to\n * say \"look here\", and for a keyboard user \"here\" is the focus ring. They were told\n * the page was hidden, given no way to reach the Next button without Tabbing through\n * it, and left on a control the screen reader would no longer describe.\n *\n * It re-engages on every step, without any bookkeeping here, because `TourOverlay`\n * returns null while it re-locates the next target: the card genuinely unmounts and\n * remounts between steps. That is what keeps focus honest when the BUTTONS change —\n * \"Back\" does not exist on the first step, so stepping back onto it destroys the\n * control the press came from, and focus would otherwise fall to `<body>`, outside\n * this trap's own listener, where Tab walks straight into the page the overlay claims\n * to have hidden.\n *\n * **The cost, written down:** on an `awaitClick` step the user is asked to click the\n * spotlighted element, and they can no longer Tab to it. ArrowRight still advances\n * (the key handler in `TourOverlay` is on the document and does not care where focus\n * is), which is the escape hatch that step already documents for the case where the\n * target cannot be found. Containment is worth that: an `awaitClick` step is a\n * minority of steps, while focus stranded behind `aria-modal` is every step.\n *\n * A guided field step (`gate`, `awaitInput`, 0.50) is the exception: the field is\n * what the step is about, so the overlay focuses it (or the card, on a touch screen)\n * and runs one Tab ring over field + card itself.\n */\n useFocusTrap(ref, { active: trap });\n\n // Docked (§11.7): the edge it last took, for the hysteresis, and a tick bumped when the\n // band moves under an unmoved field (a pad or keyboard opening).\n const edgeRef = useRef<DockEdge | null>(null);\n const [bandTick, setBandTick] = useState(0);\n const [edge, setEdge] = useState<DockEdge | null>(null);\n useEffect(() => {\n if (!docked) return;\n let last = \"\";\n const look = () => {\n const target = step.target ? queryVisibleTarget(step.target) : null;\n const band = readBand(target, ref.current);\n const key = `${band.top}:${band.bottom}`;\n if (key === last) return;\n last = key;\n // A field the pad or keyboard now covers is brought back into the free half.\n if (target) {\n const r = target.getBoundingClientRect();\n if (r.top < band.top || r.bottom > band.bottom) {\n edgeRef.current = scrollIntoFreeHalf(target, ref.current, edgeRef.current);\n }\n }\n setBandTick((t) => t + 1);\n };\n const vv = window.visualViewport;\n vv?.addEventListener(\"resize\", look);\n vv?.addEventListener(\"scroll\", look);\n window.addEventListener(\"resize\", look);\n // The follow tick's cadence: it catches a pad opening, which moves nothing.\n const id = window.setInterval(look, 250);\n return () => {\n vv?.removeEventListener(\"resize\", look);\n vv?.removeEventListener(\"scroll\", look);\n window.removeEventListener(\"resize\", look);\n clearInterval(id);\n };\n }, [docked, step.target, ref]);\n\n useLayoutEffect(() => {\n const card = ref.current;\n if (!card) return;\n if (docked) {\n const target = step.target ? queryVisibleTarget(step.target) : null;\n const band = readBand(target, card);\n const next = rect ? dockEdge(rect, band, edgeRef.current, card.offsetHeight) : \"bottom\";\n edgeRef.current = next;\n setEdge(next);\n setStyle(dockStyle(next, rect, band));\n return;\n }\n setEdge(null);\n // The glass, not `innerWidth`: on a phone whose page overflows that is the grown\n // layout viewport, and a centred card sat off-centre by half the overflow (DUP-9).\n const view = viewportSize();\n setStyle(placeCard(rect, card.offsetWidth, card.offsetHeight, view.width, view.height, 12, step.placement, dir));\n }, [ref, rect, index, step.placement, step.target, dir, docked, bandTick]);\n\n const awaitsTarget = ((step.awaitClick || step.awaitInput) && step.target && rect) || awaitsRelease;\n\n return (\n <div\n ref={ref}\n // Focusable but not tabbable: the trap above focuses the card itself rather than\n // its first button, so a screen reader reads the step's title and body before it\n // reads \"Next\" — and without this the container cannot take focus at all and the\n // trap silently does nothing.\n tabIndex={-1}\n style={style}\n data-tour-card=\"\"\n data-tour-docked={edge ?? undefined}\n className={cn(\n \"pointer-events-auto fixed z-[61] w-80 max-w-[calc(100vw-1.5rem)] rounded-lg border border-subtle bg-surface p-4 shadow-xl outline-none transition-all duration-200 ease-out\",\n // Docked, the height is capped: the body scrolls, the title and buttons stay.\n docked && \"flex flex-col\",\n )}\n >\n <div className=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm font-semibold text-primary\">\n <span>{step.title}</span>\n {step.optional && (\n <span className=\"rounded-full border border-subtle px-1.5 py-px text-xs font-normal text-muted\">\n {labels.optional}\n </span>\n )}\n </div>\n <div\n id={bodyId}\n className={cn(\"mt-1 text-sm leading-relaxed text-secondary\", docked && \"min-h-0 shrink overflow-y-auto\")}\n >\n {step.body}\n </div>\n {step.action && <div className=\"mt-3\">{step.action}</div>}\n <div className=\"mt-4 space-y-2\">\n <div className=\"flex items-center justify-between gap-2\">\n <button type=\"button\" onClick={onSkip} className=\"text-xs text-placeholder hover:text-secondary\">\n {labels.skip}\n </button>\n <div className=\"flex items-center gap-2\">\n <span className=\"whitespace-nowrap text-xs tabular-nums text-placeholder\">\n {labels.step(position, total)}\n </span>\n {!isFirst && (\n <Button variant=\"secondary\" onClick={onBack} className=\"px-2.5 py-1 text-xs\">\n {labels.back}\n </Button>\n )}\n {/* On an awaitClick step the Next button is replaced by a hint on its\n own row below, so it doesn't cram the counter + buttons and wrap.\n Only when the target was actually FOUND, though — `rect` is null\n when the finder gave up, and the click listener early-returns on\n the same absence. Keyed on `step.target` alone this hid the only\n way forward on any step whose anchor happens not to be rendered\n for this user (a guest sees no \"add account\" button), leaving the\n undocumented ArrowRight key as the sole escape. */}\n {/* \"Leave empty\" (§11.2): an optional field may stay empty, so the step can\n move on without it. Gone once the field is filled. */}\n {step.optional && locked && !awaitsTarget && (\n <Button variant=\"secondary\" onClick={onLeaveEmpty} className=\"px-2.5 py-1 text-xs\">\n {labels.leaveEmpty}\n </Button>\n )}\n {!awaitsTarget && (\n <Button\n variant=\"accent\"\n onClick={onNext}\n // Locked, not disabled (§11.1): it stays focusable, and a press focuses the\n // field and reads the hint again.\n aria-disabled={locked || undefined}\n aria-describedby={locked ? hintId : undefined}\n className={cn(\"px-2.5 py-1 text-xs\", locked && \"opacity-60\")}\n >\n {isLast ? labels.done : labels.next}\n </Button>\n )}\n </div>\n </div>\n {awaitsTarget && (\n <div className=\"text-center text-xs italic text-placeholder\">\n {awaitsRelease\n ? (step.awaitGateHint ?? labels.awaitGateHint)\n : step.awaitInput && !step.awaitClick\n ? labels.awaitInputHint\n : labels.awaitClickHint}\n </div>\n )}\n {/* Always mounted on an awaitGate step, so a refusal is read out (assertively)\n the moment it lands. */}\n {awaitsRelease && (\n <div aria-live=\"assertive\" aria-atomic=\"true\" className=\"space-y-1\">\n {refusal && (\n <p data-tour-refused=\"\" className=\"text-xs text-danger\">\n {refusal.reason ?? labels.awaitGateRefused}\n {refusal.seq % 2 === 0 ? \"\\u200b\" : \"\"}\n </p>\n )}\n {refusal && backTo && (\n <Button variant=\"link\" onClick={backTo.go} className=\"text-xs\">\n {labels.backToStep(backTo.title)}\n </Button>\n )}\n </div>\n )}\n {locked && !awaitsTarget && (\n <div id={hintId} className=\"text-center text-xs italic text-placeholder\">\n {gateHint}\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";AAmsBI,SAoIA,UAhHoB,KApBpB;AAnsBJ;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,oBAAoB;AAC7B,SAAS,UAAU;AACnB,SAAS,cAAc;AACvB,SAAS,cAAc,UAAU,oBAAoB;AACrD,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,gBAAgB,oBAAoB;AAC7C,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AACjC,SAAS,OAAO,sBAAsB;AACtC,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAG7B,SAAS,aAAa,SAAS,mBAAsC;AACrE,SAAS,UAAU,WAAW,UAAU,0BAAyC;AAoBjF,MAAM,OAAO,MAAM;AAAC;AAGpB,SAAS,aAAa,OAAmB,OAAe,OAAe,OAA6B;AAClG,QAAM,MAAM,YAAY,OAAO,MAAM;AACrC,WAAS,IAAI,OAAO,IAAI,OAAO,KAAK;AAClC,UAAM,MAA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ACA;AAAA,gBAAC;AAAA;AAAA,kBACC,SAAQ;AAAA,kBACR,SAAS;AAAA,kBAGT,iBAAe,UAAU;AAAA,kBACzB,oBAAkB,SAAS,SAAS;AAAA,kBACpC,WAAW,GAAG,uBAAuB,UAAU,YAAY;AAAA,kBAE1D,mBAAS,OAAO,OAAO,OAAO;AAAA;AAAA,cACjC;AAAA,eAEJ;AAAA,aACF;AAAA,UACC,gBACC,oBAAC,SAAI,WAAU,+CACZ,0BACI,KAAK,iBAAiB,OAAO,gBAC9B,KAAK,cAAc,CAAC,KAAK,aACvB,OAAO,iBACP,OAAO,gBACf;AAAA,UAID,iBACC,qBAAC,SAAI,aAAU,aAAY,eAAY,QAAO,WAAU,aACrD;AAAA,uBACC,qBAAC,OAAE,qBAAkB,IAAG,WAAU,uBAC/B;AAAA,sBAAQ,UAAU,OAAO;AAAA,cACzB,QAAQ,MAAM,MAAM,IAAI,WAAW;AAAA,eACtC;AAAA,YAED,WAAW,UACV,oBAAC,UAAO,SAAQ,QAAO,SAAS,OAAO,IAAI,WAAU,WAClD,iBAAO,WAAW,OAAO,KAAK,GACjC;AAAA,aAEJ;AAAA,UAED,UAAU,CAAC,gBACV,oBAAC,SAAI,IAAI,QAAQ,WAAU,+CACxB,oBACH;AAAA,WAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["layer"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eifi1/ui-kit",
3
- "version": "0.53.0",
3
+ "version": "0.55.0",
4
4
  "type": "module",
5
5
  "description": "App-agnostic shared design system: domain-free React components, theme and tokens.",
6
6
  "_sideEffects": "The barrel (src/index.ts) re-exports EVERY component, including components/chart, which statically imports recharts. Without this field a bundler must assume each of those modules has side effects, so it cannot drop the unused ones: importing a Button from '@eifi1/ui-kit' dragged all 433KB of recharts into the consumer's ENTRY chunk, and Keksdose was preloading it on every page load, login included. Nothing in src/ imports for side effects (no bare imports, no CSS imports from JS, no module-level global writes) — the token stylesheet is its own './tokens.css' export — so this is safe. CSS is still listed so any future stylesheet survives. Re-checked when `flag-icons` left `dependencies` and tsup started emitting a `\"use client\"` banner: neither touches this. The flag stylesheet was never imported from JS in the first place (that was the finding), and a directive prologue is a string literal every bundler lifts out before it decides whether a module is inert.",
@@ -93,9 +93,6 @@
93
93
  },
94
94
  "files": [
95
95
  "dist",
96
- "src",
97
- "!src/**/__tests__",
98
- "!src/test",
99
96
  "tokens.css",
100
97
  "LICENSE"
101
98
  ],
@@ -200,7 +197,7 @@
200
197
  "@types/react-dom": "^19.2.3",
201
198
  "@vitejs/plugin-react": "^6.1.1",
202
199
  "@vitest/coverage-v8": "^5.0.2",
203
- "axe-core": "4.13.0",
200
+ "axe-core": "4.14.0",
204
201
  "commit-and-tag-version": "^13.2.1",
205
202
  "dexie": "^4.4.6",
206
203
  "esbuild": "^0.28.2",
@@ -217,7 +214,7 @@
217
214
  "jsdom": "^30.0.1",
218
215
  "lucide-react": "^1.47.0",
219
216
  "modern-screenshot": "^4.7.0",
220
- "playwright-core": "~1.63.0",
217
+ "playwright-core": "~1.64.1",
221
218
  "prettier": "3.9.10",
222
219
  "react-hook-form": "^7.88.0",
223
220
  "react-router": "^8.3.0",
@@ -225,7 +222,7 @@
225
222
  "rollup": "^4.63.5",
226
223
  "sonner": "^2.0.7",
227
224
  "tailwindcss": "^4.3.3",
228
- "tsup": "^8.5.0",
225
+ "tsup": "^9.0.0",
229
226
  "typescript": "~5.9.3",
230
227
  "typescript-eslint": "^8.70.1",
231
228
  "vite": "^8.3.4",
@@ -253,9 +250,8 @@
253
250
  "engines": {
254
251
  "node": ">=20.18"
255
252
  },
256
- "_overrides": "esbuild is forced to ^0.28.2 for GHSA-g7r4-m6w7-qqqr (dev-server file read on Windows, fixed in 0.28.1). vite already allows ^0.28; tsup 8.5.1 still pins ^0.27, and `npm run check` (build + package verification) proves it works on 0.28. The override is `$esbuild`, the devDependency's own range: npm refuses an override of a direct dependency that names a different spec. Drop it once tsup allows 0.28 itself; the devDependency stays. esbuild and rollup are devDependencies because scripts import them (flatten-en and check-module-graph; refactor audit 2026-10-30, TST-9): they came only through tsup and vite, so a move off tsup would have broken check:graph. eslint-plugin-jsx-a11y 6.10.2 (its latest) declares eslint peers up to ^9; it runs unchanged on eslint 10 — every a11y rule still fires, same counts — so its eslint peer is pointed at ours. Drop that entry once jsx-a11y declares ^10.",
253
+ "_overrides": "esbuild is a devDependency because scripts import it (flatten-en and check-module-graph; refactor audit 2026-10-30, TST-9), and so is rollup; tsup 9 depends on esbuild ^0.28.2 itself, so the 0.55 bump dropped the override that forced 0.28 for GHSA-g7r4-m6w7-qqqr past tsup 8.5's ^0.27. eslint-plugin-jsx-a11y 6.10.2 (its latest) declares eslint peers up to ^9; it runs unchanged on eslint 10 — every a11y rule still fires, same counts — so its eslint peer is pointed at ours. Drop that entry once jsx-a11y declares ^10.",
257
254
  "overrides": {
258
- "esbuild": "$esbuild",
259
255
  "eslint-plugin-jsx-a11y": {
260
256
  "eslint": "$eslint"
261
257
  }
package/tokens.css CHANGED
@@ -47,8 +47,8 @@
47
47
  * border, and in light the well and the money — are stepped in JS (`applyTokenSet`,
48
48
  * `contrastStep`), because they are written inline on <html> and no rule here could beat
49
49
  * them. What lives here is only what is NOT inline: the focus frame's width below, and
50
- * in light the status, hue and field-sync literals and `--bg-active`, which step to read
51
- * on the darker well (0.36, the `:root[data-contrast="more"]:not(.dark)` block after the
50
+ * in light the status and hue literals and `--bg-active`, which step to read on the
51
+ * darker well (0.36, the `:root[data-contrast="more"]:not(.dark)` block after the
52
52
  * categorical hues; docs/colour-roles-harmonization.md §13).
53
53
  *
54
54
  * These names are frozen: apps read them, and so does an app's boot splash. */
@@ -382,32 +382,6 @@ html[data-text-size="xlarge"] {
382
382
  --money-net: #7a4fa3; /* muted violet, warmed to this palette */
383
383
  --money-neutral: #6b6453; /* warm slate */
384
384
 
385
- /* ── Field sync status ─────────────────────────────────────────────────────
386
- The four states a database-backed field can be in. Deliberately NOT part of
387
- `TokenSet` and NOT per-preset: these are functional signals, like a traffic
388
- light, and a field that means "saved" must not change meaning because somebody
389
- picked a different appearance preset. They do flip light/dark, because contrast
390
- is not optional.
391
-
392
- They mark a field's FRAME and an ICON at its end — non-text graphics, for which
393
- WCAG 1.4.11 asks 3:1 against the surface — and all four clear it on the worst of
394
- the three light surfaces, in every shipped preset (theme/__tests__/
395
- tokens-css-audit.test.ts measures it; until 0.33 this note only claimed it, and
396
- amber-600 sat at 2.45:1). `--status-edited` is amber rather than the orange-800 it
397
- was: beside red-700 that orange read as a second error colour, and "unsaved" has
398
- to look like a caution, not an alarm. Light, it is amber-600's hue and chroma at a
399
- SOLVED lightness (3.1:1 on the worst surface). Below 4.5:1, so it is not a TEXT
400
- colour: a state's words go in `--text-secondary` beside it.
401
-
402
- GREEN AND RED ARE THE CLASSIC CVD-UNSAFE PAIR, and the rest of this file goes out
403
- of its way to avoid it — the money trio is teal/amber/violet for exactly this
404
- reason. They are used here because the states were specified in these colours, so
405
- every state needs its own ICON as well and colour is never the only signal (as
406
- FieldSyncIndicator, which drew them until 0.53, gave it). Do not drop the icons. */
407
- --status-synced: #166534; /* green-800 — persisted */
408
- --status-pending: #1d4ed8; /* blue-700 — in flight */
409
- --status-edited: #bf6800; /* solved — dirty, not yet saved */
410
- --status-error: #b91c1c; /* red-700 — the save failed */
411
385
  /* Chart ramp: anyplot's eight "Imprint" hues (0.49, https://anyplot.ai/palette), the
412
386
  SAME in both themes — a hue under 3:1 on the ground gets a 1px ink edge
413
387
  (`chartEdge`) rather than a different colour. `--chart-9` repeats slot 1, where
@@ -452,12 +426,6 @@ html[data-text-size="xlarge"] {
452
426
  --money-net: #b39aef;
453
427
  --money-neutral: #9aa1bd; /* the palette's own cool grey, not zinc-400 */
454
428
 
455
- /* Field sync status — see the note in `:root`. Against the worst of the three dark
456
- surfaces these run 8.7 / 9.1 / 6.7 / 8.0:1. */
457
- --status-synced: #4ade80; /* green-400 */
458
- --status-pending: #7dd3fc; /* sky-300 */
459
- --status-edited: #fbbf24; /* amber-400 */
460
- --status-error: #fca5a5; /* red-300 */
461
429
  --chart-1: #009e73;
462
430
  --chart-2: #c475fd;
463
431
  --chart-3: #4467a3;
@@ -578,10 +546,10 @@ html[data-text-size="xlarge"] {
578
546
  either. Not derived, because a warning is a specific colour, not a tint of the
579
547
  page.
580
548
 
581
- Distinct from the `--status-*` family above: those describe a FIELD's journey
582
- to the database, these describe an ACTION's consequence. A row can be
583
- `--status-error` (its last save failed) inside a form whose delete button is
584
- `--danger` (it will destroy something), and they should not look identical.
549
+ These describe an ACTION's consequence, not a FIELD's journey to the database. A
550
+ row whose last save failed can sit inside a form whose delete button is `--danger`
551
+ (it will destroy something), and they should not look identical. (The `--status-*`
552
+ four that drew that journey went in 0.55, unread since FieldSync left in 0.53.)
585
553
 
586
554
  Each tone is a family: the colour (text on any surface, and a fill), `-contrast`
587
555
  (text ON the fill), `-border` (a soft frame), `-bg` (a wash, text in the tone's
@@ -630,10 +598,9 @@ html[data-text-size="xlarge"] {
630
598
  --info-border: #7dd3fc; /* sky-300 */
631
599
  --info-bg: #e0f2fe; /* sky-100 */
632
600
 
633
- /* Done, resolved, accepted. Distinct from `--status-synced` for the same reason
634
- `--danger` is distinct from `--status-error`: that family describes a FIELD's
635
- journey to the database, this one an ACTION's outcome. Emerald rather than the
636
- money teal, so a "resolved" chip cannot be misread as an inflow. */
601
+ /* Done, resolved, accepted: an ACTION's outcome, not a field's "saved", for the same
602
+ reason `--danger` is not a field's failed save (the note above). Emerald rather
603
+ than the money teal, so a "resolved" chip cannot be misread as an inflow. */
637
604
  --success: #007152; /* emerald-700's hue, solved (was #047857, 4.22:1) */
638
605
  /* Text on a `--success` fill (0.26: a swipe's approve panel) — white here, the
639
606
  darkest emerald in dark mode, where the fill is a pastel and white text failed. */
@@ -816,14 +783,13 @@ html[data-text-size="xlarge"] {
816
783
  /* ── More contrast in light: the literals on the darker well (0.36) ───────────────
817
784
  docs/colour-roles-harmonization.md §13. Under More contrast a light set's well is 10 %
818
785
  ink into the card (`WELL_INK_MORE`, stepped in JS with the money, since both are
819
- inline). On it the light literals above fell to 4.07–4.28:1 as text and
820
- `--status-edited` to 2.77:1 as a mark, so they step here, each at its light value's
821
- OKLCH hue and chroma at the lightness that clears its ratio on the stepped well of every
822
- shipped preset — as §5.5 solved them against the page. On the page and the card they
823
- then read 5.08:1 and up. The ones not listed hold on the stepped well as they are
824
- (blue 4.60, indigo 5.42, purple 4.79; synced 4.89, pending 4.60, error 4.44 and the
825
- danger line 3.22, marks and lines needing 3); `--warning-border-strong` is
826
- `var(--warning)` in light and follows.
786
+ inline). On it the light literals above fell to 4.07–4.28:1 as text, so they step
787
+ here, each at its light value's OKLCH hue and chroma at the lightness that clears
788
+ 4.5:1 on the stepped well of every shipped preset — as §5.5 solved them against the
789
+ page. On the page and the card they then read 5.08:1 and up. The ones not listed hold
790
+ on the stepped well as they are (blue 4.60, indigo 5.42, purple 4.79; the danger line
791
+ 3.22, a line needing 3); `--warning-border-strong` is `var(--warning)` in light and
792
+ follows.
827
793
 
828
794
  `--bg-active` (a digit key's hover, Button primary's, keksdose's assistant bubbles on
829
795
  the well) sat 1.04:1 from a 10 % well at 12 %; at 16 % it is 1.12–1.15:1 from it.
@@ -838,7 +804,6 @@ html[data-text-size="xlarge"] {
838
804
  --info: #006197; /* solved: 4.56:1 (was 4.07) */
839
805
  --hue-teal: #006862; /* solved: 4.56:1 (was 4.15) */
840
806
  --hue-orange: #a93400; /* solved: 4.53:1 (was 4.11) */
841
- --status-edited: #b66200; /* solved, a mark: 3.04:1 (was 2.77) */
842
807
  --bg-active: color-mix(in oklab, var(--text-primary) 16%, var(--bg-surface));
843
808
  }
844
809
 
@@ -870,9 +835,9 @@ html[data-text-size="xlarge"] {
870
835
  * once they had names here — refactor audit 2026-10, DOC-7): `scripts/check-token-discipline.mjs`
871
836
  * counts a `[var(--role)]` class, and a `ring-[length:var(--…)]` width, for any token that
872
837
  * has a utility here and allows none (`ROLE_BUDGET` 0). What stays `[var()]` has no
873
- * utility on purpose: the chart colours (lookup tables of `--chart-N`), `--status-*`
874
- * (the field-sync four), and the cross-property one-offs (`bg-[var(--border)]` as a
875
- * divider, `ring-[var(--text-primary)]`) — a utility there would undo the property
838
+ * utility on purpose: the chart colours (lookup tables of `--chart-N`) and the
839
+ * cross-property one-offs (`bg-[var(--border)]` as a divider,
840
+ * `ring-[var(--text-primary)]`) — a utility there would undo the property
876
841
  * scoping above. `check:tailwind` asserts one per namespace survives a build, and the
877
842
  * README's "Styling" table is generated from this block (`scripts/gen-styling-inventory.mjs`).
878
843
  *
@@ -1,47 +0,0 @@
1
- /**
2
- * What the account's own settings parts share (docs/user-admin-harmonization.md §6):
3
- * the companies a refusal names and the card's type (the mounted guard re-exported).
4
- *
5
- * @internal Not part of the barrel; the parts are.
6
- */
7
-
8
- type Bag = Record<string, unknown>;
9
-
10
- const isBag = (value: unknown): value is Bag => typeof value === "object" && value !== null;
11
-
12
- /** `companies` on a parsed body, or under FastAPI's nested `detail`: a list of names. */
13
- function companiesOfBody(body: unknown): string[] | undefined {
14
- if (!isBag(body)) return undefined;
15
- const pick = (value: unknown) =>
16
- Array.isArray(value) && value.length > 0 && value.every((item) => typeof item === "string")
17
- ? (value as string[])
18
- : undefined;
19
- return pick(body.companies) ?? (isBag(body.detail) ? pick(body.detail.companies) : undefined);
20
- }
21
-
22
- /**
23
- * The companies a `last_admin` refusal names — kastlan checks the last admin per company
24
- * and answers `409 {detail, code: "last_admin", companies: ["Example AG"]}` (§6.4,
25
- * server-kit's `AccountError(…, extra={"companies": …})`). Read where `authErrorCode`
26
- * reads the code: axios' `response.data`, ofetch's `data`, a generated client's `body`,
27
- * a body thrown as it came. `undefined` when there is no such list.
28
- */
29
- export function refusalCompanies(err: unknown): string[] | undefined {
30
- if (!isBag(err)) return undefined;
31
- const response = err.response;
32
- return (
33
- (isBag(response) ? companiesOfBody(response.data) : undefined) ??
34
- companiesOfBody(err.data) ??
35
- companiesOfBody(err.body) ??
36
- companiesOfBody(err)
37
- );
38
- }
39
-
40
- /** The mounted guard and the callback-to-promise bridge, in `hooks/use-mounted.ts` since
41
- * 0.52: seven notifications modules imported them from here (refactor audit
42
- * 2026-10-30, MOD-6). Re-exported for the account parts that still do. */
43
- export { settle, useMounted } from "../hooks/use-mounted";
44
-
45
- /** The settings cards' type scale, PasskeysSetting's: a small title and a muted line.
46
- * Defined with the card look in settings/ since 0.34 (MOD-8, refactor audit 2026-10). */
47
- export { CARD_DESCRIPTION_CLASS, CARD_TITLE_CLASS } from "../settings/settings-card-classes";