@@ -562,3 +562,32 @@ def rpc_arrow(cx: float, cy: float, r: float) -> str:
562562 f'stroke-width="{ w :.1f} " stroke-linecap="round" stroke-linejoin="round"/>'
563563 )
564564 return out
565+
566+
567+ def key (cx : float , cy : float , r : float ) -> str :
568+ """jwks-client: a key, the signing key a JWKS publishes."""
569+ sw = r * 0.2
570+ bow_x = cx - 0.45 * r
571+ shaft_x = bow_x + 0.32 * r
572+ return (
573+ f'<circle cx="{ bow_x :.1f} " cy="{ cy :.1f} " r="{ 0.32 * r :.1f} " fill="none" stroke="{ GOLD } " stroke-width="{ sw :.1f} "/>'
574+ f'<rect x="{ shaft_x :.1f} " y="{ cy - 0.1 * r :.1f} " width="{ 0.95 * r :.1f} " height="{ 0.2 * r :.1f} " fill="{ GOLD } "/>'
575+ f'<rect x="{ cx + 0.44 * r :.1f} " y="{ cy + 0.1 * r :.1f} " width="{ 0.14 * r :.1f} " height="{ 0.3 * r :.1f} " fill="{ GOLD } "/>'
576+ f'<rect x="{ cx + 0.68 * r :.1f} " y="{ cy + 0.1 * r :.1f} " width="{ 0.14 * r :.1f} " height="{ 0.2 * r :.1f} " fill="{ GOLD } "/>'
577+ )
578+
579+
580+ def scope (cx : float , cy : float , r : float ) -> str :
581+ """release-scope: a magnifier over a list of pending changes."""
582+ lx , ly , lr = cx - 0.15 * r , cy - 0.15 * r , 0.55 * r
583+ edge = lr / math .sqrt (2 )
584+ lines = "" .join (
585+ f'<rect x="{ lx - 0.3 * r :.1f} " y="{ ly + dy * r - 0.05 * r :.1f} " width="{ w * r :.1f} " height="{ 0.1 * r :.1f} " '
586+ f'rx="{ 0.05 * r :.1f} " fill="{ GOLD } "/>'
587+ for dy , w in ((- 0.2 , 0.6 ), (0.0 , 0.46 ), (0.2 , 0.32 ))
588+ )
589+ return (
590+ f'<circle cx="{ lx :.1f} " cy="{ ly :.1f} " r="{ lr :.1f} " fill="none" stroke="{ GOLD } " stroke-width="{ r * 0.16 :.1f} "/>'
591+ f'<line x1="{ lx + edge :.1f} " y1="{ ly + edge :.1f} " x2="{ cx + 0.8 * r :.1f} " y2="{ cy + 0.8 * r :.1f} " '
592+ f'stroke="{ GOLD } " stroke-width="{ r * 0.24 :.1f} " stroke-linecap="round"/>' + lines
593+ )
0 commit comments