@ceed/ads 1.19.1-next.1 → 1.20.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.
@@ -26,7 +26,7 @@ interface BaseProfileMenuProps {
26
26
  src: string;
27
27
  alt: string;
28
28
  };
29
- caption?: React.ReactNode;
29
+ caption?: string;
30
30
  chip?: string;
31
31
  };
32
32
  menuItems: ({
package/dist/index.cjs CHANGED
@@ -54,7 +54,7 @@ function rehypeAccent(options) {
54
54
  const innerText = match[0].split("||")[1];
55
55
  newNodes.push({
56
56
  type: "element",
57
- tagName: "p",
57
+ tagName: "span",
58
58
  properties: { textColor: accentColor },
59
59
  children: [{ type: "text", value: innerText }]
60
60
  });
@@ -5962,15 +5962,83 @@ var Markdown = (props) => {
5962
5962
  rehypePlugins: [[rehypeAccent2, { accentColor }]],
5963
5963
  remarkPlugins: [import_remark_gfm.default],
5964
5964
  components: {
5965
- h1: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { color, textColor, level: "h1" }, children),
5966
- h2: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { color, textColor, level: "h2" }, children),
5967
- h3: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { color, textColor, level: "h3" }, children),
5968
- h4: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { color, textColor, level: "h4" }, children),
5969
- p: ({ children, node }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { color, textColor, level: defaultLevel, ...node?.properties }, children),
5970
5965
  a: ({ children, href }) => /* @__PURE__ */ import_react47.default.createElement(import_joy59.Link, { href, target: defaultLinkAction }, children),
5971
- hr: () => /* @__PURE__ */ import_react47.default.createElement(Divider, null),
5972
- b: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { fontWeight: boldFontWeight }, children),
5973
- strong: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { fontWeight: boldFontWeight }, children),
5966
+ hr: () => /* @__PURE__ */ import_react47.default.createElement(Divider, { sx: { display: "block" } }),
5967
+ b: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { component: "strong", fontWeight: boldFontWeight || "lg" }, children),
5968
+ strong: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { component: "strong", fontWeight: boldFontWeight || "lg" }, children),
5969
+ // Table components
5970
+ table: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Sheet, { variant: "outlined", sx: { display: "block", borderRadius: "sm", overflow: "auto" } }, /* @__PURE__ */ import_react47.default.createElement(Table, { size: "sm" }, children)),
5971
+ // Code components
5972
+ code: ({ children, className }) => {
5973
+ const isBlock = className?.startsWith("language-");
5974
+ if (isBlock) {
5975
+ return /* @__PURE__ */ import_react47.default.createElement(
5976
+ Typography,
5977
+ {
5978
+ component: "code",
5979
+ sx: {
5980
+ display: "block",
5981
+ fontFamily: "monospace",
5982
+ fontSize: "0.875em",
5983
+ whiteSpace: "pre"
5984
+ }
5985
+ },
5986
+ children
5987
+ );
5988
+ }
5989
+ return /* @__PURE__ */ import_react47.default.createElement(
5990
+ Typography,
5991
+ {
5992
+ component: "code",
5993
+ sx: {
5994
+ fontFamily: "monospace",
5995
+ fontSize: "0.875em",
5996
+ bgcolor: "neutral.100",
5997
+ px: 0.5,
5998
+ borderRadius: "xs"
5999
+ }
6000
+ },
6001
+ children
6002
+ );
6003
+ },
6004
+ pre: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(
6005
+ Sheet,
6006
+ {
6007
+ variant: "soft",
6008
+ sx: {
6009
+ display: "block",
6010
+ p: 1.5,
6011
+ my: 1,
6012
+ borderRadius: "sm",
6013
+ overflow: "auto",
6014
+ whiteSpace: "pre"
6015
+ }
6016
+ },
6017
+ children
6018
+ ),
6019
+ // Task list checkbox
6020
+ input: ({ checked, type }) => {
6021
+ if (type === "checkbox") {
6022
+ return /* @__PURE__ */ import_react47.default.createElement(Checkbox, { checked, disabled: true, size: "sm", sx: { mr: 1 } });
6023
+ }
6024
+ return /* @__PURE__ */ import_react47.default.createElement("input", { checked, type });
6025
+ },
6026
+ // Blockquote
6027
+ blockquote: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(
6028
+ Sheet,
6029
+ {
6030
+ variant: "soft",
6031
+ sx: { display: "block", borderLeft: 3, borderColor: "primary.500", pl: 2, py: 1, my: 1 }
6032
+ },
6033
+ children
6034
+ ),
6035
+ // Image
6036
+ img: ({ src, alt }) => /* @__PURE__ */ import_react47.default.createElement("img", { src, alt, style: { maxWidth: "100%", borderRadius: "4px" } }),
6037
+ // Text style components
6038
+ em: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { component: "em", sx: { fontStyle: "italic" } }, children),
6039
+ del: ({ children }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { component: "del", sx: { textDecoration: "line-through" } }, children),
6040
+ // Span for accent color (from rehype-accent plugin)
6041
+ span: ({ children, node }) => /* @__PURE__ */ import_react47.default.createElement(Typography, { component: "span", textColor: node?.properties?.textColor }, children),
5974
6042
  ...markdownOptions?.components
5975
6043
  }
5976
6044
  }
package/dist/index.js CHANGED
@@ -33,7 +33,7 @@ function rehypeAccent(options) {
33
33
  const innerText = match[0].split("||")[1];
34
34
  newNodes.push({
35
35
  type: "element",
36
- tagName: "p",
36
+ tagName: "span",
37
37
  properties: { textColor: accentColor },
38
38
  children: [{ type: "text", value: innerText }]
39
39
  });
@@ -5899,15 +5899,83 @@ var Markdown = (props) => {
5899
5899
  rehypePlugins: [[rehypeAccent2, { accentColor }]],
5900
5900
  remarkPlugins: [remarkGfm],
5901
5901
  components: {
5902
- h1: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { color, textColor, level: "h1" }, children),
5903
- h2: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { color, textColor, level: "h2" }, children),
5904
- h3: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { color, textColor, level: "h3" }, children),
5905
- h4: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { color, textColor, level: "h4" }, children),
5906
- p: ({ children, node }) => /* @__PURE__ */ React44.createElement(Typography, { color, textColor, level: defaultLevel, ...node?.properties }, children),
5907
5902
  a: ({ children, href }) => /* @__PURE__ */ React44.createElement(Link2, { href, target: defaultLinkAction }, children),
5908
- hr: () => /* @__PURE__ */ React44.createElement(Divider, null),
5909
- b: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { fontWeight: boldFontWeight }, children),
5910
- strong: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { fontWeight: boldFontWeight }, children),
5903
+ hr: () => /* @__PURE__ */ React44.createElement(Divider, { sx: { display: "block" } }),
5904
+ b: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { component: "strong", fontWeight: boldFontWeight || "lg" }, children),
5905
+ strong: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { component: "strong", fontWeight: boldFontWeight || "lg" }, children),
5906
+ // Table components
5907
+ table: ({ children }) => /* @__PURE__ */ React44.createElement(Sheet, { variant: "outlined", sx: { display: "block", borderRadius: "sm", overflow: "auto" } }, /* @__PURE__ */ React44.createElement(Table, { size: "sm" }, children)),
5908
+ // Code components
5909
+ code: ({ children, className }) => {
5910
+ const isBlock = className?.startsWith("language-");
5911
+ if (isBlock) {
5912
+ return /* @__PURE__ */ React44.createElement(
5913
+ Typography,
5914
+ {
5915
+ component: "code",
5916
+ sx: {
5917
+ display: "block",
5918
+ fontFamily: "monospace",
5919
+ fontSize: "0.875em",
5920
+ whiteSpace: "pre"
5921
+ }
5922
+ },
5923
+ children
5924
+ );
5925
+ }
5926
+ return /* @__PURE__ */ React44.createElement(
5927
+ Typography,
5928
+ {
5929
+ component: "code",
5930
+ sx: {
5931
+ fontFamily: "monospace",
5932
+ fontSize: "0.875em",
5933
+ bgcolor: "neutral.100",
5934
+ px: 0.5,
5935
+ borderRadius: "xs"
5936
+ }
5937
+ },
5938
+ children
5939
+ );
5940
+ },
5941
+ pre: ({ children }) => /* @__PURE__ */ React44.createElement(
5942
+ Sheet,
5943
+ {
5944
+ variant: "soft",
5945
+ sx: {
5946
+ display: "block",
5947
+ p: 1.5,
5948
+ my: 1,
5949
+ borderRadius: "sm",
5950
+ overflow: "auto",
5951
+ whiteSpace: "pre"
5952
+ }
5953
+ },
5954
+ children
5955
+ ),
5956
+ // Task list checkbox
5957
+ input: ({ checked, type }) => {
5958
+ if (type === "checkbox") {
5959
+ return /* @__PURE__ */ React44.createElement(Checkbox, { checked, disabled: true, size: "sm", sx: { mr: 1 } });
5960
+ }
5961
+ return /* @__PURE__ */ React44.createElement("input", { checked, type });
5962
+ },
5963
+ // Blockquote
5964
+ blockquote: ({ children }) => /* @__PURE__ */ React44.createElement(
5965
+ Sheet,
5966
+ {
5967
+ variant: "soft",
5968
+ sx: { display: "block", borderLeft: 3, borderColor: "primary.500", pl: 2, py: 1, my: 1 }
5969
+ },
5970
+ children
5971
+ ),
5972
+ // Image
5973
+ img: ({ src, alt }) => /* @__PURE__ */ React44.createElement("img", { src, alt, style: { maxWidth: "100%", borderRadius: "4px" } }),
5974
+ // Text style components
5975
+ em: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { component: "em", sx: { fontStyle: "italic" } }, children),
5976
+ del: ({ children }) => /* @__PURE__ */ React44.createElement(Typography, { component: "del", sx: { textDecoration: "line-through" } }, children),
5977
+ // Span for accent color (from rehype-accent plugin)
5978
+ span: ({ children, node }) => /* @__PURE__ */ React44.createElement(Typography, { component: "span", textColor: node?.properties?.textColor }, children),
5911
5979
  ...markdownOptions?.components
5912
5980
  }
5913
5981
  }