@glyphjs/runtime 0.2.0 → 0.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.
package/dist/index.cjs CHANGED
@@ -785,6 +785,12 @@ function GlyphRawHtml({ block }) {
785
785
  const clean = DOMPurify__default.default.sanitize(data.value);
786
786
  return /* @__PURE__ */ jsxRuntime.jsx("div", { dangerouslySetInnerHTML: { __html: clean } });
787
787
  }
788
+ function RichText({ content, style, className }) {
789
+ if (Array.isArray(content)) {
790
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { style, className, children: /* @__PURE__ */ jsxRuntime.jsx(InlineRenderer, { nodes: content }) });
791
+ }
792
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { style, className, children: content });
793
+ }
788
794
 
789
795
  // src/renderers/index.ts
790
796
  var builtInRenderers = {
@@ -1773,6 +1779,7 @@ exports.LayoutProvider = LayoutProvider;
1773
1779
  exports.PluginRegistry = PluginRegistry;
1774
1780
  exports.PresentationLayout = PresentationLayout;
1775
1781
  exports.ReferenceIndicator = ReferenceIndicator;
1782
+ exports.RichText = RichText;
1776
1783
  exports.RuntimeProvider = RuntimeProvider;
1777
1784
  exports.SSRPlaceholder = SSRPlaceholder;
1778
1785
  exports.ThemeProvider = ThemeProvider;