├── .github └── workflows │ └── main.yaml ├── .gitignore ├── .prettierrc ├── LICENSE ├── README.md ├── package.json ├── pnpm-lock.yaml ├── public ├── favicons │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── browserconfig.xml │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── icon-192x192.png │ ├── icon-256x256.png │ ├── icon-384x384.png │ ├── icon-512x512.png │ └── mstile-150x150.png ├── fonts │ ├── .DS_Store │ └── Gordita │ │ ├── Gordita-Black-Italic.otf │ │ ├── Gordita-Black-Italic.woff │ │ ├── Gordita-Black-Italic.woff2 │ │ ├── Gordita-Black.otf │ │ ├── Gordita-Black.woff │ │ ├── Gordita-Black.woff2 │ │ ├── Gordita-Bold-Italic.woff │ │ ├── Gordita-Bold-italic.otf │ │ ├── Gordita-Bold-italic.woff2 │ │ ├── Gordita-Bold.eot │ │ ├── Gordita-Bold.otf │ │ ├── Gordita-Bold.ttf │ │ ├── Gordita-Bold.woff │ │ ├── Gordita-Bold.woff2 │ │ ├── Gordita-Light-Italic.otf │ │ ├── Gordita-Light-Italic.woff │ │ ├── Gordita-Light-Italic.woff2 │ │ ├── Gordita-Light.otf │ │ ├── Gordita-Light.woff │ │ ├── Gordita-Light.woff2 │ │ ├── Gordita-Medium-Italic.otf │ │ ├── Gordita-Medium-Italic.woff │ │ ├── Gordita-Medium-Italic.woff2 │ │ ├── Gordita-Medium.eot │ │ ├── Gordita-Medium.otf │ │ ├── Gordita-Medium.ttf │ │ ├── Gordita-Medium.woff │ │ ├── Gordita-Medium.woff2 │ │ ├── Gordita-Regular-Italic.otf │ │ ├── Gordita-Regular-Italic.woff │ │ ├── Gordita-Regular-Italic.woff2 │ │ ├── Gordita-Regular.eot │ │ ├── Gordita-Regular.otf │ │ ├── Gordita-Regular.ttf │ │ ├── Gordita-Regular.woff │ │ ├── Gordita-Regular.woff2 │ │ ├── Gordita-Thin-Italic.otf │ │ ├── Gordita-Thin-Italic.woff │ │ ├── Gordita-Thin-Italic.woff2 │ │ ├── Gordita-Thin.eot │ │ ├── Gordita-Thin.otf │ │ ├── Gordita-Thin.ttf │ │ ├── Gordita-Thin.woff │ │ ├── Gordita-Thin.woff2 │ │ ├── Gordita-Ultra-Italic.otf │ │ ├── Gordita-Ultra-Italic.woff │ │ ├── Gordita-Ultra-Italic.woff2 │ │ ├── Gordita-Ultra.otf │ │ ├── Gordita-Ultra.woff │ │ └── Gordita-Ultra.woff2 └── og.png ├── src ├── components │ ├── ActionsPanel │ │ ├── ActionsPanel.tsx │ │ └── TogglePanelButton.tsx │ ├── ConfigPanel │ │ ├── ConfigPanel.tsx │ │ ├── Input.tsx │ │ ├── Select.tsx │ │ └── Toggle.tsx │ ├── CopyJSXButton.tsx │ ├── Editors │ │ ├── HTMLEditor.tsx │ │ ├── JSXEditor.tsx │ │ └── SplitEditor.tsx │ ├── Header │ │ ├── Header.tsx │ │ └── ThemeBtn.tsx │ ├── Icons │ │ ├── ArrowLeftIcon.tsx │ │ ├── ChevronDownIcon.tsx │ │ ├── CopyIcon.tsx │ │ ├── GithubIcon.tsx │ │ ├── HalfSun.tsx │ │ ├── SettingsIcon.tsx │ │ ├── SplitPanelColumns.tsx │ │ ├── SplitPanelRows.tsx │ │ ├── TrashIcon.tsx │ │ └── XIcon.tsx │ ├── MobileScrollDVH.tsx │ ├── SettingsPanel │ │ ├── SettingsPanel.tsx │ │ └── TogglePanelButton.tsx │ └── SolidLogo.tsx ├── editor │ ├── defineEditorTheme.ts │ ├── editorBaseTheme.ts │ ├── plugins │ │ ├── autocomplete-style.ts │ │ ├── cursor-style.ts │ │ ├── highlight-style.ts │ │ ├── line-numbers-style.ts │ │ └── selection-style.ts │ └── theme │ │ ├── dark.ts │ │ └── light.ts ├── entry-client.tsx ├── entry-server.tsx ├── lib │ └── html-to-jsx.ts ├── root.css ├── root.tsx ├── routes │ └── index.tsx ├── store.ts └── utils │ ├── hasNonOverlayScrollbarY.ts │ ├── onTransitionend.ts │ └── reflow.ts ├── tsconfig.json ├── unocss.config.ts └── vite.config.ts /.github/workflows/main.yaml: -------------------------------------------------------------------------------- 1 | name: Deploy site 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - uses: pnpm/action-setup@v2.2.4 16 | 17 | - name: Setup Node.js environment 18 | 19 | uses: actions/setup-node@v3 20 | with: 21 | node-version: 18 22 | cache: pnpm 23 | 24 | - name: Install dependencies 25 | run: pnpm install 26 | 27 | - name: Build 28 | run: pnpm build 29 | 30 | - name: deploy pages 31 | uses: JamesIves/github-pages-deploy-action@v4.4.1 32 | with: 33 | branch: gh-pages 34 | folder: dist/public 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # solid-start 2 | .solid 3 | 4 | .output 5 | 6 | # Mac 7 | .DS_Store 8 | 9 | # Logs 10 | logs 11 | *.log 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | lerna-debug.log* 16 | 17 | # Diagnostic reports (https://nodejs.org/api/report.html) 18 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 19 | 20 | # Runtime data 21 | pids 22 | *.pid 23 | *.seed 24 | *.pid.lock 25 | 26 | # Directory for instrumented libs generated by jscoverage/JSCover 27 | lib-cov 28 | 29 | # Coverage directory used by tools like istanbul 30 | coverage 31 | *.lcov 32 | 33 | # nyc test coverage 34 | .nyc_output 35 | 36 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 37 | .grunt 38 | 39 | # Bower dependency directory (https://bower.io/) 40 | bower_components 41 | 42 | # node-waf configuration 43 | .lock-wscript 44 | 45 | # Compiled binary addons (https://nodejs.org/api/addons.html) 46 | build/Release 47 | 48 | # Dependency directories 49 | node_modules/ 50 | jspm_packages/ 51 | 52 | # TypeScript v1 declaration files 53 | typings/ 54 | 55 | # TypeScript cache 56 | *.tsbuildinfo 57 | 58 | # Optional npm cache directory 59 | .npm 60 | 61 | # Optional eslint cache 62 | .eslintcache 63 | 64 | # Microbundle cache 65 | .rpt2_cache/ 66 | .rts2_cache_cjs/ 67 | .rts2_cache_es/ 68 | .rts2_cache_umd/ 69 | 70 | # Optional REPL history 71 | .node_repl_history 72 | 73 | # Output of 'npm pack' 74 | *.tgz 75 | 76 | # Yarn Integrity file 77 | .yarn-integrity 78 | 79 | # dotenv environment variables file 80 | .env 81 | .env.test 82 | 83 | # parcel-bundler cache (https://parceljs.org/) 84 | .cache 85 | 86 | # Next.js build output 87 | .next 88 | 89 | # Nuxt.js build / generate output 90 | .nuxt 91 | dist 92 | 93 | # Gatsby files 94 | .cache/ 95 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 96 | # https://nextjs.org/blog/next-9-1#public-directory-support 97 | # public 98 | 99 | # vuepress build output 100 | .vuepress/dist 101 | 102 | # Serverless directories 103 | .serverless/ 104 | 105 | # FuseBox cache 106 | .fusebox/ 107 | 108 | # DynamoDB Local files 109 | .dynamodb/ 110 | 111 | # TernJS port file 112 | .tern-port 113 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "tabWidth": 2, 4 | "printWidth": 100, 5 | "semi": true, 6 | "singleQuote": false, 7 | "useTabs": false, 8 | "arrowParens": "always", 9 | "bracketSpacing": true, 10 | "endOfLine": "lf" 11 | } 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 SolidJS Community 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | HTML to Solid JSX 3 |

4 | 5 | # HTML to SolidJSX 6 | 7 | This is the source code of the [HTML to Solid JSX](https://solidjs-community.github.io/html-to-solidjsx) website. 8 | 9 | ## Purpose 10 | 11 | Existing HTML to JSX online transformers aren't compatible for SolidJS, it transforms to JSX that is suited for React templates. 12 | 13 | 1. Replaces standard HTML attributes such as `class` and `for` to `className` and `htmlFor`. 14 | 2. Incorrectly changes css variables names inside style attribute. 15 | 16 | Solid attempts to stay as close to HTML standards as possible, allowing copy and paste from answers on Stack Overflow or from template builders from your designers. This [site](https://solidjs-community.github.io/html-to-solidjsx) brings that goal even closer by converting void elements(`
`) to self-closing(`
`), while also providing customizations such as the option to camelCase attributes or having style attribute value set as a CSS object or string. 17 | 18 | ## Credits / Technologies used 19 | 20 | - [solid-start](https://start.solidjs.com/): The meta-framework 21 | - [solid-js](https://github.com/solidjs/solid/): The view library 22 | - [codemirror](https://codemirror.net/): The in-browser code editor 23 | - [solid-codemirror](https://github.com/riccardoperra/solid-codemirror): The SolidJS bindings for codemirror 24 | - [htmltojsx](https://github.com/reactjs/react-magic/blob/master/README-htmltojsx.md)(modified for Solid JSX compatiblity): The HTML to JSX converter 25 | - [UnoCSS](https://uno.antfu.me/): The CSS framework 26 | - [solid-primitives](https://github.com/solidjs-community/solid-primitives): The utilities/primitives 27 | - [vite](https://vitejs.dev/): The module bundler 28 | - [pnpm](https://pnpm.js.org/): The package manager 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "html-to-solidjsx", 3 | "scripts": { 4 | "dev": "solid-start dev", 5 | "build": "solid-start build", 6 | "start": "solid-start start" 7 | }, 8 | "type": "module", 9 | "devDependencies": { 10 | "@types/node": "^18.11.18", 11 | "esbuild": "^0.14.54", 12 | "postcss": "^8.4.21", 13 | "typescript": "^4.9.4", 14 | "vite": "^4.0.3" 15 | }, 16 | "dependencies": { 17 | "@codemirror/lang-html": "^6.4.0", 18 | "@codemirror/lang-javascript": "^6.1.2", 19 | "@codemirror/language": "^6.3.1", 20 | "@codemirror/state": "^6.1.4", 21 | "@codemirror/view": "^6.7.1", 22 | "@floating-ui/dom": "^1.1.1", 23 | "@lezer/highlight": "^1.1.3", 24 | "@solid-primitives/clipboard": "^1.5.0", 25 | "@solid-primitives/media": "^2.0.6", 26 | "@solid-primitives/platform": "^0.0.103", 27 | "@solid-primitives/resize-observer": "^2.0.9", 28 | "@solid-primitives/scheduled": "^1.2.1", 29 | "@solidjs/meta": "^0.28.6", 30 | "@solidjs/router": "^0.8.3", 31 | "@unocss/preset-wind": "^0.49.2", 32 | "@unocss/reset": "^0.49.2", 33 | "@unocss/transformer-variant-group": "^0.49.4", 34 | "codemirror": "^6.0.1", 35 | "solid-codemirror": "^2.2.1", 36 | "solid-dismiss": "^1.6.5", 37 | "solid-floating-ui": "^0.2.0", 38 | "solid-icons": "^1.0.4", 39 | "solid-js": "^1.7.12", 40 | "solid-start": "^0.3.6", 41 | "solid-start-static": "^0.3.6", 42 | "undici": "^5.15.1", 43 | "unocss": "0.54.3" 44 | }, 45 | "packageManager": "pnpm@8.6.0", 46 | "engines": { 47 | "node": ">=18.0.0", 48 | "pnpm": ">=8.6.0" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /public/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/favicons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/favicons/android-chrome-512x512.png -------------------------------------------------------------------------------- /public/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /public/favicons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /public/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /public/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/favicons/favicon.ico -------------------------------------------------------------------------------- /public/favicons/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/favicons/icon-192x192.png -------------------------------------------------------------------------------- /public/favicons/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/favicons/icon-256x256.png -------------------------------------------------------------------------------- /public/favicons/icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/favicons/icon-384x384.png -------------------------------------------------------------------------------- /public/favicons/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/favicons/icon-512x512.png -------------------------------------------------------------------------------- /public/favicons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/favicons/mstile-150x150.png -------------------------------------------------------------------------------- /public/fonts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/.DS_Store -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Black-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Black-Italic.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Black-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Black-Italic.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Black-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Black-Italic.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Black.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Black.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Black.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Black.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Black.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Bold-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Bold-Italic.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Bold-italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Bold-italic.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Bold-italic.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Bold.eot -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Bold.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Bold.ttf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Bold.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Bold.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Light-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Light-Italic.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Light-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Light-Italic.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Light-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Light-Italic.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Light.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Light.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Light.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Medium-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Medium-Italic.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Medium-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Medium-Italic.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Medium-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Medium-Italic.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Medium.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Medium.eot -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Medium.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Medium.ttf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Medium.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Medium.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Regular-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Regular-Italic.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Regular-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Regular-Italic.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Regular-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Regular-Italic.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Regular.eot -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Regular.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Regular.ttf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Regular.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Regular.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Thin-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Thin-Italic.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Thin-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Thin-Italic.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Thin-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Thin-Italic.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Thin.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Thin.eot -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Thin.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Thin.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Thin.ttf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Thin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Thin.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Thin.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Ultra-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Ultra-Italic.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Ultra-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Ultra-Italic.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Ultra-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Ultra-Italic.woff2 -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Ultra.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Ultra.otf -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Ultra.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Ultra.woff -------------------------------------------------------------------------------- /public/fonts/Gordita/Gordita-Ultra.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/fonts/Gordita/Gordita-Ultra.woff2 -------------------------------------------------------------------------------- /public/og.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/html-to-solidjsx/b77b123576d78a7096e642777cad8b204c90d89f/public/og.png -------------------------------------------------------------------------------- /src/components/ActionsPanel/ActionsPanel.tsx: -------------------------------------------------------------------------------- 1 | import { autoUpdate, flip, offset, shift } from "@floating-ui/dom"; 2 | import Dismiss from "solid-dismiss"; 3 | import { useFloating } from "solid-floating-ui"; 4 | import { createMemo, createSignal, For, JSX, ParentComponent } from "solid-js"; 5 | import { Dynamic } from "solid-js/web"; 6 | import { setStore, store } from "../../store"; 7 | import CopyJSXButton from "../CopyJSXButton"; 8 | import SplitPanelColumns from "../Icons/SplitPanelColumns"; 9 | import SplitPanelRows from "../Icons/SplitPanelRows"; 10 | import TogglePanelButton from "./TogglePanelButton"; 11 | 12 | const ActionsPanel = () => { 13 | const list: { 14 | id: string; 15 | text: string; 16 | Icon?: () => JSX.Element; 17 | }[] = [ 18 | { 19 | id: "rows", 20 | text: "HTML and JSX rows", 21 | Icon: SplitPanelRows, 22 | }, 23 | { 24 | id: "columns", 25 | text: "HTML and JSX columns", 26 | Icon: SplitPanelColumns, 27 | }, 28 | { 29 | id: "html", 30 | text: "HTML only", 31 | Icon: () => HTML, 32 | }, 33 | { 34 | id: "jsx", 35 | text: "JSX only", 36 | Icon: () => JSX, 37 | }, 38 | ]; 39 | 40 | const [reference, setReference] = createSignal(); 41 | const [floating, setFloating] = createSignal(); 42 | const [open, setOpen] = createSignal(false); 43 | let floatingUl!: HTMLUListElement; 44 | const position = useFloating(reference, floating, { 45 | whileElementsMounted: autoUpdate, 46 | placement: "bottom-start", 47 | middleware: [offset(4), flip(), shift()], 48 | }); 49 | 50 | const selectedItemFromList = createMemo(() => { 51 | const item = list.find(({ id }) => id === store.layout); 52 | return item; 53 | }); 54 | 55 | return ( 56 |
60 | 61 |
62 | 75 | 89 |
98 |
    99 | 100 | {({ id, text, Icon }) => ( 101 |
  • { 106 | setOpen(false); 107 | setStore("layout", id as "jsx"); 108 | }} 109 | onKeyDown={(e) => { 110 | if (e.key !== "Enter") return; 111 | setOpen(false); 112 | setStore("layout", id as "jsx"); 113 | }} 114 | > 115 |
    122 |
    {Icon && }
    123 | {text} 124 |
    125 |
  • 126 | )} 127 |
    128 |
129 |
130 |
131 |
132 | 142 |
143 |
144 | 145 |
146 |
147 |
148 | ); 149 | }; 150 | 151 | const IconText: ParentComponent = (props) => { 152 | return ( 153 |
154 | 155 | {props.children} 156 | 157 |
158 | ); 159 | }; 160 | 161 | export default ActionsPanel; 162 | -------------------------------------------------------------------------------- /src/components/ActionsPanel/TogglePanelButton.tsx: -------------------------------------------------------------------------------- 1 | import { createMediaQuery } from "@solid-primitives/media"; 2 | import { createEffect, createSignal, on } from "solid-js"; 3 | import { onTransitionend } from "../../utils/onTransitionend"; 4 | import XIcon from "../Icons/XIcon"; 5 | import SettingsIcon from "../Icons/SettingsIcon"; 6 | 7 | const TogglePanelButton = () => { 8 | const vwMax850px = createMediaQuery("(max-width:850px)"); 9 | const [close, setClose] = createSignal(false); 10 | let toggleBtnXIconEl!: SVGSVGElement; 11 | let toggleBtnSettingsIconEl!: HTMLDivElement; 12 | 13 | const queryEls = () => { 14 | const actionsPanelEl = document.getElementById("actions-panel")!; 15 | const settingsPanelContainerEl = document.getElementById("settings-panel-container")!; 16 | const configContainerEl = document.getElementById("config-container")!; 17 | 18 | return { 19 | actionsPanelEl, 20 | settingsPanelContainerEl, 21 | configContainerEl, 22 | }; 23 | }; 24 | 25 | const openPanel = () => { 26 | const { settingsPanelContainerEl, configContainerEl } = queryEls(); 27 | configContainerEl.style.display = ""; 28 | settingsPanelContainerEl.style.height = ""; 29 | settingsPanelContainerEl.style.transition = "height 150ms"; 30 | toggleBtnXIconEl.style.transform = "scale(1)"; 31 | toggleBtnXIconEl.style.transition = "transform 350ms"; 32 | toggleBtnSettingsIconEl.style.transform = "scale(0)"; 33 | toggleBtnSettingsIconEl.style.transition = "transform 350ms"; 34 | 35 | onTransitionend(settingsPanelContainerEl, () => { 36 | settingsPanelContainerEl.style.minHeight = ""; 37 | settingsPanelContainerEl.style.transition = ""; 38 | }); 39 | }; 40 | 41 | const closePanel = () => { 42 | const { actionsPanelEl, settingsPanelContainerEl, configContainerEl } = queryEls(); 43 | const actionsPanelHeight = actionsPanelEl.getBoundingClientRect().height; 44 | settingsPanelContainerEl.style.height = `${actionsPanelHeight}px`; 45 | settingsPanelContainerEl.style.minHeight = "auto"; 46 | settingsPanelContainerEl.style.transition = "height 150ms"; 47 | toggleBtnXIconEl.style.transform = "scale(0)"; 48 | toggleBtnXIconEl.style.transition = "transform 350ms"; 49 | toggleBtnSettingsIconEl.style.opacity = "1"; 50 | toggleBtnSettingsIconEl.style.transform = "scale(0)"; 51 | requestAnimationFrame(() => { 52 | requestAnimationFrame(() => { 53 | toggleBtnSettingsIconEl.style.transform = "scale(1)"; 54 | toggleBtnSettingsIconEl.style.transition = "transform 350ms"; 55 | }); 56 | }); 57 | 58 | onTransitionend(settingsPanelContainerEl, () => { 59 | settingsPanelContainerEl.style.transition = ""; 60 | configContainerEl.style.display = "none"; 61 | }); 62 | }; 63 | 64 | createEffect( 65 | on( 66 | close, 67 | (close) => { 68 | if (close) { 69 | closePanel(); 70 | return; 71 | } 72 | openPanel(); 73 | }, 74 | { defer: true }, 75 | ), 76 | ); 77 | 78 | createEffect( 79 | on( 80 | vwMax850px, 81 | (vwMax850px) => { 82 | if (!close()) { 83 | return; 84 | } 85 | 86 | const run = () => { 87 | const { actionsPanelEl, settingsPanelContainerEl, configContainerEl } = queryEls(); 88 | 89 | const actionsPanelHeight = actionsPanelEl.getBoundingClientRect().height; 90 | 91 | if (vwMax850px) { 92 | settingsPanelContainerEl.style.height = `${actionsPanelHeight}px`; 93 | settingsPanelContainerEl.style.minHeight = "auto"; 94 | configContainerEl.style.display = "none"; 95 | } else { 96 | settingsPanelContainerEl.style.height = ""; 97 | settingsPanelContainerEl.style.minHeight = ""; 98 | configContainerEl.style.display = ""; 99 | } 100 | }; 101 | 102 | setTimeout(run, vwMax850px ? 100 : 0); 103 | }, 104 | { defer: true }, 105 | ), 106 | ); 107 | 108 | return ( 109 | 122 | ); 123 | }; 124 | 125 | export default TogglePanelButton; 126 | -------------------------------------------------------------------------------- /src/components/ConfigPanel/ConfigPanel.tsx: -------------------------------------------------------------------------------- 1 | import { $TRACK, createEffect, createSignal, For, on, onMount } from "solid-js"; 2 | import { createStore, produce } from "solid-js/store"; 3 | import { HTMLtoJSXConfig } from "../../lib/html-to-jsx"; 4 | import { ConfigKey, defaultConfig, setStore, store, TJSXConfig } from "../../store"; 5 | import { debounce } from "@solid-primitives/scheduled"; 6 | import Select from "./Select"; 7 | import Input from "./Input"; 8 | import Toggle from "./Toggle"; 9 | 10 | const ConfigPanel = () => { 11 | const [configMap, setConfigMap] = createStore<{ 12 | [key in keyof (HTMLtoJSXConfig & { prefixSVGIds?: string })]: { 13 | type: "input" | "checkbox" | "select"; 14 | name: string; 15 | value: string | boolean; 16 | tooltip?: boolean; 17 | options?: string[]; 18 | disabled?: boolean; 19 | disables?: { key: string; isValue: string | boolean }[]; 20 | filter?: RegExp; 21 | placeholder?: string; 22 | maskType?: "character-count"; 23 | }; 24 | }>({ 25 | attributeValueString: { 26 | type: "checkbox", 27 | name: "Attribute Value String", 28 | value: store.config.attributeValueString!, 29 | }, 30 | camelCaseAttributes: { 31 | type: "checkbox", 32 | name: "Camel Case Attributes", 33 | value: store.config.camelCaseAttributes!, 34 | }, 35 | styleAttribute: { 36 | type: "select", 37 | name: "Style Attribute", 38 | options: ["css-object", "css-string"], 39 | value: store.config.styleAttribute!, 40 | }, 41 | wrapperNode: { 42 | type: "select", 43 | name: "Wrapper Node", 44 | options: ["none", "div", "fragment"], 45 | value: store.config.wrapperNode!, 46 | }, 47 | component: { 48 | type: "select", 49 | name: "Component", 50 | options: ["arrow-function", "function", "none"], 51 | disables: [ 52 | { key: "componentName", isValue: "none" }, 53 | { key: "exportComponent", isValue: "none" }, 54 | ], 55 | value: store.config.component!, 56 | }, 57 | componentName: { 58 | type: "input", 59 | name: "Component Name", 60 | disabled: store.config.component === "none", 61 | filter: /\s/g, 62 | value: store.config.componentName!, 63 | }, 64 | preTagWrapTemplateLiterals: { 65 | type: "checkbox", 66 | name: "
 tag use template literals",
 67 |       value: store.config.preTagWrapTemplateLiterals!,
 68 |     },
 69 |     stripStyleTag: {
 70 |       type: "checkbox",
 71 |       name: "Remove 
56 | `;
57 | }
58 | 
59 | function getJSXText() {
60 |   return `
61 | {/* Solid is solid */}
62 | 

SolidJSX

63 |
64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 80 | `; 81 | } 82 | -------------------------------------------------------------------------------- /src/utils/hasNonOverlayScrollbarY.ts: -------------------------------------------------------------------------------- 1 | export const hasNonOverlayScrollbarY = (el: HTMLElement) => { 2 | const { offsetWidth, clientWidth } = el; 3 | if (clientWidth === 0) return false; 4 | 5 | return clientWidth !== offsetWidth; 6 | }; 7 | -------------------------------------------------------------------------------- /src/utils/onTransitionend.ts: -------------------------------------------------------------------------------- 1 | export const onTransitionend = (el: HTMLElement, cb: () => void) => { 2 | el.addEventListener( 3 | "transitionend", 4 | (e) => { 5 | if (e.currentTarget !== e.target) return; 6 | cb(); 7 | }, 8 | { once: true } 9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /src/utils/reflow.ts: -------------------------------------------------------------------------------- 1 | export const reflow = () => document.body.clientWidth; 2 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "esModuleInterop": true, 5 | "target": "ESNext", 6 | "module": "ESNext", 7 | "moduleResolution": "node", 8 | "jsxImportSource": "solid-js", 9 | "jsx": "preserve", 10 | "strict": true, 11 | "types": ["solid-start/env"], 12 | "baseUrl": "./", 13 | "paths": { 14 | "~/*": ["./src/*"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /unocss.config.ts: -------------------------------------------------------------------------------- 1 | import { presetWind, theme } from "@unocss/preset-wind"; 2 | import { 3 | transformerDirectives, 4 | defineConfig, 5 | transformerVariantGroup, 6 | } from "unocss"; 7 | 8 | const parseValue = (value: string) => { 9 | return value.replace(/_/g, " "); 10 | }; 11 | // mask-image-[linear-gradient(135deg,#000_calc(50%_-_1px),transparent_calc(50%_-_1px))] 12 | export default defineConfig({ 13 | rules: [ 14 | [ 15 | /^bg-image-\[(.+)\]$/, 16 | ([_, d]) => ({ "background-image": parseValue(d) }), 17 | ], 18 | [/^transition-prop-\[(.+)\]$/, ([_, d]) => ({ transition: parseValue(d) })], 19 | [ 20 | /^mask-image-\[(.+)\]$/, 21 | ([_, d]) => ({ 22 | "-webkit-mask-image": parseValue(d), 23 | "mask-image": parseValue(d), 24 | }), 25 | ], 26 | ], 27 | theme: { 28 | breakpoints: { 29 | ...theme.breakpoints, 30 | md: "850px", 31 | }, 32 | colors: { 33 | brand: { 34 | default: "#2c4f7c", 35 | dark: "#335d92", 36 | medium: "#446b9e", 37 | light: "#4f88c6", 38 | }, 39 | solid: { 40 | default: "#2c4f7c", 41 | darkbg: "#222222", 42 | darkLighterBg: "#444444", 43 | darkdefault: "#b8d7ff", 44 | darkgray: "#252525", 45 | gray: "#414042", 46 | mediumgray: "#9d9d9d", 47 | lightgray: "#f3f5f7", 48 | dark: "#07254A", 49 | medium: "#446b9e", 50 | light: "#4f88c6", 51 | accent: "#0cdc73", 52 | secondaccent: "#0dfc85", 53 | }, 54 | other: "#1e1e1e", 55 | }, 56 | fontFamily: { 57 | sans: "Gordita, " + theme.fontFamily!.sans, 58 | }, 59 | }, 60 | presets: [presetWind()], 61 | transformers: [transformerDirectives(), transformerVariantGroup()], 62 | }); 63 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import solid from "solid-start/vite"; 2 | import { defineConfig } from "vite"; 3 | import UnoCss from "unocss/vite"; 4 | 5 | export default defineConfig({ 6 | base: "/html-to-solidjsx/", 7 | optimizeDeps: { 8 | // Add both @codemirror/state and @codemirror/view to included deps to optimize 9 | include: ["@codemirror/state", "@codemirror/view"], 10 | }, 11 | plugins: [ 12 | solid({ 13 | adapter: "solid-start-static", 14 | }), 15 | UnoCss(), 16 | ], 17 | }); 18 | --------------------------------------------------------------------------------