@bicharts/chart-host 0.6.21 → 0.6.22

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
@@ -2386,7 +2386,7 @@ function reconcileChartPick(pick, offered, autoLabel) {
2386
2386
  // src/duplicateGenerateGuard.ts
2387
2387
  var DUPLICATE_GENERATE_WINDOW_MS = 2500;
2388
2388
  function sameRequest(a2, b2) {
2389
- return a2.schemaHash === b2.schemaHash && a2.gennew === b2.gennew && a2.trycnt === b2.trycnt && a2.favorStyle === b2.favorStyle;
2389
+ return a2.schemaHash === b2.schemaHash && a2.gennew === b2.gennew && a2.trycnt === b2.trycnt && a2.favorStyle === b2.favorStyle && (a2.intent ?? "") === (b2.intent ?? "") && (a2.text ?? "") === (b2.text ?? "");
2390
2390
  }
2391
2391
  function isDuplicateGenerate(prev, next, now) {
2392
2392
  if (!prev) return false;
@@ -8,6 +8,17 @@ export interface GenerateGuardKey {
8
8
  favorStyle: string;
9
9
  /** The retry counter. Differs on every retry, so a retry is never suppressed. */
10
10
  trycnt: number;
11
+ /**
12
+ * Anything else the host's request asks for that makes it a different request - an adjustment's
13
+ * intent, a chosen projection. Absent and "" are the same. A host that keys only on the fields
14
+ * above passes none, and its guard behaves exactly as before.
15
+ */
16
+ intent?: string;
17
+ /**
18
+ * The reader's typed request text. A different text is a different request and always passes.
19
+ * Absent and "" are the same.
20
+ */
21
+ text?: string;
11
22
  }
12
23
  /** The last generate a host started, plus whether it is still running. */
13
24
  export interface GenerateGuardState extends GenerateGuardKey {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bicharts/chart-host",
3
- "version": "0.6.21",
3
+ "version": "0.6.22",
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",