@bicharts/chart-host 0.5.91 → 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/index.mjs CHANGED
@@ -1406,6 +1406,19 @@ function computeSelectionCard(payload, selectedRowIdxs, opts = {}) {
1406
1406
  };
1407
1407
  }
1408
1408
 
1409
+ // src/summaryText.ts
1410
+ function composeSummaryText(codeSummary, warningMsg) {
1411
+ let sumText = String(codeSummary ?? "");
1412
+ if (String(warningMsg ?? "").trim() !== "") {
1413
+ sumText = sumText.replace(/\s+$/, "");
1414
+ if (sumText !== "") {
1415
+ sumText += /[.!?:;]$/.test(sumText) ? " " : ". ";
1416
+ }
1417
+ sumText += "Warning: " + warningMsg;
1418
+ }
1419
+ return sumText;
1420
+ }
1421
+
1409
1422
  // ../../node_modules/colorsea/dist/index.esm.js
1410
1423
  function t(t2, r2, n2, e2) {
1411
1424
  var o2, i2 = arguments.length, a2 = i2 < 3 ? r2 : null === e2 ? e2 = Object.getOwnPropertyDescriptor(r2, n2) : e2;
@@ -2125,6 +2138,7 @@ export {
2125
2138
  colourSpreadFlag,
2126
2139
  compileRenderFn,
2127
2140
  compileTrivialSource,
2141
+ composeSummaryText,
2128
2142
  compositeOver,
2129
2143
  computeQualifyFilterView,
2130
2144
  computeSelectionCard,
@@ -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.91",
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",