From 6ca4c3bbb6d02241530040cc8c8f80b0e21ffd57 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 7 Sep 2023 15:01:30 +0300 Subject: [PATCH 1/5] play-around --- packages/x-charts/package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/x-charts/package.json b/packages/x-charts/package.json index 8057e0a9db1d..769fb53baccc 100644 --- a/packages/x-charts/package.json +++ b/packages/x-charts/package.json @@ -71,12 +71,14 @@ ".": { "types": "./index.d.ts", "require": "./index.js", - "import": "./esm/index.js" + "import": "./esm/index.js", + "default": "./modern/index.js" }, "./*": { "types": "./*/index.d.ts", "require": "./*/index.js", - "import": "./esm/*/index.js" + "import": "./esm/*/index.js", + "default": "./modern/*/index.js" } }, "setupFiles": [ From 7e610ee793bc94d2585fd5445062b3b1a462525f Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 7 Sep 2023 15:26:30 +0300 Subject: [PATCH 2/5] Just a default --- packages/x-charts/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/x-charts/package.json b/packages/x-charts/package.json index 769fb53baccc..79169f14da7d 100644 --- a/packages/x-charts/package.json +++ b/packages/x-charts/package.json @@ -72,13 +72,13 @@ "types": "./index.d.ts", "require": "./index.js", "import": "./esm/index.js", - "default": "./modern/index.js" + "default": "./index.js" }, "./*": { "types": "./*/index.d.ts", "require": "./*/index.js", "import": "./esm/*/index.js", - "default": "./modern/*/index.js" + "default": "./*/index.js" } }, "setupFiles": [ From e3e08adf8912b2616604cf43b6b191aac87ce503 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 7 Sep 2023 15:43:43 +0300 Subject: [PATCH 3/5] Use modern build as fallback --- packages/x-charts/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/x-charts/package.json b/packages/x-charts/package.json index 79169f14da7d..769fb53baccc 100644 --- a/packages/x-charts/package.json +++ b/packages/x-charts/package.json @@ -72,13 +72,13 @@ "types": "./index.d.ts", "require": "./index.js", "import": "./esm/index.js", - "default": "./index.js" + "default": "./modern/index.js" }, "./*": { "types": "./*/index.d.ts", "require": "./*/index.js", "import": "./esm/*/index.js", - "default": "./*/index.js" + "default": "./modern/*/index.js" } }, "setupFiles": [ From 5bc821eceab477a7e7feb33966d9704293e91fe7 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 7 Sep 2023 18:32:23 +0300 Subject: [PATCH 4/5] Avoid 3rd level import --- docs/data/charts/pie-demo/PieChartWithCenterLabel.js | 2 +- docs/data/charts/pie-demo/PieChartWithCenterLabel.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/data/charts/pie-demo/PieChartWithCenterLabel.js b/docs/data/charts/pie-demo/PieChartWithCenterLabel.js index e2397d14ba64..41f892141c41 100644 --- a/docs/data/charts/pie-demo/PieChartWithCenterLabel.js +++ b/docs/data/charts/pie-demo/PieChartWithCenterLabel.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { PieChart } from '@mui/x-charts/PieChart'; -import { useDrawingArea } from '@mui/x-charts/hooks/useDrawingArea'; +import { useDrawingArea } from '@mui/x-charts/hooks'; import { styled } from '@mui/material/styles'; const data = [ diff --git a/docs/data/charts/pie-demo/PieChartWithCenterLabel.tsx b/docs/data/charts/pie-demo/PieChartWithCenterLabel.tsx index fcb188ab949b..3177a8e13c23 100644 --- a/docs/data/charts/pie-demo/PieChartWithCenterLabel.tsx +++ b/docs/data/charts/pie-demo/PieChartWithCenterLabel.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { PieChart } from '@mui/x-charts/PieChart'; -import { useDrawingArea } from '@mui/x-charts/hooks/useDrawingArea'; +import { useDrawingArea } from '@mui/x-charts/hooks'; import { styled } from '@mui/material/styles'; const data = [ From 2eb23f3cba26e60a418a57cefe204058ba54aac6 Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 8 Sep 2023 14:07:41 +0300 Subject: [PATCH 5/5] Remove `default` --- packages/x-charts/package.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/x-charts/package.json b/packages/x-charts/package.json index 769fb53baccc..8057e0a9db1d 100644 --- a/packages/x-charts/package.json +++ b/packages/x-charts/package.json @@ -71,14 +71,12 @@ ".": { "types": "./index.d.ts", "require": "./index.js", - "import": "./esm/index.js", - "default": "./modern/index.js" + "import": "./esm/index.js" }, "./*": { "types": "./*/index.d.ts", "require": "./*/index.js", - "import": "./esm/*/index.js", - "default": "./modern/*/index.js" + "import": "./esm/*/index.js" } }, "setupFiles": [