@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260519043006 → 0.8.1-dev.20260519044944
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.js +10 -14
- package/dist/index.mjs +10 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3232,19 +3232,13 @@ var TextNode = (props) => {
|
|
|
3232
3232
|
}
|
|
3233
3233
|
function getFormatClass(format) {
|
|
3234
3234
|
const classes = [];
|
|
3235
|
-
if (format
|
|
3236
|
-
if (format
|
|
3237
|
-
if (format
|
|
3238
|
-
if (format
|
|
3239
|
-
if (format
|
|
3240
|
-
if (format
|
|
3241
|
-
if (format
|
|
3242
|
-
if (format === 11) classes.push("font-medium italic underline");
|
|
3243
|
-
if (format === 32) classes.push("subscript");
|
|
3244
|
-
if (format === 64) classes.push("superscript");
|
|
3245
|
-
if (format === 256) classes.push("lowercase");
|
|
3246
|
-
if (format === 512) classes.push("uppercase");
|
|
3247
|
-
if (format === 1024) classes.push("capitalize");
|
|
3235
|
+
if (format & 1) classes.push("font-medium");
|
|
3236
|
+
if (format & 2) classes.push("italic");
|
|
3237
|
+
if (format & 4) classes.push("line-through");
|
|
3238
|
+
if (format & 8) classes.push("underline");
|
|
3239
|
+
if (format & 256) classes.push("lowercase");
|
|
3240
|
+
if (format & 512) classes.push("uppercase");
|
|
3241
|
+
if (format & 1024) classes.push("capitalize");
|
|
3248
3242
|
return classes.join(" ");
|
|
3249
3243
|
}
|
|
3250
3244
|
const styles = convertKeysToCamelCase2(cssStringToJson(props.node.style));
|
|
@@ -3265,9 +3259,11 @@ var TextNode = (props) => {
|
|
|
3265
3259
|
}
|
|
3266
3260
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
3267
3261
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
3262
|
+
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
3263
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("sub", { children: content }) : content;
|
|
3268
3264
|
return (
|
|
3269
3265
|
// @ts-expect-error custom code
|
|
3270
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children:
|
|
3266
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
3271
3267
|
);
|
|
3272
3268
|
};
|
|
3273
3269
|
var TextNode_default = TextNode;
|
package/dist/index.mjs
CHANGED
|
@@ -1792,19 +1792,13 @@ var TextNode = (props) => {
|
|
|
1792
1792
|
}
|
|
1793
1793
|
function getFormatClass(format) {
|
|
1794
1794
|
const classes = [];
|
|
1795
|
-
if (format
|
|
1796
|
-
if (format
|
|
1797
|
-
if (format
|
|
1798
|
-
if (format
|
|
1799
|
-
if (format
|
|
1800
|
-
if (format
|
|
1801
|
-
if (format
|
|
1802
|
-
if (format === 11) classes.push("font-medium italic underline");
|
|
1803
|
-
if (format === 32) classes.push("subscript");
|
|
1804
|
-
if (format === 64) classes.push("superscript");
|
|
1805
|
-
if (format === 256) classes.push("lowercase");
|
|
1806
|
-
if (format === 512) classes.push("uppercase");
|
|
1807
|
-
if (format === 1024) classes.push("capitalize");
|
|
1795
|
+
if (format & 1) classes.push("font-medium");
|
|
1796
|
+
if (format & 2) classes.push("italic");
|
|
1797
|
+
if (format & 4) classes.push("line-through");
|
|
1798
|
+
if (format & 8) classes.push("underline");
|
|
1799
|
+
if (format & 256) classes.push("lowercase");
|
|
1800
|
+
if (format & 512) classes.push("uppercase");
|
|
1801
|
+
if (format & 1024) classes.push("capitalize");
|
|
1808
1802
|
return classes.join(" ");
|
|
1809
1803
|
}
|
|
1810
1804
|
const styles = convertKeysToCamelCase2(cssStringToJson(props.node.style));
|
|
@@ -1825,9 +1819,11 @@ var TextNode = (props) => {
|
|
|
1825
1819
|
}
|
|
1826
1820
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
1827
1821
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
1822
|
+
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
1823
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ jsx34("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ jsx34("sub", { children: content }) : content;
|
|
1828
1824
|
return (
|
|
1829
1825
|
// @ts-expect-error custom code
|
|
1830
|
-
/* @__PURE__ */ jsx34("span", { style: { ...styles }, className: getFormatClass(props.node.format), children:
|
|
1826
|
+
/* @__PURE__ */ jsx34("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
1831
1827
|
);
|
|
1832
1828
|
};
|
|
1833
1829
|
var TextNode_default = TextNode;
|
package/package.json
CHANGED