@astryxdesign/core 0.7.8-canary.ea33daf → 0.7.8-canary.eb985e5

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 (170) hide show
  1. package/dist/BottomSheet/BottomSheetPanel.d.ts +1 -1
  2. package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
  3. package/dist/BottomSheet/BottomSheetPanel.js +30 -14
  4. package/dist/BottomSheet/bottomSheetStack.js +1 -1
  5. package/dist/BottomSheet/useSheetGestures.d.ts +3 -1
  6. package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
  7. package/dist/BottomSheet/useSheetGestures.js +4 -0
  8. package/dist/CheckboxList/CheckboxList.d.ts +13 -2
  9. package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
  10. package/dist/CheckboxList/CheckboxList.js +10 -4
  11. package/dist/CheckboxList/CheckboxListContext.d.ts +7 -0
  12. package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
  13. package/dist/CheckboxList/CheckboxListContext.js +2 -1
  14. package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
  15. package/dist/CheckboxList/CheckboxListItem.js +14 -2
  16. package/dist/CheckboxList/requiredGroup.d.ts +22 -0
  17. package/dist/CheckboxList/requiredGroup.d.ts.map +1 -0
  18. package/dist/CheckboxList/requiredGroup.js +52 -0
  19. package/dist/DateInput/PickerWheel.d.ts +1 -1
  20. package/dist/DateInput/PickerWheel.d.ts.map +1 -1
  21. package/dist/DateInput/PickerWheel.js +27 -6
  22. package/dist/DateInput/Wheel.d.ts +2 -2
  23. package/dist/DateInput/Wheel.d.ts.map +1 -1
  24. package/dist/DateInput/Wheel.js +20 -6
  25. package/dist/DateInput/datePickerTouch.d.ts +13 -0
  26. package/dist/DateInput/datePickerTouch.d.ts.map +1 -0
  27. package/dist/DateInput/datePickerTouch.js +14 -0
  28. package/dist/DateInput/wheelOptions.d.ts +22 -2
  29. package/dist/DateInput/wheelOptions.d.ts.map +1 -1
  30. package/dist/DateInput/wheelOptions.js +14 -2
  31. package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
  32. package/dist/DateTimeInput/TouchDateTimeField.js +62 -119
  33. package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
  34. package/dist/HoverCard/useHoverCard.js +6 -1
  35. package/dist/Overlay/Overlay.d.ts.map +1 -1
  36. package/dist/Overlay/Overlay.js +7 -2
  37. package/dist/PowerSearch/PowerSearch.d.ts +4 -2
  38. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  39. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +24 -1
  40. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -1
  41. package/dist/PowerSearch/PowerSearchBottomSheet.js +172 -50
  42. package/dist/TimeInput/TimeWheels.d.ts +32 -0
  43. package/dist/TimeInput/TimeWheels.d.ts.map +1 -0
  44. package/dist/TimeInput/TimeWheels.js +144 -0
  45. package/dist/TimeInput/TouchTimeField.d.ts.map +1 -1
  46. package/dist/TimeInput/TouchTimeField.js +63 -118
  47. package/dist/TimeInput/timeWheelRules.d.ts +124 -0
  48. package/dist/TimeInput/timeWheelRules.d.ts.map +1 -0
  49. package/dist/TimeInput/timeWheelRules.js +277 -0
  50. package/dist/Tokenizer/TokenizerBottomSheet.js +8 -12
  51. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  52. package/dist/Tooltip/useTooltip.js +6 -0
  53. package/dist/astryx.css +3 -1
  54. package/dist/gestures/GestureHost.d.ts.map +1 -1
  55. package/dist/gestures/GestureHost.js +3 -0
  56. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts.map +1 -1
  57. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.js +5 -2
  58. package/dist/i18n/generated-english/TimeInput/TimeWheels.generated.d.ts +8 -0
  59. package/dist/i18n/generated-english/TimeInput/TimeWheels.generated.d.ts.map +1 -0
  60. package/dist/i18n/generated-english/TimeInput/TimeWheels.generated.js +17 -0
  61. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  62. package/dist/i18n/generated-locales/en.generated.js +5 -2
  63. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  64. package/dist/i18n/generated-locales/pseudo.generated.js +5 -2
  65. package/dist/keyboard/index.d.ts +17 -0
  66. package/dist/keyboard/index.d.ts.map +1 -0
  67. package/dist/keyboard/index.js +19 -0
  68. package/dist/keyboard/keyboardHeight.d.ts +149 -0
  69. package/dist/keyboard/keyboardHeight.d.ts.map +1 -0
  70. package/dist/keyboard/keyboardHeight.js +432 -0
  71. package/dist/keyboard/keyboardLayoutGuide.d.ts +59 -0
  72. package/dist/keyboard/keyboardLayoutGuide.d.ts.map +1 -0
  73. package/dist/keyboard/keyboardLayoutGuide.js +207 -0
  74. package/dist/keyboard/keyboardModel.d.ts +93 -0
  75. package/dist/keyboard/keyboardModel.d.ts.map +1 -0
  76. package/dist/keyboard/keyboardModel.js +220 -0
  77. package/dist/keyboard/rideKeyboard.d.ts +42 -0
  78. package/dist/keyboard/rideKeyboard.d.ts.map +1 -0
  79. package/dist/keyboard/rideKeyboard.js +77 -0
  80. package/dist/keyboard/useMobileKeyboard.d.ts +61 -0
  81. package/dist/keyboard/useMobileKeyboard.d.ts.map +1 -0
  82. package/dist/keyboard/useMobileKeyboard.js +699 -0
  83. package/dist/motion/android/index.d.ts +16 -0
  84. package/dist/motion/android/index.d.ts.map +1 -0
  85. package/dist/motion/android/index.js +18 -0
  86. package/dist/motion/android/keyboard.d.ts +83 -0
  87. package/dist/motion/android/keyboard.d.ts.map +1 -0
  88. package/dist/motion/android/keyboard.js +96 -0
  89. package/dist/motion/uikit/datePicker.d.ts +58 -0
  90. package/dist/motion/uikit/datePicker.d.ts.map +1 -0
  91. package/dist/motion/uikit/datePicker.js +60 -0
  92. package/dist/motion/uikit/index.d.ts +4 -3
  93. package/dist/motion/uikit/index.d.ts.map +1 -1
  94. package/dist/motion/uikit/index.js +4 -3
  95. package/dist/utils/interactionOverlay.stylex.d.ts +3 -2
  96. package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
  97. package/dist/utils/interactionOverlay.stylex.js +3 -2
  98. package/dist/utils/layoutViewport.d.ts +25 -0
  99. package/dist/utils/layoutViewport.d.ts.map +1 -0
  100. package/dist/utils/layoutViewport.js +102 -0
  101. package/dist/utils/pressFeedback.d.ts.map +1 -1
  102. package/dist/utils/pressFeedback.js +74 -9
  103. package/dist/utils/pressGesture.d.ts +4 -2
  104. package/dist/utils/pressGesture.d.ts.map +1 -1
  105. package/dist/utils/pressGesture.js +3 -1
  106. package/dist/utils/selectionLock.d.ts +10 -1
  107. package/dist/utils/selectionLock.d.ts.map +1 -1
  108. package/dist/utils/selectionLock.js +31 -5
  109. package/dist/utils/sharedMutationObserver.d.ts +2 -1
  110. package/dist/utils/sharedMutationObserver.d.ts.map +1 -1
  111. package/dist/utils/sharedMutationObserver.js +2 -1
  112. package/dist/utils/timeParser.d.ts +2 -1
  113. package/dist/utils/timeParser.d.ts.map +1 -1
  114. package/dist/utils/timeParser.js +29 -3
  115. package/locales/en.json +21 -9
  116. package/locales/pseudo.json +15 -6
  117. package/package.json +4 -4
  118. package/src/BottomSheet/BottomSheet.doc.mjs +1 -1
  119. package/src/BottomSheet/BottomSheetPanel.tsx +41 -13
  120. package/src/BottomSheet/bottomSheetStack.ts +1 -1
  121. package/src/BottomSheet/useSheetGestures.ts +6 -0
  122. package/src/CheckboxList/CheckboxList.doc.mjs +7 -0
  123. package/src/CheckboxList/CheckboxList.tsx +34 -2
  124. package/src/CheckboxList/CheckboxListContext.tsx +9 -1
  125. package/src/CheckboxList/CheckboxListItem.tsx +23 -2
  126. package/src/CheckboxList/requiredGroup.ts +77 -0
  127. package/src/DateInput/PickerWheel.tsx +37 -4
  128. package/src/DateInput/Wheel.tsx +30 -3
  129. package/src/DateInput/datePickerTouch.ts +15 -0
  130. package/src/DateInput/wheelOptions.ts +31 -2
  131. package/src/DateTimeInput/TouchDateTimeField.tsx +94 -178
  132. package/src/HoverCard/useHoverCard.tsx +6 -1
  133. package/src/Overlay/Overlay.tsx +7 -2
  134. package/src/PowerSearch/PowerSearch.doc.mjs +2 -2
  135. package/src/PowerSearch/PowerSearch.tsx +4 -2
  136. package/src/PowerSearch/PowerSearchBottomSheet.tsx +237 -62
  137. package/src/TimeInput/TimeWheels.tsx +218 -0
  138. package/src/TimeInput/TouchTimeField.tsx +93 -157
  139. package/src/TimeInput/timeWheelRules.ts +352 -0
  140. package/src/Tokenizer/TokenizerBottomSheet.tsx +8 -12
  141. package/src/Tooltip/useTooltip.tsx +6 -0
  142. package/src/gestures/GestureHost.ts +5 -4
  143. package/src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts +5 -2
  144. package/src/i18n/generated-english/TimeInput/TimeWheels.generated.ts +18 -0
  145. package/src/i18n/generated-locales/en.generated.ts +6 -4
  146. package/src/i18n/generated-locales/pseudo.generated.ts +6 -4
  147. package/src/keyboard/README.md +197 -0
  148. package/src/keyboard/index.ts +48 -0
  149. package/src/keyboard/keyboardHeight.ts +543 -0
  150. package/src/keyboard/keyboardLayoutGuide.ts +266 -0
  151. package/src/keyboard/keyboardModel.ts +301 -0
  152. package/src/keyboard/rideKeyboard.ts +100 -0
  153. package/src/keyboard/useMobileKeyboard.ts +866 -0
  154. package/src/motion/MEASUREMENTS.md +10 -0
  155. package/src/motion/README.md +2 -0
  156. package/src/motion/android/index.ts +18 -0
  157. package/src/motion/android/keyboard.ts +96 -0
  158. package/src/motion/uikit/datePicker.ts +60 -0
  159. package/src/motion/uikit/index.ts +4 -3
  160. package/src/utils/interactionOverlay.stylex.ts +3 -2
  161. package/src/utils/layoutViewport.ts +104 -0
  162. package/src/utils/pressFeedback.ts +99 -21
  163. package/src/utils/pressGesture.ts +4 -2
  164. package/src/utils/selectionLock.ts +40 -6
  165. package/src/utils/sharedMutationObserver.ts +2 -1
  166. package/src/utils/timeParser.ts +40 -3
  167. package/dist/BottomSheet/useMobileKeyboard.d.ts +0 -21
  168. package/dist/BottomSheet/useMobileKeyboard.d.ts.map +0 -1
  169. package/dist/BottomSheet/useMobileKeyboard.js +0 -413
  170. package/src/BottomSheet/useMobileKeyboard.ts +0 -542
@@ -4,7 +4,8 @@
4
4
 
5
5
  /**
6
6
  * @file Wheel.tsx
7
- * @input Option list, selected value and change callback
7
+ * @input Option list, selected value and change callback; a ref for
8
+ * programmatic turns
8
9
  * @output Exports Wheel (one picker column), ScrollWheel (the scrolling
9
10
  * column) and the shared types of wheelOptions.ts
10
11
  * @position Internal component; consumed by MonthYearWheels.tsx,
@@ -26,7 +27,7 @@
26
27
  * - /packages/core/src/DateInput/DateInput.doc.mjs
27
28
  * - /packages/core/src/DateInput/DateInputTouch.test.tsx
28
29
  */
29
- import { useCallback, useEffect, useRef, useState } from 'react';
30
+ import { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
30
31
  import * as stylex from '@stylexjs/stylex';
31
32
  import "../theme/tokens.stylex.js";
32
33
  import { colorVars, radiusVars, fontWeightVars, typeScaleVars, spacingVars, durationVars } from "../theme/tokens.stylex.js";
@@ -40,7 +41,7 @@ import { useOwnScrollGesture } from "./useOwnScrollGesture.js";
40
41
  import { usePointerDragScroll } from "./usePointerDragScroll.js";
41
42
  import { useScrollSettle } from "./useScrollSettle.js";
42
43
  import { useWheelListbox } from "./useWheelListbox.js";
43
- import { endIndex, nearestEnabledIndex, steppedIndex } from "./wheelOptions.js";
44
+ import { canSpinTo, endIndex, nearestEnabledIndex, steppedIndex } from "./wheelOptions.js";
44
45
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
45
46
  export { nearestEnabledIndex } from "./wheelOptions.js";
46
47
  const ITEM_BLOCK_SIZE = dateInputTouchSizes.wheelItemSize;
@@ -130,8 +131,23 @@ export function ScrollWheel({
130
131
  options,
131
132
  value,
132
133
  onChange,
133
- isActive = true
134
+ isActive = true,
135
+ ref
134
136
  }) {
137
+ // A spin commits the row at once. The new value then scrolls the column
138
+ // there, as any new value does.
139
+ useImperativeHandle(ref, () => ({
140
+ spinTo: async index => {
141
+ if (!canSpinTo(options, index)) {
142
+ return false;
143
+ }
144
+ const option = options[index];
145
+ if (option.value !== value) {
146
+ onChange(option.value);
147
+ }
148
+ return true;
149
+ }
150
+ }), [options, value, onChange]);
135
151
  const scrollerRef = useRef(null);
136
152
  const selectedIndex = Math.max(0, options.findIndex(option => option.value === value));
137
153
  // Which row is under the band right now. Tracks the finger during a scroll;
@@ -351,8 +367,6 @@ export function ScrollWheel({
351
367
  useOwnScrollGesture(scrollerRef, 'all', {
352
368
  isEnabled: isActive
353
369
  });
354
-
355
- // A key commits the row it moves to and scrolls the column there.
356
370
  const moveTo = useCallback(row => {
357
371
  const option = row == null ? undefined : options[row];
358
372
  if (row == null || option == null || option.isDisabled) {
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @file datePickerTouch.ts
3
+ * @input The date and time pickers' touch-only pieces
4
+ * @output Re-exports what the date and time sheets use only under a finger:
5
+ * TimeWheels
6
+ * @position The pickers' touch layer. The sheets import touch behaviour from
7
+ * here only, so a desktop build can replace this one module.
8
+ *
9
+ * SYNC: When modified, update TouchTimeField.tsx and TouchDateTimeField.tsx.
10
+ */
11
+ export { TimeWheels } from '../TimeInput/TimeWheels.js';
12
+ export type { TimeWheelsProps } from '../TimeInput/TimeWheels.js';
13
+ //# sourceMappingURL=datePickerTouch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datePickerTouch.d.ts","sourceRoot":"","sources":["../../src/DateInput/datePickerTouch.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAC;AACnD,YAAY,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file datePickerTouch.ts
5
+ * @input The date and time pickers' touch-only pieces
6
+ * @output Re-exports what the date and time sheets use only under a finger:
7
+ * TimeWheels
8
+ * @position The pickers' touch layer. The sheets import touch behaviour from
9
+ * here only, so a desktop build can replace this one module.
10
+ *
11
+ * SYNC: When modified, update TouchTimeField.tsx and TouchDateTimeField.tsx.
12
+ */
13
+
14
+ export { TimeWheels } from "../TimeInput/TimeWheels.js";
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @file wheelOptions.ts
3
3
  * @input Nothing; types, the row height and pure functions
4
- * @output WheelOption, WheelProps, WHEEL_ROW_HEIGHT, nearestEnabledIndex,
5
- * steppedIndex and endIndex: what both wheels share
4
+ * @output WheelOption, WheelProps, WheelHandle, WHEEL_ROW_HEIGHT, canSpinTo,
5
+ * nearestEnabledIndex, steppedIndex and endIndex: what both wheels share
6
6
  * @position Internal; read by Wheel.tsx (which re-exports all of it) and
7
7
  * PickerWheel.tsx
8
8
  *
@@ -10,6 +10,7 @@
10
10
  * - /packages/core/src/DateInput/Wheel.tsx
11
11
  * - /packages/core/src/DateInput/PickerWheel.tsx
12
12
  */
13
+ import type { Ref } from 'react';
13
14
  /**
14
15
  * The row height, px (`dateInputTouchSizes.wheelItemSize`): the pitch of both
15
16
  * columns' rows, and the unit of the touch wheel's offset.
@@ -32,6 +33,18 @@ export interface WheelOption {
32
33
  */
33
34
  order?: number;
34
35
  }
36
+ /** What a Wheel's `ref` exposes. */
37
+ export interface WheelHandle {
38
+ /**
39
+ * Turn the wheel onto `index` (an index into `options`) on the tap spin, then
40
+ * commit it as a rest would. Resolves true once that row is the committed
41
+ * one, false if a finger or another turn interrupted it or the wheel went
42
+ * away first. An index outside `options` or a disabled row resolves false at
43
+ * once, and nothing turns. Under a fine pointer the row commits at once. The
44
+ * column then scrolls to it as for any new value, on the same rule.
45
+ */
46
+ spinTo(index: number): Promise<boolean>;
47
+ }
35
48
  export interface WheelProps {
36
49
  /** Accessible name for the column, e.g. "Month". */
37
50
  label: string;
@@ -48,7 +61,14 @@ export interface WheelProps {
48
61
  * motion.
49
62
  */
50
63
  isActive?: boolean;
64
+ /** Programmatic turns: `spinTo(index)`. */
65
+ ref?: Ref<WheelHandle>;
51
66
  }
67
+ /**
68
+ * Whether `spinTo(index)` may turn onto `index`: an enabled row of `options`.
69
+ * The touch wheel and the scrolling column answer a spin by the same rule.
70
+ */
71
+ export declare function canSpinTo(options: ReadonlyArray<WheelOption>, index: number): boolean;
52
72
  /**
53
73
  * The enabled row nearest `index`: `index` itself when it is enabled,
54
74
  * otherwise the closest enabled row on either side. A tie goes to the side of
@@ -1 +1 @@
1
- {"version":3,"file":"wheelOptions.d.ts","sourceRoot":"","sources":["../../src/DateInput/wheelOptions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACpC,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,EACnC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAClB,MAAM,CAsBR;AAaD;;;;;GAKG;AACH,wBAAgB,YAAY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H,wBAAgB,SAAS,CACvB,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,EACnC,KAAK,EAAE,MAAM,GACZ,OAAO,CAGT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,EACnC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAClB,MAAM,CAsBR;AAaD;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,EACnC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,IAAI,CAyBf;AAED,uFAAuF;AACvF,wBAAgB,QAAQ,CACtB,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,EACnC,GAAG,EAAE,OAAO,GAAG,MAAM,GACpB,MAAM,GAAG,IAAI,CAKf"}
@@ -3,8 +3,8 @@
3
3
  /**
4
4
  * @file wheelOptions.ts
5
5
  * @input Nothing; types, the row height and pure functions
6
- * @output WheelOption, WheelProps, WHEEL_ROW_HEIGHT, nearestEnabledIndex,
7
- * steppedIndex and endIndex: what both wheels share
6
+ * @output WheelOption, WheelProps, WheelHandle, WHEEL_ROW_HEIGHT, canSpinTo,
7
+ * nearestEnabledIndex, steppedIndex and endIndex: what both wheels share
8
8
  * @position Internal; read by Wheel.tsx (which re-exports all of it) and
9
9
  * PickerWheel.tsx
10
10
  *
@@ -18,6 +18,18 @@
18
18
  * columns' rows, and the unit of the touch wheel's offset.
19
19
  */
20
20
  export const WHEEL_ROW_HEIGHT = 28;
21
+
22
+ /** What a Wheel's `ref` exposes. */
23
+
24
+ /**
25
+ * Whether `spinTo(index)` may turn onto `index`: an enabled row of `options`.
26
+ * The touch wheel and the scrolling column answer a spin by the same rule.
27
+ */
28
+ export function canSpinTo(options, index) {
29
+ const option = options[index];
30
+ return option != null && !option.isDisabled;
31
+ }
32
+
21
33
  /**
22
34
  * The enabled row nearest `index`: `index` itself when it is enabled,
23
35
  * otherwise the closest enabled row on either side. A tie goes to the side of
@@ -1 +1 @@
1
- {"version":3,"file":"TouchDateTimeField.d.ts","sourceRoot":"","sources":["../../src/DateTimeInput/TouchDateTimeField.tsx"],"names":[],"mappings":"AA6GA,OAAO,KAAK,EAAC,kBAAkB,EAAoB,MAAM,iBAAiB,CAAC;AAoV3E,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,eAAe,EACf,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,GAAG,EACH,GAAG,EACH,eAAe,EACf,UAAkB,EAClB,UAAkB,EAElB,aAAa,EAAE,cAAc,EAC7B,kBAAkB,EAAE,mBAAmB,EACvC,QAAgB,EAChB,WAAW,EAAE,oBAAoB,EACjC,eAAe,EAAE,wBAAwB,EACzC,SAAS,EACT,IAAI,EAAE,QAAQ,EACd,MAAM,EACN,YAAY,EAEZ,cAAc,EAAE,eAAe,EAC/B,YAAY,EAAE,gBAAoB,EAClC,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,GAAG,EACH,GAAG,SAAS,EACb,EAAE,kBAAkB,+BAy/BpB;yBAhiCe,kBAAkB"}
1
+ {"version":3,"file":"TouchDateTimeField.d.ts","sourceRoot":"","sources":["../../src/DateTimeInput/TouchDateTimeField.tsx"],"names":[],"mappings":"AAuHA,OAAO,KAAK,EAAC,kBAAkB,EAAoB,MAAM,iBAAiB,CAAC;AA6S3E,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,eAAe,EACf,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,GAAG,EACH,GAAG,EACH,eAAe,EACf,UAAkB,EAClB,UAAkB,EAElB,aAAa,EAAE,cAAc,EAC7B,kBAAkB,EAAE,mBAAmB,EACvC,QAAgB,EAChB,WAAW,EAAE,oBAAoB,EACjC,eAAe,EAAE,wBAAwB,EACzC,SAAS,EACT,IAAI,EAAE,QAAQ,EACd,MAAM,EACN,YAAY,EAEZ,cAAc,EAAE,eAAe,EAC/B,YAAY,EAAE,gBAAoB,EAClC,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,GAAG,EACH,GAAG,SAAS,EACb,EAAE,kBAAkB,+BAk8BpB;yBAz+Be,kBAAkB"}
@@ -4,7 +4,7 @@
4
4
 
5
5
  /**
6
6
  * @file TouchDateTimeField.tsx
7
- * @input Uses React, Field, BottomSheet, SegmentedControl, DateInput month picker primitives, Wheel, StyleX intrinsic flex layout
7
+ * @input Uses React, Field, BottomSheet, SegmentedControl, DateInput month picker primitives, Wheel and the pickers' touch layer (TimeWheels), the touch presentation, StyleX intrinsic flex layout
8
8
  * @output Exports TouchDateTimeField — the coarse-pointer surface behind DateTimeInput
9
9
  * @position Internal component; consumed by DateTimeInput.tsx
10
10
  *
@@ -46,7 +46,7 @@ import { themeProps } from "../utils/themeProps.js";
46
46
  import { normalizeDayOfWeek } from "../utils/dateTypes.js";
47
47
  import { formatLocaleTime } from "../utils/timeFormat.js";
48
48
  import { getWeekdayHeaders } from "../Calendar/getWeekdayHeaderNames.js";
49
- import { formatISOTime, isImeKeyEvent, isRenderable, isTimeInRange, clampTime, mergeProps, parseISOTime } from "../utils/index.js";
49
+ import { formatISOTime, isImeKeyEvent, isRenderable, clampTime, mergeProps, parseISOTime } from "../utils/index.js";
50
50
  import { chainEventHandlers } from "../utils/chainEventHandlers.js";
51
51
  import { joinAriaIDs } from "../utils/inputAria.js";
52
52
  import { DATE_FORMAT_LONG, plainDateFormat, plainDateFromISO, plainDateToday } from "../utils/plainDate.js";
@@ -54,13 +54,16 @@ import { plainDateFormatStandaloneMonthYear } from "../utils/plainDate.js";
54
54
  import { MonthScroller } from "../DateInput/MonthScroller.js";
55
55
  import { MonthYearWheels } from "../DateInput/MonthYearWheels.js";
56
56
  import { Wheel } from "../DateInput/Wheel.js";
57
+ import { TimeWheels } from "../DateInput/datePickerTouch.js";
58
+ import { hour12From24, hour24From12, hourRowsInHalf, meridiemRows, minuteRows, secondRows, wheelBounds } from "../TimeInput/timeWheelRules.js";
59
+ import { useTouchPresentation } from "../utils/touchPresentation.js";
57
60
  import "../DateInput/tokens.stylex.js";
58
61
  import { dateInputTouchGeometry, dateInputTouchSizes } from "../DateInput/tokens.stylex.js";
59
62
  import { DEFAULT_MONTH_REACH, clampIndex, fromMonthIndex, monthIndexOf } from "../DateInput/monthGeometry.js";
60
63
  import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
61
64
  import { InternationalizationContext } from "../i18n/InternationalizationContext.js";
62
65
  import english from "../i18n/generated-english/DateTimeInput/TouchDateTimeField.generated.js";
63
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
66
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
64
67
  registerEnglishFallback(english);
65
68
  function splitDateTime(dt) {
66
69
  if (!dt) {
@@ -201,30 +204,6 @@ function normalizeISOTime(time, hasSeconds) {
201
204
  const parsed = parseISOTime(time);
202
205
  return parsed ? formatISOTime(parsed, hasSeconds) : undefined;
203
206
  }
204
- function timeToSeconds(time) {
205
- if (time === undefined) {
206
- return null;
207
- }
208
- const parsed = parseISOTime(time);
209
- return parsed == null ? null : parsed.hour * 3600 + parsed.minute * 60 + parsed.second;
210
- }
211
- function twoDigits(value) {
212
- return String(value).padStart(2, '0');
213
- }
214
- function hour12From24(hour) {
215
- return hour === 0 ? 12 : hour > 12 ? hour - 12 : hour;
216
- }
217
- function hour24From12(hour, meridiem) {
218
- if (meridiem === 0) {
219
- return hour === 12 ? 0 : hour;
220
- }
221
- return hour === 12 ? 12 : hour + 12;
222
- }
223
- function rangeOverlaps(startSecond, endSecond, min, max) {
224
- const minSecond = timeToSeconds(min);
225
- const maxSecond = timeToSeconds(max);
226
- return (minSecond == null || endSecond >= minSecond) && (maxSecond == null || startSecond <= maxSecond);
227
- }
228
207
  export function TouchDateTimeField({
229
208
  label,
230
209
  isLabelHidden = false,
@@ -348,6 +327,9 @@ export function TouchDateTimeField({
348
327
  useBusyAnnouncement(isBusy, t('@astryx.spinner.loading'), isSheetOpen ? sheetBodyRef : dateInputRef);
349
328
  const [activePanel, setActivePanel] = useState('date');
350
329
  const [isWheelOpen, setIsWheelOpen] = useState(false);
330
+ const {
331
+ isTouch
332
+ } = useTouchPresentation();
351
333
  const [draftTime, setDraftTime] = useState(() => normalizeISOTime(splitDateTime(value).time, hasSeconds));
352
334
  const today = useMemo(() => plainDateToday(), []);
353
335
  const selectedDate = useMemo(() => parseValidISODate(valueParts.date), [valueParts.date]);
@@ -519,63 +501,14 @@ export function TouchDateTimeField({
519
501
  }, hasSeconds);
520
502
  }, [hasSeconds, hourFormat, parsedWheelTime]);
521
503
  const timeBounds = timeBoundsForDate(valueParts.date);
522
- const hourOptions = useMemo(() => {
523
- if (hourFormat === '24h') {
524
- return Array.from({
525
- length: 24
526
- }, (_, hour) => ({
527
- value: hour,
528
- label: twoDigits(hour),
529
- isDisabled: !rangeOverlaps(hour * 3600, hour * 3600 + 3599, timeBounds.min, timeBounds.max)
530
- }));
531
- }
532
- const meridiem = parsedWheelTime.hour < 12 ? 0 : 1;
533
- // In 12-hour mode the hour column is interpreted inside the active AM/PM
534
- // half, so disabled rows describe reachability within that half only.
535
- return Array.from({
536
- length: 12
537
- }, (_, index) => {
538
- const hour = index + 1;
539
- const hour24 = hour24From12(hour, meridiem);
540
- return {
541
- value: hour,
542
- label: String(hour),
543
- // Keys step in time order: 12 PM comes before 1 PM.
544
- order: hour24,
545
- isDisabled: !rangeOverlaps(hour24 * 3600, hour24 * 3600 + 3599, timeBounds.min, timeBounds.max)
546
- };
547
- });
548
- }, [hourFormat, parsedWheelTime.hour, timeBounds.min, timeBounds.max]);
549
- const minuteOptions = useMemo(() => Array.from({
550
- length: 60
551
- }, (_, minute) => {
552
- const start = parsedWheelTime.hour * 3600 + minute * 60;
553
- return {
554
- value: minute,
555
- label: twoDigits(minute),
556
- isDisabled: !rangeOverlaps(start, start + (hasSeconds ? 59 : 0), timeBounds.min, timeBounds.max)
557
- };
558
- }), [hasSeconds, parsedWheelTime.hour, timeBounds.min, timeBounds.max]);
559
- const secondOptions = useMemo(() => Array.from({
560
- length: 60
561
- }, (_, second) => ({
562
- value: second,
563
- label: twoDigits(second),
564
- isDisabled: !isTimeInRange(formatISOTime({
565
- hour: parsedWheelTime.hour,
566
- minute: parsedWheelTime.minute,
567
- second
568
- }, true), timeBounds.min, timeBounds.max)
569
- })), [parsedWheelTime.hour, parsedWheelTime.minute, timeBounds.min, timeBounds.max]);
570
- const meridiemOptions = useMemo(() => [{
571
- value: 0,
572
- label: t('@astryx.dateTimeInput.meridiemAM'),
573
- isDisabled: !rangeOverlaps(0, 11 * 3600 + 3599, timeBounds.min, timeBounds.max)
574
- }, {
575
- value: 1,
576
- label: t('@astryx.dateTimeInput.meridiemPM'),
577
- isDisabled: !rangeOverlaps(12 * 3600, 23 * 3600 + 3599, timeBounds.min, timeBounds.max)
578
- }], [t, timeBounds.min, timeBounds.max]);
504
+ const bounds = useMemo(() => wheelBounds(timeBounds.min, timeBounds.max), [timeBounds.min, timeBounds.max]);
505
+ const hourOptions = useMemo(() => hourRowsInHalf(parsedWheelTime.hour, hourFormat, bounds), [bounds, hourFormat, parsedWheelTime.hour]);
506
+ const minuteOptions = useMemo(() => minuteRows(parsedWheelTime.hour, hasSeconds, bounds), [bounds, hasSeconds, parsedWheelTime.hour]);
507
+ const secondOptions = useMemo(() => secondRows(parsedWheelTime.hour, parsedWheelTime.minute, bounds), [bounds, parsedWheelTime.hour, parsedWheelTime.minute]);
508
+ const meridiemOptions = useMemo(() => meridiemRows({
509
+ am: t('@astryx.dateTimeInput.meridiemAM'),
510
+ pm: t('@astryx.dateTimeInput.meridiemPM')
511
+ }, bounds), [bounds, t]);
579
512
  const handleVisibleMonthChange = useCallback(next => {
580
513
  if (activePanel === 'date' && !isWheelOpen) {
581
514
  setMonthIndex(next);
@@ -853,45 +786,55 @@ export function TouchDateTimeField({
853
786
  className: "x15r89dc x78zum5 xh8yej3 xeuugli xdt5ytf x1txdalj xlshs6z xg01cxk x47corl"
854
787
  }
855
788
  }[!!(activePanel !== 'time') << 0],
856
- children: [/*#__PURE__*/_jsxs("div", {
789
+ children: [/*#__PURE__*/_jsx("div", {
857
790
  ...{
858
791
  className: "x78zum5 xh8yej3 xeuugli xm8gem x1txdalj"
859
792
  },
860
- children: [/*#__PURE__*/_jsx(Wheel, {
861
- label: t('@astryx.dateTimeInput.hourWheel'),
862
- options: hourOptions,
863
- value: hourFormat === '24h' ? parsedWheelTime.hour : hour12From24(parsedWheelTime.hour),
864
- isActive: activePanel === 'time',
865
- onChange: hour => commitWheelTime(hourFormat === '24h' ? composeWheelTime({
866
- hour24: hour
867
- }) : composeWheelTime({
868
- hour12: hour
869
- }))
870
- }), /*#__PURE__*/_jsx(Wheel, {
871
- label: t('@astryx.dateTimeInput.minuteWheel'),
872
- options: minuteOptions,
873
- value: parsedWheelTime.minute,
793
+ children: isTouch ? /*#__PURE__*/_jsx(TimeWheels, {
794
+ time: parsedWheelTime,
795
+ hourFormat: hourFormat,
796
+ hasSeconds: hasSeconds,
797
+ min: timeBounds.min,
798
+ max: timeBounds.max,
874
799
  isActive: activePanel === 'time',
875
- onChange: minute => commitWheelTime(composeWheelTime({
876
- minute
877
- }))
878
- }), hasSeconds && /*#__PURE__*/_jsx(Wheel, {
879
- label: t('@astryx.dateTimeInput.secondWheel'),
880
- options: secondOptions,
881
- value: parsedWheelTime.second,
882
- isActive: activePanel === 'time',
883
- onChange: second => commitWheelTime(composeWheelTime({
884
- second
885
- }))
886
- }), hourFormat === '12h' && /*#__PURE__*/_jsx(Wheel, {
887
- label: t('@astryx.dateTimeInput.meridiemWheel'),
888
- options: meridiemOptions,
889
- value: parsedWheelTime.hour < 12 ? 0 : 1,
890
- isActive: activePanel === 'time',
891
- onChange: meridiem => commitWheelTime(composeWheelTime({
892
- meridiem
893
- }))
894
- })]
800
+ onCommit: time => commitWheelTime(formatISOTime(time, hasSeconds))
801
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
802
+ children: [/*#__PURE__*/_jsx(Wheel, {
803
+ label: t('@astryx.dateTimeInput.hourWheel'),
804
+ options: hourOptions,
805
+ value: hourFormat === '24h' ? parsedWheelTime.hour : hour12From24(parsedWheelTime.hour),
806
+ isActive: activePanel === 'time',
807
+ onChange: hour => commitWheelTime(hourFormat === '24h' ? composeWheelTime({
808
+ hour24: hour
809
+ }) : composeWheelTime({
810
+ hour12: hour
811
+ }))
812
+ }), /*#__PURE__*/_jsx(Wheel, {
813
+ label: t('@astryx.dateTimeInput.minuteWheel'),
814
+ options: minuteOptions,
815
+ value: parsedWheelTime.minute,
816
+ isActive: activePanel === 'time',
817
+ onChange: minute => commitWheelTime(composeWheelTime({
818
+ minute
819
+ }))
820
+ }), hasSeconds && /*#__PURE__*/_jsx(Wheel, {
821
+ label: t('@astryx.dateTimeInput.secondWheel'),
822
+ options: secondOptions,
823
+ value: parsedWheelTime.second,
824
+ isActive: activePanel === 'time',
825
+ onChange: second => commitWheelTime(composeWheelTime({
826
+ second
827
+ }))
828
+ }), hourFormat === '12h' && /*#__PURE__*/_jsx(Wheel, {
829
+ label: t('@astryx.dateTimeInput.meridiemWheel'),
830
+ options: meridiemOptions,
831
+ value: parsedWheelTime.hour < 12 ? 0 : 1,
832
+ isActive: activePanel === 'time',
833
+ onChange: meridiem => commitWheelTime(composeWheelTime({
834
+ meridiem
835
+ }))
836
+ })]
837
+ })
895
838
  }), /*#__PURE__*/_jsx("div", {
896
839
  ...{
897
840
  className: "x78zum5 xr1yuqi xfsso4q"
@@ -1 +1 @@
1
- {"version":3,"file":"useHoverCard.d.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H,wBAAgB,YAAY,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAke5E"}
@@ -197,7 +197,12 @@ export function useHoverCard(options = {}) {
197
197
 
198
198
  // Tap-to-open on touch; on a mouse this does nothing and hover still rules.
199
199
  const handlePointerDown = useCallback(event => {
200
- handleTouchPointerDown(event);
200
+ // A pen in range starts the hover show before it lands. Left pending,
201
+ // that show opens the card during the press. The tap then closes it.
202
+ if (handleTouchPointerDown(event) && showTimeoutRef.current) {
203
+ clearTimeout(showTimeoutRef.current);
204
+ showTimeoutRef.current = null;
205
+ }
201
206
  }, [handleTouchPointerDown]);
202
207
 
203
208
  // Under `auto`, whether focus counts is decided when it arrives, and a
@@ -1 +1 @@
1
- {"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/Overlay/Overlay.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAE,GAAG,EAAC,MAAM,OAAO,CAAC;AAO1C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACd,MAAM,gBAAgB,CAAC;AAGxB,MAAM,WAAW,YAAa,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC7D,8CAA8C;IAC9C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iDAAiD;IACjD,OAAO,EAAE,SAAS,CAAC;IACnB,wBAAwB;IACxB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,yCAAyC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sBAAsB;IACtB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,qBAAqB;IACrB,KAAK,CAAC,EAAE,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QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,aAAa,EACxB,GAAG,IAAI,EACR,EAAE,YAAY,+BA0Dd;yBAzEe,OAAO"}
@@ -66,8 +66,13 @@ export function Overlay({
66
66
  align
67
67
  });
68
68
 
69
- // Border radius: mirror first child's radius onto the wrapper.
70
- // Only the component needs this — hook consumers have their own radius.
69
+ // Copies the first child's radius onto the wrapper, so the scrim clips to
70
+ // the media's rounded corners. This is a layout read of the mounted DOM, and
71
+ // no user interaction causes it. It runs again when a hidden Activity shows
72
+ // the wrapper, because the child can change while it is hidden. A ref
73
+ // callback runs again when a caller's ref changes identity, so it cannot
74
+ // keep this once-per-show timing. A useOverlay consumer sets the radius on
75
+ // its own element.
71
76
  useIsomorphicLayoutEffect(() => {
72
77
  const el = overlay.containerRef.current;
73
78
  if (!el) {
@@ -133,8 +133,10 @@ export interface PowerSearchProps extends Omit<BaseProps<HTMLElement>, 'onChange
133
133
  * above it with the fields (or the content search with inline
134
134
  * suggestions), and a value step opens above that, stages operator →
135
135
  * value, and confirms from its footer. Dismissing a step reveals the
136
- * one beneath. Suited to compact touch screens, where the editor
137
- * popover competes with the software keyboard.
136
+ * one beneath. The flow edits a draft: `onChange` is called when Done
137
+ * applies it, once per edit in order, and a dismissal with a changed
138
+ * draft asks before discarding it. Suited to compact touch screens,
139
+ * where the editor popover competes with the software keyboard.
138
140
  * - `'adaptive'`: the bottom sheet on compact coarse-pointer screens,
139
141
  * otherwise the popover — the same resolution Selector uses. The server
140
142
  * render and the hydrating render are the popover.
@@ -1 +1 @@
1
- {"version":3,"file":"PowerSearch.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearch.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAUZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SA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YAAoB,EACpB,QAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,eAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,aAA0B,EAC1B,SAAS,EACT,cAAmB,EACnB,oBAAoB,EACpB,gBAA6C,EAC7C,sBAAsB,EAAE,+BAA+B,EACvD,UAAU,EACV,qBAAqB,EACrB,UAAU,EACV,WAAW,EACX,GAAG,EACH,SAAS,EACT,IAAI,EAAE,QAAQ,EACd,aAAa,EAAE,MAAM,EACrB,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EAAE,kBAAkB,EAC9B,YAAyB,GAC1B,EAAE,gBAAgB,qBAmiClB;yBAtkCe,WAAW"}
@@ -72,7 +72,14 @@ export interface PowerSearchBottomSheetProps {
72
72
  config: InternalConfig;
73
73
  /** The caller's config, handed to Editor overrides as they expect it. */
74
74
  configProp: PowerSearchConfig;
75
+ /** The committed filters; the draft the sheet edits starts from them. */
75
76
  filters: ReadonlyArray<PowerSearchFilter>;
77
+ /**
78
+ * The field's `onChange`. Done replays the draft's edits through it, in
79
+ * order, onto the field's latest filters, each call carrying that list
80
+ * with the edit applied; nothing is reported before Done, and nothing when
81
+ * the field is read-only or disabled at Done.
82
+ */
76
83
  onChange: (filters: ReadonlyArray<PowerSearchFilter>, changeType: PowerSearchChangeType, index: number) => void;
77
84
  /** The field typeahead source; the content search lists its suggestions. */
78
85
  searchSource: SearchSource<PowerSearchItem>;
@@ -90,13 +97,29 @@ export interface PowerSearchBottomSheetProps {
90
97
  components?: PowerSearchComponents;
91
98
  editors: PowerSearchSheetEditors;
92
99
  }
100
+ /** One edit of the draft: the draft before and after it, and its type and index in the draft; Done replays it onto the field's latest filters. */
101
+ interface DraftEdit {
102
+ before: ReadonlyArray<PowerSearchFilter>;
103
+ after: ReadonlyArray<PowerSearchFilter>;
104
+ changeType: PowerSearchChangeType;
105
+ index: number;
106
+ }
107
+ /**
108
+ * Replays the draft's edits onto `base`, the field's latest filters, and
109
+ * reports each through `report` with the list after it. An add appends; an
110
+ * edit replaces the first filter matching the one it edited; a removal drops
111
+ * the filters it removed, by signature. An edit or removal whose target is
112
+ * not in the base list is skipped: the parent removed it meanwhile.
113
+ */
114
+ export declare function replayDraftEdits(base: ReadonlyArray<PowerSearchFilter>, edits: ReadonlyArray<DraftEdit>, report: (filters: ReadonlyArray<PowerSearchFilter>, changeType: PowerSearchChangeType, index: number) => void): ReadonlyArray<PowerSearchFilter>;
93
115
  /**
94
116
  * The sheet flow of PowerSearch's touch presentation: Filters, Add filter,
95
117
  * and the value step, as standalone sheets that stack, each open beneath the
96
118
  * step it led to.
97
119
  */
98
- export declare function PowerSearchBottomSheet({ isOpen, onOpenChange, finalFocusRef, resultCountText, config, configProp, filters, onChange, searchSource, placeholder, isReadOnly, isDisabled, hasClear, maxOperatorMenuItems, timezoneID, maxSearchResults, saveButtonLabel: saveButtonLabelFromProps, components: componentOverrides, editors, }: PowerSearchBottomSheetProps): React.JSX.Element;
120
+ export declare function PowerSearchBottomSheet({ isOpen, onOpenChange, finalFocusRef, resultCountText, config, configProp, filters: committedFilters, onChange: onCommit, searchSource, placeholder, isReadOnly, isDisabled, hasClear, maxOperatorMenuItems, timezoneID, maxSearchResults, saveButtonLabel: saveButtonLabelFromProps, components: componentOverrides, editors, }: PowerSearchBottomSheetProps): React.JSX.Element;
99
121
  export declare namespace PowerSearchBottomSheet {
100
122
  var displayName: string;
101
123
  }
124
+ export {};
102
125
  //# sourceMappingURL=PowerSearchBottomSheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PowerSearchBottomSheet.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchBottomSheet.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,EASZ,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAoBf,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;A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CAAC;IAC9B,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,OAAO,EAAE,uBAAuB,CAAC;CAClC;AA4mBD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,YAAY,EACZ,aAAa,EACb,eAAe,EACf,MAAM,EACN,UAAU,EACV,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,UAAU,EACV,gBAAgB,EAChB,eAAe,EAAE,wBAAwB,EACzC,UAAU,EAAE,kBAAkB,EAC9B,OAAO,GACR,EAAE,2BAA2B,qBAyoD7B;yBA7pDe,sBAAsB"}
1
+ {"version":3,"file":"PowerSearchBottomSheet.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchBottomSheet.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,EASZ,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAoBf,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAkCrD,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAe3D,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAIV,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EAEjB,iBAAiB,EACjB,eAAe,EAEhB,MAAM,SAAS,CAAC;AAajB;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,OAAO,YAAY,CAAC;I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