diff --git a/packages/react/temptest/.gitignore b/packages/react/temptest/.gitignore deleted file mode 100644 index a547bf3..0000000 --- a/packages/react/temptest/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/packages/react/temptest/README.md b/packages/react/temptest/README.md deleted file mode 100644 index 7959ce4..0000000 --- a/packages/react/temptest/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# React + TypeScript + Vite - -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: - -```js -export default tseslint.config([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - - // Remove tseslint.configs.recommended and replace with this - ...tseslint.configs.recommendedTypeChecked, - // Alternatively, use this for stricter rules - ...tseslint.configs.strictTypeChecked, - // Optionally, add this for stylistic rules - ...tseslint.configs.stylisticTypeChecked, - - // Other configs... - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) -``` - -You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: - -```js -// eslint.config.js -import reactX from 'eslint-plugin-react-x' -import reactDom from 'eslint-plugin-react-dom' - -export default tseslint.config([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - // Enable lint rules for React - reactX.configs['recommended-typescript'], - // Enable lint rules for React DOM - reactDom.configs.recommended, - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) -``` diff --git a/packages/react/temptest/eslint.config.js b/packages/react/temptest/eslint.config.js deleted file mode 100644 index d94e7de..0000000 --- a/packages/react/temptest/eslint.config.js +++ /dev/null @@ -1,23 +0,0 @@ -import js from '@eslint/js' -import globals from 'globals' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' -import tseslint from 'typescript-eslint' -import { globalIgnores } from 'eslint/config' - -export default tseslint.config([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - js.configs.recommended, - tseslint.configs.recommended, - reactHooks.configs['recommended-latest'], - reactRefresh.configs.vite, - ], - languageOptions: { - ecmaVersion: 2020, - globals: globals.browser, - }, - }, -]) diff --git a/packages/react/temptest/index.html b/packages/react/temptest/index.html deleted file mode 100644 index e4b78ea..0000000 --- a/packages/react/temptest/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Vite + React + TS - - -
- - - diff --git a/packages/react/temptest/package.json b/packages/react/temptest/package.json deleted file mode 100644 index 36a53c7..0000000 --- a/packages/react/temptest/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "temptest", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc -b && vite build", - "lint": "eslint .", - "preview": "vite preview" - }, - "dependencies": { - "react": "^19.1.1", - "react-dom": "^19.1.1" - }, - "devDependencies": { - "@eslint/js": "^9.33.0", - "@types/react": "^19.1.10", - "@types/react-dom": "^19.1.7", - "@vitejs/plugin-react": "^5.0.0", - "eslint": "^9.33.0", - "eslint-plugin-react-hooks": "^5.2.0", - "eslint-plugin-react-refresh": "^0.4.20", - "globals": "^16.3.0", - "typescript": "~5.8.3", - "typescript-eslint": "^8.39.1", - "vite": "^7.1.2" - } -} diff --git a/packages/react/temptest/public/vite.svg b/packages/react/temptest/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/packages/react/temptest/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/react/temptest/src/App.css b/packages/react/temptest/src/App.css deleted file mode 100644 index b9d355d..0000000 --- a/packages/react/temptest/src/App.css +++ /dev/null @@ -1,42 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/packages/react/temptest/src/App.tsx b/packages/react/temptest/src/App.tsx deleted file mode 100644 index 94e2f9e..0000000 --- a/packages/react/temptest/src/App.tsx +++ /dev/null @@ -1,112 +0,0 @@ -import { useState, type FunctionComponent } from "react"; -import { useResource, useChangeSubject, useSubject } from "../../../solid-react"; -import { SolidProfileShapeShapeType } from "../../test/.ldo/solidProfile.shapeTypes.js"; -import { set } from "@ldo/ldo"; - -const FormTest: FunctionComponent = () => { - const randomResource = useResource("http://example.com/resource.ttl"); - const submittedData = useSubject(SolidProfileShapeShapeType, "Example0"); - - const [count, setCount] = useState(1); - - const [data, setData, commitData] = useChangeSubject( - SolidProfileShapeShapeType, - "Example0", - ); - - return ( -
-

Form

- -
{ - e.preventDefault(); - const result = await commitData(); - }} - > - {/* Primary name field */} - { - setData(randomResource, (profile) => { - profile.fn = e.target.value; - }) - }} - /> - - {/* Friends */} - {data?.knows?.map((person) => ( -
-

{person["@id"]}

- - setData(randomResource, (p) => { - p.fn = e.target.value; - }, person) - } - /> - -
- ))} - - - - -
- -
- - {/* Committed view */} -

Submitted Data

-
-

Name: {submittedData?.fn ?? ""}

- -
-
- ); -}; - -function App() { - - return ( -
- -
- ) -} - -export default App diff --git a/packages/react/temptest/src/assets/react.svg b/packages/react/temptest/src/assets/react.svg deleted file mode 100644 index 6c87de9..0000000 --- a/packages/react/temptest/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/react/temptest/src/index.css b/packages/react/temptest/src/index.css deleted file mode 100644 index 69cc6f9..0000000 --- a/packages/react/temptest/src/index.css +++ /dev/null @@ -1,72 +0,0 @@ -:root { - font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} - -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} - -button:hover { - border-color: #646cff; -} - -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - - a:hover { - color: #747bff; - } - - button { - background-color: #f9f9f9; - } -} \ No newline at end of file diff --git a/packages/react/temptest/src/main.tsx b/packages/react/temptest/src/main.tsx deleted file mode 100644 index a757447..0000000 --- a/packages/react/temptest/src/main.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { createRoot } from 'react-dom/client' -import './index.css' -import App from './App.tsx' - -createRoot(document.getElementById('root')!).render( - -) diff --git a/packages/react/temptest/src/vite-env.d.ts b/packages/react/temptest/src/vite-env.d.ts deleted file mode 100644 index 11f02fe..0000000 --- a/packages/react/temptest/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/packages/react/temptest/tsconfig.app.json b/packages/react/temptest/tsconfig.app.json deleted file mode 100644 index 227a6c6..0000000 --- a/packages/react/temptest/tsconfig.app.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", - "target": "ES2022", - "useDefineForClassFields": true, - "lib": ["ES2022", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "verbatimModuleSyntax": true, - "moduleDetection": "force", - "noEmit": true, - "jsx": "react-jsx", - - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "erasableSyntaxOnly": true, - "noFallthroughCasesInSwitch": true, - "noUncheckedSideEffectImports": true - }, - "include": ["src"] -} diff --git a/packages/react/temptest/tsconfig.json b/packages/react/temptest/tsconfig.json deleted file mode 100644 index 1ffef60..0000000 --- a/packages/react/temptest/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "files": [], - "references": [ - { "path": "./tsconfig.app.json" }, - { "path": "./tsconfig.node.json" } - ] -} diff --git a/packages/react/temptest/tsconfig.node.json b/packages/react/temptest/tsconfig.node.json deleted file mode 100644 index f85a399..0000000 --- a/packages/react/temptest/tsconfig.node.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", - "target": "ES2023", - "lib": ["ES2023"], - "module": "ESNext", - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "verbatimModuleSyntax": true, - "moduleDetection": "force", - "noEmit": true, - - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "erasableSyntaxOnly": true, - "noFallthroughCasesInSwitch": true, - "noUncheckedSideEffectImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/packages/react/temptest/vite.config.ts b/packages/react/temptest/vite.config.ts deleted file mode 100644 index 8b0f57b..0000000 --- a/packages/react/temptest/vite.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' - -// https://vite.dev/config/ -export default defineConfig({ - plugins: [react()], -})