From b72ec459f0b534abe442ae62bee0ba7b15895c3e Mon Sep 17 00:00:00 2001 From: Shyrro Date: Sun, 2 Apr 2023 21:27:53 +0200 Subject: [PATCH] chore: remove csr svelte sandbox Signed-off-by: Shyrro --- examples/svelte-kit/package.json | 2 +- examples/svelte-ts/.eslintignore | 13 --- examples/svelte-ts/.eslintrc.cjs | 20 ---- examples/svelte-ts/.gitignore | 11 -- examples/svelte-ts/.npmrc | 1 - examples/svelte-ts/README.md | 47 -------- examples/svelte-ts/index.html | 13 --- examples/svelte-ts/package.json | 107 ------------------ examples/svelte-ts/public/assets/favicon.png | Bin 1571 -> 0 bytes examples/svelte-ts/src/App.svelte | 13 --- examples/svelte-ts/src/app.d.ts | 12 -- .../svelte-ts/src/components/Layout.svelte | 24 ---- .../src/components/state-visualizer.svelte | 16 --- .../svelte-ts/src/components/toolbar.svelte | 14 --- examples/svelte-ts/src/main.ts | 7 -- examples/svelte-ts/src/pages/Accordion.svelte | 46 -------- examples/svelte-ts/src/pages/Main.svelte | 16 --- examples/svelte-ts/src/pages/Select.svelte | 51 --------- examples/svelte-ts/src/router/routes.ts | 21 ---- examples/svelte-ts/svelte.config.js | 7 -- examples/svelte-ts/tsconfig.json | 12 -- examples/svelte-ts/vite.config.ts | 6 - package.json | 2 +- 23 files changed, 2 insertions(+), 459 deletions(-) delete mode 100644 examples/svelte-ts/.eslintignore delete mode 100644 examples/svelte-ts/.eslintrc.cjs delete mode 100644 examples/svelte-ts/.gitignore delete mode 100644 examples/svelte-ts/.npmrc delete mode 100644 examples/svelte-ts/README.md delete mode 100644 examples/svelte-ts/index.html delete mode 100644 examples/svelte-ts/package.json delete mode 100644 examples/svelte-ts/public/assets/favicon.png delete mode 100644 examples/svelte-ts/src/App.svelte delete mode 100644 examples/svelte-ts/src/app.d.ts delete mode 100644 examples/svelte-ts/src/components/Layout.svelte delete mode 100644 examples/svelte-ts/src/components/state-visualizer.svelte delete mode 100644 examples/svelte-ts/src/components/toolbar.svelte delete mode 100644 examples/svelte-ts/src/main.ts delete mode 100644 examples/svelte-ts/src/pages/Accordion.svelte delete mode 100644 examples/svelte-ts/src/pages/Main.svelte delete mode 100644 examples/svelte-ts/src/pages/Select.svelte delete mode 100644 examples/svelte-ts/src/router/routes.ts delete mode 100644 examples/svelte-ts/svelte.config.js delete mode 100644 examples/svelte-ts/tsconfig.json delete mode 100644 examples/svelte-ts/vite.config.ts diff --git a/examples/svelte-kit/package.json b/examples/svelte-kit/package.json index 27d9f570f4..1095101630 100644 --- a/examples/svelte-kit/package.json +++ b/examples/svelte-kit/package.json @@ -1,5 +1,5 @@ { - "name": "svelte-ts", + "name": "svelte-kit", "version": "0.0.1", "private": true, "scripts": { diff --git a/examples/svelte-ts/.eslintignore b/examples/svelte-ts/.eslintignore deleted file mode 100644 index 38972655fa..0000000000 --- a/examples/svelte-ts/.eslintignore +++ /dev/null @@ -1,13 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package -.env -.env.* -!.env.example - -# Ignore files for PNPM, NPM and YARN -pnpm-lock.yaml -package-lock.json -yarn.lock diff --git a/examples/svelte-ts/.eslintrc.cjs b/examples/svelte-ts/.eslintrc.cjs deleted file mode 100644 index ad242c1d3f..0000000000 --- a/examples/svelte-ts/.eslintrc.cjs +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - root: true, - parser: "@typescript-eslint/parser", - extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], - plugins: ["svelte3", "@typescript-eslint"], - ignorePatterns: ["*.cjs"], - overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }], - settings: { - "svelte3/typescript": () => require("typescript"), - }, - parserOptions: { - sourceType: "module", - ecmaVersion: 2020, - }, - env: { - browser: true, - es2017: true, - node: true, - }, -} diff --git a/examples/svelte-ts/.gitignore b/examples/svelte-ts/.gitignore deleted file mode 100644 index ac7211b403..0000000000 --- a/examples/svelte-ts/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -.DS_Store -node_modules -/build -/dist -/.svelte-kit -/package -.env -.env.* -!.env.example -vite.config.js.timestamp-* -vite.config.ts.timestamp-* diff --git a/examples/svelte-ts/.npmrc b/examples/svelte-ts/.npmrc deleted file mode 100644 index b6f27f1359..0000000000 --- a/examples/svelte-ts/.npmrc +++ /dev/null @@ -1 +0,0 @@ -engine-strict=true diff --git a/examples/svelte-ts/README.md b/examples/svelte-ts/README.md deleted file mode 100644 index 5e59b82bd5..0000000000 --- a/examples/svelte-ts/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# TypeScript Svelte example - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a -development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview -app. - -## Building - -To build your library: - -```bash -npm run package -``` - -To create a production version of your showcase app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target -> environment. - -## Publishing - -Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a -`"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the -[MIT license](https://opensource.org/license/mit/)). - -To publish your library to [npm](https://www.npmjs.com): - -```bash -npm publish -``` diff --git a/examples/svelte-ts/index.html b/examples/svelte-ts/index.html deleted file mode 100644 index f6efaca5f9..0000000000 --- a/examples/svelte-ts/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Vite + Svelte + TS - - -
- - - diff --git a/examples/svelte-ts/package.json b/examples/svelte-ts/package.json deleted file mode 100644 index 2e09488118..0000000000 --- a/examples/svelte-ts/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "name": "svelte-ts", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "vite dev", - "build": "vite build && npm run package", - "preview": "vite preview", - "prepublishOnly": "npm run package", - "check": "svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." - }, - "exports": { - ".": { - "types": "./dist/index.d.ts", - "svelte": "./dist/index.js" - } - }, - "files": [ - "dist" - ], - "peerDependencies": { - "svelte": "^3.54.0" - }, - "dependencies": { - "@zag-js/accordion": "workspace:*", - "@zag-js/anatomy": "workspace:*", - "@zag-js/aria-hidden": "workspace:*", - "@zag-js/auto-resize": "workspace:*", - "@zag-js/carousel": "workspace:*", - "@zag-js/checkbox": "workspace:*", - "@zag-js/combobox": "workspace:*", - "@zag-js/core": "workspace:*", - "@zag-js/date-picker": "workspace:*", - "@zag-js/date-utils": "workspace:*", - "@zag-js/dialog": "workspace:*", - "@zag-js/dismissable": "workspace:*", - "@zag-js/dom-event": "workspace:*", - "@zag-js/dom-query": "workspace:*", - "@zag-js/editable": "workspace:*", - "@zag-js/element-rect": "workspace:*", - "@zag-js/element-size": "workspace:*", - "@zag-js/focus-scope": "workspace:*", - "@zag-js/focus-visible": "workspace:*", - "@zag-js/form-utils": "workspace:*", - "@zag-js/hover-card": "workspace:*", - "@zag-js/interact-outside": "workspace:*", - "@zag-js/live-region": "workspace:*", - "@zag-js/menu": "workspace:*", - "@zag-js/mutation-observer": "workspace:*", - "@zag-js/number-input": "workspace:*", - "@zag-js/number-utils": "workspace:*", - "@zag-js/numeric-range": "workspace:*", - "@zag-js/pagination": "workspace:*", - "@zag-js/pin-input": "workspace:*", - "@zag-js/popover": "workspace:*", - "@zag-js/popper": "workspace:*", - "@zag-js/pressable": "workspace:*", - "@zag-js/radio-group": "workspace:*", - "@zag-js/range-slider": "workspace:*", - "@zag-js/rating-group": "workspace:*", - "@zag-js/rect-utils": "workspace:*", - "@zag-js/remove-scroll": "workspace:*", - "@zag-js/select": "workspace:*", - "@zag-js/shared": "workspace:*", - "@zag-js/slider": "workspace:*", - "@zag-js/splitter": "workspace:*", - "@zag-js/store": "workspace:*", - "@zag-js/svelte": "workspace:*", - "@zag-js/tabbable": "workspace:*", - "@zag-js/tabs": "workspace:*", - "@zag-js/tags-input": "workspace:*", - "@zag-js/text-selection": "workspace:*", - "@zag-js/toast": "workspace:*", - "@zag-js/toggle": "workspace:*", - "@zag-js/tooltip": "workspace:*", - "@zag-js/transition": "workspace:*", - "@zag-js/types": "workspace:*", - "@zag-js/utils": "workspace:*", - "@zag-js/visually-hidden": "workspace:*", - "svelte-navigator": "^3.2.2" - }, - "devDependencies": { - "@sveltejs/adapter-auto": "^2.0.0", - "@sveltejs/kit": "^1.5.0", - "@sveltejs/package": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^2.0.3", - "@typescript-eslint/eslint-plugin": "^5.45.0", - "@typescript-eslint/parser": "^5.45.0", - "eslint": "^8.28.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-svelte3": "^4.0.0", - "prettier": "^2.8.0", - "prettier-plugin-svelte": "^2.8.1", - "publint": "^0.1.9", - "svelte": "^3.54.0", - "svelte-check": "^3.0.1", - "tslib": "^2.4.1", - "typescript": "^4.9.3", - "vite": "^4.0.0" - }, - "svelte": "./dist/index.js", - "types": "./dist/index.d.ts", - "type": "module" -} diff --git a/examples/svelte-ts/public/assets/favicon.png b/examples/svelte-ts/public/assets/favicon.png deleted file mode 100644 index 825b9e65af7c104cfb07089bb28659393b4f2097..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1571 zcmV+;2Hg3HP)Px)-AP12RCwC$UE6KzI1p6{F2N z1VK2vi|pOpn{~#djwYcWXTI_im_u^TJgMZ4JMOsSj!0ma>B?-(Hr@X&W@|R-$}W@Z zgj#$x=!~7LGqHW?IO8+*oE1MyDp!G=L0#^lUx?;!fXv@l^6SvTnf^ac{5OurzC#ZMYc20lI%HhX816AYVs1T3heS1*WaWH z%;x>)-J}YB5#CLzU@GBR6sXYrD>Vw(Fmt#|JP;+}<#6b63Ike{Fuo!?M{yEffez;| zp!PfsuaC)>h>-AdbnwN13g*1LowNjT5?+lFVd#9$!8Z9HA|$*6dQ8EHLu}U|obW6f z2%uGv?vr=KNq7YYa2Roj;|zooo<)lf=&2yxM@e`kM$CmCR#x>gI>I|*Ubr({5Y^rb zghxQU22N}F51}^yfDSt786oMTc!W&V;d?76)9KXX1 z+6Okem(d}YXmmOiZq$!IPk5t8nnS{%?+vDFz3BevmFNgpIod~R{>@#@5x9zJKEHLHv!gHeK~n)Ld!M8DB|Kfe%~123&Hz1Z(86nU7*G5chmyDe ziV7$pB7pJ=96hpxHv9rCR29%bLOXlKU<_13_M8x)6;P8E1Kz6G<&P?$P^%c!M5`2` zfY2zg;VK5~^>TJGQzc+33-n~gKt{{of8GzUkWmU110IgI0DLxRIM>0US|TsM=L|@F z0Bun8U!cRB7-2apz=y-7*UxOxz@Z0)@QM)9wSGki1AZ38ceG7Q72z5`i;i=J`ILzL z@iUO?SBBG-0cQuo+an4TsLy-g-x;8P4UVwk|D8{W@U1Zi z!M)+jqy@nQ$p?5tsHp-6J304Q={v-B>66$P0IDx&YT(`IcZ~bZfmn11#rXd7<5s}y zBi9eim&zQc0Dk|2>$bs0PnLmDfMP5lcXRY&cvJ=zKxI^f0%-d$tD!`LBf9^jMSYUA zI8U?CWdY@}cRq6{5~y+)#h1!*-HcGW@+gZ4B};0OnC~`xQOyH19z*TA!!BJ%9s0V3F?CAJ{hTd#*tf+ur-W9MOURF-@B77_-OshsY}6 zOXRY=5%C^*26z?l)1=$bz30!so5tfABdSYzO+H=CpV~aaUefmjvfZ3Ttu9W&W3Iu6 zROlh0MFA5h;my}8lB0tAV-Rvc2Zs_CCSJnx@d`**$idgy-iMob4dJWWw|21b4NB=LfsYp0Aeh{Ov)yztQi;eL4y5 zMi>8^SzKqk8~k?UiQK^^-5d8c%bV?$F8%X~czyiaKCI2=UH - import routes from "./router/routes" - import Layout from "./components/Layout.svelte" - import { Route } from 'svelte-navigator'; - - - - {#each routes as route} - - - - {/each} - diff --git a/examples/svelte-ts/src/app.d.ts b/examples/svelte-ts/src/app.d.ts deleted file mode 100644 index 0425013af5..0000000000 --- a/examples/svelte-ts/src/app.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// See https://kit.svelte.dev/docs/types#app -// for information about these interfaces -declare global { - namespace App { - // interface Error {} - // interface Locals {} - // interface PageData {} - // interface Platform {} - } -} - -export {} diff --git a/examples/svelte-ts/src/components/Layout.svelte b/examples/svelte-ts/src/components/Layout.svelte deleted file mode 100644 index 0ff010d09c..0000000000 --- a/examples/svelte-ts/src/components/Layout.svelte +++ /dev/null @@ -1,24 +0,0 @@ - - - - Svelte Machines - - -
- - -
-
diff --git a/examples/svelte-ts/src/components/state-visualizer.svelte b/examples/svelte-ts/src/components/state-visualizer.svelte deleted file mode 100644 index 4f18917195..0000000000 --- a/examples/svelte-ts/src/components/state-visualizer.svelte +++ /dev/null @@ -1,16 +0,0 @@ - - -
-
-      
- {label || "Visualizer"} -
{@html stringifyState(state, omit)}
-
-
-
diff --git a/examples/svelte-ts/src/components/toolbar.svelte b/examples/svelte-ts/src/components/toolbar.svelte deleted file mode 100644 index d7fba0095e..0000000000 --- a/examples/svelte-ts/src/components/toolbar.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - -
- -
-
- -
-
-
diff --git a/examples/svelte-ts/src/main.ts b/examples/svelte-ts/src/main.ts deleted file mode 100644 index 037b6c0411..0000000000 --- a/examples/svelte-ts/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import App from "./App.svelte" - -const app = new App({ - target: document.getElementById("app") as HTMLElement, -}) - -export default app diff --git a/examples/svelte-ts/src/pages/Accordion.svelte b/examples/svelte-ts/src/pages/Accordion.svelte deleted file mode 100644 index 73bcb4c748..0000000000 --- a/examples/svelte-ts/src/pages/Accordion.svelte +++ /dev/null @@ -1,46 +0,0 @@ - - -
-
- {#each accordionData as item} -
-

- -

-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore - magna aliqua. -
-
- {/each} -
-
- - - - diff --git a/examples/svelte-ts/src/pages/Main.svelte b/examples/svelte-ts/src/pages/Main.svelte deleted file mode 100644 index 68e41a4501..0000000000 --- a/examples/svelte-ts/src/pages/Main.svelte +++ /dev/null @@ -1,16 +0,0 @@ - - -
-

Zag.js + React

- -
diff --git a/examples/svelte-ts/src/pages/Select.svelte b/examples/svelte-ts/src/pages/Select.svelte deleted file mode 100644 index 7aa660cdcd..0000000000 --- a/examples/svelte-ts/src/pages/Select.svelte +++ /dev/null @@ -1,51 +0,0 @@ - - -
-
- - - -
-
-
    - {#each selectData as { label, value }} -
  • - {label} - {#if api.selectedOption && value === api.selectedOption.value}✓{/if} -
  • - {/each} -
-
-
- - - - diff --git a/examples/svelte-ts/src/router/routes.ts b/examples/svelte-ts/src/router/routes.ts deleted file mode 100644 index 6d884e53bf..0000000000 --- a/examples/svelte-ts/src/router/routes.ts +++ /dev/null @@ -1,21 +0,0 @@ -import Select from "../pages/Select.svelte" -import Accordion from "../pages/Accordion.svelte" -import Main from "../pages/Main.svelte" - -export default [ - { - path: "/", - label: "Main", - component: Main, - }, - { - path: "accordion", - label: "Accordion", - component: Accordion, - }, - { - path: "select", - label: "Select", - component: Select, - }, -] diff --git a/examples/svelte-ts/svelte.config.js b/examples/svelte-ts/svelte.config.js deleted file mode 100644 index af7d74ea4b..0000000000 --- a/examples/svelte-ts/svelte.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import { vitePreprocess } from "@sveltejs/vite-plugin-svelte" - -const config = { - preprocess: vitePreprocess(), -} - -export default config diff --git a/examples/svelte-ts/tsconfig.json b/examples/svelte-ts/tsconfig.json deleted file mode 100644 index 61ec0dac2e..0000000000 --- a/examples/svelte-ts/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true - } -} diff --git a/examples/svelte-ts/vite.config.ts b/examples/svelte-ts/vite.config.ts deleted file mode 100644 index 5c5de3d9b6..0000000000 --- a/examples/svelte-ts/vite.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { defineConfig } from "vite" -import { svelte } from "@sveltejs/vite-plugin-svelte" - -export default defineConfig({ - plugins: [svelte()], -}) diff --git a/package.json b/package.json index 6fe34f5377..b4b880f42d 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "sync-pkgs": "tsx scripts/sync-packages.ts", "clean-pkgs": "pnpm -r exec rm -rf dist .swc *.log", "clean": "pnpm clean-pkgs && rm -rf node_modules", - "svelte": "pnpm --filter \"./examples/svelte-ts\"", + "svelte": "pnpm --filter \"./examples/svelte-kit\"", "react": "pnpm --filter \"./examples/next-ts\"", "vue": "pnpm --filter \"./examples/vue-ts\"", "solid": "pnpm --filter \"./examples/solid-ts\"",