odaptos_design_system 2.0.347 → 2.0.349

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 CHANGED
@@ -319,7 +319,9 @@ style_inject_es_default(css_248z$82);
319
319
  * Supports: **bold**, *italic*, __underline__ (or <u>underline</u>), `code`, line breaks, and simple lists.
320
320
  */
321
321
  const renderInlineMarkdown = (rawText) => {
322
- if (!rawText) return rawText;
322
+ if (rawText === null || rawText === void 0) return rawText;
323
+ if (typeof rawText !== "string") return rawText;
324
+ if (rawText.length === 0) return rawText;
323
325
  const renderCode = (text) => {
324
326
  return text.split(/`([^`]+)`/g).map((part, index) => {
325
327
  if (!(index % 2 === 1)) return part;
@@ -356,9 +358,16 @@ const renderInlineMarkdown = (rawText) => {
356
358
  });
357
359
  };
358
360
  const renderHtmlUnderline = (text) => {
361
+ const renderUnderlineContent = (underlineText) => {
362
+ const tripleStarAsStrongNodes = underlineText.split(/\*\*\*([^*]+)\*\*\*/g).map((part, index) => {
363
+ if (!(index % 2 === 1)) return part;
364
+ return /* @__PURE__ */ react.default.createElement("strong", { key: `u-strong-em-from-triple-${index}` }, /* @__PURE__ */ react.default.createElement("em", null, part));
365
+ });
366
+ return renderStrongAndEm(tripleStarAsStrongNodes);
367
+ };
359
368
  return text.split(/<u>(.*?)<\/u>/g).map((part, index) => {
360
369
  if (!(index % 2 === 1)) return part;
361
- return /* @__PURE__ */ react.default.createElement("u", { key: `u-html-${index}` }, part);
370
+ return /* @__PURE__ */ react.default.createElement("u", { key: `u-html-${index}` }, renderUnderlineContent(part));
362
371
  });
363
372
  };
364
373
  const renderUnderline = (text) => {
@@ -373,6 +382,12 @@ const renderInlineMarkdown = (rawText) => {
373
382
  return /* @__PURE__ */ react.default.createElement("strong", { key: `strong-${index}` }, part);
374
383
  });
375
384
  };
385
+ const renderStrongAndEmphasis = (text) => {
386
+ return text.split(/\*\*\*([^*]+)\*\*\*/g).map((part, index) => {
387
+ if (!(index % 2 === 1)) return part;
388
+ return /* @__PURE__ */ react.default.createElement("strong", { key: `strong-em-${index}` }, /* @__PURE__ */ react.default.createElement("u", null, part));
389
+ });
390
+ };
376
391
  const renderEm = (text) => {
377
392
  return text.split(/\*([^*]+)\*/g).map((part, index) => {
378
393
  if (!(index % 2 === 1)) return part;
@@ -398,7 +413,10 @@ const renderInlineMarkdown = (rawText) => {
398
413
  return renderUnderline(htmlUnderlineNode);
399
414
  }).flatMap((underlineNode) => {
400
415
  if (typeof underlineNode !== "string") return [underlineNode];
401
- return renderStrong(underlineNode);
416
+ return renderStrongAndEmphasis(underlineNode);
417
+ }).flatMap((strongAndEmphasisNode) => {
418
+ if (typeof strongAndEmphasisNode !== "string") return [strongAndEmphasisNode];
419
+ return renderStrong(strongAndEmphasisNode);
402
420
  }).flatMap((strongNode) => {
403
421
  if (typeof strongNode !== "string") return [strongNode];
404
422
  return renderEm(strongNode);