Sure, I may have used a few (extension [ V] $verticalEllipsis-1$addInput-1) blocks, but it's worth the trade-off. (Spoiler alert: it's not a very unique block)
but replace the empty inputs with the correct variables for width and height
2: choosing the shape of the gradient
3: the repeat blocks are quite slow, i'm sure someone here will be able to remake that using faster list reporters for you :) (i will try to but someone is probably going to beat me to it and do it in a more elegant way)
Making a radial gradient is difficult, even though that could be done as a trick by putting stroke-only circles on top of each other... But how would I know when to stop?
The repeats do tend to be a bit slow and laggy depending on the size of the gradient, but I don't think map ({report [insert actions here]} input names: ((item)) ((index)) @delInput@addInput) over (numbers from (1) to (w)) would generally work better.
Maybe because it was from this topic, which doesn't say anything about the gradient block in the title.
It's also from 2021, which snap has changed quite a lot since then. I think it's good that you created your own gradient block, since now you can take advantage of the new snap features that weren't available back then.
The only recent and new things I see in my code is script vars and extension [ V] <t> blocks, though I do kind of agree with the concept of your thinking.
The left one has a invisible transparent border on the left and bottom side. So I declare the left one as yours because stretching can generate goofies like that. Mine doesn't use stretching.
EDIT: wait, both of em have the border. then i declare...