@bicharts/chart-host 0.6.115 → 0.6.117
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/README.md +18 -0
- package/dist/adapters.mjs +3 -3
- package/dist/card.mjs +2 -2
- package/dist/category-colours.mjs +275 -0
- package/dist/{chunk-AQO4ROMU.mjs → chunk-63IUMWY2.mjs} +40 -3
- package/dist/{chunk-YOCYWON4.mjs → chunk-EFKGSDFF.mjs} +1 -1
- package/dist/{chunk-7K3F3RZ6.mjs → chunk-GZSYTDFN.mjs} +68 -275
- package/dist/{chunk-QLIRQJ6B.mjs → chunk-IW6BKFF5.mjs} +1 -1
- package/dist/{chunk-YSRMSDRP.mjs → chunk-JMLSNV5Q.mjs} +1 -1
- package/dist/chunk-JTZTTJJK.mjs +244 -0
- package/dist/{chunk-VPFP35XI.mjs → chunk-K2TH7D5V.mjs} +299 -299
- package/dist/{chunk-GXR7T6G5.mjs → chunk-QG5TENI3.mjs} +4 -0
- package/dist/{chunk-PQKLWYKK.mjs → chunk-RLOIA7QK.mjs} +1 -1
- package/dist/{chunk-CVTCR7HQ.mjs → chunk-TUZCM7SX.mjs} +2 -2
- package/dist/{chunk-DILJDN6C.mjs → chunk-VGJH63LZ.mjs} +1 -1
- package/dist/{chunk-2GW3S5VD.mjs → chunk-ZZBX5ZJ6.mjs} +15 -2
- package/dist/dax.mjs +23 -1
- package/dist/index.mjs +63 -16
- package/dist/legend-fit.mjs +3 -3
- package/dist/page.mjs +5 -5
- package/dist/provinces.mjs +4 -4
- package/dist/react.mjs +12 -11
- package/dist/testing.mjs +1 -1
- package/dist/types/categoryColours.d.ts +71 -0
- package/dist/types/contract.d.ts +2 -0
- package/dist/types/dax.d.ts +26 -0
- package/dist/types/filterScope.d.ts +10 -1
- package/dist/types/fit.d.ts +6 -1
- package/dist/types/fitDom.d.ts +13 -0
- package/dist/types/host.d.ts +10 -0
- package/dist/types/index.d.ts +4 -3
- package/dist/types/qualifyTable.d.ts +52 -0
- package/dist/zoom-memory.mjs +1 -1
- package/package.json +6 -1
- /package/dist/{chunk-5YSZABCS.mjs → chunk-LXTW6YII.mjs} +0 -0
|
@@ -16,7 +16,11 @@ export interface FilterOptions {
|
|
|
16
16
|
display?: string | readonly string[];
|
|
17
17
|
/** A stable id for this filter within its scope. Generated when absent. */
|
|
18
18
|
id?: string;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Its name in a saved view (scope.save / a link). Defaults to the key columns joined with "+". Two filters in one
|
|
21
|
+
* scope never share a name there: the second with one name is saved as "<name>-2", the third "<name>-3", in the order
|
|
22
|
+
* they joined the scope, so each puts back its own pick (FilterScope.keyOf says which name a filter has).
|
|
23
|
+
*/
|
|
20
24
|
key?: string;
|
|
21
25
|
/**
|
|
22
26
|
* LINKED HOVER: hovering a mark on a chart bound to this filter lights the marks with the same key on every other
|
|
@@ -124,6 +128,11 @@ export interface FilterScope {
|
|
|
124
128
|
save(): PageView;
|
|
125
129
|
/** Put a saved view back: each filter set (or cleared when the view doesn't name it), each controls set. */
|
|
126
130
|
restore(view: PageView | null | undefined): void;
|
|
131
|
+
/**
|
|
132
|
+
* A filter's name in this scope's saved views: its key, or "<key>-2", "<key>-3"... for the second and later filters
|
|
133
|
+
* with one key, in the order they joined the scope. Null for a filter not in the scope.
|
|
134
|
+
*/
|
|
135
|
+
keyOf?(filter: Filter): string | null;
|
|
127
136
|
}
|
|
128
137
|
/** A saved page view: what save() returns and restore() takes. */
|
|
129
138
|
export interface PageView {
|
package/dist/types/fit.d.ts
CHANGED
|
@@ -90,11 +90,16 @@ export type AxisPinEdge = "top" | "bottom";
|
|
|
90
90
|
* one drawn over it.
|
|
91
91
|
*/
|
|
92
92
|
export declare function axisPinPlacement(band: AxisBand, scrollTop: number, viewportH: number): AxisPinEdge | null;
|
|
93
|
-
/** A reader's scroll offsets and the identity of the chart they were made on.
|
|
93
|
+
/** A reader's scroll offsets and the identity of the chart they were made on. `inner` holds the offsets of the chart's own
|
|
94
|
+
* scrollers (TABLE_SCROLLER_CLASS), in document order, when any of them was scrolled; absent otherwise. */
|
|
94
95
|
export interface ScrollMemory {
|
|
95
96
|
key: unknown;
|
|
96
97
|
x: number;
|
|
97
98
|
y: number;
|
|
99
|
+
inner?: ReadonlyArray<{
|
|
100
|
+
x: number;
|
|
101
|
+
y: number;
|
|
102
|
+
}>;
|
|
98
103
|
}
|
|
99
104
|
/** What the container reports once the overflow is decided. */
|
|
100
105
|
export interface ScrollMetrics {
|
package/dist/types/fitDom.d.ts
CHANGED
|
@@ -113,8 +113,21 @@ export declare function unpinScrolledAxis(container: HTMLElement | null | undefi
|
|
|
113
113
|
* Remember where the container is scrolled, BEFORE the container is cleared. A memory already waiting is kept: a second render that
|
|
114
114
|
* starts before the first one restored sees an emptied (unscrolled) container, and must not overwrite what the reader really did.
|
|
115
115
|
* A diagram that scrolls inside itself remembers its own position, so it is left alone.
|
|
116
|
+
* A table scrolls its rows inside its own frame (TABLE_SCROLLER_CLASS) while the container stays at the top, so those offsets
|
|
117
|
+
* are kept too, in document order, whenever one of them is scrolled; restoreInnerScroll puts them back.
|
|
116
118
|
*/
|
|
117
119
|
export declare function rememberScroll(container: HTMLElement | null | undefined, key: unknown): void;
|
|
120
|
+
/**
|
|
121
|
+
* Put a table's own scroll back after the SAME chart has drawn again: each element carrying TABLE_SCROLLER_CLASS gets the
|
|
122
|
+
* offsets its counterpart (by document order) had in `memory`. Nothing happens for a different chart (another key), a memory
|
|
123
|
+
* with no inner offsets, or a chart with no such element, so a new chart opens at the top. The browser clamps an offset the new
|
|
124
|
+
* layout cannot reach. Call it once the chart has drawn, with the memory takeScroll returned. Returns the offsets the scrollers
|
|
125
|
+
* report afterwards, or null when nothing was restored. Never throws.
|
|
126
|
+
*/
|
|
127
|
+
export declare function restoreInnerScroll(container: HTMLElement | null | undefined, memory: ScrollMemory | null | undefined, key: unknown): Array<{
|
|
128
|
+
x: number;
|
|
129
|
+
y: number;
|
|
130
|
+
}> | null;
|
|
118
131
|
/** The waiting memory, removed. The one place it is consumed, so a stale memory can never outlive a render. */
|
|
119
132
|
export declare function takeScroll(container: HTMLElement | null | undefined): ScrollMemory | null;
|
|
120
133
|
export declare function pinScrolledAxis(container: HTMLElement | null | undefined, svg: SVGSVGElement | null | undefined): AxisPinReport;
|
package/dist/types/host.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export interface SelectionPaintReport {
|
|
|
23
23
|
import { type MarkCensus } from "./blankRender";
|
|
24
24
|
import { type HitBandCensus } from "./hitBands";
|
|
25
25
|
import { type ColourSpreadCensus } from "./colourSpread";
|
|
26
|
+
import type { CategoryColourCensus } from "./categoryColours";
|
|
26
27
|
import { type ClippedTextCensus } from "./clippedText";
|
|
27
28
|
import { type ValuePlacementCensus } from "./valuePlacement";
|
|
28
29
|
import { type FitRenderedChartOptions, type FitRenderedChartResult } from "./fitDom";
|
|
@@ -150,6 +151,15 @@ export interface ChartHostConfig {
|
|
|
150
151
|
* own skew is measured on the raw column while the ramp encodes an aggregate.
|
|
151
152
|
*/
|
|
152
153
|
onColourSpreadCensus?: (census: ColourSpreadCensus) => void;
|
|
154
|
+
/**
|
|
155
|
+
* HOW CLOSE ARE THE TWO CLOSEST CATEGORY COLOURS, AS PAINTED? Runs after every render, counts only, never repaints;
|
|
156
|
+
* the census loads on first use, so the report arrives a tick after the render rather than inside it.
|
|
157
|
+
* One colour per category (the legend's swatches, else the marks' distinct colours), the closest pair by CIEDE2000
|
|
158
|
+
* at full strength, over the page at each element's own opacity, and at the dim level a selection applies. Generated
|
|
159
|
+
* code can build its own scale or draw at partial opacity, so the palette that was checked is not always what a
|
|
160
|
+
* reader compares. Declines on a sequential ramp or a continuous colour channel.
|
|
161
|
+
*/
|
|
162
|
+
onCategoryColourCensus?: (census: CategoryColourCensus) => void;
|
|
153
163
|
/**
|
|
154
164
|
* IS ANY TEXT CUT OFF BY THE FRAME? Runs after every render, counts only, and never moves anything: a title
|
|
155
165
|
* drawn above its own origin is clipped without anything throwing, so only a measurement against the SVG box
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { HOST_CONTRACT_VERSION, GEO_POINT_PRECISIONS, MARK_CLASS, LEGEND_MARK_CLASS, AXIS_FILTER_CLASS, ROW_IDX_ATTR, LIFT_SELECTED_CLASS, CONTROL_CLASS, NO_ROW_MARKS_ATTR, NOTE_STYLE_ATTR, SELECTION_RULE_ATTR, SELECTION_RULE_CLICKED_MARKS, MARK_KEY_ATTR, CONTAINER_SLOT_CLICKED_MARKS, SNAPSHOT_SVG_ATTR, XFILTER_REFRESH_EVENT, CONTAINER_SLOT_ANIM_STOP, CONTAINER_SLOT_XF_CLEAR, CONTAINER_SLOT_INITIAL_XF_MARK, CONTAINER_SLOT_UI_STATE, CONTAINER_SLOT_SCROLL, CONTAINER_SLOT_HOST_SELECTION, VIEW_ONLY_UI_STATE_KEYS, withoutViewOnlyKeys, HOST_CONTAINER_CLASS, SELECTION_ACTIVE_CLASS, MARK_SELECTED_CLASS, MARKS_INERT_CLASS, ACTIVE_TICK_CLASS, DIM_OPACITY_VAR, DIM_OPACITY_DEFAULT, DIM_OPACITY_MIN, chartOwnsTimeline, periodTickSuppressesFeedback, ANIM_PLAY_SPEED_DEFAULT, ANIM_PLAY_SPEED_MIN, ANIM_PLAY_SPEED_MAX, ANIM_LOOP_DELAY_DEFAULT, ANIM_LOOP_DELAY_MIN, ANIM_MAX_IDEAL_FRAMES_DEFAULT, ANIM_MAX_IDEAL_FRAMES_MIN, ANIM_MAX_IDEAL_FRAMES_MAX, ANIMATION_OPTION_KEYS, COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT, COLOR_SCALE_SELF_CLAMP_PCT_MIN, COLOR_SCALE_SELF_CLAMP_PCT_MAX, FLIP_MODE_DEFAULT, FLIP_INTERVAL_MIN_MS, FLIP_INTERVAL_MAX_MS, FLIP_DIRECTION_DEFAULT, APPROXIMATE_POSITIONS_DEFAULT, VALUE_AXIS_BASELINE_DEFAULT, SEASONAL_MARKERS_DEFAULT, MAX_MAP_POINTS_DEFAULT, type GeoPointPrecision, type GeoMapKind, type TimelineStyle, type FlipMode, type FlipDirection, type ApproximatePositions, type ValueAxisBaseline, type SeasonalMarkers, type ColorScaleScope, type RenderOptions, type ViewStateProvider, type ChartControlChange, type XfilterRefreshDetail, type HostSelectionFact, type FilterScopeFact, } from "./contract";
|
|
1
|
+
export { HOST_CONTRACT_VERSION, GEO_POINT_PRECISIONS, MARK_CLASS, LEGEND_MARK_CLASS, AXIS_FILTER_CLASS, ROW_IDX_ATTR, LIFT_SELECTED_CLASS, CONTROL_CLASS, NO_ROW_MARKS_ATTR, NOTE_STYLE_ATTR, SELECTION_RULE_ATTR, SELECTION_RULE_CLICKED_MARKS, MARK_KEY_ATTR, CONTAINER_SLOT_CLICKED_MARKS, SNAPSHOT_SVG_ATTR, XFILTER_REFRESH_EVENT, CONTAINER_SLOT_ANIM_STOP, CONTAINER_SLOT_XF_CLEAR, CONTAINER_SLOT_INITIAL_XF_MARK, CONTAINER_SLOT_UI_STATE, CONTAINER_SLOT_SCROLL, TABLE_SCROLLER_CLASS, CONTAINER_SLOT_HOST_SELECTION, VIEW_ONLY_UI_STATE_KEYS, withoutViewOnlyKeys, HOST_CONTAINER_CLASS, SELECTION_ACTIVE_CLASS, MARK_SELECTED_CLASS, MARKS_INERT_CLASS, ACTIVE_TICK_CLASS, DIM_OPACITY_VAR, DIM_OPACITY_DEFAULT, DIM_OPACITY_MIN, CATEGORY_DELTA_E_FLOOR, chartOwnsTimeline, periodTickSuppressesFeedback, ANIM_PLAY_SPEED_DEFAULT, ANIM_PLAY_SPEED_MIN, ANIM_PLAY_SPEED_MAX, ANIM_LOOP_DELAY_DEFAULT, ANIM_LOOP_DELAY_MIN, ANIM_MAX_IDEAL_FRAMES_DEFAULT, ANIM_MAX_IDEAL_FRAMES_MIN, ANIM_MAX_IDEAL_FRAMES_MAX, ANIMATION_OPTION_KEYS, COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT, COLOR_SCALE_SELF_CLAMP_PCT_MIN, COLOR_SCALE_SELF_CLAMP_PCT_MAX, FLIP_MODE_DEFAULT, FLIP_INTERVAL_MIN_MS, FLIP_INTERVAL_MAX_MS, FLIP_DIRECTION_DEFAULT, APPROXIMATE_POSITIONS_DEFAULT, VALUE_AXIS_BASELINE_DEFAULT, SEASONAL_MARKERS_DEFAULT, MAX_MAP_POINTS_DEFAULT, type GeoPointPrecision, type GeoMapKind, type TimelineStyle, type FlipMode, type FlipDirection, type ApproximatePositions, type ValueAxisBaseline, type SeasonalMarkers, type ColorScaleScope, type RenderOptions, type ViewStateProvider, type ChartControlChange, type XfilterRefreshDetail, type HostSelectionFact, type FilterScopeFact, } from "./contract";
|
|
2
2
|
export { resolveOptions, cleanHostSelection, cleanFilterScope, type ResolveOptionsInput } from "./defaults";
|
|
3
3
|
export { hostLinkServices, type HostLinkServices, type ClipboardLike } from "./hostLinks";
|
|
4
4
|
export { tableToCsv, tableToXlsx, buildExportFile, exportFileName, sheetName as exportSheetName, excelNumberFormat, excelSerial, bytesToBase64, exportFormatsFor, exportTableService, browserSaveFile, EXPORT_FORMATS, XLSX_MIME, CSV_MIME, type ExportTable, type ExportColumn, type ExportColumnType, type ExportCell, type ExportFormat, type ExportFile, type SaveFileService, type ExportTableService, } from "./exportTable";
|
|
@@ -31,7 +31,7 @@ export { mountShareRateLine, shareRateLineModel, type ShareRateLine, type ShareR
|
|
|
31
31
|
export { qualifyGroupHeadingFor, newQualifyGroupState, type QualifyGroupRow, type QualifyGroupState, type QualifyGroupHeading, orderRefusalsForDisplay, refusalIsSelectable, hasRefusalsToShow, qualifyRefusalHeadingFor, newQualifyRefusalGroupState, qualifyRefusalReason, QUALIFY_REFUSAL_UNSPECIFIED, refusalIsTileBound, QUALIFY_TILE_REFUSAL_CODES, QUALIFY_TOO_SMALL_HEADING, type QualifyRefusalRow, type QualifyRefusalGroupState, type QualifyRefusalHeading, } from "./qualifyGroups";
|
|
32
32
|
export { qualifyPick, qualifyAuto, qualifyCancel, launchGenerates, launchFavorStyle, chooserFitsViewport, shouldOpenChooserOnGenerate, shouldOpenInlineChooserOnGenerate, canConfirmLaunch, confirmLaunch, qualifyFailureFallsOpen, CHOOSER_MIN_WIDTH_PX, CHOOSER_MIN_HEIGHT_PX, type QualifyLaunchOutcome, type ChooserGateInput, } from "./qualifyLaunch";
|
|
33
33
|
export { normalizeFilterTerm, filterQualifyRows, readQualifyChartRow, readQualifyRefusalRow, DEFAULT_FILTER_MATCH_STYLE, filterMatchStyleOf, type FilterMatchStyle, 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";
|
|
34
|
-
export { qualifyTableRows, type QualifyTableRow, type QualifyTableSource } from "./qualifyTable";
|
|
34
|
+
export { qualifyTableRows, type QualifyTableRow, type QualifyTableSource, QUALIFY_KIND_BADGES, qualifyKindBadgeStyle, type QualifyKind, type QualifyKindBadge, type QualifyKindBadgeColours, type QualifyKindPane, type QualifyKindBadgeStyle, } from "./qualifyTable";
|
|
35
35
|
export { computeSelectionCard, normaliseAggregation, type SelectionCardModel, type SelectionCardLine, type SelectionCardOptions, } from "./selectionCard";
|
|
36
36
|
export { formatSourceDate, formatSourceDateFor, isExcelDateFormat, type SourceFormats, type SourceFormatDialect, type SourceDateOptions, } from "./sourceDateFormat";
|
|
37
37
|
export { composeSummaryText } from "./summaryText";
|
|
@@ -45,13 +45,14 @@ export { rowGrowthNotice, ROW_GROWTH_MIN_RATIO, ROW_GROWTH_MIN_EXTRA, type RowGr
|
|
|
45
45
|
export { censusHitBands, hitBandFlag, MIN_HIT_BAND_PX, type HitBandCensus } from "./hitBands";
|
|
46
46
|
export { censusClippedText, clippedTextFlag, CLIP_TOLERANCE_PX, type ClippedTextCensus, type ClippedText } from "./clippedText";
|
|
47
47
|
export { censusColourSpread, colourSpreadFlag, SAME_SHADE_DELTA_E, MIN_RAMP_FILLS, type ColourSpreadCensus } from "./colourSpread";
|
|
48
|
+
export type { CategoryColourCensus, CategoryColourCensusOptions } from "./categoryColours";
|
|
48
49
|
export { censusValuePlacement, valuePlacementFlag, VALUE_AXIS_MIN_FIT, type ValuePlacementCensus } from "./valuePlacement";
|
|
49
50
|
export { SCROLL_SLACK_PX, MAX_FRAME_GROW_FACTOR, PHANTOM_FRACTION, FIT_CONTENT_SELECTOR, needsScroll, contentExtentOf, scrollFitFor, planFrameGrow, isPhantomBox, type MeasuredBox, type ContentExtent, type ScrollFit, type FrameGrowPlan, } from "./fit";
|
|
50
51
|
export { fitRenderedChart, fitReadingFor, measureContainerBoxes, svgInkReach, ctmScaleOf, type FitReading, type InkReach, type FitRenderedChartOptions, type FitRenderedChartResult, } from "./fitDom";
|
|
51
52
|
export { AXIS_PIN_MIN_LABELS, AXIS_PIN_BAND_PAD_PX, AXIS_PIN_MAX_BAND_FRACTION, AXIS_PIN_TRACK_REACH_PX, isHorizontalLabelRow, labelBand, planAxisPin, axisPinPlacement, type LabelRowBox, type AxisBand, type AxisPinCandidate, type AxisPinPlan, type AxisPinEdge, } from "./fit";
|
|
52
53
|
export { pinScrolledAxis, unpinScrolledAxis, type AxisPinReport } from "./fitDom";
|
|
53
54
|
export { planScrollRestore, type ScrollMemory, type ScrollMetrics } from "./fit";
|
|
54
|
-
export { rememberScroll, takeScroll } from "./fitDom";
|
|
55
|
+
export { rememberScroll, takeScroll, restoreInnerScroll } from "./fitDom";
|
|
55
56
|
export { MIN_DELTA_E, pickDistinctColorFromSeed, buildPalette, buildPaletteFromSeed, orderMostDistinct, LEGIBLE_LIGHTNESS, type PaletteResult, type SeedForSlot, type PaletteOptions, } from "./palette";
|
|
56
57
|
export { deltaEHex } from "./deltaE";
|
|
57
58
|
export { resolveAutoColorScale, autoRampMinStep, autoRampCanvas, AUTO_RAMP_CLASSES, AUTO_RAMP_DRAWN_OPACITY, AUTO_RAMP_MIN_STEP_DELTA_E, type AutoColorScale, type AutoColorScaleInput } from "./autoRamp";
|
|
@@ -1,3 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What kind of thing a chart type is, beyond a plain chart, in the chart gallery's own families: an app (a type with
|
|
3
|
+
* its own controls or logic), a table, a map or a KPI card. A plain chart has no kind and no badge. The same four
|
|
4
|
+
* strings shape-core's qualify parse accepts (a test pins the two lists equal).
|
|
5
|
+
*/
|
|
6
|
+
export type QualifyKind = "app" | "table" | "map" | "kpi";
|
|
7
|
+
/** A colour pair for one badge: the chip's fill and its text. */
|
|
8
|
+
export interface QualifyKindBadgeColours {
|
|
9
|
+
background: string;
|
|
10
|
+
text: string;
|
|
11
|
+
}
|
|
12
|
+
/** How one kind is badged: its word, and its colours on a light pane and on a dark pane. */
|
|
13
|
+
export interface QualifyKindBadge {
|
|
14
|
+
/** The word on the badge. The word is the signal; colour only repeats it. */
|
|
15
|
+
label: string;
|
|
16
|
+
/** On a light pane: the gallery family's own light tint, with the family's colour darkened to 75% as the text. */
|
|
17
|
+
light: QualifyKindBadgeColours;
|
|
18
|
+
/** On a dark pane: the family's colour at 50% as the fill, with the gallery's light tint as the text. */
|
|
19
|
+
dark: QualifyKindBadgeColours;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The four badges, in the gallery's family order (apps, tables, maps, KPIs). Each host draws them in its own widget,
|
|
23
|
+
* after the name and before a Preview badge, and a badge never reorders, hides or gates a row.
|
|
24
|
+
*
|
|
25
|
+
* The light fills are the chart gallery's family tints exactly. The gallery's own family text colour does not reach
|
|
26
|
+
* 4.5:1 on three of its tints (about 3.6 to 4.5), so the text is that colour darkened to 75%, which keeps the hue and
|
|
27
|
+
* clears 5.7:1 on every fill. The dark fills are the family colour at 50%, with the tint as text (above 9:1). Light
|
|
28
|
+
* tints sit close to each other by nature (the nearest pair is about 8.5 apart by CIEDE2000), so the claim is that
|
|
29
|
+
* the badges are distinct with the word on them, not that colour alone tells them apart.
|
|
30
|
+
*/
|
|
31
|
+
export declare const QUALIFY_KIND_BADGES: Readonly<Record<QualifyKind, QualifyKindBadge>>;
|
|
32
|
+
/** The pane a badge is drawn on. In high contrast the host's own foreground colour is the only colour used. */
|
|
33
|
+
export type QualifyKindPane = "light" | "dark" | {
|
|
34
|
+
highContrastForeground: string;
|
|
35
|
+
};
|
|
36
|
+
/** What a host sets on a badge element: its word, fill, text colour and border, as CSS values. */
|
|
37
|
+
export interface QualifyKindBadgeStyle {
|
|
38
|
+
label: string;
|
|
39
|
+
background: string;
|
|
40
|
+
color: string;
|
|
41
|
+
border: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The style for one kind's badge on one pane, or null for no kind (a plain chart, or a kind this version does not
|
|
45
|
+
* know). In high contrast the badge has no fill: the text and a 1px border take the host's foreground colour, so the
|
|
46
|
+
* system's colours decide and the word stays the signal.
|
|
47
|
+
*/
|
|
48
|
+
export declare function qualifyKindBadgeStyle(kind: string | null | undefined, pane: QualifyKindPane): QualifyKindBadgeStyle | null;
|
|
1
49
|
/** What a what-fits row must carry to become a table row (the shape-core parse result satisfies it). */
|
|
2
50
|
export interface QualifyTableSource {
|
|
3
51
|
name: string;
|
|
@@ -8,6 +56,8 @@ export interface QualifyTableSource {
|
|
|
8
56
|
recommended?: boolean | null;
|
|
9
57
|
isPreview?: boolean | null;
|
|
10
58
|
alsoWorthALook?: boolean | null;
|
|
59
|
+
/** The server's kind for the type ("app", "table", "map", "kpi"); absent or anything else is a plain chart. */
|
|
60
|
+
kind?: string | null;
|
|
11
61
|
}
|
|
12
62
|
export interface QualifyTableRow {
|
|
13
63
|
/** The position in the order asked for, or null for a row the server did not rank. */
|
|
@@ -22,6 +72,8 @@ export interface QualifyTableRow {
|
|
|
22
72
|
renderer: string | null;
|
|
23
73
|
/** One of the "something different" picks drawn from below the top fits. */
|
|
24
74
|
alsoWorthALook: boolean;
|
|
75
|
+
/** The type's kind, for its badge (QUALIFY_KIND_BADGES); null for a plain chart. qualifyTableRows always sets it. */
|
|
76
|
+
kind?: QualifyKind | null;
|
|
25
77
|
}
|
|
26
78
|
/** The rows as table rows, in the order given (the server's order IS the ranking). */
|
|
27
79
|
export declare function qualifyTableRows(rows: readonly QualifyTableSource[]): QualifyTableRow[];
|
package/dist/zoom-memory.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
2
|
import {
|
|
3
3
|
K
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-K2TH7D5V.mjs";
|
|
5
5
|
import "./chunk-GHODWOAL.mjs";
|
|
6
6
|
|
|
7
7
|
// src/zoomMemory/zoomMemory.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.117",
|
|
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",
|
|
@@ -74,6 +74,11 @@
|
|
|
74
74
|
"import": "./dist/zoom-memory.mjs",
|
|
75
75
|
"default": "./dist/zoom-memory.mjs"
|
|
76
76
|
},
|
|
77
|
+
"./category-colours": {
|
|
78
|
+
"types": "./dist/types/categoryColours.d.ts",
|
|
79
|
+
"import": "./dist/category-colours.mjs",
|
|
80
|
+
"default": "./dist/category-colours.mjs"
|
|
81
|
+
},
|
|
77
82
|
"./dax": {
|
|
78
83
|
"types": "./dist/types/dax.d.ts",
|
|
79
84
|
"import": "./dist/dax.mjs",
|
|
File without changes
|