@superinterface/react 3.17.2 → 3.18.0

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
@@ -41681,6 +41681,15 @@ var MarkdownContext = /* @__PURE__ */ (0, import_react25.createContext)({
41681
41681
  var useMarkdownContext = function() {
41682
41682
  return (0, import_react26.useContext)(MarkdownContext);
41683
41683
  };
41684
+ // src/lib/markdown/escapeInvalidTagNames.ts
41685
+ var isValidTagName = function(tagName) {
41686
+ return /^[A-Za-z_][A-Za-z0-9_.:-]*$/.test(tagName);
41687
+ };
41688
+ var escapeInvalidTagNames = function(markdown) {
41689
+ return markdown.replace(/<([^\s>/]+)([^>]*)>/g, function(fullMatch, tagName) {
41690
+ return isValidTagName(tagName) ? fullMatch : fullMatch.replace(/</g, "&lt;").replace(/>/g, "&gt;");
41691
+ });
41692
+ };
41684
41693
  // ../../node_modules/react-error-boundary/dist/react-error-boundary.esm.js
41685
41694
  var import_react27 = require("react");
41686
41695
  var ErrorBoundaryContext = /* @__PURE__ */ (0, import_react27.createContext)(null);
@@ -41914,7 +41923,7 @@ var TextContent = function(t0) {
41914
41923
  ]);
41915
41924
  return [
41916
41925
  4,
41917
- (0, import_mdx.compile)(content2.text.value, {
41926
+ (0, import_mdx.compile)(escapeInvalidTagNames(content2.text.value), {
41918
41927
  outputFormat: "function-body",
41919
41928
  remarkPlugins: remarkPlugins,
41920
41929
  recmaPlugins: [
@@ -42084,7 +42093,7 @@ var MessageContent = function(_ref) {
42084
42093
  // src/components/threads/Thread/Message/index.tsx
42085
42094
  var import_jsx_runtime48 = require("react/jsx-runtime");
42086
42095
  var Message = function(t0) {
42087
- var $ = (0, import_react_compiler_runtime25.c)(50);
42096
+ var $ = (0, import_react_compiler_runtime25.c)(51);
42088
42097
  var message = t0.message, className = t0.className, style = t0.style;
42089
42098
  var t1;
42090
42099
  bb0: {
@@ -42223,102 +42232,112 @@ var Message = function(t0) {
42223
42232
  t4 = $[24];
42224
42233
  }
42225
42234
  var t5;
42235
+ if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
42236
+ t5 = {
42237
+ wordBreak: "break-word"
42238
+ };
42239
+ $[25] = t5;
42240
+ } else {
42241
+ t5 = $[25];
42242
+ }
42226
42243
  var t6;
42227
- if ($[25] !== message) {
42228
- t5 = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Attachments, {
42244
+ var t7;
42245
+ if ($[26] !== message) {
42246
+ t6 = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Attachments, {
42229
42247
  message: message
42230
42248
  });
42231
- t6 = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MessageContent, {
42249
+ t7 = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MessageContent, {
42232
42250
  message: message
42233
42251
  });
42234
- $[25] = message;
42235
- $[26] = t5;
42252
+ $[26] = message;
42236
42253
  $[27] = t6;
42254
+ $[28] = t7;
42237
42255
  } else {
42238
- t5 = $[26];
42239
42256
  t6 = $[27];
42257
+ t7 = $[28];
42240
42258
  }
42241
- var t7;
42242
- if ($[28] !== isInProgress || $[29] !== laterRunSteps_0) {
42243
- t7 = isInProgress && (0, import_radash12.isEmpty)(laterRunSteps_0) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(StartingContentSkeleton, {});
42244
- $[28] = isInProgress;
42245
- $[29] = laterRunSteps_0;
42246
- $[30] = t7;
42259
+ var t8;
42260
+ if ($[29] !== isInProgress || $[30] !== laterRunSteps_0) {
42261
+ t8 = isInProgress && (0, import_radash12.isEmpty)(laterRunSteps_0) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(StartingContentSkeleton, {});
42262
+ $[29] = isInProgress;
42263
+ $[30] = laterRunSteps_0;
42264
+ $[31] = t8;
42247
42265
  } else {
42248
- t7 = $[30];
42266
+ t8 = $[31];
42249
42267
  }
42250
- var t8;
42251
- if ($[31] !== t5 || $[32] !== t6 || $[33] !== t7) {
42252
- t8 = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_themes33.Box, {
42268
+ var t9;
42269
+ if ($[32] !== t6 || $[33] !== t7 || $[34] !== t8) {
42270
+ t9 = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_themes33.Box, {
42271
+ style: t5,
42253
42272
  children: [
42254
- t5,
42255
42273
  t6,
42256
- t7
42274
+ t7,
42275
+ t8
42257
42276
  ]
42258
42277
  });
42259
- $[31] = t5;
42260
42278
  $[32] = t6;
42261
42279
  $[33] = t7;
42262
42280
  $[34] = t8;
42281
+ $[35] = t9;
42263
42282
  } else {
42264
- t8 = $[34];
42283
+ t9 = $[35];
42265
42284
  }
42266
- var t9;
42267
- if ($[35] !== laterRunSteps_0) {
42268
- t9 = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RunSteps, {
42285
+ var t10;
42286
+ if ($[36] !== laterRunSteps_0) {
42287
+ t10 = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RunSteps, {
42269
42288
  runSteps: laterRunSteps_0
42270
42289
  });
42271
- $[35] = laterRunSteps_0;
42272
- $[36] = t9;
42290
+ $[36] = laterRunSteps_0;
42291
+ $[37] = t10;
42273
42292
  } else {
42274
- t9 = $[36];
42293
+ t10 = $[37];
42275
42294
  }
42276
- var t10;
42277
- if ($[37] !== isInProgress || $[38] !== laterRunSteps_0) {
42278
- t10 = isInProgress && !(0, import_radash12.isEmpty)(laterRunSteps_0) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_themes33.Box, {
42295
+ var t11;
42296
+ if ($[38] !== isInProgress || $[39] !== laterRunSteps_0) {
42297
+ t11 = isInProgress && !(0, import_radash12.isEmpty)(laterRunSteps_0) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_themes33.Box, {
42279
42298
  children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(StartingContentSkeleton, {})
42280
42299
  });
42281
- $[37] = isInProgress;
42282
- $[38] = laterRunSteps_0;
42283
- $[39] = t10;
42300
+ $[38] = isInProgress;
42301
+ $[39] = laterRunSteps_0;
42302
+ $[40] = t11;
42284
42303
  } else {
42285
- t10 = $[39];
42304
+ t11 = $[40];
42286
42305
  }
42287
- var t11;
42288
- if ($[40] !== className || $[41] !== style || $[42] !== t10 || $[43] !== t4 || $[44] !== t8 || $[45] !== t9) {
42289
- t11 = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_themes33.Box, {
42306
+ var t12;
42307
+ if ($[41] !== className || $[42] !== style || $[43] !== t10 || $[44] !== t11 || $[45] !== t4 || $[46] !== t9) {
42308
+ t12 = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_themes33.Box, {
42290
42309
  className: className,
42291
42310
  style: style,
42292
42311
  children: [
42293
42312
  t4,
42294
- t8,
42295
42313
  t9,
42296
- t10
42314
+ t10,
42315
+ t11
42297
42316
  ]
42298
42317
  });
42299
- $[40] = className;
42300
- $[41] = style;
42301
- $[42] = t10;
42302
- $[43] = t4;
42303
- $[44] = t8;
42304
- $[45] = t9;
42305
- $[46] = t11;
42318
+ $[41] = className;
42319
+ $[42] = style;
42320
+ $[43] = t10;
42321
+ $[44] = t11;
42322
+ $[45] = t4;
42323
+ $[46] = t9;
42324
+ $[47] = t12;
42306
42325
  } else {
42307
- t11 = $[46];
42326
+ t12 = $[47];
42308
42327
  }
42309
- var t12;
42310
- if ($[47] !== t11 || $[48] !== t3) {
42311
- t12 = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Provider, {
42328
+ var t13;
42329
+ if ($[48] !== t12 || $[49] !== t3) {
42330
+ t13 = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Provider, {
42312
42331
  value: t3,
42313
- children: t11
42332
+ children: t12
42314
42333
  });
42315
- $[47] = t11;
42316
- $[48] = t3;
42317
- $[49] = t12;
42334
+ $[48] = t12;
42335
+ $[49] = t3;
42336
+ $[50] = t13;
42318
42337
  } else {
42319
- t12 = $[49];
42338
+ t13 = $[50];
42320
42339
  }
42321
- return t12;
42340
+ return t13;
42322
42341
  };
42323
42342
  function _temp(runStep_0) {
42324
42343
  return runStep_0.step_details.type === "message_creation";