@n-uf/placement 26.11.37 → 26.11.39
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.
- package/CHANGELOG.md +50 -0
- package/README.md +35 -3
- package/dist/chunk-2IZ6JZV5.js +9 -0
- package/dist/chunk-2IZ6JZV5.js.map +1 -0
- package/dist/{chunk-2PWDUBPG.js → chunk-US2TGS3W.js} +126 -41
- package/dist/chunk-US2TGS3W.js.map +1 -0
- package/dist/desk.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/{model-CuE-ML-f.d.ts → model-gUF8juqt.d.ts} +34 -5
- package/dist/panels.d.ts +3 -3
- package/dist/scene-cases.d.ts +17 -9
- package/dist/scene-cases.js +40 -6
- package/dist/scene-cases.js.map +1 -1
- package/dist/scene.d.ts +16 -5
- package/dist/scene.js +3 -1
- package/dist/stack.d.ts +1 -1
- package/dist/target-Db9z1bWt.d.ts +50 -0
- package/dist/{targets-DnVNZVQW.d.ts → targets-CYs16P4K.d.ts} +1 -1
- package/dist/targets.d.ts +2 -2
- package/dist/tiling.d.ts +1 -1
- package/package.json +2 -2
- package/dist/chunk-2PWDUBPG.js.map +0 -1
- package/dist/target-fhD5UVlt.d.ts +0 -27
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { R as Rect } from './geometry-Bf37LbCT.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A drop target in the shape @n-uf/motion/drag takes: an id, a priority (1 most precise: a rail or a tab strip;
|
|
5
|
-
* 2 a slot; 3 a broad area such as floating anywhere), the zone the pointer hits, and optionally where the item
|
|
6
|
-
* lands, a label and whether it lands freely (no room is made for it). `hits`, when given, is the whole zone as several
|
|
7
|
-
* rects (a zone that isn't one rect), `hit` the largest of them: the pointer is in the zone when it is in any of them.
|
|
8
|
-
* `arm: "dwell"` marks a spring-loaded target (the drag intent arms it once the pointer dwells in it), `armedHit` its
|
|
9
|
-
* zone once armed.
|
|
10
|
-
*/
|
|
11
|
-
interface Target {
|
|
12
|
-
readonly id: string;
|
|
13
|
-
readonly priority: 1 | 2 | 3;
|
|
14
|
-
readonly hit: Rect;
|
|
15
|
-
readonly hits?: readonly Rect[];
|
|
16
|
-
/** Spring-loaded: no target until the pointer dwells in it. */
|
|
17
|
-
readonly arm?: "dwell";
|
|
18
|
-
/** Its zone once armed (the strip grown by its magnet). */
|
|
19
|
-
readonly armedHit?: Rect;
|
|
20
|
-
readonly slot?: Rect;
|
|
21
|
-
readonly label?: string;
|
|
22
|
-
readonly free?: boolean;
|
|
23
|
-
/** A refusal, not a target: it takes part in the pick under the pointer, but nothing lands on it (`refusalTargets`). */
|
|
24
|
-
readonly refuse?: true;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type { Target as T };
|