Skip to content

Comments

feat: add more playground providers#1607

Merged
danielroe merged 1 commit intonpmx-dev:mainfrom
olivermrose:feat/more-playgrounds
Feb 23, 2026
Merged

feat: add more playground providers#1607
danielroe merged 1 commit intonpmx-dev:mainfrom
olivermrose:feat/more-playgrounds

Conversation

@olivermrose
Copy link
Contributor

@olivermrose olivermrose commented Feb 23, 2026

🔗 Linked issue

N/A

🧭 Context

Adds more playground providers for popular packages.

Screenshot 2026-02-23 at 11 42 26 AM

motion-sv example

📚 Description

This adds playground detection for Svelte, Solid, and Tailwind. Also adds the icon/color pair for TypeScript since it seemed like that was missing.

There are a slew of other custom playgrounds including:

But they're not included in the primary READMEs, and I was unable to find practical examples of them in the wild, so I just chose not to add them for now.

I had to change the PlaygroundProvider interface slightly to allow multiple paths since Svelte redirects /repl to /playground; if this is undesired just lmk and I can revert.

@vercel
Copy link

vercel bot commented Feb 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 23, 2026 4:47pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 23, 2026 4:47pm
npmx-lunaria Ignored Ignored Feb 23, 2026 4:47pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

📝 Walkthrough

Walkthrough

Changes add support for four new playground providers: TypeScript, Solid, Svelte, and Tailwind. The Vue component now includes icon and colour mappings for these providers. The readme utility was updated to store provider paths as arrays instead of single values, enabling multiple URL path support per provider. New playground provider entries were added with their respective domains and icons. The configuration file extends the colour palette to include provider-specific colours for the newly supported playgrounds.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly relates to the changeset: adding playground providers (Svelte, Solid, Tailwind) and TypeScript icon/color pair, with detailed context and implementation notes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
server/utils/readme.ts (1)

97-97: startsWith path matching without a trailing-slash guard can produce false positives on general domains.

On svelte.dev (and typescriptlang.org), a URL like https://svelte.dev/replications/... would pass the startsWith('/repl') check and be incorrectly labelled as a Svelte playground link. While no such paths exist today, svelte.dev is a full-featured public site where future paths could collide.

♻️ Suggested tighter path check
-          (!provider.paths || provider.paths.some(path => parsed.pathname.startsWith(path)))
+          (!provider.paths || provider.paths.some(path =>
+            parsed.pathname === path || parsed.pathname.startsWith(path + '/')
+          ))

This keeps every current match (/repl/hello-world, /playground/..., /play) whilst ruling out coincidental prefix collisions on general domains.

Also applies to: 120-120


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c9e9821 and f5a466a.

📒 Files selected for processing (3)
  • app/components/Package/Playgrounds.vue
  • server/utils/readme.ts
  • uno.config.ts

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@danielroe danielroe added this pull request to the merge queue Feb 23, 2026
Merged via the queue into npmx-dev:main with commit 8d040ad Feb 23, 2026
18 checks passed
@github-actions
Copy link

Thanks for your first contribution, @olivermrose! 💪

We'd love to welcome you to the npmx community. Come and say hi on Discord! And once you've joined, visit npmx.wamellow.com to claim the contributor role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants