@bicharts/chart-host 0.5.90 → 0.5.92
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/{chunk-GUCTCDEO.mjs → chunk-YIRWZUKN.mjs} +1241 -1693
- package/dist/index.mjs +824 -292
- package/dist/react.mjs +1 -1
- package/dist/types/deltaE.d.ts +24 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/summaryText.d.ts +7 -0
- package/package.json +1 -1
package/dist/react.mjs
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** CIE L*a*b*, D65. */
|
|
2
|
+
export interface Lab {
|
|
3
|
+
L: number;
|
|
4
|
+
a: number;
|
|
5
|
+
b: number;
|
|
6
|
+
}
|
|
7
|
+
/** sRGB (0-255 per channel) to CIE L*a*b*. */
|
|
8
|
+
export declare function rgbToLab(r: number, g: number, b: number): Lab;
|
|
9
|
+
/** `#rgb` / `#rrggbb` to Lab. Returns null on anything else rather than guessing. */
|
|
10
|
+
export declare function hexToLab(hex: string): Lab | null;
|
|
11
|
+
/**
|
|
12
|
+
* CIEDE2000, with the standard parametric weights (kL = kC = kH = 1).
|
|
13
|
+
*
|
|
14
|
+
* Transcribed from the published formulation rather than from another implementation - which is
|
|
15
|
+
* why it does not match colorsea, and why deltaE.test.ts proves that is colorsea's doing rather
|
|
16
|
+
* than a slip here. The two fiddly parts, which is where transcriptions usually go
|
|
17
|
+
* wrong: the mean hue h-bar must account for the 360-degree wrap (and is undefined, so taken as
|
|
18
|
+
* the sum, when either chroma is zero), and the rotation term applies only in the blue region -
|
|
19
|
+
* without it, two blues read as further apart than they look, which is exactly the region a
|
|
20
|
+
* sequential ramp spends most of its length in.
|
|
21
|
+
*/
|
|
22
|
+
export declare function deltaE2000(c1: Lab, c2: Lab): number;
|
|
23
|
+
/** CIEDE2000 between two `#rrggbb` colours. NaN when either cannot be parsed. */
|
|
24
|
+
export declare function deltaEHex(a: string, b: string): number;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { qualifyPick, qualifyAuto, qualifyCancel, launchGenerates, launchFavorSt
|
|
|
16
16
|
export { normalizeFilterTerm, filterQualifyRows, readQualifyChartRow, readQualifyRefusalRow, filterFitsChooser, listNeedsFilter, qualifyFilterGate, inlineFilterGate, FILTER_MIN_TERM_CHARS, FILTER_ROW_PX, FILTER_MIN_WIDTH_PX, FILTER_MIN_HEIGHT_PX, INLINE_FILTER_MIN_ROWS, computeQualifyFilterView, qualifyFilterCountText, type QualifyFilterTier, type QualifyFilterResult, type QualifyFilterRead, type QualifyFilterGateReason, type QualifyFilterGateInput, type QualifyFilterRow, type QualifyFilterGroup, type QualifyFilterView, type QualifyFilterNoteKind, } from "./qualifyFilter";
|
|
17
17
|
export { computeSelectionCard, normaliseAggregation, type SelectionCardModel, type SelectionCardLine, type SelectionCardOptions, } from "./selectionCard";
|
|
18
18
|
export { formatSourceDate, formatSourceDateFor, type SourceFormats, type SourceFormatDialect, type SourceDateOptions, } from "./sourceDateFormat";
|
|
19
|
+
export { composeSummaryText } from "./summaryText";
|
|
19
20
|
export { ensureCrossfilterHitTargets, type HitTargetReport } from "./hitTargets";
|
|
20
21
|
export { applyLabelContrast, LABEL_CONTRAST_DONE_ATTR, LABEL_CONTRAST_CAP, type LabelContrastOptions, type LabelContrastReport, } from "./labelContrastDom";
|
|
21
22
|
export { decideLabelColor, toRGBA, compositeOver, relativeLuminance, contrastRatio, isPillBackdropAlpha, pillBacksGlyph, backingHoldsGlyph, cellSuppressesNormalize, glyphSampleGrid, DARK_TEXT, LIGHT_TEXT, MIN_CONTRAST, WHITE_TEXT_BG_LUM, PILL_MIN_ALPHA, PILL_OPAQUE_ALPHA, PILL_MIN_COVERAGE, PAGE_MATCH_TOLERANCE, BACKING_MAJORITY, GLYPH_SAMPLE_N, type LabelDecision, } from "./labelContrast";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Join a chart's description and its generation warning into one readable text.
|
|
3
|
+
*
|
|
4
|
+
* Either may be absent. Returns "" when both are, so a caller can use the result itself as the
|
|
5
|
+
* test for "is there anything to show".
|
|
6
|
+
*/
|
|
7
|
+
export declare function composeSummaryText(codeSummary: string | null | undefined, warningMsg: string | null | undefined): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.92",
|
|
4
4
|
"description": "Run a BIC-generated D3 chart in any web host: compiles the generated render() function, applies the shared option defaults, resolves mark clicks (through tooltip overlays), owns the selection affordance, and translates row indices between cross-filtered charts. The same contract the BIC Power BI visual implements, minus Power BI. React bindings at @bicharts/chart-host/react.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|