@astryxdesign/core 0.7.14 → 0.7.15-canary.g79b95eb

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 (131) hide show
  1. package/dist/Calendar/Calendar.d.ts.map +1 -1
  2. package/dist/Calendar/Calendar.js +11 -2
  3. package/dist/Calendar/getInitialFocusDate.d.ts +8 -3
  4. package/dist/Calendar/getInitialFocusDate.d.ts.map +1 -1
  5. package/dist/Calendar/getInitialFocusDate.js +42 -7
  6. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  7. package/dist/CheckboxInput/CheckboxInput.js +9 -4
  8. package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
  9. package/dist/CheckboxList/CheckboxListItem.js +3 -8
  10. package/dist/DateInput/useTypedDate.d.ts.map +1 -1
  11. package/dist/DateInput/useTypedDate.js +3 -2
  12. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  13. package/dist/DateTimeInput/DateTimeInput.js +6 -3
  14. package/dist/DateTimeInput/NativeDateSegment.d.ts.map +1 -1
  15. package/dist/DateTimeInput/NativeDateSegment.js +23 -9
  16. package/dist/DateTimeInput/NativeTimeSegment.d.ts.map +1 -1
  17. package/dist/DateTimeInput/NativeTimeSegment.js +22 -8
  18. package/dist/Drawer/Drawer.d.ts.map +1 -1
  19. package/dist/Drawer/Drawer.js +7 -5
  20. package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts.map +1 -1
  21. package/dist/DropdownMenu/MenuBottomSheetActionList.js +5 -1
  22. package/dist/Item/Item.d.ts +1 -1
  23. package/dist/Item/Item.d.ts.map +1 -1
  24. package/dist/Item/Item.js +4 -2
  25. package/dist/Link/useLinkify.d.ts.map +1 -1
  26. package/dist/Link/useLinkify.js +3 -2
  27. package/dist/List/List.d.ts +4 -1
  28. package/dist/List/List.d.ts.map +1 -1
  29. package/dist/Markdown/Markdown.d.ts.map +1 -1
  30. package/dist/Markdown/Markdown.js +8 -0
  31. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  32. package/dist/RadioList/RadioListItem.js +19 -4
  33. package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts +43 -15
  34. package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts.map +1 -1
  35. package/dist/SegmentedControl/useSegmentedSelectionMotion.js +108 -18
  36. package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts.map +1 -1
  37. package/dist/SegmentedControl/useSegmentedTouchTracking.js +5 -0
  38. package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
  39. package/dist/Table/plugins/sortable/useTableSortableState.js +7 -3
  40. package/dist/Token/Token.d.ts.map +1 -1
  41. package/dist/Token/Token.js +2 -0
  42. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  43. package/dist/Tokenizer/Tokenizer.js +85 -12
  44. package/dist/astryx.css +11 -10
  45. package/dist/gestures/GestureHost.d.ts +5 -0
  46. package/dist/gestures/GestureHost.d.ts.map +1 -1
  47. package/dist/gestures/GestureHost.js +54 -28
  48. package/dist/hooks/menuPressGesture.d.ts +39 -2
  49. package/dist/hooks/menuPressGesture.d.ts.map +1 -1
  50. package/dist/hooks/menuPressGesture.js +92 -5
  51. package/dist/hooks/scrollOwnerRegistry.d.ts +0 -1
  52. package/dist/hooks/scrollOwnerRegistry.d.ts.map +1 -1
  53. package/dist/hooks/scrollOwnerRegistry.js +4 -1
  54. package/dist/hooks/useClickableContainer.d.ts +6 -4
  55. package/dist/hooks/useClickableContainer.d.ts.map +1 -1
  56. package/dist/hooks/useClickableContainer.js +11 -8
  57. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  58. package/dist/hooks/useFocusTrap.js +6 -0
  59. package/dist/hooks/useMenuPress.d.ts.map +1 -1
  60. package/dist/hooks/useMenuPress.js +35 -2
  61. package/dist/hooks/useStreamingText.d.ts.map +1 -1
  62. package/dist/hooks/useStreamingText.js +38 -23
  63. package/dist/i18n/generated-english/DateInput/useTypedDate.generated.js +2 -2
  64. package/dist/i18n/generated-locales/en.generated.js +2 -2
  65. package/dist/i18n/generated-locales/pseudo.generated.js +2 -2
  66. package/dist/motion/uikit/segmented.d.ts +35 -7
  67. package/dist/motion/uikit/segmented.d.ts.map +1 -1
  68. package/dist/motion/uikit/segmented.js +39 -11
  69. package/dist/privateAttributes/press.stylex.d.ts.map +1 -1
  70. package/dist/privateAttributes/press.stylex.js +1 -1
  71. package/dist/privateAttributes/pressBox.stylex.d.ts +12 -4
  72. package/dist/privateAttributes/pressBox.stylex.d.ts.map +1 -1
  73. package/dist/privateAttributes/pressBox.stylex.js +21 -4
  74. package/dist/privateAttributes/tokenRemove.stylex.d.ts +5 -0
  75. package/dist/privateAttributes/tokenRemove.stylex.d.ts.map +1 -0
  76. package/dist/privateAttributes/tokenRemove.stylex.js +25 -0
  77. package/dist/theme/defineTheme.d.ts +0 -1
  78. package/dist/theme/defineTheme.d.ts.map +1 -1
  79. package/dist/utils/inputAge.d.ts +5 -2
  80. package/dist/utils/inputAge.d.ts.map +1 -1
  81. package/dist/utils/inputAge.js +4 -1
  82. package/dist/utils/pressFeedback.d.ts.map +1 -1
  83. package/dist/utils/pressFeedback.js +60 -9
  84. package/locales/en.json +3 -3
  85. package/locales/pseudo.json +2 -2
  86. package/package.json +5 -5
  87. package/src/Calendar/Calendar.tsx +11 -1
  88. package/src/Calendar/getInitialFocusDate.ts +70 -8
  89. package/src/CheckboxInput/CheckboxInput.doc.mjs +16 -2
  90. package/src/CheckboxInput/CheckboxInput.tsx +32 -23
  91. package/src/CheckboxList/CheckboxList.doc.mjs +1 -1
  92. package/src/CheckboxList/CheckboxListItem.tsx +3 -6
  93. package/src/DateInput/useTypedDate.ts +9 -6
  94. package/src/DateTimeInput/DateTimeInput.tsx +7 -3
  95. package/src/DateTimeInput/NativeDateSegment.tsx +28 -10
  96. package/src/DateTimeInput/NativeTimeSegment.tsx +19 -9
  97. package/src/Drawer/Drawer.tsx +7 -5
  98. package/src/DropdownMenu/MenuBottomSheetActionList.tsx +3 -0
  99. package/src/Item/Item.doc.mjs +2 -1
  100. package/src/Item/Item.tsx +7 -3
  101. package/src/Link/useLinkify.tsx +7 -9
  102. package/src/List/List.doc.mjs +9 -21
  103. package/src/List/List.tsx +4 -1
  104. package/src/List/ListItem.doc.mjs +4 -2
  105. package/src/Markdown/Markdown.tsx +7 -0
  106. package/src/RadioList/RadioListItem.tsx +60 -30
  107. package/src/SegmentedControl/SegmentedControl.doc.mjs +3 -3
  108. package/src/SegmentedControl/useSegmentedSelectionMotion.ts +115 -19
  109. package/src/SegmentedControl/useSegmentedTouchTracking.ts +5 -0
  110. package/src/Table/plugins/sortable/useTableSortableState.tsx +5 -1
  111. package/src/Token/Token.tsx +2 -0
  112. package/src/Tokenizer/Tokenizer.tsx +102 -7
  113. package/src/gestures/GestureHost.ts +62 -32
  114. package/src/hooks/menuPressGesture.ts +116 -9
  115. package/src/hooks/scrollOwnerRegistry.ts +8 -1
  116. package/src/hooks/useClickableContainer.ts +11 -8
  117. package/src/hooks/useFocusTrap.ts +6 -0
  118. package/src/hooks/useMenuPress.ts +32 -2
  119. package/src/hooks/useStreamingText.ts +30 -25
  120. package/src/i18n/generated-english/DateInput/useTypedDate.generated.ts +2 -2
  121. package/src/i18n/generated-locales/en.generated.ts +2 -2
  122. package/src/i18n/generated-locales/pseudo.generated.ts +2 -2
  123. package/src/motion/MEASUREMENTS.md +2 -3
  124. package/src/motion/uikit/segmented.ts +35 -10
  125. package/src/privateAttributes/press.stylex.ts +2 -8
  126. package/src/privateAttributes/pressBox.stylex.ts +23 -4
  127. package/src/privateAttributes/tokenRemove.stylex.ts +27 -0
  128. package/src/theme/defineTheme.ts +0 -1
  129. package/src/theme/useThemeName.doc.mjs +69 -0
  130. package/src/utils/inputAge.ts +5 -2
  131. package/src/utils/pressFeedback.ts +80 -9
@@ -131,7 +131,7 @@ export const controlPressLayerStyles = {
131
131
  };
132
132
  export const rowPressPaintStyles = {
133
133
  checkboxRow: {
134
- "--_checkbox-row-press-paint": "x1ectg7s xbxihhr x18sblwv xvfewc x19dyfww",
134
+ "--_checkbox-row-press-paint": "x1ectg7s x1u7ooqu x1b9k41a",
135
135
  $$css: true
136
136
  }
137
137
  };
@@ -1,14 +1,22 @@
1
1
  /**
2
2
  * @file privateAttributes/pressBox.stylex.ts
3
3
  * @input A control's box: the non-text part around its input and indicator
4
- * @output pressBoxProps, which marks the box, and pressBoxAt, which finds the
5
- * marked box that a press starts in
4
+ * @output pressBoxProps, which marks the box, pressBoxAt, which finds the
5
+ * marked box that a press starts in, and pressBoxesIn, which lists the
6
+ * marked boxes a surface owns
6
7
  * @position Owner module of the private press-box attribute: the only file
7
- * that writes its name. CheckboxInput and RadioListItem mark their boxes,
8
- * and utils/boxHold.ts reads the mark. No package entry exports it.
8
+ * that writes its name. CheckboxInput and RadioListItem mark their boxes.
9
+ * utils/boxHold.ts reads the mark. The press controller and the container
10
+ * rule give a surface that owns a box the fine-pointer press. No package
11
+ * entry exports it.
9
12
  */
10
13
  /** Spread on the box around a control's input and indicator. */
11
14
  export declare const pressBoxProps: Readonly<Record<string, string>>;
12
15
  /** The marked box that `target` is in, if `surface` contains it. */
13
16
  export declare function pressBoxAt(target: EventTarget | null, surface: Element): HTMLElement | null;
17
+ /**
18
+ * The marked boxes that `surface` owns: those inside it, with no other
19
+ * pressable surface between the two.
20
+ */
21
+ export declare function pressBoxesIn(surface: Element): Element[];
14
22
  //# sourceMappingURL=pressBox.stylex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pressBox.stylex.d.ts","sourceRoot":"","sources":["../../src/privateAttributes/pressBox.stylex.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAIH,gEAAgE;AAChE,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE1D,CAAC;AAEF,oEAAoE;AACpE,wBAAgB,UAAU,CACxB,MAAM,EAAE,WAAW,GAAG,IAAI,EAC1B,OAAO,EAAE,OAAO,GACf,WAAW,GAAG,IAAI,CAMpB"}
1
+ {"version":3,"file":"pressBox.stylex.d.ts","sourceRoot":"","sources":["../../src/privateAttributes/pressBox.stylex.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;GAWG;AAUH,gEAAgE;AAChE,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE1D,CAAC;AAEF,oEAAoE;AACpE,wBAAgB,UAAU,CACxB,MAAM,EAAE,WAAW,GAAG,IAAI,EAC1B,OAAO,EAAE,OAAO,GACf,WAAW,GAAG,IAAI,CAMpB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,EAAE,CAIxD"}
@@ -2,15 +2,24 @@
2
2
  /**
3
3
  * @file privateAttributes/pressBox.stylex.ts
4
4
  * @input A control's box: the non-text part around its input and indicator
5
- * @output pressBoxProps, which marks the box, and pressBoxAt, which finds the
6
- * marked box that a press starts in
5
+ * @output pressBoxProps, which marks the box, pressBoxAt, which finds the
6
+ * marked box that a press starts in, and pressBoxesIn, which lists the
7
+ * marked boxes a surface owns
7
8
  * @position Owner module of the private press-box attribute: the only file
8
- * that writes its name. CheckboxInput and RadioListItem mark their boxes,
9
- * and utils/boxHold.ts reads the mark. No package entry exports it.
9
+ * that writes its name. CheckboxInput and RadioListItem mark their boxes.
10
+ * utils/boxHold.ts reads the mark. The press controller and the container
11
+ * rule give a surface that owns a box the fine-pointer press. No package
12
+ * entry exports it.
10
13
  */
11
14
 
12
15
  const PRESS_BOX = 'data-astryx-press-box';
13
16
 
17
+ /**
18
+ * The public pressable marker (utils/pressFeedback.ts PRESSABLE_ATTRIBUTE).
19
+ * The press controller imports this module, so this module cannot import it.
20
+ */
21
+ const PRESSABLE = '[data-astryx-pressable]';
22
+
14
23
  /** Spread on the box around a control's input and indicator. */
15
24
  export const pressBoxProps = {
16
25
  [PRESS_BOX]: ''
@@ -23,4 +32,12 @@ export function pressBoxAt(target, surface) {
23
32
  }
24
33
  const box = target.closest(`[${PRESS_BOX}]`);
25
34
  return box instanceof HTMLElement && surface.contains(box) ? box : null;
35
+ }
36
+
37
+ /**
38
+ * The marked boxes that `surface` owns: those inside it, with no other
39
+ * pressable surface between the two.
40
+ */
41
+ export function pressBoxesIn(surface) {
42
+ return Array.from(surface.querySelectorAll(`[${PRESS_BOX}]`)).filter(box => box.closest(PRESSABLE) === surface);
26
43
  }
@@ -0,0 +1,5 @@
1
+ /** Spread on a Token's remove button: marks it for a field holding tokens. */
2
+ export declare const tokenRemoveProps: Readonly<Record<string, string>>;
3
+ /** The token remove button at or around `target`, or null. */
4
+ export declare function removeControlOf(target: EventTarget | null): Element | null;
5
+ //# sourceMappingURL=tokenRemove.stylex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenRemove.stylex.d.ts","sourceRoot":"","sources":["../../src/privateAttributes/tokenRemove.stylex.ts"],"names":[],"mappings":"AAcA,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE7D,CAAC;AAEF,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,CAM1E"}
@@ -0,0 +1,25 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file privateAttributes/tokenRemove.stylex.ts
5
+ * @input Nothing
6
+ * @output tokenRemoveProps, which marks a Token's remove button, and
7
+ * removeControlOf, which finds that button from an event target
8
+ * @position Owner module of the private token-remove attribute: the only
9
+ * file that writes its name. Token marks its remove button; Tokenizer
10
+ * reads the mark. No package entry exports it.
11
+ */
12
+
13
+ const TOKEN_REMOVE = 'data-astryx-token-remove';
14
+
15
+ /** Spread on a Token's remove button: marks it for a field holding tokens. */
16
+ export const tokenRemoveProps = {
17
+ [TOKEN_REMOVE]: ''
18
+ };
19
+
20
+ /** The token remove button at or around `target`, or null. */
21
+ export function removeControlOf(target) {
22
+ // A node type check, not `instanceof`: a field in another document passes.
23
+ const node = target;
24
+ return node != null && node.nodeType === 1 ? node.closest(`[${TOKEN_REMOVE}]`) : null;
25
+ }
@@ -510,7 +510,6 @@ export interface DefinedTheme {
510
510
  /**
511
511
  * Component icon slot values with their functions, present when any value
512
512
  * is a function. Only component slot resolution reads it.
513
- * @internal
514
513
  */
515
514
  __componentIcons?: Partial<Record<string, StoredComponentIconValue>>;
516
515
  /** Indicator overrides for stateful control visuals, keyed by name */
@@ -1 +1 @@
1
- {"version":3,"file":"defineTheme.d.ts","sourceRoot":"","sources":["../../src/theme/defineTheme.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EACV,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAC,gBAAgB,EAAE,sBAAsB,EAAC,MAAM,eAAe,CAAC;AAE5E;;;;;GAKG;AACH,KAAK,gBAAgB,CAAC,OAAO,SAAS,MAAM,IAAI,OAAO,CACrD,MAAM,CAAC,QAAQ,GAAG,kBAAkB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAC1D,CAAC;AAEF;;;GAGG;AACH,KAAK,oBAAoB,CAAC,IAAI,IAAI,IAAI,SAAS,YAAY,GACvD,eAAe,SAAS,MAAM,IAAI,GAChC,IAAI,SAAS;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,CAAC,OAAO,EAAE,MAAM,OAAO,GAAG,IAAI,CAAA;CAAC,GACvE,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,GACxB,MAAM,GACR,MAAM,GACR,KAAK,CAAC;AAEV;;;GAGG;AACH,KAAK,gBAAgB,CACnB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,qFAAqF;AACrF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAehD,CAAC;AA2FF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,KAAK,CAAC,YAAY,SAAS,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,GAAG,SAAS,EACxE,IAAI,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EAEjD,KAAK,EAAE,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,GAC1C,oBAAoB,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CA6K5D;AA0GD,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,sBAAsB,CAAC;AAM9B,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAQpE"}
@@ -1,5 +1,8 @@
1
- /** The part of a window's performance timeline an input's age reads. */
2
- export type EventClock = Pick<Performance, 'now'>;
1
+ /**
2
+ * The part of a window's performance timeline an input's age reads, with
3
+ * the time origin that converts an epoch stamp.
4
+ */
5
+ export type EventClock = Pick<Performance, 'now' | 'timeOrigin'>;
3
6
  /**
4
7
  * The clock of the window that stamped an input: an event's `view`, or the
5
8
  * window of the node it landed on. A same-origin iframe's clock or a popup's
@@ -1 +1 @@
1
- {"version":3,"file":"inputAge.d.ts","sourceRoot":"","sources":["../../src/utils/inputAge.ts"],"names":[],"mappings":"AAcA,wEAAwE;AACxE,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAQ1D;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CACpB,KAAK,EAAE,UAAU,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAapB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAInE"}
1
+ {"version":3,"file":"inputAge.d.ts","sourceRoot":"","sources":["../../src/utils/inputAge.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,YAAY,CAAC,CAAC;AAEjE;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAQ1D;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CACpB,KAAK,EAAE,UAAU,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAapB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAInE"}
@@ -12,7 +12,10 @@
12
12
 
13
13
  import { isDocument, isNode } from "./nodeType.js";
14
14
 
15
- /** The part of a window's performance timeline an input's age reads. */
15
+ /**
16
+ * The part of a window's performance timeline an input's age reads, with
17
+ * the time origin that converts an epoch stamp.
18
+ */
16
19
 
17
20
  /**
18
21
  * The clock of the window that stamped an input: an event's `view`, or the
@@ -1 +1 @@
1
- {"version":3,"file":"pressFeedback.d.ts","sourceRoot":"","sources":["../../src/utils/pressFeedback.ts"],"names":[],"mappings":"AA6DA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,qDAAqD;AACrD,eAAO,MAAM,cAAc,EAAE;IAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,EAAE,CAAA;CA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AC,GAAG,IAAI,CAAC;IAC7C,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;CAC/B;AAID;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAElD;AAyBD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAWpD;AAkOD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAOlD;AAwgBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,IAAI,CA0BjD"}
@@ -22,10 +22,16 @@
22
22
  // costs one attribute write and no React render.
23
23
  //
24
24
  // Where the primary pointer is fine, the controller ignores the mouse and the
25
- // keyboard, and CSS `:active` keeps their press. Under a coarse primary
26
- // pointer the CSS drops `:active`, so the controller paints every press. A
27
- // mouse, trackpad or Space press paints at once. The controller reads the
28
- // same query as the stylesheet, so they agree.
25
+ // keyboard, and CSS `:active` keeps their press. A surface that owns a
26
+ // control's box (pressBox.stylex.ts), as a checkbox or a radio row does, is
27
+ // the exception. There the controller paints a mouse's or a pen's press at
28
+ // once and fades it on release, as it does a finger's. The surface's `:active`
29
+ // arm yields while it does. On a row, a press on a nested control is that
30
+ // control's: the row's container rule ends the row's paint
31
+ // (hooks/useClickableContainer.ts).
32
+ // Under a coarse primary pointer the CSS drops `:active`, so the controller
33
+ // paints every press. A mouse, trackpad or Space press paints at once. The
34
+ // controller reads the same query as the stylesheet, so they agree.
29
35
  //
30
36
  // A finger waits only inside a scroller. Outside one, a surface highlights in
31
37
  // the frame the finger lands, as a UIControl does. Inside one, it waits the
@@ -48,6 +54,8 @@ import { subscribeInput } from "./inputStream.js";
48
54
  import { isInsideScrollView } from "./scrollView.js";
49
55
  import { msSinceInput } from "./inputAge.js";
50
56
  import { TOUCH_QUERY } from "./touchPresentation.js";
57
+ import { pressBoxesIn } from "../privateAttributes/pressBox.stylex.js";
58
+ import { isPrimaryClick } from "./primaryClick.js";
51
59
  import { holdsPressThroughDrag } from "../privateAttributes/pressHoldsDrag.stylex.js";
52
60
  import { isTrackedByGroup } from "../privateAttributes/pressGroupItem.stylex.js";
53
61
 
@@ -414,6 +422,24 @@ function stylesheetDroppedActive() {
414
422
  return typeof window.matchMedia === 'function' && window.matchMedia(TOUCH_QUERY).matches;
415
423
  }
416
424
 
425
+ /**
426
+ * Whether the press on `target` lands on a surface that takes the
427
+ * fine-pointer press. There a mouse's or a pen's press paints at once, on any
428
+ * primary pointer.
429
+ */
430
+ function paintsFinePress(target) {
431
+ const surface = surfaceAt(target);
432
+ return surface != null && paintsFinePointerPress(surface);
433
+ }
434
+
435
+ /**
436
+ * Whether `surface` takes the fine-pointer press. It does when it owns a
437
+ * control's box.
438
+ */
439
+ function paintsFinePointerPress(surface) {
440
+ return pressBoxesIn(surface).length > 0;
441
+ }
442
+
417
443
  /**
418
444
  * The surface a mouse button's or the Space key's press paints, if any: the
419
445
  * innermost marked surface, outside a menu and off a tracked action. A key's
@@ -456,12 +482,25 @@ function pressButton(target, pointerId) {
456
482
  }));
457
483
  }
458
484
 
485
+ /**
486
+ * Whether a release on `element` ends at once. Under Reduce Motion a fine
487
+ * pointer's release changes at once, with no fade. This holds on a surface
488
+ * that takes the fine-pointer press, where the primary pointer is fine.
489
+ */
490
+ function releasesAtOnce(element) {
491
+ return paintsFinePointerPress(element) && !stylesheetDroppedActive() && typeof window.matchMedia === 'function' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
492
+ }
493
+
459
494
  /** The mouse button or the key came up: the press fades like a finger's. */
460
495
  function releaseButton() {
461
496
  holdKey(false);
462
497
  if (button.live == null) {
463
498
  return;
464
499
  }
500
+ if (releasesAtOnce(button.live.element)) {
501
+ cancelButton();
502
+ return;
503
+ }
465
504
  apply(button, pressGestureStep(button.live.gesture, {
466
505
  kind: 'up'
467
506
  }));
@@ -483,12 +522,19 @@ function onPointerDown(event) {
483
522
  // A mouse already has hover and keeps `:active` where the primary pointer
484
523
  // is fine; the touch treatment's CSS is inside `@media (pointer: coarse)`.
485
524
  // Not tracking it there keeps desktop identical and costs the mouse path
486
- // nothing. Only the primary button: that is the press `:active` paints.
487
- if (event.button === 0 && stylesheetDroppedActive()) {
525
+ // nothing, except on a surface that takes the fine-pointer press. Only
526
+ // the primary button paints, as `:active` does. On such a surface a
527
+ // macOS ctrl-click is a context click, so it paints nothing either.
528
+ if (stylesheetDroppedActive() ? event.button === 0 : isPrimaryClick(event) && paintsFinePress(event.target)) {
488
529
  pressButton(event.target, event.pointerId);
489
530
  }
490
531
  return;
491
532
  }
533
+ // On a surface that takes the fine-pointer press, a pen's barrel or eraser
534
+ // button is not a press.
535
+ if (event.pointerType === 'pen' && !isPrimaryClick(event) && paintsFinePress(event.target)) {
536
+ return;
537
+ }
492
538
  armTouchCancel();
493
539
  // A second finger or a new press ends the last box contact; its lift is not
494
540
  // a still lift.
@@ -508,11 +554,15 @@ function onPointerDown(event) {
508
554
  finish(finger);
509
555
  }
510
556
  const element = surfaceAt(event.target);
557
+ // On a surface that takes the fine-pointer press, a pen presses at once on
558
+ // any primary pointer, in a scroll view too. The delay and the brake wait
559
+ // out a finger's scroll.
560
+ const presentsAtOnce = event.pointerType === 'pen' && element != null && paintsFinePointerPress(element);
511
561
  // The touch clock is stamped AFTER the brake reads it, deliberately: the
512
562
  // question the brake asks is whether a PREVIOUS finger could still be
513
563
  // driving this scroll, and stamping first would make every first touch on a
514
564
  // freshly restored page answer yes.
515
- const braking = element != null && scrollerIsBraking(element);
565
+ const braking = element != null && !presentsAtOnce && scrollerIsBraking(element);
516
566
  lastTouchAt = Date.now();
517
567
  lastTouchTarget = event.target instanceof Node ? event.target : null;
518
568
  // A group's tracker that follows this pointer paints its action, so two
@@ -545,7 +595,7 @@ function onPointerDown(event) {
545
595
  kind: 'down',
546
596
  x: event.clientX,
547
597
  y: event.clientY,
548
- delayed: isInsideScrollView(element)
598
+ delayed: !presentsAtOnce && isInsideScrollView(element)
549
599
  }), msSinceInput(event.timeStamp, event));
550
600
  }
551
601
  function onPointerMove(event) {
@@ -590,8 +640,9 @@ function onPointerUp(event) {
590
640
  if (live == null || live.pointerId != null && event.pointerId !== live.pointerId) {
591
641
  return;
592
642
  }
643
+ const step = event.pointerType === 'pen' && releasesAtOnce(live.element) ? 'cancel' : 'up';
593
644
  apply(finger, pressGestureStep(live.gesture, {
594
- kind: 'up'
645
+ kind: step
595
646
  }));
596
647
  releaseIfDead(finger);
597
648
  }
package/locales/en.json CHANGED
@@ -1216,11 +1216,11 @@
1216
1216
  "description": "Screen-reader-only live-region alert in DateInput / DateTimeInput when the typed text cannot be read as a date. Text the field cannot finish, such as a one-digit year, stays on Enter or blur and shows this message as the field status."
1217
1217
  },
1218
1218
  "@astryx.dateInput.nonexistentDate": {
1219
- "defaultMessage": "This date does not exist in the {calendar}",
1220
- "description": "Error in DateInput / DateTimeInput, shown below the field and announced, when the typed date is readable but the calendar does not have it, such as 30 Esfand in a common Persian year or February 30. {calendar} is the calendar's localized name from the platform, such as \"Persian Calendar\" or \"Gregorian Calendar\"."
1219
+ "defaultMessage": "{named, select, yes {Enter a real date ({calendar})} other {Enter a real date}}",
1220
+ "description": "Error in DateInput / DateTimeInput, shown below the field and announced, when the typed date is readable but the calendar does not have it, such as February 30 or 30 Esfand in a common Persian year. Ask for a date that exists, in plain words. `named` is `yes` when the field's calendar differs from the app's calendar, and then {calendar} is the calendar's localized name from the platform, such as \"Persian Calendar\"; keep it in parentheses, because the name is a standalone form that may not fit inside a sentence."
1221
1221
  },
1222
1222
  "@astryx.dateInput.outOfRangeDate": {
1223
- "defaultMessage": "{bounds, select, both {Enter a date from {min} to {max}} min {Enter a date on or after {min}} max {Enter a date on or before {max}} other {This date is not available}}",
1223
+ "defaultMessage": "{bounds, select, both {Enter a date from {min} to {max}} min {Enter a date on or after {min}} max {Enter a date on or before {max}} other {Enter an available date}}",
1224
1224
  "description": "Error in DateInput / DateTimeInput, shown below the field and announced, when the typed date is outside the allowed range. {min} and {max} are the bounds, written as dates in the field's calendar. `bounds` is `both`, `min`, or `max` for a date outside those bounds, and `other` for a date that a custom rule rejects."
1225
1225
  },
1226
1226
  "@astryx.dateInput.formatHint": {
@@ -912,10 +912,10 @@
912
912
  "defaultMessage": "⟦Íñṽàłíð ðàţé⟧"
913
913
  },
914
914
  "@astryx.dateInput.nonexistentDate": {
915
- "defaultMessage": "⟦Ţĥíš ðàţé ðóéš ñóţ éẋíšţ íñ ţĥé {calendar}⟧"
915
+ "defaultMessage": "⟦{named, select, yes {Enter a real date ({calendar})} other {Enter a real date}}⟧"
916
916
  },
917
917
  "@astryx.dateInput.outOfRangeDate": {
918
- "defaultMessage": "⟦{bounds, select, both {Enter a date from {min} to {max}} min {Enter a date on or after {min}} max {Enter a date on or before {max}} other {This date is not available}}⟧"
918
+ "defaultMessage": "⟦{bounds, select, both {Enter a date from {min} to {max}} min {Enter a date on or after {min}} max {Enter a date on or before {max}} other {Enter an available date}}⟧"
919
919
  },
920
920
  "@astryx.dateInput.formatHint": {
921
921
  "defaultMessage": "⟦é.ĝ., {example}⟧"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/core",
3
- "version": "0.7.14",
3
+ "version": "0.7.15-canary.g79b95eb",
4
4
  "displayName": "Astryx Core",
5
5
  "description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
6
6
  "author": "Meta Open Source",
@@ -920,6 +920,9 @@
920
920
  "react-dom": ">=19.0.0"
921
921
  },
922
922
  "devDependencies": {
923
+ "@astryxdesign/a11y-spec": "0.7.15-canary.g79b95eb",
924
+ "@astryxdesign/cli": "0.7.15-canary.g79b95eb",
925
+ "@astryxdesign/interaction-harness": "0.7.15-canary.g79b95eb",
923
926
  "@babel/cli": "^7.29.7",
924
927
  "@babel/core": "^7.29.7",
925
928
  "@babel/preset-react": "^7.29.7",
@@ -931,10 +934,7 @@
931
934
  "@testing-library/react": "^16.3.3",
932
935
  "@types/babel__core": "^7.20.5",
933
936
  "tailwindcss": "^4.3.2",
934
- "temporal-polyfill": "^1.0.6",
935
- "@astryxdesign/a11y-spec": "0.0.0",
936
- "@astryxdesign/cli": "0.7.14",
937
- "@astryxdesign/interaction-harness": "0.0.0"
937
+ "temporal-polyfill": "^1.0.6"
938
938
  },
939
939
  "dependencies": {
940
940
  "intl-messageformat": "^11.2.9"
@@ -45,6 +45,7 @@ import {
45
45
  plainDateToISO,
46
46
  plainDateToDate,
47
47
  plainDateAddDays,
48
+ plainDateDayOfWeek,
48
49
  plainDateDiffDays,
49
50
  plainDateIsAfter,
50
51
  plainDateIsBefore,
@@ -273,6 +274,15 @@ function formatDateLabel(
273
274
  return formatCalendarDate(calendar, date, DATE_FORMAT_WITH_WEEKDAY, locale);
274
275
  }
275
276
 
277
+ /**
278
+ * ISO 8601 numbers a week by its Thursday. For any week start, the row's
279
+ * Thursday is in the ISO week that holds most of the row's days.
280
+ */
281
+ function rowThursday(week: ReadonlyArray<CalendarDay>): PlainDate {
282
+ const first = week[0].date;
283
+ return plainDateAddDays(first, (4 - plainDateDayOfWeek(first) + 7) % 7);
284
+ }
285
+
276
286
  // =============================================================================
277
287
  // Main Component
278
288
  // =============================================================================
@@ -1208,7 +1218,7 @@ function MonthGrid({
1208
1218
 
1209
1219
  {weeks.map(week => {
1210
1220
  const weekDate = week.find(d => !d.isOutside)?.date || week[0].date;
1211
- const weekNum = plainDateGetWeekNumber(weekDate);
1221
+ const weekNum = plainDateGetWeekNumber(rowThursday(week));
1212
1222
 
1213
1223
  return (
1214
1224
  <div
@@ -47,9 +47,9 @@ export interface InitialFocusDateOptions {
47
47
  /**
48
48
  * Picks the date whose month the calendar opens on.
49
49
  *
50
- * An explicit `focusDate` wins, then the selected value — both are the
51
- * consumer's own instruction about where to look, so neither is second-guessed
52
- * against `min`/`max`.
50
+ * An explicit `focusDate` wins and is never second-guessed: it names the first
51
+ * pane outright. Then the selected value — its month is shown even when it lies
52
+ * outside `min`/`max`.
53
53
  *
54
54
  * Otherwise the calendar opens on today, clamped into the `min`/`max` window,
55
55
  * or returns `null` while today is not known yet.
@@ -62,6 +62,11 @@ export interface InitialFocusDateOptions {
62
62
  * month instead — with `numberOfMonths={2}` opening on `[max, max + 1]` would
63
63
  * spend half the calendar on a month that is entirely out of bounds. That
64
64
  * shift never crosses `min`'s month.
65
+ *
66
+ * The same shift applies when the value or today is inside the window but in
67
+ * `max`'s month (`max` set to today is the common case): the month stays in
68
+ * view, in the last pane, and the panes before it show months that still have
69
+ * selectable days.
65
70
  */
66
71
  export function getInitialFocusDate(
67
72
  options: InitialFocusDateOptions,
@@ -80,8 +85,17 @@ export function getInitialFocusDate(
80
85
  return plainDateFromISO(focusDate);
81
86
  }
82
87
 
88
+ const minDate = min ? plainDateFromISO(min) : null;
89
+ const maxDate = max ? plainDateFromISO(max) : null;
90
+
83
91
  if (value) {
84
- return plainDateFromISO(typeof value === 'string' ? value : value.start);
92
+ return keepLastPaneWithinMax(
93
+ plainDateFromISO(typeof value === 'string' ? value : value.start),
94
+ minDate,
95
+ maxDate,
96
+ numberOfMonths,
97
+ calendar,
98
+ );
85
99
  }
86
100
 
87
101
  // Without a focus date or a value the month follows today, which is not
@@ -90,9 +104,6 @@ export function getInitialFocusDate(
90
104
  return null;
91
105
  }
92
106
 
93
- const minDate = min ? plainDateFromISO(min) : null;
94
- const maxDate = max ? plainDateFromISO(max) : null;
95
-
96
107
  if (minDate && plainDateIsBefore(today, minDate)) {
97
108
  return minDate;
98
109
  }
@@ -113,5 +124,56 @@ export function getInitialFocusDate(
113
124
  return shifted;
114
125
  }
115
126
 
116
- return today;
127
+ return keepLastPaneWithinMax(
128
+ today,
129
+ minDate,
130
+ maxDate,
131
+ numberOfMonths,
132
+ calendar,
133
+ );
134
+ }
135
+
136
+ /**
137
+ * Moves the opening month back when `date`'s month is shown but a later pane
138
+ * would lie wholly past `max`: the last pane lands on `max`'s month, and the
139
+ * first pane never goes before `min`'s month. A date whose panes already end
140
+ * by `max`'s month, or whose own month is past `max`'s, is returned unchanged,
141
+ * so its month always stays in view.
142
+ */
143
+ function keepLastPaneWithinMax(
144
+ date: PlainDate,
145
+ minDate: PlainDate | null,
146
+ maxDate: PlainDate | null,
147
+ numberOfMonths: number,
148
+ calendar: CalendarSystem,
149
+ ): PlainDate {
150
+ const lastPaneOffset = Math.max(0, numberOfMonths - 1);
151
+ if (maxDate == null || lastPaneOffset === 0) {
152
+ return date;
153
+ }
154
+
155
+ const month = calendarMonthOf(calendar, date).start;
156
+ const maxMonth = calendarMonthOf(calendar, maxDate);
157
+ const latestFirstPane = calendarAddMonths(
158
+ calendar,
159
+ maxMonth,
160
+ -lastPaneOffset,
161
+ ).start;
162
+ if (
163
+ !plainDateIsAfter(month, latestFirstPane) ||
164
+ plainDateIsAfter(month, maxMonth.start)
165
+ ) {
166
+ return date;
167
+ }
168
+
169
+ if (minDate == null) {
170
+ return latestFirstPane;
171
+ }
172
+ const minMonth = calendarMonthOf(calendar, minDate).start;
173
+ if (!plainDateIsBefore(latestFirstPane, minMonth)) {
174
+ return latestFirstPane;
175
+ }
176
+ // `min` is closer than the full shift: go back only as far as its month,
177
+ // and not at all when the date's own month is already there or earlier.
178
+ return plainDateIsAfter(month, minMonth) ? minDate : date;
117
179
  }
@@ -155,10 +155,17 @@ export const docs = {
155
155
  {
156
156
  name: '--_indicator-press-image',
157
157
  description:
158
- "The row's touch press image, handed down to a first-party indicator that paints its own press. Set from the press paint only while the row itself is pressed, or, under a CheckboxList row that owns the press, from that row's press paint. Only this row declares it.",
158
+ "The row's press image, handed down to a first-party indicator that paints its own press. Set from the press paint only while the row itself is pressed, or, under a CheckboxList row that owns the press, from that row's press paint. Only this row declares it.",
159
159
  default: 'none',
160
160
  private: true,
161
161
  },
162
+ {
163
+ name: '--_indicator-active-press',
164
+ description:
165
+ "Transparent while the press controller paints the row's press, and always under a CheckboxList row that owns the press, so a first-party indicator that paints its own press draws no `:active` fill under the press image. Only this row declares it.",
166
+ default: 'var(--color-overlay-pressed)',
167
+ private: true,
168
+ },
162
169
  ],
163
170
  },
164
171
  usage: {
@@ -404,10 +411,17 @@ export const docsZh = {
404
411
  {
405
412
  name: '--_indicator-press-image',
406
413
  description:
407
- '复选框行的触摸按下图像,传递给自行绘制按下效果的第一方指示器。仅在该行自身被按下时根据按下涂层设置;在拥有按下效果的 CheckboxList 行中,取该行的按下涂层。只有该行声明它。',
414
+ '复选框行的按下图像,传递给自行绘制按下效果的第一方指示器。仅在该行自身被按下时根据按下涂层设置;在拥有按下效果的 CheckboxList 行中,取该行的按下涂层。只有该行声明它。',
408
415
  default: 'none',
409
416
  private: true,
410
417
  },
418
+ {
419
+ name: '--_indicator-active-press',
420
+ description:
421
+ '按下控制器绘制该行的按下效果时为透明;在拥有按下效果的 CheckboxList 行中始终为透明。因此自行绘制按下效果的第一方指示器不会在按下图像下方再绘制 `:active` 填充。只有该行声明它。',
422
+ default: 'var(--color-overlay-pressed)',
423
+ private: true,
424
+ },
411
425
  ],
412
426
  },
413
427
  };