@principal-ai/logo-component 0.1.9 → 0.1.10
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.
|
@@ -498,7 +498,7 @@ const OpenTypeTextReveal = ({ text, fontUrl, fontSize = 72, width = 600, height
|
|
|
498
498
|
positionsByWord.get(pos.wordIndex).push({ x: pos.x, y: pos.y });
|
|
499
499
|
});
|
|
500
500
|
return Array.from(positionsByWord.entries()).map(([wordIndex, positions]) => (react_1.default.createElement("polyline", { key: `chart-line-${wordIndex}`, points: positions.map(p => `${p.x},${p.y}`).join(' '), fill: "none", stroke: getWordColor(wordIndex), strokeWidth: strokeWidth * 0.75, strokeLinecap: "round", strokeLinejoin: "round", opacity: "0" },
|
|
501
|
-
react_1.default.createElement("animate", { attributeName: "opacity", from: "0", to: "0.6", dur: "0.3s", begin:
|
|
501
|
+
react_1.default.createElement("animate", { attributeName: "opacity", from: "0", to: "0.6", dur: "0.3s", begin: "0s", fill: "freeze" }),
|
|
502
502
|
react_1.default.createElement("animate", { attributeName: "opacity", from: "0.6", to: "0", dur: `${chartLineFadeDuration}s`, begin: `${animationDelay + chartDuration}s`, fill: "freeze" }))));
|
|
503
503
|
})(),
|
|
504
504
|
chartPositions.map((chartPos, index) => {
|
|
@@ -506,8 +506,8 @@ const OpenTypeTextReveal = ({ text, fontUrl, fontSize = 72, width = 600, height
|
|
|
506
506
|
if (!targetPos)
|
|
507
507
|
return null;
|
|
508
508
|
const dotRadius = strokeWidth;
|
|
509
|
-
const dotAppearDelay =
|
|
510
|
-
const transitionBegin = animationDelay + chartDuration + chartLineFadeDuration + chartPauseDuration;
|
|
509
|
+
const dotAppearDelay = (index / chartPositions.length) * 0.5; // Stagger appearance (no delay)
|
|
510
|
+
const transitionBegin = animationDelay + chartDuration + chartLineFadeDuration + chartPauseDuration; // Transition is delayed
|
|
511
511
|
// Fade out when this dot's contour starts drawing
|
|
512
512
|
const contourDrawBegin = dotsPhaseEnd + (targetPos.contourIndex + 1) * perItemLinesDuration;
|
|
513
513
|
const dotColor = getWordColor(chartPos.wordIndex);
|
|
@@ -459,7 +459,7 @@ export const OpenTypeTextReveal = ({ text, fontUrl, fontSize = 72, width = 600,
|
|
|
459
459
|
positionsByWord.get(pos.wordIndex).push({ x: pos.x, y: pos.y });
|
|
460
460
|
});
|
|
461
461
|
return Array.from(positionsByWord.entries()).map(([wordIndex, positions]) => (React.createElement("polyline", { key: `chart-line-${wordIndex}`, points: positions.map(p => `${p.x},${p.y}`).join(' '), fill: "none", stroke: getWordColor(wordIndex), strokeWidth: strokeWidth * 0.75, strokeLinecap: "round", strokeLinejoin: "round", opacity: "0" },
|
|
462
|
-
React.createElement("animate", { attributeName: "opacity", from: "0", to: "0.6", dur: "0.3s", begin:
|
|
462
|
+
React.createElement("animate", { attributeName: "opacity", from: "0", to: "0.6", dur: "0.3s", begin: "0s", fill: "freeze" }),
|
|
463
463
|
React.createElement("animate", { attributeName: "opacity", from: "0.6", to: "0", dur: `${chartLineFadeDuration}s`, begin: `${animationDelay + chartDuration}s`, fill: "freeze" }))));
|
|
464
464
|
})(),
|
|
465
465
|
chartPositions.map((chartPos, index) => {
|
|
@@ -467,8 +467,8 @@ export const OpenTypeTextReveal = ({ text, fontUrl, fontSize = 72, width = 600,
|
|
|
467
467
|
if (!targetPos)
|
|
468
468
|
return null;
|
|
469
469
|
const dotRadius = strokeWidth;
|
|
470
|
-
const dotAppearDelay =
|
|
471
|
-
const transitionBegin = animationDelay + chartDuration + chartLineFadeDuration + chartPauseDuration;
|
|
470
|
+
const dotAppearDelay = (index / chartPositions.length) * 0.5; // Stagger appearance (no delay)
|
|
471
|
+
const transitionBegin = animationDelay + chartDuration + chartLineFadeDuration + chartPauseDuration; // Transition is delayed
|
|
472
472
|
// Fade out when this dot's contour starts drawing
|
|
473
473
|
const contourDrawBegin = dotsPhaseEnd + (targetPos.contourIndex + 1) * perItemLinesDuration;
|
|
474
474
|
const dotColor = getWordColor(chartPos.wordIndex);
|