@app-studio/web 0.9.60 → 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 +53 -31
- 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 +53 -31
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +53 -31
- 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,13 +19492,11 @@ 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
|
|
|
19506
|
-
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential"];
|
|
19499
|
+
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential", "themeMode"];
|
|
19507
19500
|
function escapeRegExp(string) {
|
|
19508
19501
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
19509
19502
|
}
|
|
@@ -19526,13 +19519,42 @@ var TitleView = _ref => {
|
|
|
19526
19519
|
highlightSlide: propHighlightSlide = false,
|
|
19527
19520
|
highlightSlideDuration = 500,
|
|
19528
19521
|
highlightSlideStagger = 50,
|
|
19529
|
-
highlightSlideSequential = true
|
|
19522
|
+
highlightSlideSequential = true,
|
|
19523
|
+
themeMode: elementMode
|
|
19530
19524
|
} = _ref,
|
|
19531
19525
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$$);
|
|
19532
19526
|
var {
|
|
19533
19527
|
ref,
|
|
19534
19528
|
inView
|
|
19535
19529
|
} = appStudio.useInView();
|
|
19530
|
+
var {
|
|
19531
|
+
getColor,
|
|
19532
|
+
themeMode,
|
|
19533
|
+
theme
|
|
19534
|
+
} = appStudio.useTheme();
|
|
19535
|
+
var currentThemeMode = elementMode || themeMode;
|
|
19536
|
+
var resolvedHighlightColor = getColor(highlightColor, {
|
|
19537
|
+
themeMode: currentThemeMode
|
|
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
|
+
}
|
|
19547
|
+
var resolvedHighlightSecondaryColor = highlightSecondaryColor ? getColor(highlightSecondaryColor, {
|
|
19548
|
+
themeMode: currentThemeMode
|
|
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
|
+
}
|
|
19536
19558
|
var {
|
|
19537
19559
|
finalDisplayedText,
|
|
19538
19560
|
activeHighlightTarget,
|
|
@@ -19557,7 +19579,7 @@ var TitleView = _ref => {
|
|
|
19557
19579
|
var fontSize = TitleSizes[size];
|
|
19558
19580
|
var responsiveStyles = useResponsive ? ResponsiveTypography[size] : null;
|
|
19559
19581
|
// Highlight style props
|
|
19560
|
-
var highlightProps = HighlightStyles[highlightStyle](
|
|
19582
|
+
var highlightProps = HighlightStyles[highlightStyle](resolvedHighlightColor, resolvedHighlightSecondaryColor);
|
|
19561
19583
|
// Apply loop control to animations
|
|
19562
19584
|
var applyAnimationLoop = (animation, loopControl) => {
|
|
19563
19585
|
if (!animation) return animation;
|