@eifi1/ui-kit 0.54.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 (847) hide show
  1. package/README.md +90 -76
  2. package/dist/admin/plan-change.js +2 -2
  3. package/dist/admin/plan-change.js.map +1 -1
  4. package/dist/admin/user-roster.d.ts +6 -0
  5. package/dist/admin/user-roster.js +4 -0
  6. package/dist/admin/user-roster.js.map +1 -1
  7. package/dist/billing/billing-labels.d.ts +26 -0
  8. package/dist/billing/billing-labels.js +9 -0
  9. package/dist/billing/billing-labels.js.map +1 -1
  10. package/dist/billing/subscription-standing.d.ts +61 -0
  11. package/dist/billing/subscription-standing.js +51 -0
  12. package/dist/billing/subscription-standing.js.map +1 -0
  13. package/dist/billing/usage-meter.d.ts +52 -0
  14. package/dist/billing/usage-meter.js +52 -0
  15. package/dist/billing/usage-meter.js.map +1 -0
  16. package/dist/chart.d.ts +1 -0
  17. package/dist/chart.js +4 -0
  18. package/dist/chart.js.map +1 -1
  19. package/dist/components/alert-banner.js +2 -3
  20. package/dist/components/alert-banner.js.map +1 -1
  21. package/dist/components/amount-input.js +3 -15
  22. package/dist/components/amount-input.js.map +1 -1
  23. package/dist/components/autocomplete.js +2 -2
  24. package/dist/components/autocomplete.js.map +1 -1
  25. package/dist/components/bulk-action-bar.js +2 -1
  26. package/dist/components/bulk-action-bar.js.map +1 -1
  27. package/dist/components/button.d.ts +35 -1
  28. package/dist/components/button.js +5 -9
  29. package/dist/components/button.js.map +1 -1
  30. package/dist/components/calendar-heatmap.js +2 -2
  31. package/dist/components/calendar-heatmap.js.map +1 -1
  32. package/dist/components/camera-button.d.ts +89 -0
  33. package/dist/components/camera-button.js +122 -0
  34. package/dist/components/camera-button.js.map +1 -0
  35. package/dist/components/camera-capture.d.ts +66 -0
  36. package/dist/components/camera-capture.js +190 -0
  37. package/dist/components/camera-capture.js.map +1 -0
  38. package/dist/components/camera-labels.d.ts +20 -0
  39. package/dist/components/camera-labels.js +15 -0
  40. package/dist/components/camera-labels.js.map +1 -0
  41. package/dist/components/chart-edge.d.ts +9 -0
  42. package/dist/components/chart-edge.js +14 -3
  43. package/dist/components/chart-edge.js.map +1 -1
  44. package/dist/components/chart-zoom-core.js +34 -29
  45. package/dist/components/chart-zoom-core.js.map +1 -1
  46. package/dist/components/checkbox-group.js +1 -1
  47. package/dist/components/checkbox-group.js.map +1 -1
  48. package/dist/components/combobox-core.js +3 -2
  49. package/dist/components/combobox-core.js.map +1 -1
  50. package/dist/components/combobox.js +2 -2
  51. package/dist/components/combobox.js.map +1 -1
  52. package/dist/components/consent-again-notice-labels.d.ts +25 -0
  53. package/dist/components/consent-again-notice-labels.js +15 -0
  54. package/dist/components/consent-again-notice-labels.js.map +1 -0
  55. package/dist/components/consent-again-notice.d.ts +85 -0
  56. package/dist/components/consent-again-notice.js +94 -0
  57. package/dist/components/consent-again-notice.js.map +1 -0
  58. package/dist/components/country-select.js +2 -7
  59. package/dist/components/country-select.js.map +1 -1
  60. package/dist/components/currency-select.js +2 -2
  61. package/dist/components/currency-select.js.map +1 -1
  62. package/dist/components/danger-confirm.js +2 -2
  63. package/dist/components/danger-confirm.js.map +1 -1
  64. package/dist/components/data-table-column-settings.js +2 -2
  65. package/dist/components/data-table-column-settings.js.map +1 -1
  66. package/dist/components/data-table-fit.js.map +1 -1
  67. package/dist/components/data-table-virtual.js +13 -3
  68. package/dist/components/data-table-virtual.js.map +1 -1
  69. package/dist/components/date-field.js +2 -2
  70. package/dist/components/date-field.js.map +1 -1
  71. package/dist/components/date-picker.js +2 -2
  72. package/dist/components/date-picker.js.map +1 -1
  73. package/dist/components/date-range-picker.js +2 -6
  74. package/dist/components/date-range-picker.js.map +1 -1
  75. package/dist/components/dialog-frame.d.ts +3 -1
  76. package/dist/components/dialog-frame.js.map +1 -1
  77. package/dist/components/dropdown.js +7 -3
  78. package/dist/components/dropdown.js.map +1 -1
  79. package/dist/components/entity-combobox.js +2 -2
  80. package/dist/components/entity-combobox.js.map +1 -1
  81. package/dist/components/field-parts.d.ts +108 -6
  82. package/dist/components/field-parts.js +59 -6
  83. package/dist/components/field-parts.js.map +1 -1
  84. package/dist/components/field-suggestion-labels.d.ts +2 -0
  85. package/dist/components/field-suggestion-labels.js +10 -0
  86. package/dist/components/field-suggestion-labels.js.map +1 -0
  87. package/dist/components/field.js +1 -1
  88. package/dist/components/field.js.map +1 -1
  89. package/dist/components/file-button.d.ts +1 -1
  90. package/dist/components/file-button.js.map +1 -1
  91. package/dist/components/floating-panel.d.ts +7 -6
  92. package/dist/components/floating-panel.js +3 -17
  93. package/dist/components/floating-panel.js.map +1 -1
  94. package/dist/components/form-actions.d.ts +3 -2
  95. package/dist/components/form-actions.js.map +1 -1
  96. package/dist/components/hover-menu.js +3 -2
  97. package/dist/components/hover-menu.js.map +1 -1
  98. package/dist/components/icon-button.d.ts +23 -5
  99. package/dist/components/icon-button.js +6 -8
  100. package/dist/components/icon-button.js.map +1 -1
  101. package/dist/components/inline-confirm.js +2 -1
  102. package/dist/components/inline-confirm.js.map +1 -1
  103. package/dist/components/inline-entity-combobox.js +2 -2
  104. package/dist/components/inline-entity-combobox.js.map +1 -1
  105. package/dist/components/input.js +2 -2
  106. package/dist/components/input.js.map +1 -1
  107. package/dist/components/jump-calendar.js +3 -3
  108. package/dist/components/jump-calendar.js.map +1 -1
  109. package/dist/components/legal.d.ts +13 -1
  110. package/dist/components/legal.js +12 -0
  111. package/dist/components/legal.js.map +1 -1
  112. package/dist/components/legended-series-chart.d.ts +80 -0
  113. package/dist/components/legended-series-chart.js +70 -0
  114. package/dist/components/legended-series-chart.js.map +1 -0
  115. package/dist/components/lightbox.js +2 -1
  116. package/dist/components/lightbox.js.map +1 -1
  117. package/dist/components/mini-calendar.js +13 -5
  118. package/dist/components/mini-calendar.js.map +1 -1
  119. package/dist/components/modal.d.ts +23 -2
  120. package/dist/components/modal.js +24 -6
  121. package/dist/components/modal.js.map +1 -1
  122. package/dist/components/month-picker.d.ts +1 -1
  123. package/dist/components/month-picker.js +6 -6
  124. package/dist/components/month-picker.js.map +1 -1
  125. package/dist/components/multi-entity-combobox.js +2 -2
  126. package/dist/components/multi-entity-combobox.js.map +1 -1
  127. package/dist/components/multi-select.js +2 -6
  128. package/dist/components/multi-select.js.map +1 -1
  129. package/dist/components/number-input.js +2 -2
  130. package/dist/components/number-input.js.map +1 -1
  131. package/dist/components/page-header-layout.d.ts +18 -0
  132. package/dist/components/page-header-layout.js +23 -0
  133. package/dist/components/page-header-layout.js.map +1 -0
  134. package/dist/components/page-header-skeleton.d.ts +41 -0
  135. package/dist/components/page-header-skeleton.js +52 -0
  136. package/dist/components/page-header-skeleton.js.map +1 -0
  137. package/dist/components/page-header.js +4 -17
  138. package/dist/components/page-header.js.map +1 -1
  139. package/dist/components/popover.js +7 -2
  140. package/dist/components/popover.js.map +1 -1
  141. package/dist/components/release-notes-labels.d.ts +16 -0
  142. package/dist/components/release-notes-labels.js +18 -0
  143. package/dist/components/release-notes-labels.js.map +1 -0
  144. package/dist/components/release-notes.d.ts +65 -0
  145. package/dist/components/release-notes.js +65 -0
  146. package/dist/components/release-notes.js.map +1 -0
  147. package/dist/components/select.js +2 -2
  148. package/dist/components/select.js.map +1 -1
  149. package/dist/components/series-chart-labels.d.ts +9 -0
  150. package/dist/components/series-chart-labels.js +3 -1
  151. package/dist/components/series-chart-labels.js.map +1 -1
  152. package/dist/components/series-chart.d.ts +5 -0
  153. package/dist/components/series-chart.js +89 -36
  154. package/dist/components/series-chart.js.map +1 -1
  155. package/dist/components/toggle-group.js +3 -2
  156. package/dist/components/toggle-group.js.map +1 -1
  157. package/dist/components/treemap-layout.js.map +1 -1
  158. package/dist/components/treemap.d.ts +17 -15
  159. package/dist/components/treemap.js +167 -85
  160. package/dist/components/treemap.js.map +1 -1
  161. package/dist/eslint/index.js +1 -1
  162. package/dist/eslint/role-utilities.d.ts +2 -2
  163. package/dist/eslint/role-utilities.js.map +1 -1
  164. package/dist/feedback/feedback-inbox-page.d.ts +260 -0
  165. package/dist/feedback/feedback-inbox-page.js +207 -0
  166. package/dist/feedback/feedback-inbox-page.js.map +1 -0
  167. package/dist/feedback/feedback-vocabulary.js +2 -2
  168. package/dist/feedback/feedback-vocabulary.js.map +1 -1
  169. package/dist/feedback.d.ts +1 -0
  170. package/dist/feedback.js +6 -0
  171. package/dist/feedback.js.map +1 -1
  172. package/dist/hooks/use-debounce.d.ts +32 -5
  173. package/dist/hooks/use-debounce.js +6 -5
  174. package/dist/hooks/use-debounce.js.map +1 -1
  175. package/dist/hooks/use-file-picker.d.ts +3 -1
  176. package/dist/hooks/use-file-picker.js.map +1 -1
  177. package/dist/hooks/use-focus-trap.d.ts +19 -3
  178. package/dist/hooks/use-focus-trap.js +15 -5
  179. package/dist/hooks/use-focus-trap.js.map +1 -1
  180. package/dist/hooks/use-has-camera.d.ts +36 -0
  181. package/dist/hooks/use-has-camera.js +53 -0
  182. package/dist/hooks/use-has-camera.js.map +1 -0
  183. package/dist/hooks/use-hotkey.js +1 -10
  184. package/dist/hooks/use-hotkey.js.map +1 -1
  185. package/dist/hooks/use-overlay-history.d.ts +6 -1
  186. package/dist/hooks/use-overlay-history.js +10 -2
  187. package/dist/hooks/use-overlay-history.js.map +1 -1
  188. package/dist/i18n/defaults.js +11 -1
  189. package/dist/i18n/defaults.js.map +1 -1
  190. package/dist/i18n/german.js +75 -3
  191. package/dist/i18n/german.js.map +1 -1
  192. package/dist/i18n/kit-labels.d.ts +20 -0
  193. package/dist/i18n/kit-labels.js.map +1 -1
  194. package/dist/i18n/locales/en.js +92 -4
  195. package/dist/i18n/locales/en.js.map +3 -3
  196. package/dist/i18n/locales/es.js +71 -3
  197. package/dist/i18n/locales/es.js.map +1 -1
  198. package/dist/i18n/locales/fr.js +72 -2
  199. package/dist/i18n/locales/fr.js.map +1 -1
  200. package/dist/i18n/locales/hu.js +74 -3
  201. package/dist/i18n/locales/hu.js.map +1 -1
  202. package/dist/i18n/locales/it.js +74 -3
  203. package/dist/i18n/locales/it.js.map +1 -1
  204. package/dist/i18n/locales/zh.js +71 -3
  205. package/dist/i18n/locales/zh.js.map +1 -1
  206. package/dist/i18n/review.js +22 -1
  207. package/dist/i18n/review.js.map +1 -1
  208. package/dist/index.d.ts +24 -5
  209. package/dist/index.js +35 -1
  210. package/dist/index.js.map +1 -1
  211. package/dist/landing/landing-labels.d.ts +8 -0
  212. package/dist/landing/landing-labels.js +2 -1
  213. package/dist/landing/landing-labels.js.map +1 -1
  214. package/dist/lib/changelog.d.ts +130 -0
  215. package/dist/lib/changelog.js +137 -0
  216. package/dist/lib/changelog.js.map +1 -0
  217. package/dist/lib/clipboard-minus.js +2 -2
  218. package/dist/lib/clipboard-minus.js.map +1 -1
  219. package/dist/lib/dates.d.ts +29 -3
  220. package/dist/lib/dates.js +41 -12
  221. package/dist/lib/dates.js.map +1 -1
  222. package/dist/lib/editable-content.d.ts +33 -0
  223. package/dist/lib/editable-content.js +15 -0
  224. package/dist/lib/editable-content.js.map +1 -0
  225. package/dist/lib/focus-left.d.ts +47 -1
  226. package/dist/lib/focus-left.js +11 -2
  227. package/dist/lib/focus-left.js.map +1 -1
  228. package/dist/lib/server-wake.d.ts +49 -9
  229. package/dist/lib/server-wake.js +25 -14
  230. package/dist/lib/server-wake.js.map +1 -1
  231. package/dist/lib/session-refresh.d.ts +53 -0
  232. package/dist/lib/session-refresh.js +27 -1
  233. package/dist/lib/session-refresh.js.map +1 -1
  234. package/dist/rhf/fields.js +3 -3
  235. package/dist/rhf/fields.js.map +1 -1
  236. package/dist/shell/app-shell.d.ts +25 -1
  237. package/dist/shell/app-shell.js +3 -1
  238. package/dist/shell/app-shell.js.map +1 -1
  239. package/dist/shell/dev-menu.d.ts +3 -0
  240. package/dist/shell/dev-menu.js +4 -2
  241. package/dist/shell/dev-menu.js.map +1 -1
  242. package/dist/shell/held-changes-banner-labels.d.ts +23 -0
  243. package/dist/shell/held-changes-banner-labels.js +14 -0
  244. package/dist/shell/held-changes-banner-labels.js.map +1 -0
  245. package/dist/shell/held-changes-banner.d.ts +75 -0
  246. package/dist/shell/held-changes-banner.js +106 -0
  247. package/dist/shell/held-changes-banner.js.map +1 -0
  248. package/dist/shell/sync-status-indicator.d.ts +27 -12
  249. package/dist/shell/sync-status-indicator.js +13 -4
  250. package/dist/shell/sync-status-indicator.js.map +1 -1
  251. package/dist/shell/top-bar-parts-labels.d.ts +5 -0
  252. package/dist/shell/top-bar-parts-labels.js +3 -1
  253. package/dist/shell/top-bar-parts-labels.js.map +1 -1
  254. package/dist/shell.d.ts +2 -0
  255. package/dist/shell.js +3 -0
  256. package/dist/shell.js.map +1 -1
  257. package/dist/sync/engine.d.ts +11 -2
  258. package/dist/sync/engine.js +13 -5
  259. package/dist/sync/engine.js.map +1 -1
  260. package/dist/sync/hooks.d.ts +3 -2
  261. package/dist/sync/hooks.js +4 -2
  262. package/dist/sync/hooks.js.map +1 -1
  263. package/dist/testing/css-variables.generated.d.ts +2 -2
  264. package/dist/testing/css-variables.generated.js +1 -1
  265. package/dist/testing/css-variables.generated.js.map +1 -1
  266. package/dist/theme/chart-palette.d.ts +18 -0
  267. package/dist/theme/chart-palette.js +17 -1
  268. package/dist/theme/chart-palette.js.map +1 -1
  269. package/dist/theme/contrast-tokens.d.ts +3 -3
  270. package/dist/theme/contrast-tokens.js.map +1 -1
  271. package/dist/theme/contrast.d.ts +4 -4
  272. package/dist/theme/contrast.js.map +1 -1
  273. package/dist/tour/tour-overlay.js +2 -1
  274. package/dist/tour/tour-overlay.js.map +1 -1
  275. package/package.json +5 -9
  276. package/tokens.css +19 -54
  277. package/src/account/account-parts.ts +0 -47
  278. package/src/account/account-settings-labels.ts +0 -240
  279. package/src/account/account-settings.tsx +0 -698
  280. package/src/account/data-export-setting-labels.ts +0 -20
  281. package/src/account/data-export-setting.tsx +0 -200
  282. package/src/account/delete-account-setting-labels.ts +0 -33
  283. package/src/account/delete-account-setting.tsx +0 -342
  284. package/src/account/email-change-setting-labels.ts +0 -31
  285. package/src/account/email-change-setting.tsx +0 -443
  286. package/src/account/passkeys-setting.tsx +0 -445
  287. package/src/account/sessions-setting-labels.ts +0 -24
  288. package/src/account/sessions-setting.tsx +0 -283
  289. package/src/admin/admin-action-confirm-labels.ts +0 -19
  290. package/src/admin/admin-action-confirm.tsx +0 -509
  291. package/src/admin/admin-action-log-labels.ts +0 -83
  292. package/src/admin/admin-action-log.tsx +0 -464
  293. package/src/admin/admin-area-labels.ts +0 -114
  294. package/src/admin/admin-forbidden.tsx +0 -75
  295. package/src/admin/admin-overview.tsx +0 -258
  296. package/src/admin/admin-parts.ts +0 -68
  297. package/src/admin/admin-sections.tsx +0 -208
  298. package/src/admin/admin-tool-links.tsx +0 -90
  299. package/src/admin/invitations-panel-labels.ts +0 -31
  300. package/src/admin/invitations-panel.tsx +0 -516
  301. package/src/admin/mail-test-card-labels.ts +0 -19
  302. package/src/admin/mail-test-card.tsx +0 -189
  303. package/src/admin/plan-change-labels.ts +0 -5
  304. package/src/admin/plan-change.tsx +0 -474
  305. package/src/admin/reviewer-scope-editor-labels.ts +0 -16
  306. package/src/admin/reviewer-scope-editor.tsx +0 -224
  307. package/src/admin/role-select-labels.ts +0 -16
  308. package/src/admin/role-select.tsx +0 -282
  309. package/src/admin/transfer-ownership-dialog-labels.ts +0 -20
  310. package/src/admin/transfer-ownership-dialog.tsx +0 -162
  311. package/src/admin/user-roster-labels.ts +0 -17
  312. package/src/admin/user-roster.tsx +0 -559
  313. package/src/auth/accept-invitation-labels.ts +0 -21
  314. package/src/auth/accept-invitation.tsx +0 -210
  315. package/src/auth/auth-errors-labels.ts +0 -23
  316. package/src/auth/auth-errors.ts +0 -439
  317. package/src/auth/complete-name-dialog-labels.ts +0 -16
  318. package/src/auth/complete-name-dialog.tsx +0 -253
  319. package/src/auth/email-tag.ts +0 -75
  320. package/src/auth/forgot-password-form-labels.ts +0 -20
  321. package/src/auth/forgot-password-form.tsx +0 -221
  322. package/src/auth/form-rules.ts +0 -40
  323. package/src/auth/new-password-fields.tsx +0 -85
  324. package/src/auth/not-found-page-labels.ts +0 -12
  325. package/src/auth/not-found-page.tsx +0 -95
  326. package/src/auth/register-form-labels.ts +0 -31
  327. package/src/auth/register-form.tsx +0 -456
  328. package/src/auth/reset-password-form-labels.ts +0 -27
  329. package/src/auth/reset-password-form.tsx +0 -341
  330. package/src/auth/sign-in-form-labels.ts +0 -44
  331. package/src/auth/sign-in-form.tsx +0 -858
  332. package/src/auth/status-parts.tsx +0 -132
  333. package/src/auth/verify-email-labels.ts +0 -26
  334. package/src/auth/verify-email.tsx +0 -445
  335. package/src/billing/billing-banner.tsx +0 -258
  336. package/src/billing/billing-labels.ts +0 -381
  337. package/src/billing/billing-lock.ts +0 -108
  338. package/src/billing/billing-overview.ts +0 -157
  339. package/src/billing/billing-standing.ts +0 -80
  340. package/src/billing/cancel-request.ts +0 -97
  341. package/src/billing/cancel-subscription.tsx +0 -98
  342. package/src/billing/checkout-processing.ts +0 -394
  343. package/src/billing/checkout-return.ts +0 -90
  344. package/src/billing/pay-page.ts +0 -330
  345. package/src/billing/plan-card.tsx +0 -562
  346. package/src/billing/plan-change-labels.ts +0 -66
  347. package/src/billing/plan-limit-notice.tsx +0 -148
  348. package/src/billing/plan-limit-toast.tsx +0 -90
  349. package/src/billing/plan-limit.ts +0 -52
  350. package/src/billing/plan-price.ts +0 -98
  351. package/src/billing/plan-switch.tsx +0 -216
  352. package/src/billing/provider-page.ts +0 -84
  353. package/src/billing/subscription-actions.tsx +0 -247
  354. package/src/billing/subscription-status-chip.tsx +0 -95
  355. package/src/chart.ts +0 -103
  356. package/src/components/account-chips-labels.ts +0 -16
  357. package/src/components/account-chips.tsx +0 -474
  358. package/src/components/alert-banner.tsx +0 -670
  359. package/src/components/amount-input.tsx +0 -816
  360. package/src/components/appearance-labels.ts +0 -63
  361. package/src/components/authed-image-labels.ts +0 -11
  362. package/src/components/authed-image.tsx +0 -209
  363. package/src/components/autocomplete.tsx +0 -645
  364. package/src/components/breadcrumbs-labels.ts +0 -10
  365. package/src/components/breadcrumbs.tsx +0 -205
  366. package/src/components/bulk-action-bar-labels.ts +0 -11
  367. package/src/components/bulk-action-bar.tsx +0 -443
  368. package/src/components/button-group.tsx +0 -223
  369. package/src/components/button-look.ts +0 -256
  370. package/src/components/button.tsx +0 -339
  371. package/src/components/calculator.tsx +0 -341
  372. package/src/components/calendar-heatmap-labels.ts +0 -15
  373. package/src/components/calendar-heatmap.tsx +0 -600
  374. package/src/components/card.tsx +0 -377
  375. package/src/components/chart-edge.ts +0 -106
  376. package/src/components/chart-figure.tsx +0 -35
  377. package/src/components/chart-height.ts +0 -30
  378. package/src/components/chart-zoom-core.tsx +0 -627
  379. package/src/components/chart-zoom.tsx +0 -22
  380. package/src/components/chart.tsx +0 -554
  381. package/src/components/checkbox-group.tsx +0 -247
  382. package/src/components/checkbox.tsx +0 -346
  383. package/src/components/chip-input.tsx +0 -370
  384. package/src/components/chip-labels.ts +0 -13
  385. package/src/components/chip.tsx +0 -843
  386. package/src/components/choice-card.tsx +0 -544
  387. package/src/components/column-mapper-labels.ts +0 -38
  388. package/src/components/column-mapper.tsx +0 -655
  389. package/src/components/combobox-core.tsx +0 -1321
  390. package/src/components/combobox-suggestions.tsx +0 -131
  391. package/src/components/combobox.tsx +0 -716
  392. package/src/components/confirm-context.ts +0 -7
  393. package/src/components/confirm-dialog-labels.ts +0 -13
  394. package/src/components/confirm-dialog.tsx +0 -341
  395. package/src/components/copy-button-labels.ts +0 -13
  396. package/src/components/copy-button.tsx +0 -192
  397. package/src/components/country-select-labels.ts +0 -11
  398. package/src/components/country-select.tsx +0 -539
  399. package/src/components/currency-option-list.tsx +0 -188
  400. package/src/components/currency-select.tsx +0 -343
  401. package/src/components/danger-confirm-labels.ts +0 -20
  402. package/src/components/danger-confirm.tsx +0 -987
  403. package/src/components/data-table-cells.tsx +0 -118
  404. package/src/components/data-table-column-settings.tsx +0 -198
  405. package/src/components/data-table-filter-popover.tsx +0 -289
  406. package/src/components/data-table-filters.ts +0 -315
  407. package/src/components/data-table-fit.ts +0 -301
  408. package/src/components/data-table-groups.tsx +0 -288
  409. package/src/components/data-table-head.tsx +0 -280
  410. package/src/components/data-table-labels.ts +0 -198
  411. package/src/components/data-table-leading-row.tsx +0 -58
  412. package/src/components/data-table-mobile.tsx +0 -1117
  413. package/src/components/data-table-pagination.tsx +0 -202
  414. package/src/components/data-table-resize.ts +0 -188
  415. package/src/components/data-table-row-actions.tsx +0 -302
  416. package/src/components/data-table-row.tsx +0 -496
  417. package/src/components/data-table-selection.ts +0 -71
  418. package/src/components/data-table-shared.tsx +0 -287
  419. package/src/components/data-table-sort.ts +0 -163
  420. package/src/components/data-table-virtual.ts +0 -576
  421. package/src/components/data-table.tsx +0 -2598
  422. package/src/components/date-field.tsx +0 -684
  423. package/src/components/date-format-setting.tsx +0 -64
  424. package/src/components/date-picker.tsx +0 -404
  425. package/src/components/date-range-picker.tsx +0 -518
  426. package/src/components/description-list-labels.ts +0 -9
  427. package/src/components/description-list.tsx +0 -386
  428. package/src/components/dialog-frame-labels.ts +0 -7
  429. package/src/components/dialog-frame.tsx +0 -284
  430. package/src/components/disclosure.tsx +0 -476
  431. package/src/components/dropdown.tsx +0 -461
  432. package/src/components/empty-state.tsx +0 -136
  433. package/src/components/entity-combobox.tsx +0 -422
  434. package/src/components/error-boundary-labels.ts +0 -20
  435. package/src/components/error-boundary.tsx +0 -675
  436. package/src/components/facing-pair.ts +0 -93
  437. package/src/components/field-base-labels.ts +0 -20
  438. package/src/components/field-base.tsx +0 -656
  439. package/src/components/field-parts.tsx +0 -825
  440. package/src/components/field-strip.tsx +0 -129
  441. package/src/components/field.tsx +0 -206
  442. package/src/components/file-button.tsx +0 -295
  443. package/src/components/file-dropzone.tsx +0 -559
  444. package/src/components/floating-panel-labels.ts +0 -10
  445. package/src/components/floating-panel.tsx +0 -828
  446. package/src/components/focus-ring.ts +0 -16
  447. package/src/components/form-actions-labels.ts +0 -11
  448. package/src/components/form-actions.tsx +0 -578
  449. package/src/components/full-bleed-dialog.tsx +0 -294
  450. package/src/components/grouped-picker.tsx +0 -184
  451. package/src/components/help-popover.tsx +0 -117
  452. package/src/components/hover-menu.tsx +0 -343
  453. package/src/components/iban-input-labels.ts +0 -14
  454. package/src/components/iban-input.tsx +0 -236
  455. package/src/components/icon-button.tsx +0 -959
  456. package/src/components/icon-picker-labels.ts +0 -13
  457. package/src/components/icon-picker.tsx +0 -232
  458. package/src/components/image-grid-labels.ts +0 -11
  459. package/src/components/image-grid.tsx +0 -202
  460. package/src/components/inline-confirm.tsx +0 -116
  461. package/src/components/inline-edit-field-labels.ts +0 -11
  462. package/src/components/inline-edit-field.tsx +0 -552
  463. package/src/components/inline-entity-combobox.tsx +0 -849
  464. package/src/components/input.tsx +0 -394
  465. package/src/components/jump-calendar.tsx +0 -265
  466. package/src/components/language-select.tsx +0 -93
  467. package/src/components/legal-labels.ts +0 -105
  468. package/src/components/legal-page.tsx +0 -711
  469. package/src/components/legal.tsx +0 -668
  470. package/src/components/lightbox-labels.ts +0 -18
  471. package/src/components/lightbox.tsx +0 -399
  472. package/src/components/line-items-labels.ts +0 -14
  473. package/src/components/line-items.tsx +0 -602
  474. package/src/components/list-labels.ts +0 -12
  475. package/src/components/list.tsx +0 -870
  476. package/src/components/loading-state.tsx +0 -78
  477. package/src/components/measured-grid-labels.ts +0 -25
  478. package/src/components/measured-grid.tsx +0 -837
  479. package/src/components/menu-item.tsx +0 -241
  480. package/src/components/mini-calendar-labels.ts +0 -17
  481. package/src/components/mini-calendar.tsx +0 -792
  482. package/src/components/modal.tsx +0 -534
  483. package/src/components/money-draft.ts +0 -83
  484. package/src/components/money-field.tsx +0 -76
  485. package/src/components/month-grid.tsx +0 -229
  486. package/src/components/month-picker-labels.ts +0 -22
  487. package/src/components/month-picker.tsx +0 -1087
  488. package/src/components/multi-entity-combobox.tsx +0 -369
  489. package/src/components/multi-select.tsx +0 -376
  490. package/src/components/nav-pills.tsx +0 -198
  491. package/src/components/number-field.tsx +0 -327
  492. package/src/components/number-input.tsx +0 -559
  493. package/src/components/numeric-field.ts +0 -169
  494. package/src/components/numpad-sheet.tsx +0 -285
  495. package/src/components/one-time-code-input.tsx +0 -270
  496. package/src/components/page-contents-labels.ts +0 -9
  497. package/src/components/page-contents.tsx +0 -282
  498. package/src/components/page-header-context.ts +0 -8
  499. package/src/components/page-header.tsx +0 -298
  500. package/src/components/password-strength-labels.ts +0 -22
  501. package/src/components/password-strength.tsx +0 -241
  502. package/src/components/phone-input-labels.ts +0 -10
  503. package/src/components/phone-input.tsx +0 -282
  504. package/src/components/picker-sheet.tsx +0 -330
  505. package/src/components/pie-chart-labels.ts +0 -40
  506. package/src/components/pie-chart.tsx +0 -480
  507. package/src/components/popover-labels.ts +0 -14
  508. package/src/components/popover.tsx +0 -268
  509. package/src/components/progress-bar-labels.ts +0 -10
  510. package/src/components/progress-bar.tsx +0 -479
  511. package/src/components/qr-code.tsx +0 -76
  512. package/src/components/reauth-dialog-labels.ts +0 -13
  513. package/src/components/reauth-dialog.tsx +0 -265
  514. package/src/components/row-actions-labels.ts +0 -12
  515. package/src/components/row-actions.tsx +0 -795
  516. package/src/components/scroll-area.tsx +0 -123
  517. package/src/components/search-field.tsx +0 -192
  518. package/src/components/select.tsx +0 -294
  519. package/src/components/separator.tsx +0 -33
  520. package/src/components/series-chart-axes.ts +0 -342
  521. package/src/components/series-chart-budget.ts +0 -150
  522. package/src/components/series-chart-labels.ts +0 -33
  523. package/src/components/series-chart-thin.ts +0 -180
  524. package/src/components/series-chart-ticks.ts +0 -194
  525. package/src/components/series-chart.tsx +0 -1906
  526. package/src/components/server-wake-labels.ts +0 -11
  527. package/src/components/server-wake.tsx +0 -129
  528. package/src/components/settings-fields.tsx +0 -237
  529. package/src/components/share-card-labels.ts +0 -30
  530. package/src/components/share-card.tsx +0 -675
  531. package/src/components/signature-pad-labels.ts +0 -24
  532. package/src/components/signature-pad.tsx +0 -747
  533. package/src/components/signed-amount-labels.ts +0 -10
  534. package/src/components/signed-amount.tsx +0 -336
  535. package/src/components/skeleton.tsx +0 -80
  536. package/src/components/slider.tsx +0 -338
  537. package/src/components/sparkline-labels.ts +0 -14
  538. package/src/components/sparkline.tsx +0 -322
  539. package/src/components/spinner.tsx +0 -81
  540. package/src/components/stat-tile-labels.ts +0 -15
  541. package/src/components/stat-tile.tsx +0 -754
  542. package/src/components/status-dot.tsx +0 -170
  543. package/src/components/swatch-picker-labels.ts +0 -10
  544. package/src/components/swatch-picker.tsx +0 -283
  545. package/src/components/swipeable-row.tsx +0 -386
  546. package/src/components/switch.tsx +0 -273
  547. package/src/components/table-skeleton.tsx +0 -136
  548. package/src/components/table.tsx +0 -647
  549. package/src/components/tabs-labels.ts +0 -13
  550. package/src/components/tabs.tsx +0 -693
  551. package/src/components/text-link.tsx +0 -359
  552. package/src/components/text.tsx +0 -150
  553. package/src/components/textarea.tsx +0 -330
  554. package/src/components/tile-radio.tsx +0 -332
  555. package/src/components/time-input.tsx +0 -121
  556. package/src/components/toast-labels.ts +0 -12
  557. package/src/components/toast.tsx +0 -519
  558. package/src/components/toggle-group.tsx +0 -752
  559. package/src/components/toggle-legend.tsx +0 -394
  560. package/src/components/tooltip.tsx +0 -1149
  561. package/src/components/translation-review-editor.tsx +0 -290
  562. package/src/components/translation-review-labels.ts +0 -181
  563. package/src/components/translation-review-parts.tsx +0 -272
  564. package/src/components/translation-review.tsx +0 -1240
  565. package/src/components/tree-view.tsx +0 -589
  566. package/src/components/treemap-labels.ts +0 -47
  567. package/src/components/treemap-layout.ts +0 -210
  568. package/src/components/treemap.tsx +0 -1184
  569. package/src/components/trigger-aria.ts +0 -44
  570. package/src/components/use-anchor-dir.ts +0 -20
  571. package/src/components/use-mobile-reveal.ts +0 -62
  572. package/src/components/use-table-state.ts +0 -753
  573. package/src/components/user-avatar.tsx +0 -116
  574. package/src/components/wizard-stepper.tsx +0 -42
  575. package/src/components/write-lock-labels.ts +0 -10
  576. package/src/components/write-lock.tsx +0 -253
  577. package/src/currencies.ts +0 -90
  578. package/src/data-table.ts +0 -42
  579. package/src/demo/demo-banner.tsx +0 -153
  580. package/src/demo/demo-countdown.ts +0 -136
  581. package/src/demo/demo-ended.tsx +0 -90
  582. package/src/demo/demo-labels.ts +0 -78
  583. package/src/demo/demo-session.ts +0 -32
  584. package/src/demo/demo-start.tsx +0 -156
  585. package/src/eslint/index.ts +0 -161
  586. package/src/eslint/role-utilities.generated.ts +0 -146
  587. package/src/eslint/role-utilities.ts +0 -233
  588. package/src/feedback/feedback-attachment-download.tsx +0 -77
  589. package/src/feedback/feedback-attachment-labels.ts +0 -37
  590. package/src/feedback/feedback-attachment.tsx +0 -1239
  591. package/src/feedback/feedback-capture.ts +0 -287
  592. package/src/feedback/feedback-comment-thread.tsx +0 -353
  593. package/src/feedback/feedback-context-labels.ts +0 -11
  594. package/src/feedback/feedback-context.tsx +0 -245
  595. package/src/feedback/feedback-crash.ts +0 -547
  596. package/src/feedback/feedback-diagnostics.tsx +0 -41
  597. package/src/feedback/feedback-dialog-labels.ts +0 -29
  598. package/src/feedback/feedback-dialog.tsx +0 -452
  599. package/src/feedback/feedback-entry-file.tsx +0 -150
  600. package/src/feedback/feedback-inbox.tsx +0 -552
  601. package/src/feedback/feedback-labels.ts +0 -144
  602. package/src/feedback/feedback-menu-labels.ts +0 -12
  603. package/src/feedback/feedback-menu.tsx +0 -177
  604. package/src/feedback/feedback-mutation.ts +0 -20
  605. package/src/feedback/feedback-page-link.ts +0 -90
  606. package/src/feedback/feedback-public-labels.ts +0 -81
  607. package/src/feedback/feedback-public-list.tsx +0 -524
  608. package/src/feedback/feedback-public-switch.tsx +0 -102
  609. package/src/feedback/feedback-public-types.ts +0 -101
  610. package/src/feedback/feedback-record.ts +0 -428
  611. package/src/feedback/feedback-replies-context.ts +0 -9
  612. package/src/feedback/feedback-replies.tsx +0 -343
  613. package/src/feedback/feedback-rework-entry-chip.tsx +0 -18
  614. package/src/feedback/feedback-row-detail-labels.ts +0 -31
  615. package/src/feedback/feedback-row-detail.tsx +0 -871
  616. package/src/feedback/feedback-status-undo.ts +0 -109
  617. package/src/feedback/feedback-submit-dialog.tsx +0 -131
  618. package/src/feedback/feedback-submit.tsx +0 -270
  619. package/src/feedback/feedback-swipe.tsx +0 -192
  620. package/src/feedback/feedback-table-labels.ts +0 -27
  621. package/src/feedback/feedback-table.tsx +0 -912
  622. package/src/feedback/feedback-thread-labels.ts +0 -22
  623. package/src/feedback/feedback-thread-parts-labels.ts +0 -41
  624. package/src/feedback/feedback-thread.tsx +0 -905
  625. package/src/feedback/feedback-vocabulary.ts +0 -263
  626. package/src/feedback/feedback-vote-button.tsx +0 -124
  627. package/src/feedback.ts +0 -116
  628. package/src/hooks/use-anchored-panel.ts +0 -396
  629. package/src/hooks/use-anchored-rect.ts +0 -77
  630. package/src/hooks/use-announce.ts +0 -85
  631. package/src/hooks/use-authed-src.ts +0 -167
  632. package/src/hooks/use-body-scroll-lock.ts +0 -119
  633. package/src/hooks/use-breakpoint.ts +0 -133
  634. package/src/hooks/use-close-transition.ts +0 -107
  635. package/src/hooks/use-copy-to-clipboard.ts +0 -122
  636. package/src/hooks/use-debounce.ts +0 -114
  637. package/src/hooks/use-dismiss.ts +0 -371
  638. package/src/hooks/use-document-title.ts +0 -33
  639. package/src/hooks/use-file-drop.ts +0 -121
  640. package/src/hooks/use-file-picker-labels.ts +0 -28
  641. package/src/hooks/use-file-picker.tsx +0 -359
  642. package/src/hooks/use-focus-trap.ts +0 -199
  643. package/src/hooks/use-hotkey.ts +0 -212
  644. package/src/hooks/use-large-text.ts +0 -41
  645. package/src/hooks/use-long-press.ts +0 -140
  646. package/src/hooks/use-media-query.ts +0 -39
  647. package/src/hooks/use-mounted.ts +0 -39
  648. package/src/hooks/use-noindex.ts +0 -37
  649. package/src/hooks/use-overlay-history.ts +0 -714
  650. package/src/hooks/use-row-swipe.ts +0 -207
  651. package/src/hooks/use-search-param-state.ts +0 -434
  652. package/src/hooks/use-windowed-rows.ts +0 -225
  653. package/src/i18n/defaults.ts +0 -267
  654. package/src/i18n/german.ts +0 -2059
  655. package/src/i18n/kit-labels.tsx +0 -1003
  656. package/src/i18n/languages.ts +0 -349
  657. package/src/i18n/locales/de-CH.ts +0 -24
  658. package/src/i18n/locales/en.ts +0 -267
  659. package/src/i18n/locales/es.ts +0 -1999
  660. package/src/i18n/locales/fr.ts +0 -2037
  661. package/src/i18n/locales/hu.ts +0 -2004
  662. package/src/i18n/locales/it.ts +0 -2014
  663. package/src/i18n/locales/zh.ts +0 -1912
  664. package/src/i18n/plurals.ts +0 -86
  665. package/src/i18n/review.ts +0 -475
  666. package/src/i18n/shared-labels.ts +0 -138
  667. package/src/i18n/swiss.ts +0 -29
  668. package/src/index.ts +0 -1191
  669. package/src/landing/access.ts +0 -93
  670. package/src/landing/landing-actions.tsx +0 -97
  671. package/src/landing/landing-labels.ts +0 -59
  672. package/src/landing/landing-sections.tsx +0 -341
  673. package/src/landing/page-seo.ts +0 -261
  674. package/src/landing/public-header.tsx +0 -121
  675. package/src/landing/public-page.tsx +0 -106
  676. package/src/landing/routing.tsx +0 -225
  677. package/src/lib/broadcast.ts +0 -52
  678. package/src/lib/calc.ts +0 -323
  679. package/src/lib/chip-edge-snap.ts +0 -212
  680. package/src/lib/clipboard-minus.ts +0 -107
  681. package/src/lib/clipping.ts +0 -34
  682. package/src/lib/cn.ts +0 -28
  683. package/src/lib/column-mapping.ts +0 -234
  684. package/src/lib/countries.ts +0 -91
  685. package/src/lib/data-attributes.ts +0 -14
  686. package/src/lib/date-format.ts +0 -227
  687. package/src/lib/dates.ts +0 -288
  688. package/src/lib/day-format.ts +0 -96
  689. package/src/lib/decimal-marks.ts +0 -108
  690. package/src/lib/describe-failure.ts +0 -18
  691. package/src/lib/device-settings.ts +0 -147
  692. package/src/lib/direction.ts +0 -74
  693. package/src/lib/document-navigation.ts +0 -17
  694. package/src/lib/document-title.ts +0 -41
  695. package/src/lib/download.ts +0 -172
  696. package/src/lib/float-clearance.ts +0 -70
  697. package/src/lib/floating-stack.ts +0 -70
  698. package/src/lib/focus-left.ts +0 -156
  699. package/src/lib/format.ts +0 -585
  700. package/src/lib/http-status.ts +0 -38
  701. package/src/lib/iban.ts +0 -251
  702. package/src/lib/ime.ts +0 -24
  703. package/src/lib/intl-cache.ts +0 -27
  704. package/src/lib/iso-day.ts +0 -13
  705. package/src/lib/lazy-with-fallback.ts +0 -82
  706. package/src/lib/logger.ts +0 -69
  707. package/src/lib/minus.ts +0 -50
  708. package/src/lib/path-pattern.ts +0 -55
  709. package/src/lib/person-name.ts +0 -155
  710. package/src/lib/phone.ts +0 -208
  711. package/src/lib/plain-text.ts +0 -22
  712. package/src/lib/presence.ts +0 -18
  713. package/src/lib/qr-encode.ts +0 -444
  714. package/src/lib/quiet-focus.ts +0 -32
  715. package/src/lib/reduced-motion.ts +0 -22
  716. package/src/lib/refs.ts +0 -22
  717. package/src/lib/round.ts +0 -43
  718. package/src/lib/safe-storage.ts +0 -119
  719. package/src/lib/server-wake.ts +0 -315
  720. package/src/lib/session-refresh.ts +0 -472
  721. package/src/lib/share-format.ts +0 -18
  722. package/src/lib/status-tone.ts +0 -43
  723. package/src/lib/strip-fade.ts +0 -287
  724. package/src/lib/table-text.ts +0 -554
  725. package/src/lib/text-case.ts +0 -19
  726. package/src/lib/text-match.ts +0 -169
  727. package/src/lib/thenable.ts +0 -19
  728. package/src/lib/translation-review.ts +0 -769
  729. package/src/notifications/device-zone-report.ts +0 -67
  730. package/src/notifications/feedback-notification-types-labels.ts +0 -33
  731. package/src/notifications/feedback-notification-types.ts +0 -71
  732. package/src/notifications/notification-bell.tsx +0 -119
  733. package/src/notifications/notification-inbox.tsx +0 -309
  734. package/src/notifications/notification-parts.tsx +0 -81
  735. package/src/notifications/notification-types-setting.tsx +0 -406
  736. package/src/notifications/notification-types.ts +0 -89
  737. package/src/notifications/notifications-labels.ts +0 -287
  738. package/src/notifications/push-device-setting.tsx +0 -230
  739. package/src/notifications/push-devices-setting.tsx +0 -374
  740. package/src/notifications/push-worker.ts +0 -168
  741. package/src/notifications/quiet-hours-setting.tsx +0 -238
  742. package/src/notifications/unsubscribe-panel.tsx +0 -200
  743. package/src/notifications/use-push-device.ts +0 -448
  744. package/src/offline/local-first.ts +0 -100
  745. package/src/offline/pwa-update-prompt-labels.ts +0 -9
  746. package/src/offline/pwa-update-prompt.tsx +0 -78
  747. package/src/offline/query-persistence.ts +0 -391
  748. package/src/offline/service-worker-updates.ts +0 -81
  749. package/src/offline/shared-computer-labels.ts +0 -8
  750. package/src/offline/shared-computer.tsx +0 -87
  751. package/src/offline/sign-out-pending-dialog-labels.ts +0 -21
  752. package/src/offline/sign-out-pending-dialog.tsx +0 -135
  753. package/src/offline.ts +0 -37
  754. package/src/push-worker.ts +0 -25
  755. package/src/rhf/fields.tsx +0 -2187
  756. package/src/rhf/form-core.tsx +0 -324
  757. package/src/rhf/form.tsx +0 -12
  758. package/src/rhf/line-items.tsx +0 -135
  759. package/src/rhf/use-rhf-wizard-step.ts +0 -104
  760. package/src/rhf.ts +0 -21
  761. package/src/search/command-palette-labels.ts +0 -16
  762. package/src/search/command-palette.tsx +0 -624
  763. package/src/search/global-search-labels.ts +0 -13
  764. package/src/search/global-search.tsx +0 -660
  765. package/src/search/search-index.ts +0 -283
  766. package/src/search/use-command-key.ts +0 -23
  767. package/src/search.ts +0 -14
  768. package/src/settings/device-reset-setting-labels.ts +0 -20
  769. package/src/settings/device-reset-setting.tsx +0 -116
  770. package/src/settings/settings-card-classes.ts +0 -11
  771. package/src/settings/settings-catalogue.ts +0 -150
  772. package/src/settings/settings-context.ts +0 -33
  773. package/src/settings/settings-heading.tsx +0 -67
  774. package/src/settings/settings-labels.ts +0 -87
  775. package/src/settings/settings-layout.tsx +0 -471
  776. package/src/settings/settings-section.tsx +0 -108
  777. package/src/settings/use-account-appearance.ts +0 -148
  778. package/src/settings/use-account-language.ts +0 -146
  779. package/src/settings/use-settings-focus.ts +0 -128
  780. package/src/settings/use-settings-route.ts +0 -258
  781. package/src/shell/account-menu-language.tsx +0 -130
  782. package/src/shell/account-menu-text-size.tsx +0 -80
  783. package/src/shell/admin-menu.tsx +0 -183
  784. package/src/shell/app-shell-labels.ts +0 -11
  785. package/src/shell/app-shell.tsx +0 -1560
  786. package/src/shell/auth-layout.tsx +0 -186
  787. package/src/shell/company-switcher-labels.ts +0 -13
  788. package/src/shell/company-switcher.tsx +0 -136
  789. package/src/shell/dev-menu.tsx +0 -257
  790. package/src/shell/fill-height.tsx +0 -45
  791. package/src/shell/language-code.ts +0 -5
  792. package/src/shell/option-switcher-menu.tsx +0 -84
  793. package/src/shell/sync-status-indicator.tsx +0 -303
  794. package/src/shell/top-bar-actions.tsx +0 -87
  795. package/src/shell/top-bar-brand.tsx +0 -78
  796. package/src/shell/top-bar-parts-labels.ts +0 -148
  797. package/src/shell/top-bar.tsx +0 -40
  798. package/src/shell/topbar-action-menu.tsx +0 -567
  799. package/src/shell/topbar-controls.tsx +0 -269
  800. package/src/shell/tour-menu.tsx +0 -187
  801. package/src/shell.ts +0 -108
  802. package/src/sync/db.ts +0 -129
  803. package/src/sync/engine.ts +0 -1011
  804. package/src/sync/hooks.ts +0 -98
  805. package/src/sync/testing.ts +0 -73
  806. package/src/sync/wire.ts +0 -61
  807. package/src/sync.ts +0 -37
  808. package/src/table-text.ts +0 -8
  809. package/src/testing/css-variables.generated.ts +0 -112
  810. package/src/testing/css-variables.ts +0 -189
  811. package/src/testing/index.ts +0 -29
  812. package/src/testing/react.ts +0 -58
  813. package/src/testing/tour.ts +0 -41
  814. package/src/testing/viewport.ts +0 -357
  815. package/src/theme/chart-palette.ts +0 -232
  816. package/src/theme/color.ts +0 -272
  817. package/src/theme/contrast-tokens.ts +0 -268
  818. package/src/theme/contrast.ts +0 -250
  819. package/src/theme/palette-derive.ts +0 -825
  820. package/src/theme/palette-presets.ts +0 -544
  821. package/src/theme/palette-store.ts +0 -108
  822. package/src/theme/text-size.ts +0 -289
  823. package/src/theme/theme-store.ts +0 -157
  824. package/src/tour/tour-catalogue-labels.ts +0 -75
  825. package/src/tour/tour-catalogue.tsx +0 -335
  826. package/src/tour/tour-dock.ts +0 -134
  827. package/src/tour/tour-engine.ts +0 -37
  828. package/src/tour/tour-gates.ts +0 -218
  829. package/src/tour/tour-guide-button.tsx +0 -64
  830. package/src/tour/tour-guide-labels.ts +0 -15
  831. package/src/tour/tour-info.ts +0 -144
  832. package/src/tour/tour-labels.ts +0 -23
  833. package/src/tour/tour-overlay.tsx +0 -1170
  834. package/src/tour/tour.tsx +0 -750
  835. package/src/tour/use-tour-progress.ts +0 -671
  836. package/src/tour/use-tour-url-sync.ts +0 -266
  837. package/src/tour.ts +0 -21
  838. package/src/vite-env.d.ts +0 -23
  839. package/src/wizard/stepper-nav.tsx +0 -360
  840. package/src/wizard/types.ts +0 -275
  841. package/src/wizard/use-wizard.ts +0 -560
  842. package/src/wizard/validation.ts +0 -39
  843. package/src/wizard/wizard-context.tsx +0 -74
  844. package/src/wizard/wizard-labels.ts +0 -29
  845. package/src/wizard/wizard-step.tsx +0 -76
  846. package/src/wizard/wizard-summary.tsx +0 -84
  847. package/src/wizard.ts +0 -15
@@ -1,714 +0,0 @@
1
- import { useEffect, useRef } from "react";
2
-
3
- /**
4
- * Back closes the overlay, not the page (Keksdose feedback #172).
5
- *
6
- * On a phone the Back gesture is the universal "dismiss this" — so a dialog or a
7
- * full-screen search surface that ignores it doesn't merely fail to close: the
8
- * navigation lands somewhere else entirely, and on a route with nothing beneath it
9
- * that means leaving the app with the overlay still notionally open.
10
- *
11
- * The mechanism is one throwaway, SAME-URL history entry pushed while the overlay is
12
- * up. Back then pops a same-document entry — no route change, no re-render of the
13
- * page under it — and this hook turns that pop into `onClose()`. Same trick the
14
- * transactions page already uses for its unsaved-edit trap
15
- * (`use-soft-leave-guard.ts`); the two coexist because they use different marker
16
- * keys AND because `handlePop` only claims a pop that actually consumed OUR entry
17
- * — a foreign sentinel stacked on top of ours pops back ONTO us, and an overlay
18
- * that closed on that would vanish mid-edit (feedback #424/#426).
19
- *
20
- * Not a URL parameter, deliberately. Encoding "a dialog is open" in the address bar
21
- * makes it shareable and restorable, which is wrong for the overlays this covers —
22
- * nobody wants to send someone a link that opens a confirm dialog — and it would
23
- * fight the page-owned `?row=` / `f.*` params that ARE meaningful state.
24
- *
25
- * ## Ordering
26
- *
27
- * The stack is module-level because correctness here is about order ACROSS
28
- * instances: every mounted overlay hears the same `popstate`, but only the one whose
29
- * entry was actually popped may close. Overlays nest and unwind last-in-first-out —
30
- * a dialog opened from a search surface closes before the surface — so the top of
31
- * this stack is by construction the entry the browser just popped.
32
- *
33
- * ## Not undoing a real navigation
34
- *
35
- * The cleanup pops our entry when the overlay closes some other way (a button,
36
- * Escape, a backdrop click) so history doesn't silently accumulate dead entries. It
37
- * first checks that our marker is still the CURRENT entry: if the user followed a
38
- * link while the overlay was open, the router has pushed on top of us, and a blind
39
- * `history.back()` there would undo their navigation.
40
- *
41
- * ## Not undoing the owner's own close
42
- *
43
- * Nor when the address under the entry changed in the same breath as the close
44
- * (keksdose dev #584). A page that opens its editor by PUSHING `?row=x` and closes it
45
- * by REPLACING the clean URL over the top entry rewrites OUR entry — the overlay sits
46
- * above `?row=x` — and that rewrite is what unmounts the overlay. Going back from there
47
- * lands on `?row=x` and the router opens the editor that was just closed. See
48
- * {@link noteAddress}: an address the overlay LIVED THROUGH (a filter the table wrote
49
- * while its sheet was up) is still unwound, because the user has acted since.
50
- *
51
- * ## Not undoing the owner's replaces either
52
- *
53
- * An address the overlay lived through is unwound as an ENTRY, never as an address
54
- * (keksdose live #412). A report that writes each tick of its payee sheet into the query
55
- * with `setSearchParams(…, { replace: true })` rewrites the overlay's own entry, and the
56
- * page entry beneath still carries the address from before the sheet opened — so the
57
- * traversal that took our entry away also took every tick with it. See {@link carryOnto}:
58
- * whichever way the entry goes (the unwind after a press, or a Back press), the address it
59
- * last showed is carried onto the entry it lands on, and the router is told.
60
- *
61
- * ## The traversal is deferred
62
- *
63
- * And it is *scheduled* rather than issued, because `history.go()` lands a task
64
- * later while everything this module knows is written synchronously. See
65
- * {@link Unwind}: an overlay opening inside that window adopts the entry instead
66
- * of stacking a second one on it, which is what makes the hook survive React
67
- * StrictMode's mount → clean up → mount (steering-design feedback #49).
68
- */
69
- const SENTINEL_KEY = "__hbUiOverlayHistory";
70
-
71
- interface OverlayEntry {
72
- id: string;
73
- close: () => void;
74
- /** The overlay refuses to close right now — see the `held` option. */
75
- held: () => boolean;
76
- }
77
-
78
- const stack: OverlayEntry[] = [];
79
-
80
- /**
81
- * The sentinels we have PUSHED and not yet unwound, oldest first.
82
- *
83
- * The stack above tracks live overlays; this tracks live history entries, and the
84
- * two come apart in exactly one case — which is the bug this list exists for.
85
- * Nested overlays that close in the same commit unwind parent-first, so the dialog's
86
- * cleanup runs while the sheet's entry is still on top of its own. It cannot call
87
- * `history.back()` there (that would consume the SHEET's entry, and the sheet is
88
- * about to consume it itself), so its entry was simply abandoned: a husk with no
89
- * live owner sitting between the user and the page.
90
- *
91
- * The user paid for it on the next Back press. It popped the husk, `handlePop` found
92
- * an empty stack and returned, and nothing visible happened — Back had to be pressed
93
- * twice to leave the page.
94
- *
95
- * So an abandoned entry is recorded as `dead` instead, and whichever overlay DOES
96
- * get to unwind pays the debt with a single `history.go(-n)`. `href` is what keeps
97
- * that safe: only dead entries pushed at the address we are still sitting at are
98
- * unwound, so a router navigation that landed between two sentinels is never
99
- * reversed on the user's behalf.
100
- */
101
- interface PushedEntry {
102
- id: string;
103
- /** The full address of the entry (query and hash included) as of the last time the
104
- * user acted while it was current — see {@link noteAddress}. */
105
- href: string;
106
- /** Its overlay is gone but the entry is not — someone above owes this pop. */
107
- dead: boolean;
108
- /** The router's `idx` on this entry when the marker went on — see {@link locate}. */
109
- idx: number | undefined;
110
- /** The router's `key` copied from the page entry beneath ours. */
111
- key: string | undefined;
112
- /** {@link routeOf} the address the marker was placed at. */
113
- route: string;
114
- /** The entry's address as last OBSERVED, after the user's last gesture had run its
115
- * handlers — what a Back press must carry down (see {@link carryOnto}). `href` is
116
- * the snapshot BEFORE the gesture, which the owner's-close check needs instead. */
117
- seen: string;
118
- }
119
- const pushed: PushedEntry[] = [];
120
-
121
- /**
122
- * Entries of ours that a ROUTER NAVIGATION made from inside the overlay has left
123
- * behind — ours, still in the history, but no longer on top and no longer anyone's.
124
- *
125
- * Nothing can take an entry out from under a newer one, so they cannot be unwound;
126
- * what can be done is to not let the user land on one. A traversal that comes to
127
- * rest on a buried entry is carried straight on over the whole run of them, in the
128
- * direction it was going (see `skipBuried`): Back from the new page lands on the page
129
- * the overlay was opened from, Forward from there lands on the new page, and no press
130
- * is spent on an entry with nothing on screen for it.
131
- *
132
- * `below` / `above` count the buried entries of the same run on either side. The
133
- * router's `idx` tells the direction apart — except after a REPLACE navigation, when
134
- * the page above the run shares the run's `idx`; the two keys decide there.
135
- */
136
- interface BuriedEntry {
137
- idx: number;
138
- /** The `idx` of the router entry that buried the run: higher after a push, the
139
- * same after a replace. */
140
- aboveIdx: number;
141
- /** The key of the page entry directly beneath the run. */
142
- belowKey: string | undefined;
143
- /** The key of the router entry that buried the run, when it did. */
144
- aboveKey: string | undefined;
145
- below: number;
146
- above: number;
147
- }
148
- const buried = new Map<string, BuriedEntry>();
149
-
150
- /** The router `{idx, key}` of the entry the last traversal (or burial) left us on —
151
- * what `skipBuried` compares against to know which way the user was going. */
152
- let lastSeen: { idx: number | undefined; key: string | undefined } | null = null;
153
-
154
- /** Entries a real Back press already consumed. Their overlay's cleanup still has to
155
- * run, and it must not mistake "my entry is not current" for "my entry is buried"
156
- * — it has no entry left at all. */
157
- const consumed = new Set<string>();
158
-
159
- /** Pops WE caused (a cleanup unwinding its own entries) — their `popstate` is
160
- * bookkeeping, not a user gesture, and must not close a second overlay. A
161
- * `history.go(-n)` traversal fires exactly ONE popstate however far it travels. */
162
- let pendingProgrammatic = 0;
163
- let listening = false;
164
- /** Whether the gesture listeners ({@link noteAddress}, {@link noteSeen}) are on — see
165
- * {@link syncGestureListeners}. */
166
- let noting = false;
167
- let nextId = 0;
168
-
169
- /**
170
- * The unwind a cleanup has asked for and not yet issued.
171
- *
172
- * **`history.go()` is asynchronous and everything above is written
173
- * synchronously**, which is the seam the whole of this block exists to close.
174
- * The traversal lands a task later, so an overlay that opens in the *same* tick
175
- * as one that closed used to push its sentinel on top of the entry that was
176
- * about to be popped — and the pop then took the NEW entry. The overlay left on
177
- * screen had no entry of its own (so Back no longer closed it) and the old one
178
- * stayed behind as a husk between the user and their page.
179
- *
180
- * That is not an exotic race. **React StrictMode remounts every effect** — mount,
181
- * clean up, mount again, all in one commit — so in development *every* dialog
182
- * anyone opened left a husk behind, the position drifted one entry further from
183
- * the page on each open, and the Back press that was meant to leave the page was
184
- * spent on something invisible instead (steering-design feedback #49).
185
- *
186
- * So the traversal is deferred by a task, and an overlay mounting inside that
187
- * window **adopts** the entry instead of pushing a second one (see the effect).
188
- * Adoption is `replaceState` on an entry that is already there: no traversal, no
189
- * window in which the count can be wrong, and the StrictMode remount costs
190
- * exactly nothing.
191
- */
192
- interface Unwind {
193
- timer: ReturnType<typeof setTimeout>;
194
- /** The sentinel on the entry to leave — the top of `entries`. */
195
- id: string;
196
- href: string;
197
- /** That entry plus the abandoned ones directly beneath it, oldest first. */
198
- entries: PushedEntry[];
199
- }
200
- let unwind: Unwind | null = null;
201
-
202
- /** Issue the deferred traversal, if the ground has not moved under it.
203
- *
204
- * A real Back press or a router navigation during the deferred task leaves us
205
- * somewhere that is not the entry we meant to leave, and going back from there
206
- * would take something that is not ours. The entries are then simply forgotten
207
- * rather than handed back as `dead`: a forgotten entry costs one dead Back
208
- * press, while an over-counted one costs the user a navigation they did make. */
209
- function runUnwind(): void {
210
- const job = unwind;
211
- unwind = null;
212
- if (!job) return;
213
- if (currentSentinel() !== job.id || currentHref() !== job.href) {
214
- // A router navigation landed between the cleanup and this task: the entries
215
- // are under it (or were replaced by it) rather than simply forgotten.
216
- if (taggedSentinel() === null) buryUnder(job.entries);
217
- return;
218
- }
219
- const bottom = job.entries[0];
220
- carry = { href: job.href, idx: bottom.idx, key: bottom.key };
221
- pendingProgrammatic += 1;
222
- window.history.go(-job.entries.length);
223
- }
224
-
225
- /** The address an unwind in flight must carry onto the entry it lands on. */
226
- let carry: { href: string; idx: number | undefined; key: string | undefined } | null = null;
227
-
228
- /**
229
- * Put `href` — the address the overlay's entry last showed — onto the entry a traversal
230
- * has just landed on, and tell the router (keksdose live #412).
231
- *
232
- * Only the query and the hash can differ: an address naming another page is a
233
- * navigation, never carried. And only onto the page entry the overlay was opened over,
234
- * which our push copied the router's `{idx, key}` from — a traversal that came to rest
235
- * anywhere else is not ours to rewrite.
236
- *
237
- * The router heard the traversal land on the OLD address in this same event, so a
238
- * `replaceState` alone would leave it showing the old query under the new one. A
239
- * synthetic `popstate` makes it read the address again; both reads happen in one event
240
- * dispatch, so React commits only the second. Ours absorbs it as programmatic.
241
- */
242
- function carryOnto(href: string, mark: { idx: number | undefined; key: string | undefined }): void {
243
- const here = currentHref();
244
- if (here === href || routeOf(here) !== routeOf(href)) return;
245
- const now = routerMark();
246
- if (mark.idx !== undefined && now.idx !== undefined && mark.idx !== now.idx) return;
247
- if (mark.key !== undefined && now.key !== undefined && mark.key !== now.key) return;
248
- const state: unknown = window.history.state;
249
- window.history.replaceState(state, "", href);
250
- pendingProgrammatic += 1;
251
- window.dispatchEvent(new PopStateEvent("popstate", { state }));
252
- }
253
-
254
- function currentHref(): string {
255
- return typeof window === "undefined" ? "" : window.location.href;
256
- }
257
-
258
- /** The router's own `{idx, key}` on the current entry, where a router has put them. */
259
- function routerMark(): { idx: number | undefined; key: string | undefined } {
260
- const state = typeof window !== "undefined" ? (window.history.state as unknown) : null;
261
- if (!state || typeof state !== "object") return { idx: undefined, key: undefined };
262
- const { idx, key } = state as Record<string, unknown>;
263
- return { idx: typeof idx === "number" ? idx : undefined, key: typeof key === "string" ? key : undefined };
264
- }
265
-
266
- /**
267
- * The part of an address that names the PAGE — the query string left out.
268
- *
269
- * A `setSearchParams(…, { replace: true })` rewrites the query on the entry the
270
- * overlay is standing on; that is a wipe to repair, not a move. Anything else changing
271
- * is a navigation. Under a hash router the page lives in the hash (`#/table?f.q=x`), so
272
- * a hash that starts with `#/` counts up to its own `?`; an ordinary `#fragment` does
273
- * not name a page and is left out.
274
- */
275
- function routeOf(href: string): string {
276
- try {
277
- const url = new URL(href);
278
- const hashRoute = url.hash.startsWith("#/") ? url.hash.split("?")[0] : "";
279
- return url.origin + url.pathname + hashRoute;
280
- } catch {
281
- return href;
282
- }
283
- }
284
-
285
- /**
286
- * Is the untagged entry we are standing on still `p`'s — merely wiped by the router —
287
- * or an entry the router NAVIGATED to from inside the overlay?
288
- *
289
- * The router's `idx` is the one per-entry fact that separates the two, because it is
290
- * the one the router itself keeps straight: a replace leaves it as it was, a push adds
291
- * one. Our own push copies the page's state, so our entry carries the page's `idx` and
292
- * a router push on top of it carries one more. The key would not do — every replace
293
- * mints a new one, so the wipe this repair exists for would already fail it. Neither
294
- * would the address alone: a push to the address we are already at is still a push.
295
- *
296
- * `idx` does not see one move, the router REPLACING our entry with a different page
297
- * (same `idx`), so the page named by the address must also be unchanged. Where there is
298
- * no `idx` to compare (no router, or one that keeps none) the address is all there is.
299
- */
300
- function isStillOn(p: PushedEntry): boolean {
301
- if (routeOf(currentHref()) !== p.route) return false;
302
- const { idx } = routerMark();
303
- return idx === undefined || p.idx === undefined || idx === p.idx;
304
- }
305
-
306
- /**
307
- * The router has navigated while our entries were on top: record which of `records`
308
- * (ours, oldest first, ending with the top one) it buried and which it replaced, and
309
- * drop them from `pushed` — none of them can be unwound any more. Returns whether it
310
- * recognised a navigation at all; when it cannot tell (no router `idx` to go by), it
311
- * leaves everything as it was and the caller falls back to marking the entry dead.
312
- */
313
- function buryUnder(records: PushedEntry[]): boolean {
314
- const top = records[records.length - 1];
315
- const here = routerMark();
316
- if (!top || top.idx === undefined || here.idx === undefined) return false;
317
- let run: PushedEntry[];
318
- if (here.idx > top.idx) {
319
- run = [];
320
- for (let i = records.length - 1; i >= 0 && records[i].idx === top.idx; i -= 1) run.unshift(records[i]);
321
- } else if (here.idx === top.idx && !isStillOn(top)) {
322
- // Replaced: the top entry IS the new page now, and gone as ours. Those beneath it
323
- // are buried under it.
324
- run = [];
325
- for (let i = records.length - 2; i >= 0 && records[i].idx === top.idx; i -= 1) run.unshift(records[i]);
326
- } else {
327
- return false;
328
- }
329
- run.forEach((r, i) => {
330
- buried.set(r.id, {
331
- idx: top.idx as number,
332
- aboveIdx: here.idx as number,
333
- belowKey: run[0].key,
334
- aboveKey: here.key,
335
- below: i,
336
- above: run.length - 1 - i,
337
- });
338
- });
339
- for (const r of records) forgetPushed(r.id);
340
- lastSeen = here;
341
- return true;
342
- }
343
-
344
- /**
345
- * A traversal came to rest on one of our buried entries: carry it on over the run, the
346
- * way it was going. Back from above (a higher `idx`, or the very entry that buried us)
347
- * continues down to the page beneath; Forward from that page continues up. A landing
348
- * from anywhere this cannot place is left alone — one idle press is the price of not
349
- * guessing, and a wrong guess would move the user somewhere they did not ask to go.
350
- */
351
- function skipBuried(from: typeof lastSeen): void {
352
- const tag = taggedSentinel();
353
- const rec = tag !== null ? buried.get(tag) : undefined;
354
- if (!rec || !from || stack.some((e) => e.id === tag)) return;
355
- let steps = 0;
356
- if ((from.idx !== undefined && from.idx > rec.idx) || (from.key !== undefined && from.key === rec.aboveKey)) {
357
- steps = -(rec.below + 1);
358
- } else if (
359
- from.idx !== undefined &&
360
- // Below the run, or level with it when nothing above it is (a push buried it),
361
- // or level with it and provably the page beneath (a replace buried it). The
362
- // router's first entry has no key at all, so an absent key is a key here.
363
- (from.idx < rec.idx || (from.idx === rec.idx && (rec.aboveIdx > rec.idx || from.key === rec.belowKey)))
364
- ) {
365
- steps = rec.above + 1;
366
- }
367
- if (steps === 0) return;
368
- pendingProgrammatic += 1;
369
- window.history.go(steps);
370
- }
371
-
372
- function forgetPushed(id: string): void {
373
- const at = pushed.findIndex((p) => p.id === id);
374
- if (at >= 0) pushed.splice(at, 1);
375
- }
376
-
377
- /**
378
- * The sentinel this module believes is on the entry we are standing on.
379
- *
380
- * `history.state` is where the tag physically sits, because it is the only
381
- * per-entry storage a browser has — but it is not this module's storage, so
382
- * since the 2026-09-22 audit it is no longer read as the last word.
383
- * The ROUTER owns that object and writes it WHOLE: every
384
- * `setSearchParams(…, { replace: true })` stamps `{usr, key, idx}` over
385
- * whatever was there. A `DataTable` with `urlSync` does exactly that, on mount
386
- * and on every filter change — so an overlay opened from such a table had its
387
- * tag wiped off the entry it was standing on, and then:
388
- *
389
- * * its cleanup read "not my entry" and abandoned a live entry as a husk;
390
- * * the push path below could not find itself in `pushed`, so it discarded
391
- * every record it had (`splice(0)`) and nothing was ever unwound again;
392
- * * the StrictMode adoption never matched, so in development every dialog
393
- * pushed a second entry and the deferred `go(-1)` ate the live one — which
394
- * is Back no longer closing the overlay at all.
395
- *
396
- * So `standing` answers when the tag is gone: a MISSING tag on an entry we have
397
- * not left is a wipe to repair rather than a verdict. The tag is still read
398
- * FIRST wherever it is there, because it is the one thing that can see a FOREIGN
399
- * same-URL entry stacked above ours (feedback #424/#426, below) — module-level
400
- * bookkeeping cannot, since nobody tells us about someone else's `pushState`.
401
- */
402
- let standing: string | null = null;
403
-
404
- /** The tag actually on the current entry, with no repair and no belief. */
405
- function taggedSentinel(): string | null {
406
- const state = typeof window !== "undefined" ? window.history.state : null;
407
- if (!state || typeof state !== "object") return null;
408
- const id = (state as Record<string, unknown>)[SENTINEL_KEY];
409
- return typeof id === "string" ? id : null;
410
- }
411
-
412
- /** Put our tag back on the current entry, keeping whatever the router has since
413
- * written there — we are a passenger in that object, not its owner. */
414
- function retag(id: string): void {
415
- const prev = window.history.state;
416
- window.history.replaceState({ ...(prev && typeof prev === "object" ? prev : {}), [SENTINEL_KEY]: id }, "");
417
- }
418
-
419
- function currentSentinel(): string | null {
420
- const tag = taggedSentinel();
421
- if (tag !== null) {
422
- standing = tag;
423
- return tag;
424
- }
425
- if (standing === null || typeof window === "undefined") return null;
426
- // Only ever re-stamp an entry we still hold a record for. Without that guard a
427
- // belief left over from an overlay that is long gone — a tab that has since
428
- // navigated, a test file that ran another case — would be stamped onto a
429
- // stranger's entry, and the next cleanup would traverse off it.
430
- //
431
- // And only an entry that is still the one the marker was placed on. A row that
432
- // NAVIGATES (a palette result, a dialog's link) has the router push the new page
433
- // before the overlay's cleanup runs; that entry carries no tag either, and
434
- // re-stamping it made the cleanup "unwind" the navigation itself — the page
435
- // changed and changed straight back. See `isStillOn` for how the two are told apart.
436
- const record = pushed.find((p) => p.id === standing);
437
- if (!record || !isStillOn(record)) {
438
- standing = null;
439
- return null;
440
- }
441
- retag(standing);
442
- return standing;
443
- }
444
-
445
- /**
446
- * The user is about to act: what the current entry's address is NOW is what the
447
- * overlay standing on it has lived through.
448
- *
449
- * The cleanup needs to tell two same-page query rewrites apart, and the address alone
450
- * cannot. A `DataTable` with `urlSync` replaces `f.*` over the entry while its filter
451
- * sheet is up, and the sheet is closed LATER, by a press of its own — that entry is
452
- * still the sheet's and must be unwound (the audit's drift fix, below). A page whose
453
- * `?row=` drives the overlay replaces the clean URL over the entry and the overlay
454
- * unmounts BECAUSE of it (keksdose dev #584) — that entry is the owner's now, and
455
- * unwinding lands on `?row=` beneath and reopens what was just closed. What separates
456
- * them is whether the user acted in between: the rewrite that closes an overlay is
457
- * made by the very press that closes it, so it postdates this snapshot.
458
- *
459
- * Capture phase, so the snapshot is taken before any handler of the press runs.
460
- */
461
- function noteAddress(): void {
462
- const top = pushed[pushed.length - 1];
463
- if (!top || top.dead || !stack.some((e) => e.id === top.id)) return;
464
- const tag = taggedSentinel();
465
- // Read without `currentSentinel`'s repair: an observation must not write history.
466
- if (tag === top.id || (tag === null && standing === top.id && isStillOn(top))) {
467
- top.href = currentHref();
468
- top.seen = top.href;
469
- }
470
- }
471
-
472
- /** After the user's gesture has run its handlers: the address its entry now shows —
473
- * what a Back press must carry down (keksdose live #412). Again a little later, for a
474
- * handler that writes the address a task after the event. */
475
- function noteSeen(): void {
476
- const top = pushed[pushed.length - 1];
477
- if (!top || top.dead || !stack.some((e) => e.id === top.id)) return;
478
- const tag = taggedSentinel();
479
- if (tag === top.id || (tag === null && standing === top.id && isStillOn(top))) top.seen = currentHref();
480
- }
481
-
482
- function noteSeenNowAndLater(): void {
483
- noteSeen();
484
- setTimeout(noteSeen, 0);
485
- }
486
-
487
- function handlePop() {
488
- // A pop MOVES us, so the belief is stale by definition: re-read it from the
489
- // entry we have landed on before anything below consults it, or the repair in
490
- // `currentSentinel` would stamp the entry we just left onto the one we are on.
491
- standing = taggedSentinel();
492
- const from = lastSeen;
493
- lastSeen = routerMark();
494
- if (pendingProgrammatic > 0) {
495
- pendingProgrammatic -= 1;
496
- const job = carry;
497
- carry = null;
498
- if (job) carryOnto(job.href, job);
499
- return;
500
- }
501
- closeOnPop();
502
- skipBuried(from);
503
- }
504
-
505
- function closeOnPop() {
506
- // Nothing open → an ordinary navigation, which is none of our business.
507
- const top = stack[stack.length - 1];
508
- if (!top) return;
509
- // We landed back ON the top overlay's own entry, so that entry was NOT what the
510
- // pop consumed — something stacked ABOVE it was (Keksdose feedback #424/#426).
511
- // The app layers a second same-URL sentinel of its own on top of ours for the
512
- // unsaved-edit trap (`use-soft-leave-guard.ts`), and it pops that sentinel every
513
- // time the form goes back to clean — twice-toggling one field was enough to
514
- // close the whole dialog. A pop is only ours when the entry we came to rest on
515
- // is no longer ours: either the layer below (a different overlay's marker) or
516
- // the plain page entry (none at all).
517
- if (currentSentinel() === top.id) return;
518
- // Checked before anything below moves: a held overlay keeps its place and its record.
519
- if (top.held()) {
520
- putBack(top.id);
521
- return;
522
- }
523
- stack.pop();
524
- syncGestureListeners();
525
- // The browser consumed this entry, so the overlay's own cleanup has nothing left
526
- // to unwind and nothing to record as owed.
527
- consumed.add(top.id);
528
- const record = pushed.find((p) => p.id === top.id);
529
- forgetPushed(top.id);
530
- // What the page wrote into the address while we were up stays (#412).
531
- if (record && !record.dead) carryOnto(record.seen, record);
532
- top.close();
533
- }
534
-
535
- /**
536
- * A Back press the top overlay refuses (a busy `Modal`, DUP-3). A popstate cannot be
537
- * refused — the browser has already left our entry — so the entry is put back: what the
538
- * page wrote into the address while the overlay was up is carried down first (#412), as
539
- * for a close, and the same marker is pushed again over it, as the mount pushed it. Left
540
- * on the page entry, the overlay would stay up with no entry of its own, and the Back
541
- * after its request would leave the page under it.
542
- *
543
- * A push and not `history.go(1)` back onto the old entry: a traversal lands a task later
544
- * and fires nothing at all if a listener has pushed meanwhile, and a programmatic pop
545
- * counted for it would then swallow the user's next real Back.
546
- */
547
- function putBack(id: string): void {
548
- const record = pushed.find((p) => p.id === id);
549
- if (record && !record.dead) carryOnto(record.seen, record);
550
- const prev: unknown = window.history.state;
551
- window.history.pushState({ ...(prev && typeof prev === "object" ? prev : {}), [SENTINEL_KEY]: id }, "");
552
- standing = id;
553
- // The address the entry shows now is the one the user last acted on: the cleanup's
554
- // owner's-close check (#584) must not read the carried address as a rewrite.
555
- if (record) record.href = record.seen = currentHref();
556
- }
557
-
558
- /** `popstate` stays from the first overlay on: a traversal of ours (an unwind, a buried
559
- * run to skip) lands after the overlay that caused it has gone. */
560
- function ensureListening() {
561
- if (listening || typeof window === "undefined") return;
562
- window.addEventListener("popstate", handlePop);
563
- listening = true;
564
- }
565
-
566
- const SEEN_EVENTS = ["click", "keyup", "change", "input"] as const;
567
-
568
- /**
569
- * The gesture listeners, on while an overlay is open and off when the last one closes.
570
- * Both notes return at once with no overlay up, but the four bubbling ones scheduled a
571
- * timer for their second look even then — for every click and every keystroke in every
572
- * field, for the life of the page after its first dialog (refactor audit 2026-10-30,
573
- * INP-14). Called after each change to `stack`.
574
- */
575
- function syncGestureListeners(): void {
576
- const want = stack.length > 0;
577
- if (want === noting || typeof window === "undefined") return;
578
- noting = want;
579
- if (want) {
580
- window.addEventListener("pointerdown", noteAddress, true);
581
- window.addEventListener("keydown", noteAddress, true);
582
- for (const type of SEEN_EVENTS) window.addEventListener(type, noteSeenNowAndLater);
583
- } else {
584
- window.removeEventListener("pointerdown", noteAddress, true);
585
- window.removeEventListener("keydown", noteAddress, true);
586
- for (const type of SEEN_EVENTS) window.removeEventListener(type, noteSeenNowAndLater);
587
- }
588
- }
589
-
590
- /**
591
- * Make the platform Back gesture dismiss an overlay.
592
- *
593
- * @param open whether the overlay is currently showing. Components that mount
594
- * only while open (the common case) pass `true`.
595
- * @param onClose the overlay's own close handler — the same one Escape calls.
596
- * @param options.held the overlay refuses to close right now (a `Modal` whose request
597
- * is in flight, DUP-3): Back does not call `onClose`, and the entry the
598
- * press took is put back, so the overlay still has one for the next
599
- * Back. Read when Back is pressed. Default false.
600
- */
601
- export function useOverlayHistory(open: boolean, onClose: () => void, { held = false }: { held?: boolean } = {}): void {
602
- // The listener fires outside React's render, so it reads the latest handler
603
- // through a ref rather than through the closure the effect captured.
604
- const closeRef = useRef(onClose);
605
- const heldRef = useRef(held);
606
- useEffect(() => {
607
- closeRef.current = onClose;
608
- heldRef.current = held;
609
- });
610
-
611
- useEffect(() => {
612
- if (!open || typeof window === "undefined") return;
613
- ensureListening();
614
- const id = `overlay-${(nextId += 1)}`;
615
- const entry: OverlayEntry = { id, close: () => closeRef.current(), held: () => heldRef.current };
616
- stack.push(entry);
617
- syncGestureListeners();
618
- const prev = window.history.state;
619
- const marked = { ...(prev && typeof prev === "object" ? prev : {}), [SENTINEL_KEY]: id };
620
- // An entry that is on its way out and that we are still standing on is ours
621
- // to take over: same URL, same slot, only the marker changes. Pushing a
622
- // second one on top of it is what used to leave a husk on every StrictMode
623
- // remount — see {@link Unwind}.
624
- const adopting = unwind && unwind.id === currentSentinel() && unwind.href === currentHref();
625
- if (adopting && unwind) {
626
- clearTimeout(unwind.timer);
627
- const inherited = unwind.entries;
628
- unwind = null;
629
- // Preserve react-router's own `{usr,key,idx}` — we only swap the marker,
630
- // and the entry we are swapping it on is the one the router is already on.
631
- window.history.replaceState(marked, "");
632
- // The abandoned ones beneath come back owed; ours takes the top slot.
633
- for (const owed of inherited.slice(0, -1)) pushed.push({ ...owed, dead: true });
634
- const was = inherited[inherited.length - 1];
635
- pushed.push({
636
- id,
637
- href: currentHref(),
638
- seen: currentHref(),
639
- dead: false,
640
- idx: was.idx,
641
- key: was.key,
642
- route: was.route,
643
- });
644
- standing = id;
645
- } else {
646
- // A push DESTROYS every entry ahead of the one we are on, so anything we
647
- // still had recorded above our own position is gone. Kept, those would be
648
- // counted into a later `history.go(-n)` and the overshoot would come out
649
- // of a navigation the user actually made. Where we cannot tell which of
650
- // ours are beneath us — we are standing on a plain page entry, or on a
651
- // husk nobody tracks — none of them can be proven to be, so none survive.
652
- const under = pushed.findIndex((p) => p.id === currentSentinel());
653
- pushed.splice(under + 1);
654
- // Preserve react-router's own `{usr,key,idx}` — we only tack a marker on, and
655
- // the URL is unchanged, so the router treats popping this as a no-op re-render.
656
- window.history.pushState(marked, "");
657
- const page = routerMark();
658
- const at = currentHref();
659
- pushed.push({ id, href: at, seen: at, dead: false, idx: page.idx, key: page.key, route: routeOf(at) });
660
- standing = id;
661
- }
662
- return () => {
663
- const at = stack.indexOf(entry);
664
- if (at >= 0) stack.splice(at, 1);
665
- syncGestureListeners();
666
-
667
- // A Back press already took this entry; there is nothing to unwind or to owe.
668
- if (consumed.delete(id)) return;
669
-
670
- const mine = pushed.findIndex((p) => p.id === id);
671
- // Still our entry — same page, same router `idx` — but its address is not the one
672
- // the user last acted on: the owner rewrote it as part of closing us (see
673
- // {@link noteAddress}). The entry is the owner's page now, and the one beneath is
674
- // the address it replaced — going back would restore exactly what was closed.
675
- // Nothing to unwind; forget the record rather than re-stamp a page we left.
676
- if (mine >= 0 && currentHref() !== pushed[mine].href) {
677
- const tag = taggedSentinel();
678
- if (tag === id || (tag === null && standing === id && isStillOn(pushed[mine]))) {
679
- pushed.splice(mine, 1);
680
- if (standing === id) standing = null;
681
- return;
682
- }
683
- }
684
- // Only unwind an entry that is still THE current one. If a router push landed
685
- // on top of it, going back would undo the user's navigation instead — and if
686
- // a SIBLING overlay's sentinel landed on top, that overlay is about to unwind
687
- // and is the one that can take ours with it.
688
- if (currentSentinel() !== id) {
689
- // A router navigation from inside the overlay: nothing to unwind — the
690
- // entries it left beneath the new page are skipped over instead.
691
- if (mine >= 0 && taggedSentinel() === null && buryUnder(pushed.slice(0, pushed.length))) return;
692
- if (mine >= 0) pushed[mine].dead = true;
693
- return;
694
- }
695
-
696
- // Ours plus every abandoned entry lying directly beneath it at this address.
697
- // One traversal, so one popstate, so one programmatic pop to absorb.
698
- const here = currentHref();
699
- let steps = 1;
700
- while (steps <= mine && pushed[mine - steps].dead && pushed[mine - steps].href === here) {
701
- steps += 1;
702
- }
703
- const leaving = pushed.splice(mine - (steps - 1), steps);
704
- // Scheduled, not issued: an overlay opening in this same tick takes the
705
- // entry over instead, which is what makes the hook survive a StrictMode
706
- // remount. An unwind already waiting is dropped rather than merged — it
707
- // was the entry ABOVE ours and something has since moved off it, so its
708
- // count can no longer be proven, and an over-counted traversal costs a
709
- // navigation the user made while an under-counted one costs one dead Back.
710
- if (unwind) clearTimeout(unwind.timer);
711
- unwind = { timer: setTimeout(runUnwind, 0), id, href: here, entries: leaving };
712
- };
713
- }, [open]);
714
- }