@opendata-ai/openchart-core 8.0.0-rc.4 → 8.0.0-rc.5

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.d.ts CHANGED
@@ -2424,9 +2424,21 @@ interface TileMapSpec {
2424
2424
  /** Supported map projections. */
2425
2425
  type MapProjection = 'albersUsa' | 'mercator' | 'equalEarth' | 'identity';
2426
2426
  /** Focus target for map camera: feature id(s) to zoom/pan to. */
2427
+ /**
2428
+ * Fit the point layer's cluster. `true` fits every point; `{ field, value }`
2429
+ * fits only the points whose data row has `row[field] === value` (e.g. only the
2430
+ * campuses rated "F"), which lets a story pan between sub-clusters.
2431
+ */
2432
+ type MapPointsFocus = true | {
2433
+ field: string;
2434
+ value: string | number;
2435
+ };
2427
2436
  type MapFocus = string | number | Array<string | number> | {
2428
2437
  features: string | number | Array<string | number>;
2429
2438
  padding?: number;
2439
+ } | {
2440
+ points: MapPointsFocus;
2441
+ padding?: number;
2430
2442
  };
2431
2443
  /** Geo configuration for map specs. */
2432
2444
  interface MapGeo {
@@ -2436,7 +2448,14 @@ interface MapGeo {
2436
2448
  idField?: string;
2437
2449
  /** Map projection. Defaults to 'albersUsa'. */
2438
2450
  projection?: MapProjection;
2439
- /** Focus on specific feature(s). null clears focus from a prior story step. */
2451
+ /**
2452
+ * Focus the camera. A feature id (or array) fits those features; `{ features, padding }`
2453
+ * adds breathing room; `{ points: true, padding }` fits the points layer's cluster
2454
+ * instead of any feature (use when points occupy a small part of a large feature, so
2455
+ * fitting the feature would leave the cluster small and off-center);
2456
+ * `{ points: { field, value }, padding }` fits only the matching point subset, so a
2457
+ * story can pan between sub-clusters. null clears focus from a prior story step.
2458
+ */
2440
2459
  focus?: MapFocus | null;
2441
2460
  }
2442
2461
  /** Encoding channels specific to map visualizations. */