@danxbot/ui 16.2.0 → 16.2.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.
- package/dist/index.js +6610 -6575
- package/dist/index.js.map +1 -1
- package/dist/types/components/focus-web/layout.d.ts +23 -0
- package/package.json +1 -1
|
@@ -30,3 +30,26 @@ export interface PlacedRingNode {
|
|
|
30
30
|
* against its own node array by index without a lookup.
|
|
31
31
|
*/
|
|
32
32
|
export declare function layoutRing(ids: readonly string[], threshold?: number): PlacedRingNode[];
|
|
33
|
+
/** One slot's measured vertical box, for `labelOverhang`. `height` is the slot body's own layout height (disc plus
|
|
34
|
+
label), `disc` the disc's diameter: both in px, both read untransformed so a glide in flight cannot skew them. */
|
|
35
|
+
export interface SlotBox {
|
|
36
|
+
topPct: number;
|
|
37
|
+
height: number;
|
|
38
|
+
disc: number;
|
|
39
|
+
placement: "above" | "below" | "beside";
|
|
40
|
+
/** A caller's own body: centred whole on its point (see `slotTranslate` in FocusWeb.tsx). */
|
|
41
|
+
custom: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* DX-4219: how far the slots' boxes run above and below the plane's own `planeHeight`-px box. The plane is a fixed
|
|
45
|
+
* aspect ratio and the ring sits at fixed percentages of it, so a top node's label (it grows UP from its disc) or a
|
|
46
|
+
* bottom node's (it grows DOWN) leaves the plane by however many lines it wraps to — into whatever sits above or
|
|
47
|
+
* below the web. The component pads the web by exactly this, so every label sits inside the web's own area.
|
|
48
|
+
*
|
|
49
|
+
* The vertical placement mirrors `slotTranslate` in FocusWeb.tsx: that function is the one place the slot's
|
|
50
|
+
* `translate` is decided, and this is its arithmetic on measured sizes.
|
|
51
|
+
*/
|
|
52
|
+
export declare function labelOverhang(boxes: readonly SlotBox[], planeHeight: number): {
|
|
53
|
+
top: number;
|
|
54
|
+
bottom: number;
|
|
55
|
+
};
|