@flamingo-stack/openframe-frontend-core 0.0.577-1943.5293.1 → 0.0.577-1945.5306.1

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.
@@ -1,6 +1,6 @@
1
1
  import { type ComponentProps, type ComponentType, type ReactNode } from 'react';
2
2
  import { ResponsiveContainer, Tooltip } from 'recharts';
3
- import type { DefaultTooltipContentProps, LegendPayload, TooltipContentProps } from 'recharts';
3
+ import type { LegendPayload, TooltipContentProps, TooltipPayloadEntry } from 'recharts';
4
4
  declare const THEMES: {
5
5
  readonly light: "";
6
6
  readonly dark: ".dark";
@@ -35,23 +35,8 @@ declare const ChartTooltip: typeof Tooltip;
35
35
  type ChartTooltipDatum = {
36
36
  fill?: string;
37
37
  };
38
- /**
39
- * One tooltip entry, derived from the only tooltip payload type the recharts package
40
- * ROOT exports. Deriving rather than naming it is deliberate on both counts:
41
- *
42
- * - `TooltipPayloadEntry` is not root-exported by any recharts 3.x (it lives in
43
- * `util/ChartUtils`, which the root does not re-export), so importing it never
44
- * type-checked and broke the declaration build.
45
- * - `TooltipContentProps['payload']` is widened to `ReadonlyArray<any>`, so deriving
46
- * from THAT would silently restore the `any` this type exists to remove.
47
- *
48
- * `DefaultTooltipContentProps['payload']` is the exact `Payload<…>` array that
49
- * `formatter` and `labelFormatter` take, so entries stay assignable to them and new
50
- * recharts fields (3.6 added a required `graphicalItemId`) are picked up for free.
51
- */
52
- type RechartsTooltipEntry = NonNullable<DefaultTooltipContentProps<number | string, number | string>['payload']>[number];
53
38
  /** A recharts tooltip entry with its `any` datum narrowed to {@link ChartTooltipDatum}. */
54
- type ChartTooltipEntry = Omit<RechartsTooltipEntry, 'payload'> & {
39
+ type ChartTooltipEntry = Omit<TooltipPayloadEntry<number | string, number | string>, 'payload'> & {
55
40
  payload?: ChartTooltipDatum;
56
41
  };
57
42
  /**
@@ -62,7 +47,7 @@ type ChartTooltipEntry = Omit<RechartsTooltipEntry, 'payload'> & {
62
47
  *
63
48
  * `payload` is re-declared because recharts widens it to `ReadonlyArray<any>`
64
49
  * on `TooltipContentProps` even though it hands over the very same entries
65
- * {@link RechartsTooltipEntry} describes.
50
+ * `TooltipPayloadEntry` describes.
66
51
  */
67
52
  type ChartTooltipContentProps = Omit<Partial<TooltipContentProps<number | string, number | string>>, 'payload'> & ComponentProps<'div'> & {
68
53
  payload?: ReadonlyArray<ChartTooltipEntry>;
@@ -1 +1 @@
1
- {"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/components/chart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AACf,OAAO,EAAU,mBAAmB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAK/F,QAAA,MAAM,MAAM;;;CAAwC,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG;KACvB,CAAC,IAAI,MAAM,GAAG;QACb,KAAK,CAAC,EAAE,SAAS,CAAC;QAClB,IAAI,CAAC,EAAE,aAAa,CAAC;KACtB,GAAG,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,GAAG;QAAE,KAAK,CAAC,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,OAAO,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;CACxG,CAAC;AAkBF,QAAA,MAAM,UAAU,GAAI,gBAAgB;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,uCA2BtE,CAAC;AAEF,QAAA,MAAM,cAAc;YAGR,WAAW;cACT,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAC,UAAU,CAAC;0DAsBlE,CAAC;AAGH,Q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OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,CAAC;AAEF;;;;;;;;;GASG;AACH,KAAK,wBAAwB,GAAG,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,GAC7G,cAAc,CAAC,KAAK,CAAC,GAAG;IACtB,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEJ,QAAA,MAAM,mBAAmB,kIAwHvB,CAAC;AAGH,QAAA,MAAM,WAAW,iHAAS,CAAC;AAE3B,QAAA,MAAM,kBAAkB;IAGpB;kDAC8C;cACpC,aAAa,CAAC,aAAa,CAAC;oBACtB,KAAK,GAAG,QAAQ,GAAG,QAAQ;;eAEhC,OAAO;cACR,MAAM;0DAuClB,CAAC;AA6BH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.577-1943.5293.1",
3
+ "version": "0.0.577-1945.5306.1",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -428,7 +428,7 @@
428
428
  "react-remove-scroll": "^2.7.1",
429
429
  "react-resizable-panels": "^3.0.4",
430
430
  "react-scroll": "^1.9.0",
431
- "recharts": "^3.1.0",
431
+ "recharts": "^3.7.0",
432
432
  "rehype-highlight": "^7.0.2",
433
433
  "rehype-raw": "^7.0.0",
434
434
  "rehype-sanitize": "^6.0.0",
@@ -12,7 +12,7 @@ import {
12
12
  useMemo,
13
13
  } from 'react';
14
14
  import { Legend, ResponsiveContainer, Tooltip } from 'recharts';
15
- import type { DefaultTooltipContentProps, LegendPayload, TooltipContentProps } from 'recharts';
15
+ import type { LegendPayload, TooltipContentProps, TooltipPayloadEntry } from 'recharts';
16
16
 
17
17
  import { cn } from '../utils/cn';
18
18
 
@@ -110,26 +110,8 @@ const ChartTooltip = Tooltip;
110
110
  */
111
111
  type ChartTooltipDatum = { fill?: string };
112
112
 
113
- /**
114
- * One tooltip entry, derived from the only tooltip payload type the recharts package
115
- * ROOT exports. Deriving rather than naming it is deliberate on both counts:
116
- *
117
- * - `TooltipPayloadEntry` is not root-exported by any recharts 3.x (it lives in
118
- * `util/ChartUtils`, which the root does not re-export), so importing it never
119
- * type-checked and broke the declaration build.
120
- * - `TooltipContentProps['payload']` is widened to `ReadonlyArray<any>`, so deriving
121
- * from THAT would silently restore the `any` this type exists to remove.
122
- *
123
- * `DefaultTooltipContentProps['payload']` is the exact `Payload<…>` array that
124
- * `formatter` and `labelFormatter` take, so entries stay assignable to them and new
125
- * recharts fields (3.6 added a required `graphicalItemId`) are picked up for free.
126
- */
127
- type RechartsTooltipEntry = NonNullable<
128
- DefaultTooltipContentProps<number | string, number | string>['payload']
129
- >[number];
130
-
131
113
  /** A recharts tooltip entry with its `any` datum narrowed to {@link ChartTooltipDatum}. */
132
- type ChartTooltipEntry = Omit<RechartsTooltipEntry, 'payload'> & {
114
+ type ChartTooltipEntry = Omit<TooltipPayloadEntry<number | string, number | string>, 'payload'> & {
133
115
  payload?: ChartTooltipDatum;
134
116
  };
135
117
 
@@ -141,7 +123,7 @@ type ChartTooltipEntry = Omit<RechartsTooltipEntry, 'payload'> & {
141
123
  *
142
124
  * `payload` is re-declared because recharts widens it to `ReadonlyArray<any>`
143
125
  * on `TooltipContentProps` even though it hands over the very same entries
144
- * {@link RechartsTooltipEntry} describes.
126
+ * `TooltipPayloadEntry` describes.
145
127
  */
146
128
  type ChartTooltipContentProps = Omit<Partial<TooltipContentProps<number | string, number | string>>, 'payload'> &
147
129
  ComponentProps<'div'> & {