@ceed/ads 1.2.2-next.3 → 1.2.2-next.4

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,5 +1,5 @@
1
1
  import React from "react";
2
- import { Options } from "react-markdown";
2
+ import { type Options } from "react-markdown";
3
3
  import { MotionProps } from "framer-motion";
4
4
  import { TypographyProps } from "@mui/joy";
5
5
  import { TypographySystem } from "@mui/joy";
package/dist/index.cjs CHANGED
@@ -4678,7 +4678,6 @@ var import_joy42 = require("@mui/joy");
4678
4678
 
4679
4679
  // src/components/Markdown/Markdown.tsx
4680
4680
  var import_react32 = __toESM(require("react"));
4681
- var import_react_markdown = __toESM(require("react-markdown"));
4682
4681
  var import_joy43 = require("@mui/joy");
4683
4682
 
4684
4683
  // src/libs/rehype-accent/index.ts
@@ -4719,6 +4718,7 @@ function rehypeAccent(options) {
4719
4718
  }
4720
4719
 
4721
4720
  // src/components/Markdown/Markdown.tsx
4721
+ var LazyReactMarkdown = (0, import_react32.lazy)(() => import("react-markdown"));
4722
4722
  var Markdown = (props) => {
4723
4723
  const {
4724
4724
  color,
@@ -4740,8 +4740,8 @@ var Markdown = (props) => {
4740
4740
  level: defaultLevel,
4741
4741
  ...innerProps
4742
4742
  },
4743
- /* @__PURE__ */ import_react32.default.createElement(
4744
- import_react_markdown.default,
4743
+ /* @__PURE__ */ import_react32.default.createElement(import_react32.Suspense, { fallback: null }, /* @__PURE__ */ import_react32.default.createElement(
4744
+ LazyReactMarkdown,
4745
4745
  {
4746
4746
  ...markdownOptions,
4747
4747
  children: content,
@@ -4751,18 +4751,16 @@ var Markdown = (props) => {
4751
4751
  h2: ({ children }) => /* @__PURE__ */ import_react32.default.createElement(Typography, { color, textColor, level: "h2" }, children),
4752
4752
  h3: ({ children }) => /* @__PURE__ */ import_react32.default.createElement(Typography, { color, textColor, level: "h3" }, children),
4753
4753
  h4: ({ children }) => /* @__PURE__ */ import_react32.default.createElement(Typography, { color, textColor, level: "h4" }, children),
4754
- p: ({ children, node }) => {
4755
- return /* @__PURE__ */ import_react32.default.createElement(
4756
- Typography,
4757
- {
4758
- color,
4759
- textColor,
4760
- level: defaultLevel,
4761
- ...node?.properties
4762
- },
4763
- children
4764
- );
4765
- },
4754
+ p: ({ children, node }) => /* @__PURE__ */ import_react32.default.createElement(
4755
+ Typography,
4756
+ {
4757
+ color,
4758
+ textColor,
4759
+ level: defaultLevel,
4760
+ ...node?.properties
4761
+ },
4762
+ children
4763
+ ),
4766
4764
  a: ({ children, href }) => /* @__PURE__ */ import_react32.default.createElement(import_joy43.Link, { href, target: defaultLinkAction }, children),
4767
4765
  hr: () => /* @__PURE__ */ import_react32.default.createElement(Divider, null),
4768
4766
  b: ({ children }) => /* @__PURE__ */ import_react32.default.createElement(Typography, { fontWeight: boldFontWeight }, children),
@@ -4770,7 +4768,7 @@ var Markdown = (props) => {
4770
4768
  ...markdownOptions?.components
4771
4769
  }
4772
4770
  }
4773
- )
4771
+ ))
4774
4772
  );
4775
4773
  };
4776
4774
  Markdown.displayName = "Markdown";
package/dist/index.js CHANGED
@@ -4639,8 +4639,7 @@ Uploader.displayName = "Uploader";
4639
4639
  import { Grid } from "@mui/joy";
4640
4640
 
4641
4641
  // src/components/Markdown/Markdown.tsx
4642
- import React30 from "react";
4643
- import ReactMarkdown from "react-markdown";
4642
+ import React30, { lazy, Suspense } from "react";
4644
4643
  import { Link as Link2 } from "@mui/joy";
4645
4644
 
4646
4645
  // src/libs/rehype-accent/index.ts
@@ -4681,6 +4680,7 @@ function rehypeAccent(options) {
4681
4680
  }
4682
4681
 
4683
4682
  // src/components/Markdown/Markdown.tsx
4683
+ var LazyReactMarkdown = lazy(() => import("react-markdown"));
4684
4684
  var Markdown = (props) => {
4685
4685
  const {
4686
4686
  color,
@@ -4702,8 +4702,8 @@ var Markdown = (props) => {
4702
4702
  level: defaultLevel,
4703
4703
  ...innerProps
4704
4704
  },
4705
- /* @__PURE__ */ React30.createElement(
4706
- ReactMarkdown,
4705
+ /* @__PURE__ */ React30.createElement(Suspense, { fallback: null }, /* @__PURE__ */ React30.createElement(
4706
+ LazyReactMarkdown,
4707
4707
  {
4708
4708
  ...markdownOptions,
4709
4709
  children: content,
@@ -4713,18 +4713,16 @@ var Markdown = (props) => {
4713
4713
  h2: ({ children }) => /* @__PURE__ */ React30.createElement(Typography, { color, textColor, level: "h2" }, children),
4714
4714
  h3: ({ children }) => /* @__PURE__ */ React30.createElement(Typography, { color, textColor, level: "h3" }, children),
4715
4715
  h4: ({ children }) => /* @__PURE__ */ React30.createElement(Typography, { color, textColor, level: "h4" }, children),
4716
- p: ({ children, node }) => {
4717
- return /* @__PURE__ */ React30.createElement(
4718
- Typography,
4719
- {
4720
- color,
4721
- textColor,
4722
- level: defaultLevel,
4723
- ...node?.properties
4724
- },
4725
- children
4726
- );
4727
- },
4716
+ p: ({ children, node }) => /* @__PURE__ */ React30.createElement(
4717
+ Typography,
4718
+ {
4719
+ color,
4720
+ textColor,
4721
+ level: defaultLevel,
4722
+ ...node?.properties
4723
+ },
4724
+ children
4725
+ ),
4728
4726
  a: ({ children, href }) => /* @__PURE__ */ React30.createElement(Link2, { href, target: defaultLinkAction }, children),
4729
4727
  hr: () => /* @__PURE__ */ React30.createElement(Divider, null),
4730
4728
  b: ({ children }) => /* @__PURE__ */ React30.createElement(Typography, { fontWeight: boldFontWeight }, children),
@@ -4732,7 +4730,7 @@ var Markdown = (props) => {
4732
4730
  ...markdownOptions?.components
4733
4731
  }
4734
4732
  }
4735
- )
4733
+ ))
4736
4734
  );
4737
4735
  };
4738
4736
  Markdown.displayName = "Markdown";