@app-studio/web 0.9.61 → 0.9.63

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
@@ -19082,20 +19084,16 @@
19082
19084
  // xl maps to H1 - Largest heading
19083
19085
  xl: {
19084
19086
  fontWeight: 500,
19085
- marginBottom: 20,
19086
19087
  letterSpacing: 1.25,
19087
19088
  media: {
19088
19089
  mobile: {
19089
- fontSize: 42,
19090
- width: '100%'
19090
+ fontSize: 60
19091
19091
  },
19092
19092
  tablet: {
19093
- fontSize: 50,
19094
- width: '100%'
19093
+ fontSize: 60
19095
19094
  },
19096
19095
  desktop: {
19097
- fontSize: 58,
19098
- minWidth: '60%'
19096
+ fontSize: 96
19099
19097
  }
19100
19098
  }
19101
19099
  },
@@ -19104,13 +19102,13 @@
19104
19102
  fontWeight: 500,
19105
19103
  media: {
19106
19104
  mobile: {
19107
- fontSize: 32
19105
+ fontSize: 48
19108
19106
  },
19109
19107
  tablet: {
19110
- fontSize: 40
19108
+ fontSize: 48
19111
19109
  },
19112
19110
  desktop: {
19113
- fontSize: 48
19111
+ fontSize: 70
19114
19112
  }
19115
19113
  }
19116
19114
  },
@@ -19119,13 +19117,13 @@
19119
19117
  fontWeight: 500,
19120
19118
  media: {
19121
19119
  mobile: {
19122
- fontSize: 20
19120
+ fontSize: 32
19123
19121
  },
19124
19122
  tablet: {
19125
- fontSize: 30
19123
+ fontSize: 40
19126
19124
  },
19127
19125
  desktop: {
19128
- fontSize: 40
19126
+ fontSize: 56
19129
19127
  }
19130
19128
  }
19131
19129
  },
@@ -19135,10 +19133,10 @@
19135
19133
  letterSpacing: -0.2,
19136
19134
  media: {
19137
19135
  mobile: {
19138
- fontSize: 16
19136
+ fontSize: 20
19139
19137
  },
19140
19138
  tablet: {
19141
- fontSize: 28
19139
+ fontSize: 24
19142
19140
  },
19143
19141
  desktop: {
19144
19142
  fontSize: 32
@@ -19151,13 +19149,13 @@
19151
19149
  letterSpacing: -0.2,
19152
19150
  media: {
19153
19151
  mobile: {
19154
- fontSize: 12
19152
+ fontSize: 14
19155
19153
  },
19156
19154
  tablet: {
19157
19155
  fontSize: 18
19158
19156
  },
19159
19157
  desktop: {
19160
- fontSize: 24
19158
+ fontSize: 20
19161
19159
  }
19162
19160
  }
19163
19161
  }
@@ -19167,12 +19165,10 @@
19167
19165
  */
19168
19166
  var HighlightStyles = {
19169
19167
  underline: color => ({
19170
- style: {
19171
- textDecoration: 'underline',
19172
- textDecorationColor: color,
19173
- textDecorationThickness: '4px',
19174
- textUnderlineOffset: '4px'
19175
- }
19168
+ textDecoration: 'underline',
19169
+ textDecorationColor: color,
19170
+ textDecorationThickness: '4px',
19171
+ textUnderlineOffset: '4px'
19176
19172
  }),
19177
19173
  background: color => ({
19178
19174
  backgroundColor: color,
@@ -19181,21 +19177,17 @@
19181
19177
  borderRadius: '4px'
19182
19178
  }),
19183
19179
  gradient: (color, secondaryColor) => ({
19184
- style: {
19185
- background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
19186
- backgroundClip: 'text',
19187
- WebkitBackgroundClip: 'text',
19188
- WebkitTextFillColor: 'transparent'
19189
- },
19180
+ background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
19181
+ backgroundClip: 'text',
19182
+ WebkitBackgroundClip: 'text !important',
19183
+ WebkitTextFillColor: 'transparent',
19190
19184
  color: 'transparent',
19191
19185
  display: 'inline-block',
19192
19186
  textShadow: 'none'
19193
19187
  }),
19194
19188
  outline: color => ({
19195
- style: {
19196
- WebkitTextStroke: "1px " + color,
19197
- WebkitTextFillColor: 'transparent'
19198
- },
19189
+ WebkitTextStroke: "1px " + color,
19190
+ WebkitTextFillColor: 'transparent !important',
19199
19191
  color: 'transparent',
19200
19192
  textShadow: 'none'
19201
19193
  }),
@@ -19272,18 +19264,17 @@
19272
19264
  }, [textArray, currentTextIndex, charIndex, isComplete, onComplete, pauseTime, typingSpeed]);
19273
19265
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, displayedText.map((text, index) => (/*#__PURE__*/React__default.createElement(React__default.Fragment, {
19274
19266
  key: index
19275
- }, text, showCursor && index === currentTextIndex && !isComplete && (/*#__PURE__*/React__default.createElement(appStudio.Text, {
19267
+ }, text, showCursor && index === currentTextIndex && !isComplete && (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
19276
19268
  as: "span",
19277
19269
  display: "inline-block",
19278
19270
  width: "0.1em",
19279
19271
  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
- }))))));
19272
+ backgroundColor: cursorColor
19273
+ }, Object.assign({
19274
+ animation: 'blink 1s step-end infinite',
19275
+ verticalAlign: 'text-bottom',
19276
+ marginLeft: '1px'
19277
+ }, textStyle))))))));
19287
19278
  };
19288
19279
 
19289
19280
  var _excluded$_ = ["text", "duration", "direction", "stagger", "sequential", "textStyle", "as", "wordProps"],
@@ -19459,9 +19450,7 @@
19459
19450
  key: animKey + "-" + index,
19460
19451
  as: "span",
19461
19452
  animate: wordAnimation
19462
- }, restWordProps, {
19463
- style: wordStyle
19464
- }), word);
19453
+ }, restWordProps, wordStyle), word);
19465
19454
  })));
19466
19455
  };
19467
19456
 
@@ -19498,15 +19487,32 @@
19498
19487
  } = appStudio.useInView();
19499
19488
  var {
19500
19489
  getColor,
19501
- themeMode
19490
+ themeMode,
19491
+ theme
19502
19492
  } = appStudio.useTheme();
19503
19493
  var currentThemeMode = elementMode || themeMode;
19504
19494
  var resolvedHighlightColor = getColor(highlightColor, {
19505
19495
  themeMode: currentThemeMode
19506
19496
  });
19497
+ // Fallback: If getColor returns the token itself (resolution failed), try manual lookup in theme object
19498
+ if (resolvedHighlightColor === highlightColor && highlightColor.startsWith('theme.') && theme) {
19499
+ var tokenPath = highlightColor.replace('theme.', '');
19500
+ var value = tokenPath.split('.').reduce((acc, part) => acc && acc[part], theme);
19501
+ if (typeof value === 'string') {
19502
+ resolvedHighlightColor = value;
19503
+ }
19504
+ }
19507
19505
  var resolvedHighlightSecondaryColor = highlightSecondaryColor ? getColor(highlightSecondaryColor, {
19508
19506
  themeMode: currentThemeMode
19509
19507
  }) : undefined;
19508
+ // Fallback for secondary color
19509
+ if (highlightSecondaryColor && resolvedHighlightSecondaryColor === highlightSecondaryColor && highlightSecondaryColor.startsWith('theme.') && theme) {
19510
+ var _tokenPath = highlightSecondaryColor.replace('theme.', '');
19511
+ var _value = _tokenPath.split('.').reduce((acc, part) => acc && acc[part], theme);
19512
+ if (typeof _value === 'string') {
19513
+ resolvedHighlightSecondaryColor = _value;
19514
+ }
19515
+ }
19510
19516
  var {
19511
19517
  finalDisplayedText,
19512
19518
  activeHighlightTarget,