@app-studio/web 0.9.61 → 0.9.62

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.
@@ -19037,7 +19037,9 @@
19037
19037
  var updateAlternatingState = index => {
19038
19038
  var currentWordToHighlight = alternateHighlightText[index];
19039
19039
  // Replace the placeholder in the baseText with the current alternating word
19040
- var regex = new RegExp(placeholder, 'gi');
19040
+ // Escape regex special characters in placeholder to prevent errors
19041
+ var escapedPlaceholder = placeholder.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
19042
+ var regex = new RegExp(escapedPlaceholder, 'gi');
19041
19043
  var newContent = baseText.replace(regex, currentWordToHighlight);
19042
19044
  setFinalDisplayedText(newContent);
19043
19045
  setActiveHighlightTarget(currentWordToHighlight); // Set the current word as the highlight target
@@ -19167,12 +19169,10 @@
19167
19169
  */
19168
19170
  var HighlightStyles = {
19169
19171
  underline: color => ({
19170
- style: {
19171
- textDecoration: 'underline',
19172
- textDecorationColor: color,
19173
- textDecorationThickness: '4px',
19174
- textUnderlineOffset: '4px'
19175
- }
19172
+ textDecoration: 'underline',
19173
+ textDecorationColor: color,
19174
+ textDecorationThickness: '4px',
19175
+ textUnderlineOffset: '4px'
19176
19176
  }),
19177
19177
  background: color => ({
19178
19178
  backgroundColor: color,
@@ -19181,21 +19181,17 @@
19181
19181
  borderRadius: '4px'
19182
19182
  }),
19183
19183
  gradient: (color, secondaryColor) => ({
19184
- style: {
19185
- background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
19186
- backgroundClip: 'text',
19187
- WebkitBackgroundClip: 'text',
19188
- WebkitTextFillColor: 'transparent'
19189
- },
19184
+ background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
19185
+ backgroundClip: 'text',
19186
+ WebkitBackgroundClip: 'text !important',
19187
+ WebkitTextFillColor: 'transparent',
19190
19188
  color: 'transparent',
19191
19189
  display: 'inline-block',
19192
19190
  textShadow: 'none'
19193
19191
  }),
19194
19192
  outline: color => ({
19195
- style: {
19196
- WebkitTextStroke: "1px " + color,
19197
- WebkitTextFillColor: 'transparent'
19198
- },
19193
+ WebkitTextStroke: "1px " + color,
19194
+ WebkitTextFillColor: 'transparent !important',
19199
19195
  color: 'transparent',
19200
19196
  textShadow: 'none'
19201
19197
  }),
@@ -19272,18 +19268,17 @@
19272
19268
  }, [textArray, currentTextIndex, charIndex, isComplete, onComplete, pauseTime, typingSpeed]);
19273
19269
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, displayedText.map((text, index) => (/*#__PURE__*/React__default.createElement(React__default.Fragment, {
19274
19270
  key: index
19275
- }, text, showCursor && index === currentTextIndex && !isComplete && (/*#__PURE__*/React__default.createElement(appStudio.Text, {
19271
+ }, text, showCursor && index === currentTextIndex && !isComplete && (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
19276
19272
  as: "span",
19277
19273
  display: "inline-block",
19278
19274
  width: "0.1em",
19279
19275
  height: "1em",
19280
- backgroundColor: cursorColor,
19281
- style: Object.assign({
19282
- animation: 'blink 1s step-end infinite',
19283
- verticalAlign: 'text-bottom',
19284
- marginLeft: '1px'
19285
- }, textStyle)
19286
- }))))));
19276
+ backgroundColor: cursorColor
19277
+ }, Object.assign({
19278
+ animation: 'blink 1s step-end infinite',
19279
+ verticalAlign: 'text-bottom',
19280
+ marginLeft: '1px'
19281
+ }, textStyle))))))));
19287
19282
  };
19288
19283
 
19289
19284
  var _excluded$_ = ["text", "duration", "direction", "stagger", "sequential", "textStyle", "as", "wordProps"],
@@ -19459,9 +19454,7 @@
19459
19454
  key: animKey + "-" + index,
19460
19455
  as: "span",
19461
19456
  animate: wordAnimation
19462
- }, restWordProps, {
19463
- style: wordStyle
19464
- }), word);
19457
+ }, restWordProps, wordStyle), word);
19465
19458
  })));
19466
19459
  };
19467
19460
 
@@ -19498,15 +19491,32 @@
19498
19491
  } = appStudio.useInView();
19499
19492
  var {
19500
19493
  getColor,
19501
- themeMode
19494
+ themeMode,
19495
+ theme
19502
19496
  } = appStudio.useTheme();
19503
19497
  var currentThemeMode = elementMode || themeMode;
19504
19498
  var resolvedHighlightColor = getColor(highlightColor, {
19505
19499
  themeMode: currentThemeMode
19506
19500
  });
19501
+ // Fallback: If getColor returns the token itself (resolution failed), try manual lookup in theme object
19502
+ if (resolvedHighlightColor === highlightColor && highlightColor.startsWith('theme.') && theme) {
19503
+ var tokenPath = highlightColor.replace('theme.', '');
19504
+ var value = tokenPath.split('.').reduce((acc, part) => acc && acc[part], theme);
19505
+ if (typeof value === 'string') {
19506
+ resolvedHighlightColor = value;
19507
+ }
19508
+ }
19507
19509
  var resolvedHighlightSecondaryColor = highlightSecondaryColor ? getColor(highlightSecondaryColor, {
19508
19510
  themeMode: currentThemeMode
19509
19511
  }) : undefined;
19512
+ // Fallback for secondary color
19513
+ if (highlightSecondaryColor && resolvedHighlightSecondaryColor === highlightSecondaryColor && highlightSecondaryColor.startsWith('theme.') && theme) {
19514
+ var _tokenPath = highlightSecondaryColor.replace('theme.', '');
19515
+ var _value = _tokenPath.split('.').reduce((acc, part) => acc && acc[part], theme);
19516
+ if (typeof _value === 'string') {
19517
+ resolvedHighlightSecondaryColor = _value;
19518
+ }
19519
+ }
19510
19520
  var {
19511
19521
  finalDisplayedText,
19512
19522
  activeHighlightTarget,