-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
3,319 additions
and
1,538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# 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 our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
"@vinxi/plugin-references": patch | ||
"@vinxi/solid-start": patch | ||
"@vinxi/react": patch | ||
"@vinxi/solid": patch | ||
"vinxi": patch | ||
"@vinxi/plugin-mdx": patch | ||
"@vinxi/react-server": patch | ||
--- | ||
|
||
add changesets support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { defineConfig } from "@vinxi/react-server"; | ||
|
||
export default defineConfig(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"use client"; | ||
|
||
import { fetchServerAction } from "@vinxi/react-server/client"; | ||
import { useState } from "react"; | ||
|
||
import { sayHello } from "./actions"; | ||
|
||
document.addEventListener("click", async (e) => { | ||
console.log(sayHello, "hello"); | ||
|
||
const result = await fetchServerAction("/_server", sayHello["$$id"], []); | ||
console.log(result); | ||
// sayHello(); | ||
}); | ||
export function Counter({ onChange }) { | ||
const [count, setCount] = useState(0); | ||
return ( | ||
<button | ||
onClick={() => { | ||
setCount((c) => c + 1); | ||
onChange(); | ||
}} | ||
> | ||
Count: {count} | ||
</button> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"use server"; | ||
|
||
let store = { count: 0 }; | ||
export function sayHello() { | ||
console.log("Hello World"); | ||
store.count++; | ||
return store.count; | ||
} | ||
|
||
export function getStore() { | ||
return store.count; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Counter } from "./Counter"; | ||
import { getStore, sayHello } from "./actions"; | ||
import "./style.css"; | ||
|
||
export default function App({ assets }) { | ||
return ( | ||
<html lang="en"> | ||
<head> | ||
<link rel="icon" href="/favicon.ico" /> | ||
{assets} | ||
</head> | ||
<body> | ||
<section> | ||
<h1>Hello AgentConf with ya asdo!!!</h1> | ||
<div>Hello World</div> | ||
|
||
{getStore()} | ||
<Counter onChange={sayHello} /> | ||
</section> | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="vinxi/client" /> | ||
import { ServerComponent } from "@vinxi/react-server/client"; | ||
import { createRoot } from "react-dom/client"; | ||
|
||
createRoot(document).render(<ServerComponent url={window.location.pathname} />); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
* { | ||
color: red; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Document</title> | ||
<link rel="icon" href="/favicon.ico" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script src="./app/client.tsx" type="module"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "example-react-server", | ||
"type": "module", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vinxi dev", | ||
"build": "vinxi build", | ||
"start": "vinxi start" | ||
}, | ||
"dependencies": { | ||
"@picocss/pico": "^1.5.10", | ||
"@vinxi/react-server": "workspace:^", | ||
"@vinxi/react-server-dom": "^0.0.3", | ||
"autoprefixer": "^10.4.15", | ||
"react": "0.0.0-experimental-035a41c4e-20230704", | ||
"react-dom": "0.0.0-experimental-035a41c4e-20230704", | ||
"tailwindcss": "^3.3.3", | ||
"vinxi": "workspace:^" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.2.21", | ||
"@types/react-dom": "^18.2.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: ["./app/**/*.tsx", "./app/**/*.ts", "./app/**/*.js"], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"jsx": "react-jsx", | ||
"allowJs": true, | ||
"checkJs": true, | ||
"noEmit": true, | ||
"types": ["vinxi/client", "react/experimental"], | ||
"isolatedModules": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
{ | ||
"type": "module", | ||
"name": "app", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vinxi dev", | ||
"build": "vinxi build", | ||
"start": "vinxi start" | ||
}, | ||
"dependencies": { | ||
"@picocss/pico": "^1.5.7", | ||
"@picocss/pico": "^1.5.10", | ||
"@vinxi/plugin-references": "workspace:^", | ||
"@vinxi/react": "workspace:^", | ||
"@vinxi/react-server-dom-vite": "^0.0.2", | ||
"@vitejs/plugin-react": "^4.0.1", | ||
"@vinxi/react-server-dom": "^0.0.3", | ||
"@vitejs/plugin-react": "^4.0.4", | ||
"acorn-loose": "^8.3.0", | ||
"autoprefixer": "^10.4.14", | ||
"autoprefixer": "^10.4.15", | ||
"react": "0.0.0-experimental-035a41c4e-20230704", | ||
"react-dom": "0.0.0-experimental-035a41c4e-20230704", | ||
"tailwindcss": "^3.3.2", | ||
"tailwindcss": "^3.3.3", | ||
"vinxi": "workspace:^" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.2.14", | ||
"@types/react-dom": "^18.2.6" | ||
"@types/react": "^18.2.21", | ||
"@types/react-dom": "^18.2.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,6 @@ | ||
/// <reference types="vinxi/client" /> | ||
import { createModuleLoader } from "@vinxi/react-server-dom-vite/runtime"; | ||
import React, { Suspense, startTransition } from "react"; | ||
import { Root, hydrateRoot } from "react-dom/client"; | ||
import "vinxi/runtime/client"; | ||
|
||
import { ServerComponent } from "./server-component"; | ||
|
||
globalThis.__vite__ = createModuleLoader({ | ||
loadModule: async (id) => { | ||
return import( | ||
/* @vite-ignore */ import.meta.env.MANIFEST["client"].chunks[id].output | ||
.path | ||
); | ||
}, | ||
}); | ||
|
||
import { startTransition } from "react"; | ||
import { hydrateRoot } from "react-dom/client"; | ||
import { ServerComponent } from "@vinxi/react-rsc/client"; | ||
startTransition(() => { | ||
hydrateRoot(document, <ServerComponent url={window.location.pathname} />); | ||
}); |
Oops, something went wrong.