@launchpad-ui/markdown
Advanced tools
Comparing version 0.3.14 to 0.3.15
import './style.css'; | ||
import { jsx } from "react/jsx-runtime"; | ||
import { cx } from "classix"; | ||
import DOMPurify from "isomorphic-dompurify"; | ||
import { marked } from "marked"; | ||
import { jsx } from "react/jsx-runtime"; | ||
const Markdown$1 = "_Markdown_1lphk_1"; | ||
@@ -61,13 +61,13 @@ const styles = { | ||
const classes = cx(styles.Markdown, className); | ||
return /* @__PURE__ */ jsx(Container, { | ||
className: classes, | ||
dangerouslySetInnerHTML: { | ||
__html: renderMarkdown(source, { | ||
baseUri, | ||
allowedTags | ||
}) | ||
}, | ||
ref: textRef, | ||
"data-test-id": testId | ||
}); | ||
return /* @__PURE__ */ jsx( | ||
Container, | ||
{ | ||
className: classes, | ||
dangerouslySetInnerHTML: { | ||
__html: renderMarkdown(source, { baseUri, allowedTags }) | ||
}, | ||
ref: textRef, | ||
"data-test-id": testId | ||
} | ||
); | ||
}; | ||
@@ -74,0 +74,0 @@ export { |
require('./style.css'); | ||
"use strict"; | ||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); | ||
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); | ||
const jsxRuntime = require("react/jsx-runtime"); | ||
const classix = require("classix"); | ||
const DOMPurify = require("isomorphic-dompurify"); | ||
const marked = require("marked"); | ||
const jsxRuntime = require("react/jsx-runtime"); | ||
const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e }; | ||
const DOMPurify__default = /* @__PURE__ */ _interopDefaultLegacy(DOMPurify); | ||
const Markdown$1 = "_Markdown_1lphk_1"; | ||
@@ -45,5 +43,5 @@ const styles = { | ||
} | ||
return DOMPurify__default.default.sanitize(html, sanitizationConfig); | ||
return DOMPurify.sanitize(html, sanitizationConfig); | ||
} | ||
DOMPurify__default.default.addHook("afterSanitizeAttributes", (node) => { | ||
DOMPurify.addHook("afterSanitizeAttributes", (node) => { | ||
if (isAnchorNode(node) && node.target.toLowerCase() === "_blank") { | ||
@@ -66,15 +64,15 @@ node.setAttribute("rel", "noopener noreferrer"); | ||
const classes = classix.cx(styles.Markdown, className); | ||
return /* @__PURE__ */ jsxRuntime.jsx(Container, { | ||
className: classes, | ||
dangerouslySetInnerHTML: { | ||
__html: renderMarkdown(source, { | ||
baseUri, | ||
allowedTags | ||
}) | ||
}, | ||
ref: textRef, | ||
"data-test-id": testId | ||
}); | ||
return /* @__PURE__ */ jsxRuntime.jsx( | ||
Container, | ||
{ | ||
className: classes, | ||
dangerouslySetInnerHTML: { | ||
__html: renderMarkdown(source, { baseUri, allowedTags }) | ||
}, | ||
ref: textRef, | ||
"data-test-id": testId | ||
} | ||
); | ||
}; | ||
exports.Markdown = Markdown; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@launchpad-ui/markdown", | ||
"version": "0.3.14", | ||
"version": "0.3.15", | ||
"status": "beta", | ||
@@ -32,3 +32,3 @@ "publishConfig": { | ||
"marked": "^4.2.2", | ||
"@launchpad-ui/tokens": "~0.4.6" | ||
"@launchpad-ui/tokens": "~0.4.7" | ||
}, | ||
@@ -35,0 +35,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17111
200
Updated@launchpad-ui/tokens@~0.4.7