Standalone App
The plugin in so nice & simple it would be great to have it as a standalone x-platform app too (global hotkey to open pattern-select menu, then apply chosen pattern on selected text and copy result to clipboard).
For implementation you may be interested in Tauri platform, lightweight Electron alternative:
"By using the OS's native web renderer, the size of a Tauri app can be less than 600 kB"
or Gluon which promises 200+ kB executables.
Also for standalone app better to have an ability to execute patterns in CLI-mode by name individually (for automation).
Just an idea, maybe it's better to wait when this feature request will have enough votes.
even simplier JS desktop-app development platform:
https://github.com/webui-dev/deno-webui https://github.com/webui-dev/deno-webui/blob/main/examples/hello_world/hello_world.ts