@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
package/dist/web.esm.js
CHANGED
|
@@ -19068,7 +19068,9 @@ var useTitleState = props => {
|
|
|
19068
19068
|
var updateAlternatingState = index => {
|
|
19069
19069
|
var currentWordToHighlight = alternateHighlightText[index];
|
|
19070
19070
|
// Replace the placeholder in the baseText with the current alternating word
|
|
19071
|
-
|
|
19071
|
+
// Escape regex special characters in placeholder to prevent errors
|
|
19072
|
+
var escapedPlaceholder = placeholder.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
19073
|
+
var regex = new RegExp(escapedPlaceholder, 'gi');
|
|
19072
19074
|
var newContent = baseText.replace(regex, currentWordToHighlight);
|
|
19073
19075
|
setFinalDisplayedText(newContent);
|
|
19074
19076
|
setActiveHighlightTarget(currentWordToHighlight); // Set the current word as the highlight target
|
|
@@ -19198,12 +19200,10 @@ var ResponsiveTypography = {
|
|
|
19198
19200
|
*/
|
|
19199
19201
|
var HighlightStyles = {
|
|
19200
19202
|
underline: color => ({
|
|
19201
|
-
|
|
19202
|
-
|
|
19203
|
-
|
|
19204
|
-
|
|
19205
|
-
textUnderlineOffset: '4px'
|
|
19206
|
-
}
|
|
19203
|
+
textDecoration: 'underline',
|
|
19204
|
+
textDecorationColor: color,
|
|
19205
|
+
textDecorationThickness: '4px',
|
|
19206
|
+
textUnderlineOffset: '4px'
|
|
19207
19207
|
}),
|
|
19208
19208
|
background: color => ({
|
|
19209
19209
|
backgroundColor: color,
|
|
@@ -19212,21 +19212,17 @@ var HighlightStyles = {
|
|
|
19212
19212
|
borderRadius: '4px'
|
|
19213
19213
|
}),
|
|
19214
19214
|
gradient: (color, secondaryColor) => ({
|
|
19215
|
-
|
|
19216
|
-
|
|
19217
|
-
|
|
19218
|
-
|
|
19219
|
-
WebkitTextFillColor: 'transparent'
|
|
19220
|
-
},
|
|
19215
|
+
background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
|
|
19216
|
+
backgroundClip: 'text',
|
|
19217
|
+
WebkitBackgroundClip: 'text !important',
|
|
19218
|
+
WebkitTextFillColor: 'transparent',
|
|
19221
19219
|
color: 'transparent',
|
|
19222
19220
|
display: 'inline-block',
|
|
19223
19221
|
textShadow: 'none'
|
|
19224
19222
|
}),
|
|
19225
19223
|
outline: color => ({
|
|
19226
|
-
|
|
19227
|
-
|
|
19228
|
-
WebkitTextFillColor: 'transparent'
|
|
19229
|
-
},
|
|
19224
|
+
WebkitTextStroke: "1px " + color,
|
|
19225
|
+
WebkitTextFillColor: 'transparent !important',
|
|
19230
19226
|
color: 'transparent',
|
|
19231
19227
|
textShadow: 'none'
|
|
19232
19228
|
}),
|
|
@@ -19303,18 +19299,17 @@ var TypewriterEffect = _ref => {
|
|
|
19303
19299
|
}, [textArray, currentTextIndex, charIndex, isComplete, onComplete, pauseTime, typingSpeed]);
|
|
19304
19300
|
return /*#__PURE__*/React.createElement(React.Fragment, null, displayedText.map((text, index) => (/*#__PURE__*/React.createElement(React.Fragment, {
|
|
19305
19301
|
key: index
|
|
19306
|
-
}, text, showCursor && index === currentTextIndex && !isComplete && (/*#__PURE__*/React.createElement(Text, {
|
|
19302
|
+
}, text, showCursor && index === currentTextIndex && !isComplete && (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
19307
19303
|
as: "span",
|
|
19308
19304
|
display: "inline-block",
|
|
19309
19305
|
width: "0.1em",
|
|
19310
19306
|
height: "1em",
|
|
19311
|
-
backgroundColor: cursorColor
|
|
19312
|
-
|
|
19313
|
-
|
|
19314
|
-
|
|
19315
|
-
|
|
19316
|
-
|
|
19317
|
-
}))))));
|
|
19307
|
+
backgroundColor: cursorColor
|
|
19308
|
+
}, Object.assign({
|
|
19309
|
+
animation: 'blink 1s step-end infinite',
|
|
19310
|
+
verticalAlign: 'text-bottom',
|
|
19311
|
+
marginLeft: '1px'
|
|
19312
|
+
}, textStyle))))))));
|
|
19318
19313
|
};
|
|
19319
19314
|
|
|
19320
19315
|
var _excluded$_ = ["text", "duration", "direction", "stagger", "sequential", "textStyle", "as", "wordProps"],
|
|
@@ -19490,13 +19485,11 @@ var SlideEffect = _ref => {
|
|
|
19490
19485
|
key: animKey + "-" + index,
|
|
19491
19486
|
as: "span",
|
|
19492
19487
|
animate: wordAnimation
|
|
19493
|
-
}, restWordProps,
|
|
19494
|
-
style: wordStyle
|
|
19495
|
-
}), word);
|
|
19488
|
+
}, restWordProps, wordStyle), word);
|
|
19496
19489
|
})));
|
|
19497
19490
|
};
|
|
19498
19491
|
|
|
19499
|
-
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential"];
|
|
19492
|
+
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential", "themeMode"];
|
|
19500
19493
|
function escapeRegExp(string) {
|
|
19501
19494
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
19502
19495
|
}
|
|
@@ -19519,13 +19512,42 @@ var TitleView = _ref => {
|
|
|
19519
19512
|
highlightSlide: propHighlightSlide = false,
|
|
19520
19513
|
highlightSlideDuration = 500,
|
|
19521
19514
|
highlightSlideStagger = 50,
|
|
19522
|
-
highlightSlideSequential = true
|
|
19515
|
+
highlightSlideSequential = true,
|
|
19516
|
+
themeMode: elementMode
|
|
19523
19517
|
} = _ref,
|
|
19524
19518
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$$);
|
|
19525
19519
|
var {
|
|
19526
19520
|
ref,
|
|
19527
19521
|
inView
|
|
19528
19522
|
} = useInView();
|
|
19523
|
+
var {
|
|
19524
|
+
getColor,
|
|
19525
|
+
themeMode,
|
|
19526
|
+
theme
|
|
19527
|
+
} = useTheme();
|
|
19528
|
+
var currentThemeMode = elementMode || themeMode;
|
|
19529
|
+
var resolvedHighlightColor = getColor(highlightColor, {
|
|
19530
|
+
themeMode: currentThemeMode
|
|
19531
|
+
});
|
|
19532
|
+
// Fallback: If getColor returns the token itself (resolution failed), try manual lookup in theme object
|
|
19533
|
+
if (resolvedHighlightColor === highlightColor && highlightColor.startsWith('theme.') && theme) {
|
|
19534
|
+
var tokenPath = highlightColor.replace('theme.', '');
|
|
19535
|
+
var value = tokenPath.split('.').reduce((acc, part) => acc && acc[part], theme);
|
|
19536
|
+
if (typeof value === 'string') {
|
|
19537
|
+
resolvedHighlightColor = value;
|
|
19538
|
+
}
|
|
19539
|
+
}
|
|
19540
|
+
var resolvedHighlightSecondaryColor = highlightSecondaryColor ? getColor(highlightSecondaryColor, {
|
|
19541
|
+
themeMode: currentThemeMode
|
|
19542
|
+
}) : undefined;
|
|
19543
|
+
// Fallback for secondary color
|
|
19544
|
+
if (highlightSecondaryColor && resolvedHighlightSecondaryColor === highlightSecondaryColor && highlightSecondaryColor.startsWith('theme.') && theme) {
|
|
19545
|
+
var _tokenPath = highlightSecondaryColor.replace('theme.', '');
|
|
19546
|
+
var _value = _tokenPath.split('.').reduce((acc, part) => acc && acc[part], theme);
|
|
19547
|
+
if (typeof _value === 'string') {
|
|
19548
|
+
resolvedHighlightSecondaryColor = _value;
|
|
19549
|
+
}
|
|
19550
|
+
}
|
|
19529
19551
|
var {
|
|
19530
19552
|
finalDisplayedText,
|
|
19531
19553
|
activeHighlightTarget,
|
|
@@ -19550,7 +19572,7 @@ var TitleView = _ref => {
|
|
|
19550
19572
|
var fontSize = TitleSizes[size];
|
|
19551
19573
|
var responsiveStyles = useResponsive ? ResponsiveTypography[size] : null;
|
|
19552
19574
|
// Highlight style props
|
|
19553
|
-
var highlightProps = HighlightStyles[highlightStyle](
|
|
19575
|
+
var highlightProps = HighlightStyles[highlightStyle](resolvedHighlightColor, resolvedHighlightSecondaryColor);
|
|
19554
19576
|
// Apply loop control to animations
|
|
19555
19577
|
var applyAnimationLoop = (animation, loopControl) => {
|
|
19556
19578
|
if (!animation) return animation;
|