@mintplayer/web-components 2.12.0 → 2.14.0
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/charts/core/index.mjs +19 -15
- package/charts/core/src/arc.d.ts +5 -6
- package/charts/core/src/color.d.ts +21 -2
- package/charts/core/src/index.d.ts +1 -0
- package/charts/core/src/label-fit.d.ts +31 -0
- package/charts/hierarchy/index.mjs +678 -213
- package/charts/hierarchy/src/components/mp-hierarchy-chart.d.ts +142 -8
- package/chunks/color-DIeST-IS.mjs +224 -0
- package/chunks/{mp-splitter-LszuRDbR.mjs → mp-splitter-Ckn1kN4v.mjs} +33 -19
- package/code-snippet/index.mjs +6 -8
- package/code-snippet/src/hljs-loaders.generated.d.ts +1 -1
- package/dock/index.mjs +841 -830
- package/dock/src/components/mint-dock-manager.element.d.ts +6 -34
- package/dock/src/core/geometry.d.ts +36 -0
- package/dock/src/core/index.d.ts +5 -0
- package/dock/src/core/layout-tree.d.ts +84 -0
- package/dock/src/core/resize.d.ts +83 -0
- package/dock/src/core/sizes.d.ts +31 -0
- package/dock/src/core/types.d.ts +44 -0
- package/file-manager/index.mjs +1 -1
- package/navbar/index.mjs +71 -44
- package/navbar/src/components/mp-navbar.d.ts +17 -1
- package/package.json +1 -1
- package/ribbon/index.mjs +7 -3
- package/ribbon/src/mp-quick-access-toolbar.element.d.ts +11 -0
- package/splitter/index.mjs +1 -1
- package/splitter/src/state/splitter-state.d.ts +9 -0
- package/chunks/color-5yPBn70k.mjs +0 -179
package/charts/core/index.mjs
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import { a as e, b as
|
|
2
|
-
import { l as
|
|
1
|
+
import { a as e, b as t, c as r, d as i, e as o, f as l, g as c, h as n, l as f, p as m, i as p, r as u, j as b, s as L, k as T } from "../../chunks/color-DIeST-IS.mjs";
|
|
2
|
+
import { l as x, n as d, a as k, t as v } from "../../chunks/scale-B0bRUdc7.mjs";
|
|
3
3
|
export {
|
|
4
4
|
e as arcLabelTransform,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
i as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
t as arcPath,
|
|
6
|
+
r as buildIndex,
|
|
7
|
+
i as colorScale,
|
|
8
|
+
o as composite,
|
|
9
|
+
l as contrastText,
|
|
10
|
+
c as fitArcLabel,
|
|
11
|
+
n as fitCellLabel,
|
|
12
|
+
f as levelOf,
|
|
13
|
+
x as linearScale,
|
|
14
|
+
d as niceDomain,
|
|
15
|
+
k as niceTicks,
|
|
16
|
+
m as partitionLayout,
|
|
17
|
+
p as pathTo,
|
|
18
|
+
u as relativeLuminance,
|
|
15
19
|
b as resolveFocus,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
L as squarifyLayout,
|
|
21
|
+
T as subtreeDepth,
|
|
22
|
+
v as timeTicks
|
|
19
23
|
};
|
package/charts/core/src/arc.d.ts
CHANGED
|
@@ -19,10 +19,9 @@ export interface ArcOptions {
|
|
|
19
19
|
}
|
|
20
20
|
export declare function arcPath(cx: number, cy: number, r0: number, r1: number, a0: number, a1: number, options?: ArcOptions): string;
|
|
21
21
|
/**
|
|
22
|
-
* Sunburst label placement: translate to the arc's radial midpoint
|
|
23
|
-
* to read along the radius,
|
|
24
|
-
*
|
|
22
|
+
* Sunburst label placement: translate to the arc's radial midpoint, then
|
|
23
|
+
* rotate to read along the radius (radial, Observable's transform) or along
|
|
24
|
+
* the chord (tangential), flipping on the half where the text would otherwise
|
|
25
|
+
* be upside-down. Orientation is chosen by fitArcLabel (label-fit.ts).
|
|
25
26
|
*/
|
|
26
|
-
export declare function arcLabelTransform(x0: number, x1: number, rMid: number): string;
|
|
27
|
-
/** Observable's area threshold: label only arcs whose (rings × sweep-fraction) area clears it. */
|
|
28
|
-
export declare function arcLabelVisible(x0: number, x1: number, rings: number, minArea?: number): boolean;
|
|
27
|
+
export declare function arcLabelTransform(x0: number, x1: number, rMid: number, orientation?: 'radial' | 'tangential'): string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Two-stop clamped HSL color scale (codecov's coverage ramp: a long-way hue
|
|
3
|
-
* sweep red -> green with yellow in the middle, clamped outside the domain)
|
|
4
|
-
*
|
|
3
|
+
* sweep red -> green with yellow in the middle, clamped outside the domain),
|
|
4
|
+
* plus the WCAG contrast math the hierarchy chart's label coloring rides on.
|
|
5
|
+
* Accepts #rgb/#rrggbb, rgb(r, g, b) and hsl(h, s%, l%) colors — the forms
|
|
6
|
+
* this module itself emits, plus what browsers report as computed values.
|
|
5
7
|
*/
|
|
6
8
|
/**
|
|
7
9
|
* Returns v -> "hsl(...)" mapping [min, max] onto [from, to], clamped outside.
|
|
@@ -9,3 +11,20 @@
|
|
|
9
11
|
* interpolateHslLong behaviour, which is what produces red->yellow->green).
|
|
10
12
|
*/
|
|
11
13
|
export declare function colorScale(min: number, max: number, from: string, to: string): (value: number) => string;
|
|
14
|
+
/**
|
|
15
|
+
* WCAG 2.x relative luminance (0 = black, 1 = white).
|
|
16
|
+
* Returns undefined for colors the parser does not understand (named colors,
|
|
17
|
+
* var() references, gradients) — callers fall back to a backdrop-based pick.
|
|
18
|
+
*/
|
|
19
|
+
export declare function relativeLuminance(color: string): number | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Source-over compositing of a translucent fill onto an opaque backdrop —
|
|
22
|
+
* the effective surface a .6-opacity leaf arc actually presents under a label.
|
|
23
|
+
*/
|
|
24
|
+
export declare function composite(fg: string, bg: string, alpha: number): string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Which text tone contrasts better with the given surface: 'dark' text (for
|
|
27
|
+
* light surfaces) or 'light' text (for dark surfaces), by comparing WCAG
|
|
28
|
+
* contrast ratios against black and white. undefined when unparseable.
|
|
29
|
+
*/
|
|
30
|
+
export declare function contrastText(surface: string): 'dark' | 'light' | undefined;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Label fitting for chart nodes — pure arithmetic, no text measurement (jsdom
|
|
3
|
+
* has neither SVG geometry APIs nor a 2D canvas context). Char advance is
|
|
4
|
+
* estimated at 0.6 x font-size; extreme strings ("iiii" vs "WWWW") misjudge by
|
|
5
|
+
* a few characters at worst, and the failure mode is a slightly early
|
|
6
|
+
* truncation or suppression — never overflow into a neighbouring node.
|
|
7
|
+
*
|
|
8
|
+
* All geometry is in device px: the caller converts from layout units using
|
|
9
|
+
* its rendered size, so the same font-size threshold holds at every host size.
|
|
10
|
+
*/
|
|
11
|
+
export type ArcLabelOrientation = 'radial' | 'tangential';
|
|
12
|
+
export interface ArcLabelFit {
|
|
13
|
+
visible: boolean;
|
|
14
|
+
/** The (possibly ellipsis-truncated) text to render; '' when not visible. */
|
|
15
|
+
text: string;
|
|
16
|
+
/** The orientation that fits more characters (tangential wins ties). */
|
|
17
|
+
orientation: ArcLabelOrientation;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Fit a label into an annular sector. Radial text runs along the radius
|
|
21
|
+
* (advance limited by ring thickness, line height by the arc length at the
|
|
22
|
+
* label radius); tangential text runs along the chord (advance limited by
|
|
23
|
+
* chord and arc length, line height by ring thickness). Returns whichever
|
|
24
|
+
* orientation places more characters.
|
|
25
|
+
*/
|
|
26
|
+
export declare function fitArcLabel(name: string, sweepRad: number, r0Px: number, r1Px: number, fontPx: number): ArcLabelFit;
|
|
27
|
+
/**
|
|
28
|
+
* Fit gate for a cartesian cell (icicle/treemap). Truncation is left to the
|
|
29
|
+
* cell's CSS ellipsis; this only decides whether a label is worth rendering.
|
|
30
|
+
*/
|
|
31
|
+
export declare function fitCellLabel(widthPx: number, heightPx: number, fontPx: number): boolean;
|