├── .changeset ├── README.md └── config.json ├── .codesandbox └── tasks.json ├── .devcontainer └── devcontainer.json ├── .dockerignore ├── .github └── workflows │ ├── autofix.yml │ ├── cr.yml │ ├── test.yml │ └── version.yml ├── .gitignore ├── .npmrc ├── .prettierrc ├── Dockerfile ├── LICENSE ├── README.md ├── docs ├── .vitepress │ ├── components │ │ └── Signature.vue │ ├── config.mts │ └── theme │ │ ├── index.ts │ │ └── style.css ├── api │ ├── app.md │ ├── cli.md │ ├── manifest.md │ ├── router.md │ ├── router │ │ ├── client.md │ │ ├── custom.md │ │ ├── http.md │ │ ├── spa.md │ │ └── static.md │ └── server │ │ ├── cookies.md │ │ ├── request.md │ │ ├── response.md │ │ ├── runtime.md │ │ └── session.md ├── guide │ ├── a-story.md │ ├── add-to-existing-vite-app.md │ ├── aliases.md │ ├── build-your-own-framework.md │ ├── create-your-first-app.md │ ├── deployment.md │ ├── file-system-routing.md │ ├── getting-started.md │ ├── philosophy.md │ ├── route-rules.md │ ├── vite-plugins.md │ └── why-vinxi.md ├── index.md ├── package.json ├── public │ ├── favicon.ico │ └── logo.png ├── reference.md └── tsconfig.json ├── examples ├── react │ ├── rsc │ │ ├── fw │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── app.config.js │ │ │ ├── app │ │ │ │ ├── Counter.tsx │ │ │ │ ├── actions.tsx │ │ │ │ ├── app.tsx │ │ │ │ └── style.css │ │ │ ├── package.json │ │ │ ├── postcss.config.cjs │ │ │ ├── public │ │ │ │ └── favicon.ico │ │ │ ├── tailwind.config.cjs │ │ │ └── tsconfig.json │ │ ├── spa │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── app.config.mts │ │ │ ├── app │ │ │ │ ├── Counter.tsx │ │ │ │ ├── actions.tsx │ │ │ │ ├── app.tsx │ │ │ │ ├── client.tsx │ │ │ │ ├── fetchServerAction.tsx │ │ │ │ ├── react-server.tsx │ │ │ │ ├── server-action.tsx │ │ │ │ ├── server-component.tsx │ │ │ │ ├── server.tsx │ │ │ │ └── style.css │ │ │ ├── index.ts │ │ │ ├── package.json │ │ │ ├── postcss.config.cjs │ │ │ ├── public │ │ │ │ └── favicon.ico │ │ │ ├── tailwind.config.cjs │ │ │ ├── tmp │ │ │ │ └── count │ │ │ └── tsconfig.json │ │ └── ssr │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── app.config.mts │ │ │ ├── app │ │ │ ├── Counter.tsx │ │ │ ├── actions.tsx │ │ │ ├── app.tsx │ │ │ ├── client.tsx │ │ │ ├── fetchServerAction.tsx │ │ │ ├── react-server.tsx │ │ │ ├── server-action.tsx │ │ │ ├── server-component.tsx │ │ │ ├── server.tsx │ │ │ └── style.css │ │ │ ├── package.json │ │ │ ├── postcss.config.cjs │ │ │ ├── public │ │ │ └── favicon.ico │ │ │ ├── tailwind.config.cjs │ │ │ └── tsconfig.json │ ├── spa │ │ ├── basic │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── app.config.js │ │ │ ├── app │ │ │ │ ├── client.tsx │ │ │ │ └── style.css │ │ │ ├── index.ts │ │ │ ├── package.json │ │ │ ├── postcss.config.cjs │ │ │ ├── public │ │ │ │ └── favicon.ico │ │ │ ├── tailwind.config.cjs │ │ │ └── tsconfig.json │ │ ├── mdx │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── app.config.js │ │ │ ├── app │ │ │ │ ├── client.tsx │ │ │ │ ├── pages │ │ │ │ │ ├── hello.css │ │ │ │ │ ├── hello.mdx │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── white.css │ │ │ │ └── style.css │ │ │ ├── index.html │ │ │ ├── package.json │ │ │ ├── postcss.config.cjs │ │ │ ├── public │ │ │ │ └── favicon.ico │ │ │ ├── tailwind.config.cjs │ │ │ └── tsconfig.json │ │ ├── tanstack-router-app │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── app.config.js │ │ │ ├── app │ │ │ │ ├── client.tsx │ │ │ │ ├── db.tsx │ │ │ │ ├── error.tsx │ │ │ │ ├── routes │ │ │ │ │ ├── hello.css │ │ │ │ │ ├── hello │ │ │ │ │ │ ├── page.tsx │ │ │ │ │ │ └── white.css │ │ │ │ │ ├── page.tsx │ │ │ │ │ └── posts │ │ │ │ │ │ ├── [postId] │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ └── style.css │ │ │ ├── index.html │ │ │ ├── package.json │ │ │ ├── postcss.config.cjs │ │ │ ├── public │ │ │ │ └── favicon.ico │ │ │ ├── tailwind.config.cjs │ │ │ └── tsconfig.json │ │ ├── tanstack-router │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── app.config.js │ │ │ ├── app │ │ │ │ ├── actions.tsx │ │ │ │ ├── entry-client.tsx │ │ │ │ ├── entry-server.tsx │ │ │ │ ├── error.tsx │ │ │ │ ├── pages │ │ │ │ │ ├── hello.css │ │ │ │ │ ├── hello.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── posts.tsx │ │ │ │ │ ├── posts │ │ │ │ │ │ ├── [postId].tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── white.css │ │ │ │ └── style.css │ │ │ ├── index.html │ │ │ ├── lib │ │ │ │ └── file-router.js │ │ │ ├── package.json │ │ │ ├── postcss.config.cjs │ │ │ ├── public │ │ │ │ └── favicon.ico │ │ │ ├── tailwind.config.cjs │ │ │ └── tsconfig.json │ │ └── wouter │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── app.config.js │ │ │ ├── app │ │ │ ├── client.tsx │ │ │ ├── pages │ │ │ │ ├── hello.css │ │ │ │ ├── hello.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── white.css │ │ │ └── style.css │ │ │ ├── index.html │ │ │ ├── package.json │ │ │ ├── postcss.config.cjs │ │ │ ├── public │ │ │ └── favicon.ico │ │ │ ├── tailwind.config.cjs │ │ │ └── tsconfig.json │ └── ssr │ │ ├── basic-cloudflare │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── app.config.js │ │ ├── app │ │ │ ├── app.tsx │ │ │ ├── client.tsx │ │ │ ├── server.tsx │ │ │ └── style.css │ │ ├── dev-server.js │ │ ├── package.json │ │ ├── postcss.config.cjs │ │ ├── public │ │ │ └── favicon.ico │ │ ├── tailwind.config.cjs │ │ └── wrangler.toml │ │ ├── basic │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── app.config.js │ │ ├── app │ │ │ ├── app.tsx │ │ │ ├── client.tsx │ │ │ ├── middleware.tsx │ │ │ ├── party.ts │ │ │ ├── server.tsx │ │ │ ├── style.css │ │ │ └── ws.ts │ │ ├── package.json │ │ ├── postcss.config.cjs │ │ ├── public │ │ │ └── favicon.ico │ │ ├── tailwind.config.cjs │ │ └── tsconfig.json │ │ ├── tanstack-router-app │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── app.config.js │ │ ├── app │ │ │ ├── client.tsx │ │ │ ├── db.tsx │ │ │ ├── error.tsx │ │ │ ├── loaderClient.tsx │ │ │ ├── root.tsx │ │ │ ├── router.tsx │ │ │ ├── routes │ │ │ │ ├── hello.css │ │ │ │ ├── hello │ │ │ │ │ ├── page.tsx │ │ │ │ │ └── white.css │ │ │ │ ├── page.tsx │ │ │ │ └── posts │ │ │ │ │ ├── [postId] │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── layout.tsx │ │ │ │ │ └── page.tsx │ │ │ ├── server.tsx │ │ │ └── style.css │ │ ├── package.json │ │ ├── postcss.config.cjs │ │ ├── public │ │ │ └── favicon.ico │ │ ├── tailwind.config.cjs │ │ └── tsconfig.json │ │ └── wouter │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── app.config.js │ │ ├── app │ │ ├── app.tsx │ │ ├── client.tsx │ │ ├── pages │ │ │ ├── hello.css │ │ │ ├── hello.tsx │ │ │ ├── index.tsx │ │ │ └── white.css │ │ ├── server.tsx │ │ └── style.css │ │ ├── package.json │ │ ├── postcss.config.cjs │ │ ├── public │ │ └── favicon.ico │ │ └── tailwind.config.cjs ├── solid │ ├── spa │ │ └── basic │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── app │ │ │ ├── client.tsx │ │ │ ├── logo.png │ │ │ └── style.css │ │ │ ├── index.html │ │ │ ├── package.json │ │ │ ├── postcss.config.cjs │ │ │ ├── public │ │ │ └── favicon.ico │ │ │ ├── tailwind.config.cjs │ │ │ ├── tsconfig.json │ │ │ └── vite.config.js │ └── ssr │ │ ├── basic │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── app.config.js │ │ ├── app │ │ │ ├── Counter.module.css │ │ │ ├── Counter.tsx │ │ │ ├── actions.tsx │ │ │ ├── app.tsx │ │ │ ├── client.tsx │ │ │ ├── logo.png │ │ │ ├── server.tsx │ │ │ └── style.css │ │ ├── package.json │ │ ├── postcss.config.cjs │ │ ├── public │ │ │ └── favicon.ico │ │ ├── tailwind.config.cjs │ │ └── tsconfig.json │ │ └── solid-router │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── app.config.js │ │ ├── app │ │ ├── Counter.tsx │ │ ├── app.tsx │ │ ├── client.tsx │ │ ├── db.tsx │ │ ├── error.tsx │ │ ├── pages │ │ │ ├── [id].tsx │ │ │ ├── hello.css │ │ │ ├── hello.tsx │ │ │ ├── index.tsx │ │ │ ├── posts.tsx │ │ │ ├── posts │ │ │ │ ├── [postId].tsx │ │ │ │ └── index.tsx │ │ │ └── white.css │ │ ├── routes.ts │ │ ├── server.tsx │ │ └── style.css │ │ ├── package.json │ │ ├── postcss.config.cjs │ │ ├── public │ │ └── favicon.ico │ │ ├── tailwind.config.cjs │ │ └── tsconfig.json └── vanilla │ ├── empty │ ├── CHANGELOG.md │ ├── app.config.js │ ├── index.html │ └── package.json │ ├── partyroom │ ├── .gitignore │ ├── CHANGELOG.md │ ├── app.config.js │ ├── app │ │ ├── actions.tsx │ │ ├── client.tsx │ │ ├── middleware.tsx │ │ ├── party.ts │ │ └── style.css │ ├── index.html │ ├── package.json │ ├── postcss.config.cjs │ ├── public │ │ └── favicon.ico │ └── tailwind.config.cjs │ ├── server │ ├── CHANGELOG.md │ ├── index.ts │ └── package.json │ ├── spa │ ├── .gitignore │ ├── CHANGELOG.md │ ├── app.config.js │ ├── app │ │ ├── actions.tsx │ │ ├── client.tsx │ │ ├── inline.tsx │ │ ├── middleware.tsx │ │ ├── server-functions.tsx │ │ └── style.css │ ├── index.html │ ├── package.json │ ├── postcss.config.cjs │ ├── public │ │ └── favicon.ico │ └── tailwind.config.cjs │ ├── stack │ ├── .gitignore │ ├── CHANGELOG.md │ ├── app │ │ ├── actions.tsx │ │ ├── client.tsx │ │ ├── middleware.tsx │ │ ├── server-functions.tsx │ │ └── style.css │ ├── index.html │ ├── index.ts │ ├── package.json │ ├── postcss.config.cjs │ ├── public │ │ └── favicon.ico │ └── tailwind.config.cjs │ └── trpc │ ├── .gitignore │ ├── CHANGELOG.md │ ├── app.config.js │ ├── app │ ├── actions.tsx │ ├── client.tsx │ ├── middleware.tsx │ ├── server.ts │ ├── style.css │ └── trpc.ts │ ├── handler.js │ ├── index.html │ ├── package.json │ ├── postcss.config.cjs │ ├── public │ └── favicon.ico │ ├── tailwind.config.cjs │ ├── trpc.d.ts │ └── tsconfig.json ├── package.json ├── packages ├── doc │ ├── CHANGELOG.md │ ├── deno_doc.cjs │ ├── deno_doc.d.ts │ ├── deno_doc_bg.js │ ├── deno_doc_bg.wasm │ ├── deno_doc_bg.wasm.d.ts │ └── package.json ├── vinxi-devtools │ ├── .gitignore │ ├── CHANGELOG.md │ ├── build.js │ ├── dev.js │ ├── devtools-client.jsx │ ├── devtools-dev.js │ ├── devtools-rpc.js │ ├── index.html.js │ ├── index.js │ ├── mount.jsx │ ├── out │ │ ├── client │ │ │ ├── .vite │ │ │ │ └── manifest.json │ │ │ ├── assets │ │ │ │ ├── index-5GipsVRX.js │ │ │ │ └── index-D_RTpmpH.css │ │ │ ├── index.html │ │ │ └── manifest.js │ │ ├── mount.js │ │ └── style.css │ ├── package.json │ ├── rpc.client.js │ ├── rpc.js │ ├── style.css │ ├── test.html │ ├── tsconfig.json │ └── uno.config.js ├── vinxi-directives │ ├── CHANGELOG.md │ ├── babel.cjs │ ├── fixtures │ │ ├── decorate-exports.snapshot.ts │ │ ├── decorate-exports.ts │ │ ├── example-1.snapshot.ts │ │ ├── example-1.ts │ │ ├── example-2.shim.snapshot.ts │ │ ├── example-2.ts │ │ ├── example-2.wrap.snapshot.ts │ │ ├── example-3.shim.snapshot.ts │ │ ├── example-3.ts │ │ ├── example-3.wrap.snapshot.ts │ │ ├── example-4-fn.shim.snapshot.ts │ │ ├── example-4-fn.ts │ │ ├── example-4-fn.wrap.snapshot.ts │ │ ├── example-4.shim.snapshot.ts │ │ ├── example-4.ts │ │ ├── example-4.wrap.snapshot.ts │ │ ├── example-5.shim.snapshot.ts │ │ ├── example-5.ts │ │ ├── example-5.wrap.snapshot.ts │ │ ├── shim-exports-fn.snapshot.tsx │ │ ├── shim-exports-fn.tsx │ │ ├── shim-exports.snapshot.tsx │ │ ├── shim-exports.tsx │ │ ├── wrap-exports-fn.snapshot.tsx │ │ ├── wrap-exports-fn.tsx │ │ ├── wrap-exports.snapshot.tsx │ │ └── wrap-exports.tsx │ ├── index.js │ ├── package.json │ ├── parse.js │ ├── plugin.js │ ├── plugins │ │ ├── decorate-exports.js │ │ ├── shim-exports.js │ │ └── wrap-exports.js │ ├── runtime.ts │ ├── transform.test.js │ ├── tsconfig.json │ ├── utils.js │ └── vitest.config.ts ├── vinxi-doc │ ├── CHANGELOG.md │ ├── doc.js │ ├── doc.json │ ├── empty.d.ts │ ├── package.json │ ├── test.js │ ├── tsconfig.json │ └── types.d.ts ├── vinxi-mdx │ ├── .gitignore │ ├── CHANGELOG.md │ ├── dist │ │ ├── common.d.ts │ │ ├── common.d.ts.map │ │ ├── common.js │ │ ├── common.js.map │ │ ├── imports.d.ts │ │ ├── imports.d.ts.map │ │ ├── imports.js │ │ ├── imports.js.map │ │ ├── index.cjs │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── transform.d.ts │ │ ├── transform.d.ts.map │ │ ├── transform.js │ │ ├── transform.js.map │ │ ├── types.d.ts │ │ ├── types.d.ts.map │ │ ├── types.js │ │ ├── types.js.map │ │ └── viteMdxTransclusion │ │ │ ├── ImportMap.d.ts │ │ │ ├── ImportMap.d.ts.map │ │ │ ├── ImportMap.js │ │ │ ├── ImportMap.js.map │ │ │ ├── createMdxAstCompiler.d.ts │ │ │ ├── createMdxAstCompiler.d.ts.map │ │ │ ├── createMdxAstCompiler.js │ │ │ ├── createMdxAstCompiler.js.map │ │ │ ├── index.d.ts │ │ │ ├── index.d.ts.map │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── remarkTransclusion.d.ts │ │ │ ├── remarkTransclusion.d.ts.map │ │ │ ├── remarkTransclusion.js │ │ │ └── remarkTransclusion.js.map │ ├── license.md │ ├── package.json │ ├── src │ │ ├── common.ts │ │ ├── imports.ts │ │ ├── index.ts │ │ ├── transform.ts │ │ ├── types.ts │ │ └── viteMdxTransclusion │ │ │ ├── ImportMap.ts │ │ │ ├── createMdxAstCompiler.ts │ │ │ ├── index.ts │ │ │ └── remarkTransclusion.ts │ └── tsconfig.json ├── vinxi-openapi │ ├── CHANGELOG.md │ ├── handler.js │ ├── index.js │ └── package.json ├── vinxi-react-server │ ├── CHANGELOG.md │ ├── app │ │ └── client.tsx │ ├── client-runtime.js │ ├── client.js │ ├── fetch-server-action.js │ ├── html.ts │ ├── index.js │ ├── package.json │ ├── react-server.js │ ├── rsc-handler.tsx │ ├── server-action.js │ ├── server-component.tsx │ ├── server-handler.tsx │ └── tsconfig.json ├── vinxi-react │ ├── CHANGELOG.md │ ├── index.js │ ├── invariant.js │ ├── lazy-route.js │ ├── package.json │ ├── react-server.js │ ├── render-asset.js │ └── tsconfig.json ├── vinxi-router │ ├── CHANGELOG.md │ ├── api-handler.js │ ├── api.js │ ├── package.json │ ├── spa.js │ └── static.js ├── vinxi-server-components │ ├── CHANGELOG.md │ ├── client.js │ ├── constants.js │ ├── index.js │ ├── package.json │ ├── plugin.js │ ├── server-action.js │ ├── server.js │ └── tsconfig.json ├── vinxi-server-functions │ ├── CHANGELOG.md │ ├── client-runtime.js │ ├── client.js │ ├── constants.js │ ├── index.js │ ├── package.json │ ├── plugin.js │ ├── server-handler.js │ ├── server-runtime.js │ ├── server.js │ └── tsconfig.json ├── vinxi-solid │ ├── CHANGELOG.md │ ├── index.jsx │ ├── invariant.js │ ├── lazy-route.jsx │ ├── package.json │ ├── render-asset.jsx │ └── tsconfig.json └── vinxi │ ├── CHANGELOG.md │ ├── README.md │ ├── bin │ └── cli.mjs │ ├── lib │ ├── app-fetch.js │ ├── app-manifest.js │ ├── app-types.d.ts │ ├── app-worker-client.js │ ├── app-worker.js │ ├── app.js │ ├── build.js │ ├── chunks.js │ ├── chunks.test.js │ ├── dev-error.js │ ├── dev-server.js │ ├── fs-router.js │ ├── http-stream.js │ ├── index.js │ ├── invariant.js │ ├── load-app.js │ ├── logger.js │ ├── manifest-path.js │ ├── manifest │ │ ├── client-manifest.js │ │ ├── collect-styles.js │ │ ├── create-vite-manifest.js │ │ ├── dev-server-manifest.js │ │ ├── prod-server-manifest.js │ │ ├── spa-manifest.js │ │ └── vite-manifest.js │ ├── nitro-dev.js │ ├── path.js │ ├── plugins │ │ ├── config.js │ │ ├── css.js │ │ ├── expose-dev-server.js │ │ ├── fs-watcher.js │ │ ├── manifest.js │ │ ├── routes.js │ │ ├── tree-shake.babel.js │ │ ├── tree-shake.js │ │ └── virtual.js │ ├── resolve.js │ ├── route-rules.js │ ├── router-dev-plugins.js │ ├── router-mode.d.ts │ ├── router-modes.js │ └── vite-dev.d.ts │ ├── package.json │ ├── runtime │ ├── LICENSE.h3.md │ ├── client.js │ ├── http-types.d.ts │ ├── http.js │ ├── listen.js │ ├── manifest.js │ ├── party.js │ ├── server-types.d.ts │ ├── server.js │ ├── server.test.ts │ ├── sh.js │ ├── storage.js │ └── style.js │ ├── stack │ ├── assets.js │ ├── index.js │ ├── react.js │ ├── server.js │ └── spa.js │ ├── tsconfig.json │ └── types │ ├── client.d.ts │ ├── manifest.d.ts │ ├── party.d.ts │ ├── routes.d.ts │ └── server.d.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── test ├── CHANGELOG.md ├── async-context.test.ts ├── basic.test.ts ├── fs-router.test.ts ├── helpers │ ├── create-fixture.ts │ └── playwright-fixture.ts ├── hmr.test.ts ├── multi-spa.test.ts ├── package.json ├── playwright.config.ts ├── rsc.test.ts ├── session.test.ts ├── srv-fn.test.ts ├── templates │ ├── multi-spa │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── app.config.js │ │ ├── package.json │ │ ├── public │ │ │ └── favicon.ico │ │ ├── react │ │ │ ├── index.html │ │ │ ├── public │ │ │ │ └── favicon.ico │ │ │ ├── src │ │ │ │ ├── Counter.tsx │ │ │ │ ├── client.tsx │ │ │ │ └── images │ │ │ │ │ └── logo.png │ │ │ └── tsconfig.json │ │ ├── solid │ │ │ ├── public │ │ │ │ └── favicon.ico │ │ │ ├── src │ │ │ │ ├── Counter.tsx │ │ │ │ ├── client.tsx │ │ │ │ ├── images │ │ │ │ │ └── logo.png │ │ │ │ └── index.ts │ │ │ └── tsconfig.json │ │ ├── src │ │ │ ├── Counter.tsx │ │ │ ├── client.tsx │ │ │ ├── images │ │ │ │ └── logo.png │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── react-rsc │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── app.config.js │ │ ├── app │ │ │ ├── Counter.tsx │ │ │ ├── actions.tsx │ │ │ ├── app.tsx │ │ │ ├── client.tsx │ │ │ ├── fetchServerAction.tsx │ │ │ ├── react-server.tsx │ │ │ ├── server-action.tsx │ │ │ ├── server-component.tsx │ │ │ ├── server.tsx │ │ │ └── style.css │ │ ├── index.html │ │ ├── index.ts │ │ ├── package.json │ │ ├── postcss.config.cjs │ │ ├── public │ │ │ └── favicon.ico │ │ ├── tailwind.config.cjs │ │ └── tsconfig.json │ ├── react-srv-fn │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── app.config.js │ │ ├── app │ │ │ ├── App.tsx │ │ │ └── client.tsx │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── favicon.ico │ │ └── tsconfig.json │ ├── react-ssr-fs │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── app.config.js │ │ ├── app │ │ │ ├── Counter.tsx │ │ │ ├── app.tsx │ │ │ ├── client.tsx │ │ │ ├── pages │ │ │ │ ├── hello.css │ │ │ │ ├── hello.tsx │ │ │ │ ├── index.css │ │ │ │ └── index.tsx │ │ │ ├── server.tsx │ │ │ └── style.css │ │ ├── package.json │ │ ├── postcss.config.cjs │ │ ├── public │ │ │ └── favicon.ico │ │ ├── tailwind.config.cjs │ │ └── tsconfig.json │ ├── react-to-web-request │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── app.config.js │ │ ├── app │ │ │ ├── App.tsx │ │ │ ├── client.tsx │ │ │ └── middleware.ts │ │ ├── index.html │ │ ├── package.json │ │ ├── public │ │ │ └── favicon.ico │ │ └── tsconfig.json │ └── react │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── app.config.js │ │ ├── app │ │ ├── Assets.tsx │ │ ├── Counter.tsx │ │ ├── api.ts │ │ ├── api │ │ │ ├── hello.ts │ │ │ ├── init-session.ts │ │ │ └── read-session.ts │ │ ├── entry-client.tsx │ │ ├── entry-server.tsx │ │ ├── render-asset.jsx │ │ └── root.tsx │ │ ├── package.json │ │ ├── public │ │ └── favicon.ico │ │ └── tsconfig.json └── to-web-request.test.ts ├── tsconfig.json └── vendor └── react-server-dom-vite ├── LICENSE ├── README.md ├── cjs ├── react-server-dom-vite-client.browser.development.js ├── react-server-dom-vite-client.browser.production.min.js ├── react-server-dom-vite-client.node.development.js ├── react-server-dom-vite-client.node.production.min.js ├── react-server-dom-vite-plugin.js ├── react-server-dom-vite-runtime.development.js ├── react-server-dom-vite-runtime.production.min.js ├── react-server-dom-vite-server.node.development.js └── react-server-dom-vite-server.node.production.min.js ├── client.browser.js ├── client.js ├── client.node.js ├── esm ├── package.json ├── react-server-dom-vite-client.browser.development.js └── react-server-dom-vite-client.browser.production.min.js ├── index.js ├── package.json ├── plugin.js ├── runtime.js ├── server.js └── server.node.js /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": true, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /.github/workflows/autofix.yml: -------------------------------------------------------------------------------- 1 | name: autofix.ci # needed to securely identify the workflow 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: ["main"] 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | autofix: 13 | runs-on: ubuntu-22.04 14 | steps: 15 | - uses: actions/checkout@v2 16 | 17 | - uses: pnpm/action-setup@v4 18 | 19 | - name: Use Node.js ${{ matrix.node-version }} 20 | uses: actions/setup-node@v3 21 | with: 22 | node-version: ${{ matrix.node-version }} 23 | cache: "pnpm" 24 | 25 | - name: Install dependencies 26 | run: pnpm install 27 | 28 | - uses: autofix-ci/action@bee19d72e71787c12ca0f29de72f2833e437e4c9 29 | with: 30 | commit-message: "chore: apply automated fixes" 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | # Keep environment variables out of version control 3 | .env 4 | .vercel 5 | .output 6 | .nitro 7 | .build 8 | playwright-report 9 | stats.html 10 | .fixtures 11 | *.code-workspace 12 | 13 | .vinxi 14 | 15 | # Local Netlify folder 16 | .netlify 17 | dist 18 | 19 | docs/.vitepress/dist 20 | docs/.vitepress/cache 21 | 22 | tmp 23 | 24 | .DS_Store 25 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | prefer-workspace-packages=true 2 | strict-peer-dependencies=false 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "useTabs": true, 4 | "trailingComma": "all", 5 | "importOrderSeparation": true, 6 | "importOrderSortSpecifiers": true, 7 | "importOrderParserPlugins": [ 8 | "explicitResourceManagement", 9 | "typescript", 10 | "jsx", 11 | "classProperties", 12 | "decoratorsLegacy" 13 | ], 14 | "importOrderSideEffects": false, 15 | "importOrder": [ 16 | "^(fully-react/(.*)$)|^(fully-react$)", 17 | "", 18 | "^node:(.*)$", 19 | "^[./]" 20 | ], 21 | "plugins": ["@trivago/prettier-plugin-sort-imports"], 22 | "overrides": [ 23 | { 24 | "files": "**/*.md", 25 | "options": { 26 | "tabWidth": 2, 27 | "useTabs": false 28 | } 29 | }, 30 | { 31 | "files": "**/package.json", 32 | "options": { 33 | "tabWidth": 2, 34 | "useTabs": false 35 | } 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM imbios/bun-node AS base 2 | ENV PNPM_HOME="/pnpm" 3 | ENV PATH="$PNPM_HOME:$PATH" 4 | RUN corepack enable 5 | COPY . /repo 6 | WORKDIR /repo 7 | RUN pnpm install --frozen-lockfile 8 | RUN pnpm run build 9 | 10 | WORKDIR /repo/packages/vinxi 11 | 12 | EXPOSE 3000 13 | 14 | CMD [ "/repo/packages/vinxi/bin/cli.mjs", "run", "/script.tsx" ] 15 | -------------------------------------------------------------------------------- /docs/.vitepress/components/Signature.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/index.ts: -------------------------------------------------------------------------------- 1 | // https://vitepress.dev/guide/custom-theme 2 | import TwoslashFloatingVue from "@shikijs/vitepress-twoslash/client"; 3 | import "@shikijs/vitepress-twoslash/style.css"; 4 | import type { Theme } from "vitepress"; 5 | import type { EnhanceAppContext } from "vitepress"; 6 | import DefaultTheme from "vitepress/theme"; 7 | import { h } from "vue"; 8 | 9 | import "./style.css"; 10 | 11 | export default { 12 | extends: DefaultTheme, 13 | Layout: () => { 14 | return h(DefaultTheme.Layout, null, { 15 | // https://vitepress.dev/guide/extending-default-theme#layout-slots 16 | }); 17 | }, 18 | enhanceApp({ app }: EnhanceAppContext) { 19 | app.use(TwoslashFloatingVue); 20 | }, 21 | } satisfies Theme; 22 | -------------------------------------------------------------------------------- /docs/api/server/runtime.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nksaraf/vinxi/6d31572a0516d2298e51c7e3db7846efe3e5441f/docs/api/server/runtime.md -------------------------------------------------------------------------------- /docs/guide/build-your-own-framework.md: -------------------------------------------------------------------------------- 1 | # Build Your Own Framework 2 | 3 | (Coming Soon) 4 | 5 | Community post on the topic: [Bullding a React Metaframework with Vinxi](https://www.brenelz.com/posts/building-a-react-metaframework-with-vinxi/) 6 | -------------------------------------------------------------------------------- /docs/guide/philosophy.md: -------------------------------------------------------------------------------- 1 | # Philosophy 2 | 3 | - Runtime-first 4 | - Composable 5 | - Declarative 6 | - Extensible 7 | - Unopinionated 8 | - Internative Hacks and complexity for clean and simple APIs 9 | - Practical 10 | - Solving the hard boring problems once and for and all 11 | - Work as many places as possible 12 | - Scalable up and down 13 | - Quick to start and to level up 14 | - Make life easier for the developer 15 | - Make life better for the user 16 | -------------------------------------------------------------------------------- /docs/guide/vite-plugins.md: -------------------------------------------------------------------------------- 1 | # Vite Plugins 2 | 3 | (Coming Soon) 4 | -------------------------------------------------------------------------------- /docs/guide/why-vinxi.md: -------------------------------------------------------------------------------- 1 | # Why Vinxi? 2 | 3 | (Coming soon) 4 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | # https://vitepress.dev/reference/default-theme-home-page 3 | layout: home 4 | 5 | hero: 6 | name: Vinxi 7 | text: The Full Stack Javascript SDK 8 | tagline: Build your javascript applications and frameworks with ease 9 | actions: 10 | - theme: brand 11 | text: Get Started 12 | link: /guide/getting-started 13 | - theme: alt 14 | text: API Reference 15 | link: /api/app 16 | - theme: alt 17 | text: Try it out 18 | link: https://stackblitz.com/github.com/nksaraf/vinxi/tree/main/examples/react/ssr/basic 19 | # features: 20 | # - title: Feature A 21 | # details: Lorem ipsum dolor sit amet, consectetur adipiscing elit 22 | # - title: Feature B 23 | # details: Lorem ipsum dolor sit amet, consectetur adipiscing elit 24 | # - title: Feature C 25 | # details: Lorem ipsum dolor sit amet, consectetur adipiscing elit 26 | --- 27 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "dev": "vitepress dev .", 8 | "build": "vitepress build ." 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "@shikijs/vitepress-twoslash": "^1.22.0", 15 | "vinxi": "0.5.3", 16 | "vitepress": "^1.6.3", 17 | "vue": "^3.4.19" 18 | }, 19 | "devDependencies": { 20 | "zod": "^3.22.2" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /docs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nksaraf/vinxi/6d31572a0516d2298e51c7e3db7846efe3e5441f/docs/public/favicon.ico -------------------------------------------------------------------------------- /docs/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nksaraf/vinxi/6d31572a0516d2298e51c7e3db7846efe3e5441f/docs/public/logo.png -------------------------------------------------------------------------------- /docs/reference.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc 3 | title: Reference 4 | nav_order: 2 5 | --- 6 | -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "Bundler", 6 | "allowSyntheticDefaultImports": true, 7 | "esModuleInterop": true, 8 | "jsx": "react-jsx", 9 | "allowJs": true, 10 | "checkJs": true, 11 | "noEmit": true, 12 | "isolatedModules": true 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/react/rsc/fw/.gitignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | -------------------------------------------------------------------------------- /examples/react/rsc/fw/app.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "@vinxi/react-server"; 2 | 3 | export default defineConfig(); 4 | -------------------------------------------------------------------------------- /examples/react/rsc/fw/app/Counter.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useState } from "react"; 4 | 5 | import { getStore } from "./actions"; 6 | 7 | console.log(await getStore()); 8 | 9 | export function Counter({ onChange }) { 10 | const [count, setCount] = useState(0); 11 | return ( 12 | 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /examples/react/rsc/fw/app/actions.tsx: -------------------------------------------------------------------------------- 1 | "use server"; 2 | 3 | let store = { count: 0 }; 4 | export function sayHello() { 5 | store.count++; 6 | return store.count; 7 | } 8 | 9 | export function getStore() { 10 | return store.count; 11 | } 12 | -------------------------------------------------------------------------------- /examples/react/rsc/fw/app/app.tsx: -------------------------------------------------------------------------------- 1 | import { Counter } from "./Counter"; 2 | import { getStore, sayHello } from "./actions"; 3 | import "./style.css"; 4 | 5 | export default function App({ assets }) { 6 | return ( 7 | 8 | 9 | Document 1 10 | 11 | {assets} 12 | 13 | 14 |
15 |

Hello AgentConf with ya asdo!!!

16 |
Hello World
17 | 18 | {getStore()} 19 | 20 |
21 | 22 | 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /examples/react/rsc/fw/app/style.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | * { 6 | color: red; 7 | } -------------------------------------------------------------------------------- /examples/react/rsc/fw/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-react-server", 3 | "type": "module", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vinxi dev", 7 | "build": "vinxi build", 8 | "start": "vinxi start" 9 | }, 10 | "dependencies": { 11 | "@picocss/pico": "^1.5.10", 12 | "@vinxi/react-server": "0.2.13", 13 | "@vinxi/react-server-dom": "0.0.3", 14 | "autoprefixer": "^10.4.15", 15 | "react": "0.0.0-experimental-035a41c4e-20230704", 16 | "react-dom": "0.0.0-experimental-035a41c4e-20230704", 17 | "tailwindcss": "^3.3.3", 18 | "vinxi": "0.5.6" 19 | }, 20 | "devDependencies": { 21 | "@types/react": "^18.2.21", 22 | "@types/react-dom": "^18.2.7" 23 | }, 24 | "version": null 25 | } 26 | -------------------------------------------------------------------------------- /examples/react/rsc/fw/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /examples/react/rsc/fw/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nksaraf/vinxi/6d31572a0516d2298e51c7e3db7846efe3e5441f/examples/react/rsc/fw/public/favicon.ico -------------------------------------------------------------------------------- /examples/react/rsc/fw/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./app/**/*.tsx", "./app/**/*.ts", "./app/**/*.js"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /examples/react/rsc/fw/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "Bundler", 6 | "allowSyntheticDefaultImports": true, 7 | "esModuleInterop": true, 8 | "jsx": "react-jsx", 9 | "allowJs": true, 10 | "checkJs": true, 11 | "noEmit": true, 12 | "types": ["vinxi/client", "react/experimental"], 13 | "isolatedModules": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/react/rsc/spa/.gitignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | -------------------------------------------------------------------------------- /examples/react/rsc/spa/app/Counter.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useState } from "react"; 4 | 5 | export function Counter({ onChange }) { 6 | const [count, setCount] = useState(0); 7 | return ( 8 | 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /examples/react/rsc/spa/app/actions.tsx: -------------------------------------------------------------------------------- 1 | "use server"; 2 | 3 | import { createStorage } from "unstorage"; 4 | import fsDriver from "unstorage/drivers/fs-lite"; 5 | 6 | const storage = createStorage({ 7 | driver: fsDriver({ base: "./tmp" }), 8 | }); 9 | 10 | export async function sayHello() { 11 | console.log("Hello World"); 12 | await storage.setItem( 13 | "count", 14 | (Number(await storage.getItem("count")) ?? 0) + 1, 15 | ); 16 | return Number(await storage.getItem("count")) ?? 0; 17 | } 18 | 19 | export async function getStore() { 20 | return Number(await storage.getItem("count")) ?? 0; 21 | } 22 | -------------------------------------------------------------------------------- /examples/react/rsc/spa/app/app.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import { Counter } from "./Counter"; 4 | import { getStore, sayHello } from "./actions"; 5 | import "./style.css"; 6 | 7 | console.log(sayHello); 8 | 9 | export default function App({ assets }) { 10 | return ( 11 | 12 | 13 | 14 | {assets} 15 | 16 | 17 |
18 |

Hello AgentConf with ya asdo!!!

19 |
Hello World
20 | 21 | {getStore()} 22 | 23 |
24 | 25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /examples/react/rsc/spa/app/fetchServerAction.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | createFromFetch, 3 | encodeReply, 4 | } from "@vinxi/react-server-dom/client"; 5 | 6 | export async function fetchServerAction( 7 | base, 8 | id, 9 | args, 10 | callServer = (id, args) => { 11 | throw new Error("No server action handler"); 12 | }, 13 | ) { 14 | const response = fetch(base, { 15 | method: "POST", 16 | headers: { 17 | Accept: "text/x-component", 18 | "server-action": id, 19 | }, 20 | body: await encodeReply(args), 21 | }); 22 | 23 | return await createFromFetch(response, { 24 | callServer, 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /examples/react/rsc/spa/app/style.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | * { 6 | color: red; 7 | } -------------------------------------------------------------------------------- /examples/react/rsc/spa/index.ts: -------------------------------------------------------------------------------- 1 | import { eventHandler, toWebRequest } from "vinxi/http"; 2 | 3 | export default eventHandler((event) => { 4 | return new Response( 5 | ` 6 | 7 | 8 | 9 | 10 | 11 | Document 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | `, 21 | { 22 | status: 200, 23 | headers: { 24 | "Content-Type": "text/html", 25 | }, 26 | }, 27 | ); 28 | }); 29 | -------------------------------------------------------------------------------- /examples/react/rsc/spa/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-rsc-spa", 3 | "type": "module", 4 | "private": true, 5 | "version": null, 6 | "scripts": { 7 | "dev": "vinxi dev", 8 | "build": "vinxi build", 9 | "start": "vinxi start" 10 | }, 11 | "dependencies": { 12 | "@picocss/pico": "^1.5.10", 13 | "@vinxi/server-components": "0.5.1", 14 | "@vinxi/server-functions": "0.5.1", 15 | "@vinxi/react": "0.2.5", 16 | "@vinxi/react-server-dom": "0.0.3", 17 | "@vitejs/plugin-react": "^4.0.4", 18 | "acorn-loose": "^8.3.0", 19 | "autoprefixer": "^10.4.15", 20 | "react": "0.0.0-experimental-035a41c4e-20230704", 21 | "react-dom": "0.0.0-experimental-035a41c4e-20230704", 22 | "tailwindcss": "^3.3.3", 23 | "unstorage": "^1.10.1", 24 | "vinxi": "0.5.6" 25 | }, 26 | "devDependencies": { 27 | "@types/react": "^18.2.21", 28 | "@types/react-dom": "^18.2.7" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/react/rsc/spa/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /examples/react/rsc/spa/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nksaraf/vinxi/6d31572a0516d2298e51c7e3db7846efe3e5441f/examples/react/rsc/spa/public/favicon.ico -------------------------------------------------------------------------------- /examples/react/rsc/spa/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./app/**/*.tsx", "./app/**/*.ts", "./app/**/*.js"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /examples/react/rsc/spa/tmp/count: -------------------------------------------------------------------------------- 1 | 20 -------------------------------------------------------------------------------- /examples/react/rsc/spa/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "Bundler", 6 | "allowSyntheticDefaultImports": true, 7 | "esModuleInterop": true, 8 | "jsx": "react-jsx", 9 | "allowJs": true, 10 | "checkJs": true, 11 | "noEmit": true, 12 | "types": ["vinxi/types/client", "react/experimental"], 13 | "isolatedModules": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/react/rsc/ssr/.gitignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | -------------------------------------------------------------------------------- /examples/react/rsc/ssr/app/Counter.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useState } from "react"; 4 | 5 | export function Counter({ onChange }) { 6 | const [count, setCount] = useState(0); 7 | return ( 8 | 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /examples/react/rsc/ssr/app/actions.tsx: -------------------------------------------------------------------------------- 1 | "use server"; 2 | 3 | import { createStorage } from "unstorage"; 4 | import fsDriver from "unstorage/drivers/fs-lite"; 5 | 6 | const storage = createStorage({ 7 | driver: fsDriver({ base: "./tmp" }), 8 | }); 9 | 10 | export async function sayHello() { 11 | console.log("Hello World"); 12 | await storage.setItem( 13 | "count", 14 | (Number(await storage.getItem("count")) ?? 0) + 1, 15 | ); 16 | return Number(await storage.getItem("count")) ?? 0; 17 | } 18 | 19 | export async function getStore() { 20 | return Number(await storage.getItem("count")) ?? 0; 21 | } 22 | -------------------------------------------------------------------------------- /examples/react/rsc/ssr/app/app.tsx: -------------------------------------------------------------------------------- 1 | import { Counter } from "./Counter"; 2 | import { getStore, sayHello } from "./actions"; 3 | import "./style.css"; 4 | 5 | export default function App({ assets }) { 6 | return ( 7 | 8 | 9 | 10 | {assets} 11 | 12 | 13 |
14 |

Hello AgentConf with ya asdo!!!

15 |
Hello World
16 | 17 | {getStore()} 18 | 19 |
20 | 21 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /examples/react/rsc/ssr/app/fetchServerAction.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | createFromFetch, 3 | encodeReply, 4 | } from "@vinxi/react-server-dom/client"; 5 | 6 | export async function fetchServerAction( 7 | base, 8 | id, 9 | args, 10 | callServer = (id, args) => { 11 | throw new Error("No server action handler"); 12 | }, 13 | ) { 14 | const response = fetch(base, { 15 | method: "POST", 16 | headers: { 17 | Accept: "text/x-component", 18 | "server-action": id, 19 | }, 20 | body: await encodeReply(args), 21 | }); 22 | 23 | return await createFromFetch(response, { 24 | callServer, 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /examples/react/rsc/ssr/app/style.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | * { 6 | color: red; 7 | } -------------------------------------------------------------------------------- /examples/react/rsc/ssr/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-rsc-ssr", 3 | "type": "module", 4 | "private": true, 5 | "version": null, 6 | "scripts": { 7 | "dev": "vinxi dev", 8 | "build": "vinxi build", 9 | "start": "vinxi start" 10 | }, 11 | "dependencies": { 12 | "@picocss/pico": "^1.5.10", 13 | "@vinxi/server-components": "0.5.1", 14 | "@vinxi/server-functions": "0.5.1", 15 | "@vinxi/react": "0.2.5", 16 | "@vinxi/react-server-dom": "0.0.3", 17 | "@vitejs/plugin-react": "^4.0.4", 18 | "acorn-loose": "^8.3.0", 19 | "autoprefixer": "^10.4.15", 20 | "react": "0.0.0-experimental-035a41c4e-20230704", 21 | "react-dom": "0.0.0-experimental-035a41c4e-20230704", 22 | "tailwindcss": "^3.3.3", 23 | "unstorage": "^1.10.1", 24 | "vinxi": "0.5.6" 25 | }, 26 | "devDependencies": { 27 | "@types/react": "^18.2.21", 28 | "@types/react-dom": "^18.2.7" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/react/rsc/ssr/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /examples/react/rsc/ssr/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nksaraf/vinxi/6d31572a0516d2298e51c7e3db7846efe3e5441f/examples/react/rsc/ssr/public/favicon.ico -------------------------------------------------------------------------------- /examples/react/rsc/ssr/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./app/**/*.tsx", "./app/**/*.ts", "./app/**/*.js"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /examples/react/rsc/ssr/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "Bundler", 6 | "allowSyntheticDefaultImports": true, 7 | "esModuleInterop": true, 8 | "jsx": "react-jsx", 9 | "allowJs": true, 10 | "checkJs": true, 11 | "noEmit": true, 12 | "types": ["vinxi/types/client", "react/experimental"], 13 | "isolatedModules": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/react/spa/basic/.gitignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | -------------------------------------------------------------------------------- /examples/react/spa/basic/app.config.js: -------------------------------------------------------------------------------- 1 | import reactRefresh from "@vitejs/plugin-react"; 2 | import { createApp } from "vinxi"; 3 | 4 | export default createApp({ 5 | routers: [ 6 | { 7 | name: "public", 8 | type: "static", 9 | dir: "./public", 10 | }, 11 | { 12 | name: "client", 13 | type: "spa", 14 | handler: "./index.ts", 15 | target: "browser", 16 | plugins: () => [reactRefresh()], 17 | }, 18 | ], 19 | }); 20 | -------------------------------------------------------------------------------- /examples/react/spa/basic/app/client.tsx: -------------------------------------------------------------------------------- 1 | /// 2 | import ReactDOM from "react-dom/client"; 3 | 4 | import "./style.css"; 5 | 6 | ReactDOM.createRoot(document.getElementById("root")).render( 7 |
Hello World
, 8 | ); 9 | -------------------------------------------------------------------------------- /examples/react/spa/basic/app/style.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | * { 6 | color: red; 7 | } -------------------------------------------------------------------------------- /examples/react/spa/basic/index.ts: -------------------------------------------------------------------------------- 1 | import { eventHandler, toWebRequest } from "vinxi/http"; 2 | 3 | export default eventHandler((event) => { 4 | console.log(toWebRequest(event)); 5 | return new Response( 6 | ` 7 | 8 | 9 | 10 | 11 | 12 | Document 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | `, 22 | { 23 | status: 200, 24 | headers: { 25 | "Content-Type": "text/html", 26 | }, 27 | }, 28 | ); 29 | }); 30 | -------------------------------------------------------------------------------- /examples/react/spa/basic/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-react-spa-basic", 3 | "type": "module", 4 | "private": true, 5 | "version": null, 6 | "scripts": { 7 | "dev": "vinxi dev", 8 | "build": "vinxi build", 9 | "start": "vinxi start" 10 | }, 11 | "dependencies": { 12 | "@picocss/pico": "^1.5.10", 13 | "@vinxi/react": "0.2.5", 14 | "@vitejs/plugin-react": "^4.0.4", 15 | "autoprefixer": "^10.4.15", 16 | "react": "0.0.0-experimental-035a41c4e-20230704", 17 | "react-dom": "0.0.0-experimental-035a41c4e-20230704", 18 | "tailwindcss": "^3.3.3", 19 | "vinxi": "0.5.6" 20 | }, 21 | "devDependencies": { 22 | "@types/react": "^18.2.21", 23 | "@types/react-dom": "^18.2.7" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /examples/react/spa/basic/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /examples/react/spa/basic/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nksaraf/vinxi/6d31572a0516d2298e51c7e3db7846efe3e5441f/examples/react/spa/basic/public/favicon.ico -------------------------------------------------------------------------------- /examples/react/spa/basic/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./app/**/*.tsx", "./app/**/*.ts", "./app/**/*.js"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /examples/react/spa/basic/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "Bundler", 6 | "allowSyntheticDefaultImports": true, 7 | "esModuleInterop": true, 8 | "jsx": "react-jsx", 9 | "allowJs": true, 10 | "checkJs": true, 11 | "noEmit": true, 12 | "types": ["vinxi/client"], 13 | "isolatedModules": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/react/spa/mdx/.gitignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | -------------------------------------------------------------------------------- /examples/react/spa/mdx/app/pages/hello.css: -------------------------------------------------------------------------------- 1 | * { 2 | background-color: purple; 3 | } -------------------------------------------------------------------------------- /examples/react/spa/mdx/app/pages/hello.mdx: -------------------------------------------------------------------------------- 1 | 2 | # Hello world 3 | 4 | [Home](/) 5 | 6 | ``` 7 | Yo 8 | ``` -------------------------------------------------------------------------------- /examples/react/spa/mdx/app/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link } from "wouter"; 3 | 4 | import "./hello.css"; 5 | 6 | function Counter() { 7 | const [count, setCount] = React.useState(0); 8 | return ( 9 |
10 |

Count: {count}

11 | 12 |
13 | ); 14 | } 15 | 16 | export default function Hello({ assets }) { 17 | return ( 18 | <> 19 |
Hellsas\\dasd4
20 | Hello 21 | 22 | {/*