@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.
- package/dist/web.cjs.development.js +39 -29
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +39 -29
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +39 -29
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -19075,7 +19075,9 @@ var useTitleState = props => {
|
|
|
19075
19075
|
var updateAlternatingState = index => {
|
|
19076
19076
|
var currentWordToHighlight = alternateHighlightText[index];
|
|
19077
19077
|
// Replace the placeholder in the baseText with the current alternating word
|
|
19078
|
-
|
|
19078
|
+
// Escape regex special characters in placeholder to prevent errors
|
|
19079
|
+
var escapedPlaceholder = placeholder.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
19080
|
+
var regex = new RegExp(escapedPlaceholder, 'gi');
|
|
19079
19081
|
var newContent = baseText.replace(regex, currentWordToHighlight);
|
|
19080
19082
|
setFinalDisplayedText(newContent);
|
|
19081
19083
|
setActiveHighlightTarget(currentWordToHighlight); // Set the current word as the highlight target
|
|
@@ -19205,12 +19207,10 @@ var ResponsiveTypography = {
|
|
|
19205
19207
|
*/
|
|
19206
19208
|
var HighlightStyles = {
|
|
19207
19209
|
underline: color => ({
|
|
19208
|
-
|
|
19209
|
-
|
|
19210
|
-
|
|
19211
|
-
|
|
19212
|
-
textUnderlineOffset: '4px'
|
|
19213
|
-
}
|
|
19210
|
+
textDecoration: 'underline',
|
|
19211
|
+
textDecorationColor: color,
|
|
19212
|
+
textDecorationThickness: '4px',
|
|
19213
|
+
textUnderlineOffset: '4px'
|
|
19214
19214
|
}),
|
|
19215
19215
|
background: color => ({
|
|
19216
19216
|
backgroundColor: color,
|
|
@@ -19219,21 +19219,17 @@ var HighlightStyles = {
|
|
|
19219
19219
|
borderRadius: '4px'
|
|
19220
19220
|
}),
|
|
19221
19221
|
gradient: (color, secondaryColor) => ({
|
|
19222
|
-
|
|
19223
|
-
|
|
19224
|
-
|
|
19225
|
-
|
|
19226
|
-
WebkitTextFillColor: 'transparent'
|
|
19227
|
-
},
|
|
19222
|
+
background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
|
|
19223
|
+
backgroundClip: 'text',
|
|
19224
|
+
WebkitBackgroundClip: 'text !important',
|
|
19225
|
+
WebkitTextFillColor: 'transparent',
|
|
19228
19226
|
color: 'transparent',
|
|
19229
19227
|
display: 'inline-block',
|
|
19230
19228
|
textShadow: 'none'
|
|
19231
19229
|
}),
|
|
19232
19230
|
outline: color => ({
|
|
19233
|
-
|
|
19234
|
-
|
|
19235
|
-
WebkitTextFillColor: 'transparent'
|
|
19236
|
-
},
|
|
19231
|
+
WebkitTextStroke: "1px " + color,
|
|
19232
|
+
WebkitTextFillColor: 'transparent !important',
|
|
19237
19233
|
color: 'transparent',
|
|
19238
19234
|
textShadow: 'none'
|
|
19239
19235
|
}),
|
|
@@ -19310,18 +19306,17 @@ var TypewriterEffect = _ref => {
|
|
|
19310
19306
|
}, [textArray, currentTextIndex, charIndex, isComplete, onComplete, pauseTime, typingSpeed]);
|
|
19311
19307
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, displayedText.map((text, index) => (/*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
19312
19308
|
key: index
|
|
19313
|
-
}, text, showCursor && index === currentTextIndex && !isComplete && (/*#__PURE__*/React__default.createElement(appStudio.Text, {
|
|
19309
|
+
}, text, showCursor && index === currentTextIndex && !isComplete && (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
19314
19310
|
as: "span",
|
|
19315
19311
|
display: "inline-block",
|
|
19316
19312
|
width: "0.1em",
|
|
19317
19313
|
height: "1em",
|
|
19318
|
-
backgroundColor: cursorColor
|
|
19319
|
-
|
|
19320
|
-
|
|
19321
|
-
|
|
19322
|
-
|
|
19323
|
-
|
|
19324
|
-
}))))));
|
|
19314
|
+
backgroundColor: cursorColor
|
|
19315
|
+
}, Object.assign({
|
|
19316
|
+
animation: 'blink 1s step-end infinite',
|
|
19317
|
+
verticalAlign: 'text-bottom',
|
|
19318
|
+
marginLeft: '1px'
|
|
19319
|
+
}, textStyle))))))));
|
|
19325
19320
|
};
|
|
19326
19321
|
|
|
19327
19322
|
var _excluded$_ = ["text", "duration", "direction", "stagger", "sequential", "textStyle", "as", "wordProps"],
|
|
@@ -19497,9 +19492,7 @@ var SlideEffect = _ref => {
|
|
|
19497
19492
|
key: animKey + "-" + index,
|
|
19498
19493
|
as: "span",
|
|
19499
19494
|
animate: wordAnimation
|
|
19500
|
-
}, restWordProps,
|
|
19501
|
-
style: wordStyle
|
|
19502
|
-
}), word);
|
|
19495
|
+
}, restWordProps, wordStyle), word);
|
|
19503
19496
|
})));
|
|
19504
19497
|
};
|
|
19505
19498
|
|
|
@@ -19536,15 +19529,32 @@ var TitleView = _ref => {
|
|
|
19536
19529
|
} = appStudio.useInView();
|
|
19537
19530
|
var {
|
|
19538
19531
|
getColor,
|
|
19539
|
-
themeMode
|
|
19532
|
+
themeMode,
|
|
19533
|
+
theme
|
|
19540
19534
|
} = appStudio.useTheme();
|
|
19541
19535
|
var currentThemeMode = elementMode || themeMode;
|
|
19542
19536
|
var resolvedHighlightColor = getColor(highlightColor, {
|
|
19543
19537
|
themeMode: currentThemeMode
|
|
19544
19538
|
});
|
|
19539
|
+
// Fallback: If getColor returns the token itself (resolution failed), try manual lookup in theme object
|
|
19540
|
+
if (resolvedHighlightColor === highlightColor && highlightColor.startsWith('theme.') && theme) {
|
|
19541
|
+
var tokenPath = highlightColor.replace('theme.', '');
|
|
19542
|
+
var value = tokenPath.split('.').reduce((acc, part) => acc && acc[part], theme);
|
|
19543
|
+
if (typeof value === 'string') {
|
|
19544
|
+
resolvedHighlightColor = value;
|
|
19545
|
+
}
|
|
19546
|
+
}
|
|
19545
19547
|
var resolvedHighlightSecondaryColor = highlightSecondaryColor ? getColor(highlightSecondaryColor, {
|
|
19546
19548
|
themeMode: currentThemeMode
|
|
19547
19549
|
}) : undefined;
|
|
19550
|
+
// Fallback for secondary color
|
|
19551
|
+
if (highlightSecondaryColor && resolvedHighlightSecondaryColor === highlightSecondaryColor && highlightSecondaryColor.startsWith('theme.') && theme) {
|
|
19552
|
+
var _tokenPath = highlightSecondaryColor.replace('theme.', '');
|
|
19553
|
+
var _value = _tokenPath.split('.').reduce((acc, part) => acc && acc[part], theme);
|
|
19554
|
+
if (typeof _value === 'string') {
|
|
19555
|
+
resolvedHighlightSecondaryColor = _value;
|
|
19556
|
+
}
|
|
19557
|
+
}
|
|
19548
19558
|
var {
|
|
19549
19559
|
finalDisplayedText,
|
|
19550
19560
|
activeHighlightTarget,
|