@superinterface/react 2.9.0 → 2.9.1

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
@@ -3082,7 +3082,7 @@ var unsupportedNames = [
3082
3082
  var isHtmlAudioSupported = !unsupportedNames.includes(((_this = (0, import_detect_browser.detect)()) === null || _this === void 0 ? void 0 : _this.name) || "");
3083
3083
  // src/hooks/audioThreads/useMessageAudio/index.ts
3084
3084
  var SPLIT_SENTENCE_REGEX = /[^\.\?!]+[\.\?!]/g;
3085
- var FULL_SENTENCE_REGEX = /^\s*[A-Z].*[.?!]$/;
3085
+ var FULL_SENTENCE_REGEX = /[\.?!]$/;
3086
3086
  var getMessageSentences = function(param) {
3087
3087
  var messageId = param.messageId, input2 = param.input;
3088
3088
  var sentences = input2.match(SPLIT_SENTENCE_REGEX) || [];
@@ -3180,6 +3180,15 @@ var useMessageAudio = function(param) {
3180
3180
  playedMessageSentences,
3181
3181
  onEnd
3182
3182
  ]);
3183
+ (0, import_react40.useEffect)(function() {
3184
+ if (isHtmlAudioSupported) {
3185
+ var _import_howler_Howler__howls___sounds_, _import_howler_Howler__howls_, _import_howler_Howler;
3186
+ if (!((_import_howler_Howler = import_howler.Howler) === null || _import_howler_Howler === void 0 ? void 0 : (_import_howler_Howler__howls_ = _import_howler_Howler._howls[0]) === null || _import_howler_Howler__howls_ === void 0 ? void 0 : (_import_howler_Howler__howls___sounds_ = _import_howler_Howler__howls_._sounds[0]) === null || _import_howler_Howler__howls___sounds_ === void 0 ? void 0 : _import_howler_Howler__howls___sounds_._node)) return;
3187
+ import_howler.Howler._howls[0]._sounds[0]._node.crossOrigin = "anonymous";
3188
+ }
3189
+ }, [
3190
+ audioPlayer
3191
+ ]);
3183
3192
  var _ref3 = _sliced_to_array((0, import_react40.useState)(null), 2), audioEngine = _ref3[0], setAudioEngine = _ref3[1];
3184
3193
  var isAudioEngineInited = (0, import_react40.useRef)(false);
3185
3194
  (0, import_react40.useEffect)(function() {
@@ -3417,15 +3426,16 @@ var ActionButton = function() {
3417
3426
  onClick: audioThreadContext.recorderProps.pause,
3418
3427
  color: "gray",
3419
3428
  radius: "full",
3429
+ variant: "soft",
3420
3430
  size: "1",
3421
3431
  children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_icons9.PauseIcon, {})
3422
3432
  })
3423
3433
  }),
3424
3434
  /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_themes44.IconButton, {
3425
3435
  onClick: audioThreadContext.recorderProps.stop,
3426
- color: "gray",
3427
3436
  highContrast: true,
3428
3437
  radius: "full",
3438
+ variant: "soft",
3429
3439
  size: "4",
3430
3440
  style: {
3431
3441
  border: "2px solid var(--gray-8)"
@@ -3468,6 +3478,7 @@ var ActionButton = function() {
3468
3478
  size: "4",
3469
3479
  color: "gray",
3470
3480
  radius: "full",
3481
+ variant: "soft",
3471
3482
  style: {
3472
3483
  border: "2px solid var(--gray-8)"
3473
3484
  },
@@ -3482,7 +3493,6 @@ var ActionButton = function() {
3482
3493
  size: "4",
3483
3494
  radius: "full",
3484
3495
  style: {
3485
- backgroundColor: "var(--accent-11)",
3486
3496
  border: "2px solid var(--gray-8)"
3487
3497
  },
3488
3498
  children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_icons9.ResumeIcon, {})
@@ -3490,8 +3500,8 @@ var ActionButton = function() {
3490
3500
  }
3491
3501
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_themes44.IconButton, {
3492
3502
  size: "4",
3493
- color: "red",
3494
3503
  radius: "full",
3504
+ variant: "soft",
3495
3505
  disabled: true,
3496
3506
  style: {
3497
3507
  border: "2px solid var(--gray-8)"