@bbl-digital/snorre 4.3.4 → 4.3.5
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/esm/core/Html/index.js
CHANGED
@@ -33,10 +33,9 @@ const Html = ({
|
|
33
33
|
};
|
34
34
|
let safeHtml = sanitize ? _dompurify.default.sanitize(text, _sanitizeOptions) : text;
|
35
35
|
safeHtml = safeHtml.replace(/ /g, ' ');
|
36
|
-
const classes = `snorre-html ${className || ''}`;
|
37
36
|
return (0, _jsxRuntime.jsx)("div", {
|
38
|
-
className: classes,
|
39
37
|
css: theme => [_styles.styles.default(theme), secondary && _styles.styles.secondary(theme), dark && _styles.styles.dark(theme), size && _styles.styles.size(size), _styles.styles.whiteSpace(whiteSpace ? whiteSpace : 'pre-wrap'), removeMargins && _styles.styles.removeMargins],
|
38
|
+
className: className || '',
|
40
39
|
dangerouslySetInnerHTML: {
|
41
40
|
__html: externalLinks ? safeHtml.replace(/href/g, "target='_blank' href") : safeHtml
|
42
41
|
}
|
package/esm/core/Html/styles.js
CHANGED
@@ -7,7 +7,7 @@ exports.styles = exports.default = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
8
8
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
9
9
|
const styles = exports.styles = {
|
10
|
-
default: theme => /*#__PURE__*/(0, _react.css)("padding:0px!important;font-size:16px;color:", theme.defaultText, ";max-width:100%;*{max-width:100%;}h1,h2,h3,h4,h5,h6,p,ul,ol{margin:0;}a{color:", theme.primary, ";text-decoration:underline;cursor:pointer;}li::marker{margin-right:0.5em;}p{min-height:22px;margin-bottom:1em;}.ql-indent-1{padding-inline-start:30px;}.ql-indent-2{padding-inline-start:60px;}.ql-indent-3{padding-inline-start:90px;}.ql-indent-4{padding-inline-start:120px;}.ql-indent-5{padding-inline-start:150px;}.ql-indent-6{padding-inline-start:180px;}.ql-indent-7{padding-inline-start:210px;}.ql-indent-8{padding-inline-start:240px;}.ql-indent-9{padding-inline-start:270px;}.ql-indent-10{padding-inline-start:300px;}.video-container{position:relative;width:100%;padding-bottom:56.25%;height:0;overflow:hidden;}.video-container iframe{position:absolute;top:0;left:0;width:100%;height:100%;}" + (process.env.NODE_ENV === "production" ? "" : ";label:default;")),
|
10
|
+
default: theme => /*#__PURE__*/(0, _react.css)("padding:0px!important;font-size:16px;color:", theme.defaultText, ";max-width:100%;*{max-width:100%;}h1,h2,h3,h4,h5,h6,p,ul,ol{margin:0;}a{color:", theme.primary, ";text-decoration:underline;cursor:pointer;}li::marker{margin-right:0.5em;}p{min-height:22px;margin-bottom:1em;}ul{list-style-type:disc;padding-left:40px;}ul ul{list-style-type:circle;}ul ul ul{list-style-type:square;}ol{list-style-type:decimal;padding-left:40px;}.ql-indent-1{padding-inline-start:30px;}.ql-indent-2{padding-inline-start:60px;}.ql-indent-3{padding-inline-start:90px;}.ql-indent-4{padding-inline-start:120px;}.ql-indent-5{padding-inline-start:150px;}.ql-indent-6{padding-inline-start:180px;}.ql-indent-7{padding-inline-start:210px;}.ql-indent-8{padding-inline-start:240px;}.ql-indent-9{padding-inline-start:270px;}.ql-indent-10{padding-inline-start:300px;}.video-container{position:relative;width:100%;padding-bottom:56.25%;height:0;overflow:hidden;}.video-container iframe{position:absolute;top:0;left:0;width:100%;height:100%;}" + (process.env.NODE_ENV === "production" ? "" : ";label:default;")),
|
11
11
|
secondary: theme => /*#__PURE__*/(0, _react.css)({
|
12
12
|
color: theme.secondary
|
13
13
|
}, process.env.NODE_ENV === "production" ? "" : ";label:secondary;"),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Html/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,2BAA2B,CAAA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AQ,CAAC,EAAE,OAAO,CAAA;IAClB,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,uBAAuB;IACvB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,QAAA,MAAM,IAAI,GAAI,8HAYX,MAAM,qDA8BR,CAAA;AAED,eAAe,IAAI,CAAA"}
|
package/lib/core/Html/index.js
CHANGED
@@ -33,10 +33,9 @@ const Html = ({
|
|
33
33
|
};
|
34
34
|
let safeHtml = sanitize ? _dompurify.default.sanitize(text, _sanitizeOptions) : text;
|
35
35
|
safeHtml = safeHtml.replace(/ /g, ' ');
|
36
|
-
const classes = `snorre-html ${className || ''}`;
|
37
36
|
return (0, _jsxRuntime.jsx)("div", {
|
38
|
-
className: classes,
|
39
37
|
css: theme => [_styles.styles.default(theme), secondary && _styles.styles.secondary(theme), dark && _styles.styles.dark(theme), size && _styles.styles.size(size), _styles.styles.whiteSpace(whiteSpace ? whiteSpace : 'pre-wrap'), removeMargins && _styles.styles.removeMargins],
|
38
|
+
className: className || '',
|
40
39
|
dangerouslySetInnerHTML: {
|
41
40
|
__html: externalLinks ? safeHtml.replace(/href/g, "target='_blank' href") : safeHtml
|
42
41
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Html/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,QAAA,MAAM,MAAM;qBACO,SAAS;
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Html/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,QAAA,MAAM,MAAM;qBACO,SAAS;uBAsGP,SAAS;kBAId,SAAS;iBAIV,MAAM;wBACC,MAAM;;CAkB3B,CAAA;AAED,eAAe,MAAM,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/lib/core/Html/styles.js
CHANGED
@@ -7,7 +7,7 @@ exports.styles = exports.default = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
8
8
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
9
9
|
const styles = exports.styles = {
|
10
|
-
default: theme => /*#__PURE__*/(0, _react.css)("padding:0px!important;font-size:16px;color:", theme.defaultText, ";max-width:100%;*{max-width:100%;}h1,h2,h3,h4,h5,h6,p,ul,ol{margin:0;}a{color:", theme.primary, ";text-decoration:underline;cursor:pointer;}li::marker{margin-right:0.5em;}p{min-height:22px;margin-bottom:1em;}.ql-indent-1{padding-inline-start:30px;}.ql-indent-2{padding-inline-start:60px;}.ql-indent-3{padding-inline-start:90px;}.ql-indent-4{padding-inline-start:120px;}.ql-indent-5{padding-inline-start:150px;}.ql-indent-6{padding-inline-start:180px;}.ql-indent-7{padding-inline-start:210px;}.ql-indent-8{padding-inline-start:240px;}.ql-indent-9{padding-inline-start:270px;}.ql-indent-10{padding-inline-start:300px;}.video-container{position:relative;width:100%;padding-bottom:56.25%;height:0;overflow:hidden;}.video-container iframe{position:absolute;top:0;left:0;width:100%;height:100%;}" + (process.env.NODE_ENV === "production" ? "" : ";label:default;")),
|
10
|
+
default: theme => /*#__PURE__*/(0, _react.css)("padding:0px!important;font-size:16px;color:", theme.defaultText, ";max-width:100%;*{max-width:100%;}h1,h2,h3,h4,h5,h6,p,ul,ol{margin:0;}a{color:", theme.primary, ";text-decoration:underline;cursor:pointer;}li::marker{margin-right:0.5em;}p{min-height:22px;margin-bottom:1em;}ul{list-style-type:disc;padding-left:40px;}ul ul{list-style-type:circle;}ul ul ul{list-style-type:square;}ol{list-style-type:decimal;padding-left:40px;}.ql-indent-1{padding-inline-start:30px;}.ql-indent-2{padding-inline-start:60px;}.ql-indent-3{padding-inline-start:90px;}.ql-indent-4{padding-inline-start:120px;}.ql-indent-5{padding-inline-start:150px;}.ql-indent-6{padding-inline-start:180px;}.ql-indent-7{padding-inline-start:210px;}.ql-indent-8{padding-inline-start:240px;}.ql-indent-9{padding-inline-start:270px;}.ql-indent-10{padding-inline-start:300px;}.video-container{position:relative;width:100%;padding-bottom:56.25%;height:0;overflow:hidden;}.video-container iframe{position:absolute;top:0;left:0;width:100%;height:100%;}" + (process.env.NODE_ENV === "production" ? "" : ";label:default;")),
|
11
11
|
secondary: theme => /*#__PURE__*/(0, _react.css)({
|
12
12
|
color: theme.secondary
|
13
13
|
}, process.env.NODE_ENV === "production" ? "" : ";label:secondary;"),
|