Compare commits

..
Author SHA1 Message Date
Chris Tate 550c52464e fixes 2026-04-10 22:17:47 -05:00
Chris Tate 87c92ae5e5 improve output 2026-04-10 22:06:55 -05:00
Chris Tate 5f2ecc1118 update release process (#267)
* update release process

* fix lock
2026-04-10 00:17:21 -05:00
Chris Tate 6e5ea186de feat(web): fetch GitHub star count dynamically (#266)
* feat(web): fetch GitHub star count dynamically

Replace the hardcoded "12k" star count in the header with a live value
from the GitHub API, revalidated every 24 hours. Gracefully hides the
count if the fetch fails.

* fix: add GITHUB_TOKEN to turbo.json globalEnv

* fix: remove GITHUB_TOKEN usage from star count fetch
2026-04-09 02:07:27 -05:00
Chris Tateandctate a9858918f8 Update official links to use json-render.dev domain (#265)
* Update official links to use json-render.dev domain

- Change dashboard example Docs link from json-render.vercel.app to json-render.dev
- Change Svelte Chat demo URL from json-render-svelte-chat-demo.labs.vercel.dev to svelte-chat-demo.json-render.dev

Fixes #264

* Revert svelte-chat demo URL change

Keep the original labs.vercel.dev URL for the Svelte Chat demo.

---------

Co-authored-by: ctate <366502+ctate@users.noreply.github.com>
2026-04-08 17:08:10 -05:00
Chris Tate eebc6e4f4f better ignore (#263) 2026-04-08 10:08:51 -05:00
vzt7 a123f56fe3 fix: resolve image demo /api/image 500 on Vercel (#253)
Add outputFileTracingIncludes so the Geist font TTF is bundled at the
symlink path the code reads from. In a pnpm monorepo the file was only
traced at the .pnpm store path, which Vercel does not map back to the
node_modules/geist/ symlink.
2026-04-07 01:43:04 -05:00
Rayan Salhab 753c1d1109 fix(remotion): include props in generatePrompt output (#249)
The Remotion schema defines props on composition entries, but generatePrompt
did not include those props in its output. As a result, the model had no
knowledge of the expected prop shape when generating JSON, causing runtime
failures when prop names didn't match the component's expected interface.

Changes:
- Import zod type for TypeScript support
- Extract formatZodType from PromptContext
- Add props field to component type definition
- Include formatted props string in component description

Fixes #224
2026-04-07 01:39:32 -05:00
38 changed files with 810 additions and 826 deletions
-13
View File
@@ -1,13 +0,0 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in the repository](https://github.com/changesets/changesets).
## Adding a changeset
To add a changeset, run `pnpm changeset` in the root of the repository. This will prompt you to select
which packages have changed and what type of version bump (major, minor, or patch) should be applied.
All `@json-render/*` packages are versioned together -- a changeset for any one of them will bump all
packages to the same version.
-39
View File
@@ -1,39 +0,0 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [
[
"@json-render/core",
"@json-render/react",
"@json-render/react-email",
"@json-render/react-pdf",
"@json-render/shadcn",
"@json-render/react-native",
"@json-render/remotion",
"@json-render/codegen",
"@json-render/zustand",
"@json-render/redux",
"@json-render/jotai",
"@json-render/vue",
"@json-render/xstate",
"@json-render/image",
"@json-render/mcp",
"@json-render/svelte",
"@json-render/solid",
"@json-render/react-three-fiber",
"@json-render/yaml",
"@json-render/shadcn-svelte",
"@json-render/ink",
"@json-render/next"
]
],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"privatePackages": {
"version": true,
"tag": false
}
}
+12
View File
@@ -13,6 +13,18 @@ concurrency:
cancel-in-progress: true
jobs:
version-sync:
name: Version Sync Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Check version sync
run: node scripts/check-version-sync.js
lint:
name: Lint
runs-on: ubuntu-latest
+127 -17
View File
@@ -8,19 +8,62 @@ on:
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
jobs:
release:
name: Release
check-release:
name: Check for new version
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
outputs:
should_release: ${{ steps.check.outputs.should_release }}
needs_github_release: ${{ steps.check.outputs.needs_github_release }}
version: ${{ steps.check.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Compare package.json version to npm and check GitHub release
id: check
run: |
LOCAL_VERSION=$(node -p "require('./packages/core/package.json').version")
echo "Local version: $LOCAL_VERSION"
NPM_VERSION=$(npm view @json-render/core version 2>/dev/null || echo "0.0.0")
echo "npm version: $NPM_VERSION"
if [ "$LOCAL_VERSION" != "$NPM_VERSION" ]; then
echo "Version changed: $NPM_VERSION -> $LOCAL_VERSION"
echo "should_release=true" >> "$GITHUB_OUTPUT"
echo "needs_github_release=true" >> "$GITHUB_OUTPUT"
else
echo "Version unchanged on npm, skipping build and publish"
echo "should_release=false" >> "$GITHUB_OUTPUT"
TAG="v$LOCAL_VERSION"
if gh release view "$TAG" &>/dev/null; then
echo "GitHub release $TAG exists"
echo "needs_github_release=false" >> "$GITHUB_OUTPUT"
else
echo "GitHub release $TAG is missing, will create it"
echo "needs_github_release=true" >> "$GITHUB_OUTPUT"
fi
fi
echo "version=$LOCAL_VERSION" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
name: Build
needs: check-release
if: needs.check-release.outputs.should_release == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
@@ -28,20 +71,87 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm run build
publish:
name: Publish to npm
needs: [check-release, build]
if: needs.check-release.outputs.should_release == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Create Release Pull Request or Publish
uses: changesets/action@v1
with:
version: pnpm ci:version
publish: pnpm ci:publish
title: "chore: version packages"
commit: "chore: version packages"
- name: Build packages
run: pnpm run build
- name: Publish all public packages
run: pnpm -r publish --no-git-checks --filter '@json-render/*'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_VERCEL_TOKEN_ELEVATED }}
github-release:
name: Create GitHub Release
needs: [check-release, publish]
if: >-
always()
&& needs.check-release.outputs.needs_github_release == 'true'
&& (needs.publish.result == 'success' || needs.publish.result == 'skipped')
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract changelog entry
run: |
VERSION="${{ needs.check-release.outputs.version }}"
awk '/<!-- release:start -->/{found=1; next} /<!-- release:end -->/{found=0} found{print}' CHANGELOG.md > /tmp/release-notes.md
LINES=$(wc -l < /tmp/release-notes.md | tr -d ' ')
if [ "$LINES" -lt 2 ]; then
echo "Error: No release notes found between <!-- release:start --> and <!-- release:end --> markers in CHANGELOG.md"
exit 1
fi
echo "Extracted release notes for $VERSION ($LINES lines)"
- name: Create GitHub Release
run: |
VERSION="${{ needs.check-release.outputs.version }}"
TAG="v$VERSION"
if gh release view "$TAG" &>/dev/null; then
echo "Release $TAG already exists"
else
echo "Creating release $TAG..."
gh release create "$TAG" \
--title "$TAG" \
--notes-file /tmp/release-notes.md
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_VERCEL_TOKEN_ELEVATED }}
+2
View File
@@ -29,6 +29,8 @@ build
dist
*.tsbuildinfo
.svelte-kit/
tsup.config.bundled_*.mjs
next-env.d.ts
# Debug
+15 -17
View File
@@ -73,25 +73,20 @@ Do **not** add `--port` flags -- portless handles port assignment automatically.
- Skills in `skills/*/SKILL.md` (if the package has a corresponding skill)
- `AGENTS.md` (if workflow or conventions change)
## Releases
## Releasing
This monorepo uses [Changesets](https://github.com/changesets/changesets) for versioning and publishing.
Releases are manual, single-PR affairs. The maintainer controls the changelog voice and format.
### Fixed version group
All public `@json-render/*` packages are in a **fixed** group (see `.changeset/config.json`). A changeset that bumps any one of them bumps all of them to the same version. You only need to list the packages that actually changed in the changeset front matter — the fixed group handles the rest.
All public `@json-render/*` packages share the same version. The canonical version lives in `packages/core/package.json`.
### Preparing a release
When asked to prepare a release (e.g. "prepare v0.12.0"):
When asked to prepare a release (e.g. "prepare v0.17.0"):
1. **Create a changeset file** at `.changeset/v0-<N>-release.md` following the existing pattern:
- YAML front matter listing changed packages with bump type (`minor` for feature releases, `patch` for bug-fix-only releases)
- A one-line summary, then `### New:` / `### Improved:` / `### Fixed:` sections describing each change
- Always list `@json-render/core` plus any packages with actual code changes
2. **Do NOT bump versions** in `package.json` files — CI runs `pnpm ci:version` (which calls `changeset version`) to do that automatically
3. **Do NOT manually write `CHANGELOG.md`** entries — `changeset version` generates them from the changeset file
4. **Add new packages to the fixed group** in `.changeset/config.json` if they should be versioned together with the rest
1. Create a branch (e.g. `prepare-v0.17.0`)
2. Bump the version in `packages/core/package.json`
3. Run `pnpm run version:sync` to update all other `@json-render/*` packages
4. Write the changelog entry in `CHANGELOG.md`, wrapped in `<!-- release:start -->` and `<!-- release:end -->` markers (move the markers from the previous entry to the new one)
5. **Fill documentation gaps** — every public package should have:
- A row in the root `README.md` packages table
- A renderer section in the root `README.md` (if it's a renderer)
@@ -101,12 +96,15 @@ When asked to prepare a release (e.g. "prepare v0.12.0"):
- A skill at `skills/<name>/SKILL.md`
- A `packages/<name>/README.md`
6. **Run `pnpm type-check`** after all changes to verify nothing is broken
7. Open a PR and merge to `main`
### CI scripts
CI compares the `@json-render/core` version to what's on npm. If it differs, it builds, publishes all public packages, and creates the GitHub release automatically. The release body is extracted from the content between the markers.
- `pnpm changeset` — interactively create a new changeset
- `pnpm ci:version` — run `changeset version` + lockfile update (CI only)
- `pnpm ci:publish` — build all packages and publish to npm (CI only)
### Scripts
- `pnpm run version:sync` — sync all `@json-render/*` package versions to match `@json-render/core`
- `pnpm run version:check` — verify all versions are in sync (runs in CI)
- `pnpm run ci:publish` — build all packages and publish to npm (CI only)
<!-- opensrc:start -->
+9
View File
@@ -0,0 +1,9 @@
# Changelog
## 0.16.0
<!-- release:start -->
### Improved
- **Release process** — Switched from Changesets to a manual single-PR release workflow with changelog markers and automatic npm publish on version bump
<!-- release:end -->
+5 -2
View File
@@ -1,13 +1,16 @@
import { Header } from "@/components/header";
import { getStarCount } from "@/lib/github";
export default function MainLayout({
export default async function MainLayout({
children,
}: {
children: React.ReactNode;
}) {
const stars = await getStarCount();
return (
<div className="min-h-screen flex flex-col">
<Header />
<Header stars={stars} />
<main className="flex-1">{children}</main>
</div>
);
+4 -1
View File
@@ -17,10 +17,13 @@ const PLAYGROUND_RULES = [
"NEVER use viewport height classes (min-h-screen, h-screen) - the UI renders inside a fixed-size container.",
"NEVER use page background colors (bg-gray-50) - the container has its own background.",
"For forms or small UIs: use Card as root with maxWidth:'sm' or 'md' and centered:true.",
"For content-heavy UIs (blogs, dashboards, product listings): use Stack or Grid as root. Use Grid with 2-3 columns for card layouts.",
"For content-heavy UIs (blogs, dashboards, product listings): use Stack or Grid as root. Use Grid with 2-3 columns for card layouts. Keep the total UI compact — avoid sprawling multi-section pages. Prefer a single focused Card over a full page layout.",
"Wrap each repeated item in a Card for visual separation and structure.",
"Use realistic, professional sample data. Include 3-5 items with varied content. Never leave state arrays empty.",
'For form inputs (Input, Textarea, Select), always include checks for validation (e.g. required, email, minLength). Always pair checks with a $bindState expression on the value prop (e.g. { "$bindState": "/path" }).',
"NEVER use emoji characters. Use the Icon component with Lucide icon names instead. For example, use Icon with name:'MapPin' instead of a pin emoji, Icon with name:'Mail' instead of an envelope emoji, etc.",
"For icon+label patterns, use a horizontal Stack with gap:'sm' and align:'center' containing an Icon and a Text.",
"For any tabular or list data with consistent columns (items, orders, stats), ALWAYS use the Table component. Never simulate tables with Stacks — the columns won't align.",
];
const MAX_PROMPT_LENGTH = 500;
+66 -67
View File
@@ -18,65 +18,62 @@ import { PlaygroundRenderer } from "@/lib/render/renderer";
import { playgroundCatalog } from "@/lib/render/catalog";
import { buildCatalogDisplayData } from "@/lib/render/catalog-display";
const SIMULATION_PROMPT = "Create a contact form with name, email, and message";
const SIMULATION_PROMPT = "Show a team performance dashboard";
interface SimulationStage {
tree: Spec;
stream: string;
}
// Shared state & element definitions for the progressive simulation stages.
const FORM_STATE = { form: { name: "", email: "", message: "" } };
const DASH_STATE = {
chartData: [
{ label: "Mon", value: 12 },
{ label: "Tue", value: 28 },
{ label: "Wed", value: 19 },
{ label: "Thu", value: 34 },
{ label: "Fri", value: 45 },
{ label: "Sat", value: 38 },
{ label: "Sun", value: 52 },
],
};
const NAME_INPUT = {
type: "Input",
const METRIC_REVENUE = {
type: "Metric",
props: {
label: "Name",
name: "name",
statePath: "/form/name",
checks: [{ type: "required", message: "Name is required" }],
label: "Weekly Revenue",
value: "12,400",
prefix: "$",
change: "+18%",
changeType: "positive",
},
} as const;
const EMAIL_INPUT = {
type: "Input",
props: {
label: "Email",
name: "email",
type: "email",
statePath: "/form/email",
checks: [
{ type: "required", message: "Email is required" },
{ type: "email", message: "Please enter a valid email" },
],
},
const CHART = {
type: "LineGraph",
props: { data: { $state: "/chartData" } },
} as const;
const MESSAGE_INPUT = {
type: "Textarea",
props: {
label: "Message",
name: "message",
statePath: "/form/message",
checks: [{ type: "required", message: "Message is required" }],
},
const SEP = { type: "Separator", props: {} } as const;
const PROGRESS_DEALS = {
type: "Progress",
props: { value: 72, label: "Deals Closed -- 72%" },
} as const;
const SUBMIT_BUTTON = {
type: "Button",
props: { label: "Send Message", variant: "primary" },
on: { press: { action: "formSubmit" } },
const PROGRESS_RETENTION = {
type: "Progress",
props: { value: 91, label: "Retention -- 91%" },
} as const;
const SIMULATION_STAGES: SimulationStage[] = [
{
tree: {
root: "card",
state: FORM_STATE,
state: DASH_STATE,
elements: {
card: {
type: "Card",
props: { title: "Contact Us", maxWidth: "md" },
props: { title: "Team Performance", maxWidth: "sm", centered: true },
children: [],
},
},
@@ -86,72 +83,74 @@ const SIMULATION_STAGES: SimulationStage[] = [
{
tree: {
root: "card",
state: FORM_STATE,
state: DASH_STATE,
elements: {
card: {
type: "Card",
props: { title: "Contact Us", maxWidth: "md" },
children: ["name"],
props: { title: "Team Performance", maxWidth: "sm", centered: true },
children: ["m1"],
},
name: NAME_INPUT,
m1: METRIC_REVENUE,
},
},
stream:
'{"op":"add","path":"/elements/name","value":{"type":"Input","props":{"label":"Name","name":"name","statePath":"/form/name","checks":[{"type":"required","message":"Name is required"}]}}}',
'{"op":"add","path":"/elements/m1","value":{"type":"Metric","props":{"label":"Weekly Revenue","value":"12,400","prefix":"$","change":"+18%","changeType":"positive"}}}',
},
{
tree: {
root: "card",
state: FORM_STATE,
state: DASH_STATE,
elements: {
card: {
type: "Card",
props: { title: "Contact Us", maxWidth: "md" },
children: ["name", "email"],
props: { title: "Team Performance", maxWidth: "sm", centered: true },
children: ["m1", "chart"],
},
name: NAME_INPUT,
email: EMAIL_INPUT,
m1: METRIC_REVENUE,
chart: CHART,
},
},
stream:
'{"op":"add","path":"/elements/email","value":{"type":"Input","props":{"label":"Email","name":"email","type":"email","statePath":"/form/email","checks":[{"type":"required","message":"Email is required"},{"type":"email","message":"Please enter a valid email"}]}}}',
'{"op":"add","path":"/elements/chart","value":{"type":"LineGraph","props":{"data":{"$state":"/chartData"}}}}',
},
{
tree: {
root: "card",
state: FORM_STATE,
state: DASH_STATE,
elements: {
card: {
type: "Card",
props: { title: "Contact Us", maxWidth: "md" },
children: ["name", "email", "message"],
props: { title: "Team Performance", maxWidth: "sm", centered: true },
children: ["m1", "chart", "sep", "p1"],
},
name: NAME_INPUT,
email: EMAIL_INPUT,
message: MESSAGE_INPUT,
m1: METRIC_REVENUE,
chart: CHART,
sep: SEP,
p1: PROGRESS_DEALS,
},
},
stream:
'{"op":"add","path":"/elements/message","value":{"type":"Textarea","props":{"label":"Message","name":"message","statePath":"/form/message","checks":[{"type":"required","message":"Message is required"}]}}}',
'{"op":"add","path":"/elements/p1","value":{"type":"Progress","props":{"value":72,"label":"Deals Closed -- 72%"}}}',
},
{
tree: {
root: "card",
state: FORM_STATE,
state: DASH_STATE,
elements: {
card: {
type: "Card",
props: { title: "Contact Us", maxWidth: "md" },
children: ["name", "email", "message", "submit"],
props: { title: "Team Performance", maxWidth: "sm", centered: true },
children: ["m1", "chart", "sep", "p1", "p2"],
},
name: NAME_INPUT,
email: EMAIL_INPUT,
message: MESSAGE_INPUT,
submit: SUBMIT_BUTTON,
m1: METRIC_REVENUE,
chart: CHART,
sep: SEP,
p1: PROGRESS_DEALS,
p2: PROGRESS_RETENTION,
},
},
stream:
'{"op":"add","path":"/elements/submit","value":{"type":"Button","props":{"label":"Send Message","variant":"primary"},"on":{"press":{"action":"formSubmit"}}}}',
'{"op":"add","path":"/elements/p2","value":{"type":"Progress","props":{"value":91,"label":"Retention -- 91%"}}}',
},
];
@@ -211,10 +210,10 @@ function specToNested(spec: Spec): Record<string, unknown> {
}
const EXAMPLE_PROMPTS = [
"Create a login form with email and password",
"Build a feedback form with rating stars",
"Design a contact card with avatar",
"Make a settings panel with toggles",
"Recipe card with rating and ingredients",
"Order receipt with item list and total",
"Team member profile card",
"Notification inbox with alerts",
];
export function Demo({
@@ -1117,7 +1116,7 @@ Open [http://localhost:3000](http://localhost:3000) to view.
))}
</div>
<div
className={`border border-border rounded bg-background font-mono text-xs text-left grid relative group ${fullscreen ? "flex-1 min-h-0" : "h-[28rem]"}`}
className={`border border-border rounded bg-background font-mono text-xs text-left grid relative group ${fullscreen ? "flex-1 min-h-0" : "h-[36rem]"}`}
>
{activeTab !== "catalog" && (
<div className="absolute top-2 right-2 z-10">
@@ -1357,7 +1356,7 @@ Open [http://localhost:3000](http://localhost:3000) to view.
</div>
</div>
<div
className={`border border-border rounded bg-background grid relative group ${fullscreen ? "flex-1 min-h-0" : "h-[28rem]"}`}
className={`border border-border rounded bg-background grid relative group ${fullscreen ? "flex-1 min-h-0" : "h-[36rem]"}`}
>
{renderView === "static" && (
<div className="absolute top-2 right-2 z-10">
+11 -5
View File
@@ -19,7 +19,13 @@ const navLinks = [
{ href: "/docs", label: "Docs" },
];
function GitHubLink({ className }: { className?: string }) {
function GitHubLink({
className,
stars,
}: {
className?: string;
stars?: string;
}) {
return (
<a
href="https://github.com/vercel-labs/json-render"
@@ -38,12 +44,12 @@ function GitHubLink({ className }: { className?: string }) {
>
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" />
</svg>
<span>12k</span>
{stars && <span>{stars}</span>}
</a>
);
}
export function Header() {
export function Header({ stars }: { stars?: string }) {
const pathname = usePathname();
const [mobileOpen, setMobileOpen] = useState(false);
@@ -122,14 +128,14 @@ export function Header() {
</Link>
))}
<Search />
<GitHubLink />
<GitHubLink stars={stars} />
<ThemeToggle />
</nav>
{/* Mobile nav */}
<div className="flex sm:hidden items-center gap-3">
<Search />
<GitHubLink />
<GitHubLink stars={stars} />
<Sheet open={mobileOpen} onOpenChange={setMobileOpen}>
<SheetTrigger
className="flex items-center justify-center"
+20
View File
@@ -0,0 +1,20 @@
const REPO = "vercel-labs/json-render";
const REVALIDATE = 86400;
export async function getStarCount(): Promise<string> {
try {
const res = await fetch(`https://api.github.com/repos/${REPO}`, {
headers: { Accept: "application/vnd.github.v3+json" },
next: { revalidate: REVALIDATE },
});
if (!res.ok) return "";
const data = await res.json();
const count = data.stargazers_count;
if (typeof count !== "number") return "";
if (count >= 1000)
return `${(count / 1000).toFixed(count >= 10000 ? 0 : 1)}k`;
return String(count);
} catch {
return "";
}
}
+44 -4
View File
@@ -165,7 +165,8 @@ export const playgroundCatalog = defineCatalog(schema, {
.enum(["body", "caption", "muted", "lead", "code"])
.nullable(),
}),
description: "Paragraph text",
description:
'Paragraph text. In repeat scopes, use { "$template": "${field1} ${field2}" } to interpolate item fields.',
example: { text: "Hello, world!" },
},
@@ -178,6 +179,18 @@ export const playgroundCatalog = defineCatalog(schema, {
description: "Placeholder image (displays alt text in a styled box)",
},
Icon: {
props: z.object({
name: z.string(),
size: z.enum(["sm", "md", "lg"]).nullable(),
color: z
.enum(["default", "muted", "primary", "success", "warning", "danger"])
.nullable(),
}),
description:
"Lucide icon by name. PascalCase: MapPin, Mail, Globe, Calendar, Star, Heart, Check, X, ArrowRight, Phone, Building, Clock, Shield, Zap, Users, Eye, Download, Upload, Search, Filter, Settings, Bell, ChevronRight, ExternalLink, Info, AlertTriangle, CheckCircle, XCircle. Use in horizontal Stacks with Text for icon+label patterns. Never use emoji — always use Icon.",
},
Avatar: {
props: z.object({
src: z.string().nullable(),
@@ -259,8 +272,32 @@ export const playgroundCatalog = defineCatalog(schema, {
value: z.number(),
max: z.number().nullable(),
label: z.string().nullable(),
interactive: z.boolean().nullable(),
}),
description: "Star rating display",
events: ["change"],
description:
"Interactive star rating. Use { $bindState } on value for binding. Set interactive: false for read-only display.",
example: { value: 4, max: 5, label: "Rating" },
},
Metric: {
props: z.object({
label: z.string(),
value: z.string(),
change: z.string().nullable(),
changeType: z.enum(["positive", "negative", "neutral"]).nullable(),
prefix: z.string().nullable(),
suffix: z.string().nullable(),
}),
description:
"Key metric / stat display. Shows a large value with label and optional change indicator. Use for dashboard KPIs.",
example: {
label: "Total Revenue",
value: "125,000",
prefix: "$",
change: "+12.5%",
changeType: "positive",
},
},
// ── Charts ──────────────────────────────────────────────────────────
@@ -411,11 +448,14 @@ export const playgroundCatalog = defineCatalog(schema, {
Button: {
props: z.object({
label: z.string(),
variant: z.enum(["primary", "secondary", "danger"]).nullable(),
variant: z
.enum(["primary", "secondary", "outline", "danger"])
.nullable(),
disabled: z.boolean().nullable(),
}),
events: ["press"],
description: "Clickable button. Bind on.press for handler.",
description:
"Clickable button. primary = solid fill, outline = bordered/transparent, secondary = muted fill. Bind on.press for handler.",
example: { label: "Submit", variant: "primary" },
},
+355 -124
View File
@@ -105,6 +105,7 @@ import {
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { icons as lucideIcons } from "lucide-react";
// =============================================================================
// Registry — components + actions, types inferred from catalog
@@ -127,23 +128,25 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
return (
<div
className={`border border-border rounded-lg p-4 bg-card text-card-foreground overflow-hidden ${maxWidthClass} ${centeredClass}`}
className={`border border-border rounded-xl p-5 bg-card text-card-foreground shadow-sm overflow-hidden h-full flex flex-col ${maxWidthClass} ${centeredClass}`}
>
{(props.title || props.description) && (
<div className="mb-4">
{props.title && (
<h3 className="font-semibold text-lg text-left">
<h3 className="font-semibold text-lg tracking-tight">
{props.title}
</h3>
)}
{props.description && (
<p className="text-sm text-muted-foreground mt-1 text-left">
<p className="text-sm text-muted-foreground mt-1">
{props.description}
</p>
)}
</div>
)}
<div className="space-y-3">{children}</div>
<div className="flex-1 flex flex-col gap-4 [&>:last-child]:mt-auto">
{children}
</div>
</div>
);
},
@@ -160,14 +163,31 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
: props.gap === "none"
? "gap-0"
: "gap-3";
const alignClass =
props.align === "center"
? "items-center"
: props.align === "end"
? "items-end"
: props.align === "stretch"
? "items-stretch"
: "items-start";
let alignClass: string;
if (isHorizontal) {
alignClass =
props.align === "center"
? "items-center"
: props.align === "end"
? "items-end"
: props.align === "stretch"
? "items-stretch"
: "items-start";
} else {
// Vertical: items-center/end lets inline elements (Avatar, Badge, Button)
// center/align naturally. Block containers (Grid, Accordion, Table) add
// their own w-full to stretch regardless.
alignClass =
props.align === "center"
? "items-center"
: props.align === "end"
? "items-end"
: props.align === "start"
? "items-start"
: "items-stretch";
}
const justifyClass =
props.justify === "center"
? "justify-center"
@@ -181,7 +201,7 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
return (
<div
className={`flex ${isHorizontal ? "flex-row flex-wrap" : "flex-col"} ${gapClass} ${alignClass} ${justifyClass}`}
className={`flex ${isHorizontal ? "flex-row flex-wrap" : "flex-col w-full"} ${gapClass} ${alignClass} ${justifyClass}`}
>
{children}
</div>
@@ -189,7 +209,12 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
},
Grid: ({ props, children }) => {
const n = props.columns ?? 1;
const childCount = Array.isArray(children)
? children.length
: children
? 1
: 0;
const n = Math.min(props.columns ?? 1, childCount || 1);
const cols =
n >= 6
? "grid-cols-6"
@@ -205,13 +230,15 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
const gridGap =
props.gap === "lg" ? "gap-4" : props.gap === "sm" ? "gap-2" : "gap-3";
return <div className={`grid ${cols} ${gridGap}`}>{children}</div>;
return <div className={`grid w-full ${cols} ${gridGap}`}>{children}</div>;
},
Separator: ({ props }) => (
<Separator
orientation={props.orientation ?? "horizontal"}
className={props.orientation === "vertical" ? "h-full mx-2" : "my-3"}
className={
props.orientation === "vertical" ? "h-full mx-3" : "my-4 opacity-50"
}
/>
),
@@ -383,7 +410,7 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
});
return (
<div className="rounded-md border border-border overflow-hidden">
<div className="w-full rounded-md border border-border overflow-hidden">
<TablePrimitive>
{props.caption && <TableCaption>{props.caption}</TableCaption>}
<TableHeader>
@@ -411,20 +438,17 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
const level = props.level ?? "h2";
const headingClass =
level === "h1"
? "text-2xl font-bold"
? "text-2xl font-bold tracking-tight"
: level === "h3"
? "text-base font-semibold"
? "text-base font-semibold tracking-tight"
: level === "h4"
? "text-sm font-semibold"
: "text-lg font-semibold";
? "text-sm font-medium uppercase tracking-wider text-muted-foreground"
: "text-xl font-semibold tracking-tight";
if (level === "h1")
return <h1 className={`${headingClass} text-left`}>{props.text}</h1>;
if (level === "h3")
return <h3 className={`${headingClass} text-left`}>{props.text}</h3>;
if (level === "h4")
return <h4 className={`${headingClass} text-left`}>{props.text}</h4>;
return <h2 className={`${headingClass} text-left`}>{props.text}</h2>;
if (level === "h1") return <h1 className={headingClass}>{props.text}</h1>;
if (level === "h3") return <h3 className={headingClass}>{props.text}</h3>;
if (level === "h4") return <h4 className={headingClass}>{props.text}</h4>;
return <h2 className={headingClass}>{props.text}</h2>;
},
Text: ({ props }) => {
@@ -440,20 +464,59 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
: "text-sm";
if (props.variant === "code") {
return <code className={`${textClass} text-left`}>{props.text}</code>;
return <code className={textClass}>{props.text}</code>;
}
return <p className={`${textClass} text-left`}>{props.text}</p>;
return <p className={textClass}>{props.text}</p>;
},
Image: ({ props }) => (
<div
className="bg-muted border border-border rounded flex items-center justify-center text-xs text-muted-foreground aspect-video"
style={{ width: props.width ?? 80, height: props.height ?? 60 }}
className="w-full bg-muted/50 border border-dashed border-border rounded-lg flex flex-col items-center justify-center gap-2 text-muted-foreground/60 px-4"
style={{
maxWidth: props.width ?? undefined,
height: props.height ?? 120,
minHeight: 80,
}}
>
{props.alt || "img"}
<svg
width="32"
height="32"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
className="opacity-50"
>
<rect width="18" height="18" x="3" y="3" rx="2" ry="2" />
<circle cx="9" cy="9" r="2" />
<path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" />
</svg>
{props.alt && <span className="text-xs">{props.alt}</span>}
</div>
),
Icon: ({ props }) => {
const IconComponent = lucideIcons[props.name as keyof typeof lucideIcons];
if (!IconComponent) return null;
const sizeMap = { sm: 16, md: 20, lg: 24 } as const;
const px = sizeMap[props.size ?? "md"] ?? 20;
const colorClass =
props.color === "muted"
? "text-muted-foreground"
: props.color === "primary"
? "text-primary"
: props.color === "success"
? "text-green-600 dark:text-green-400"
: props.color === "warning"
? "text-yellow-600 dark:text-yellow-400"
: props.color === "danger"
? "text-red-600 dark:text-red-400"
: "";
return <IconComponent size={px} className={`shrink-0 ${colorClass}`} />;
},
Avatar: ({ props }) => {
const name = props.name || "?";
const initials = name
@@ -462,16 +525,16 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
.join("")
.slice(0, 2)
.toUpperCase();
const avatarSize =
const sizeStyles =
props.size === "lg"
? "w-12 h-12 text-base"
? { outer: "w-[72px] h-[72px]", text: "text-xl", ring: "ring-[3px]" }
: props.size === "sm"
? "w-8 h-8 text-xs"
: "w-10 h-10 text-sm";
? { outer: "w-8 h-8", text: "text-xs", ring: "ring-2" }
: { outer: "w-10 h-10", text: "text-sm", ring: "ring-2" };
return (
<div
className={`${avatarSize} rounded-full bg-muted flex items-center justify-center font-medium`}
className={`${sizeStyles.outer} ${sizeStyles.text} rounded-full bg-gradient-to-br from-muted-foreground/20 to-muted flex items-center justify-center font-semibold tracking-wide ${sizeStyles.ring} ring-background shadow-sm`}
>
{initials}
</div>
@@ -491,9 +554,20 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
: props.variant === "warning"
? "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100"
: "";
const dotColor =
props.variant === "success"
? "bg-green-500"
: props.variant === "warning"
? "bg-yellow-500"
: props.variant === "danger"
? "bg-red-500"
: "";
return (
<Badge variant={variant} className={customClass}>
<Badge variant={variant} className={`${customClass} gap-1.5`}>
{dotColor && (
<span className={`w-1.5 h-1.5 rounded-full ${dotColor} shrink-0`} />
)}
{props.text}
</Badge>
);
@@ -510,8 +584,47 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
? "border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100"
: "";
const iconProps = {
width: 16,
height: 16,
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
strokeWidth: 2,
strokeLinecap: "round" as const,
strokeLinejoin: "round" as const,
className: "shrink-0",
};
const icon =
props.type === "success" ? (
<svg {...iconProps}>
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" />
<polyline points="22 4 12 14.01 9 11.01" />
</svg>
) : props.type === "warning" ? (
<svg {...iconProps}>
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" />
<line x1="12" y1="9" x2="12" y2="13" />
<line x1="12" y1="17" x2="12.01" y2="17" />
</svg>
) : props.type === "error" ? (
<svg {...iconProps}>
<circle cx="12" cy="12" r="10" />
<line x1="15" y1="9" x2="9" y2="15" />
<line x1="9" y1="9" x2="15" y2="15" />
</svg>
) : (
<svg {...iconProps}>
<circle cx="12" cy="12" r="10" />
<line x1="12" y1="16" x2="12" y2="12" />
<line x1="12" y1="8" x2="12.01" y2="8" />
</svg>
);
return (
<Alert variant={variant} className={customClass}>
{icon}
<AlertTitle>{props.title}</AlertTitle>
{props.message && (
<AlertDescription>{props.message}</AlertDescription>
@@ -523,7 +636,7 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
Progress: ({ props }) => {
const value = Math.min(100, Math.max(0, props.value || 0));
return (
<div className="space-y-2">
<div className="w-full space-y-2">
{props.label && (
<Label className="text-sm text-muted-foreground">
{props.label}
@@ -607,9 +720,19 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
</PopoverPrimitive>
),
Rating: ({ props }) => {
const ratingValue = props.value || 0;
Rating: ({ props, bindings, emit }) => {
const [boundValue, setBoundValue] = useBoundProp<number>(
props.value as number | undefined,
bindings?.value,
);
const [localValue, setLocalValue] = useState(props.value || 0);
const isBound = !!bindings?.value;
const ratingValue = isBound ? (boundValue ?? 0) : localValue;
const setValue = isBound ? setBoundValue : setLocalValue;
const maxRating = props.max ?? 5;
const interactive = props.interactive !== false;
const [hoverIndex, setHoverIndex] = useState(-1);
return (
<div className="space-y-2">
{props.label && (
@@ -617,15 +740,78 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
{props.label}
</Label>
)}
<div className="flex gap-1">
{Array.from({ length: maxRating }).map((_, i) => (
<span
key={i}
className={`text-lg ${i < ratingValue ? "text-yellow-400" : "text-muted"}`}
>
*
<div
className="flex gap-0.5"
onMouseLeave={() => interactive && setHoverIndex(-1)}
>
{Array.from({ length: maxRating }).map((_, i) => {
const filled =
hoverIndex >= 0 ? i <= hoverIndex : i < ratingValue;
return (
<button
key={i}
type="button"
className={`p-0.5 transition-colors ${interactive ? "cursor-pointer hover:scale-110" : "cursor-default"}`}
onMouseEnter={() => interactive && setHoverIndex(i)}
onClick={() => {
if (!interactive) return;
const newVal = i + 1 === ratingValue ? 0 : i + 1;
setValue(newVal);
emit("change");
}}
>
<svg
width="20"
height="20"
viewBox="0 0 24 24"
fill={filled ? "currentColor" : "none"}
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
className={
filled ? "text-yellow-400" : "text-muted-foreground/40"
}
>
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />
</svg>
</button>
);
})}
</div>
</div>
);
},
Metric: ({ props }) => {
const changeColor =
props.changeType === "positive"
? "text-green-600 dark:text-green-400"
: props.changeType === "negative"
? "text-red-600 dark:text-red-400"
: "text-muted-foreground";
const changeIcon =
props.changeType === "positive"
? "\u2191"
: props.changeType === "negative"
? "\u2193"
: "";
return (
<div className="space-y-1">
<div className="text-sm text-muted-foreground">{props.label}</div>
<div className="flex items-baseline gap-1.5">
<span className="text-2xl font-semibold tracking-tight tabular-nums">
{props.prefix}
{props.value}
{props.suffix}
</span>
{props.change && (
<span className={`text-sm font-medium ${changeColor}`}>
{changeIcon}
{props.change}
</span>
))}
)}
</div>
</div>
);
@@ -636,26 +822,39 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
BarGraph: ({ props }) => {
const data = props.data || [];
const maxValue = Math.max(...data.map((d) => d.value), 1);
const barColors = [
"bg-primary",
"bg-primary/80",
"bg-primary/60",
"bg-primary/70",
"bg-primary/90",
"bg-primary/50",
];
return (
<div className="space-y-2">
<div className="space-y-3">
{props.title && (
<div className="text-sm font-medium text-left">{props.title}</div>
<div className="text-sm font-medium">{props.title}</div>
)}
<div className="flex gap-2">
<div className="flex items-end gap-2" style={{ height: 160 }}>
{data.map((d, i) => (
<div key={i} className="flex-1 flex flex-col items-center gap-1">
<div className="text-xs text-muted-foreground">{d.value}</div>
<div className="w-full h-24 flex items-end">
<div
key={i}
className="flex-1 flex flex-col items-center gap-1.5 h-full justify-end group"
>
<div className="text-[11px] font-medium text-muted-foreground tabular-nums">
{d.value}
</div>
<div className="w-full flex-1 flex items-end">
<div
className="w-full bg-primary rounded-t transition-all"
className={`w-full ${barColors[i % barColors.length]} rounded-t-md transition-all group-hover:opacity-80`}
style={{
height: `${(d.value / maxValue) * 100}%`,
minHeight: 2,
minHeight: 4,
}}
/>
</div>
<div className="text-xs text-muted-foreground truncate w-full text-center">
<div className="text-[11px] text-muted-foreground truncate w-full text-center">
{d.label}
</div>
</div>
@@ -672,8 +871,8 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
const range = maxValue - minValue || 1;
const width = 300;
const height = 100;
const padding = { top: 10, right: 10, bottom: 10, left: 10 };
const height = 140;
const padding = { top: 12, right: 12, bottom: 12, left: 12 };
const chartWidth = width - padding.left - padding.right;
const chartHeight = height - padding.top - padding.bottom;
@@ -690,77 +889,107 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
return { x, y, ...d };
});
const pathD =
points.length > 0
? `M ${points.map((p) => `${p.x} ${p.y}`).join(" L ")}`
: "";
// Build smooth cubic bezier curve through points
let smoothPath = "";
let areaPath = "";
if (points.length > 1) {
const first = points[0]!;
const last = points[points.length - 1]!;
smoothPath = `M ${first.x} ${first.y}`;
for (let i = 0; i < points.length - 1; i++) {
const curr = points[i]!;
const next = points[i + 1]!;
const cpx = (curr.x + next.x) / 2;
smoothPath += ` C ${cpx} ${curr.y}, ${cpx} ${next.y}, ${next.x} ${next.y}`;
}
const bottomY = height - padding.bottom;
areaPath = `${smoothPath} L ${last.x} ${bottomY} L ${first.x} ${bottomY} Z`;
} else if (points.length === 1) {
const only = points[0]!;
smoothPath = `M ${only.x} ${only.y}`;
}
const gradientId = `line-gradient-${Math.random().toString(36).slice(2, 8)}`;
return (
<div className="space-y-2">
<div className="space-y-3">
{props.title && (
<div className="text-sm font-medium text-left">{props.title}</div>
<div className="text-sm font-medium">{props.title}</div>
)}
<div className="relative h-28">
<svg viewBox={`0 0 ${width} ${height}`} className="w-full h-full">
<line
x1={padding.left}
y1={padding.top + chartHeight / 2}
x2={width - padding.right}
y2={padding.top + chartHeight / 2}
stroke="currentColor"
strokeOpacity="0.1"
strokeWidth="1"
/>
<line
x1={padding.left}
y1={padding.top}
x2={width - padding.right}
y2={padding.top}
stroke="currentColor"
strokeOpacity="0.1"
strokeWidth="1"
/>
<line
x1={padding.left}
y1={height - padding.bottom}
x2={width - padding.right}
y2={height - padding.bottom}
stroke="currentColor"
strokeOpacity="0.1"
strokeWidth="1"
/>
{pathD && (
<div className="relative" style={{ height: 160 }}>
<svg
viewBox={`0 0 ${width} ${height}`}
className="w-full h-full"
preserveAspectRatio="none"
>
<defs>
<linearGradient id={gradientId} x1="0" y1="0" x2="0" y2="1">
<stop
offset="0%"
stopColor="currentColor"
stopOpacity="0.15"
/>
<stop
offset="100%"
stopColor="currentColor"
stopOpacity="0"
/>
</linearGradient>
</defs>
{[0, 0.25, 0.5, 0.75, 1].map((frac) => (
<line
key={frac}
x1={padding.left}
y1={padding.top + chartHeight * frac}
x2={width - padding.right}
y2={padding.top + chartHeight * frac}
stroke="currentColor"
strokeOpacity="0.07"
vectorEffect="non-scaling-stroke"
strokeWidth="1"
/>
))}
{areaPath && (
<path
d={pathD}
d={areaPath}
fill={`url(#${gradientId})`}
className="text-primary"
/>
)}
{smoothPath && (
<path
d={smoothPath}
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
vectorEffect="non-scaling-stroke"
className="text-primary"
/>
)}
{points.map((p, i) => (
<circle
key={i}
cx={p.x}
cy={p.y}
r="4"
className="fill-primary"
/>
))}
</svg>
{points.map((p, i) => (
<div
key={i}
className="absolute w-[7px] h-[7px] rounded-full bg-primary -translate-x-1/2 -translate-y-1/2"
style={{
left: `${(p.x / width) * 100}%`,
top: `${(p.y / height) * 100}%`,
}}
/>
))}
</div>
{data.length > 0 && (
<div className="flex justify-between">
{data.map((d, i) => (
<div
{points.length > 0 && (
<div className="relative h-4">
{points.map((p, i) => (
<span
key={i}
className="text-xs text-muted-foreground text-center"
style={{ width: `${100 / data.length}%` }}
className="absolute text-[11px] text-muted-foreground -translate-x-1/2"
style={{ left: `${(p.x / width) * 100}%` }}
>
{d.label}
</div>
{data[i]?.label}
</span>
))}
</div>
)}
@@ -787,7 +1016,7 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
);
return (
<div className="space-y-2">
<div className="w-full space-y-2">
{props.label && <Label htmlFor={props.name}>{props.label}</Label>}
<Input
id={props.name}
@@ -829,7 +1058,7 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
);
return (
<div className="space-y-2">
<div className="w-full space-y-2">
{props.label && <Label htmlFor={props.name}>{props.label}</Label>}
<Textarea
id={props.name}
@@ -872,7 +1101,7 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
);
return (
<div className="space-y-2">
<div className="w-full space-y-2">
<Label>{props.label}</Label>
<Select
value={value}
@@ -945,7 +1174,7 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
const setValue = isBound ? setBoundValue : setLocalValue;
return (
<div className="space-y-2">
<div className="w-full space-y-2">
{props.label && <Label>{props.label}</Label>}
<RadioGroup
value={value}
@@ -987,7 +1216,7 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
const setChecked = isBound ? setBoundChecked : setLocalChecked;
return (
<div className="flex items-center justify-between space-x-2">
<div className="w-full flex items-center justify-between space-x-2">
<Label htmlFor={props.name} className="cursor-pointer">
{props.label}
</Label>
@@ -1014,7 +1243,7 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
const setValue = isBound ? setBoundValue : setLocalValue;
return (
<div className="space-y-2">
<div className="w-full space-y-2">
{props.label && (
<div className="flex justify-between">
<Label className="text-sm">{props.label}</Label>
@@ -1041,9 +1270,11 @@ export const { registry, executeAction } = defineRegistry(playgroundCatalog, {
const variant =
props.variant === "danger"
? "destructive"
: props.variant === "secondary"
? "secondary"
: "default";
: props.variant === "outline"
? "outline"
: props.variant === "secondary"
? "secondary"
: "default";
return (
<Button
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
+1 -1
View File
@@ -47,7 +47,7 @@ export function Header() {
</div>
<nav className="flex items-center gap-4">
<a
href="https://json-render.vercel.app"
href="https://json-render.dev"
target="_blank"
rel="noopener noreferrer"
className="text-sm text-muted-foreground hover:text-foreground transition-colors"
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
+5
View File
@@ -2,6 +2,11 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
serverExternalPackages: ["@resvg/resvg-js", "satori"],
outputFileTracingIncludes: {
"/api/image": [
"./node_modules/geist/dist/fonts/geist-sans/Geist-Regular.ttf",
],
},
};
export default nextConfig;
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
-6
View File
@@ -1,6 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
+4 -5
View File
@@ -13,7 +13,7 @@
"scripts": {
"build": "turbo run build",
"predev": "command -v portless >/dev/null 2>&1 || (echo '\\nportless is required but not installed. Run: npm i -g portless\\nSee: https://github.com/vercel-labs/portless\\n' && exit 1)",
"dev": "turbo run dev --concurrency 20",
"dev": "turbo run dev --concurrency 50",
"lint": "turbo run lint",
"format": "prettier --write \"**/*.{ts,tsx}\"",
"type-check": "turbo run check-types",
@@ -23,13 +23,12 @@
"test:coverage": "vitest run --coverage",
"test:e2e": "pnpm --filter e2e-tests test",
"prepare": "husky",
"changeset": "changeset",
"ci:version": "changeset version && pnpm install --no-frozen-lockfile",
"ci:publish": "pnpm run build && changeset publish",
"version:sync": "node scripts/sync-version.js",
"version:check": "node scripts/check-version-sync.js",
"ci:publish": "pnpm run build && pnpm -r publish --no-git-checks --filter '@json-render/*'",
"generate:og": "npx tsx scripts/generate-og-images.mts"
},
"devDependencies": {
"@changesets/cli": "2.29.8",
"@resvg/resvg-js": "2.6.2",
"@solidjs/testing-library": "^0.8.10",
"@sveltejs/vite-plugin-svelte": "^6.2.4",
+21 -20
View File
@@ -5,7 +5,6 @@ import {
resolveBindings,
resolveActionParam,
_resetWarnedComputedFns,
_resetWarnedTemplatePaths,
} from "./props";
import type { PropResolutionContext } from "./props";
@@ -635,30 +634,32 @@ describe("$template expressions", () => {
);
});
it("warns when path does not start with /", () => {
_resetWarnedTemplatePaths();
const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {});
it("resolves bare names against state model when not in repeat", () => {
const ctx: PropResolutionContext = { stateModel: { name: "Bob" } };
const result = resolvePropValue({ $template: "Hi ${name}!" }, ctx);
expect(result).toBe("Hi Bob!");
expect(warnSpy).toHaveBeenCalledWith(
expect.stringContaining('$template path "name"'),
);
warnSpy.mockRestore();
_resetWarnedTemplatePaths();
});
it("deduplicates warnings for the same $template path", () => {
_resetWarnedTemplatePaths();
const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {});
const ctx: PropResolutionContext = { stateModel: { name: "Bob" } };
resolvePropValue({ $template: "Hi ${name}!" }, ctx);
resolvePropValue({ $template: "Hi ${name}!" }, ctx);
const calls = warnSpy.mock.calls.filter((c) =>
String(c[0]).includes('$template path "name"'),
it("resolves bare names against repeat item first", () => {
const ctx: PropResolutionContext = {
stateModel: { name: "Global" },
repeatItem: { name: "Alice", action: "signed up" },
repeatIndex: 0,
};
const result = resolvePropValue({ $template: "${name} ${action}" }, ctx);
expect(result).toBe("Alice signed up");
});
it("falls back to state model for bare names not in repeat item", () => {
const ctx: PropResolutionContext = {
stateModel: { fallback: "ok" },
repeatItem: { name: "Alice" },
repeatIndex: 0,
};
const result = resolvePropValue(
{ $template: "${name} - ${fallback}" },
ctx,
);
expect(calls).toHaveLength(1);
warnSpy.mockRestore();
_resetWarnedTemplatePaths();
expect(result).toBe("Alice - ok");
});
});
+18 -24
View File
@@ -24,8 +24,10 @@ import { evaluateVisibility, type VisibilityContext } from "./visibility";
* - `{ $cond, $then, $else }` conditionally picks a value
* - `{ $computed: string, args?: Record<string, PropExpression> }` calls a
* registered function with resolved args and returns the result
* - `{ $template: string }` interpolates `${/path}` references in the
* string with values from the state model
* - `{ $template: string }` interpolates `${/path}` and `${field}`
* references. Absolute paths (`${/path}`) resolve against the state
* model. Bare names (`${field}`) resolve against the current repeat
* item first, then fall back to the state model at `/<field>`.
* - Any other value is a literal (passthrough)
*/
export type PropExpression<T = unknown> =
@@ -156,15 +158,6 @@ export function _resetWarnedComputedFns(): void {
warnedComputedFns.clear();
}
// Same deduplication pattern for $template paths that don't start with "/".
const WARNED_TEMPLATE_MAX = 100;
const warnedTemplatePaths = new Set<string>();
/** @internal Test-only: clear the deduplication set for $template warnings. */
export function _resetWarnedTemplatePaths(): void {
warnedTemplatePaths.clear();
}
// =============================================================================
// Prop Expression Resolution
// =============================================================================
@@ -269,24 +262,25 @@ export function resolvePropValue(
return fn(resolvedArgs);
}
// $template: interpolate ${/path} references with state values
// $template: interpolate ${/path} and ${field} references.
// Absolute paths (starting with "/") resolve against the state model.
// Bare names resolve against the current repeat item first, then fall
// back to the state model at "/<name>".
if (isTemplateExpression(value)) {
return value.$template.replace(
/\$\{([^}]+)\}/g,
(_match, rawPath: string) => {
let path = rawPath;
if (!path.startsWith("/")) {
if (!warnedTemplatePaths.has(path)) {
if (warnedTemplatePaths.size < WARNED_TEMPLATE_MAX) {
warnedTemplatePaths.add(path);
}
console.warn(
`$template path "${path}" should be a JSON Pointer starting with "/". Automatically resolving as "/${path}".`,
);
}
path = "/" + path;
if (rawPath.startsWith("/")) {
const resolved = getByPath(ctx.stateModel, rawPath);
return resolved != null ? String(resolved) : "";
}
const resolved = getByPath(ctx.stateModel, path);
// Bare name: try repeat item first
if (ctx.repeatItem !== undefined) {
const fromItem = getByPath(ctx.repeatItem, rawPath);
if (fromItem != null) return String(fromItem);
}
// Fall back to state model
const resolved = getByPath(ctx.stateModel, "/" + rawPath);
return resolved != null ? String(resolved) : "";
},
);
+2 -2
View File
@@ -943,10 +943,10 @@ Note: state patches appear right after the elements that use them, so the UI fil
);
lines.push("");
lines.push(
'4. Template: `{ "$template": "Hello, ${/name}!" }` - interpolates `${/path}` references in the string with values from the state model.',
'4. Template: `{ "$template": "Hello, ${/name}!" }` - interpolates references in the string. Absolute paths like `${/path}` resolve against the state model. Bare names like `${field}` resolve against the current repeat item first, then fall back to the state model at `/<field>`.',
);
lines.push(
' Example: `"label": { "$template": "Items: ${/cart/count} | Total: ${/cart/total}" }` renders "Items: 3 | Total: 42.00" when /cart/count is 3 and /cart/total is 42.00.',
' Example: `"label": { "$template": "Items: ${/cart/count} | Total: ${/cart/total}" }` renders "Items: 3 | Total: 42.00" when /cart/count is 3 and /cart/total is 42.00. Inside a repeat, `{ "$template": "${name} - ${email}" }` reads name and email from each item.',
);
lines.push("");
+1 -1
View File
@@ -48,7 +48,7 @@
"dist"
],
"scripts": {
"build": "tsup",
"build": "rm -rf dist && tsup",
"dev": "tsup --watch",
"check-types": "tsc --noEmit",
"typecheck": "tsc --noEmit"
-1
View File
@@ -20,7 +20,6 @@ export default defineConfig([
dts: true,
sourcemap: true,
splitting: true,
clean: true,
banner: { js: '"use client";' },
external: sharedExternal,
},
+5 -3
View File
@@ -1,4 +1,5 @@
import { defineSchema, type PromptContext } from "@json-render/core";
import type { z } from "zod";
/**
* Prompt template for Remotion timeline generation
@@ -6,7 +7,7 @@ import { defineSchema, type PromptContext } from "@json-render/core";
* Uses JSONL patch format (same as React) but builds up a timeline spec structure.
*/
function remotionPromptTemplate(context: PromptContext): string {
const { catalog, options } = context;
const { catalog, options, formatZodType } = context;
const { system = "You are a video timeline generator.", customRules = [] } =
options;
@@ -37,7 +38,7 @@ function remotionPromptTemplate(context: PromptContext): string {
const catalogData = catalog as {
components?: Record<
string,
{ description?: string; defaultDuration?: number }
{ description?: string; defaultDuration?: number; props?: z.ZodType }
>;
transitions?: Record<string, { description?: string }>;
effects?: Record<string, { description?: string }>;
@@ -52,8 +53,9 @@ function remotionPromptTemplate(context: PromptContext): string {
const duration = def.defaultDuration
? ` [default: ${def.defaultDuration} frames]`
: "";
const propsStr = def.props ? ` ${formatZodType(def.props)}` : "";
lines.push(
`- ${name}: ${def.description || "No description"}${duration}`,
`- ${name}:${propsStr} ${def.description || "No description"}${duration}`,
);
}
lines.push("");
+2 -413
View File
@@ -8,9 +8,6 @@ importers:
.:
devDependencies:
'@changesets/cli':
specifier: 2.29.8
version: 2.29.8(@types/node@22.19.6)
'@resvg/resvg-js':
specifier: 2.6.2
version: 2.6.2
@@ -3021,61 +3018,6 @@ packages:
'@borewit/text-codec@0.2.2':
resolution: {integrity: sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==}
'@changesets/apply-release-plan@7.0.14':
resolution: {integrity: sha512-ddBvf9PHdy2YY0OUiEl3TV78mH9sckndJR14QAt87KLEbIov81XO0q0QAmvooBxXlqRRP8I9B7XOzZwQG7JkWA==}
'@changesets/assemble-release-plan@6.0.9':
resolution: {integrity: sha512-tPgeeqCHIwNo8sypKlS3gOPmsS3wP0zHt67JDuL20P4QcXiw/O4Hl7oXiuLnP9yg+rXLQ2sScdV1Kkzde61iSQ==}
'@changesets/changelog-git@0.2.1':
resolution: {integrity: sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==}
'@changesets/cli@2.29.8':
resolution: {integrity: sha512-1weuGZpP63YWUYjay/E84qqwcnt5yJMM0tep10Up7Q5cS/DGe2IZ0Uj3HNMxGhCINZuR7aO9WBMdKnPit5ZDPA==}
hasBin: true
'@changesets/config@3.1.2':
resolution: {integrity: sha512-CYiRhA4bWKemdYi/uwImjPxqWNpqGPNbEBdX1BdONALFIDK7MCUj6FPkzD+z9gJcvDFUQJn9aDVf4UG7OT6Kog==}
'@changesets/errors@0.2.0':
resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==}
'@changesets/get-dependents-graph@2.1.3':
resolution: {integrity: sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==}
'@changesets/get-release-plan@4.0.14':
resolution: {integrity: sha512-yjZMHpUHgl4Xl5gRlolVuxDkm4HgSJqT93Ri1Uz8kGrQb+5iJ8dkXJ20M2j/Y4iV5QzS2c5SeTxVSKX+2eMI0g==}
'@changesets/get-version-range-type@0.4.0':
resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==}
'@changesets/git@3.0.4':
resolution: {integrity: sha512-BXANzRFkX+XcC1q/d27NKvlJ1yf7PSAgi8JG6dt8EfbHFHi4neau7mufcSca5zRhwOL8j9s6EqsxmT+s+/E6Sw==}
'@changesets/logger@0.1.1':
resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==}
'@changesets/parse@0.4.2':
resolution: {integrity: sha512-Uo5MC5mfg4OM0jU3up66fmSn6/NE9INK+8/Vn/7sMVcdWg46zfbvvUSjD9EMonVqPi9fbrJH9SXHn48Tr1f2yA==}
'@changesets/pre@2.0.2':
resolution: {integrity: sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==}
'@changesets/read@0.6.6':
resolution: {integrity: sha512-P5QaN9hJSQQKJShzzpBT13FzOSPyHbqdoIBUd2DJdgvnECCyO6LmAOWSV+O8se2TaZJVwSXjL+v9yhb+a9JeJg==}
'@changesets/should-skip-package@0.1.2':
resolution: {integrity: sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==}
'@changesets/types@4.1.0':
resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==}
'@changesets/types@6.1.0':
resolution: {integrity: sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==}
'@changesets/write@0.4.0':
resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==}
'@csstools/color-helpers@5.1.0':
resolution: {integrity: sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==}
engines: {node: '>=18'}
@@ -4158,15 +4100,6 @@ packages:
'@types/node':
optional: true
'@inquirer/external-editor@1.0.3':
resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==}
engines: {node: '>=18'}
peerDependencies:
'@types/node': '>=18'
peerDependenciesMeta:
'@types/node':
optional: true
'@inquirer/figures@1.0.15':
resolution: {integrity: sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==}
engines: {node: '>=18'}
@@ -4337,12 +4270,6 @@ packages:
peerDependencies:
svelte: ^5
'@manypkg/find-root@1.1.0':
resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==}
'@manypkg/get-packages@1.1.3':
resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==}
'@mdx-js/loader@3.1.1':
resolution: {integrity: sha512-0TTacJyZ9mDmY+VefuthVshaNIyCGZHJG2fMnGaDttCt8HmjUF7SizlHJpaCDoGnN635nK1wpzfpx/Xx5S4WnQ==}
peerDependencies:
@@ -6721,9 +6648,6 @@ packages:
'@types/ms@2.1.0':
resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==}
'@types/node@12.20.55':
resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==}
'@types/node@22.19.6':
resolution: {integrity: sha512-qm+G8HuG6hOHQigsi7VGuLjUVu6TtBo/F05zvX04Mw2uCg9Dv0Qxy3Qw7j41SidlTcl5D/5yg0SEZqOB+EqZnQ==}
@@ -7331,10 +7255,6 @@ packages:
anser@1.4.10:
resolution: {integrity: sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww==}
ansi-colors@4.1.3:
resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==}
engines: {node: '>=6'}
ansi-escapes@4.3.2:
resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==}
engines: {node: '>=8'}
@@ -7618,10 +7538,6 @@ packages:
resolution: {integrity: sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==}
engines: {node: '>=12.0.0'}
better-path-resolve@1.0.0:
resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==}
engines: {node: '>=4'}
bidi-js@1.0.3:
resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==}
@@ -7800,9 +7716,6 @@ packages:
character-reference-invalid@2.0.1:
resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==}
chardet@2.1.1:
resolution: {integrity: sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==}
chokidar@4.0.3:
resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
engines: {node: '>= 14.16.0'}
@@ -8296,10 +8209,6 @@ packages:
detect-gpu@5.0.70:
resolution: {integrity: sha512-bqerEP1Ese6nt3rFkwPnGbsUF9a4q+gMmpTVVOEzoCyeCc+y7/RvJnQZJx1JwhgQI5Ntg0Kgat8Uu7XpBqnz1w==}
detect-indent@6.1.0:
resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==}
engines: {node: '>=8'}
detect-libc@2.1.2:
resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}
engines: {node: '>=8'}
@@ -8569,10 +8478,6 @@ packages:
resolution: {integrity: sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg==}
engines: {node: '>=10.13.0'}
enquirer@2.4.1:
resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==}
engines: {node: '>=8.6'}
entities@4.5.0:
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
engines: {node: '>=0.12'}
@@ -9035,9 +8940,6 @@ packages:
extend@3.0.2:
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
extendable-error@0.1.7:
resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==}
extract-zip@2.0.1:
resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==}
engines: {node: '>= 10.17.0'}
@@ -9212,14 +9114,6 @@ packages:
resolution: {integrity: sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==}
engines: {node: '>=14.14'}
fs-extra@7.0.1:
resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==}
engines: {node: '>=6 <7 || >=8'}
fs-extra@8.1.0:
resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==}
engines: {node: '>=6 <7 || >=8'}
fs-monkey@1.0.3:
resolution: {integrity: sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==}
@@ -9537,10 +9431,6 @@ packages:
resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==}
engines: {node: '>= 14'}
human-id@4.1.3:
resolution: {integrity: sha512-tsYlhAYpjCKa//8rXZ9DqKEawhPoSytweBC2eNvcaDK+57RZLHGqNs3PZTQO6yekLFSuvA6AlnAfrw1uBvtb+Q==}
hasBin: true
human-signals@2.1.0:
resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
engines: {node: '>=10.17.0'}
@@ -9844,10 +9734,6 @@ packages:
resolution: {integrity: sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==}
engines: {node: '>= 0.4'}
is-subdir@1.2.0:
resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==}
engines: {node: '>=4'}
is-symbol@1.1.1:
resolution: {integrity: sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==}
engines: {node: '>= 0.4'}
@@ -9886,10 +9772,6 @@ packages:
resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==}
engines: {node: '>=12.13'}
is-windows@1.0.2:
resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==}
engines: {node: '>=0.10.0'}
is-wsl@2.2.0:
resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==}
engines: {node: '>=8'}
@@ -10256,9 +10138,6 @@ packages:
engines: {node: '>=6'}
hasBin: true
jsonfile@4.0.0:
resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}
jsonfile@6.2.0:
resolution: {integrity: sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==}
@@ -10582,9 +10461,6 @@ packages:
lodash.sortby@4.7.0:
resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==}
lodash.startcase@4.4.0:
resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==}
lodash.throttle@4.1.1:
resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==}
@@ -11362,9 +11238,6 @@ packages:
resolution: {integrity: sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==}
engines: {node: '>=18'}
outdent@0.5.0:
resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==}
outvariant@1.4.3:
resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==}
@@ -11372,10 +11245,6 @@ packages:
resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==}
engines: {node: '>= 0.4'}
p-filter@2.1.0:
resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==}
engines: {node: '>=8'}
p-limit@2.3.0:
resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==}
engines: {node: '>=6'}
@@ -11392,10 +11261,6 @@ packages:
resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}
engines: {node: '>=10'}
p-map@2.1.0:
resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==}
engines: {node: '>=6'}
p-try@2.2.0:
resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==}
engines: {node: '>=6'}
@@ -11403,9 +11268,6 @@ packages:
package-json-from-dist@1.0.1:
resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}
package-manager-detector@0.2.11:
resolution: {integrity: sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==}
package-manager-detector@1.6.0:
resolution: {integrity: sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==}
@@ -11536,10 +11398,6 @@ packages:
engines: {node: '>=0.10'}
hasBin: true
pify@4.0.1:
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
engines: {node: '>=6'}
pirates@4.0.7:
resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==}
engines: {node: '>= 6'}
@@ -11654,11 +11512,6 @@ packages:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
prettier@2.8.8:
resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
engines: {node: '>=10.13.0'}
hasBin: true
prettier@3.7.4:
resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==}
engines: {node: '>=14'}
@@ -11748,9 +11601,6 @@ packages:
resolution: {integrity: sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==}
engines: {node: '>=0.6'}
quansync@0.2.11:
resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==}
query-string@7.1.3:
resolution: {integrity: sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==}
engines: {node: '>=6'}
@@ -11998,10 +11848,6 @@ packages:
resolution: {integrity: sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==}
engines: {node: '>=0.10.0'}
read-yaml-file@1.1.0:
resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==}
engines: {node: '>=6'}
readable-stream@3.6.2:
resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
engines: {node: '>= 6'}
@@ -12541,9 +12387,6 @@ packages:
space-separated-tokens@2.0.2:
resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==}
spawndamnit@3.0.1:
resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==}
split-on-first@1.1.0:
resolution: {integrity: sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==}
engines: {node: '>=6'}
@@ -12887,10 +12730,6 @@ packages:
resolution: {integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==}
engines: {node: '>=8'}
term-size@2.2.1:
resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==}
engines: {node: '>=8'}
terminal-link@2.1.1:
resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==}
engines: {node: '>=8'}
@@ -13317,10 +13156,6 @@ packages:
unist-util-visit@5.1.0:
resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==}
universalify@0.1.2:
resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==}
engines: {node: '>= 4.0.0'}
universalify@0.2.0:
resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==}
engines: {node: '>= 4.0.0'}
@@ -14793,150 +14628,6 @@ snapshots:
'@borewit/text-codec@0.2.2':
optional: true
'@changesets/apply-release-plan@7.0.14':
dependencies:
'@changesets/config': 3.1.2
'@changesets/get-version-range-type': 0.4.0
'@changesets/git': 3.0.4
'@changesets/should-skip-package': 0.1.2
'@changesets/types': 6.1.0
'@manypkg/get-packages': 1.1.3
detect-indent: 6.1.0
fs-extra: 7.0.1
lodash.startcase: 4.4.0
outdent: 0.5.0
prettier: 2.8.8
resolve-from: 5.0.0
semver: 7.7.3
'@changesets/assemble-release-plan@6.0.9':
dependencies:
'@changesets/errors': 0.2.0
'@changesets/get-dependents-graph': 2.1.3
'@changesets/should-skip-package': 0.1.2
'@changesets/types': 6.1.0
'@manypkg/get-packages': 1.1.3
semver: 7.7.3
'@changesets/changelog-git@0.2.1':
dependencies:
'@changesets/types': 6.1.0
'@changesets/cli@2.29.8(@types/node@22.19.6)':
dependencies:
'@changesets/apply-release-plan': 7.0.14
'@changesets/assemble-release-plan': 6.0.9
'@changesets/changelog-git': 0.2.1
'@changesets/config': 3.1.2
'@changesets/errors': 0.2.0
'@changesets/get-dependents-graph': 2.1.3
'@changesets/get-release-plan': 4.0.14
'@changesets/git': 3.0.4
'@changesets/logger': 0.1.1
'@changesets/pre': 2.0.2
'@changesets/read': 0.6.6
'@changesets/should-skip-package': 0.1.2
'@changesets/types': 6.1.0
'@changesets/write': 0.4.0
'@inquirer/external-editor': 1.0.3(@types/node@22.19.6)
'@manypkg/get-packages': 1.1.3
ansi-colors: 4.1.3
ci-info: 3.9.0
enquirer: 2.4.1
fs-extra: 7.0.1
mri: 1.2.0
p-limit: 2.3.0
package-manager-detector: 0.2.11
picocolors: 1.1.1
resolve-from: 5.0.0
semver: 7.7.3
spawndamnit: 3.0.1
term-size: 2.2.1
transitivePeerDependencies:
- '@types/node'
'@changesets/config@3.1.2':
dependencies:
'@changesets/errors': 0.2.0
'@changesets/get-dependents-graph': 2.1.3
'@changesets/logger': 0.1.1
'@changesets/types': 6.1.0
'@manypkg/get-packages': 1.1.3
fs-extra: 7.0.1
micromatch: 4.0.8
'@changesets/errors@0.2.0':
dependencies:
extendable-error: 0.1.7
'@changesets/get-dependents-graph@2.1.3':
dependencies:
'@changesets/types': 6.1.0
'@manypkg/get-packages': 1.1.3
picocolors: 1.1.1
semver: 7.7.3
'@changesets/get-release-plan@4.0.14':
dependencies:
'@changesets/assemble-release-plan': 6.0.9
'@changesets/config': 3.1.2
'@changesets/pre': 2.0.2
'@changesets/read': 0.6.6
'@changesets/types': 6.1.0
'@manypkg/get-packages': 1.1.3
'@changesets/get-version-range-type@0.4.0': {}
'@changesets/git@3.0.4':
dependencies:
'@changesets/errors': 0.2.0
'@manypkg/get-packages': 1.1.3
is-subdir: 1.2.0
micromatch: 4.0.8
spawndamnit: 3.0.1
'@changesets/logger@0.1.1':
dependencies:
picocolors: 1.1.1
'@changesets/parse@0.4.2':
dependencies:
'@changesets/types': 6.1.0
js-yaml: 4.1.1
'@changesets/pre@2.0.2':
dependencies:
'@changesets/errors': 0.2.0
'@changesets/types': 6.1.0
'@manypkg/get-packages': 1.1.3
fs-extra: 7.0.1
'@changesets/read@0.6.6':
dependencies:
'@changesets/git': 3.0.4
'@changesets/logger': 0.1.1
'@changesets/parse': 0.4.2
'@changesets/types': 6.1.0
fs-extra: 7.0.1
p-filter: 2.1.0
picocolors: 1.1.1
'@changesets/should-skip-package@0.1.2':
dependencies:
'@changesets/types': 6.1.0
'@manypkg/get-packages': 1.1.3
'@changesets/types@4.1.0': {}
'@changesets/types@6.1.0': {}
'@changesets/write@0.4.0':
dependencies:
'@changesets/types': 6.1.0
fs-extra: 7.0.1
human-id: 4.1.3
prettier: 2.8.8
'@csstools/color-helpers@5.1.0': {}
'@csstools/css-calc@2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)':
@@ -15967,13 +15658,6 @@ snapshots:
optionalDependencies:
'@types/node': 22.19.6
'@inquirer/external-editor@1.0.3(@types/node@22.19.6)':
dependencies:
chardet: 2.1.1
iconv-lite: 0.7.2
optionalDependencies:
'@types/node': 22.19.6
'@inquirer/figures@1.0.15': {}
'@inquirer/type@3.0.10(@types/node@22.19.6)':
@@ -16277,22 +15961,6 @@ snapshots:
dependencies:
svelte: 5.54.1
'@manypkg/find-root@1.1.0':
dependencies:
'@babel/runtime': 7.28.6
'@types/node': 12.20.55
find-up: 4.1.0
fs-extra: 8.1.0
'@manypkg/get-packages@1.1.3':
dependencies:
'@babel/runtime': 7.28.6
'@changesets/types': 4.1.0
'@manypkg/find-root': 1.1.0
fs-extra: 8.1.0
globby: 11.1.0
read-yaml-file: 1.1.0
'@mdx-js/loader@3.1.1(webpack@5.96.1)':
dependencies:
'@mdx-js/mdx': 3.1.1
@@ -19370,7 +19038,7 @@ snapshots:
'@stripe/ui-extension-tools@0.0.1(@babel/core@7.29.0)(babel-jest@27.5.1(@babel/core@7.29.0))':
dependencies:
'@types/jest': 28.1.8
'@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5)
'@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.39.2(jiti@2.6.1))(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5)
'@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@4.9.5)
eslint: 8.57.1
eslint-plugin-react: 7.37.5(eslint@8.57.1)
@@ -19928,8 +19596,6 @@ snapshots:
'@types/ms@2.1.0': {}
'@types/node@12.20.55': {}
'@types/node@22.19.6':
dependencies:
undici-types: 6.21.0
@@ -20039,7 +19705,7 @@ snapshots:
'@types/node': 22.19.6
optional: true
'@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5)':
'@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.39.2(jiti@2.6.1))(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5)':
dependencies:
'@eslint-community/regexpp': 4.12.2
'@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@4.9.5)
@@ -20699,8 +20365,6 @@ snapshots:
anser@1.4.10: {}
ansi-colors@4.1.3: {}
ansi-escapes@4.3.2:
dependencies:
type-fest: 0.21.3
@@ -21047,10 +20711,6 @@ snapshots:
dependencies:
open: 8.4.2
better-path-resolve@1.0.0:
dependencies:
is-windows: 1.0.2
bidi-js@1.0.3:
dependencies:
require-from-string: 2.0.2
@@ -21251,8 +20911,6 @@ snapshots:
character-reference-invalid@2.0.1: {}
chardet@2.1.1: {}
chokidar@4.0.3:
dependencies:
readdirp: 4.1.2
@@ -21693,8 +21351,6 @@ snapshots:
dependencies:
webgl-constants: 1.1.1
detect-indent@6.1.0: {}
detect-libc@2.1.2: {}
detect-newline@3.1.0: {}
@@ -21865,11 +21521,6 @@ snapshots:
graceful-fs: 4.2.11
tapable: 2.3.0
enquirer@2.4.1:
dependencies:
ansi-colors: 4.1.3
strip-ansi: 6.0.1
entities@4.5.0: {}
entities@6.0.1: {}
@@ -22792,8 +22443,6 @@ snapshots:
extend@3.0.2: {}
extendable-error@0.1.7: {}
extract-zip@2.0.1:
dependencies:
debug: 4.4.3
@@ -23005,18 +22654,6 @@ snapshots:
jsonfile: 6.2.0
universalify: 2.0.1
fs-extra@7.0.1:
dependencies:
graceful-fs: 4.2.11
jsonfile: 4.0.0
universalify: 0.1.2
fs-extra@8.1.0:
dependencies:
graceful-fs: 4.2.11
jsonfile: 4.0.0
universalify: 0.1.2
fs-monkey@1.0.3: {}
fs.realpath@1.0.0: {}
@@ -23433,8 +23070,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
human-id@4.1.3: {}
human-signals@2.1.0: {}
human-signals@8.0.1: {}
@@ -23735,10 +23370,6 @@ snapshots:
call-bound: 1.0.4
has-tostringtag: 1.0.2
is-subdir@1.2.0:
dependencies:
better-path-resolve: 1.0.0
is-symbol@1.1.1:
dependencies:
call-bound: 1.0.4
@@ -23770,8 +23401,6 @@ snapshots:
is-what@4.1.16: {}
is-windows@1.0.2: {}
is-wsl@2.2.0:
dependencies:
is-docker: 2.2.1
@@ -24445,10 +24074,6 @@ snapshots:
json5@2.2.3: {}
jsonfile@4.0.0:
optionalDependencies:
graceful-fs: 4.2.11
jsonfile@6.2.0:
dependencies:
universalify: 2.0.1
@@ -24723,8 +24348,6 @@ snapshots:
lodash.sortby@4.7.0: {}
lodash.startcase@4.4.0: {}
lodash.throttle@4.1.1: {}
lodash@4.17.23: {}
@@ -25920,8 +25543,6 @@ snapshots:
string-width: 7.2.0
strip-ansi: 7.1.2
outdent@0.5.0: {}
outvariant@1.4.3: {}
own-keys@1.0.1:
@@ -25930,10 +25551,6 @@ snapshots:
object-keys: 1.1.1
safe-push-apply: 1.0.0
p-filter@2.1.0:
dependencies:
p-map: 2.1.0
p-limit@2.3.0:
dependencies:
p-try: 2.2.0
@@ -25950,16 +25567,10 @@ snapshots:
dependencies:
p-limit: 3.1.0
p-map@2.1.0: {}
p-try@2.2.0: {}
package-json-from-dist@1.0.1: {}
package-manager-detector@0.2.11:
dependencies:
quansync: 0.2.11
package-manager-detector@1.6.0: {}
pako@0.2.9: {}
@@ -26069,8 +25680,6 @@ snapshots:
pidtree@0.6.0: {}
pify@4.0.1: {}
pirates@4.0.7: {}
pkce-challenge@5.0.1: {}
@@ -26187,8 +25796,6 @@ snapshots:
prelude-ls@1.2.1: {}
prettier@2.8.8: {}
prettier@3.7.4: {}
pretty-bytes@5.6.0: {}
@@ -26289,8 +25896,6 @@ snapshots:
dependencies:
side-channel: 1.1.0
quansync@0.2.11: {}
query-string@7.1.3:
dependencies:
decode-uri-component: 0.2.2
@@ -26862,13 +26467,6 @@ snapshots:
react@19.2.4: {}
read-yaml-file@1.1.0:
dependencies:
graceful-fs: 4.2.11
js-yaml: 3.14.2
pify: 4.0.1
strip-bom: 3.0.0
readable-stream@3.6.2:
dependencies:
inherits: 2.0.4
@@ -27660,11 +27258,6 @@ snapshots:
space-separated-tokens@2.0.2: {}
spawndamnit@3.0.1:
dependencies:
cross-spawn: 7.0.6
signal-exit: 4.1.0
split-on-first@1.1.0: {}
sprintf-js@1.0.3: {}
@@ -28120,8 +27713,6 @@ snapshots:
temp-dir@2.0.0: {}
term-size@2.2.1: {}
terminal-link@2.1.1:
dependencies:
ansi-escapes: 4.3.2
@@ -28619,8 +28210,6 @@ snapshots:
unist-util-is: 6.0.1
unist-util-visit-parents: 6.0.2
universalify@0.1.2: {}
universalify@0.2.0: {}
universalify@2.0.1: {}
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env node
const fs = require("fs");
const path = require("path");
const ROOT = path.resolve(__dirname, "..");
const CORE_PKG = path.join(ROOT, "packages/core/package.json");
const core = JSON.parse(fs.readFileSync(CORE_PKG, "utf8"));
const version = core.version;
console.log(`Canonical version (from @json-render/core): ${version}`);
const packagesDir = path.join(ROOT, "packages");
const mismatches = [];
for (const dir of fs.readdirSync(packagesDir)) {
const pkgPath = path.join(packagesDir, dir, "package.json");
if (!fs.existsSync(pkgPath)) continue;
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
if (!pkg.name || !pkg.name.startsWith("@json-render/")) continue;
if (pkg.version !== version) {
mismatches.push({ name: pkg.name, version: pkg.version });
}
}
if (mismatches.length > 0) {
console.error("\nVersion mismatch detected:");
for (const m of mismatches) {
console.error(` ${m.name}: ${m.version} (expected ${version})`);
}
console.error("\nRun `pnpm run version:sync` to fix.");
process.exit(1);
} else {
console.log("All @json-render/* packages are in sync.");
}
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env node
const fs = require("fs");
const path = require("path");
const ROOT = path.resolve(__dirname, "..");
const CORE_PKG = path.join(ROOT, "packages/core/package.json");
const core = JSON.parse(fs.readFileSync(CORE_PKG, "utf8"));
const version = core.version;
console.log(`Canonical version (from @json-render/core): ${version}`);
const packagesDir = path.join(ROOT, "packages");
let updated = 0;
for (const dir of fs.readdirSync(packagesDir)) {
const pkgPath = path.join(packagesDir, dir, "package.json");
if (!fs.existsSync(pkgPath)) continue;
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
if (!pkg.name || !pkg.name.startsWith("@json-render/")) continue;
if (pkg.version === version) continue;
console.log(` ${pkg.name}: ${pkg.version} -> ${version}`);
pkg.version = version;
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
updated++;
}
if (updated === 0) {
console.log("All @json-render/* packages are already in sync.");
} else {
console.log(`Updated ${updated} package(s).`);
}
+8 -1
View File
@@ -6,7 +6,13 @@
"build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": [".next/**", "!.next/cache/**", "dist/**"]
"outputs": [".next/**", "!.next/cache/**", "dist/**", ".svelte-kit/**"]
},
"svelte-chat#build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": [".svelte-kit/**"],
"cache": false
},
"lint": {
"dependsOn": ["^lint"]
@@ -15,6 +21,7 @@
"dependsOn": ["^build"]
},
"dev": {
"dependsOn": ["^build"],
"cache": false,
"persistent": true
}