@bicharts/chart-host 0.6.24 → 0.6.25
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 +7 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/thumbnailPolicy.d.ts +17 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2427,6 +2427,12 @@ function updateRowHighWater(prevRows, prevSchemaHash, currentRows, currentSchema
|
|
|
2427
2427
|
return { rows: Math.max(prevRows, currentRows), schemaHash: currentSchemaHash };
|
|
2428
2428
|
}
|
|
2429
2429
|
|
|
2430
|
+
// src/thumbnailPolicy.ts
|
|
2431
|
+
function shouldCaptureThumbnail(g2) {
|
|
2432
|
+
const capture = g2.forced || (g2.consented || g2.capturesByDefault) && g2.firstRenderAfterGenerate;
|
|
2433
|
+
return { capture, consent: g2.consented };
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2430
2436
|
// src/clientIdentity.ts
|
|
2431
2437
|
function stableFingerprintOptions() {
|
|
2432
2438
|
return { exclude: ["fonts", "system.useragent", "system.browser.version"], logging: false };
|
|
@@ -2680,6 +2686,7 @@ export {
|
|
|
2680
2686
|
scrollFitFor,
|
|
2681
2687
|
servedCorrelationProves,
|
|
2682
2688
|
sessionViewStateProvider,
|
|
2689
|
+
shouldCaptureThumbnail,
|
|
2683
2690
|
shouldOpenChooserOnGenerate,
|
|
2684
2691
|
shouldOpenInlineChooserOnGenerate,
|
|
2685
2692
|
shouldRestoreVersionAfterLicenseSave,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -41,5 +41,6 @@ export { reconcileChartPick, type ChartPickReconciliation } from "./chartPick";
|
|
|
41
41
|
export { isDuplicateGenerate, armGenerateGuard, DUPLICATE_GENERATE_WINDOW_MS, type GenerateGuardKey, type GenerateGuardState, } from "./duplicateGenerateGuard";
|
|
42
42
|
export { canShowLastChart, shouldRestoreVersionAfterLicenseSave } from "./lastChart";
|
|
43
43
|
export { isNarrowedByFilter, isEmptiedByFilter, updateRowHighWater, type NarrowingState, } from "./filterNarrowing";
|
|
44
|
+
export { shouldCaptureThumbnail, type ThumbnailGate, type ThumbnailDecision } from "./thumbnailPolicy";
|
|
44
45
|
export { stableFingerprintOptions, fingerprintComponentDigest, type ClientIdSource } from "./clientIdentity";
|
|
45
46
|
export type { HostServices, MarkerStore, PreferenceSource, HostTheme, ThemeSource, ThumbnailConsent, SnapshotTarget, WireSigner, WireTransport, WireResponse, CredentialTriple, CredentialSource, ViewportSource, Clock, DiagnosticEntry, DiagnosticsSink, RendererId, } from "./host/services";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ThumbnailGate {
|
|
2
|
+
/** The reader or their account opted in to saving thumbnails. The only input that is consent. */
|
|
3
|
+
consented: boolean;
|
|
4
|
+
/** The service asked for this account's renders to be captured for diagnosis. Not consent. */
|
|
5
|
+
forced: boolean;
|
|
6
|
+
/** The host's terms cover a capture without the setting (e.g. a free tier). Not consent. */
|
|
7
|
+
capturesByDefault: boolean;
|
|
8
|
+
/** This render is the first of a newly generated version - not a resize, reopen or filter. */
|
|
9
|
+
firstRenderAfterGenerate: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ThumbnailDecision {
|
|
12
|
+
/** Capture an image of this render. */
|
|
13
|
+
capture: boolean;
|
|
14
|
+
/** The consent flag to send beside it: `consented`, never raised by a forced or default capture. */
|
|
15
|
+
consent: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function shouldCaptureThumbnail(g: ThumbnailGate): ThumbnailDecision;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.25",
|
|
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",
|