@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 +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
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;
|