@factorialco/f0-react 6.4.0 → 6.5.0

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.
@@ -3925,6 +3925,7 @@ declare const defaultTranslations: {
3925
3925
  readonly title: "No data available";
3926
3926
  readonly description: "Try a different date or fewer filters";
3927
3927
  };
3928
+ readonly windowedCategories: "Showing {{count}} of {{total}} categories";
3928
3929
  readonly tooltip: {
3929
3930
  readonly ofTotal: "of total";
3930
3931
  readonly total: "total";
@@ -11997,11 +11998,9 @@ declare module "@tiptap/core" {
11997
11998
 
11998
11999
  declare module "@tiptap/core" {
11999
12000
  interface Commands<ReturnType> {
12000
- enhanceHighlight: {
12001
- setEnhanceHighlight: (from: number, to: number, options?: {
12002
- placeholder?: string;
12003
- }) => ReturnType;
12004
- clearEnhanceHighlight: () => ReturnType;
12001
+ fontSize: {
12002
+ setFontSize: (fontSize: string) => ReturnType;
12003
+ unsetFontSize: () => ReturnType;
12005
12004
  };
12006
12005
  }
12007
12006
  }
@@ -12009,9 +12008,11 @@ declare module "@tiptap/core" {
12009
12008
 
12010
12009
  declare module "@tiptap/core" {
12011
12010
  interface Commands<ReturnType> {
12012
- fontSize: {
12013
- setFontSize: (fontSize: string) => ReturnType;
12014
- unsetFontSize: () => ReturnType;
12011
+ enhanceHighlight: {
12012
+ setEnhanceHighlight: (from: number, to: number, options?: {
12013
+ placeholder?: string;
12014
+ }) => ReturnType;
12015
+ clearEnhanceHighlight: () => ReturnType;
12015
12016
  };
12016
12017
  }
12017
12018
  }
package/dist/f0.d.ts CHANGED
@@ -5219,6 +5219,7 @@ export declare const defaultTranslations: {
5219
5219
  readonly title: "No data available";
5220
5220
  readonly description: "Try a different date or fewer filters";
5221
5221
  };
5222
+ readonly windowedCategories: "Showing {{count}} of {{total}} categories";
5222
5223
  readonly tooltip: {
5223
5224
  readonly ofTotal: "of total";
5224
5225
  readonly total: "total";
@@ -8425,7 +8426,7 @@ export declare interface F0DataChartBarProps extends F0DataChartBaseProps {
8425
8426
  /**
8426
8427
  * Per-side clearance in pixels the widest value must have before
8427
8428
  * {@link F0DataChartBarProps.hideOverflowingLabels} counts it as fitting.
8428
- * Overrides the default, which is placement-based: **12** for stacked (inside)
8429
+ * Overrides the default, which is placement-based: **6** for stacked (inside)
8429
8430
  * labels, **0** for labels outside the bar.
8430
8431
  */
8431
8432
  labelFitPadding?: number;
@@ -8438,6 +8439,43 @@ export declare interface F0DataChartBarProps extends F0DataChartBaseProps {
8438
8439
  * widths differ. Height overflow is also evaluated per bar. @default true
8439
8440
  */
8440
8441
  hideAllLabelsOnOverflow?: boolean;
8442
+ /**
8443
+ * Draw only as many categories as fit at a readable bar thickness, instead of
8444
+ * compressing every one of them into the available height.
8445
+ *
8446
+ * Opt-in, because it hides data: a windowed chart shows the first N rows in
8447
+ * data order and nothing in the chart itself leads to the rest. Set it only
8448
+ * where the surrounding UI offers the way back — subscribe to
8449
+ * {@link F0DataChartBarProps.onHiddenCategoriesChange} and put a control next
8450
+ * to the count, as `F0AnalyticsDashboard` does. Left off, a dense chart stays
8451
+ * complete and its bars get thinner, which is the readable-but-honest end of
8452
+ * the trade.
8453
+ *
8454
+ * Ignored by vertical charts, which lay categories out along the width.
8455
+ * @default false
8456
+ */
8457
+ windowCategories?: boolean;
8458
+ /**
8459
+ * Render every category at once, overriding
8460
+ * {@link F0DataChartBarProps.windowCategories}.
8461
+ *
8462
+ * Set this when the reader has asked to see the whole distribution — an
8463
+ * expanded or fullscreen view — and accepts thinner bars in exchange. Ignored
8464
+ * by vertical charts, which lay categories out along the width.
8465
+ * @default false
8466
+ */
8467
+ showAllCategories?: boolean;
8468
+ /**
8469
+ * Reports how many categories the row window is hiding — `0` when every
8470
+ * category is on screen. Fires whenever the count changes, which includes
8471
+ * container resizes and {@link F0DataChartBarProps.showAllCategories} being
8472
+ * switched on.
8473
+ *
8474
+ * The chart states the fact rather than rendering an affordance for it: only
8475
+ * the surrounding UI knows where a "see everything" control belongs. The
8476
+ * dashboard puts it in the widget's description, next to the count.
8477
+ */
8478
+ onHiddenCategoriesChange?: (hiddenCategoryCount: number) => void;
8441
8479
  /**
8442
8480
  * Suggested number of segments on the value axis — lower values draw fewer
8443
8481
  * grid lines. Applies to whichever axis is the value axis (Y for vertical
@@ -19248,11 +19286,9 @@ declare module "@tiptap/core" {
19248
19286
 
19249
19287
  declare module "@tiptap/core" {
19250
19288
  interface Commands<ReturnType> {
19251
- enhanceHighlight: {
19252
- setEnhanceHighlight: (from: number, to: number, options?: {
19253
- placeholder?: string;
19254
- }) => ReturnType;
19255
- clearEnhanceHighlight: () => ReturnType;
19289
+ fontSize: {
19290
+ setFontSize: (fontSize: string) => ReturnType;
19291
+ unsetFontSize: () => ReturnType;
19256
19292
  };
19257
19293
  }
19258
19294
  }
@@ -19260,9 +19296,11 @@ declare module "@tiptap/core" {
19260
19296
 
19261
19297
  declare module "@tiptap/core" {
19262
19298
  interface Commands<ReturnType> {
19263
- fontSize: {
19264
- setFontSize: (fontSize: string) => ReturnType;
19265
- unsetFontSize: () => ReturnType;
19299
+ enhanceHighlight: {
19300
+ setEnhanceHighlight: (from: number, to: number, options?: {
19301
+ placeholder?: string;
19302
+ }) => ReturnType;
19303
+ clearEnhanceHighlight: () => ReturnType;
19266
19304
  };
19267
19305
  }
19268
19306
  }