Skip to content

feat: Svelte-renderer#168

Merged
ctate merged 17 commits intovercel-labs:mainfrom
dummdidumm:svelte-renderer
Mar 6, 2026
Merged

feat: Svelte-renderer#168
ctate merged 17 commits intovercel-labs:mainfrom
dummdidumm:svelte-renderer

Conversation

@dummdidumm
Copy link
Copy Markdown
Contributor

@dummdidumm dummdidumm commented Feb 25, 2026

This PR introduces a new @json-render/svelte package that adds Svelte 5 support.

I've added two standalone examples (one very simple, one chat app; basically clone of the react version) and also added a Svelte version to the vite-renderers example.

The API closely aligns with that other the others.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Feb 25, 2026

@dummdidumm is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Feb 25, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm svelte is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: examples/svelte-chat/package.jsonnpm/svelte@5.53.5

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/svelte@5.53.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm svelte2tsx is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: pnpm-lock.yamlnpm/@sveltejs/package@2.5.7npm/svelte2tsx@0.7.51

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/svelte2tsx@0.7.51. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@dummdidumm dummdidumm marked this pull request as ready for review February 26, 2026 21:41
Copy link
Copy Markdown
Contributor

@vercel vercel Bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestions:

  1. User message is duplicated in the API request payload in Svelte's createChatUI and Vue's useChatUI due to synchronous state update before building historyForApi.
  1. $computed prop expressions in the Svelte renderer silently fail because the functions map is never threaded through to ElementRenderer's PropResolutionContext.
Fix on Vercel

@ctate
Copy link
Copy Markdown
Collaborator

ctate commented Mar 6, 2026

@dummdidumm Really nice work on this! Thank you!

@ctate ctate merged commit 512f7fe into vercel-labs:main Mar 6, 2026
3 of 6 checks passed
smildlzj pushed a commit to smildlzj/json-render that referenced this pull request Mar 7, 2026
* create svelte-renderer

* helpers

* reactive API

* turn into provider components

* fixes

* examples

* docs

* correct component props for catalog, harmonize defineRegistry API with other APis

* shuffle things around

* createRenderer

* on

* boundary/warning

* functions

* fix

* fix types
# Conflicts:
#	pnpm-lock.yaml
@dummdidumm dummdidumm deleted the svelte-renderer branch March 7, 2026 10:13
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