@brevitaz/brv-text-editor 1.2.1 โ†’ 1.3.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.
@@ -24410,7 +24410,7 @@ ${prefix}
24410
24410
  ))
24411
24411
  );
24412
24412
  }
24413
- function Toolbar({ editor, groups }) {
24413
+ function Toolbar({ editor, groups, bare }) {
24414
24414
  const [showLinkDialog, setShowLinkDialog] = React$1.useState(false);
24415
24415
  const [showImageDialog, setShowImageDialog] = React$1.useState(false);
24416
24416
  const [showHeadingMenu, setShowHeadingMenu] = React$1.useState(false);
@@ -24565,7 +24565,7 @@ ${prefix}
24565
24565
  padding: "5px 10px",
24566
24566
  borderBottom: "1px solid var(--rte-border-toolbar)",
24567
24567
  background: "var(--rte-surface-toolbar)",
24568
- borderRadius: "calc(var(--rte-radius) - 1px) calc(var(--rte-radius) - 1px) 0 0",
24568
+ borderRadius: bare ? 0 : "calc(var(--rte-radius) - 1px) calc(var(--rte-radius) - 1px) 0 0",
24569
24569
  position: "relative",
24570
24570
  userSelect: "none"
24571
24571
  }
@@ -24573,7 +24573,7 @@ ${prefix}
24573
24573
  sections
24574
24574
  );
24575
24575
  }
24576
- function EditorFooter({ editor, onSubmit, onCancel, submitLabel, showActions }) {
24576
+ function EditorFooter({ editor, onSubmit, onCancel, submitLabel, showActions, bare }) {
24577
24577
  if (!editor) return null;
24578
24578
  const text = editor.getText();
24579
24579
  const wordCount = text.trim() ? text.trim().split(/\s+/).length : 0;
@@ -24588,7 +24588,7 @@ ${prefix}
24588
24588
  padding: "7px 12px",
24589
24589
  borderTop: "1px solid var(--rte-border-toolbar)",
24590
24590
  background: "var(--rte-surface-toolbar)",
24591
- borderRadius: "0 0 calc(var(--rte-radius) - 1px) calc(var(--rte-radius) - 1px)"
24591
+ borderRadius: bare ? 0 : "0 0 calc(var(--rte-radius) - 1px) calc(var(--rte-radius) - 1px)"
24592
24592
  }
24593
24593
  },
24594
24594
  /* @__PURE__ */ React.createElement("span", { style: { fontSize: 11, color: "var(--rte-text-muted)", fontFamily: "var(--rte-font-family)" } }, wordCount, " word", wordCount !== 1 ? "s" : "", " ยท ", charCount, " char", charCount !== 1 ? "s" : ""),
@@ -24642,6 +24642,7 @@ ${prefix}
24642
24642
  minHeight = 140,
24643
24643
  autofocus = false,
24644
24644
  className = "",
24645
+ variant = "default",
24645
24646
  theme = "unleashteams",
24646
24647
  themeVars = {},
24647
24648
  toolbar = {}
@@ -24701,23 +24702,27 @@ ${prefix}
24701
24702
  });
24702
24703
  const presetVars = RTE_THEMES[theme] ?? {};
24703
24704
  const resolvedVars = { ...presetVars, ...themeVars };
24705
+ const isBare = variant === "bare";
24704
24706
  return /* @__PURE__ */ React.createElement(
24705
24707
  "div",
24706
24708
  {
24707
24709
  className: `rte-root editor-wrapper ${className}`.trim(),
24708
24710
  "data-rte-theme": theme,
24711
+ "data-rte-variant": variant,
24709
24712
  style: {
24710
- border: "1px solid var(--rte-border)",
24711
- borderRadius: "var(--rte-radius)",
24712
- background: "var(--rte-surface)",
24713
+ ...isBare ? {} : {
24714
+ border: "1px solid var(--rte-border)",
24715
+ borderRadius: "var(--rte-radius)",
24716
+ background: "var(--rte-surface)",
24717
+ overflow: "hidden",
24718
+ transition: "box-shadow 0.15s, border-color 0.15s"
24719
+ },
24713
24720
  display: "flex",
24714
24721
  flexDirection: "column",
24715
- overflow: "hidden",
24716
- transition: "box-shadow 0.15s, border-color 0.15s",
24717
24722
  ...resolvedVars
24718
24723
  }
24719
24724
  },
24720
- /* @__PURE__ */ React.createElement(Toolbar, { editor, groups: resolvedToolbar }),
24725
+ /* @__PURE__ */ React.createElement(Toolbar, { editor, groups: resolvedToolbar, bare: isBare }),
24721
24726
  /* @__PURE__ */ React.createElement(
24722
24727
  "div",
24723
24728
  {
@@ -24734,7 +24739,8 @@ ${prefix}
24734
24739
  onSubmit,
24735
24740
  onCancel,
24736
24741
  submitLabel,
24737
- showActions
24742
+ showActions,
24743
+ bare: isBare
24738
24744
  }
24739
24745
  )
24740
24746
  );
@@ -24773,6 +24779,7 @@ ${prefix}
24773
24779
  }
24774
24780
  function RichTextPreview({
24775
24781
  html = "",
24782
+ variant = "default",
24776
24783
  showReactions = true,
24777
24784
  reactions = ["๐Ÿ‘", "โค๏ธ", "๐ŸŽ‰", "๐Ÿ™Œ"],
24778
24785
  theme = "unleashteams",
@@ -24780,21 +24787,25 @@ ${prefix}
24780
24787
  }) {
24781
24788
  const presetVars = RTE_THEMES[theme] ?? {};
24782
24789
  const resolvedVars = { ...presetVars, ...themeVars };
24790
+ const isBare = variant === "bare";
24783
24791
  return /* @__PURE__ */ React.createElement(
24784
24792
  "div",
24785
24793
  {
24786
24794
  className: "rte-root",
24787
24795
  "data-rte-theme": theme,
24796
+ "data-rte-variant": variant,
24788
24797
  style: {
24789
24798
  width: "100%",
24790
- maxWidth: 720,
24791
- marginTop: 20,
24792
- background: "var(--rte-surface)",
24793
- borderRadius: "var(--rte-radius-lg)",
24794
- boxShadow: "0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04)",
24795
- overflow: "hidden",
24796
- animation: "rtp-slideDown 0.22s ease",
24797
- border: "1px solid var(--rte-border)",
24799
+ ...isBare ? {} : {
24800
+ maxWidth: 720,
24801
+ marginTop: 20,
24802
+ background: "var(--rte-surface)",
24803
+ borderRadius: "var(--rte-radius-lg)",
24804
+ boxShadow: "0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04)",
24805
+ overflow: "hidden",
24806
+ animation: "rtp-slideDown 0.22s ease",
24807
+ border: "1px solid var(--rte-border)"
24808
+ },
24798
24809
  ...resolvedVars
24799
24810
  }
24800
24811
  },
@@ -24803,7 +24814,7 @@ ${prefix}
24803
24814
  {
24804
24815
  className: "rtp-content",
24805
24816
  dangerouslySetInnerHTML: { __html: html },
24806
- style: { padding: "14px 22px 20px" }
24817
+ style: { padding: isBare ? "0" : "14px 22px 20px" }
24807
24818
  }
24808
24819
  ),
24809
24820
  showReactions && reactions.length > 0 && /* @__PURE__ */ React.createElement(