diff --git a/registry/components/agent-cursor/agent-cursor.html b/registry/components/agent-cursor/agent-cursor.html
index 72375d1719..b718b35bf1 100644
--- a/registry/components/agent-cursor/agent-cursor.html
+++ b/registry/components/agent-cursor/agent-cursor.html
@@ -130,7 +130,12 @@
}
.ag-status {
color: rgba(255, 255, 255, 0.9);
- background: linear-gradient(90deg, rgba(255, 255, 255, 0.45) 35%, #fff 50%, rgba(255, 255, 255, 0.45) 65%);
+ background: linear-gradient(
+ 90deg,
+ rgba(255, 255, 255, 0.45) 35%,
+ #fff 50%,
+ rgba(255, 255, 255, 0.45) 65%
+ );
background-size: 300% 100%;
-webkit-background-clip: text;
background-clip: text;
@@ -216,7 +221,9 @@
var compositionId = "agent-cursor";
var duration = Math.max(
0.001,
- parseFloat(root.dataset.duration || html.getAttribute("data-composition-duration") || "6"),
+ parseFloat(
+ root.dataset.duration || html.getAttribute("data-composition-duration") || "6",
+ ),
);
var W = root.clientWidth || 1920;
var H = root.clientHeight || 1080;
@@ -284,7 +291,8 @@
function positionAt(t) {
if (t <= T_ENTER) return lerp(START, READ_A, enter(clamp01(t / T_ENTER)));
- if (t <= T_READ_END) return lerp(READ_A, READ_B, reading(clamp01((t - T_ENTER) / (T_READ_END - T_ENTER))));
+ if (t <= T_READ_END)
+ return lerp(READ_A, READ_B, reading(clamp01((t - T_ENTER) / (T_READ_END - T_ENTER))));
var from = READ_B;
for (var i = 0; i < beats.length; i++) {
var b = beats[i];
@@ -327,7 +335,10 @@
var text = stepText(index);
var typeDur = Math.min(0.4, text.length * 0.026) * k;
var shown = Math.floor(clamp01(since / typeDur) * text.length);
- return { text: text.slice(0, Math.max(index === 0 ? 0 : 1, shown)), thinking: thinking };
+ return {
+ text: text.slice(0, Math.max(index === 0 ? 0 : 1, shown)),
+ thinking: thinking,
+ };
}
var bursts = beats.map(function (b) {
@@ -340,11 +351,18 @@
s.setAttribute("viewBox", "-10 -10 20 20");
s.setAttribute("class", "ag-spark");
var star = document.createElementNS(SVG_NS, "path");
- star.setAttribute("d", "M0 -10 L2.4 -2.4 L10 0 L2.4 2.4 L0 10 L-2.4 2.4 L-10 0 L-2.4 -2.4 Z");
+ star.setAttribute(
+ "d",
+ "M0 -10 L2.4 -2.4 L10 0 L2.4 2.4 L0 10 L-2.4 2.4 L-10 0 L-2.4 -2.4 Z",
+ );
star.setAttribute("fill", j % 2 ? "#ffffff" : accent);
s.appendChild(star);
wrap.appendChild(s);
- sparks.push({ el: s, angle: (j * 45 + (j % 2 ? 14 : -6)) * (Math.PI / 180), reach: [1, 0.72, 0.88][j % 3] });
+ sparks.push({
+ el: s,
+ angle: (j * 45 + (j % 2 ? 14 : -6)) * (Math.PI / 180),
+ reach: [1, 0.72, 0.88][j % 3],
+ });
}
root.appendChild(wrap);
return { at: b.click, sparks: sparks };
@@ -367,10 +385,17 @@
actor.style.transform = "translate(" + p.x.toFixed(2) + "px," + p.y.toFixed(2) + "px)";
arrow.style.transform = "scale(" + press(t).toFixed(3) + ")";
arrow.style.transformOrigin = "0 0";
- glow.style.transform = "rotate(" + (t * 140).toFixed(1) + "deg) scale(" + (1 + 0.08 * Math.sin(t * 4.2)).toFixed(3) + ")";
+ glow.style.transform =
+ "rotate(" +
+ (t * 140).toFixed(1) +
+ "deg) scale(" +
+ (1 + 0.08 * Math.sin(t * 4.2)).toFixed(3) +
+ ")";
glow.style.opacity = (0.5 + 0.12 * Math.sin(t * 3.1)).toFixed(3);
- tagAnchor.style.transform = "translate(" + tp.x.toFixed(2) + "px," + tp.y.toFixed(2) + "px)";
- tag.style.transform = "scale(" + (0.9 + 0.1 * enter(clamp01((t - 0.15 * k) / (0.35 * k)))).toFixed(3) + ")";
+ tagAnchor.style.transform =
+ "translate(" + tp.x.toFixed(2) + "px," + tp.y.toFixed(2) + "px)";
+ tag.style.transform =
+ "scale(" + (0.9 + 0.1 * enter(clamp01((t - 0.15 * k) / (0.35 * k)))).toFixed(3) + ")";
var leaving = clamp01((t - T_EXIT) / (0.25 * k));
tag.style.opacity = (clamp01((t - 0.15 * k) / (0.2 * k)) * (1 - leaving)).toFixed(3);
@@ -383,7 +408,8 @@
check.style.opacity = done.toFixed(3);
check.style.transform = "scale(" + (0.5 + 0.5 * pop(done)).toFixed(3) + ")";
dot.style.opacity = (1 - done).toFixed(3);
- dot.style.transform = "scale(" + (status.thinking ? 0.8 + 0.2 * Math.sin(t * 12) : 1).toFixed(3) + ")";
+ dot.style.transform =
+ "scale(" + (status.thinking ? 0.8 + 0.2 * Math.sin(t * 12) : 1).toFixed(3) + ")";
bursts.forEach(function (burst) {
var u = (t - burst.at) / (0.5 * k);
@@ -395,8 +421,15 @@
var r = (0.2 + 2.4 * enter(u)) * s.reach;
s.el.style.opacity = (1 - u * u).toFixed(3);
s.el.style.transform =
- "translate(" + (Math.cos(s.angle) * r).toFixed(3) + "cqw," + (Math.sin(s.angle) * r).toFixed(3) +
- "cqw) scale(" + (1 - 0.7 * u).toFixed(3) + ") rotate(" + (u * 90).toFixed(1) + "deg)";
+ "translate(" +
+ (Math.cos(s.angle) * r).toFixed(3) +
+ "cqw," +
+ (Math.sin(s.angle) * r).toFixed(3) +
+ "cqw) scale(" +
+ (1 - 0.7 * u).toFixed(3) +
+ ") rotate(" +
+ (u * 90).toFixed(1) +
+ "deg)";
});
});
actor.style.opacity = gone ? "0" : "1";
diff --git a/registry/components/agent-cursor/demo.html b/registry/components/agent-cursor/demo.html
index 4acd278585..793cd18fb0 100644
--- a/registry/components/agent-cursor/demo.html
+++ b/registry/components/agent-cursor/demo.html
@@ -235,7 +235,12 @@
tl.to("#projects", { opacity: 0, x: -12, duration: 0.18, ease: "power2.in" }, 2.83);
tl.to("#nav-projects", { color: "#5b6173", duration: 0.2 }, 2.83);
tl.to("#nav-settings", { color: "#151827", duration: 0.2 }, 2.83);
- tl.fromTo("#settings", { opacity: 0, x: 16 }, { opacity: 1, x: 0, duration: 0.3, ease: "power3.out" }, 2.95);
+ tl.fromTo(
+ "#settings",
+ { opacity: 0, x: 16 },
+ { opacity: 1, x: 0, duration: 0.3, ease: "power3.out" },
+ 2.95,
+ );
// Second click (4.39s): backups turn on.
tl.to("#backup-toggle", { backgroundColor: "#8b5cf6", duration: 0.2 }, 4.43);
diff --git a/registry/components/cursor-annotate/cursor-annotate.html b/registry/components/cursor-annotate/cursor-annotate.html
index 1bd34c2e3a..48db3c0086 100644
--- a/registry/components/cursor-annotate/cursor-annotate.html
+++ b/registry/components/cursor-annotate/cursor-annotate.html
@@ -85,7 +85,16 @@
-
+
@@ -139,7 +148,8 @@
root.dataset.duration || html.getAttribute("data-composition-duration") || "4.2",
),
);
- var shape = ["circle", "underline", "arrow"].indexOf(vars.shape) >= 0 ? vars.shape : "circle";
+ var shape =
+ ["circle", "underline", "arrow"].indexOf(vars.shape) >= 0 ? vars.shape : "circle";
var color = /^#[0-9a-f]{3,8}$/i.test(String(vars.color)) ? vars.color : "#f43f5e";
var W = root.clientWidth || 1920;
var H = root.clientHeight || 1080;
@@ -180,7 +190,10 @@
var r = (1 + 0.035 * Math.sin(3 * a + 1.1)) * (1 + 0.08 * u);
var ex = Math.cos(a) * rx * r;
var ey = Math.sin(a) * ry * r;
- pts.push([cx + ex * Math.cos(tilt) - ey * Math.sin(tilt), cy + ex * Math.sin(tilt) + ey * Math.cos(tilt)]);
+ pts.push([
+ cx + ex * Math.cos(tilt) - ey * Math.sin(tilt),
+ cy + ex * Math.sin(tilt) + ey * Math.cos(tilt),
+ ]);
}
return [polyline(pts)];
}
@@ -192,7 +205,10 @@
var pts = [];
for (var i = 0; i <= 48; i++) {
var u = i / 48;
- pts.push([x0 + span * u, y + 4 * unit * Math.sin(u * Math.PI * 1.3) - 12 * unit * u * u]);
+ pts.push([
+ x0 + span * u,
+ y + 4 * unit * Math.sin(u * Math.PI * 1.3) - 12 * unit * u * u,
+ ]);
}
return [polyline(pts)];
}
@@ -200,13 +216,19 @@
// Shaft from below-left, curving onto the region; the head is a second stroke.
function arrowStrokes() {
var tip = { x: box.x - 10 * unit, y: box.y + box.h + 8 * unit };
- var from = { x: tip.x - Math.max(160 * unit, box.w * 0.7), y: tip.y + Math.max(120 * unit, box.h * 0.9) };
+ var from = {
+ x: tip.x - Math.max(160 * unit, box.w * 0.7),
+ y: tip.y + Math.max(120 * unit, box.h * 0.9),
+ };
var ctrl = { x: from.x + (tip.x - from.x) * 0.15, y: tip.y + (from.y - tip.y) * 0.05 };
var pts = [];
for (var i = 0; i <= 40; i++) {
var u = i / 40;
var v = 1 - u;
- pts.push([v * v * from.x + 2 * v * u * ctrl.x + u * u * tip.x, v * v * from.y + 2 * v * u * ctrl.y + u * u * tip.y]);
+ pts.push([
+ v * v * from.x + 2 * v * u * ctrl.x + u * u * tip.x,
+ v * v * from.y + 2 * v * u * ctrl.y + u * u * tip.y,
+ ]);
}
var back = Math.atan2(ctrl.y - tip.y, ctrl.x - tip.x);
var len = 30 * unit;
@@ -216,7 +238,12 @@
return [polyline(pts), polyline([barb(0.5), [tip.x, tip.y], barb(-0.5)])];
}
- var strokeDs = shape === "underline" ? underlineStroke() : shape === "arrow" ? arrowStrokes() : loopStroke();
+ var strokeDs =
+ shape === "underline"
+ ? underlineStroke()
+ : shape === "arrow"
+ ? arrowStrokes()
+ : loopStroke();
var WIDTH = 11 * unit;
var strokes = strokeDs.map(function (d) {
var thin = document.createElementNS(SVG_NS, "path");
@@ -275,21 +302,35 @@
// Returns the nib position and how far off the paper it is (0 = touching).
function penAt(t) {
if (t <= T_LAND) return { p: mix(START, first, glide(clamp01(t / T_LAND))), lift: 1 };
- if (t <= T_DRAW) return { p: first, lift: 1 - clamp01((t - T_LAND) / (T_DRAW - T_LAND)) };
+ if (t <= T_DRAW)
+ return { p: first, lift: 1 - clamp01((t - T_LAND) / (T_DRAW - T_LAND)) };
for (var i = 0; i < windows.length; i++) {
var w = windows[i];
- if (t <= w.end) return { p: pointOn(strokes[i], stroke((t - w.start) / (w.end - w.start))), lift: 0 };
+ if (t <= w.end)
+ return {
+ p: pointOn(strokes[i], stroke((t - w.start) / (w.end - w.start))),
+ lift: 0,
+ };
var next = windows[i + 1];
if (next && t < next.start) {
var u = (t - w.end) / (next.start - w.end);
- return { p: mix(pointOn(strokes[i], 1), pointOn(strokes[i + 1], 0), hop(u)), lift: Math.sin(Math.PI * u) };
+ return {
+ p: mix(pointOn(strokes[i], 1), pointOn(strokes[i + 1], 0), hop(u)),
+ lift: Math.sin(Math.PI * u),
+ };
}
}
if (t <= T_EXIT) {
var a = clamp01((t - T_LIFT) / (0.45 * squeeze));
- return { p: mix(endPoint, ASIDE, gsap.parseEase("power2.out")(a)), lift: Math.min(1, a * 2.5) };
+ return {
+ p: mix(endPoint, ASIDE, gsap.parseEase("power2.out")(a)),
+ lift: Math.min(1, a * 2.5),
+ };
}
- return { p: mix(ASIDE, END, leave(clamp01((t - T_EXIT) / (duration - T_EXIT)))), lift: 1 };
+ return {
+ p: mix(ASIDE, END, leave(clamp01((t - T_EXIT) / (duration - T_EXIT)))),
+ lift: 1,
+ };
}
function drawn(i, t) {
@@ -301,23 +342,41 @@
strokes.forEach(function (s, i) {
var len = drawn(i, t);
s.thin.style.opacity = len > 0.5 ? "1" : "0";
- s.thin.setAttribute("stroke-dasharray", len.toFixed(2) + " " + (s.length * 2).toFixed(2));
+ s.thin.setAttribute(
+ "stroke-dasharray",
+ len.toFixed(2) + " " + (s.length * 2).toFixed(2),
+ );
// The thick core trails the tip and never reaches either end: the stroke tapers.
var core = Math.min(len, s.length * 0.9) - s.length * 0.08;
s.thick.style.opacity = core > 0.5 ? "1" : "0";
- s.thick.setAttribute("stroke-dasharray", Math.max(0, core).toFixed(2) + " " + (s.length * 3).toFixed(2));
+ s.thick.setAttribute(
+ "stroke-dasharray",
+ Math.max(0, core).toFixed(2) + " " + (s.length * 3).toFixed(2),
+ );
s.thick.setAttribute("stroke-dashoffset", (-s.length * 0.08).toFixed(2));
});
var state = penAt(t);
var lift = state.lift;
- pen.style.transform = "translate(" + state.p.x.toFixed(2) + "px," + state.p.y.toFixed(2) + "px)";
+ pen.style.transform =
+ "translate(" + state.p.x.toFixed(2) + "px," + state.p.y.toFixed(2) + "px)";
penBody.setAttribute(
"transform",
- "scale(" + ((1.45 + 0.14 * lift) * unit).toFixed(4) + ") rotate(" + (-4 * lift).toFixed(2) + ")",
+ "scale(" +
+ ((1.45 + 0.14 * lift) * unit).toFixed(4) +
+ ") rotate(" +
+ (-4 * lift).toFixed(2) +
+ ")",
);
pen.style.filter =
- "drop-shadow(" + (4 + 16 * lift).toFixed(1) + "px " + (6 + 20 * lift).toFixed(1) +
- "px " + (3 + 14 * lift).toFixed(1) + "px rgba(0,0,0," + (0.32 - 0.14 * lift).toFixed(3) + "))";
+ "drop-shadow(" +
+ (4 + 16 * lift).toFixed(1) +
+ "px " +
+ (6 + 20 * lift).toFixed(1) +
+ "px " +
+ (3 + 14 * lift).toFixed(1) +
+ "px rgba(0,0,0," +
+ (0.32 - 0.14 * lift).toFixed(3) +
+ "))";
}
var clock = { t: 0 };
diff --git a/registry/components/cursor-context-menu/cursor-context-menu.html b/registry/components/cursor-context-menu/cursor-context-menu.html
index fdbed8263f..f4193641bb 100644
--- a/registry/components/cursor-context-menu/cursor-context-menu.html
+++ b/registry/components/cursor-context-menu/cursor-context-menu.html
@@ -71,7 +71,9 @@
width: 64cqw;
border-radius: 1.4cqw;
background: var(--cm-win);
- box-shadow: 0 2.4cqw 6cqw rgba(8, 12, 28, 0.35), 0 0 0 1px var(--cm-line);
+ box-shadow:
+ 0 2.4cqw 6cqw rgba(8, 12, 28, 0.35),
+ 0 0 0 1px var(--cm-line);
}
.cm-bar {
display: flex;
@@ -142,7 +144,9 @@
padding: 0.55cqw;
border-radius: 0.9cqw;
background: var(--cm-menu);
- box-shadow: 0 1.2cqw 3cqw rgba(8, 12, 28, 0.3), 0 0 0 1px var(--cm-line);
+ box-shadow:
+ 0 1.2cqw 3cqw rgba(8, 12, 28, 0.3),
+ 0 0 0 1px var(--cm-line);
opacity: 0;
will-change: transform, opacity;
}
@@ -196,7 +200,10 @@
-
Launch assets
+
+ Launch assets
+
@@ -242,7 +249,9 @@
var compositionId = "cursor-context-menu";
var duration = Math.max(
0.001,
- parseFloat(root.dataset.duration || html.getAttribute("data-composition-duration") || "5.2"),
+ parseFloat(
+ root.dataset.duration || html.getAttribute("data-composition-duration") || "5.2",
+ ),
);
root.setAttribute("data-tone", vars.tone === "dark" ? "dark" : "light");
var labels = String(vars.items || DEFAULTS.items || "Open")
@@ -256,18 +265,46 @@
var FILES = [
["Q3 roadmap", "pdf", "1.2 MB · PDF", "linear-gradient(135deg,#ff8a7a,#e8465b)"],
- ["Launch film v4", "mp4", "2.4 GB · Video", "linear-gradient(135deg,#8f7bff,#4b3bd6)"],
- ["Pricing notes", "md", "18 KB · Text", "linear-gradient(135deg,#6fc3ff,#2f7de1)"],
- ["Team offsite", "jpg", "4.8 MB · Image", "linear-gradient(135deg,#7fe0a6,#1f9d6b)"],
- ["Launch film v4 copy", "mp4", "2.4 GB · Video", "linear-gradient(135deg,#8f7bff,#4b3bd6)"],
+ [
+ "Launch film v4",
+ "mp4",
+ "2.4 GB · Video",
+ "linear-gradient(135deg,#8f7bff,#4b3bd6)",
+ ],
+ [
+ "Pricing notes",
+ "md",
+ "18 KB · Text",
+ "linear-gradient(135deg,#6fc3ff,#2f7de1)",
+ ],
+ [
+ "Team offsite",
+ "jpg",
+ "4.8 MB · Image",
+ "linear-gradient(135deg,#7fe0a6,#1f9d6b)",
+ ],
+ [
+ "Launch film v4 copy",
+ "mp4",
+ "2.4 GB · Video",
+ "linear-gradient(135deg,#8f7bff,#4b3bd6)",
+ ],
];
var TARGET = 1;
var cards = FILES.map(function (f) {
var card = document.createElement("div");
card.className = "cm-file";
card.innerHTML =
- '
' +
- '
' + f[0] + "." + f[1] + '
' + f[2] + "
";
+ '
' +
+ '
' +
+ f[0] +
+ "." +
+ f[1] +
+ '
' +
+ f[2] +
+ "
";
grid.appendChild(card);
return card;
});
@@ -316,8 +353,16 @@
var squeeze = Math.min(1, duration / 5.2);
var T = {
- glide: 0.85, rclick: 0.95, bloom: 1.02, travel0: 1.45, travel1: 2.1,
- click: 2.25, collapse: 2.43, act: 2.55, away0: 3.1, away1: 3.7,
+ glide: 0.85,
+ rclick: 0.95,
+ bloom: 1.02,
+ travel0: 1.45,
+ travel1: 2.1,
+ click: 2.25,
+ collapse: 2.43,
+ act: 2.55,
+ away0: 3.1,
+ away1: 3.7,
};
for (var key in T) T[key] *= squeeze;
@@ -362,7 +407,9 @@
menu.style.opacity = String(Math.min(1, open * 3) * (1 - shut));
menu.style.transform = "translate(" + mx + "px," + my + "px) scale(" + menuScale + ")";
rows.forEach(function (row, i) {
- var k = easeOut(seg(t, T.bloom + i * 0.025 * squeeze, T.bloom + (i * 0.025 + 0.16) * squeeze));
+ var k = easeOut(
+ seg(t, T.bloom + i * 0.025 * squeeze, T.bloom + (i * 0.025 + 0.16) * squeeze),
+ );
row.style.opacity = String(k);
row.style.transform = "translateY(" + (1 - k) * -4 * u + "px)";
});
@@ -372,11 +419,15 @@
y: my + rows[pick].offsetTop + rows[pick].offsetHeight * 0.55,
};
var start = { x: -0.06 * W, y: 1.1 * H };
- var aside = { x: itemPoint.x + (left ? -1 : 1) * 160 * u, y: Math.min(H - 60 * u, itemPoint.y + 180 * u) };
+ var aside = {
+ x: itemPoint.x + (left ? -1 : 1) * 160 * u,
+ y: Math.min(H - 60 * u, itemPoint.y + 180 * u),
+ };
var p;
if (t < T.glide) p = lerp(start, anchor, glide(seg(t, 0, T.glide)));
else if (t < T.travel0) p = anchor;
- else if (t < T.travel1) p = lerp(anchor, itemPoint, easeInOut(seg(t, T.travel0, T.travel1)));
+ else if (t < T.travel1)
+ p = lerp(anchor, itemPoint, easeInOut(seg(t, T.travel0, T.travel1)));
else if (t < T.away0) p = itemPoint;
else p = lerp(itemPoint, aside, easeInOut(seg(t, T.away0, T.away1)));
@@ -391,11 +442,19 @@
var done = t >= T.act;
var k = easeOut(seg(t, T.act, T.act + 0.32 * squeeze));
- cards[TARGET].classList.toggle("is-on", t >= T.rclick && !(done && action === "duplicate"));
+ cards[TARGET].classList.toggle(
+ "is-on",
+ t >= T.rclick && !(done && action === "duplicate"),
+ );
copy.classList.toggle("is-on", done && action === "duplicate");
var showCopy = action === "duplicate" ? k : 0;
copy.style.opacity = String(showCopy);
- copy.style.transform = "translateY(" + (1 - showCopy) * 18 * u + "px) scale(" + (0.94 + 0.06 * showCopy) + ")";
+ copy.style.transform =
+ "translateY(" +
+ (1 - showCopy) * 18 * u +
+ "px) scale(" +
+ (0.94 + 0.06 * showCopy) +
+ ")";
var gone = action === "trash" ? k : 0;
cards[TARGET].style.opacity = String(1 - gone);
cards[TARGET].style.transform = "scale(" + (1 - 0.08 * gone) + ")";
diff --git a/registry/components/cursor-drag-drop/cursor-drag-drop.html b/registry/components/cursor-drag-drop/cursor-drag-drop.html
index 122e2486c7..c8d7758453 100644
--- a/registry/components/cursor-drag-drop/cursor-drag-drop.html
+++ b/registry/components/cursor-drag-drop/cursor-drag-drop.html
@@ -188,7 +188,9 @@
To do 4
-
In progress 0
+
+ In progress 0
+
@@ -279,7 +287,9 @@
var compositionId = "cursor-drag-drop";
var duration = Math.max(
0.001,
- parseFloat(root.dataset.duration || html.getAttribute("data-composition-duration") || "5"),
+ parseFloat(
+ root.dataset.duration || html.getAttribute("data-composition-duration") || "5",
+ ),
);
root.setAttribute("data-tone", vars.tone === "dark" ? "dark" : "light");
if (vars.accent) root.style.setProperty("--dd-accent", String(vars.accent));
@@ -289,7 +299,13 @@
var H = root.clientHeight || 1080;
var fit = Math.min(W / 1920, H / 1080);
$("dd-stage").style.transform =
- "translate(" + (W - 1920 * fit) / 2 + "px," + (H - 1080 * fit) / 2 + "px) scale(" + fit + ") translate(960px,545px) scale(1.15) translate(-960px,-545px)";
+ "translate(" +
+ (W - 1920 * fit) / 2 +
+ "px," +
+ (H - 1080 * fit) / 2 +
+ "px) scale(" +
+ fit +
+ ") translate(960px,545px) scale(1.15) translate(-960px,-545px)";
var s = Math.min(1, duration / 5);
var T_ARRIVE = 0.9 * s;
@@ -341,7 +357,8 @@
return { x: GRIP.x + c.x, y: GRIP.y + c.y };
}
var dropped = { x: GRIP.x + DROP.x, y: GRIP.y + DROP.y };
- if (t <= T_EXIT) return arc(dropped, ASIDE, 0.1, easeArrive(clamp01((t - T_DRIFT) / (0.5 * s))));
+ if (t <= T_EXIT)
+ return arc(dropped, ASIDE, 0.1, easeArrive(clamp01((t - T_DRIFT) / (0.5 * s))));
return arc(ASIDE, START, -0.1, easeExit(clamp01((t - T_EXIT) / (duration - T_EXIT))));
}
@@ -374,8 +391,15 @@
var vx = (ahead.x - lagged.x) / 0.08;
var tilt = Math.max(-3, Math.min(3, (vx / 1200) * 3)) * liftAt(t);
card.style.transform =
- "translate(" + c.x.toFixed(2) + "px," + c.y.toFixed(2) + "px) rotate(" + tilt.toFixed(2) +
- "deg) scale(" + cardScaleAt(t).toFixed(4) + ")";
+ "translate(" +
+ c.x.toFixed(2) +
+ "px," +
+ c.y.toFixed(2) +
+ "px) rotate(" +
+ tilt.toFixed(2) +
+ "deg) scale(" +
+ cardScaleAt(t).toFixed(4) +
+ ")";
lift.style.opacity = liftAt(t).toFixed(3);
var close = easeCarry(clamp01((t - T_CARRY - 0.15 * s) / (0.4 * s)));
@@ -386,7 +410,8 @@
var gap = Math.hypot(c.x - DROP.x, c.y - DROP.y);
var hot = t < T_DROP ? smooth(1 - gap / 300) : 1 - clamp01((t - T_DROP) / (0.3 * s));
slotHot.style.opacity = hot.toFixed(3);
- slot.style.opacity = t < T_DROP ? "1" : (1 - clamp01((t - T_DROP) / (0.3 * s))).toFixed(3);
+ slot.style.opacity =
+ t < T_DROP ? "1" : (1 - clamp01((t - T_DROP) / (0.3 * s))).toFixed(3);
countA.textContent = t >= T_CARRY + 0.15 * s ? "3" : "4";
countB.textContent = t >= T_DROP ? "1" : "0";
@@ -394,16 +419,23 @@
var grabbing = t >= T_PRESS && t < T_DROP;
var p = pointerAt(t);
var anchor = grabbing ? PALM : ARROW_TIP;
- var pressDip = t >= T_PRESS && t < T_PRESS + 0.22 * s
- ? 1 - 0.1 * Math.sin(Math.PI * clamp01((t - T_PRESS) / (0.22 * s)))
- : 1;
- var releasePop = t >= T_DROP && t < T_DROP + 0.2 * s
- ? 1 - 0.08 * Math.sin(Math.PI * clamp01((t - T_DROP) / (0.2 * s)))
- : 1;
+ var pressDip =
+ t >= T_PRESS && t < T_PRESS + 0.22 * s
+ ? 1 - 0.1 * Math.sin(Math.PI * clamp01((t - T_PRESS) / (0.22 * s)))
+ : 1;
+ var releasePop =
+ t >= T_DROP && t < T_DROP + 0.2 * s
+ ? 1 - 0.08 * Math.sin(Math.PI * clamp01((t - T_DROP) / (0.2 * s)))
+ : 1;
cursor.style.transformOrigin = anchor.x + "px " + anchor.y + "px";
cursor.style.transform =
- "translate(" + (p.x - anchor.x).toFixed(2) + "px," + (p.y - anchor.y).toFixed(2) +
- "px) scale(" + (pressDip * releasePop).toFixed(4) + ")";
+ "translate(" +
+ (p.x - anchor.x).toFixed(2) +
+ "px," +
+ (p.y - anchor.y).toFixed(2) +
+ "px) scale(" +
+ (pressDip * releasePop).toFixed(4) +
+ ")";
arrow.style.opacity = grabbing ? "0" : "1";
hand.style.opacity = grabbing ? "1" : "0";
}
diff --git a/registry/components/cursor-marquee-select/cursor-marquee-select.html b/registry/components/cursor-marquee-select/cursor-marquee-select.html
index 1083fefbe4..90e13869a6 100644
--- a/registry/components/cursor-marquee-select/cursor-marquee-select.html
+++ b/registry/components/cursor-marquee-select/cursor-marquee-select.html
@@ -270,7 +270,9 @@
var compositionId = "cursor-marquee-select";
var duration = Math.max(
0.001,
- parseFloat(root.dataset.duration || html.getAttribute("data-composition-duration") || "4.6"),
+ parseFloat(
+ root.dataset.duration || html.getAttribute("data-composition-duration") || "4.6",
+ ),
);
if (vars.accent) root.style.setProperty("--ms-accent", String(vars.accent));
var pillLabel = String(vars.pill_label || "selected");
@@ -279,7 +281,13 @@
var H = root.clientHeight || 1080;
var fit = Math.min(W / 1920, H / 1080);
$("ms-stage").style.transform =
- "translate(" + (W - 1920 * fit) / 2 + "px," + (H - 1080 * fit) / 2 + "px) scale(" + fit + ")";
+ "translate(" +
+ (W - 1920 * fit) / 2 +
+ "px," +
+ (H - 1080 * fit) / 2 +
+ "px) scale(" +
+ fit +
+ ")";
var PHOTOS = [
["#ffb86b", "#ff6f91", "#c2416b", "beach-sunset.jpg"],
@@ -312,9 +320,17 @@
el.className = "ms-tile";
el.style.cssText = "left:" + box.x + "px;top:" + box.y + "px";
el.innerHTML =
- '' + CHECK + '
' +
- p[3] + "
";
+ '' +
+ CHECK +
+ '
' +
+ p[3] +
+ "
";
grid.appendChild(el);
return {
box: box,
@@ -350,7 +366,10 @@
};
}
- var A = { x: (num(vars.start_x, 20.5) / 100) * 1920, y: (num(vars.start_y, 25.5) / 100) * 1080 };
+ var A = {
+ x: (num(vars.start_x, 20.5) / 100) * 1920,
+ y: (num(vars.start_y, 25.5) / 100) * 1080,
+ };
var B = { x: (num(vars.end_x, 57) / 100) * 1920, y: (num(vars.end_y, 52) / 100) * 1080 };
var START = { x: 2060, y: 1220 };
var ASIDE = { x: B.x + 120, y: B.y + 110 };
@@ -359,9 +378,11 @@
function pointerAt(t) {
if (t <= T_ARRIVE) return arc(START, A, 0.16, easeArrive(clamp01(t / T_ARRIVE)));
if (t <= T_DRAG) return A;
- if (t <= T_RELEASE) return arc(A, B, 0.06, easeDrag((t - T_DRAG) / (T_RELEASE - T_DRAG)));
+ if (t <= T_RELEASE)
+ return arc(A, B, 0.06, easeDrag((t - T_DRAG) / (T_RELEASE - T_DRAG)));
if (t <= T_DRIFT) return B;
- if (t <= T_EXIT) return arc(B, ASIDE, 0.1, easeArrive(clamp01((t - T_DRIFT) / (0.5 * s))));
+ if (t <= T_EXIT)
+ return arc(B, ASIDE, 0.1, easeArrive(clamp01((t - T_DRIFT) / (0.5 * s))));
return arc(ASIDE, START, -0.1, easeExit(clamp01((t - T_EXIT) / (duration - T_EXIT))));
}
function rectAt(t) {
@@ -397,7 +418,12 @@
function render(t) {
var r = rectAt(t);
var dragging = t >= T_DRAG && t < T_RELEASE;
- var rectAlpha = t < T_DRAG ? 0 : dragging ? clamp01((t - T_DRAG) / 0.06) : 1 - clamp01((t - T_RELEASE) / (0.18 * s));
+ var rectAlpha =
+ t < T_DRAG
+ ? 0
+ : dragging
+ ? clamp01((t - T_DRAG) / 0.06)
+ : 1 - clamp01((t - T_RELEASE) / (0.18 * s));
rect.style.opacity = rectAlpha.toFixed(3);
var sx = Math.max(0.001, (r.x1 - r.x0) / 100).toFixed(4);
var sy = Math.max(0.001, (r.y1 - r.y0) / 100).toFixed(4);
@@ -418,7 +444,8 @@
if (on) count++;
if (on) firstAt = Math.min(firstAt, tile.at);
tile.ring.style.opacity = clamp01(u * 2).toFixed(3);
- tile.photo.style.transform = "scale(" + (1 - 0.06 * clamp01(u * 1.6)).toFixed(4) + ")";
+ tile.photo.style.transform =
+ "scale(" + (1 - 0.06 * clamp01(u * 1.6)).toFixed(4) + ")";
tile.check.style.opacity = clamp01(u * 3).toFixed(3);
tile.check.style.transform = "scale(" + (0.5 + 0.5 * easePop(u)).toFixed(4) + ")";
});
@@ -429,10 +456,19 @@
pill.style.transform = "scale(" + (0.94 + 0.06 * easePop(pillU)).toFixed(4) + ")";
var p = pointerAt(t);
- var press = t >= T_PRESS && t < T_PRESS + 0.2 * s ? 1 - 0.1 * Math.sin(Math.PI * clamp01((t - T_PRESS) / (0.2 * s))) : 1;
+ var press =
+ t >= T_PRESS && t < T_PRESS + 0.2 * s
+ ? 1 - 0.1 * Math.sin(Math.PI * clamp01((t - T_PRESS) / (0.2 * s)))
+ : 1;
cursor.style.transformOrigin = TIP.x + "px " + TIP.y + "px";
cursor.style.transform =
- "translate(" + (p.x - TIP.x).toFixed(2) + "px," + (p.y - TIP.y).toFixed(2) + "px) scale(" + press.toFixed(4) + ")";
+ "translate(" +
+ (p.x - TIP.x).toFixed(2) +
+ "px," +
+ (p.y - TIP.y).toFixed(2) +
+ "px) scale(" +
+ press.toFixed(4) +
+ ")";
}
var clock = { t: 0 };
diff --git a/registry/components/cursor-text-select/cursor-text-select.html b/registry/components/cursor-text-select/cursor-text-select.html
index 593c256647..fec8dd399b 100644
--- a/registry/components/cursor-text-select/cursor-text-select.html
+++ b/registry/components/cursor-text-select/cursor-text-select.html
@@ -164,14 +164,18 @@