From 90a8d92b2f5f4673452c6f3e91cf7c02311d62db Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Mon, 17 Mar 2025 17:56:45 +0100 Subject: [PATCH] [refactor] Convert playground to an NPM workspace (#16806) ## Summary This is prep-work for the Red Knot playground. We'll have two playgrounds, one for Red Knot and Ruff. I want to share some components between the two, a "shared" NPM package in a local workspace is a great fit for that. I also want to share the dev dependencies and dev scripts. Again, NPM workspaces are great for that. This PR also sets up a CI workflow for the playground to prevent surprises during the release. ## Test Plan CI, local `npm install`, `npm start`, ... I verified that the new CI step fails if there's a typescript or formatting error. * [Deployment test run](https://github.com/astral-sh/ruff/actions/runs/13904914480/job/38905524353) --- .github/workflows/ci.yaml | 46 +++ .github/workflows/publish-playground.yml | 15 +- playground/.prettierignore | 3 +- playground/.prettierrc.json | 3 - playground/README.md | 7 +- playground/package-lock.json | 341 +++++++++++++++++- playground/package.json | 31 +- playground/{ => ruff}/index.html | 0 playground/ruff/package.json | 34 ++ playground/{ => ruff}/postcss.config.cjs | 2 +- .../{ => ruff}/src/Editor/AstralButton.tsx | 0 playground/{ => ruff}/src/Editor/Chrome.tsx | 2 +- .../{ => ruff}/src/Editor/Diagnostics.tsx | 2 +- playground/{ => ruff}/src/Editor/Editor.tsx | 2 +- .../{ => ruff}/src/Editor/ErrorMessage.tsx | 0 playground/{ => ruff}/src/Editor/Header.tsx | 0 playground/{ => ruff}/src/Editor/Icons.tsx | 0 .../{ => ruff}/src/Editor/PrimarySideBar.tsx | 0 .../{ => ruff}/src/Editor/RepoButton.tsx | 0 .../{ => ruff}/src/Editor/ResizeHandle.tsx | 0 .../{ => ruff}/src/Editor/SecondaryPanel.tsx | 0 .../src/Editor/SecondarySideBar.tsx | 0 .../{ => ruff}/src/Editor/SettingsEditor.tsx | 0 .../{ => ruff}/src/Editor/ShareButton.tsx | 0 playground/{ => ruff}/src/Editor/SideBar.tsx | 0 .../{ => ruff}/src/Editor/SourceEditor.tsx | 2 +- .../{ => ruff}/src/Editor/ThemeButton.tsx | 0 .../{ => ruff}/src/Editor/VersionTag.tsx | 0 playground/{ => ruff}/src/Editor/api.ts | 0 playground/{ => ruff}/src/Editor/index.tsx | 0 playground/{ => ruff}/src/Editor/settings.ts | 0 .../{ => ruff}/src/Editor/setupMonaco.tsx | 2 +- playground/{ => ruff}/src/Editor/theme.ts | 0 playground/{ => ruff}/src/Editor/utils.ts | 0 playground/{ => ruff}/src/constants.ts | 0 playground/ruff/src/index.css | 122 +++++++ playground/{ => ruff}/src/main.tsx | 0 playground/{ => ruff}/src/third-party.d.ts | 0 playground/{ => ruff}/src/vite-env.d.ts | 0 playground/{ => ruff}/vite.config.ts | 0 playground/src/index.css | 106 ------ playground/tsconfig.json | 2 +- playground/tsconfig.node.json | 2 +- 43 files changed, 558 insertions(+), 166 deletions(-) delete mode 100644 playground/.prettierrc.json rename playground/{ => ruff}/index.html (100%) create mode 100644 playground/ruff/package.json rename playground/{ => ruff}/postcss.config.cjs (55%) rename playground/{ => ruff}/src/Editor/AstralButton.tsx (100%) rename playground/{ => ruff}/src/Editor/Chrome.tsx (98%) rename playground/{ => ruff}/src/Editor/Diagnostics.tsx (98%) rename playground/{ => ruff}/src/Editor/Editor.tsx (99%) rename playground/{ => ruff}/src/Editor/ErrorMessage.tsx (100%) rename playground/{ => ruff}/src/Editor/Header.tsx (100%) rename playground/{ => ruff}/src/Editor/Icons.tsx (100%) rename playground/{ => ruff}/src/Editor/PrimarySideBar.tsx (100%) rename playground/{ => ruff}/src/Editor/RepoButton.tsx (100%) rename playground/{ => ruff}/src/Editor/ResizeHandle.tsx (100%) rename playground/{ => ruff}/src/Editor/SecondaryPanel.tsx (100%) rename playground/{ => ruff}/src/Editor/SecondarySideBar.tsx (100%) rename playground/{ => ruff}/src/Editor/SettingsEditor.tsx (100%) rename playground/{ => ruff}/src/Editor/ShareButton.tsx (100%) rename playground/{ => ruff}/src/Editor/SideBar.tsx (100%) rename playground/{ => ruff}/src/Editor/SourceEditor.tsx (99%) rename playground/{ => ruff}/src/Editor/ThemeButton.tsx (100%) rename playground/{ => ruff}/src/Editor/VersionTag.tsx (100%) rename playground/{ => ruff}/src/Editor/api.ts (100%) rename playground/{ => ruff}/src/Editor/index.tsx (100%) rename playground/{ => ruff}/src/Editor/settings.ts (100%) rename playground/{ => ruff}/src/Editor/setupMonaco.tsx (99%) rename playground/{ => ruff}/src/Editor/theme.ts (100%) rename playground/{ => ruff}/src/Editor/utils.ts (100%) rename playground/{ => ruff}/src/constants.ts (100%) create mode 100644 playground/ruff/src/index.css rename playground/{ => ruff}/src/main.tsx (100%) rename playground/{ => ruff}/src/third-party.d.ts (100%) rename playground/{ => ruff}/src/vite-env.d.ts (100%) rename playground/{ => ruff}/vite.config.ts (100%) delete mode 100644 playground/src/index.css diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1e5fbf7db7..14baec19eb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,6 +36,9 @@ jobs: code: ${{ steps.check_code.outputs.changed }} # Flag that is raised when any code that affects the fuzzer is changed fuzz: ${{ steps.check_fuzzer.outputs.changed }} + + # Flag that is set to "true" when code related to the playground changes. + playground: ${{ steps.check_playground.outputs.changed }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: @@ -87,6 +90,15 @@ jobs: echo "changed=true" >> "$GITHUB_OUTPUT" fi + - name: Check if there was any playground related change + id: check_playground + run: | + if git diff --quiet ${{ github.event.pull_request.base.sha || 'origin/main' }}...HEAD -- ':playground/**'; then + echo "changed=false" >> "$GITHUB_OUTPUT" + else + echo "changed=true" >> "$GITHUB_OUTPUT" + fi + cargo-fmt: name: "cargo fmt" runs-on: ubuntu-latest @@ -701,6 +713,40 @@ jobs: just test + check-playground: + name: "check playground" + runs-on: ubuntu-latest + timeout-minutes: 5 + needs: + - determine_changes + if: ${{ (needs.determine_changes.outputs.playground == 'true') }} + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + persist-credentials: false + - name: "Install Rust toolchain" + run: rustup target add wasm32-unknown-unknown + - uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2 + - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4 + with: + node-version: 22 + cache: "npm" + cache-dependency-path: playground/package-lock.json + - uses: jetli/wasm-bindgen-action@20b33e20595891ab1a0ed73145d8a21fc96e7c29 # v0.2.0 + - name: "Install Node dependencies" + run: npm ci + working-directory: playground + - name: "Build Ruff playground" + run: npm run dev:build --workspace ruff-playground + working-directory: playground + # Requires a build for ruff_wasm to exist + - name: "Run TypeScript checks" + run: npm run check + working-directory: playground + - name: "Check formatting" + run: npm run fmt:check + working-directory: playground + benchmarks: runs-on: ubuntu-24.04 needs: determine_changes diff --git a/.github/workflows/publish-playground.yml b/.github/workflows/publish-playground.yml index b0698b9484..e901efe1ae 100644 --- a/.github/workflows/publish-playground.yml +++ b/.github/workflows/publish-playground.yml @@ -31,24 +31,19 @@ jobs: run: rustup target add wasm32-unknown-unknown - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4 with: - node-version: 20 + node-version: 22 cache: "npm" cache-dependency-path: playground/package-lock.json - - uses: jetli/wasm-pack-action@0d096b08b4e5a7de8c28de67e11e945404e9eefa # v0.4.0 - with: - version: v0.13.1 - uses: jetli/wasm-bindgen-action@20b33e20595891ab1a0ed73145d8a21fc96e7c29 # v0.2.0 - - name: "Run wasm-pack" - run: wasm-pack build --target web --out-dir ../../playground/src/pkg crates/ruff_wasm - name: "Install Node dependencies" run: npm ci working-directory: playground + - name: "Build Ruff playground" + run: npm run build --workspace ruff-playground + working-directory: playground - name: "Run TypeScript checks" run: npm run check working-directory: playground - - name: "Build JavaScript bundle" - run: npm run build - working-directory: playground - name: "Deploy to Cloudflare Pages" if: ${{ env.CF_API_TOKEN_EXISTS == 'true' }} uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1 @@ -56,4 +51,4 @@ jobs: apiToken: ${{ secrets.CF_API_TOKEN }} accountId: ${{ secrets.CF_ACCOUNT_ID }} # `github.head_ref` is only set during pull requests and for manual runs or tags we use `main` to deploy to production - command: pages deploy playground/dist --project-name=ruff-playground --branch ${{ github.head_ref || 'main' }} --commit-hash ${GITHUB_SHA} + command: pages deploy playground/ruff/dist --project-name=ruff-playground --branch ${{ github.head_ref || 'main' }} --commit-hash ${GITHUB_SHA} diff --git a/playground/.prettierignore b/playground/.prettierignore index e1fc035dff..67682a03dd 100644 --- a/playground/.prettierignore +++ b/playground/.prettierignore @@ -1,2 +1,3 @@ **.md -pkg +ruff/dist +ruff/ruff_wasm diff --git a/playground/.prettierrc.json b/playground/.prettierrc.json deleted file mode 100644 index bf357fbbc0..0000000000 --- a/playground/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "trailingComma": "all" -} diff --git a/playground/README.md b/playground/README.md index e29aeef9dd..8259121456 100644 --- a/playground/README.md +++ b/playground/README.md @@ -4,11 +4,8 @@ In-browser playground for Ruff. Available [https://play.ruff.rs/](https://play.r ## Getting started -In order to build the WASM module install [`wasm-pack`](https://rustwasm.github.io/wasm-pack/). - -Next, build the WASM module by running `npm run build:wasm` (release build) or `npm run dev:wasm` (debug build) from the `./playground` directory. - -Finally, install TypeScript dependencies with `npm install`, and run the development server with `npm run dev`. +Install the NPM dependencies with `npm install`, and run, and run the development server with `npm start`. +You may need to restart the server after making changes to Ruff to re-build the WASM module. To run the datastore, which is based on [Workers KV](https://developers.cloudflare.com/workers/runtime-apis/kv/), install the [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/install-and-update/), diff --git a/playground/package-lock.json b/playground/package-lock.json index 6e9635dbee..f8de54c8c5 100644 --- a/playground/package-lock.json +++ b/playground/package-lock.json @@ -7,16 +7,9 @@ "": { "name": "playground", "version": "0.0.0", - "dependencies": { - "@monaco-editor/react": "^4.4.6", - "classnames": "^2.3.2", - "lz-string": "^1.5.0", - "monaco-editor": "^0.52.0", - "react": "^19.0.0", - "react-dom": "^19.0.0", - "react-resizable-panels": "^2.0.0", - "smol-toml": "^1.3.0" - }, + "workspaces": [ + "ruff" + ], "devDependencies": { "@eslint/js": "^9.21.0", "@tailwindcss/postcss": "^4.0.9", @@ -32,7 +25,8 @@ "tailwindcss": "^4.0.9", "typescript": "^5.1.6", "typescript-eslint": "^8.25.0", - "vite": "^6.0.0" + "vite": "^6.0.0", + "wasm-pack": "^0.13.1" } }, "node_modules/@alloc/quick-lru": { @@ -1975,12 +1969,37 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/axios": { + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.8" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/binary-install": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/binary-install/-/binary-install-1.1.0.tgz", + "integrity": "sha512-rkwNGW+3aQVSZoD0/o3mfPN6Yxh3Id0R/xzTVBVVpGNlVz8EGwusksxRlbk/A5iKTZt9zkMn3qIqmAt3vpfbzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "axios": "^0.26.1", + "rimraf": "^3.0.2", + "tar": "^6.1.11" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -2076,6 +2095,16 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/classnames": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", @@ -3055,6 +3084,27 @@ "dev": true, "license": "ISC" }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -3064,6 +3114,39 @@ "is-callable": "^1.1.3" } }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -3160,6 +3243,28 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -3172,6 +3277,30 @@ "node": ">=10.13.0" } }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/globals": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", @@ -3345,6 +3474,25 @@ "node": ">=0.8.19" } }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, "node_modules/internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -4194,6 +4342,56 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/monaco-editor": { "version": "0.52.2", "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.52.2.tgz", @@ -4347,6 +4545,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -4434,6 +4642,16 @@ "node": ">=8" } }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -4683,6 +4901,23 @@ "node": ">=0.10.0" } }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/rollup": { "version": "4.34.6", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.6.tgz", @@ -4722,6 +4957,14 @@ "fsevents": "~2.3.2" } }, + "node_modules/ruff_wasm": { + "resolved": "ruff/ruff_wasm", + "link": true + }, + "node_modules/ruff-playground": { + "resolved": "ruff", + "link": true + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -5131,6 +5374,24 @@ "node": ">=6" } }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dev": true, + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5395,6 +5656,20 @@ } } }, + "node_modules/wasm-pack": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/wasm-pack/-/wasm-pack-0.13.1.tgz", + "integrity": "sha512-P9exD4YkjpDbw68xUhF3MDm/CC/3eTmmthyG5bHJ56kalxOTewOunxTke4SyF8MTXV6jUtNjXggPgrGmMtczGg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT OR Apache-2.0", + "dependencies": { + "binary-install": "^1.0.1" + }, + "bin": { + "wasm-pack": "run.js" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5507,6 +5782,20 @@ "node": ">=0.10.0" } }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, "node_modules/yaml": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", @@ -5532,6 +5821,36 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "ruff": { + "name": "ruff-playground", + "version": "0.0.0", + "dependencies": { + "@monaco-editor/react": "^4.4.6", + "classnames": "^2.3.2", + "lz-string": "^1.5.0", + "monaco-editor": "^0.52.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-resizable-panels": "^2.0.0", + "ruff_wasm": "file:./ruff_wasm", + "smol-toml": "^1.3.0" + } + }, + "ruff_wasm": { + "version": "0.11.0", + "extraneous": true, + "license": "MIT" + }, + "ruff-wasm": { + "extraneous": true + }, + "ruff/ruff_wasm": { + "version": "0.11.0", + "license": "MIT" + }, + "ruff/ruff-wasm": { + "extraneous": true } } } diff --git a/playground/package.json b/playground/package.json index 122c5fb2d9..c72e56e0a4 100644 --- a/playground/package.json +++ b/playground/package.json @@ -4,25 +4,17 @@ "version": "0.0.0", "type": "module", "scripts": { - "build:wasm": "wasm-pack build ../crates/ruff_wasm --target web --out-dir ../../playground/src/pkg", - "build": "tsc && vite build", "check": "npm run lint && npm run tsc", - "dev": "vite", - "dev:wasm": "wasm-pack build ../crates/ruff_wasm --dev --target web --out-dir ../../playground/src/pkg", "fmt": "prettier --cache -w .", - "lint": "eslint --cache --ext .ts,.tsx src", - "preview": "vite preview", + "fmt:check": "prettier --cache --check .", + "lint": "eslint --cache --ext .ts,.tsx ruff/src", "tsc": "tsc" }, - "dependencies": { - "@monaco-editor/react": "^4.4.6", - "classnames": "^2.3.2", - "lz-string": "^1.5.0", - "monaco-editor": "^0.52.0", - "react": "^19.0.0", - "react-dom": "^19.0.0", - "react-resizable-panels": "^2.0.0", - "smol-toml": "^1.3.0" + "workspaces": [ + "ruff" + ], + "prettier": { + "trailingComma": "all" }, "devDependencies": { "@eslint/js": "^9.21.0", @@ -39,12 +31,7 @@ "tailwindcss": "^4.0.9", "typescript": "^5.1.6", "typescript-eslint": "^8.25.0", - "vite": "^6.0.0" - }, - "overrides": { - "@monaco-editor/react": { - "react": "$react", - "react-dom": "$react-dom" - } + "vite": "^6.0.0", + "wasm-pack": "^0.13.1" } } diff --git a/playground/index.html b/playground/ruff/index.html similarity index 100% rename from playground/index.html rename to playground/ruff/index.html diff --git a/playground/ruff/package.json b/playground/ruff/package.json new file mode 100644 index 0000000000..e82e44b401 --- /dev/null +++ b/playground/ruff/package.json @@ -0,0 +1,34 @@ +{ + "name": "ruff-playground", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "prebuild": "npm run build:wasm", + "build": "vite build", + "build:wasm": "wasm-pack build ../../crates/ruff_wasm --target web --out-dir ../../playground/ruff/ruff_wasm", + "dev:wasm": "wasm-pack build ../../crates/ruff_wasm --dev --target web --out-dir ../../playground/ruff/ruff_wasm", + "predev:build": "npm run dev:wasm", + "dev:build": "vite build", + "prestart": "npm run dev:wasm", + "start": "vite", + "preview": "vite preview" + }, + "dependencies": { + "@monaco-editor/react": "^4.4.6", + "classnames": "^2.3.2", + "lz-string": "^1.5.0", + "monaco-editor": "^0.52.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-resizable-panels": "^2.0.0", + "ruff_wasm": "file:./ruff_wasm", + "smol-toml": "^1.3.0" + }, + "overrides": { + "@monaco-editor/react": { + "react": "$react", + "react-dom": "$react-dom" + } + } +} diff --git a/playground/postcss.config.cjs b/playground/ruff/postcss.config.cjs similarity index 55% rename from playground/postcss.config.cjs rename to playground/ruff/postcss.config.cjs index e5640725a9..483f378543 100644 --- a/playground/postcss.config.cjs +++ b/playground/ruff/postcss.config.cjs @@ -1,5 +1,5 @@ module.exports = { plugins: { - '@tailwindcss/postcss': {}, + "@tailwindcss/postcss": {}, }, }; diff --git a/playground/src/Editor/AstralButton.tsx b/playground/ruff/src/Editor/AstralButton.tsx similarity index 100% rename from playground/src/Editor/AstralButton.tsx rename to playground/ruff/src/Editor/AstralButton.tsx diff --git a/playground/src/Editor/Chrome.tsx b/playground/ruff/src/Editor/Chrome.tsx similarity index 98% rename from playground/src/Editor/Chrome.tsx rename to playground/ruff/src/Editor/Chrome.tsx index a898ffb06f..084c12e5b0 100644 --- a/playground/src/Editor/Chrome.tsx +++ b/playground/ruff/src/Editor/Chrome.tsx @@ -3,7 +3,7 @@ import Header from "./Header"; import { persist, persistLocal, restore, stringify } from "./settings"; import { useTheme } from "./theme"; import { default as Editor, Source } from "./Editor"; -import initRuff, { Workspace } from "../pkg"; +import initRuff, { Workspace } from "ruff_wasm"; import { loader } from "@monaco-editor/react"; import { setupMonaco } from "./setupMonaco"; import { DEFAULT_PYTHON_SOURCE } from "../constants"; diff --git a/playground/src/Editor/Diagnostics.tsx b/playground/ruff/src/Editor/Diagnostics.tsx similarity index 98% rename from playground/src/Editor/Diagnostics.tsx rename to playground/ruff/src/Editor/Diagnostics.tsx index 1cb64299c5..4ddb155d8f 100644 --- a/playground/src/Editor/Diagnostics.tsx +++ b/playground/ruff/src/Editor/Diagnostics.tsx @@ -1,4 +1,4 @@ -import { Diagnostic } from "../pkg"; +import { Diagnostic } from "ruff_wasm"; import classNames from "classnames"; import { Theme } from "./theme"; import { useMemo } from "react"; diff --git a/playground/src/Editor/Editor.tsx b/playground/ruff/src/Editor/Editor.tsx similarity index 99% rename from playground/src/Editor/Editor.tsx rename to playground/ruff/src/Editor/Editor.tsx index c48fde8c1c..28a154d4c5 100644 --- a/playground/src/Editor/Editor.tsx +++ b/playground/ruff/src/Editor/Editor.tsx @@ -6,7 +6,7 @@ import { useState, } from "react"; import { Panel, PanelGroup } from "react-resizable-panels"; -import { Diagnostic, Workspace } from "../pkg"; +import { Diagnostic, Workspace } from "ruff_wasm"; import { ErrorMessage } from "./ErrorMessage"; import PrimarySideBar from "./PrimarySideBar"; import { HorizontalResizeHandle, VerticalResizeHandle } from "./ResizeHandle"; diff --git a/playground/src/Editor/ErrorMessage.tsx b/playground/ruff/src/Editor/ErrorMessage.tsx similarity index 100% rename from playground/src/Editor/ErrorMessage.tsx rename to playground/ruff/src/Editor/ErrorMessage.tsx diff --git a/playground/src/Editor/Header.tsx b/playground/ruff/src/Editor/Header.tsx similarity index 100% rename from playground/src/Editor/Header.tsx rename to playground/ruff/src/Editor/Header.tsx diff --git a/playground/src/Editor/Icons.tsx b/playground/ruff/src/Editor/Icons.tsx similarity index 100% rename from playground/src/Editor/Icons.tsx rename to playground/ruff/src/Editor/Icons.tsx diff --git a/playground/src/Editor/PrimarySideBar.tsx b/playground/ruff/src/Editor/PrimarySideBar.tsx similarity index 100% rename from playground/src/Editor/PrimarySideBar.tsx rename to playground/ruff/src/Editor/PrimarySideBar.tsx diff --git a/playground/src/Editor/RepoButton.tsx b/playground/ruff/src/Editor/RepoButton.tsx similarity index 100% rename from playground/src/Editor/RepoButton.tsx rename to playground/ruff/src/Editor/RepoButton.tsx diff --git a/playground/src/Editor/ResizeHandle.tsx b/playground/ruff/src/Editor/ResizeHandle.tsx similarity index 100% rename from playground/src/Editor/ResizeHandle.tsx rename to playground/ruff/src/Editor/ResizeHandle.tsx diff --git a/playground/src/Editor/SecondaryPanel.tsx b/playground/ruff/src/Editor/SecondaryPanel.tsx similarity index 100% rename from playground/src/Editor/SecondaryPanel.tsx rename to playground/ruff/src/Editor/SecondaryPanel.tsx diff --git a/playground/src/Editor/SecondarySideBar.tsx b/playground/ruff/src/Editor/SecondarySideBar.tsx similarity index 100% rename from playground/src/Editor/SecondarySideBar.tsx rename to playground/ruff/src/Editor/SecondarySideBar.tsx diff --git a/playground/src/Editor/SettingsEditor.tsx b/playground/ruff/src/Editor/SettingsEditor.tsx similarity index 100% rename from playground/src/Editor/SettingsEditor.tsx rename to playground/ruff/src/Editor/SettingsEditor.tsx diff --git a/playground/src/Editor/ShareButton.tsx b/playground/ruff/src/Editor/ShareButton.tsx similarity index 100% rename from playground/src/Editor/ShareButton.tsx rename to playground/ruff/src/Editor/ShareButton.tsx diff --git a/playground/src/Editor/SideBar.tsx b/playground/ruff/src/Editor/SideBar.tsx similarity index 100% rename from playground/src/Editor/SideBar.tsx rename to playground/ruff/src/Editor/SideBar.tsx diff --git a/playground/src/Editor/SourceEditor.tsx b/playground/ruff/src/Editor/SourceEditor.tsx similarity index 99% rename from playground/src/Editor/SourceEditor.tsx rename to playground/ruff/src/Editor/SourceEditor.tsx index b5eacfa5fc..0a95f11fb1 100644 --- a/playground/src/Editor/SourceEditor.tsx +++ b/playground/ruff/src/Editor/SourceEditor.tsx @@ -12,7 +12,7 @@ import { Range, } from "monaco-editor"; import { useCallback, useEffect, useRef } from "react"; -import { Diagnostic } from "../pkg"; +import { Diagnostic } from "ruff_wasm"; import { Theme } from "./theme"; import CodeActionProvider = languages.CodeActionProvider; import IStandaloneCodeEditor = editor.IStandaloneCodeEditor; diff --git a/playground/src/Editor/ThemeButton.tsx b/playground/ruff/src/Editor/ThemeButton.tsx similarity index 100% rename from playground/src/Editor/ThemeButton.tsx rename to playground/ruff/src/Editor/ThemeButton.tsx diff --git a/playground/src/Editor/VersionTag.tsx b/playground/ruff/src/Editor/VersionTag.tsx similarity index 100% rename from playground/src/Editor/VersionTag.tsx rename to playground/ruff/src/Editor/VersionTag.tsx diff --git a/playground/src/Editor/api.ts b/playground/ruff/src/Editor/api.ts similarity index 100% rename from playground/src/Editor/api.ts rename to playground/ruff/src/Editor/api.ts diff --git a/playground/src/Editor/index.tsx b/playground/ruff/src/Editor/index.tsx similarity index 100% rename from playground/src/Editor/index.tsx rename to playground/ruff/src/Editor/index.tsx diff --git a/playground/src/Editor/settings.ts b/playground/ruff/src/Editor/settings.ts similarity index 100% rename from playground/src/Editor/settings.ts rename to playground/ruff/src/Editor/settings.ts diff --git a/playground/src/Editor/setupMonaco.tsx b/playground/ruff/src/Editor/setupMonaco.tsx similarity index 99% rename from playground/src/Editor/setupMonaco.tsx rename to playground/ruff/src/Editor/setupMonaco.tsx index 9eaf2ccb44..c7d65eed4a 100644 --- a/playground/src/Editor/setupMonaco.tsx +++ b/playground/ruff/src/Editor/setupMonaco.tsx @@ -3,7 +3,7 @@ */ import { Monaco } from "@monaco-editor/react"; -import schema from "../../../ruff.schema.json"; +import schema from "../../../../ruff.schema.json"; export const WHITE = "#ffffff"; export const RADIATE = "#d7ff64"; diff --git a/playground/src/Editor/theme.ts b/playground/ruff/src/Editor/theme.ts similarity index 100% rename from playground/src/Editor/theme.ts rename to playground/ruff/src/Editor/theme.ts diff --git a/playground/src/Editor/utils.ts b/playground/ruff/src/Editor/utils.ts similarity index 100% rename from playground/src/Editor/utils.ts rename to playground/ruff/src/Editor/utils.ts diff --git a/playground/src/constants.ts b/playground/ruff/src/constants.ts similarity index 100% rename from playground/src/constants.ts rename to playground/ruff/src/constants.ts diff --git a/playground/ruff/src/index.css b/playground/ruff/src/index.css new file mode 100644 index 0000000000..9a3672ab3f --- /dev/null +++ b/playground/ruff/src/index.css @@ -0,0 +1,122 @@ +@import "tailwindcss"; + +@custom-variant dark (&:is(.dark *)); + +@theme { + --color-ayu-accent: #ffac2f; + + --color-ayu-background: #f8f9fa; + --color-ayu-background-dark: #0b0e14; + + --color-black: #261230; + --color-white: #ffffff; + --color-radiate: #d7ff64; + --color-flare: #6340ac; + --color-rock: #78876e; + --color-galaxy: #261230; + --color-space: #30173d; + --color-comet: #6f5d6f; + --color-cosmic: #de5fe9; + --color-sun: #ffac2f; + --color-electron: #46ebe1; + --color-aurora: #46eb74; + --color-constellation: #5f6de9; + --color-neutron: #cff3cf; + --color-proton: #f6afbc; + --color-nebula: #cdcbfb; + --color-supernova: #f1aff6; + --color-starlight: #f4f4f1; + --color-lunar: #fbf2fc; + --color-asteroid: #e3cee3; + --color-crater: #f0dfdf; + + --font-heading: + Alliance Platt, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, + Arial, monospace, Apple Color Emoji, Segoe UI Emoji; + --font-body: + Alliance Text, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, + sans-serif, Apple Color Emoji, Segoe UI Emoji; + --font-mono: Roboto Mono; + + --text-xs: 0.75rem; + --text-sm: 0.875rem; + --text-base: 1rem; + --text-lg: 1.125rem; + --text-xl: 1.25rem; + --text-2xl: 1.5rem; + --text-3xl: 1.875rem; + --text-4xl: 2.25rem; + --text-5xl: 3rem; +} + +* { + box-sizing: border-box; +} + +body, +html, +#root { + margin: 0; + height: 100%; + width: 100%; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.shadow-copied { + --tw-shadow: 0 0 0 1px var(--color-white), inset 0 0 0 1px var(--color-white); + --tw-shadow-colored: + 0 0 0 1px var(--tw-shadow-color), inset 0 0 0 1px var(--tw-shadow-color); + + box-shadow: + var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), + var(--tw-shadow); +} + +@font-face { + font-family: "Alliance Text"; + src: + url("https://static.astral.sh/fonts/Alliance-TextRegular.woff2") + format("woff2"), + url("https://static.astral.sh/fonts/Alliance-TextRegular.woff") + format("woff"); + font-weight: normal; + font-style: normal; + font-display: block; +} + +@font-face { + font-family: "Alliance Text"; + src: + url("https://static.astral.sh/fonts/Alliance-TextMedium.woff2") + format("woff2"), + url("https://static.astral.sh/fonts/Alliance-TextMedium.woff") + format("woff"); + font-weight: 500; + font-style: normal; + font-display: block; +} + +@font-face { + font-family: "Alliance Platt"; + src: + url("https://static.astral.sh/fonts/Alliance-PlattMedium.woff2") + format("woff2"), + url("https://static.astral.sh/fonts/Alliance-PlattMedium.woff") + format("woff"); + font-weight: 500; + font-style: normal; + font-display: block; +} + +@font-face { + font-family: "Alliance Platt"; + src: + url("https://static.astral.sh/fonts/Alliance-PlattRegular.woff2") + format("woff2"), + url("https://static.astral.sh/fonts/Alliance-PlattRegular.woff") + format("woff"); + font-weight: normal; + font-style: normal; + font-display: block; +} diff --git a/playground/src/main.tsx b/playground/ruff/src/main.tsx similarity index 100% rename from playground/src/main.tsx rename to playground/ruff/src/main.tsx diff --git a/playground/src/third-party.d.ts b/playground/ruff/src/third-party.d.ts similarity index 100% rename from playground/src/third-party.d.ts rename to playground/ruff/src/third-party.d.ts diff --git a/playground/src/vite-env.d.ts b/playground/ruff/src/vite-env.d.ts similarity index 100% rename from playground/src/vite-env.d.ts rename to playground/ruff/src/vite-env.d.ts diff --git a/playground/vite.config.ts b/playground/ruff/vite.config.ts similarity index 100% rename from playground/vite.config.ts rename to playground/ruff/vite.config.ts diff --git a/playground/src/index.css b/playground/src/index.css deleted file mode 100644 index 959bd2631c..0000000000 --- a/playground/src/index.css +++ /dev/null @@ -1,106 +0,0 @@ -@import 'tailwindcss'; - -@custom-variant dark (&:is(.dark *)); - -@theme { - --color-ayu-accent: #ffac2f; - - --color-ayu-background: #f8f9fa; - --color-ayu-background-dark: #0b0e14; - - --color-black: #261230; - --color-white: #ffffff; - --color-radiate: #d7ff64; - --color-flare: #6340ac; - --color-rock: #78876e; - --color-galaxy: #261230; - --color-space: #30173d; - --color-comet: #6f5d6f; - --color-cosmic: #de5fe9; - --color-sun: #ffac2f; - --color-electron: #46ebe1; - --color-aurora: #46eb74; - --color-constellation: #5f6de9; - --color-neutron: #cff3cf; - --color-proton: #f6afbc; - --color-nebula: #cdcbfb; - --color-supernova: #f1aff6; - --color-starlight: #f4f4f1; - --color-lunar: #fbf2fc; - --color-asteroid: #e3cee3; - --color-crater: #f0dfdf; - - --font-heading: Alliance Platt, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, - Arial, monospace, Apple Color Emoji, Segoe UI Emoji; - --font-body: Alliance Text, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, - sans-serif, Apple Color Emoji, Segoe UI Emoji; - --font-mono: Roboto Mono; - - --text-xs: 0.75rem; - --text-sm: 0.875rem; - --text-base: 1rem; - --text-lg: 1.125rem; - --text-xl: 1.25rem; - --text-2xl: 1.5rem; - --text-3xl: 1.875rem; - --text-4xl: 2.25rem; - --text-5xl: 3rem; -} - -* { - box-sizing: border-box; -} - -body, -html, -#root { - margin: 0; - height: 100%; - width: 100%; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.shadow-copied { - --tw-shadow: 0 0 0 1px var(--color-white), inset 0 0 0 1px var(--color-white); - --tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color), inset 0 0 0 1px var(--tw-shadow-color); - - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} - -@font-face { - font-family: "Alliance Text"; - src: url("https://static.astral.sh/fonts/Alliance-TextRegular.woff2") format("woff2"), - url("https://static.astral.sh/fonts/Alliance-TextRegular.woff") format("woff"); - font-weight: normal; - font-style: normal; - font-display: block; -} - -@font-face { - font-family: "Alliance Text"; - src: url("https://static.astral.sh/fonts/Alliance-TextMedium.woff2") format("woff2"), - url("https://static.astral.sh/fonts/Alliance-TextMedium.woff") format("woff"); - font-weight: 500; - font-style: normal; - font-display: block; -} - -@font-face { - font-family: "Alliance Platt"; - src: url("https://static.astral.sh/fonts/Alliance-PlattMedium.woff2") format("woff2"), - url("https://static.astral.sh/fonts/Alliance-PlattMedium.woff") format("woff"); - font-weight: 500; - font-style: normal; - font-display: block; -} - -@font-face { - font-family: "Alliance Platt"; - src: url("https://static.astral.sh/fonts/Alliance-PlattRegular.woff2") format("woff2"), - url("https://static.astral.sh/fonts/Alliance-PlattRegular.woff") format("woff"); - font-weight: normal; - font-style: normal; - font-display: block; -} diff --git a/playground/tsconfig.json b/playground/tsconfig.json index 3d0a51a86e..afbacb9b47 100644 --- a/playground/tsconfig.json +++ b/playground/tsconfig.json @@ -16,6 +16,6 @@ "noEmit": true, "jsx": "react-jsx" }, - "include": ["src"], + "include": ["ruff/src"], "references": [{ "path": "./tsconfig.node.json" }] } diff --git a/playground/tsconfig.node.json b/playground/tsconfig.node.json index 9d31e2aed9..9d16ed34a0 100644 --- a/playground/tsconfig.node.json +++ b/playground/tsconfig.node.json @@ -5,5 +5,5 @@ "moduleResolution": "Node", "allowSyntheticDefaultImports": true }, - "include": ["vite.config.ts"] + "include": ["ruff/vite.config.ts"] }