@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260513062810 → 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 CHANGED
@@ -3232,16 +3232,13 @@ var TextNode = (props) => {
3232
3232
  }
3233
3233
  function getFormatClass(format) {
3234
3234
  const classes = [];
3235
- if (format === 1) classes.push("font-medium");
3236
- if (format === 2) classes.push("italic");
3237
- if (format === 3) classes.push("font-medium italic");
3238
- if (format === 8) classes.push("underline");
3239
- if (format === 9) classes.push("font-medium underline");
3240
- if (format === 10) classes.push("italic underline");
3241
- if (format === 11) classes.push("font-medium italic underline");
3242
- if (format === 256) classes.push("lowercase");
3243
- if (format === 512) classes.push("uppercase");
3244
- 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");
3245
3242
  return classes.join(" ");
3246
3243
  }
3247
3244
  const styles = convertKeysToCamelCase2(cssStringToJson(props.node.style));
@@ -3262,9 +3259,11 @@ var TextNode = (props) => {
3262
3259
  }
3263
3260
  const displayText = props.linkText ? props.linkText : props.node.text;
3264
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;
3265
3264
  return (
3266
3265
  // @ts-expect-error custom code
3267
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText })
3266
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
3268
3267
  );
3269
3268
  };
3270
3269
  var TextNode_default = TextNode;
package/dist/index.mjs CHANGED
@@ -1792,16 +1792,13 @@ var TextNode = (props) => {
1792
1792
  }
1793
1793
  function getFormatClass(format) {
1794
1794
  const classes = [];
1795
- if (format === 1) classes.push("font-medium");
1796
- if (format === 2) classes.push("italic");
1797
- if (format === 3) classes.push("font-medium italic");
1798
- if (format === 8) classes.push("underline");
1799
- if (format === 9) classes.push("font-medium underline");
1800
- if (format === 10) classes.push("italic underline");
1801
- if (format === 11) classes.push("font-medium italic underline");
1802
- if (format === 256) classes.push("lowercase");
1803
- if (format === 512) classes.push("uppercase");
1804
- 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");
1805
1802
  return classes.join(" ");
1806
1803
  }
1807
1804
  const styles = convertKeysToCamelCase2(cssStringToJson(props.node.style));
@@ -1822,9 +1819,11 @@ var TextNode = (props) => {
1822
1819
  }
1823
1820
  const displayText = props.linkText ? props.linkText : props.node.text;
1824
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;
1825
1824
  return (
1826
1825
  // @ts-expect-error custom code
1827
- /* @__PURE__ */ jsx34("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText })
1826
+ /* @__PURE__ */ jsx34("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
1828
1827
  );
1829
1828
  };
1830
1829
  var TextNode_default = TextNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acoustte-digital-services/digitalstore-controls-dev",
3
- "version": "0.8.1-dev.20260513062810",
3
+ "version": "0.8.1-dev.20260519044944",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -22,7 +22,7 @@
22
22
  }
23
23
  },
24
24
  "devDependencies": {
25
- "@types/node": "^25.7.0",
25
+ "@types/node": "^25.9.0",
26
26
  "@types/react": "^19",
27
27
  "@types/react-dom": "^19",
28
28
  "tsup": "^8.5.1",