@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,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
- }