@eifi1/ui-kit 0.17.0 → 0.19.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 (210) hide show
  1. package/README.md +83 -4
  2. package/dist/chart.d.ts +13 -1
  3. package/dist/components/account-chips.d.ts +153 -0
  4. package/dist/components/account-chips.js +135 -0
  5. package/dist/components/account-chips.js.map +1 -0
  6. package/dist/components/account-settings-labels.d.ts +10 -2
  7. package/dist/components/account-settings-labels.js +3 -0
  8. package/dist/components/account-settings-labels.js.map +1 -1
  9. package/dist/components/amount-input.d.ts +13 -1
  10. package/dist/components/button-group.d.ts +13 -1
  11. package/dist/components/calculator.d.ts +13 -1
  12. package/dist/components/chip.d.ts +25 -1
  13. package/dist/components/chip.js +143 -6
  14. package/dist/components/chip.js.map +1 -1
  15. package/dist/components/confirm-dialog.d.ts +42 -1
  16. package/dist/components/confirm-dialog.js +36 -5
  17. package/dist/components/confirm-dialog.js.map +1 -1
  18. package/dist/components/copy-button.d.ts +13 -1
  19. package/dist/components/danger-confirm.d.ts +55 -4
  20. package/dist/components/danger-confirm.js +67 -30
  21. package/dist/components/danger-confirm.js.map +1 -1
  22. package/dist/components/data-table-cells.d.ts +1 -1
  23. package/dist/components/data-table-filter-popover.d.ts +1 -1
  24. package/dist/components/data-table-filters.d.ts +1 -1
  25. package/dist/components/data-table.d.ts +1 -1
  26. package/dist/components/data-table.js +2 -0
  27. package/dist/components/data-table.js.map +1 -1
  28. package/dist/components/facing-pair.d.ts +13 -1
  29. package/dist/components/file-button.d.ts +13 -1
  30. package/dist/components/file-dropzone.d.ts +13 -1
  31. package/dist/components/floating-panel.d.ts +4 -1
  32. package/dist/components/floating-panel.js +15 -1
  33. package/dist/components/floating-panel.js.map +1 -1
  34. package/dist/components/form-actions.d.ts +13 -1
  35. package/dist/components/form-actions.js +3 -0
  36. package/dist/components/form-actions.js.map +1 -1
  37. package/dist/components/legal.d.ts +84 -0
  38. package/dist/components/legal.js +55 -0
  39. package/dist/components/legal.js.map +1 -0
  40. package/dist/components/money-field.d.ts +13 -1
  41. package/dist/components/number-field.d.ts +14 -2
  42. package/dist/components/number-field.js +23 -22
  43. package/dist/components/number-field.js.map +1 -1
  44. package/dist/components/number-input.d.ts +13 -1
  45. package/dist/components/numpad-sheet.d.ts +13 -1
  46. package/dist/components/passkeys-setting.d.ts +27 -1
  47. package/dist/components/passkeys-setting.js +31 -5
  48. package/dist/components/passkeys-setting.js.map +1 -1
  49. package/dist/components/progress-bar.d.ts +15 -1
  50. package/dist/components/progress-bar.js +8 -1
  51. package/dist/components/progress-bar.js.map +1 -1
  52. package/dist/components/reauth-dialog.d.ts +90 -0
  53. package/dist/components/reauth-dialog.js +158 -0
  54. package/dist/components/reauth-dialog.js.map +1 -0
  55. package/dist/components/series-chart.d.ts +13 -1
  56. package/dist/components/server-wake.d.ts +60 -0
  57. package/dist/components/server-wake.js +79 -0
  58. package/dist/components/server-wake.js.map +1 -0
  59. package/dist/components/settings-fields.d.ts +13 -1
  60. package/dist/components/share-card.d.ts +64 -0
  61. package/dist/components/share-card.js +350 -0
  62. package/dist/components/share-card.js.map +1 -0
  63. package/dist/components/status-dot.d.ts +2 -0
  64. package/dist/components/text-link.d.ts +13 -1
  65. package/dist/components/time-input.d.ts +13 -1
  66. package/dist/components/toast.d.ts +10 -1
  67. package/dist/components/toast.js +42 -2
  68. package/dist/components/toast.js.map +1 -1
  69. package/dist/components/toggle-group.js +5 -2
  70. package/dist/components/toggle-group.js.map +1 -1
  71. package/dist/components/translation-review-editor.d.ts +56 -0
  72. package/dist/components/translation-review-editor.js +159 -0
  73. package/dist/components/translation-review-editor.js.map +1 -0
  74. package/dist/components/translation-review-labels.d.ts +92 -0
  75. package/dist/components/translation-review-labels.js +67 -0
  76. package/dist/components/translation-review-labels.js.map +1 -0
  77. package/dist/components/translation-review-parts.d.ts +97 -0
  78. package/dist/components/translation-review-parts.js +163 -0
  79. package/dist/components/translation-review-parts.js.map +1 -0
  80. package/dist/components/translation-review.d.ts +94 -0
  81. package/dist/components/translation-review.js +344 -0
  82. package/dist/components/translation-review.js.map +1 -0
  83. package/dist/components/ui.d.ts +13 -1
  84. package/dist/components/ui.js +43 -28
  85. package/dist/components/ui.js.map +1 -1
  86. package/dist/components/use-table-state.d.ts +1 -1
  87. package/dist/components/user-avatar.d.ts +2 -0
  88. package/dist/components/write-lock.d.ts +68 -0
  89. package/dist/components/write-lock.js +33 -0
  90. package/dist/components/write-lock.js.map +1 -0
  91. package/dist/{data-table-CpkWUJBY.d.ts → data-table-3mi2R3so.d.ts} +19 -1
  92. package/dist/data-table.d.ts +1 -1
  93. package/dist/hooks/use-file-drop.d.ts +13 -1
  94. package/dist/hooks/use-overlay-history.js +16 -0
  95. package/dist/hooks/use-overlay-history.js.map +1 -1
  96. package/dist/i18n/defaults.d.ts +13 -1
  97. package/dist/i18n/defaults.js +15 -1
  98. package/dist/i18n/defaults.js.map +1 -1
  99. package/dist/i18n/german.d.ts +81 -0
  100. package/dist/i18n/{locales/de.js → german.js} +110 -9
  101. package/dist/i18n/german.js.map +1 -0
  102. package/dist/i18n/kit-labels.d.ts +13 -1
  103. package/dist/i18n/kit-labels.js +5 -0
  104. package/dist/i18n/kit-labels.js.map +1 -1
  105. package/dist/i18n/languages.d.ts +243 -0
  106. package/dist/i18n/languages.js +70 -0
  107. package/dist/i18n/languages.js.map +1 -0
  108. package/dist/i18n/locales/de-CH.d.ts +26 -8
  109. package/dist/i18n/locales/de-CH.js +7 -3
  110. package/dist/i18n/locales/de-CH.js.map +1 -1
  111. package/dist/i18n/locales/en.d.ts +13 -1
  112. package/dist/i18n/locales/en.js +8 -0
  113. package/dist/i18n/locales/en.js.map +1 -1
  114. package/dist/i18n/locales/es.d.ts +13 -1
  115. package/dist/i18n/locales/es.js +127 -27
  116. package/dist/i18n/locales/es.js.map +1 -1
  117. package/dist/i18n/locales/fr.d.ts +13 -1
  118. package/dist/i18n/locales/fr.js +101 -1
  119. package/dist/i18n/locales/fr.js.map +1 -1
  120. package/dist/i18n/locales/hu.d.ts +13 -1
  121. package/dist/i18n/locales/hu.js +105 -1
  122. package/dist/i18n/locales/hu.js.map +1 -1
  123. package/dist/i18n/locales/it.d.ts +13 -1
  124. package/dist/i18n/locales/it.js +134 -34
  125. package/dist/i18n/locales/it.js.map +1 -1
  126. package/dist/i18n/locales/zh.d.ts +13 -1
  127. package/dist/i18n/locales/zh.js +101 -1
  128. package/dist/i18n/locales/zh.js.map +1 -1
  129. package/dist/i18n/review.d.ts +102 -0
  130. package/dist/i18n/review.js +158 -0
  131. package/dist/i18n/review.js.map +1 -0
  132. package/dist/i18n/swiss.d.ts +3 -3
  133. package/dist/i18n/swiss.js.map +1 -1
  134. package/dist/index.d.ts +17 -4
  135. package/dist/index.js +97 -1
  136. package/dist/index.js.map +1 -1
  137. package/dist/{kit-labels-C4uB_zmg.d.ts → kit-labels-D1J2_jyD.d.ts} +236 -9
  138. package/dist/lib/floating-stack.d.ts +31 -0
  139. package/dist/lib/floating-stack.js +42 -0
  140. package/dist/lib/floating-stack.js.map +1 -0
  141. package/dist/lib/server-wake.d.ts +146 -0
  142. package/dist/lib/server-wake.js +122 -0
  143. package/dist/lib/server-wake.js.map +1 -0
  144. package/dist/lib/translation-review.d.ts +232 -0
  145. package/dist/lib/translation-review.js +194 -0
  146. package/dist/lib/translation-review.js.map +1 -0
  147. package/dist/rhf/fields.d.ts +13 -1
  148. package/dist/rhf/form.d.ts +13 -1
  149. package/dist/rhf.d.ts +13 -1
  150. package/dist/search/global-search.d.ts +3 -1
  151. package/dist/search/global-search.js.map +1 -1
  152. package/dist/shell/app-shell.d.ts +13 -1
  153. package/dist/shell/top-bar-brand.d.ts +13 -1
  154. package/dist/shell/topbar-action-menu.d.ts +2 -0
  155. package/dist/shell.d.ts +13 -1
  156. package/dist/wizard/stepper-nav.d.ts +13 -1
  157. package/dist/wizard.d.ts +13 -1
  158. package/package.json +1 -1
  159. package/src/components/account-chips.tsx +302 -0
  160. package/src/components/account-settings-labels.ts +16 -2
  161. package/src/components/chip.tsx +239 -6
  162. package/src/components/confirm-dialog.tsx +82 -7
  163. package/src/components/danger-confirm.tsx +118 -33
  164. package/src/components/data-table.tsx +20 -0
  165. package/src/components/floating-panel.tsx +19 -1
  166. package/src/components/form-actions.tsx +22 -3
  167. package/src/components/legal.tsx +159 -0
  168. package/src/components/number-field.tsx +32 -26
  169. package/src/components/passkeys-setting.tsx +68 -7
  170. package/src/components/progress-bar.tsx +21 -1
  171. package/src/components/reauth-dialog.tsx +273 -0
  172. package/src/components/server-wake.tsx +156 -0
  173. package/src/components/share-card.tsx +615 -0
  174. package/src/components/toast.tsx +72 -2
  175. package/src/components/toggle-group.tsx +5 -2
  176. package/src/components/translation-review-editor.tsx +261 -0
  177. package/src/components/translation-review-labels.ts +152 -0
  178. package/src/components/translation-review-parts.tsx +269 -0
  179. package/src/components/translation-review.tsx +502 -0
  180. package/src/components/ui.tsx +89 -32
  181. package/src/components/write-lock.tsx +96 -0
  182. package/src/hooks/use-overlay-history.ts +51 -0
  183. package/src/i18n/defaults.ts +14 -0
  184. package/src/i18n/{locales/de.ts → german.ts} +120 -13
  185. package/src/i18n/kit-labels.tsx +29 -2
  186. package/src/i18n/languages.ts +285 -0
  187. package/src/i18n/locales/de-CH.ts +17 -8
  188. package/src/i18n/locales/en.ts +8 -0
  189. package/src/i18n/locales/es.ts +128 -26
  190. package/src/i18n/locales/fr.ts +103 -0
  191. package/src/i18n/locales/hu.ts +107 -0
  192. package/src/i18n/locales/it.ts +135 -33
  193. package/src/i18n/locales/zh.ts +102 -0
  194. package/src/i18n/review.ts +193 -0
  195. package/src/i18n/swiss.ts +3 -3
  196. package/src/index.ts +86 -1
  197. package/src/lib/floating-stack.ts +66 -0
  198. package/src/lib/server-wake.ts +291 -0
  199. package/src/lib/translation-review.ts +465 -0
  200. package/src/search/global-search.tsx +3 -1
  201. package/dist/i18n/locales/de-CH-informal.d.ts +0 -61
  202. package/dist/i18n/locales/de-CH-informal.js +0 -8
  203. package/dist/i18n/locales/de-CH-informal.js.map +0 -1
  204. package/dist/i18n/locales/de-informal.d.ts +0 -82
  205. package/dist/i18n/locales/de-informal.js +0 -37
  206. package/dist/i18n/locales/de-informal.js.map +0 -1
  207. package/dist/i18n/locales/de.d.ts +0 -66
  208. package/dist/i18n/locales/de.js.map +0 -1
  209. package/src/i18n/locales/de-CH-informal.ts +0 -10
  210. package/src/i18n/locales/de-informal.ts +0 -61
@@ -1,5 +1,5 @@
1
1
  import 'react';
2
2
  import './data-table-sort.js';
3
- export { z as DEFAULT_PERSIST_PREFIX, T as TableUrlState, g as TableUrlStateProps, h as TableUrlSync, U as UseTableUrlStateOptions, i as UseTableUrlStateReturn, r as readTableUrlState, A as useTableState, w as useTableUrlState } from '../data-table-CpkWUJBY.js';
3
+ export { z as DEFAULT_PERSIST_PREFIX, T as TableUrlState, g as TableUrlStateProps, h as TableUrlSync, U as UseTableUrlStateOptions, i as UseTableUrlStateReturn, r as readTableUrlState, A as useTableState, w as useTableUrlState } from '../data-table-3mi2R3so.js';
4
4
  import './swipeable-row.js';
5
5
  import './data-table-labels.js';
@@ -2,6 +2,8 @@ import * as react from 'react';
2
2
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
3
3
  import { StatusDotTone } from './status-dot.js';
4
4
  import './progress-bar.js';
5
+ import './signed-amount.js';
6
+ import './stat-tile.js';
5
7
  import './chip.js';
6
8
  import 'lucide-react';
7
9
 
@@ -0,0 +1,68 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ /** The words {@link WriteLockProvider} renders on its own behalf. */
5
+ interface WriteLockLabels {
6
+ /** The tooltip of a locked commit when the provider gives no `reason`. */
7
+ reason: string;
8
+ }
9
+ declare const DEFAULT_WRITE_LOCK_LABELS: WriteLockLabels;
10
+ /** What {@link useWriteLock} returns: whether commits are locked here, and why. */
11
+ interface WriteLock {
12
+ locked: boolean;
13
+ /** The one sentence a locked commit shows in its tooltip. Always set while
14
+ * `locked`; `undefined` when not. */
15
+ reason: ReactNode | undefined;
16
+ }
17
+ interface WriteLockProviderProps {
18
+ /** Commits below are locked. `false` unlocks a subtree under an outer lock. */
19
+ locked: boolean;
20
+ /**
21
+ * The one sentence that says why — "Shared with you to read", "Read-only demo —
22
+ * saving is disabled", "A customer account cannot create curves". The app's policy,
23
+ * already translated. Left out: `labels.reason`.
24
+ */
25
+ reason?: ReactNode;
26
+ labels?: Partial<WriteLockLabels>;
27
+ children?: ReactNode;
28
+ }
29
+ /**
30
+ * The read-only lock — **everything renders; only the commit is locked.**
31
+ *
32
+ * keksdose (features/budgets/write-lock.tsx, the read-only demo budget) and
33
+ * Kurvenschmiede (features/sharing/write-lock.tsx, a curve shared to view, a customer
34
+ * account that owns nothing) each built the same `SaveGuard`: the page, its tabs,
35
+ * forms and dialogs render exactly as for an owner, because a viewer looking at half
36
+ * a page is not looking at what they were sent; what changes is that the control
37
+ * that SAVES is off and says why on hover or focus. Both wrapped each Save in a
38
+ * Tooltip and forced a native `disabled` on it — out of the tab order, so the reason
39
+ * never reached a keyboard — and both had to remember it at thirty call sites.
40
+ *
41
+ * Here the page mounts one provider and each commit control opts in with `commit`
42
+ * ({@link Button}, {@link IconButton}, {@link FormActions}): under a lock it takes the
43
+ * kit's `disabledReason` path with this reason — `aria-disabled` and focusable,
44
+ * every activation swallowed, the reason in the kit Tooltip and its description.
45
+ *
46
+ * Who is locked is the app's: the provider takes a boolean, never a role. Fields stay
47
+ * editable — nothing in them reaches the server until the commit is pressed, and a
48
+ * form you cannot fill in is not a demo of the form (keksdose accounts-page). A
49
+ * control that IS its own commit (a toggle that saves on change) reads
50
+ * {@link useWriteLock} and disables itself. The lock is a courtesy, not a guard: the
51
+ * server still refuses the write.
52
+ *
53
+ * Nested providers: the nearest wins, so an inner `locked={false}` reopens a section
54
+ * the caller may write (a viewer's own notes on a shared curve), and an inner lock
55
+ * with its own reason (Kurvenschmiede's owner lock beside the viewer lock) overrides
56
+ * the outer one's sentence.
57
+ */
58
+ declare function WriteLockProvider({ locked, reason, labels, children }: WriteLockProviderProps): react.JSX.Element;
59
+ /** The nearest {@link WriteLockProvider}'s lock; unlocked with no provider. */
60
+ declare function useWriteLock(): WriteLock;
61
+ /**
62
+ * The `disabledReason` a control with `commit` should use: the lock's reason while
63
+ * locked — it wins over the control's own, since it is the answer to the question the
64
+ * hover is asking — else the control's own. Internal to the kit's commit controls.
65
+ */
66
+ declare function useCommitReason(commit: boolean | undefined, own: ReactNode): ReactNode;
67
+
68
+ export { DEFAULT_WRITE_LOCK_LABELS, type WriteLock, type WriteLockLabels, WriteLockProvider, type WriteLockProviderProps, useCommitReason, useWriteLock };
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { createContext, useContext, useMemo } from "react";
4
+ import { useKitLabels } from "../i18n/kit-labels.js";
5
+ const DEFAULT_WRITE_LOCK_LABELS = {
6
+ reason: "You can view this but not change it."
7
+ };
8
+ const UNLOCKED = { locked: false, reason: void 0 };
9
+ const WriteLockContext = createContext(UNLOCKED);
10
+ function WriteLockProvider({ locked, reason, labels, children }) {
11
+ const fallback = useKitLabels("writeLock", DEFAULT_WRITE_LOCK_LABELS, labels).reason;
12
+ const given = reason !== void 0 && reason !== null && reason !== false && reason !== "";
13
+ const resolved = locked ? given ? reason : fallback : void 0;
14
+ const value = useMemo(
15
+ () => locked ? { locked: true, reason: resolved } : UNLOCKED,
16
+ [locked, resolved]
17
+ );
18
+ return /* @__PURE__ */ jsx(WriteLockContext.Provider, { value, children });
19
+ }
20
+ function useWriteLock() {
21
+ return useContext(WriteLockContext);
22
+ }
23
+ function useCommitReason(commit, own) {
24
+ const lock = useWriteLock();
25
+ return commit && lock.locked ? lock.reason : own;
26
+ }
27
+ export {
28
+ DEFAULT_WRITE_LOCK_LABELS,
29
+ WriteLockProvider,
30
+ useCommitReason,
31
+ useWriteLock
32
+ };
33
+ //# sourceMappingURL=write-lock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/write-lock.tsx"],"sourcesContent":["import { createContext, useContext, useMemo } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { useKitLabels } from \"../i18n/kit-labels\";\n\n/** The words {@link WriteLockProvider} renders on its own behalf. */\nexport interface WriteLockLabels {\n /** The tooltip of a locked commit when the provider gives no `reason`. */\n reason: string;\n}\n\nexport const DEFAULT_WRITE_LOCK_LABELS: WriteLockLabels = {\n reason: \"You can view this but not change it.\",\n};\n\n/** What {@link useWriteLock} returns: whether commits are locked here, and why. */\nexport interface WriteLock {\n locked: boolean;\n /** The one sentence a locked commit shows in its tooltip. Always set while\n * `locked`; `undefined` when not. */\n reason: ReactNode | undefined;\n}\n\nconst UNLOCKED: WriteLock = { locked: false, reason: undefined };\n\nconst WriteLockContext = createContext<WriteLock>(UNLOCKED);\n\nexport interface WriteLockProviderProps {\n /** Commits below are locked. `false` unlocks a subtree under an outer lock. */\n locked: boolean;\n /**\n * The one sentence that says why — \"Shared with you to read\", \"Read-only demo —\n * saving is disabled\", \"A customer account cannot create curves\". The app's policy,\n * already translated. Left out: `labels.reason`.\n */\n reason?: ReactNode;\n labels?: Partial<WriteLockLabels>;\n children?: ReactNode;\n}\n\n/**\n * The read-only lock — **everything renders; only the commit is locked.**\n *\n * keksdose (features/budgets/write-lock.tsx, the read-only demo budget) and\n * Kurvenschmiede (features/sharing/write-lock.tsx, a curve shared to view, a customer\n * account that owns nothing) each built the same `SaveGuard`: the page, its tabs,\n * forms and dialogs render exactly as for an owner, because a viewer looking at half\n * a page is not looking at what they were sent; what changes is that the control\n * that SAVES is off and says why on hover or focus. Both wrapped each Save in a\n * Tooltip and forced a native `disabled` on it — out of the tab order, so the reason\n * never reached a keyboard — and both had to remember it at thirty call sites.\n *\n * Here the page mounts one provider and each commit control opts in with `commit`\n * ({@link Button}, {@link IconButton}, {@link FormActions}): under a lock it takes the\n * kit's `disabledReason` path with this reason — `aria-disabled` and focusable,\n * every activation swallowed, the reason in the kit Tooltip and its description.\n *\n * Who is locked is the app's: the provider takes a boolean, never a role. Fields stay\n * editable — nothing in them reaches the server until the commit is pressed, and a\n * form you cannot fill in is not a demo of the form (keksdose accounts-page). A\n * control that IS its own commit (a toggle that saves on change) reads\n * {@link useWriteLock} and disables itself. The lock is a courtesy, not a guard: the\n * server still refuses the write.\n *\n * Nested providers: the nearest wins, so an inner `locked={false}` reopens a section\n * the caller may write (a viewer's own notes on a shared curve), and an inner lock\n * with its own reason (Kurvenschmiede's owner lock beside the viewer lock) overrides\n * the outer one's sentence.\n */\nexport function WriteLockProvider({ locked, reason, labels, children }: WriteLockProviderProps) {\n // The `writeLock` namespace: prop > `<UiKitProvider labels>` > English.\n const fallback = useKitLabels(\"writeLock\", DEFAULT_WRITE_LOCK_LABELS, labels).reason;\n // `null`/`\"\"`/`false` count as \"no reason given\": a lock whose tooltip is empty\n // would be a disabled button that cannot say why, the thing this replaces.\n const given = reason !== undefined && reason !== null && reason !== false && reason !== \"\";\n const resolved = locked ? (given ? reason : fallback) : undefined;\n const value = useMemo<WriteLock>(\n () => (locked ? { locked: true, reason: resolved } : UNLOCKED),\n [locked, resolved],\n );\n return <WriteLockContext.Provider value={value}>{children}</WriteLockContext.Provider>;\n}\n\n/** The nearest {@link WriteLockProvider}'s lock; unlocked with no provider. */\nexport function useWriteLock(): WriteLock {\n return useContext(WriteLockContext);\n}\n\n/**\n * The `disabledReason` a control with `commit` should use: the lock's reason while\n * locked — it wins over the control's own, since it is the answer to the question the\n * hover is asking — else the control's own. Internal to the kit's commit controls.\n */\nexport function useCommitReason(commit: boolean | undefined, own: ReactNode): ReactNode {\n const lock = useWriteLock();\n return commit && lock.locked ? lock.reason : own;\n}\n"],"mappings":";AA+ES;AA/ET,SAAS,eAAe,YAAY,eAAe;AAEnD,SAAS,oBAAoB;AAQtB,MAAM,4BAA6C;AAAA,EACxD,QAAQ;AACV;AAUA,MAAM,WAAsB,EAAE,QAAQ,OAAO,QAAQ,OAAU;AAE/D,MAAM,mBAAmB,cAAyB,QAAQ;AA4CnD,SAAS,kBAAkB,EAAE,QAAQ,QAAQ,QAAQ,SAAS,GAA2B;AAE9F,QAAM,WAAW,aAAa,aAAa,2BAA2B,MAAM,EAAE;AAG9E,QAAM,QAAQ,WAAW,UAAa,WAAW,QAAQ,WAAW,SAAS,WAAW;AACxF,QAAM,WAAW,SAAU,QAAQ,SAAS,WAAY;AACxD,QAAM,QAAQ;AAAA,IACZ,MAAO,SAAS,EAAE,QAAQ,MAAM,QAAQ,SAAS,IAAI;AAAA,IACrD,CAAC,QAAQ,QAAQ;AAAA,EACnB;AACA,SAAO,oBAAC,iBAAiB,UAAjB,EAA0B,OAAe,UAAS;AAC5D;AAGO,SAAS,eAA0B;AACxC,SAAO,WAAW,gBAAgB;AACpC;AAOO,SAAS,gBAAgB,QAA6B,KAA2B;AACtF,QAAM,OAAO,aAAa;AAC1B,SAAO,UAAU,KAAK,SAAS,KAAK,SAAS;AAC/C;","names":[]}
@@ -502,6 +502,24 @@ interface DataTableProps<T> {
502
502
  * of unfolding it inline (feedback #204). Desktop always uses inline expansion.
503
503
  */
504
504
  mobileExpandAsDialog?: boolean;
505
+ /**
506
+ * The phone row dialog's `backCloses` ({@link FullBleedDialog}): whether it pushes
507
+ * its own history entry so Back dismisses it. On by default — right for a row whose
508
+ * expansion is component state, where nothing else would answer Back.
509
+ *
510
+ * **Set it `false` when the open row is in the URL** and opening it PUSHES (a
511
+ * `?row=` written with `useSearchParamState(…, { history: "replace-on-clear" })` or
512
+ * `"push"`): Back already closes the row through the router, and a second entry on
513
+ * top of the page's is two owners of one Back press (keksdose dev #584). Keep it on
514
+ * when opening the row REPLACES the URL — then nothing was pushed, and the dialog's
515
+ * own entry is the only thing Back can pop.
516
+ *
517
+ * The table cannot decide this for you: `isExpanded` is a predicate, and neither it
518
+ * nor `rowHref` says whether opening pushed or replaced (keksdose's feedback page
519
+ * has `rowHref` with a REPLACING `?row=`, and needs the entry). Ignored unless
520
+ * `mobileExpandAsDialog`.
521
+ */
522
+ mobileDialogBackCloses?: boolean;
505
523
  /**
506
524
  * Group the mobile card list into sections, each with a sticky header — the
507
525
  * "assistance"-style list (like the transactions list grouped by date, but by
@@ -697,6 +715,6 @@ interface MobileSwipeActions {
697
715
  right?: SwipeAction[];
698
716
  }
699
717
 
700
- declare function DataTable<T>({ rows, columns: columnsProp, rowKey, defaultPageSize, onRowClick, rowHref, expandedRow, isExpanded, rowClassName, rowAttributes, paginated, empty, storageKey, urlSync, fillHeight, maxBodyHeight, serverPagination, filters: filtersProp, onFiltersChange, sorts: sortsProp, onSortsChange, selection, labels: labelsProp, locale: localeProp, storageKeyPrefix, mobileExpandAsDialog, mobileGroupBy, mobileGroupLabel, mobileCard, mobileSwipeActions, leadingRow, density, sortCycle, chrome, columnSettings: columnSettingsProp, resizable: resizableProp, multiSort: multiSortProp, frame, className, rowActions, toolbar, footerLabel, footer: footerProp, }: DataTableProps<T>): react.JSX.Element;
718
+ declare function DataTable<T>({ rows, columns: columnsProp, rowKey, defaultPageSize, onRowClick, rowHref, expandedRow, isExpanded, rowClassName, rowAttributes, paginated, empty, storageKey, urlSync, fillHeight, maxBodyHeight, serverPagination, filters: filtersProp, onFiltersChange, sorts: sortsProp, onSortsChange, selection, labels: labelsProp, locale: localeProp, storageKeyPrefix, mobileExpandAsDialog, mobileDialogBackCloses, mobileGroupBy, mobileGroupLabel, mobileCard, mobileSwipeActions, leadingRow, density, sortCycle, chrome, columnSettings: columnSettingsProp, resizable: resizableProp, multiSort: multiSortProp, frame, className, rowActions, toolbar, footerLabel, footer: footerProp, }: DataTableProps<T>): react.JSX.Element;
701
719
 
702
720
  export { useTableState as A, type ColumnFilter as C, DataTable as D, type FilterState as F, type MobileSwipeActions as M, type ServerPagination as S, type TableUrlState as T, type UseTableUrlStateOptions as U, type DataTableChrome as a, type DataTableColumn as b, type DataTableDensity as c, type DataTableProps as d, type DataTableRowAction as e, type FilterValue as f, type TableUrlStateProps as g, type TableUrlSync as h, type UseTableUrlStateReturn as i, dateFilter as j, decodeFilterValue as k, decodeFilterValueOfType as l, defaultFilterState as m, encodeFilterValue as n, filterHref as o, isFilterActive as p, numberFilter as q, readTableUrlState as r, resolveFilter as s, rowMatches as t, selectFilter as u, textFilter as v, useTableUrlState as w, type DataTableCellProps as x, type DataTableHeadProps as y, DEFAULT_PERSIST_PREFIX as z };
@@ -1,6 +1,6 @@
1
1
  export { DEFAULT_DATA_TABLE_LABELS, DataTableLabels, missingDataTableLabels, resolveDataTableLabels } from './components/data-table-labels.js';
2
2
  export { SortCycle, SortDir, SortState, SortStepOptions, decodeSorts, encodeSorts, nextSorts, normalizeSorts } from './components/data-table-sort.js';
3
- export { C as ColumnFilter, D as DataTable, a as DataTableChrome, b as DataTableColumn, c as DataTableDensity, d as DataTableProps, e as DataTableRowAction, F as FilterState, f as FilterValue, M as MobileSwipeActions, S as ServerPagination, T as TableUrlState, g as TableUrlStateProps, h as TableUrlSync, U as UseTableUrlStateOptions, i as UseTableUrlStateReturn, j as dateFilter, k as decodeFilterValue, l as decodeFilterValueOfType, m as defaultFilterState, n as encodeFilterValue, o as filterHref, p as isFilterActive, q as numberFilter, r as readTableUrlState, s as resolveFilter, t as rowMatches, u as selectFilter, v as textFilter, w as useTableUrlState } from './data-table-CpkWUJBY.js';
3
+ export { C as ColumnFilter, D as DataTable, a as DataTableChrome, b as DataTableColumn, c as DataTableDensity, d as DataTableProps, e as DataTableRowAction, F as FilterState, f as FilterValue, M as MobileSwipeActions, S as ServerPagination, T as TableUrlState, g as TableUrlStateProps, h as TableUrlSync, U as UseTableUrlStateOptions, i as UseTableUrlStateReturn, j as dateFilter, k as decodeFilterValue, l as decodeFilterValueOfType, m as defaultFilterState, n as encodeFilterValue, o as filterHref, p as isFilterActive, q as numberFilter, r as readTableUrlState, s as resolveFilter, t as rowMatches, u as selectFilter, v as textFilter, w as useTableUrlState } from './data-table-3mi2R3so.js';
4
4
  export { PAGE_SIZE_OPTIONS, Pagination } from './components/data-table-pagination.js';
5
5
  export { FilterPopover } from './components/data-table-filter-popover.js';
6
6
  export { BooleanColumnOptions, BooleanMark, BooleanMarkProps, booleanColumn } from './components/data-table-cells.js';
@@ -1,5 +1,5 @@
1
1
  import { DragEvent, ReactElement } from 'react';
2
- import { b2 as UseFilePickerOptions } from '../kit-labels-C4uB_zmg.js';
2
+ import { bf as UseFilePickerOptions } from '../kit-labels-D1J2_jyD.js';
3
3
  import '../components/data-table-labels.js';
4
4
  import '../components/mini-calendar.js';
5
5
  import '../components/calendar-heatmap.js';
@@ -50,6 +50,18 @@ import '../components/authed-image.js';
50
50
  import './use-authed-src.js';
51
51
  import '../components/image-grid.js';
52
52
  import '../components/lightbox.js';
53
+ import '../components/write-lock.js';
54
+ import '../components/legal.js';
55
+ import '../components/account-chips.js';
56
+ import '../lib/format.js';
57
+ import '../data-table-3mi2R3so.js';
58
+ import '../components/data-table-sort.js';
59
+ import '../components/swipeable-row.js';
60
+ import '../components/reauth-dialog.js';
61
+ import '../components/server-wake.js';
62
+ import '../lib/server-wake.js';
63
+ import '../components/translation-review-labels.js';
64
+ import '../lib/translation-review.js';
53
65
 
54
66
  /**
55
67
  * Turn ANY element into a file drop target — kastlan's ask, for the document list of
@@ -122,6 +122,12 @@ function currentSentinel() {
122
122
  retag(standing);
123
123
  return standing;
124
124
  }
125
+ function noteAddress() {
126
+ const top = pushed[pushed.length - 1];
127
+ if (!top || top.dead || !stack.some((e) => e.id === top.id)) return;
128
+ const tag = taggedSentinel();
129
+ if (tag === top.id || tag === null && standing === top.id && isStillOn(top)) top.href = currentHref();
130
+ }
125
131
  function handlePop() {
126
132
  standing = taggedSentinel();
127
133
  const from = lastSeen;
@@ -145,6 +151,8 @@ function closeOnPop() {
145
151
  function ensureListening() {
146
152
  if (listening || typeof window === "undefined") return;
147
153
  window.addEventListener("popstate", handlePop);
154
+ window.addEventListener("pointerdown", noteAddress, true);
155
+ window.addEventListener("keydown", noteAddress, true);
148
156
  listening = true;
149
157
  }
150
158
  function useOverlayHistory(open, onClose) {
@@ -183,6 +191,14 @@ function useOverlayHistory(open, onClose) {
183
191
  if (at >= 0) stack.splice(at, 1);
184
192
  if (consumed.delete(id)) return;
185
193
  const mine = pushed.findIndex((p) => p.id === id);
194
+ if (mine >= 0 && currentHref() !== pushed[mine].href) {
195
+ const tag = taggedSentinel();
196
+ if (tag === id || tag === null && standing === id && isStillOn(pushed[mine])) {
197
+ pushed.splice(mine, 1);
198
+ if (standing === id) standing = null;
199
+ return;
200
+ }
201
+ }
186
202
  if (currentSentinel() !== id) {
187
203
  if (mine >= 0 && taggedSentinel() === null && buryUnder(pushed.slice(0, pushed.length))) return;
188
204
  if (mine >= 0) pushed[mine].dead = true;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/use-overlay-history.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\n/**\n * Back closes the overlay, not the page (Keksdose feedback #172).\n *\n * On a phone the Back gesture is the universal \"dismiss this\" — so a dialog or a\n * full-screen search surface that ignores it doesn't merely fail to close: the\n * navigation lands somewhere else entirely, and on a route with nothing beneath it\n * that means leaving the app with the overlay still notionally open.\n *\n * The mechanism is one throwaway, SAME-URL history entry pushed while the overlay is\n * up. Back then pops a same-document entry — no route change, no re-render of the\n * page under it — and this hook turns that pop into `onClose()`. Same trick the\n * transactions page already uses for its unsaved-edit trap\n * (`use-soft-leave-guard.ts`); the two coexist because they use different marker\n * keys AND because `handlePop` only claims a pop that actually consumed OUR entry\n * — a foreign sentinel stacked on top of ours pops back ONTO us, and an overlay\n * that closed on that would vanish mid-edit (feedback #424/#426).\n *\n * Not a URL parameter, deliberately. Encoding \"a dialog is open\" in the address bar\n * makes it shareable and restorable, which is wrong for the overlays this covers —\n * nobody wants to send someone a link that opens a confirm dialog — and it would\n * fight the page-owned `?row=` / `f.*` params that ARE meaningful state.\n *\n * ## Ordering\n *\n * The stack is module-level because correctness here is about order ACROSS\n * instances: every mounted overlay hears the same `popstate`, but only the one whose\n * entry was actually popped may close. Overlays nest and unwind last-in-first-out —\n * a dialog opened from a search surface closes before the surface — so the top of\n * this stack is by construction the entry the browser just popped.\n *\n * ## Not undoing a real navigation\n *\n * The cleanup pops our entry when the overlay closes some other way (a button,\n * Escape, a backdrop click) so history doesn't silently accumulate dead entries. It\n * first checks that our marker is still the CURRENT entry: if the user followed a\n * link while the overlay was open, the router has pushed on top of us, and a blind\n * `history.back()` there would undo their navigation.\n *\n * ## The traversal is deferred\n *\n * And it is *scheduled* rather than issued, because `history.go()` lands a task\n * later while everything this module knows is written synchronously. See\n * {@link Unwind}: an overlay opening inside that window adopts the entry instead\n * of stacking a second one on it, which is what makes the hook survive React\n * StrictMode's mount → clean up → mount (steering-design feedback #49).\n */\nconst SENTINEL_KEY = \"__hbUiOverlayHistory\";\n\ninterface OverlayEntry {\n id: string;\n close: () => void;\n}\n\nconst stack: OverlayEntry[] = [];\n\n/**\n * The sentinels we have PUSHED and not yet unwound, oldest first.\n *\n * The stack above tracks live overlays; this tracks live history entries, and the\n * two come apart in exactly one case — which is the bug this list exists for.\n * Nested overlays that close in the same commit unwind parent-first, so the dialog's\n * cleanup runs while the sheet's entry is still on top of its own. It cannot call\n * `history.back()` there (that would consume the SHEET's entry, and the sheet is\n * about to consume it itself), so its entry was simply abandoned: a husk with no\n * live owner sitting between the user and the page.\n *\n * The user paid for it on the next Back press. It popped the husk, `handlePop` found\n * an empty stack and returned, and nothing visible happened — Back had to be pressed\n * twice to leave the page.\n *\n * So an abandoned entry is recorded as `dead` instead, and whichever overlay DOES\n * get to unwind pays the debt with a single `history.go(-n)`. `href` is what keeps\n * that safe: only dead entries pushed at the address we are still sitting at are\n * unwound, so a router navigation that landed between two sentinels is never\n * reversed on the user's behalf.\n */\ninterface PushedEntry {\n id: string;\n href: string;\n /** Its overlay is gone but the entry is not — someone above owes this pop. */\n dead: boolean;\n /** The router's `idx` on this entry when the marker went on — see {@link locate}. */\n idx: number | undefined;\n /** The router's `key` copied from the page entry beneath ours. */\n key: string | undefined;\n /** {@link routeOf} the address the marker was placed at. */\n route: string;\n}\nconst pushed: PushedEntry[] = [];\n\n/**\n * Entries of ours that a ROUTER NAVIGATION made from inside the overlay has left\n * behind — ours, still in the history, but no longer on top and no longer anyone's.\n *\n * Nothing can take an entry out from under a newer one, so they cannot be unwound;\n * what can be done is to not let the user land on one. A traversal that comes to\n * rest on a buried entry is carried straight on over the whole run of them, in the\n * direction it was going (see `skipBuried`): Back from the new page lands on the page\n * the overlay was opened from, Forward from there lands on the new page, and no press\n * is spent on an entry with nothing on screen for it.\n *\n * `below` / `above` count the buried entries of the same run on either side. The\n * router's `idx` tells the direction apart — except after a REPLACE navigation, when\n * the page above the run shares the run's `idx`; the two keys decide there.\n */\ninterface BuriedEntry {\n idx: number;\n /** The `idx` of the router entry that buried the run: higher after a push, the\n * same after a replace. */\n aboveIdx: number;\n /** The key of the page entry directly beneath the run. */\n belowKey: string | undefined;\n /** The key of the router entry that buried the run, when it did. */\n aboveKey: string | undefined;\n below: number;\n above: number;\n}\nconst buried = new Map<string, BuriedEntry>();\n\n/** The router `{idx, key}` of the entry the last traversal (or burial) left us on —\n * what `skipBuried` compares against to know which way the user was going. */\nlet lastSeen: { idx: number | undefined; key: string | undefined } | null = null;\n\n/** Entries a real Back press already consumed. Their overlay's cleanup still has to\n * run, and it must not mistake \"my entry is not current\" for \"my entry is buried\"\n * — it has no entry left at all. */\nconst consumed = new Set<string>();\n\n/** Pops WE caused (a cleanup unwinding its own entries) — their `popstate` is\n * bookkeeping, not a user gesture, and must not close a second overlay. A\n * `history.go(-n)` traversal fires exactly ONE popstate however far it travels. */\nlet pendingProgrammatic = 0;\nlet listening = false;\nlet nextId = 0;\n\n/**\n * The unwind a cleanup has asked for and not yet issued.\n *\n * **`history.go()` is asynchronous and everything above is written\n * synchronously**, which is the seam the whole of this block exists to close.\n * The traversal lands a task later, so an overlay that opens in the *same* tick\n * as one that closed used to push its sentinel on top of the entry that was\n * about to be popped — and the pop then took the NEW entry. The overlay left on\n * screen had no entry of its own (so Back no longer closed it) and the old one\n * stayed behind as a husk between the user and their page.\n *\n * That is not an exotic race. **React StrictMode remounts every effect** — mount,\n * clean up, mount again, all in one commit — so in development *every* dialog\n * anyone opened left a husk behind, the position drifted one entry further from\n * the page on each open, and the Back press that was meant to leave the page was\n * spent on something invisible instead (steering-design feedback #49).\n *\n * So the traversal is deferred by a task, and an overlay mounting inside that\n * window **adopts** the entry instead of pushing a second one (see the effect).\n * Adoption is `replaceState` on an entry that is already there: no traversal, no\n * window in which the count can be wrong, and the StrictMode remount costs\n * exactly nothing.\n */\ninterface Unwind {\n timer: ReturnType<typeof setTimeout>;\n /** The sentinel on the entry to leave — the top of `entries`. */\n id: string;\n href: string;\n /** That entry plus the abandoned ones directly beneath it, oldest first. */\n entries: PushedEntry[];\n}\nlet unwind: Unwind | null = null;\n\n/** Issue the deferred traversal, if the ground has not moved under it.\n *\n * A real Back press or a router navigation during the deferred task leaves us\n * somewhere that is not the entry we meant to leave, and going back from there\n * would take something that is not ours. The entries are then simply forgotten\n * rather than handed back as `dead`: a forgotten entry costs one dead Back\n * press, while an over-counted one costs the user a navigation they did make. */\nfunction runUnwind(): void {\n const job = unwind;\n unwind = null;\n if (!job) return;\n if (currentSentinel() !== job.id || currentHref() !== job.href) {\n // A router navigation landed between the cleanup and this task: the entries\n // are under it (or were replaced by it) rather than simply forgotten.\n if (taggedSentinel() === null) buryUnder(job.entries);\n return;\n }\n pendingProgrammatic += 1;\n window.history.go(-job.entries.length);\n}\n\nfunction currentHref(): string {\n return typeof window === \"undefined\" ? \"\" : window.location.href;\n}\n\n/** The router's own `{idx, key}` on the current entry, where a router has put them. */\nfunction routerMark(): { idx: number | undefined; key: string | undefined } {\n const state = typeof window !== \"undefined\" ? (window.history.state as unknown) : null;\n if (!state || typeof state !== \"object\") return { idx: undefined, key: undefined };\n const { idx, key } = state as Record<string, unknown>;\n return { idx: typeof idx === \"number\" ? idx : undefined, key: typeof key === \"string\" ? key : undefined };\n}\n\n/**\n * The part of an address that names the PAGE — the query string left out.\n *\n * A `setSearchParams(…, { replace: true })` rewrites the query on the entry the\n * overlay is standing on; that is a wipe to repair, not a move. Anything else changing\n * is a navigation. Under a hash router the page lives in the hash (`#/table?f.q=x`), so\n * a hash that starts with `#/` counts up to its own `?`; an ordinary `#fragment` does\n * not name a page and is left out.\n */\nfunction routeOf(href: string): string {\n try {\n const url = new URL(href);\n const hashRoute = url.hash.startsWith(\"#/\") ? url.hash.split(\"?\")[0] : \"\";\n return url.origin + url.pathname + hashRoute;\n } catch {\n return href;\n }\n}\n\n/**\n * Is the untagged entry we are standing on still `p`'s — merely wiped by the router —\n * or an entry the router NAVIGATED to from inside the overlay?\n *\n * The router's `idx` is the one per-entry fact that separates the two, because it is\n * the one the router itself keeps straight: a replace leaves it as it was, a push adds\n * one. Our own push copies the page's state, so our entry carries the page's `idx` and\n * a router push on top of it carries one more. The key would not do — every replace\n * mints a new one, so the wipe this repair exists for would already fail it. Neither\n * would the address alone: a push to the address we are already at is still a push.\n *\n * `idx` does not see one move, the router REPLACING our entry with a different page\n * (same `idx`), so the page named by the address must also be unchanged. Where there is\n * no `idx` to compare (no router, or one that keeps none) the address is all there is.\n */\nfunction isStillOn(p: PushedEntry): boolean {\n if (routeOf(currentHref()) !== p.route) return false;\n const { idx } = routerMark();\n return idx === undefined || p.idx === undefined || idx === p.idx;\n}\n\n/**\n * The router has navigated while our entries were on top: record which of `records`\n * (ours, oldest first, ending with the top one) it buried and which it replaced, and\n * drop them from `pushed` — none of them can be unwound any more. Returns whether it\n * recognised a navigation at all; when it cannot tell (no router `idx` to go by), it\n * leaves everything as it was and the caller falls back to marking the entry dead.\n */\nfunction buryUnder(records: PushedEntry[]): boolean {\n const top = records[records.length - 1];\n const here = routerMark();\n if (!top || top.idx === undefined || here.idx === undefined) return false;\n let run: PushedEntry[];\n if (here.idx > top.idx) {\n run = [];\n for (let i = records.length - 1; i >= 0 && records[i].idx === top.idx; i -= 1) run.unshift(records[i]);\n } else if (here.idx === top.idx && !isStillOn(top)) {\n // Replaced: the top entry IS the new page now, and gone as ours. Those beneath it\n // are buried under it.\n run = [];\n for (let i = records.length - 2; i >= 0 && records[i].idx === top.idx; i -= 1) run.unshift(records[i]);\n } else {\n return false;\n }\n run.forEach((r, i) => {\n buried.set(r.id, {\n idx: top.idx as number,\n aboveIdx: here.idx as number,\n belowKey: run[0].key,\n aboveKey: here.key,\n below: i,\n above: run.length - 1 - i,\n });\n });\n for (const r of records) forgetPushed(r.id);\n lastSeen = here;\n return true;\n}\n\n/**\n * A traversal came to rest on one of our buried entries: carry it on over the run, the\n * way it was going. Back from above (a higher `idx`, or the very entry that buried us)\n * continues down to the page beneath; Forward from that page continues up. A landing\n * from anywhere this cannot place is left alone — one idle press is the price of not\n * guessing, and a wrong guess would move the user somewhere they did not ask to go.\n */\nfunction skipBuried(from: typeof lastSeen): void {\n const tag = taggedSentinel();\n const rec = tag !== null ? buried.get(tag) : undefined;\n if (!rec || !from || stack.some((e) => e.id === tag)) return;\n let steps = 0;\n if ((from.idx !== undefined && from.idx > rec.idx) || (from.key !== undefined && from.key === rec.aboveKey)) {\n steps = -(rec.below + 1);\n } else if (\n from.idx !== undefined &&\n // Below the run, or level with it when nothing above it is (a push buried it),\n // or level with it and provably the page beneath (a replace buried it). The\n // router's first entry has no key at all, so an absent key is a key here.\n (from.idx < rec.idx || (from.idx === rec.idx && (rec.aboveIdx > rec.idx || from.key === rec.belowKey)))\n ) {\n steps = rec.above + 1;\n }\n if (steps === 0) return;\n pendingProgrammatic += 1;\n window.history.go(steps);\n}\n\nfunction forgetPushed(id: string): void {\n const at = pushed.findIndex((p) => p.id === id);\n if (at >= 0) pushed.splice(at, 1);\n}\n\n/**\n * The sentinel this module believes is on the entry we are standing on.\n *\n * `history.state` is where the tag physically sits, because it is the only\n * per-entry storage a browser has — but it is not this module's storage, so\n * since the 2026-09-22 audit it is no longer read as the last word.\n * The ROUTER owns that object and writes it WHOLE: every\n * `setSearchParams(…, { replace: true })` stamps `{usr, key, idx}` over\n * whatever was there. A `DataTable` with `urlSync` does exactly that, on mount\n * and on every filter change — so an overlay opened from such a table had its\n * tag wiped off the entry it was standing on, and then:\n *\n * * its cleanup read \"not my entry\" and abandoned a live entry as a husk;\n * * the push path below could not find itself in `pushed`, so it discarded\n * every record it had (`splice(0)`) and nothing was ever unwound again;\n * * the StrictMode adoption never matched, so in development every dialog\n * pushed a second entry and the deferred `go(-1)` ate the live one — which\n * is Back no longer closing the overlay at all.\n *\n * So `standing` answers when the tag is gone: a MISSING tag on an entry we have\n * not left is a wipe to repair rather than a verdict. The tag is still read\n * FIRST wherever it is there, because it is the one thing that can see a FOREIGN\n * same-URL entry stacked above ours (feedback #424/#426, below) — module-level\n * bookkeeping cannot, since nobody tells us about someone else's `pushState`.\n */\nlet standing: string | null = null;\n\n/** The tag actually on the current entry, with no repair and no belief. */\nfunction taggedSentinel(): string | null {\n const state = typeof window !== \"undefined\" ? window.history.state : null;\n if (!state || typeof state !== \"object\") return null;\n const id = (state as Record<string, unknown>)[SENTINEL_KEY];\n return typeof id === \"string\" ? id : null;\n}\n\n/** Put our tag back on the current entry, keeping whatever the router has since\n * written there — we are a passenger in that object, not its owner. */\nfunction retag(id: string): void {\n const prev = window.history.state;\n window.history.replaceState(\n { ...(prev && typeof prev === \"object\" ? prev : {}), [SENTINEL_KEY]: id },\n \"\",\n );\n}\n\nfunction currentSentinel(): string | null {\n const tag = taggedSentinel();\n if (tag !== null) {\n standing = tag;\n return tag;\n }\n if (standing === null || typeof window === \"undefined\") return null;\n // Only ever re-stamp an entry we still hold a record for. Without that guard a\n // belief left over from an overlay that is long gone — a tab that has since\n // navigated, a test file that ran another case — would be stamped onto a\n // stranger's entry, and the next cleanup would traverse off it.\n //\n // And only an entry that is still the one the marker was placed on. A row that\n // NAVIGATES (a palette result, a dialog's link) has the router push the new page\n // before the overlay's cleanup runs; that entry carries no tag either, and\n // re-stamping it made the cleanup \"unwind\" the navigation itself — the page\n // changed and changed straight back. See `isStillOn` for how the two are told apart.\n const record = pushed.find((p) => p.id === standing);\n if (!record || !isStillOn(record)) {\n standing = null;\n return null;\n }\n retag(standing);\n return standing;\n}\n\nfunction handlePop() {\n // A pop MOVES us, so the belief is stale by definition: re-read it from the\n // entry we have landed on before anything below consults it, or the repair in\n // `currentSentinel` would stamp the entry we just left onto the one we are on.\n standing = taggedSentinel();\n const from = lastSeen;\n lastSeen = routerMark();\n if (pendingProgrammatic > 0) {\n pendingProgrammatic -= 1;\n return;\n }\n closeOnPop();\n skipBuried(from);\n}\n\nfunction closeOnPop() {\n // Nothing open → an ordinary navigation, which is none of our business.\n const top = stack[stack.length - 1];\n if (!top) return;\n // We landed back ON the top overlay's own entry, so that entry was NOT what the\n // pop consumed — something stacked ABOVE it was (Keksdose feedback #424/#426).\n // The app layers a second same-URL sentinel of its own on top of ours for the\n // unsaved-edit trap (`use-soft-leave-guard.ts`), and it pops that sentinel every\n // time the form goes back to clean — twice-toggling one field was enough to\n // close the whole dialog. A pop is only ours when the entry we came to rest on\n // is no longer ours: either the layer below (a different overlay's marker) or\n // the plain page entry (none at all).\n if (currentSentinel() === top.id) return;\n stack.pop();\n // The browser consumed this entry, so the overlay's own cleanup has nothing left\n // to unwind and nothing to record as owed.\n consumed.add(top.id);\n forgetPushed(top.id);\n top.close();\n}\n\nfunction ensureListening() {\n if (listening || typeof window === \"undefined\") return;\n window.addEventListener(\"popstate\", handlePop);\n listening = true;\n}\n\n/**\n * Make the platform Back gesture dismiss an overlay.\n *\n * @param open whether the overlay is currently showing. Components that mount\n * only while open (the common case) pass `true`.\n * @param onClose the overlay's own close handler — the same one Escape calls.\n */\nexport function useOverlayHistory(open: boolean, onClose: () => void): void {\n // The listener fires outside React's render, so it reads the latest handler\n // through a ref rather than through the closure the effect captured.\n const closeRef = useRef(onClose);\n useEffect(() => {\n closeRef.current = onClose;\n });\n\n useEffect(() => {\n if (!open || typeof window === \"undefined\") return;\n ensureListening();\n const id = `overlay-${(nextId += 1)}`;\n const entry: OverlayEntry = { id, close: () => closeRef.current() };\n stack.push(entry);\n const prev = window.history.state;\n const marked = { ...(prev && typeof prev === \"object\" ? prev : {}), [SENTINEL_KEY]: id };\n // An entry that is on its way out and that we are still standing on is ours\n // to take over: same URL, same slot, only the marker changes. Pushing a\n // second one on top of it is what used to leave a husk on every StrictMode\n // remount — see {@link Unwind}.\n const adopting = unwind && unwind.id === currentSentinel() && unwind.href === currentHref();\n if (adopting && unwind) {\n clearTimeout(unwind.timer);\n const inherited = unwind.entries;\n unwind = null;\n // Preserve react-router's own `{usr,key,idx}` — we only swap the marker,\n // and the entry we are swapping it on is the one the router is already on.\n window.history.replaceState(marked, \"\");\n // The abandoned ones beneath come back owed; ours takes the top slot.\n for (const owed of inherited.slice(0, -1)) pushed.push({ ...owed, dead: true });\n const was = inherited[inherited.length - 1];\n pushed.push({ id, href: currentHref(), dead: false, idx: was.idx, key: was.key, route: was.route });\n standing = id;\n } else {\n // A push DESTROYS every entry ahead of the one we are on, so anything we\n // still had recorded above our own position is gone. Kept, those would be\n // counted into a later `history.go(-n)` and the overshoot would come out\n // of a navigation the user actually made. Where we cannot tell which of\n // ours are beneath us — we are standing on a plain page entry, or on a\n // husk nobody tracks — none of them can be proven to be, so none survive.\n const under = pushed.findIndex((p) => p.id === currentSentinel());\n pushed.splice(under + 1);\n // Preserve react-router's own `{usr,key,idx}` — we only tack a marker on, and\n // the URL is unchanged, so the router treats popping this as a no-op re-render.\n window.history.pushState(marked, \"\");\n const page = routerMark();\n pushed.push({ id, href: currentHref(), dead: false, idx: page.idx, key: page.key, route: routeOf(currentHref()) });\n standing = id;\n }\n return () => {\n const at = stack.indexOf(entry);\n if (at >= 0) stack.splice(at, 1);\n\n // A Back press already took this entry; there is nothing to unwind or to owe.\n if (consumed.delete(id)) return;\n\n const mine = pushed.findIndex((p) => p.id === id);\n // Only unwind an entry that is still THE current one. If a router push landed\n // on top of it, going back would undo the user's navigation instead — and if\n // a SIBLING overlay's sentinel landed on top, that overlay is about to unwind\n // and is the one that can take ours with it.\n if (currentSentinel() !== id) {\n // A router navigation from inside the overlay: nothing to unwind — the\n // entries it left beneath the new page are skipped over instead.\n if (mine >= 0 && taggedSentinel() === null && buryUnder(pushed.slice(0, pushed.length))) return;\n if (mine >= 0) pushed[mine].dead = true;\n return;\n }\n\n // Ours plus every abandoned entry lying directly beneath it at this address.\n // One traversal, so one popstate, so one programmatic pop to absorb.\n const here = currentHref();\n let steps = 1;\n while (steps <= mine && pushed[mine - steps].dead && pushed[mine - steps].href === here) {\n steps += 1;\n }\n const leaving = pushed.splice(mine - (steps - 1), steps);\n // Scheduled, not issued: an overlay opening in this same tick takes the\n // entry over instead, which is what makes the hook survive a StrictMode\n // remount. An unwind already waiting is dropped rather than merged — it\n // was the entry ABOVE ours and something has since moved off it, so its\n // count can no longer be proven, and an over-counted traversal costs a\n // navigation the user made while an under-counted one costs one dead Back.\n if (unwind) clearTimeout(unwind.timer);\n unwind = { timer: setTimeout(runUnwind, 0), id, href: here, entries: leaving };\n };\n }, [open]);\n}\n"],"mappings":";AAAA,SAAS,WAAW,cAAc;AAgDlC,MAAM,eAAe;AAOrB,MAAM,QAAwB,CAAC;AAmC/B,MAAM,SAAwB,CAAC;AA6B/B,MAAM,SAAS,oBAAI,IAAyB;AAI5C,IAAI,WAAwE;AAK5E,MAAM,WAAW,oBAAI,IAAY;AAKjC,IAAI,sBAAsB;AAC1B,IAAI,YAAY;AAChB,IAAI,SAAS;AAiCb,IAAI,SAAwB;AAS5B,SAAS,YAAkB;AACzB,QAAM,MAAM;AACZ,WAAS;AACT,MAAI,CAAC,IAAK;AACV,MAAI,gBAAgB,MAAM,IAAI,MAAM,YAAY,MAAM,IAAI,MAAM;AAG9D,QAAI,eAAe,MAAM,KAAM,WAAU,IAAI,OAAO;AACpD;AAAA,EACF;AACA,yBAAuB;AACvB,SAAO,QAAQ,GAAG,CAAC,IAAI,QAAQ,MAAM;AACvC;AAEA,SAAS,cAAsB;AAC7B,SAAO,OAAO,WAAW,cAAc,KAAK,OAAO,SAAS;AAC9D;AA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AO,MAAM;AACX,YAAM,KAAK,MAAM,QAAQ,KAAK;AAC9B,UAAI,MAAM,EAAG,OAAM,OAAO,IAAI,CAAC;AAG/B,UAAI,SAAS,OAAO,EAAE,EAAG;AAEzB,YAAM,OAAO,OAAO,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE;AAKhD,UAAI,gBAAgB,MAAM,IAAI;AAG5B,YAAI,QAAQ,KAAK,eAAe,MAAM,QAAQ,UAAU,OAAO,MAAM,GAAG,OAAO,MAAM,CAAC,EAAG;AACzF,YAAI,QAAQ,EAAG,QAAO,IAAI,EAAE,OAAO;AACnC;AAAA,MACF;AAIA,YAAM,OAAO,YAAY;AACzB,UAAI,QAAQ;AACZ,aAAO,SAAS,QAAQ,OAAO,OAAO,KAAK,EAAE,QAAQ,OAAO,OAAO,KAAK,EAAE,SAAS,MAAM;AACvF,iBAAS;AAAA,MACX;AACA,YAAM,UAAU,OAAO,OAAO,QAAQ,QAAQ,IAAI,KAAK;AAOvD,UAAI,OAAQ,cAAa,OAAO,KAAK;AACrC,eAAS,EAAE,OAAO,WAAW,WAAW,CAAC,GAAG,IAAI,MAAM,MAAM,SAAS,QAAQ;AAAA,IAC/E;AAAA,EACF,GAAG,CAAC,IAAI,CAAC;AACX;","names":[]}
1
+ {"version":3,"sources":["../../src/hooks/use-overlay-history.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\n/**\n * Back closes the overlay, not the page (Keksdose feedback #172).\n *\n * On a phone the Back gesture is the universal \"dismiss this\" — so a dialog or a\n * full-screen search surface that ignores it doesn't merely fail to close: the\n * navigation lands somewhere else entirely, and on a route with nothing beneath it\n * that means leaving the app with the overlay still notionally open.\n *\n * The mechanism is one throwaway, SAME-URL history entry pushed while the overlay is\n * up. Back then pops a same-document entry — no route change, no re-render of the\n * page under it — and this hook turns that pop into `onClose()`. Same trick the\n * transactions page already uses for its unsaved-edit trap\n * (`use-soft-leave-guard.ts`); the two coexist because they use different marker\n * keys AND because `handlePop` only claims a pop that actually consumed OUR entry\n * — a foreign sentinel stacked on top of ours pops back ONTO us, and an overlay\n * that closed on that would vanish mid-edit (feedback #424/#426).\n *\n * Not a URL parameter, deliberately. Encoding \"a dialog is open\" in the address bar\n * makes it shareable and restorable, which is wrong for the overlays this covers —\n * nobody wants to send someone a link that opens a confirm dialog — and it would\n * fight the page-owned `?row=` / `f.*` params that ARE meaningful state.\n *\n * ## Ordering\n *\n * The stack is module-level because correctness here is about order ACROSS\n * instances: every mounted overlay hears the same `popstate`, but only the one whose\n * entry was actually popped may close. Overlays nest and unwind last-in-first-out —\n * a dialog opened from a search surface closes before the surface — so the top of\n * this stack is by construction the entry the browser just popped.\n *\n * ## Not undoing a real navigation\n *\n * The cleanup pops our entry when the overlay closes some other way (a button,\n * Escape, a backdrop click) so history doesn't silently accumulate dead entries. It\n * first checks that our marker is still the CURRENT entry: if the user followed a\n * link while the overlay was open, the router has pushed on top of us, and a blind\n * `history.back()` there would undo their navigation.\n *\n * ## Not undoing the owner's own close\n *\n * Nor when the address under the entry changed in the same breath as the close\n * (keksdose dev #584). A page that opens its editor by PUSHING `?row=x` and closes it\n * by REPLACING the clean URL over the top entry rewrites OUR entry — the overlay sits\n * above `?row=x` — and that rewrite is what unmounts the overlay. Going back from there\n * lands on `?row=x` and the router opens the editor that was just closed. See\n * {@link noteAddress}: an address the overlay LIVED THROUGH (a filter the table wrote\n * while its sheet was up) is still unwound, because the user has acted since.\n *\n * ## The traversal is deferred\n *\n * And it is *scheduled* rather than issued, because `history.go()` lands a task\n * later while everything this module knows is written synchronously. See\n * {@link Unwind}: an overlay opening inside that window adopts the entry instead\n * of stacking a second one on it, which is what makes the hook survive React\n * StrictMode's mount → clean up → mount (steering-design feedback #49).\n */\nconst SENTINEL_KEY = \"__hbUiOverlayHistory\";\n\ninterface OverlayEntry {\n id: string;\n close: () => void;\n}\n\nconst stack: OverlayEntry[] = [];\n\n/**\n * The sentinels we have PUSHED and not yet unwound, oldest first.\n *\n * The stack above tracks live overlays; this tracks live history entries, and the\n * two come apart in exactly one case — which is the bug this list exists for.\n * Nested overlays that close in the same commit unwind parent-first, so the dialog's\n * cleanup runs while the sheet's entry is still on top of its own. It cannot call\n * `history.back()` there (that would consume the SHEET's entry, and the sheet is\n * about to consume it itself), so its entry was simply abandoned: a husk with no\n * live owner sitting between the user and the page.\n *\n * The user paid for it on the next Back press. It popped the husk, `handlePop` found\n * an empty stack and returned, and nothing visible happened — Back had to be pressed\n * twice to leave the page.\n *\n * So an abandoned entry is recorded as `dead` instead, and whichever overlay DOES\n * get to unwind pays the debt with a single `history.go(-n)`. `href` is what keeps\n * that safe: only dead entries pushed at the address we are still sitting at are\n * unwound, so a router navigation that landed between two sentinels is never\n * reversed on the user's behalf.\n */\ninterface PushedEntry {\n id: string;\n /** The full address of the entry (query and hash included) as of the last time the\n * user acted while it was current — see {@link noteAddress}. */\n href: string;\n /** Its overlay is gone but the entry is not — someone above owes this pop. */\n dead: boolean;\n /** The router's `idx` on this entry when the marker went on — see {@link locate}. */\n idx: number | undefined;\n /** The router's `key` copied from the page entry beneath ours. */\n key: string | undefined;\n /** {@link routeOf} the address the marker was placed at. */\n route: string;\n}\nconst pushed: PushedEntry[] = [];\n\n/**\n * Entries of ours that a ROUTER NAVIGATION made from inside the overlay has left\n * behind — ours, still in the history, but no longer on top and no longer anyone's.\n *\n * Nothing can take an entry out from under a newer one, so they cannot be unwound;\n * what can be done is to not let the user land on one. A traversal that comes to\n * rest on a buried entry is carried straight on over the whole run of them, in the\n * direction it was going (see `skipBuried`): Back from the new page lands on the page\n * the overlay was opened from, Forward from there lands on the new page, and no press\n * is spent on an entry with nothing on screen for it.\n *\n * `below` / `above` count the buried entries of the same run on either side. The\n * router's `idx` tells the direction apart — except after a REPLACE navigation, when\n * the page above the run shares the run's `idx`; the two keys decide there.\n */\ninterface BuriedEntry {\n idx: number;\n /** The `idx` of the router entry that buried the run: higher after a push, the\n * same after a replace. */\n aboveIdx: number;\n /** The key of the page entry directly beneath the run. */\n belowKey: string | undefined;\n /** The key of the router entry that buried the run, when it did. */\n aboveKey: string | undefined;\n below: number;\n above: number;\n}\nconst buried = new Map<string, BuriedEntry>();\n\n/** The router `{idx, key}` of the entry the last traversal (or burial) left us on —\n * what `skipBuried` compares against to know which way the user was going. */\nlet lastSeen: { idx: number | undefined; key: string | undefined } | null = null;\n\n/** Entries a real Back press already consumed. Their overlay's cleanup still has to\n * run, and it must not mistake \"my entry is not current\" for \"my entry is buried\"\n * — it has no entry left at all. */\nconst consumed = new Set<string>();\n\n/** Pops WE caused (a cleanup unwinding its own entries) — their `popstate` is\n * bookkeeping, not a user gesture, and must not close a second overlay. A\n * `history.go(-n)` traversal fires exactly ONE popstate however far it travels. */\nlet pendingProgrammatic = 0;\nlet listening = false;\nlet nextId = 0;\n\n/**\n * The unwind a cleanup has asked for and not yet issued.\n *\n * **`history.go()` is asynchronous and everything above is written\n * synchronously**, which is the seam the whole of this block exists to close.\n * The traversal lands a task later, so an overlay that opens in the *same* tick\n * as one that closed used to push its sentinel on top of the entry that was\n * about to be popped — and the pop then took the NEW entry. The overlay left on\n * screen had no entry of its own (so Back no longer closed it) and the old one\n * stayed behind as a husk between the user and their page.\n *\n * That is not an exotic race. **React StrictMode remounts every effect** — mount,\n * clean up, mount again, all in one commit — so in development *every* dialog\n * anyone opened left a husk behind, the position drifted one entry further from\n * the page on each open, and the Back press that was meant to leave the page was\n * spent on something invisible instead (steering-design feedback #49).\n *\n * So the traversal is deferred by a task, and an overlay mounting inside that\n * window **adopts** the entry instead of pushing a second one (see the effect).\n * Adoption is `replaceState` on an entry that is already there: no traversal, no\n * window in which the count can be wrong, and the StrictMode remount costs\n * exactly nothing.\n */\ninterface Unwind {\n timer: ReturnType<typeof setTimeout>;\n /** The sentinel on the entry to leave — the top of `entries`. */\n id: string;\n href: string;\n /** That entry plus the abandoned ones directly beneath it, oldest first. */\n entries: PushedEntry[];\n}\nlet unwind: Unwind | null = null;\n\n/** Issue the deferred traversal, if the ground has not moved under it.\n *\n * A real Back press or a router navigation during the deferred task leaves us\n * somewhere that is not the entry we meant to leave, and going back from there\n * would take something that is not ours. The entries are then simply forgotten\n * rather than handed back as `dead`: a forgotten entry costs one dead Back\n * press, while an over-counted one costs the user a navigation they did make. */\nfunction runUnwind(): void {\n const job = unwind;\n unwind = null;\n if (!job) return;\n if (currentSentinel() !== job.id || currentHref() !== job.href) {\n // A router navigation landed between the cleanup and this task: the entries\n // are under it (or were replaced by it) rather than simply forgotten.\n if (taggedSentinel() === null) buryUnder(job.entries);\n return;\n }\n pendingProgrammatic += 1;\n window.history.go(-job.entries.length);\n}\n\nfunction currentHref(): string {\n return typeof window === \"undefined\" ? \"\" : window.location.href;\n}\n\n/** The router's own `{idx, key}` on the current entry, where a router has put them. */\nfunction routerMark(): { idx: number | undefined; key: string | undefined } {\n const state = typeof window !== \"undefined\" ? (window.history.state as unknown) : null;\n if (!state || typeof state !== \"object\") return { idx: undefined, key: undefined };\n const { idx, key } = state as Record<string, unknown>;\n return { idx: typeof idx === \"number\" ? idx : undefined, key: typeof key === \"string\" ? key : undefined };\n}\n\n/**\n * The part of an address that names the PAGE — the query string left out.\n *\n * A `setSearchParams(…, { replace: true })` rewrites the query on the entry the\n * overlay is standing on; that is a wipe to repair, not a move. Anything else changing\n * is a navigation. Under a hash router the page lives in the hash (`#/table?f.q=x`), so\n * a hash that starts with `#/` counts up to its own `?`; an ordinary `#fragment` does\n * not name a page and is left out.\n */\nfunction routeOf(href: string): string {\n try {\n const url = new URL(href);\n const hashRoute = url.hash.startsWith(\"#/\") ? url.hash.split(\"?\")[0] : \"\";\n return url.origin + url.pathname + hashRoute;\n } catch {\n return href;\n }\n}\n\n/**\n * Is the untagged entry we are standing on still `p`'s — merely wiped by the router —\n * or an entry the router NAVIGATED to from inside the overlay?\n *\n * The router's `idx` is the one per-entry fact that separates the two, because it is\n * the one the router itself keeps straight: a replace leaves it as it was, a push adds\n * one. Our own push copies the page's state, so our entry carries the page's `idx` and\n * a router push on top of it carries one more. The key would not do — every replace\n * mints a new one, so the wipe this repair exists for would already fail it. Neither\n * would the address alone: a push to the address we are already at is still a push.\n *\n * `idx` does not see one move, the router REPLACING our entry with a different page\n * (same `idx`), so the page named by the address must also be unchanged. Where there is\n * no `idx` to compare (no router, or one that keeps none) the address is all there is.\n */\nfunction isStillOn(p: PushedEntry): boolean {\n if (routeOf(currentHref()) !== p.route) return false;\n const { idx } = routerMark();\n return idx === undefined || p.idx === undefined || idx === p.idx;\n}\n\n/**\n * The router has navigated while our entries were on top: record which of `records`\n * (ours, oldest first, ending with the top one) it buried and which it replaced, and\n * drop them from `pushed` — none of them can be unwound any more. Returns whether it\n * recognised a navigation at all; when it cannot tell (no router `idx` to go by), it\n * leaves everything as it was and the caller falls back to marking the entry dead.\n */\nfunction buryUnder(records: PushedEntry[]): boolean {\n const top = records[records.length - 1];\n const here = routerMark();\n if (!top || top.idx === undefined || here.idx === undefined) return false;\n let run: PushedEntry[];\n if (here.idx > top.idx) {\n run = [];\n for (let i = records.length - 1; i >= 0 && records[i].idx === top.idx; i -= 1) run.unshift(records[i]);\n } else if (here.idx === top.idx && !isStillOn(top)) {\n // Replaced: the top entry IS the new page now, and gone as ours. Those beneath it\n // are buried under it.\n run = [];\n for (let i = records.length - 2; i >= 0 && records[i].idx === top.idx; i -= 1) run.unshift(records[i]);\n } else {\n return false;\n }\n run.forEach((r, i) => {\n buried.set(r.id, {\n idx: top.idx as number,\n aboveIdx: here.idx as number,\n belowKey: run[0].key,\n aboveKey: here.key,\n below: i,\n above: run.length - 1 - i,\n });\n });\n for (const r of records) forgetPushed(r.id);\n lastSeen = here;\n return true;\n}\n\n/**\n * A traversal came to rest on one of our buried entries: carry it on over the run, the\n * way it was going. Back from above (a higher `idx`, or the very entry that buried us)\n * continues down to the page beneath; Forward from that page continues up. A landing\n * from anywhere this cannot place is left alone — one idle press is the price of not\n * guessing, and a wrong guess would move the user somewhere they did not ask to go.\n */\nfunction skipBuried(from: typeof lastSeen): void {\n const tag = taggedSentinel();\n const rec = tag !== null ? buried.get(tag) : undefined;\n if (!rec || !from || stack.some((e) => e.id === tag)) return;\n let steps = 0;\n if ((from.idx !== undefined && from.idx > rec.idx) || (from.key !== undefined && from.key === rec.aboveKey)) {\n steps = -(rec.below + 1);\n } else if (\n from.idx !== undefined &&\n // Below the run, or level with it when nothing above it is (a push buried it),\n // or level with it and provably the page beneath (a replace buried it). The\n // router's first entry has no key at all, so an absent key is a key here.\n (from.idx < rec.idx || (from.idx === rec.idx && (rec.aboveIdx > rec.idx || from.key === rec.belowKey)))\n ) {\n steps = rec.above + 1;\n }\n if (steps === 0) return;\n pendingProgrammatic += 1;\n window.history.go(steps);\n}\n\nfunction forgetPushed(id: string): void {\n const at = pushed.findIndex((p) => p.id === id);\n if (at >= 0) pushed.splice(at, 1);\n}\n\n/**\n * The sentinel this module believes is on the entry we are standing on.\n *\n * `history.state` is where the tag physically sits, because it is the only\n * per-entry storage a browser has — but it is not this module's storage, so\n * since the 2026-09-22 audit it is no longer read as the last word.\n * The ROUTER owns that object and writes it WHOLE: every\n * `setSearchParams(…, { replace: true })` stamps `{usr, key, idx}` over\n * whatever was there. A `DataTable` with `urlSync` does exactly that, on mount\n * and on every filter change — so an overlay opened from such a table had its\n * tag wiped off the entry it was standing on, and then:\n *\n * * its cleanup read \"not my entry\" and abandoned a live entry as a husk;\n * * the push path below could not find itself in `pushed`, so it discarded\n * every record it had (`splice(0)`) and nothing was ever unwound again;\n * * the StrictMode adoption never matched, so in development every dialog\n * pushed a second entry and the deferred `go(-1)` ate the live one — which\n * is Back no longer closing the overlay at all.\n *\n * So `standing` answers when the tag is gone: a MISSING tag on an entry we have\n * not left is a wipe to repair rather than a verdict. The tag is still read\n * FIRST wherever it is there, because it is the one thing that can see a FOREIGN\n * same-URL entry stacked above ours (feedback #424/#426, below) — module-level\n * bookkeeping cannot, since nobody tells us about someone else's `pushState`.\n */\nlet standing: string | null = null;\n\n/** The tag actually on the current entry, with no repair and no belief. */\nfunction taggedSentinel(): string | null {\n const state = typeof window !== \"undefined\" ? window.history.state : null;\n if (!state || typeof state !== \"object\") return null;\n const id = (state as Record<string, unknown>)[SENTINEL_KEY];\n return typeof id === \"string\" ? id : null;\n}\n\n/** Put our tag back on the current entry, keeping whatever the router has since\n * written there — we are a passenger in that object, not its owner. */\nfunction retag(id: string): void {\n const prev = window.history.state;\n window.history.replaceState(\n { ...(prev && typeof prev === \"object\" ? prev : {}), [SENTINEL_KEY]: id },\n \"\",\n );\n}\n\nfunction currentSentinel(): string | null {\n const tag = taggedSentinel();\n if (tag !== null) {\n standing = tag;\n return tag;\n }\n if (standing === null || typeof window === \"undefined\") return null;\n // Only ever re-stamp an entry we still hold a record for. Without that guard a\n // belief left over from an overlay that is long gone — a tab that has since\n // navigated, a test file that ran another case — would be stamped onto a\n // stranger's entry, and the next cleanup would traverse off it.\n //\n // And only an entry that is still the one the marker was placed on. A row that\n // NAVIGATES (a palette result, a dialog's link) has the router push the new page\n // before the overlay's cleanup runs; that entry carries no tag either, and\n // re-stamping it made the cleanup \"unwind\" the navigation itself — the page\n // changed and changed straight back. See `isStillOn` for how the two are told apart.\n const record = pushed.find((p) => p.id === standing);\n if (!record || !isStillOn(record)) {\n standing = null;\n return null;\n }\n retag(standing);\n return standing;\n}\n\n/**\n * The user is about to act: what the current entry's address is NOW is what the\n * overlay standing on it has lived through.\n *\n * The cleanup needs to tell two same-page query rewrites apart, and the address alone\n * cannot. A `DataTable` with `urlSync` replaces `f.*` over the entry while its filter\n * sheet is up, and the sheet is closed LATER, by a press of its own — that entry is\n * still the sheet's and must be unwound (the audit's drift fix, below). A page whose\n * `?row=` drives the overlay replaces the clean URL over the entry and the overlay\n * unmounts BECAUSE of it (keksdose dev #584) — that entry is the owner's now, and\n * unwinding lands on `?row=` beneath and reopens what was just closed. What separates\n * them is whether the user acted in between: the rewrite that closes an overlay is\n * made by the very press that closes it, so it postdates this snapshot.\n *\n * Capture phase, so the snapshot is taken before any handler of the press runs.\n */\nfunction noteAddress(): void {\n const top = pushed[pushed.length - 1];\n if (!top || top.dead || !stack.some((e) => e.id === top.id)) return;\n const tag = taggedSentinel();\n // Read without `currentSentinel`'s repair: an observation must not write history.\n if (tag === top.id || (tag === null && standing === top.id && isStillOn(top))) top.href = currentHref();\n}\n\nfunction handlePop() {\n // A pop MOVES us, so the belief is stale by definition: re-read it from the\n // entry we have landed on before anything below consults it, or the repair in\n // `currentSentinel` would stamp the entry we just left onto the one we are on.\n standing = taggedSentinel();\n const from = lastSeen;\n lastSeen = routerMark();\n if (pendingProgrammatic > 0) {\n pendingProgrammatic -= 1;\n return;\n }\n closeOnPop();\n skipBuried(from);\n}\n\nfunction closeOnPop() {\n // Nothing open → an ordinary navigation, which is none of our business.\n const top = stack[stack.length - 1];\n if (!top) return;\n // We landed back ON the top overlay's own entry, so that entry was NOT what the\n // pop consumed — something stacked ABOVE it was (Keksdose feedback #424/#426).\n // The app layers a second same-URL sentinel of its own on top of ours for the\n // unsaved-edit trap (`use-soft-leave-guard.ts`), and it pops that sentinel every\n // time the form goes back to clean — twice-toggling one field was enough to\n // close the whole dialog. A pop is only ours when the entry we came to rest on\n // is no longer ours: either the layer below (a different overlay's marker) or\n // the plain page entry (none at all).\n if (currentSentinel() === top.id) return;\n stack.pop();\n // The browser consumed this entry, so the overlay's own cleanup has nothing left\n // to unwind and nothing to record as owed.\n consumed.add(top.id);\n forgetPushed(top.id);\n top.close();\n}\n\nfunction ensureListening() {\n if (listening || typeof window === \"undefined\") return;\n window.addEventListener(\"popstate\", handlePop);\n window.addEventListener(\"pointerdown\", noteAddress, true);\n window.addEventListener(\"keydown\", noteAddress, true);\n listening = true;\n}\n\n/**\n * Make the platform Back gesture dismiss an overlay.\n *\n * @param open whether the overlay is currently showing. Components that mount\n * only while open (the common case) pass `true`.\n * @param onClose the overlay's own close handler — the same one Escape calls.\n */\nexport function useOverlayHistory(open: boolean, onClose: () => void): void {\n // The listener fires outside React's render, so it reads the latest handler\n // through a ref rather than through the closure the effect captured.\n const closeRef = useRef(onClose);\n useEffect(() => {\n closeRef.current = onClose;\n });\n\n useEffect(() => {\n if (!open || typeof window === \"undefined\") return;\n ensureListening();\n const id = `overlay-${(nextId += 1)}`;\n const entry: OverlayEntry = { id, close: () => closeRef.current() };\n stack.push(entry);\n const prev = window.history.state;\n const marked = { ...(prev && typeof prev === \"object\" ? prev : {}), [SENTINEL_KEY]: id };\n // An entry that is on its way out and that we are still standing on is ours\n // to take over: same URL, same slot, only the marker changes. Pushing a\n // second one on top of it is what used to leave a husk on every StrictMode\n // remount — see {@link Unwind}.\n const adopting = unwind && unwind.id === currentSentinel() && unwind.href === currentHref();\n if (adopting && unwind) {\n clearTimeout(unwind.timer);\n const inherited = unwind.entries;\n unwind = null;\n // Preserve react-router's own `{usr,key,idx}` — we only swap the marker,\n // and the entry we are swapping it on is the one the router is already on.\n window.history.replaceState(marked, \"\");\n // The abandoned ones beneath come back owed; ours takes the top slot.\n for (const owed of inherited.slice(0, -1)) pushed.push({ ...owed, dead: true });\n const was = inherited[inherited.length - 1];\n pushed.push({ id, href: currentHref(), dead: false, idx: was.idx, key: was.key, route: was.route });\n standing = id;\n } else {\n // A push DESTROYS every entry ahead of the one we are on, so anything we\n // still had recorded above our own position is gone. Kept, those would be\n // counted into a later `history.go(-n)` and the overshoot would come out\n // of a navigation the user actually made. Where we cannot tell which of\n // ours are beneath us — we are standing on a plain page entry, or on a\n // husk nobody tracks — none of them can be proven to be, so none survive.\n const under = pushed.findIndex((p) => p.id === currentSentinel());\n pushed.splice(under + 1);\n // Preserve react-router's own `{usr,key,idx}` — we only tack a marker on, and\n // the URL is unchanged, so the router treats popping this as a no-op re-render.\n window.history.pushState(marked, \"\");\n const page = routerMark();\n pushed.push({ id, href: currentHref(), dead: false, idx: page.idx, key: page.key, route: routeOf(currentHref()) });\n standing = id;\n }\n return () => {\n const at = stack.indexOf(entry);\n if (at >= 0) stack.splice(at, 1);\n\n // A Back press already took this entry; there is nothing to unwind or to owe.\n if (consumed.delete(id)) return;\n\n const mine = pushed.findIndex((p) => p.id === id);\n // Still our entry — same page, same router `idx` — but its address is not the one\n // the user last acted on: the owner rewrote it as part of closing us (see\n // {@link noteAddress}). The entry is the owner's page now, and the one beneath is\n // the address it replaced — going back would restore exactly what was closed.\n // Nothing to unwind; forget the record rather than re-stamp a page we left.\n if (mine >= 0 && currentHref() !== pushed[mine].href) {\n const tag = taggedSentinel();\n if (tag === id || (tag === null && standing === id && isStillOn(pushed[mine]))) {\n pushed.splice(mine, 1);\n if (standing === id) standing = null;\n return;\n }\n }\n // Only unwind an entry that is still THE current one. If a router push landed\n // on top of it, going back would undo the user's navigation instead — and if\n // a SIBLING overlay's sentinel landed on top, that overlay is about to unwind\n // and is the one that can take ours with it.\n if (currentSentinel() !== id) {\n // A router navigation from inside the overlay: nothing to unwind — the\n // entries it left beneath the new page are skipped over instead.\n if (mine >= 0 && taggedSentinel() === null && buryUnder(pushed.slice(0, pushed.length))) return;\n if (mine >= 0) pushed[mine].dead = true;\n return;\n }\n\n // Ours plus every abandoned entry lying directly beneath it at this address.\n // One traversal, so one popstate, so one programmatic pop to absorb.\n const here = currentHref();\n let steps = 1;\n while (steps <= mine && pushed[mine - steps].dead && pushed[mine - steps].href === here) {\n steps += 1;\n }\n const leaving = pushed.splice(mine - (steps - 1), steps);\n // Scheduled, not issued: an overlay opening in this same tick takes the\n // entry over instead, which is what makes the hook survive a StrictMode\n // remount. An unwind already waiting is dropped rather than merged — it\n // was the entry ABOVE ours and something has since moved off it, so its\n // count can no longer be proven, and an over-counted traversal costs a\n // navigation the user made while an under-counted one costs one dead Back.\n if (unwind) clearTimeout(unwind.timer);\n unwind = { timer: setTimeout(runUnwind, 0), id, href: here, entries: leaving };\n };\n }, [open]);\n}\n"],"mappings":";AAAA,SAAS,WAAW,cAAc;AA0DlC,MAAM,eAAe;AAOrB,MAAM,QAAwB,CAAC;AAqC/B,MAAM,SAAwB,CAAC;AA6B/B,MAAM,SAAS,oBAAI,IAAyB;AAI5C,IAAI,WAAwE;AAK5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I,aAAa,GAAI,YAAW;AAChC;AAAA,QACF;AAAA,MACF;AAKA,UAAI,gBAAgB,MAAM,IAAI;AAG5B,YAAI,QAAQ,KAAK,eAAe,MAAM,QAAQ,UAAU,OAAO,MAAM,GAAG,OAAO,MAAM,CAAC,EAAG;AACzF,YAAI,QAAQ,EAAG,QAAO,IAAI,EAAE,OAAO;AACnC;AAAA,MACF;AAIA,YAAM,OAAO,YAAY;AACzB,UAAI,QAAQ;AACZ,aAAO,SAAS,QAAQ,OAAO,OAAO,KAAK,EAAE,QAAQ,OAAO,OAAO,KAAK,EAAE,SAAS,MAAM;AACvF,iBAAS;AAAA,MACX;AACA,YAAM,UAAU,OAAO,OAAO,QAAQ,QAAQ,IAAI,KAAK;AAOvD,UAAI,OAAQ,cAAa,OAAO,KAAK;AACrC,eAAS,EAAE,OAAO,WAAW,WAAW,CAAC,GAAG,IAAI,MAAM,MAAM,SAAS,QAAQ;AAAA,IAC/E;AAAA,EACF,GAAG,CAAC,IAAI,CAAC;AACX;","names":[]}
@@ -1,4 +1,4 @@
1
- import { a$ as UiKitLabels } from '../kit-labels-C4uB_zmg.js';
1
+ import { bc as UiKitLabels } from '../kit-labels-D1J2_jyD.js';
2
2
  import 'react';
3
3
  import '../components/data-table-labels.js';
4
4
  import '../components/mini-calendar.js';
@@ -50,6 +50,18 @@ import '../components/authed-image.js';
50
50
  import '../hooks/use-authed-src.js';
51
51
  import '../components/image-grid.js';
52
52
  import '../components/lightbox.js';
53
+ import '../components/write-lock.js';
54
+ import '../components/legal.js';
55
+ import '../components/account-chips.js';
56
+ import '../lib/format.js';
57
+ import '../data-table-3mi2R3so.js';
58
+ import '../components/data-table-sort.js';
59
+ import '../components/swipeable-row.js';
60
+ import '../components/reauth-dialog.js';
61
+ import '../components/server-wake.js';
62
+ import '../lib/server-wake.js';
63
+ import '../components/translation-review-labels.js';
64
+ import '../lib/translation-review.js';
53
65
 
54
66
  /**
55
67
  * The whole English tree in one object: what a translation is written against, and
@@ -47,6 +47,13 @@ import { DEFAULT_ERROR_BOUNDARY_LABELS } from "../components/error-boundary.js";
47
47
  import { DEFAULT_AUTHED_IMAGE_LABELS } from "../components/authed-image.js";
48
48
  import { DEFAULT_IMAGE_GRID_LABELS } from "../components/image-grid.js";
49
49
  import { DEFAULT_LIGHTBOX_LABELS } from "../components/lightbox.js";
50
+ import { DEFAULT_WRITE_LOCK_LABELS } from "../components/write-lock.js";
51
+ import { DEFAULT_LEGAL_LABELS } from "../components/legal.js";
52
+ import { DEFAULT_ACCOUNT_STATE_LABELS } from "../components/account-chips.js";
53
+ import { DEFAULT_SHARE_CARD_LABELS } from "../components/share-card.js";
54
+ import { DEFAULT_REAUTH_DIALOG_LABELS } from "../components/reauth-dialog.js";
55
+ import { DEFAULT_SERVER_WAKE_LABELS } from "../components/server-wake.js";
56
+ import { DEFAULT_TRANSLATION_REVIEW_LABELS } from "../components/translation-review-labels.js";
50
57
  import {
51
58
  DEFAULT_APP_SHELL_LABELS,
52
59
  DEFAULT_CALCULATOR_LABELS,
@@ -118,7 +125,14 @@ const DEFAULT_UI_KIT_LABELS = {
118
125
  errorBoundary: DEFAULT_ERROR_BOUNDARY_LABELS,
119
126
  authedImage: DEFAULT_AUTHED_IMAGE_LABELS,
120
127
  imageGrid: DEFAULT_IMAGE_GRID_LABELS,
121
- lightbox: DEFAULT_LIGHTBOX_LABELS
128
+ lightbox: DEFAULT_LIGHTBOX_LABELS,
129
+ writeLock: DEFAULT_WRITE_LOCK_LABELS,
130
+ accountState: DEFAULT_ACCOUNT_STATE_LABELS,
131
+ shareCard: DEFAULT_SHARE_CARD_LABELS,
132
+ reauthDialog: DEFAULT_REAUTH_DIALOG_LABELS,
133
+ serverWake: DEFAULT_SERVER_WAKE_LABELS,
134
+ translationReview: DEFAULT_TRANSLATION_REVIEW_LABELS,
135
+ legal: DEFAULT_LEGAL_LABELS
122
136
  };
123
137
  export {
124
138
  DEFAULT_UI_KIT_LABELS
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/i18n/defaults.ts"],"sourcesContent":["import { DEFAULT_DATA_TABLE_LABELS } from \"../components/data-table-labels\";\nimport { DEFAULT_MINI_CALENDAR_LABELS } from \"../components/mini-calendar\";\nimport { DEFAULT_CALENDAR_HEATMAP_LABELS } from \"../components/calendar-heatmap\";\nimport { DEFAULT_MONTH_PICKER_LABELS } from \"../components/month-picker\";\nimport { DEFAULT_PAGE_CONTENTS_LABELS } from \"../components/page-contents\";\nimport { DEFAULT_POPOVER_LABELS } from \"../components/popover\";\nimport { DEFAULT_CHIP_INPUT_LABELS } from \"../components/chip\";\nimport { DEFAULT_FIELD_SYNC_LABELS } from \"../components/field-sync\";\nimport { DEFAULT_PASSWORD_REVEAL_LABELS, DEFAULT_TABS_LABELS } from \"../components/ui\";\nimport { DEFAULT_WIZARD_LABELS } from \"../wizard/types\";\nimport { DEFAULT_TOUR_LABELS } from \"../tour/tour\";\nimport { DEFAULT_COMMAND_PALETTE_LABELS } from \"../search/command-palette\";\nimport { DEFAULT_GLOBAL_SEARCH_LABELS } from \"../search/global-search\";\nimport { DEFAULT_SERIES_CHART_LABELS } from \"../components/series-chart-labels\";\nimport { DEFAULT_PIE_CHART_LABELS } from \"../components/pie-chart-labels\";\nimport { DEFAULT_SPARKLINE_LABELS } from \"../components/sparkline\";\nimport { DEFAULT_STAT_TILE_LABELS } from \"../components/stat-tile\";\nimport { DEFAULT_SIGNATURE_PAD_LABELS } from \"../components/signature-pad\";\nimport { DEFAULT_PASSWORD_STRENGTH_LABELS } from \"../components/password-strength\";\nimport { DEFAULT_DANGER_CONFIRM_LABELS } from \"../components/danger-confirm\";\nimport { DEFAULT_SWATCH_PICKER_LABELS } from \"../components/swatch-picker\";\nimport { DEFAULT_ICON_PICKER_LABELS } from \"../components/icon-picker\";\nimport { DEFAULT_DIALOG_FRAME_LABELS } from \"../components/dialog-frame\";\nimport { DEFAULT_FILE_PICKER_LABELS } from \"../components/file-button\";\nimport { DEFAULT_MEASURED_GRID_LABELS } from \"../components/measured-grid\";\nimport { DEFAULT_CONFIRM_DIALOG_LABELS } from \"../components/confirm-dialog\";\nimport { DEFAULT_FLOATING_PANEL_LABELS } from \"../components/floating-panel\";\nimport { DEFAULT_FEEDBACK_ATTACHMENT_LABELS } from \"../feedback/feedback-attachment\";\nimport { DEFAULT_FEEDBACK_DIALOG_LABELS } from \"../feedback/feedback-dialog\";\nimport {\n DEFAULT_FEEDBACK_COMPOSER_LABELS,\n DEFAULT_FEEDBACK_THREAD_LABELS,\n} from \"../feedback/feedback-thread\";\nimport { DEFAULT_ACCOUNT_SETTINGS_LABELS } from \"../components/account-settings-labels\";\nimport { DEFAULT_COPY_BUTTON_LABELS } from \"../components/copy-button\";\nimport { DEFAULT_BULK_ACTION_BAR_LABELS } from \"../components/bulk-action-bar\";\nimport { DEFAULT_LIST_LABELS } from \"../components/list\";\nimport { DEFAULT_BREADCRUMBS_LABELS } from \"../components/breadcrumbs\";\nimport { DEFAULT_TOAST_LABELS } from \"../components/toast\";\nimport { DEFAULT_FORM_ACTIONS_LABELS } from \"../components/form-actions\";\nimport { DEFAULT_DESCRIPTION_LIST_LABELS } from \"../components/description-list\";\nimport { DEFAULT_LINE_ITEMS_LABELS } from \"../components/line-items\";\nimport { DEFAULT_PROGRESS_BAR_LABELS } from \"../components/progress-bar\";\nimport { DEFAULT_SIGNED_AMOUNT_LABELS } from \"../components/signed-amount\";\nimport { DEFAULT_ERROR_BOUNDARY_LABELS } from \"../components/error-boundary\";\nimport { DEFAULT_AUTHED_IMAGE_LABELS } from \"../components/authed-image\";\nimport { DEFAULT_IMAGE_GRID_LABELS } from \"../components/image-grid\";\nimport { DEFAULT_LIGHTBOX_LABELS } from \"../components/lightbox\";\nimport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n} from \"./kit-labels\";\nimport type { UiKitLabels } from \"./kit-labels\";\n\n/**\n * The whole English tree in one object: what a translation is written against, and\n * the `reference` for {@link missingKitLabels}.\n *\n * A separate module from the provider on purpose. Components import the provider's\n * hooks; this file imports the components' defaults. Kept together they would be an\n * import cycle through every component in the kit.\n */\nexport const DEFAULT_UI_KIT_LABELS: UiKitLabels = {\n common: DEFAULT_COMMON_LABELS,\n dataTable: DEFAULT_DATA_TABLE_LABELS,\n miniCalendar: DEFAULT_MINI_CALENDAR_LABELS,\n calendarHeatmap: DEFAULT_CALENDAR_HEATMAP_LABELS,\n datePicker: DEFAULT_DATE_PICKER_LABELS,\n monthPicker: DEFAULT_MONTH_PICKER_LABELS,\n popover: DEFAULT_POPOVER_LABELS,\n combobox: DEFAULT_COMBOBOX_LABELS,\n multiSelect: DEFAULT_MULTI_SELECT_LABELS,\n calculator: DEFAULT_CALCULATOR_LABELS,\n currency: DEFAULT_CURRENCY_LABELS,\n chipInput: DEFAULT_CHIP_INPUT_LABELS,\n fieldSync: DEFAULT_FIELD_SYNC_LABELS,\n passwordReveal: DEFAULT_PASSWORD_REVEAL_LABELS,\n tabs: DEFAULT_TABS_LABELS,\n appShell: DEFAULT_APP_SHELL_LABELS,\n pageContents: DEFAULT_PAGE_CONTENTS_LABELS,\n topBar: DEFAULT_TOP_BAR_LABELS,\n pickerSheet: DEFAULT_PICKER_SHEET_LABELS,\n swipeableRow: DEFAULT_SWIPEABLE_ROW_LABELS,\n file: DEFAULT_FILE_LABELS,\n wizard: DEFAULT_WIZARD_LABELS,\n tour: DEFAULT_TOUR_LABELS,\n commandPalette: DEFAULT_COMMAND_PALETTE_LABELS,\n globalSearch: DEFAULT_GLOBAL_SEARCH_LABELS,\n seriesChart: DEFAULT_SERIES_CHART_LABELS,\n pieChart: DEFAULT_PIE_CHART_LABELS,\n sparkline: DEFAULT_SPARKLINE_LABELS,\n statTile: DEFAULT_STAT_TILE_LABELS,\n signaturePad: DEFAULT_SIGNATURE_PAD_LABELS,\n passwordStrength: DEFAULT_PASSWORD_STRENGTH_LABELS,\n dangerConfirm: DEFAULT_DANGER_CONFIRM_LABELS,\n swatchPicker: DEFAULT_SWATCH_PICKER_LABELS,\n iconPicker: DEFAULT_ICON_PICKER_LABELS,\n dialogFrame: DEFAULT_DIALOG_FRAME_LABELS,\n filePicker: DEFAULT_FILE_PICKER_LABELS,\n measuredGrid: DEFAULT_MEASURED_GRID_LABELS,\n feedbackAttachment: DEFAULT_FEEDBACK_ATTACHMENT_LABELS,\n feedbackDialog: DEFAULT_FEEDBACK_DIALOG_LABELS,\n feedbackThread: DEFAULT_FEEDBACK_THREAD_LABELS,\n feedbackComposer: DEFAULT_FEEDBACK_COMPOSER_LABELS,\n accountSettings: DEFAULT_ACCOUNT_SETTINGS_LABELS,\n confirmDialog: DEFAULT_CONFIRM_DIALOG_LABELS,\n floatingPanel: DEFAULT_FLOATING_PANEL_LABELS,\n copyButton: DEFAULT_COPY_BUTTON_LABELS,\n bulkActionBar: DEFAULT_BULK_ACTION_BAR_LABELS,\n list: DEFAULT_LIST_LABELS,\n breadcrumbs: DEFAULT_BREADCRUMBS_LABELS,\n toast: DEFAULT_TOAST_LABELS,\n form: DEFAULT_FORM_ACTIONS_LABELS,\n descriptionList: DEFAULT_DESCRIPTION_LIST_LABELS,\n lineItems: DEFAULT_LINE_ITEMS_LABELS,\n progressBar: DEFAULT_PROGRESS_BAR_LABELS,\n signedAmount: DEFAULT_SIGNED_AMOUNT_LABELS,\n errorBoundary: DEFAULT_ERROR_BOUNDARY_LABELS,\n authedImage: DEFAULT_AUTHED_IMAGE_LABELS,\n imageGrid: DEFAULT_IMAGE_GRID_LABELS,\n lightbox: DEFAULT_LIGHTBOX_LABELS,\n};\n"],"mappings":";AAAA,SAAS,iCAAiC;AAC1C,SAAS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AA,EACT,UAAU;AAAA,EACV,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,cAAc;AAAA,EACd,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,EACP,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AACZ;","names":[]}
1
+ {"version":3,"sources":["../../src/i18n/defaults.ts"],"sourcesContent":["import { DEFAULT_DATA_TABLE_LABELS } from \"../components/data-table-labels\";\nimport { DEFAULT_MINI_CALENDAR_LABELS } from \"../components/mini-calendar\";\nimport { DEFAULT_CALENDAR_HEATMAP_LABELS } from \"../components/calendar-heatmap\";\nimport { DEFAULT_MONTH_PICKER_LABELS } from \"../components/month-picker\";\nimport { DEFAULT_PAGE_CONTENTS_LABELS } from \"../components/page-contents\";\nimport { DEFAULT_POPOVER_LABELS } from \"../components/popover\";\nimport { DEFAULT_CHIP_INPUT_LABELS } from \"../components/chip\";\nimport { DEFAULT_FIELD_SYNC_LABELS } from \"../components/field-sync\";\nimport { DEFAULT_PASSWORD_REVEAL_LABELS, DEFAULT_TABS_LABELS } from \"../components/ui\";\nimport { DEFAULT_WIZARD_LABELS } from \"../wizard/types\";\nimport { DEFAULT_TOUR_LABELS } from \"../tour/tour\";\nimport { DEFAULT_COMMAND_PALETTE_LABELS } from \"../search/command-palette\";\nimport { DEFAULT_GLOBAL_SEARCH_LABELS } from \"../search/global-search\";\nimport { DEFAULT_SERIES_CHART_LABELS } from \"../components/series-chart-labels\";\nimport { DEFAULT_PIE_CHART_LABELS } from \"../components/pie-chart-labels\";\nimport { DEFAULT_SPARKLINE_LABELS } from \"../components/sparkline\";\nimport { DEFAULT_STAT_TILE_LABELS } from \"../components/stat-tile\";\nimport { DEFAULT_SIGNATURE_PAD_LABELS } from \"../components/signature-pad\";\nimport { DEFAULT_PASSWORD_STRENGTH_LABELS } from \"../components/password-strength\";\nimport { DEFAULT_DANGER_CONFIRM_LABELS } from \"../components/danger-confirm\";\nimport { DEFAULT_SWATCH_PICKER_LABELS } from \"../components/swatch-picker\";\nimport { DEFAULT_ICON_PICKER_LABELS } from \"../components/icon-picker\";\nimport { DEFAULT_DIALOG_FRAME_LABELS } from \"../components/dialog-frame\";\nimport { DEFAULT_FILE_PICKER_LABELS } from \"../components/file-button\";\nimport { DEFAULT_MEASURED_GRID_LABELS } from \"../components/measured-grid\";\nimport { DEFAULT_CONFIRM_DIALOG_LABELS } from \"../components/confirm-dialog\";\nimport { DEFAULT_FLOATING_PANEL_LABELS } from \"../components/floating-panel\";\nimport { DEFAULT_FEEDBACK_ATTACHMENT_LABELS } from \"../feedback/feedback-attachment\";\nimport { DEFAULT_FEEDBACK_DIALOG_LABELS } from \"../feedback/feedback-dialog\";\nimport {\n DEFAULT_FEEDBACK_COMPOSER_LABELS,\n DEFAULT_FEEDBACK_THREAD_LABELS,\n} from \"../feedback/feedback-thread\";\nimport { DEFAULT_ACCOUNT_SETTINGS_LABELS } from \"../components/account-settings-labels\";\nimport { DEFAULT_COPY_BUTTON_LABELS } from \"../components/copy-button\";\nimport { DEFAULT_BULK_ACTION_BAR_LABELS } from \"../components/bulk-action-bar\";\nimport { DEFAULT_LIST_LABELS } from \"../components/list\";\nimport { DEFAULT_BREADCRUMBS_LABELS } from \"../components/breadcrumbs\";\nimport { DEFAULT_TOAST_LABELS } from \"../components/toast\";\nimport { DEFAULT_FORM_ACTIONS_LABELS } from \"../components/form-actions\";\nimport { DEFAULT_DESCRIPTION_LIST_LABELS } from \"../components/description-list\";\nimport { DEFAULT_LINE_ITEMS_LABELS } from \"../components/line-items\";\nimport { DEFAULT_PROGRESS_BAR_LABELS } from \"../components/progress-bar\";\nimport { DEFAULT_SIGNED_AMOUNT_LABELS } from \"../components/signed-amount\";\nimport { DEFAULT_ERROR_BOUNDARY_LABELS } from \"../components/error-boundary\";\nimport { DEFAULT_AUTHED_IMAGE_LABELS } from \"../components/authed-image\";\nimport { DEFAULT_IMAGE_GRID_LABELS } from \"../components/image-grid\";\nimport { DEFAULT_LIGHTBOX_LABELS } from \"../components/lightbox\";\nimport { DEFAULT_WRITE_LOCK_LABELS } from \"../components/write-lock\";\nimport { DEFAULT_LEGAL_LABELS } from \"../components/legal\";\nimport { DEFAULT_ACCOUNT_STATE_LABELS } from \"../components/account-chips\";\nimport { DEFAULT_SHARE_CARD_LABELS } from \"../components/share-card\";\nimport { DEFAULT_REAUTH_DIALOG_LABELS } from \"../components/reauth-dialog\";\nimport { DEFAULT_SERVER_WAKE_LABELS } from \"../components/server-wake\";\nimport { DEFAULT_TRANSLATION_REVIEW_LABELS } from \"../components/translation-review-labels\";\nimport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n} from \"./kit-labels\";\nimport type { UiKitLabels } from \"./kit-labels\";\n\n/**\n * The whole English tree in one object: what a translation is written against, and\n * the `reference` for {@link missingKitLabels}.\n *\n * A separate module from the provider on purpose. Components import the provider's\n * hooks; this file imports the components' defaults. Kept together they would be an\n * import cycle through every component in the kit.\n */\nexport const DEFAULT_UI_KIT_LABELS: UiKitLabels = {\n common: DEFAULT_COMMON_LABELS,\n dataTable: DEFAULT_DATA_TABLE_LABELS,\n miniCalendar: DEFAULT_MINI_CALENDAR_LABELS,\n calendarHeatmap: DEFAULT_CALENDAR_HEATMAP_LABELS,\n datePicker: DEFAULT_DATE_PICKER_LABELS,\n monthPicker: DEFAULT_MONTH_PICKER_LABELS,\n popover: DEFAULT_POPOVER_LABELS,\n combobox: DEFAULT_COMBOBOX_LABELS,\n multiSelect: DEFAULT_MULTI_SELECT_LABELS,\n calculator: DEFAULT_CALCULATOR_LABELS,\n currency: DEFAULT_CURRENCY_LABELS,\n chipInput: DEFAULT_CHIP_INPUT_LABELS,\n fieldSync: DEFAULT_FIELD_SYNC_LABELS,\n passwordReveal: DEFAULT_PASSWORD_REVEAL_LABELS,\n tabs: DEFAULT_TABS_LABELS,\n appShell: DEFAULT_APP_SHELL_LABELS,\n pageContents: DEFAULT_PAGE_CONTENTS_LABELS,\n topBar: DEFAULT_TOP_BAR_LABELS,\n pickerSheet: DEFAULT_PICKER_SHEET_LABELS,\n swipeableRow: DEFAULT_SWIPEABLE_ROW_LABELS,\n file: DEFAULT_FILE_LABELS,\n wizard: DEFAULT_WIZARD_LABELS,\n tour: DEFAULT_TOUR_LABELS,\n commandPalette: DEFAULT_COMMAND_PALETTE_LABELS,\n globalSearch: DEFAULT_GLOBAL_SEARCH_LABELS,\n seriesChart: DEFAULT_SERIES_CHART_LABELS,\n pieChart: DEFAULT_PIE_CHART_LABELS,\n sparkline: DEFAULT_SPARKLINE_LABELS,\n statTile: DEFAULT_STAT_TILE_LABELS,\n signaturePad: DEFAULT_SIGNATURE_PAD_LABELS,\n passwordStrength: DEFAULT_PASSWORD_STRENGTH_LABELS,\n dangerConfirm: DEFAULT_DANGER_CONFIRM_LABELS,\n swatchPicker: DEFAULT_SWATCH_PICKER_LABELS,\n iconPicker: DEFAULT_ICON_PICKER_LABELS,\n dialogFrame: DEFAULT_DIALOG_FRAME_LABELS,\n filePicker: DEFAULT_FILE_PICKER_LABELS,\n measuredGrid: DEFAULT_MEASURED_GRID_LABELS,\n feedbackAttachment: DEFAULT_FEEDBACK_ATTACHMENT_LABELS,\n feedbackDialog: DEFAULT_FEEDBACK_DIALOG_LABELS,\n feedbackThread: DEFAULT_FEEDBACK_THREAD_LABELS,\n feedbackComposer: DEFAULT_FEEDBACK_COMPOSER_LABELS,\n accountSettings: DEFAULT_ACCOUNT_SETTINGS_LABELS,\n confirmDialog: DEFAULT_CONFIRM_DIALOG_LABELS,\n floatingPanel: DEFAULT_FLOATING_PANEL_LABELS,\n copyButton: DEFAULT_COPY_BUTTON_LABELS,\n bulkActionBar: DEFAULT_BULK_ACTION_BAR_LABELS,\n list: DEFAULT_LIST_LABELS,\n breadcrumbs: DEFAULT_BREADCRUMBS_LABELS,\n toast: DEFAULT_TOAST_LABELS,\n form: DEFAULT_FORM_ACTIONS_LABELS,\n descriptionList: DEFAULT_DESCRIPTION_LIST_LABELS,\n lineItems: DEFAULT_LINE_ITEMS_LABELS,\n progressBar: DEFAULT_PROGRESS_BAR_LABELS,\n signedAmount: DEFAULT_SIGNED_AMOUNT_LABELS,\n errorBoundary: DEFAULT_ERROR_BOUNDARY_LABELS,\n authedImage: DEFAULT_AUTHED_IMAGE_LABELS,\n imageGrid: DEFAULT_IMAGE_GRID_LABELS,\n lightbox: DEFAULT_LIGHTBOX_LABELS,\n writeLock: DEFAULT_WRITE_LOCK_LABELS,\n accountState: DEFAULT_ACCOUNT_STATE_LABELS,\n shareCard: DEFAULT_SHARE_CARD_LABELS,\n reauthDialog: DEFAULT_REAUTH_DIALOG_LABELS,\n serverWake: DEFAULT_SERVER_WAKE_LABELS,\n translationReview: DEFAULT_TRANSLATION_REVIEW_LABELS,\n legal: DEFAULT_LEGAL_LABELS,\n};\n"],"mappings":";AAAA,SAAS,iCAAiC;AAC1C,SAAS,oCAAoC;AAC7C,SAAS,uCAAuC;AAChD,SAAS,mCAAmC;AAC5C,SAAS,oCAAoC;AAC7C,SAAS,8BAA8B;AACvC,SAAS,iCAAiC;AAC1C,SAAS,iCAAiC;AAC1C,SAAS,gCAAgC,2BAA2B;AACpE,SAAS,6BAA6B;AACtC,SAAS,2BAA2B;AACpC,SAAS,sCAAsC;AAC/C,SAAS,oCAAoC;AAC7C,SAAS,mCAAmC;AAC5C,SAAS,gCAAgC;AACzC,SAAS,gCAAgC;AACzC,SAAS,gCAAgC;AACzC,SAAS,oCAAoC;AAC7C,SAAS,wCAAwC;AACjD,SAAS,qCAAqC;AAC9C,SAAS,oCAAoC;AAC7C,SAAS,kCAAkC;AAC3C,SAAS,mCAAmC;AAC5C,SAAS,kCAAkC;AAC3C,SAAS,oCAAoC;AAC7C,SAAS,qCAAqC;AAC9C,SAAS,qCAAqC;AAC9C,SAAS,0CAA0C;AACnD,SAAS,sCAAsC;AAC/C;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,uCAAuC;AAChD,SAAS,kCAAkC;AAC3C,SAAS,sCAAsC;AAC/C,SAAS,2BAA2B;AACpC,SAAS,kCAAkC;AAC3C,SAAS,4BAA4B;AACrC,SAAS,mCAAmC;AAC5C,SAAS,uCAAuC;AAChD,SAAS,iCAAiC;AAC1C,SAAS,mCAAmC;AAC5C,SAAS,oCAAoC;AAC7C,SAAS,qCAAqC;AAC9C,SAAS,mCAAmC;AAC5C,SAAS,iCAAiC;AAC1C,SAAS,+BAA+B;AACx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ACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,WAAW;AAAA,EACX,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,OAAO;AACT;","names":[]}
@@ -0,0 +1,81 @@
1
+ import { bc as UiKitLabels } from '../kit-labels-D1J2_jyD.js';
2
+ import 'react';
3
+ import '../components/data-table-labels.js';
4
+ import '../components/mini-calendar.js';
5
+ import '../components/calendar-heatmap.js';
6
+ import '../components/popover.js';
7
+ import '../components/chip.js';
8
+ import 'lucide-react';
9
+ import '../components/field-sync.js';
10
+ import '../components/tooltip.js';
11
+ import '../hooks/use-anchored-rect.js';
12
+ import '../lib/clipping.js';
13
+ import '../wizard/types.js';
14
+ import '../tour/tour.js';
15
+ import '../search/command-palette.js';
16
+ import '../search/global-search.js';
17
+ import '../search/search-index.js';
18
+ import '../components/month-picker.js';
19
+ import '../components/page-contents.js';
20
+ import '../components/series-chart-labels.js';
21
+ import '../components/pie-chart-labels.js';
22
+ import '../components/sparkline.js';
23
+ import '../components/stat-tile.js';
24
+ import '../components/signature-pad.js';
25
+ import '../components/password-strength.js';
26
+ import '../components/danger-confirm.js';
27
+ import '../components/swatch-picker.js';
28
+ import '../components/tile-radio.js';
29
+ import '../components/icon-picker.js';
30
+ import '../components/dialog-frame.js';
31
+ import '../components/modal.js';
32
+ import '../hooks/use-search-param-state.js';
33
+ import '../components/measured-grid.js';
34
+ import '../feedback-attachment-WFiXJ8We.js';
35
+ import '../feedback/feedback-thread.js';
36
+ import '../feedback/feedback-inbox.js';
37
+ import '../components/account-settings-labels.js';
38
+ import '../components/confirm-dialog.js';
39
+ import '../components/floating-panel.js';
40
+ import '../components/bulk-action-bar.js';
41
+ import '../components/list.js';
42
+ import '../components/signed-amount.js';
43
+ import '../components/breadcrumbs.js';
44
+ import '../components/toast.js';
45
+ import '../components/description-list.js';
46
+ import '../components/line-items.js';
47
+ import '../components/progress-bar.js';
48
+ import '../components/error-boundary.js';
49
+ import '../components/authed-image.js';
50
+ import '../hooks/use-authed-src.js';
51
+ import '../components/image-grid.js';
52
+ import '../components/lightbox.js';
53
+ import '../components/write-lock.js';
54
+ import '../components/legal.js';
55
+ import '../components/account-chips.js';
56
+ import '../lib/format.js';
57
+ import '../data-table-3mi2R3so.js';
58
+ import '../components/data-table-sort.js';
59
+ import '../components/swipeable-row.js';
60
+ import '../components/reauth-dialog.js';
61
+ import '../components/server-wake.js';
62
+ import '../lib/server-wake.js';
63
+ import '../components/translation-review-labels.js';
64
+ import '../lib/translation-review.js';
65
+
66
+ /**
67
+ * The kit's German, formal ("Sie"), written in standard spelling with "ß" — the SOURCE
68
+ * the public `de-CH` catalogue is derived from (via `swiss()`), not a catalogue itself.
69
+ *
70
+ * Internal on purpose: it lives outside `src/i18n/locales/` because every file there is
71
+ * a public `@eifi1/ui-kit/i18n/<code>` subpath, and the kit ships ONE German — Swiss,
72
+ * formal (0.18.0 removed `/i18n/de`, `/i18n/de-informal` and `/i18n/de-CH-informal`).
73
+ * The text stays written with "ß" because `swiss()` respells at runtime, so a Swiss app
74
+ * also gets an argument it passes in (a file name, a phrase to type) respelled; writing
75
+ * "ss" here instead would change that behaviour for every function label.
76
+ *
77
+ * Counts and sizes are formatted with `numberLocale`'s digits; the words never change.
78
+ */
79
+ declare function germanLabels(numberLocale: string): UiKitLabels;
80
+
81
+ export { germanLabels };