@ssa-ui-kit/core 2.32.0-canary-b64be64-20251219 → 2.32.0-canary-d213a33-20251219

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.
@@ -2,12 +2,19 @@ import React from 'react';
2
2
  /**
3
3
  * React 19 compatibility wrapper for Nivo responsive components.
4
4
  *
5
- * @nivo/core's ResponsiveWrapper returns an object in React 19, which causes
6
- * type checking issues. This utility wraps any Nivo responsive component
7
- * with forwardRef to ensure it's recognized as a proper React component.
5
+ * @nivo v0.99.0 works correctly with React 19 without additional wrapping.
6
+ * This function simply returns the component as-is to avoid type issues.
8
7
  *
9
- * @param Component - The Nivo responsive component to wrap (e.g., ResponsiveLine, ResponsivePie)
10
- * @param displayName - The display name for the wrapped component
11
- * @returns A React 19 compatible version of the component
8
+ * Previously, this function attempted to wrap components with forwardRef,
9
+ * but this caused issues in production builds where the wrapped component
10
+ * would be passed as an object instead of a function, resulting in:
11
+ * "React.jsx: type is invalid -- expected a string or a class/function but got: object"
12
+ *
13
+ * By returning the component unchanged, we let the consuming application's
14
+ * bundler resolve the module correctly and avoid CommonJS/ESM interop issues.
15
+ *
16
+ * @param Component - The Nivo responsive component (e.g., ResponsiveLine, ResponsivePie)
17
+ * @param displayName - Optional display name for debugging in React DevTools
18
+ * @returns The original component unchanged (with displayName set if provided)
12
19
  */
13
- export declare function wrapNivoResponsiveComponent<T extends React.ComponentType<any>>(Component: T, displayName: string): T;
20
+ export declare function wrapNivoResponsiveComponent<T extends React.ComponentType<any>>(Component: T, displayName?: string): T;
package/dist/index.js CHANGED
@@ -6834,36 +6834,32 @@ const getFixedNumber = (number, roundingDigits) => Number(number).toFixed(roundi
6834
6834
  ;// ./src/components/Charts/PieChart/constants.ts
6835
6835
  const TOOLTIP_HEIGHT = 30;
6836
6836
  ;// ./src/components/Charts/utils/nivoReact19Compat.tsx
6837
-
6838
-
6839
6837
  /**
6840
6838
  * React 19 compatibility wrapper for Nivo responsive components.
6841
6839
  *
6842
- * @nivo/core's ResponsiveWrapper returns an object in React 19, which causes
6843
- * type checking issues. This utility wraps any Nivo responsive component
6844
- * with forwardRef to ensure it's recognized as a proper React component.
6840
+ * @nivo v0.99.0 works correctly with React 19 without additional wrapping.
6841
+ * This function simply returns the component as-is to avoid type issues.
6842
+ *
6843
+ * Previously, this function attempted to wrap components with forwardRef,
6844
+ * but this caused issues in production builds where the wrapped component
6845
+ * would be passed as an object instead of a function, resulting in:
6846
+ * "React.jsx: type is invalid -- expected a string or a class/function but got: object"
6845
6847
  *
6846
- * @param Component - The Nivo responsive component to wrap (e.g., ResponsiveLine, ResponsivePie)
6847
- * @param displayName - The display name for the wrapped component
6848
- * @returns A React 19 compatible version of the component
6848
+ * By returning the component unchanged, we let the consuming application's
6849
+ * bundler resolve the module correctly and avoid CommonJS/ESM interop issues.
6850
+ *
6851
+ * @param Component - The Nivo responsive component (e.g., ResponsiveLine, ResponsivePie)
6852
+ * @param displayName - Optional display name for debugging in React DevTools
6853
+ * @returns The original component unchanged (with displayName set if provided)
6849
6854
  */
6850
6855
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6851
6856
  function wrapNivoResponsiveComponent(Component, displayName) {
6852
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6853
- const WrappedComponent = /*#__PURE__*/external_react_default().forwardRef((props, ref) => {
6854
- // Force React.createElement to handle the component, even if it's an object
6855
- // This works around React 19's stricter type checking
6857
+ // Set displayName for better debugging if provided
6858
+ if (displayName && Component) {
6856
6859
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6857
- return /*#__PURE__*/external_react_default().createElement(Component, {
6858
- ...props,
6859
- ref
6860
- });
6861
- });
6862
- WrappedComponent.displayName = displayName;
6863
-
6864
- // Type assertion needed for React 19 compatibility
6865
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6866
- return WrappedComponent;
6860
+ Component.displayName = displayName;
6861
+ }
6862
+ return Component;
6867
6863
  }
6868
6864
  ;// ./src/components/Charts/PieChart/PieChartInternal.tsx
6869
6865
  function PieChartInternal_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }