@n-uf/placement 26.11.42 → 26.11.43
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 +20 -0
- package/README.md +12 -4
- package/dist/{chunk-IRPPHM2J.js → chunk-2GGJ4GVR.js} +1 -1
- package/dist/{chunk-IRPPHM2J.js.map → chunk-2GGJ4GVR.js.map} +1 -1
- package/dist/{chunk-QL2IRBIH.js → chunk-PO3ILUMO.js} +39 -12
- package/dist/chunk-PO3ILUMO.js.map +1 -0
- package/dist/desk.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{model-BrvKHo50.d.ts → model-CSO5fk_L.d.ts} +5 -4
- package/dist/panels.d.ts +3 -3
- package/dist/scene-cases.d.ts +2 -2
- package/dist/scene-cases.js +2 -2
- package/dist/scene.d.ts +3 -3
- package/dist/scene.js +1 -1
- package/dist/stack.d.ts +1 -1
- package/dist/{target-BLAoaUI7.d.ts → target-BBOCeez2.d.ts} +7 -0
- package/dist/{targets-ClWwCzUo.d.ts → targets-C9ZVhmCl.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-QL2IRBIH.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
Versions are calendar versions, `YY.M.R` (year, month of the release, counter within the month), shared with
|
|
4
4
|
`@n-uf/motion`: both packages carry the same version, and a release bumps both.
|
|
5
5
|
|
|
6
|
+
## 26.11.43
|
|
7
|
+
|
|
8
|
+
- `./scene`, **`Target.roomHit`** (additive): a target that opens its room and changes an edge's thickness around the
|
|
9
|
+
content (an empty rail beside a column, a new-column line, an empty bar's strip) carries the smallest rect holding its
|
|
10
|
+
hit and its landing rect. The drag intent then holds it there once the room is open: the drawn room is its zone, so a
|
|
11
|
+
pointer that drifts inside the rail it opened keeps it. A refusal or a place no more precise under the held room
|
|
12
|
+
doesn't take over; those places are reachable once the pointer leaves the room. While a shown empty bar's room is
|
|
13
|
+
open, an equal-priority gap under it (for example a corner gap of a side bar) is reachable only after the pointer
|
|
14
|
+
leaves that room. Rail drop strips don't carry it.
|
|
15
|
+
|
|
16
|
+
- `./scene`, **an empty rail or bar is entered over its drawn depth** (behavior). Its targets' hits run as deep as a
|
|
17
|
+
drop draws it (the rail's or the bar's drawn depth) instead of a 12 px band, over columns that refuse the item too;
|
|
18
|
+
past the thin band that depth never takes the zones of a drawn edge that take the item. An empty column keeps the thin
|
|
19
|
+
band.
|
|
20
|
+
|
|
21
|
+
- `./scene`, **`EDGE_ROOM_HOLD` is 0** (behavior, was 70 ms). A rail target or a new-column line against the window's
|
|
22
|
+
left or right edge shows with its room on the frame an aiming pointer enters it, so a toolbar held at the edge no
|
|
23
|
+
longer jumps away across the column and back. Grazing the edge with a held item now opens its rail. The accepted cost:
|
|
24
|
+
over recorded sweeps along the window's edges, about 29 rail openings instead of 20, mostly from grazing the edge.
|
|
25
|
+
|
|
6
26
|
## 26.11.42
|
|
7
27
|
|
|
8
28
|
- `./scene`, docs: **a refused place is never drawn.** The docs no longer suggest a tint or outline over `refusals()`:
|
package/README.md
CHANGED
|
@@ -1246,10 +1246,18 @@ facing halves is home's, and is no target of its own. The slot is where the item
|
|
|
1246
1246
|
columns) carries `opensRoom`, and the drag intent shows it and reports `room` in the same frame. An item of the edge
|
|
1247
1247
|
the dragged item leaves counts when the drop pushes it, not when it only closes up over that place; the items of the
|
|
1248
1248
|
edge dropped on never do, so a gap between a column's cards is a plain gap. The wait depends on the target: `roomHold`
|
|
1249
|
-
= `EDGE_ROOM_HOLD` (
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1249
|
+
= `EDGE_ROOM_HOLD` (0 ms: it shows on the frame an aiming pointer enters it) on a rail target or a new-column line
|
|
1250
|
+
against the window's left or right edge, so a toolbar held at the edge never jumps away across the column and back
|
|
1251
|
+
(grazing the edge opens the rail); the intent's `roomAfter` (160 ms) on any other; on a rail drop strip's target, also
|
|
1252
|
+
marked, none past the dwell that arms it. A release before it shows still lands on it. A host that draws only a marker
|
|
1253
|
+
opens the room on `frame.room && frame.shown?.opensRoom`, for every one of them. An empty rail or bar is entered over
|
|
1254
|
+
the depth a drop draws it at (a rail's or a bar's drawn depth), not a thin band; past the thin band that depth never takes
|
|
1255
|
+
the zones of a drawn edge that take the item, and an empty column keeps the thin band. A target whose drop changes an
|
|
1256
|
+
edge's thickness around the content (an empty rail beside a column, a new-column line, an empty bar's strip) also
|
|
1257
|
+
carries `roomHit`, the smallest rect holding its hit and its landing rect. While it shows with its room open, the drag
|
|
1258
|
+
intent holds it there: the drawn room is its zone, so a refusal or a place no more precise under it doesn't take
|
|
1259
|
+
over, and those places are reachable once the pointer leaves the room. A rail drop strip (`armedHit`) doesn't carry
|
|
1260
|
+
it.
|
|
1253
1261
|
Every target keeps a reachable hit: its largest piece is at least 12 px across by 24 px along (`minHit`, data per
|
|
1254
1262
|
edge kind), taken from the space beside it in its own zone (a column line's band, a gap's tile) where nothing else is
|
|
1255
1263
|
aimed at, or from a neighbor that keeps its own minimum. Home, a drop strip, a refusal, the chrome and the stage's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/target.ts"],"sourcesContent":["import type { Rect } from \"./geometry\";\n\n/**\n * A drop target in the shape @n-uf/motion/drag takes: an id, a priority (1 most precise: a rail or a tab strip;\n * 2 a slot; 3 a broad area such as floating anywhere), the zone the pointer hits, and optionally where the item\n * lands, a label and whether it lands freely (no room is made for it). `hits`, when given, is the whole zone as several\n * 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.\n * `arm: \"dwell\"` marks a spring-loaded target (the drag intent arms it once the pointer dwells in it), `armedHit` its\n * zone once armed.\n */\nexport interface Target {\n readonly id: string;\n readonly priority: 1 | 2 | 3;\n readonly hit: Rect;\n readonly hits?: readonly Rect[];\n /** Spring-loaded: no target until the pointer dwells in it. */\n readonly arm?: \"dwell\";\n /** Its zone once armed (the strip grown by its magnet). */\n readonly armedHit?: Rect;\n readonly slot?: Rect;\n readonly label?: string;\n readonly free?: boolean;\n /**\n * A refusal, not a target: it takes part in the pick under the pointer, ranked after every target of priority 1 and 2\n * and before priority 3 (`REFUSAL_RANK`, whatever its `priority`), but nothing lands on it (`refusalTargets`).\n */\n readonly refuse?: true;\n /**\n * The drawn space the zone belongs to (the window's stage): the zone, and a drag intent's band and gap grace about\n * it, hold only points strictly inside it. The window's boundary belongs only to the targets drawn against it: the\n * scene gives `bounds` to every refusal and to the float (whole-plane), never to a gap or a slot, so a pointer clamped\n * onto the window's edge picks a gap that reaches it, else nothing. That relies on the host clamping exactly onto the\n * stage's edge (`x + width`, `y + height`): a host that clamps to `width - 0.5` still picks inside the window.\n */\n readonly bounds?: Rect;\n /**\n * Its room opens as it shows: the scene sets it on a target whose slot overlaps an item its drop moves (a rail pushing\n * a column, a new-column line, a bar's strip over the columns), and on a rail drop strip's targets, whose room opens\n * once armed. The drag intent then shows it and makes its room in one frame. Until it shows, a release still lands on\n * it.\n */\n readonly opensRoom?: true;\n /**\n * With `opensRoom`, how long it holds before it shows with its room, ms, in place of the drag intent's `roomAfter`. The\n * scene sets it to `EDGE_ROOM_HOLD` on a rail target or a new-column line against the window's left or right edge.\n */\n readonly roomHold?: number;\n}\n\n/**\n * Where a refusal ranks in the pick (the drag intent's `REFUSAL_RANK`, the same value): an ordering rank, not a\n * priority. Priorities stay the integers 1, 2 and 3; a refusal's tier is `refuse: true`, ordered by this rank on the\n * same scale: after every target of priority 1 and 2, so a real target wins wherever the two meet or overlap, and\n * before priority 3 (the float).\n */\nexport const REFUSAL_RANK = 2.5;\n\n/** A target's rank in the pick: its `priority`, a refusal's {@link REFUSAL_RANK}. Lower wins. */\nexport const pickRank = (t: { readonly priority: number; readonly refuse?: true }): number => (t.refuse === true ? REFUSAL_RANK : t.priority);\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../src/target.ts"],"sourcesContent":["import type { Rect } from \"./geometry\";\n\n/**\n * A drop target in the shape @n-uf/motion/drag takes: an id, a priority (1 most precise: a rail or a tab strip;\n * 2 a slot; 3 a broad area such as floating anywhere), the zone the pointer hits, and optionally where the item\n * lands, a label and whether it lands freely (no room is made for it). `hits`, when given, is the whole zone as several\n * 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.\n * `arm: \"dwell\"` marks a spring-loaded target (the drag intent arms it once the pointer dwells in it), `armedHit` its\n * zone once armed.\n */\nexport interface Target {\n readonly id: string;\n readonly priority: 1 | 2 | 3;\n readonly hit: Rect;\n readonly hits?: readonly Rect[];\n /** Spring-loaded: no target until the pointer dwells in it. */\n readonly arm?: \"dwell\";\n /** Its zone once armed (the strip grown by its magnet). */\n readonly armedHit?: Rect;\n readonly slot?: Rect;\n readonly label?: string;\n readonly free?: boolean;\n /**\n * A refusal, not a target: it takes part in the pick under the pointer, ranked after every target of priority 1 and 2\n * and before priority 3 (`REFUSAL_RANK`, whatever its `priority`), but nothing lands on it (`refusalTargets`).\n */\n readonly refuse?: true;\n /**\n * The drawn space the zone belongs to (the window's stage): the zone, and a drag intent's band and gap grace about\n * it, hold only points strictly inside it. The window's boundary belongs only to the targets drawn against it: the\n * scene gives `bounds` to every refusal and to the float (whole-plane), never to a gap or a slot, so a pointer clamped\n * onto the window's edge picks a gap that reaches it, else nothing. That relies on the host clamping exactly onto the\n * stage's edge (`x + width`, `y + height`): a host that clamps to `width - 0.5` still picks inside the window.\n */\n readonly bounds?: Rect;\n /**\n * Its room opens as it shows: the scene sets it on a target whose slot overlaps an item its drop moves (a rail pushing\n * a column, a new-column line, a bar's strip over the columns), and on a rail drop strip's targets, whose room opens\n * once armed. The drag intent then shows it and makes its room in one frame. Until it shows, a release still lands on\n * it.\n */\n readonly opensRoom?: true;\n /**\n * With `opensRoom`, how long it holds before it shows with its room, ms, in place of the drag intent's `roomAfter`. The\n * scene sets it to `EDGE_ROOM_HOLD` on a rail target or a new-column line against the window's left or right edge.\n */\n readonly roomHold?: number;\n /**\n * With `opensRoom`, the zone it holds once its room is open: while the target shows with its room open, a drag intent\n * holds it wherever the pointer is in this rect. The scene sets it to the smallest rect holding `hit` and the slot (the\n * landing rect) on every target whose drop changes an edge's thickness (a side's width or a bar's height): strips,\n * new-column lines, rails and gaps. A rail drop strip (`armedHit`) doesn't carry it.\n */\n readonly roomHit?: Rect;\n}\n\n/**\n * Where a refusal ranks in the pick (the drag intent's `REFUSAL_RANK`, the same value): an ordering rank, not a\n * priority. Priorities stay the integers 1, 2 and 3; a refusal's tier is `refuse: true`, ordered by this rank on the\n * same scale: after every target of priority 1 and 2, so a real target wins wherever the two meet or overlap, and\n * before priority 3 (the float).\n */\nexport const REFUSAL_RANK = 2.5;\n\n/** A target's rank in the pick: its `priority`, a refusal's {@link REFUSAL_RANK}. Lower wins. */\nexport const pickRank = (t: { readonly priority: number; readonly refuse?: true }): number => (t.refuse === true ? REFUSAL_RANK : t.priority);\n"],"mappings":";AA8DO,IAAM,eAAe;AAGrB,IAAM,WAAW,CAAC,MAAsE,EAAE,WAAW,OAAO,eAAe,EAAE;","names":[]}
|
|
@@ -27,7 +27,7 @@ var RAIL_MODES = ["titles", "icons"];
|
|
|
27
27
|
var RAIL_VISIBILITIES = ["whileDragging", "always", "never"];
|
|
28
28
|
var RAIL_STRIP_MIN = 24;
|
|
29
29
|
var DEFAULT_RAIL_MAGNET = 6;
|
|
30
|
-
var EDGE_ROOM_HOLD =
|
|
30
|
+
var EDGE_ROOM_HOLD = 0;
|
|
31
31
|
var DEFAULT_STRIP = 24;
|
|
32
32
|
var DEFAULT_HIT_BAND = 24;
|
|
33
33
|
var DEFAULT_FLOAT_SIZE = { width: 280, height: 360 };
|
|
@@ -2021,7 +2021,9 @@ function edgeSpec(c, edge) {
|
|
|
2021
2021
|
const strip = Math.max(0, Number.isFinite(edge.strip) ? edge.strip : DEFAULT_STRIP);
|
|
2022
2022
|
const outer = edge.side === "left" ? r.x : edge.side === "right" ? r.x + r.width : edge.side === "top" ? r.y : r.y + r.height;
|
|
2023
2023
|
const inward = (depth) => edge.side === "left" || edge.side === "top" ? [outer, outer + depth] : [outer - depth, outer];
|
|
2024
|
-
const
|
|
2024
|
+
const thin = edgeKind === "rail" || edgeKind === "bar" || edgeKind === "barBetween";
|
|
2025
|
+
const landed = el.cross > 0 || !thin ? 0 : Math.max(0, ...slots.map((s) => s.result.layout.edges[edge.id]?.cross ?? 0));
|
|
2026
|
+
const across2 = (after) => inward((el.cross > 0 ? Math.max(el.cross, after?.edges[edge.id]?.cross ?? 0) : Math.max(strip, landed)) + data.inward);
|
|
2025
2027
|
const drawn = el.cross > 0;
|
|
2026
2028
|
const marker = (s) => {
|
|
2027
2029
|
const slot = s.result.layout.items[dragged].rect;
|
|
@@ -2043,7 +2045,8 @@ function edgeSpec(c, edge) {
|
|
|
2043
2045
|
reserved,
|
|
2044
2046
|
cards,
|
|
2045
2047
|
across: across2,
|
|
2046
|
-
owned: inward(drawn ? el.cross : Math.min(strip, data.place)),
|
|
2048
|
+
owned: inward(drawn ? el.cross : landed > 0 ? landed : Math.min(strip, data.place)),
|
|
2049
|
+
...!drawn && landed > Math.min(strip, data.place) ? { thinOwned: inward(Math.min(strip, data.place)) } : {},
|
|
2047
2050
|
ownedAlong: null,
|
|
2048
2051
|
drawn,
|
|
2049
2052
|
marker
|
|
@@ -2139,15 +2142,15 @@ function homeRectOf(c, ownSpec) {
|
|
|
2139
2142
|
const own = c.now.items[c.dragged];
|
|
2140
2143
|
if (!own || own.floating || !own.edge) return null;
|
|
2141
2144
|
const o = own.rect;
|
|
2142
|
-
const
|
|
2145
|
+
const hull2 = (a, b) => rect(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.max(a.x + a.width, b.x + b.width) - Math.min(a.x, b.x), Math.max(a.y + a.height, b.y + b.height) - Math.min(a.y, b.y));
|
|
2143
2146
|
if (own.inMenu) return o;
|
|
2144
2147
|
if (!ownSpec) {
|
|
2145
2148
|
const e = c.now.edges[own.edge];
|
|
2146
2149
|
const vanishes = !c.rest.edges.some((x) => x.id === own.edge);
|
|
2147
|
-
return e && vanishes && !e.folded && !e.rides && area(e.rect) > EPS ?
|
|
2150
|
+
return e && vanishes && !e.folded && !e.rides && area(e.rect) > EPS ? hull2(o, e.rect) : o;
|
|
2148
2151
|
}
|
|
2149
2152
|
const [c0, c1] = ownSpec.across();
|
|
2150
|
-
return ownSpec.vertical ?
|
|
2153
|
+
return ownSpec.vertical ? hull2(o, rect(c0, o.y, c1 - c0, o.height)) : hull2(o, rect(o.x, c0, o.width, c1 - c0));
|
|
2151
2154
|
}
|
|
2152
2155
|
function ownersOf(c, live, drawn, alongOf) {
|
|
2153
2156
|
const ownEdge = c.now.items[c.dragged]?.edge;
|
|
@@ -2159,7 +2162,12 @@ function ownersOf(c, live, drawn, alongOf) {
|
|
|
2159
2162
|
// Every edge the tiler reads, along each zone with a slot the filter keeps: what it owns, drawn or a band of its
|
|
2160
2163
|
// place (a column line's band about its line). A zone whose every slot is refused owns nothing against the others
|
|
2161
2164
|
// (its drawn rect still counts, below).
|
|
2162
|
-
...live.flatMap((s) =>
|
|
2165
|
+
...live.flatMap((s) => {
|
|
2166
|
+
const rects = ownedRectsOf(s, alongOf(s));
|
|
2167
|
+
if (!s.thinOwned) return rects.map((r) => ({ spec: s, rect: r, lay: s.lay, place: !s.drawn }));
|
|
2168
|
+
const thin = (r) => s.vertical ? rect(Math.max(r.x, s.thinOwned[0]), r.y, Math.min(r.x + r.width, s.thinOwned[1]) - Math.max(r.x, s.thinOwned[0]), r.height) : rect(r.x, Math.max(r.y, s.thinOwned[0]), r.width, Math.min(r.y + r.height, s.thinOwned[1]) - Math.max(r.y, s.thinOwned[0]));
|
|
2169
|
+
return rects.flatMap((r) => [{ spec: s, rect: thin(r), lay: s.lay, place: true }, ...subtract(r, thin(r)).map((d) => ({ spec: s, rect: d, lay: s.lay, place: true, deep: true }))]);
|
|
2170
|
+
}).filter((o) => area(o.rect) > EPS),
|
|
2163
2171
|
// Every seen rect: the edges the tiler doesn't read (folded, riding, taking nothing) among them.
|
|
2164
2172
|
...drawn.map((d) => ({ ...d, place: false }))
|
|
2165
2173
|
];
|
|
@@ -2175,12 +2183,19 @@ function ownership(c, live, alongOf) {
|
|
|
2175
2183
|
const place = !s.drawn;
|
|
2176
2184
|
return o.place === place ? !place || o.lay.at < s.lay.at : !o.place;
|
|
2177
2185
|
};
|
|
2186
|
+
const takingRects = (s) => s.drawn ? s.zones.filter((z) => s.slots.some((sl) => sl.ok && sl.zone === z.zone)).map((z) => s.vertical ? rect(s.owned[0], z.a, s.owned[1] - s.owned[0], z.b - z.a) : rect(z.a, s.owned[0], z.b - z.a, s.owned[1] - s.owned[0])) : [];
|
|
2187
|
+
const thinRectOf = (s) => {
|
|
2188
|
+
const b = bandOf(s);
|
|
2189
|
+
const [t0, t1] = s.thinOwned;
|
|
2190
|
+
return s.vertical ? rect(t0, b.y, t1 - t0, b.height) : rect(b.x, t0, b.width, t1 - t0);
|
|
2191
|
+
};
|
|
2178
2192
|
const taken = new Map(
|
|
2179
2193
|
live.map((s) => [
|
|
2180
2194
|
s,
|
|
2181
2195
|
[
|
|
2182
|
-
...owners.filter((o) => wins(o, s)).
|
|
2183
|
-
...EDGE_KINDS[s.kind].virtual ? owners.filter((o) => o.spec !== s && !wins(o, s)).flatMap((o) => subtract(o.rect, ownedRectOf(s))) : []
|
|
2196
|
+
...owners.filter((o) => wins(o, s)).flatMap((o) => o.deep ? takingRects(s).reduce((acc, t) => acc.flatMap((r) => subtract(r, t)), [o.rect]) : [o.rect]),
|
|
2197
|
+
...EDGE_KINDS[s.kind].virtual ? owners.filter((o) => o.spec !== s && !wins(o, s)).flatMap((o) => subtract(o.rect, ownedRectOf(s))) : [],
|
|
2198
|
+
...s.thinOwned ? live.filter((d) => d !== s).flatMap((d) => takingRects(d).flatMap((t) => subtract(t, thinRectOf(s)))) : []
|
|
2184
2199
|
]
|
|
2185
2200
|
])
|
|
2186
2201
|
);
|
|
@@ -2998,11 +3013,22 @@ function emit2(c, placed) {
|
|
|
2998
3013
|
}
|
|
2999
3014
|
const result = t.result;
|
|
3000
3015
|
const atEdge = WINDOW_EDGE_KINDS.has(t.edgeKind) && touchesSide(scene.stage, t.hits ?? [t.hit]);
|
|
3001
|
-
const
|
|
3016
|
+
const thickens = thicknessChanges(now, result.layout);
|
|
3017
|
+
const room = t.slot && slotOverMoved(now, base, result.layout, t.slot, dragged, t.edge) ? { opensRoom: true, ...atEdge ? { roomHold: EDGE_ROOM_HOLD } : {}, ...thickens ? { roomHit: hull(t.hit, t.slot) } : {} } : {};
|
|
3002
3018
|
targets2.push({ id: t.id, priority: t.priority, hit: t.hit, ...t.hits ? { hits: t.hits } : {}, ...t.slot ? { slot: t.slot } : {}, ...t.marker ? { marker: t.marker } : {}, ...room, item: dragged, place: t.place, after: () => result });
|
|
3003
3019
|
}
|
|
3004
3020
|
return { targets: targets2, refused, ownHome };
|
|
3005
3021
|
}
|
|
3022
|
+
function hull(a, b) {
|
|
3023
|
+
const x = Math.min(a.x, b.x);
|
|
3024
|
+
const y = Math.min(a.y, b.y);
|
|
3025
|
+
return rect(x, y, Math.max(a.x + a.width, b.x + b.width) - x, Math.max(a.y + a.height, b.y + b.height) - y);
|
|
3026
|
+
}
|
|
3027
|
+
var thicknessChanges = (now, after) => {
|
|
3028
|
+
const a = now.content;
|
|
3029
|
+
const b = after.content;
|
|
3030
|
+
return Math.abs(b.x - a.x) > EPS || Math.abs(b.y - a.y) > EPS || Math.abs(b.x + b.width - (a.x + a.width)) > EPS || Math.abs(b.y + b.height - (a.y + a.height)) > EPS;
|
|
3031
|
+
};
|
|
3006
3032
|
var WINDOW_EDGE_KINDS = /* @__PURE__ */ new Set(["rail", "railStop", "sideBar", "columnLine"]);
|
|
3007
3033
|
var touchesSide = (stage, pieces) => pieces.some((r) => r.x <= stage.x + EPS || r.x + r.width >= stage.x + stage.width - EPS);
|
|
3008
3034
|
function slotOverMoved(now, lifted, after, slot, dragged, onto) {
|
|
@@ -3115,7 +3141,8 @@ function generateShown(scene, dragged, options, hidden) {
|
|
|
3115
3141
|
const zones = /* @__PURE__ */ new Map();
|
|
3116
3142
|
for (const t of [...alone.values()].flat()) if (t.kind !== "refuse" && t.id) zones.set(t.id, [...zones.get(t.id) ?? [], t.hit]);
|
|
3117
3143
|
const bounds = stageOf(scene);
|
|
3118
|
-
|
|
3144
|
+
const held = withMinHit(c, layered.targets, layered.refusals, zones).map((t) => t.roomHit && t.slot ? { ...t, roomHit: hull(t.hit, t.slot) } : t);
|
|
3145
|
+
return { targets: held, refusals: layered.refusals.map((r) => ({ ...r, bounds })), lost: lostIds, zones };
|
|
3119
3146
|
}
|
|
3120
3147
|
var stageOf = (scene) => rect(scene.stage.x, scene.stage.y, scene.stage.width, scene.stage.height);
|
|
3121
3148
|
function targets(scene, dragged, options = {}) {
|
|
@@ -3224,4 +3251,4 @@ export {
|
|
|
3224
3251
|
refusalTargets,
|
|
3225
3252
|
stops
|
|
3226
3253
|
};
|
|
3227
|
-
//# sourceMappingURL=chunk-
|
|
3254
|
+
//# sourceMappingURL=chunk-PO3ILUMO.js.map
|