@truelab/truelogic 4.3.3 → 4.4.0-1

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.
@@ -12,6 +12,9 @@ import { ForwardedRef, RefObject } from 'react';
12
12
  * is clickable (has a click handler of its own, or `cursor: pointer`); a document-level listener
13
13
  * alone does not make it so. A `click` caller keeps its outside area clickable — the modal scrims
14
14
  * carry `cursor-pointer` for exactly this.
15
+ *
16
+ * A `click` ends a press, and only a press begun after the enabling counts: a spin held while a
17
+ * modal opens (the round error arrives, there are no funds) must not close it with the release.
15
18
  */
16
19
  export type TClickOutsideEvent = 'pointerdown' | 'click';
17
20
  export declare const useClickOutside: (refs: (RefObject<HTMLElement> | ForwardedRef<HTMLElement>)[], onClick: (event: MouseEvent | TouchEvent) => void, isEnabled?: boolean, eventName?: TClickOutsideEvent) => void;
@@ -20,7 +20,8 @@ type THoldOptions = {
20
20
  * One held state for a control pressed with a pointer (attach `onPointerDown` to it) or with
21
21
  * hotkeys. The press fires `onPress`, a hold of `holdDelay` fires `onHold`, the release — pointerup
22
22
  * or pointercancel anywhere in the document, keyup, window blur — fires `onRelease`. The latest
23
- * press owns the hold: a second finger or key takes over instead of piling up. `isHeld` paints the
23
+ * press owns the hold: a second finger or key takes over instead of piling up. A key pressed before
24
+ * the hook got enabled (mounted) is not a press of this control. `isHeld` paints the
24
25
  * control; it comes from the events themselves, not from `:active`, which Blink sets for a touch
25
26
  * too late for a quick tap to show.
26
27
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truelab/truelogic",
3
- "version": "4.3.3",
3
+ "version": "4.4.0-1",
4
4
  "description": "",
5
5
  "main": "./dist/truelogic.min.js",
6
6
  "types": "./dist/types/src/index.d.ts",