@n-uf/placement 26.11.63 → 26.11.64

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 CHANGED
@@ -5,6 +5,14 @@ Versions are calendar versions, `YY.M.R` (year, month of the release, counter wi
5
5
 
6
6
  Unreleased entries live in `changes/` until a release joins them.
7
7
 
8
+ ## 26.11.64
9
+
10
+ - Root: `distance(r, p)`, how far a point lies from a rect (0 inside or on its edge, else the straight line to its
11
+ nearest point), and `nearestWithin(rects, p, reach)`, the key of the rect nearest a point within `reach` px of its
12
+ nearest edge, or null. A rect holding the point wins; equal distances (within `EPS`) go to the first in the map's
13
+ order; a `reach` under 0 or NaN is a plain hit test; a point with a non-finite coordinate picks nothing. For hit
14
+ bands around thin controls, such as a touch target around a rail.
15
+
8
16
  ## 26.11.63
9
17
 
10
18
  No changes in `@n-uf/placement`. Released in step with `@n-uf/motion` and `@n-uf/docking`, which share the version.
@@ -13,6 +13,19 @@ var area = (r) => Math.max(0, r.width) * Math.max(0, r.height);
13
13
  var overlaps = (a, b, eps = EPS) => Math.min(a.x + a.width, b.x + b.width) - Math.max(a.x, b.x) > eps && Math.min(a.y + a.height, b.y + b.height) - Math.max(a.y, b.y) > eps;
14
14
  var contains = (r, p, eps = EPS) => p.x >= r.x - eps && p.x <= r.x + r.width + eps && p.y >= r.y - eps && p.y <= r.y + r.height + eps;
15
15
  var clamp = (v, lo, hi) => Math.min(Math.max(v, lo), Math.max(lo, hi));
16
+ var distance = (r, p) => Math.hypot(p.x - clamp(p.x, r.x, r.x + r.width), p.y - clamp(p.y, r.y, r.y + r.height));
17
+ function nearestWithin(rects, p, reach) {
18
+ if (!Number.isFinite(p.x) || !Number.isFinite(p.y)) return null;
19
+ const limit = reach > 0 ? reach : 0;
20
+ let least = Number.POSITIVE_INFINITY;
21
+ for (const r of rects.values()) {
22
+ const d = distance(r, p);
23
+ if (d < least) least = d;
24
+ }
25
+ if (!(least <= limit + EPS)) return null;
26
+ for (const [key, r] of rects) if (distance(r, p) <= least + EPS) return key;
27
+ return null;
28
+ }
16
29
  function subtract(r, cut) {
17
30
  if (!overlaps(r, cut)) return [r];
18
31
  const right = r.x + r.width;
@@ -38,6 +51,8 @@ export {
38
51
  overlaps,
39
52
  contains,
40
53
  clamp,
54
+ distance,
55
+ nearestWithin,
41
56
  subtract
42
57
  };
43
- //# sourceMappingURL=chunk-2UVUFEBP.js.map
58
+ //# sourceMappingURL=chunk-FRM6SDU2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/geometry.ts"],"sourcesContent":["/**\n * The shapes every entry shares. Plain data: a rect is a top-left corner and a size, in whatever px the consumer\n * lays out in (stage, window or host coordinates). The same shape as @n-uf/motion's, so the two compose without\n * either importing the other.\n */\n\nexport interface Rect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface Size {\n readonly width: number;\n readonly height: number;\n}\n\nexport interface Point {\n readonly x: number;\n readonly y: number;\n}\n\nexport const rect = (x: number, y: number, width: number, height: number): Rect => ({ x, y, width, height });\n\n/** The area two rects share (0 when apart). */\nexport const overlap = (a: Rect, b: Rect): number =>\n Math.max(0, Math.min(a.x + a.width, b.x + b.width) - Math.max(a.x, b.x)) * Math.max(0, Math.min(a.y + a.height, b.y + b.height) - Math.max(a.y, b.y));\n\n/** `r` moved (not resized) to lie inside `area`; one larger than the area keeps its top-left corner on the area's. */\nexport const clampInto = (r: Rect, area: Rect): Rect => ({\n ...r,\n x: Math.min(Math.max(r.x, area.x), Math.max(area.x, area.x + area.width - r.width)),\n y: Math.min(Math.max(r.y, area.y), Math.max(area.y, area.y + area.height - r.height)),\n});\n\n/** The center of a rect. */\nexport const center = (r: Rect): Point => ({ x: r.x + r.width / 2, y: r.y + r.height / 2 });\n\n/** The tolerance the geometry compares with, px. */\nexport const EPS = 1e-6;\n\n/** A rect that covers any point a page can see (a float target's hit). */\nexport const PLANE: Rect = rect(-1e9, -1e9, 2e9, 2e9);\n\n/** A rect's area (a negative side counts as 0). */\nexport const area = (r: Rect): number => Math.max(0, r.width) * Math.max(0, r.height);\n\n/** Whether two rects share more than `eps` each way (touching edges don't overlap). */\nexport const overlaps = (a: Rect, b: Rect, eps = EPS): boolean =>\n Math.min(a.x + a.width, b.x + b.width) - Math.max(a.x, b.x) > eps && Math.min(a.y + a.height, b.y + b.height) - Math.max(a.y, b.y) > eps;\n\n/** Whether `p` lies in `r`, its edges included (within `eps`). */\nexport const contains = (r: Rect, p: Point, eps = EPS): boolean => p.x >= r.x - eps && p.x <= r.x + r.width + eps && p.y >= r.y - eps && p.y <= r.y + r.height + eps;\n\n/** `v` within `lo..hi` (`lo` wins when `hi` is under it). */\nexport const clamp = (v: number, lo: number, hi: number): number => Math.min(Math.max(v, lo), Math.max(lo, hi));\n\n/**\n * How far `p` lies from `r`, px: 0 inside it or on its edge, else the straight-line distance to its nearest point.\n * The scalar sibling of `contains`. A negative width or height counts as 0 and keeps the top-left corner (the rect is\n * then a segment or a point at `x`, `y`); a NaN in either argument gives NaN.\n */\nexport const distance = (r: Rect, p: Point): number =>\n Math.hypot(p.x - clamp(p.x, r.x, r.x + r.width), p.y - clamp(p.y, r.y, r.y + r.height));\n\n/**\n * The key of the rect nearest `p` within `reach` px of the rect's nearest edge, or null when none lies that close: a\n * hit test among competing targets, by `distance`. A rect holding the point (edges included) has distance 0, so it\n * beats every rect outside it; a rect exactly `reach` away still counts. Distances within `EPS` of the least tie, and\n * the first of them in the map's order wins, so the caller ranks by insertion order. A `reach` under 0 or NaN is 0 (a\n * plain hit test); `Infinity` gives the nearest rect at all. A point with a non-finite coordinate gives null, and a\n * rect with a NaN field is skipped.\n */\nexport function nearestWithin<K>(rects: ReadonlyMap<K, Rect>, p: Point, reach: number): K | null {\n if (!Number.isFinite(p.x) || !Number.isFinite(p.y)) return null;\n const limit = reach > 0 ? reach : 0;\n let least = Number.POSITIVE_INFINITY;\n for (const r of rects.values()) {\n const d = distance(r, p);\n if (d < least) least = d;\n }\n if (!(least <= limit + EPS)) return null;\n for (const [key, r] of rects) if (distance(r, p) <= least + EPS) return key;\n return null;\n}\n\n/** `r` less `cut`, as disjoint rects: the parts beside the cut whole, then above and below it within its width. */\nexport function subtract(r: Rect, cut: Rect): Rect[] {\n if (!overlaps(r, cut)) return [r];\n const right = r.x + r.width;\n const bottom = r.y + r.height;\n const x0 = Math.max(r.x, cut.x);\n const x1 = Math.min(right, cut.x + cut.width);\n return [\n rect(r.x, r.y, x0 - r.x, r.height),\n rect(x1, r.y, right - x1, r.height),\n rect(x0, r.y, x1 - x0, Math.min(bottom, cut.y) - r.y),\n rect(x0, Math.max(r.y, cut.y + cut.height), x1 - x0, bottom - Math.max(r.y, cut.y + cut.height)),\n ].filter((p) => area(p) > EPS);\n}\n"],"mappings":";AAuBO,IAAM,OAAO,CAAC,GAAW,GAAW,OAAe,YAA0B,EAAE,GAAG,GAAG,OAAO,OAAO;AAGnG,IAAM,UAAU,CAAC,GAAS,MAC/B,KAAK,IAAI,GAAG,KAAK,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,KAAK,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;AAG/I,IAAM,YAAY,CAAC,GAASA,WAAsB;AAAA,EACvD,GAAG;AAAA,EACH,GAAG,KAAK,IAAI,KAAK,IAAI,EAAE,GAAGA,MAAK,CAAC,GAAG,KAAK,IAAIA,MAAK,GAAGA,MAAK,IAAIA,MAAK,QAAQ,EAAE,KAAK,CAAC;AAAA,EAClF,GAAG,KAAK,IAAI,KAAK,IAAI,EAAE,GAAGA,MAAK,CAAC,GAAG,KAAK,IAAIA,MAAK,GAAGA,MAAK,IAAIA,MAAK,SAAS,EAAE,MAAM,CAAC;AACtF;AAGO,IAAM,SAAS,C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;AACnB,aAAW,KAAK,MAAM,OAAO,GAAG;AAC9B,UAAM,IAAI,SAAS,GAAG,CAAC;AACvB,QAAI,IAAI,MAAO,SAAQ;AAAA,EACzB;AACA,MAAI,EAAE,SAAS,QAAQ,KAAM,QAAO;AACpC,aAAW,CAAC,KAAK,CAAC,KAAK,MAAO,KAAI,SAAS,GAAG,CAAC,KAAK,QAAQ,IAAK,QAAO;AACxE,SAAO;AACT;AAGO,SAAS,SAAS,GAAS,KAAmB;AACnD,MAAI,CAAC,SAAS,GAAG,GAAG,EAAG,QAAO,CAAC,CAAC;AAChC,QAAM,QAAQ,EAAE,IAAI,EAAE;AACtB,QAAM,SAAS,EAAE,IAAI,EAAE;AACvB,QAAM,KAAK,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC;AAC9B,QAAM,KAAK,KAAK,IAAI,OAAO,IAAI,IAAI,IAAI,KAAK;AAC5C,SAAO;AAAA,IACL,KAAK,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,MAAM;AAAA,IACjC,KAAK,IAAI,EAAE,GAAG,QAAQ,IAAI,EAAE,MAAM;AAAA,IAClC,KAAK,IAAI,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;AAAA,IACpD,KAAK,IAAI,KAAK,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,MAAM,GAAG,KAAK,IAAI,SAAS,KAAK,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,MAAM,CAAC;AAAA,EACjG,EAAE,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,GAAG;AAC/B;","names":["area"]}
@@ -36,7 +36,22 @@ declare const overlaps: (a: Rect, b: Rect, eps?: number) => boolean;
36
36
  declare const contains: (r: Rect, p: Point, eps?: number) => boolean;
37
37
  /** `v` within `lo..hi` (`lo` wins when `hi` is under it). */
38
38
  declare const clamp: (v: number, lo: number, hi: number) => number;
39
+ /**
40
+ * How far `p` lies from `r`, px: 0 inside it or on its edge, else the straight-line distance to its nearest point.
41
+ * The scalar sibling of `contains`. A negative width or height counts as 0 and keeps the top-left corner (the rect is
42
+ * then a segment or a point at `x`, `y`); a NaN in either argument gives NaN.
43
+ */
44
+ declare const distance: (r: Rect, p: Point) => number;
45
+ /**
46
+ * The key of the rect nearest `p` within `reach` px of the rect's nearest edge, or null when none lies that close: a
47
+ * hit test among competing targets, by `distance`. A rect holding the point (edges included) has distance 0, so it
48
+ * beats every rect outside it; a rect exactly `reach` away still counts. Distances within `EPS` of the least tie, and
49
+ * the first of them in the map's order wins, so the caller ranks by insertion order. A `reach` under 0 or NaN is 0 (a
50
+ * plain hit test); `Infinity` gives the nearest rect at all. A point with a non-finite coordinate gives null, and a
51
+ * rect with a NaN field is skipped.
52
+ */
53
+ declare function nearestWithin<K>(rects: ReadonlyMap<K, Rect>, p: Point, reach: number): K | null;
39
54
  /** `r` less `cut`, as disjoint rects: the parts beside the cut whole, then above and below it within its width. */
40
55
  declare function subtract(r: Rect, cut: Rect): Rect[];
41
56
 
42
- export { EPS as E, type Point as P, type Rect as R, type Size as S, PLANE as a, area as b, center as c, clamp as d, clampInto as e, contains as f, overlaps as g, overlap as o, rect as r, subtract as s };
57
+ export { EPS as E, type Point as P, type Rect as R, type Size as S, PLANE as a, area as b, center as c, clamp as d, clampInto as e, contains as f, distance as g, overlaps as h, nearestWithin as n, overlap as o, rect as r, subtract as s };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as Rect } from './geometry-L5gCoiZV.js';
2
- export { E as EPS, a as PLANE, P as Point, S as Size, b as area, c as center, d as clamp, e as clampInto, f as contains, o as overlap, g as overlaps, r as rect, s as subtract } from './geometry-L5gCoiZV.js';
1
+ import { R as Rect } from './geometry-DfdGE_AL.js';
2
+ export { E as EPS, a as PLANE, P as Point, S as Size, b as area, c as center, d as clamp, e as clampInto, f as contains, g as distance, n as nearestWithin, o as overlap, h as overlaps, r as rect, s as subtract } from './geometry-DfdGE_AL.js';
3
3
  export { A as Axis, S as Side } from './side-zvoEwBLn.js';
4
4
 
5
5
  /**
package/dist/index.js CHANGED
@@ -6,11 +6,13 @@ import {
6
6
  clamp,
7
7
  clampInto,
8
8
  contains,
9
+ distance,
10
+ nearestWithin,
9
11
  overlap,
10
12
  overlaps,
11
13
  rect,
12
14
  subtract
13
- } from "./chunk-2UVUFEBP.js";
15
+ } from "./chunk-FRM6SDU2.js";
14
16
  export {
15
17
  EPS,
16
18
  PLANE,
@@ -19,6 +21,8 @@ export {
19
21
  clamp,
20
22
  clampInto,
21
23
  contains,
24
+ distance,
25
+ nearestWithin,
22
26
  overlap,
23
27
  overlaps,
24
28
  rect,
package/dist/popup.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { P as Point, R as Rect, S as Size } from './geometry-L5gCoiZV.js';
1
+ import { P as Point, R as Rect, S as Size } from './geometry-DfdGE_AL.js';
2
2
 
3
3
  /**
4
4
  * @n-uf/placement/popup: placing a popup (a drop label, a menu, a tooltip) the way Wayland's xdg-positioner does: an
package/dist/stack.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { R as Rect } from './geometry-L5gCoiZV.js';
1
+ import { R as Rect } from './geometry-DfdGE_AL.js';
2
2
  import { S as Side } from './side-zvoEwBLn.js';
3
3
 
4
4
  /**
package/dist/stack.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  overlap,
5
5
  overlaps,
6
6
  rect
7
- } from "./chunk-2UVUFEBP.js";
7
+ } from "./chunk-FRM6SDU2.js";
8
8
 
9
9
  // src/stack/cut.ts
10
10
  var px = (x) => typeof x === "number" && Number.isFinite(x) ? Math.max(0, x) : 0;
package/dist/tiling.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { R as Rect, S as Size, P as Point } from './geometry-L5gCoiZV.js';
1
+ import { R as Rect, S as Size, P as Point } from './geometry-DfdGE_AL.js';
2
2
  import { S as Side, A as Axis } from './side-zvoEwBLn.js';
3
3
  import { Target } from './index.js';
4
4
 
package/dist/tiling.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  clamp,
4
4
  contains,
5
5
  overlap
6
- } from "./chunk-2UVUFEBP.js";
6
+ } from "./chunk-FRM6SDU2.js";
7
7
 
8
8
  // src/tiling/order.ts
9
9
  var masterRatio = (v) => v === void 0 || !Number.isFinite(v) ? 0.5 : Math.min(0.95, Math.max(0.05, v));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n-uf/placement",
3
- "version": "26.11.63",
3
+ "version": "26.11.64",
4
4
  "description": "Where things fit: the stage cut into edge bands, the items along one edge fitted with their forms, one edge's drop places, floats kept clear, panes tiled and popups positioned. Pure geometry in, rects out. No DOM, no framework, no motion.",
5
5
  "keywords": [
6
6
  "layout",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/geometry.ts"],"sourcesContent":["/**\n * The shapes every entry shares. Plain data: a rect is a top-left corner and a size, in whatever px the consumer\n * lays out in (stage, window or host coordinates). The same shape as @n-uf/motion's, so the two compose without\n * either importing the other.\n */\n\nexport interface Rect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface Size {\n readonly width: number;\n readonly height: number;\n}\n\nexport interface Point {\n readonly x: number;\n readonly y: number;\n}\n\nexport const rect = (x: number, y: number, width: number, height: number): Rect => ({ x, y, width, height });\n\n/** The area two rects share (0 when apart). */\nexport const overlap = (a: Rect, b: Rect): number =>\n Math.max(0, Math.min(a.x + a.width, b.x + b.width) - Math.max(a.x, b.x)) * Math.max(0, Math.min(a.y + a.height, b.y + b.height) - Math.max(a.y, b.y));\n\n/** `r` moved (not resized) to lie inside `area`; one larger than the area keeps its top-left corner on the area's. */\nexport const clampInto = (r: Rect, area: Rect): Rect => ({\n ...r,\n x: Math.min(Math.max(r.x, area.x), Math.max(area.x, area.x + area.width - r.width)),\n y: Math.min(Math.max(r.y, area.y), Math.max(area.y, area.y + area.height - r.height)),\n});\n\n/** The center of a rect. */\nexport const center = (r: Rect): Point => ({ x: r.x + r.width / 2, y: r.y + r.height / 2 });\n\n/** The tolerance the geometry compares with, px. */\nexport const EPS = 1e-6;\n\n/** A rect that covers any point a page can see (a float target's hit). */\nexport const PLANE: Rect = rect(-1e9, -1e9, 2e9, 2e9);\n\n/** A rect's area (a negative side counts as 0). */\nexport const area = (r: Rect): number => Math.max(0, r.width) * Math.max(0, r.height);\n\n/** Whether two rects share more than `eps` each way (touching edges don't overlap). */\nexport const overlaps = (a: Rect, b: Rect, eps = EPS): boolean =>\n Math.min(a.x + a.width, b.x + b.width) - Math.max(a.x, b.x) > eps && Math.min(a.y + a.height, b.y + b.height) - Math.max(a.y, b.y) > eps;\n\n/** Whether `p` lies in `r`, its edges included (within `eps`). */\nexport const contains = (r: Rect, p: Point, eps = EPS): boolean => p.x >= r.x - eps && p.x <= r.x + r.width + eps && p.y >= r.y - eps && p.y <= r.y + r.height + eps;\n\n/** `v` within `lo..hi` (`lo` wins when `hi` is under it). */\nexport const clamp = (v: number, lo: number, hi: number): number => Math.min(Math.max(v, lo), Math.max(lo, hi));\n\n/** `r` less `cut`, as disjoint rects: the parts beside the cut whole, then above and below it within its width. */\nexport function subtract(r: Rect, cut: Rect): Rect[] {\n if (!overlaps(r, cut)) return [r];\n const right = r.x + r.width;\n const bottom = r.y + r.height;\n const x0 = Math.max(r.x, cut.x);\n const x1 = Math.min(right, cut.x + cut.width);\n return [\n rect(r.x, r.y, x0 - r.x, r.height),\n rect(x1, r.y, right - x1, r.height),\n rect(x0, r.y, x1 - x0, Math.min(bottom, cut.y) - r.y),\n rect(x0, Math.max(r.y, cut.y + cut.height), x1 - x0, bottom - Math.max(r.y, cut.y + cut.height)),\n ].filter((p) => area(p) > EPS);\n}\n"],"mappings":";AAuBO,IAAM,OAAO,CAAC,GAAW,GAAW,OAAe,YAA0B,EAAE,GAAG,GAAG,OAAO,OAAO;AAGnG,IAAM,UAAU,CAAC,GAAS,MAC/B,KAAK,IAAI,GAAG,KAAK,IAAI,EAAE,IAAI,EAAE,OAAO,EAA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