diff --git a/.gitignore b/.gitignore index c7d2de47..d5b4372c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,6 @@ vite.config.ts.timestamp-**.mjs /packages/* !/packages/create-skeleton-app !/packages/skeleton +!/packages/plugin /sites/* !/sites/skeleton.dev diff --git a/package.json b/package.json index ae28f093..dd33c7e3 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "preinstall": "npx only-allow pnpm", "getall": "node scripts/checkout.cjs && pnpm i", "postinstall": "pnpm -r sync", + "dev": "pnpm --no-sort --filter=skeleton.dev --filter=@skeletonlabs/tw-plugin dev", "csa": "node ./packages/create-skeleton-app/src/index.js --types=typescript --prettier --eslint --playwright=false --vitest=false --codeblocks --popups --typography --forms -t=skeleton --skeletontemplate=welcome -p=sites --monorepo --inspector", "csl": "node ./packages/create-skeleton-app/src/index.js --types=typescript --library --prettier --eslint --playwright --vitest --codeblocks --popups --typography --forms -t=skeleton --skeletontemplate=bare -p=packages --monorepo --inspector", "templategen": "node ./scripts/template-gen.js", diff --git a/packages/plugin/.eslintrc.cjs b/packages/plugin/.eslintrc.cjs new file mode 100644 index 00000000..6eb005ec --- /dev/null +++ b/packages/plugin/.eslintrc.cjs @@ -0,0 +1,16 @@ +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], + plugins: ['@typescript-eslint'], + ignorePatterns: ['*.cjs', 'dist/**/*'], + overrides: [], + env: { + es2017: true, + node: true + }, + rules: { + 'no-empty-function': 'off', + '@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }] + } +}; diff --git a/packages/plugin/.gitignore b/packages/plugin/.gitignore new file mode 100644 index 00000000..075d38ef --- /dev/null +++ b/packages/plugin/.gitignore @@ -0,0 +1,13 @@ +.DS_Store +node_modules +build +.svelte-kit +dist +.env +.env.* +!.env.example +coverage +.temp +src/tailwind/generated +*.tgz +*.log \ No newline at end of file diff --git a/packages/plugin/.prettierignore b/packages/plugin/.prettierignore new file mode 100644 index 00000000..37cb719d --- /dev/null +++ b/packages/plugin/.prettierignore @@ -0,0 +1,18 @@ +.DS_Store +node_modules +/build +/.svelte-kit +/package +.env +.env.* +!.env.example +/coverage +pnpm-lock.yaml +.vscode +.github +/static/font-awesome +/static/fonts +/.temp +/dist +/scripts/tw-settings.json +src/tailwind/generated \ No newline at end of file diff --git a/packages/plugin/.prettierrc b/packages/plugin/.prettierrc new file mode 100644 index 00000000..ce38e96e --- /dev/null +++ b/packages/plugin/.prettierrc @@ -0,0 +1,6 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 140 +} diff --git a/packages/plugin/package.json b/packages/plugin/package.json new file mode 100644 index 00000000..5b162345 --- /dev/null +++ b/packages/plugin/package.json @@ -0,0 +1,71 @@ +{ + "name": "@skeletonlabs/tw-plugin", + "version": "0.0.1", + "description": "Core plugin for Skeleton.", + "private": true, + "scripts": { + "dev": "pnpm build && node ./scripts/watcher.js", + "build": "tsx ./scripts/generate-jss.ts && tsup", + "sync": "pnpm build:jss && tsup", + "package": "pnpm build:jss && tsup", + "lint": "prettier --ignore-path .prettierignore --check --plugin-search-dir=. . && eslint --fix --ignore-path .gitignore .", + "format": "prettier --ignore-path .prettierignore --write --plugin-search-dir=. .", + "build:jss": "tsx ./scripts/generate-jss.ts", + "convert": "tsx ./scripts/convert-theme.ts && pnpm format" + }, + "repository": { + "type": "git", + "url": "https://github.com/skeletonlabs/skeleton.git" + }, + "bugs": { + "url": "https://github.com/skeletonlabs/skeleton/issues" + }, + "keywords": [ + "cli", + "components", + "ui", + "component", + "svelte", + "component-library", + "ui-components", + "ui-framework", + "tailwind", + "tailwindcss", + "components-library", + "sveltekit" + ], + "license": "MIT", + "homepage": "https://skeleton.dev/", + "devDependencies": { + "@types/node": "18.16.16", + "@types/postcss-import": "^14.0.0", + "@typescript-eslint/eslint-plugin": "5.59.9", + "@typescript-eslint/parser": "5.59.9", + "chokidar": "^3.5.3", + "eslint": "8.42.0", + "eslint-config-prettier": "8.8.0", + "postcss": "8.4.24", + "postcss-import": "15.1.0", + "postcss-js": "4.0.1", + "postcss-load-config": "4.0.1", + "postcss-selector-parser": "^6.0.13", + "prettier": "2.8.8", + "tailwindcss": "3.3.2", + "tslib": "2.5.3", + "tsup": "^6.7.0", + "tsx": "^3.12.7", + "typescript": "5.0.3" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0" + }, + "type": "commonjs", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "./dist/**/*.js", + "./dist/**/*.d.ts", + "./dist/**/*.cjs", + "./dist/**/*.d.cts" + ] +} diff --git a/packages/plugin/pnpm-lock.yaml b/packages/plugin/pnpm-lock.yaml new file mode 100644 index 00000000..212e57ef --- /dev/null +++ b/packages/plugin/pnpm-lock.yaml @@ -0,0 +1,1876 @@ +lockfileVersion: '6.1' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +devDependencies: + '@types/node': + specifier: 18.16.16 + version: 18.16.16 + '@types/postcss-import': + specifier: ^14.0.0 + version: 14.0.0 + '@typescript-eslint/eslint-plugin': + specifier: 5.59.9 + version: 5.59.9(@typescript-eslint/parser@5.59.9)(eslint@8.42.0)(typescript@5.0.3) + '@typescript-eslint/parser': + specifier: 5.59.9 + version: 5.59.9(eslint@8.42.0)(typescript@5.0.3) + chokidar: + specifier: ^3.5.3 + version: 3.5.3 + eslint: + specifier: 8.42.0 + version: 8.42.0 + eslint-config-prettier: + specifier: 8.8.0 + version: 8.8.0(eslint@8.42.0) + postcss: + specifier: 8.4.24 + version: 8.4.24 + postcss-import: + specifier: 15.1.0 + version: 15.1.0(postcss@8.4.24) + postcss-js: + specifier: 4.0.1 + version: 4.0.1(postcss@8.4.24) + postcss-load-config: + specifier: 4.0.1 + version: 4.0.1(postcss@8.4.24) + postcss-selector-parser: + specifier: ^6.0.13 + version: 6.0.13 + prettier: + specifier: 2.8.8 + version: 2.8.8 + tailwindcss: + specifier: 3.3.2 + version: 3.3.2 + tslib: + specifier: 2.5.3 + version: 2.5.3 + tsup: + specifier: ^6.7.0 + version: 6.7.0(postcss@8.4.24)(typescript@5.0.3) + tsx: + specifier: ^3.12.7 + version: 3.12.7 + typescript: + specifier: 5.0.3 + version: 5.0.3 + +packages: + + /@alloc/quick-lru@5.2.0: + resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} + engines: {node: '>=10'} + dev: true + + /@esbuild-kit/cjs-loader@2.4.2: + resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==} + dependencies: + '@esbuild-kit/core-utils': 3.1.0 + get-tsconfig: 4.6.0 + dev: true + + /@esbuild-kit/core-utils@3.1.0: + resolution: {integrity: sha512-Uuk8RpCg/7fdHSceR1M6XbSZFSuMrxcePFuGgyvsBn+u339dk5OeL4jv2EojwTN2st/unJGsVm4qHWjWNmJ/tw==} + dependencies: + esbuild: 0.17.19 + source-map-support: 0.5.21 + dev: true + + /@esbuild-kit/esm-loader@2.5.5: + resolution: {integrity: sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==} + dependencies: + '@esbuild-kit/core-utils': 3.1.0 + get-tsconfig: 4.6.0 + dev: true + + /@esbuild/android-arm64@0.17.19: + resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.17.19: + resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.17.19: + resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.17.19: + resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.17.19: + resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.17.19: + resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.17.19: + resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.17.19: + resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.17.19: + resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.17.19: + resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.17.19: + resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.17.19: + resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.17.19: + resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.17.19: + resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.17.19: + resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.17.19: + resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.17.19: + resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.17.19: + resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.17.19: + resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.17.19: + resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.17.19: + resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.17.19: + resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@eslint-community/eslint-utils@4.4.0(eslint@8.42.0): + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.42.0 + eslint-visitor-keys: 3.4.1 + dev: true + + /@eslint-community/regexpp@4.5.1: + resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true + + /@eslint/eslintrc@2.0.3: + resolution: {integrity: sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 9.5.2 + globals: 13.20.0 + ignore: 5.2.4 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@eslint/js@8.42.0: + resolution: {integrity: sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@humanwhocodes/config-array@0.11.10: + resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} + engines: {node: '>=10.10.0'} + dependencies: + '@humanwhocodes/object-schema': 1.2.1 + debug: 4.3.4 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@humanwhocodes/module-importer@1.0.1: + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + dev: true + + /@humanwhocodes/object-schema@1.2.1: + resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + dev: true + + /@jridgewell/gen-mapping@0.3.3: + resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.18 + dev: true + + /@jridgewell/resolve-uri@3.1.0: + resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/set-array@1.1.2: + resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/sourcemap-codec@1.4.14: + resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + dev: true + + /@jridgewell/sourcemap-codec@1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + + /@jridgewell/trace-mapping@0.3.18: + resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} + dependencies: + '@jridgewell/resolve-uri': 3.1.0 + '@jridgewell/sourcemap-codec': 1.4.14 + dev: true + + /@nodelib/fs.scandir@2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat@2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk@1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.15.0 + dev: true + + /@types/json-schema@7.0.12: + resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} + dev: true + + /@types/node@18.16.16: + resolution: {integrity: sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==} + dev: true + + /@types/postcss-import@14.0.0: + resolution: {integrity: sha512-rYonq8jtSbdbBKNpi2xzi9CGFF7IcS/tzX6vMKFH1TMberRgTgTzYqCzRHPavBej/KId/AJd255iDSOsLv8esQ==} + dependencies: + postcss: 8.4.24 + dev: true + + /@types/semver@7.5.0: + resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} + dev: true + + /@typescript-eslint/eslint-plugin@5.59.9(@typescript-eslint/parser@5.59.9)(eslint@8.42.0)(typescript@5.0.3): + resolution: {integrity: sha512-4uQIBq1ffXd2YvF7MAvehWKW3zVv/w+mSfRAu+8cKbfj3nwzyqJLNcZJpQ/WZ1HLbJDiowwmQ6NO+63nCA+fqA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.5.1 + '@typescript-eslint/parser': 5.59.9(eslint@8.42.0)(typescript@5.0.3) + '@typescript-eslint/scope-manager': 5.59.9 + '@typescript-eslint/type-utils': 5.59.9(eslint@8.42.0)(typescript@5.0.3) + '@typescript-eslint/utils': 5.59.9(eslint@8.42.0)(typescript@5.0.3) + debug: 4.3.4 + eslint: 8.42.0 + grapheme-splitter: 1.0.4 + ignore: 5.2.4 + natural-compare-lite: 1.4.0 + semver: 7.5.1 + tsutils: 3.21.0(typescript@5.0.3) + typescript: 5.0.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser@5.59.9(eslint@8.42.0)(typescript@5.0.3): + resolution: {integrity: sha512-FsPkRvBtcLQ/eVK1ivDiNYBjn3TGJdXy2fhXX+rc7czWl4ARwnpArwbihSOHI2Peg9WbtGHrbThfBUkZZGTtvQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.59.9 + '@typescript-eslint/types': 5.59.9 + '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.0.3) + debug: 4.3.4 + eslint: 8.42.0 + typescript: 5.0.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/scope-manager@5.59.9: + resolution: {integrity: sha512-8RA+E+w78z1+2dzvK/tGZ2cpGigBZ58VMEHDZtpE1v+LLjzrYGc8mMaTONSxKyEkz3IuXFM0IqYiGHlCsmlZxQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.59.9 + '@typescript-eslint/visitor-keys': 5.59.9 + dev: true + + /@typescript-eslint/type-utils@5.59.9(eslint@8.42.0)(typescript@5.0.3): + resolution: {integrity: sha512-ksEsT0/mEHg9e3qZu98AlSrONAQtrSTljL3ow9CGej8eRo7pe+yaC/mvTjptp23Xo/xIf2mLZKC6KPv4Sji26Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.0.3) + '@typescript-eslint/utils': 5.59.9(eslint@8.42.0)(typescript@5.0.3) + debug: 4.3.4 + eslint: 8.42.0 + tsutils: 3.21.0(typescript@5.0.3) + typescript: 5.0.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types@5.59.9: + resolution: {integrity: sha512-uW8H5NRgTVneSVTfiCVffBb8AbwWSKg7qcA4Ot3JI3MPCJGsB4Db4BhvAODIIYE5mNj7Q+VJkK7JxmRhk2Lyjw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@typescript-eslint/typescript-estree@5.59.9(typescript@5.0.3): + resolution: {integrity: sha512-pmM0/VQ7kUhd1QyIxgS+aRvMgw+ZljB3eDb+jYyp6d2bC0mQWLzUDF+DLwCTkQ3tlNyVsvZRXjFyV0LkU/aXjA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.59.9 + '@typescript-eslint/visitor-keys': 5.59.9 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.1 + tsutils: 3.21.0(typescript@5.0.3) + typescript: 5.0.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils@5.59.9(eslint@8.42.0)(typescript@5.0.3): + resolution: {integrity: sha512-1PuMYsju/38I5Ggblaeb98TOoUvjhRvLpLa1DoTOFaLWqaXl/1iQ1eGurTXgBY58NUdtfTXKP5xBq7q9NDaLKg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.42.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.0 + '@typescript-eslint/scope-manager': 5.59.9 + '@typescript-eslint/types': 5.59.9 + '@typescript-eslint/typescript-estree': 5.59.9(typescript@5.0.3) + eslint: 8.42.0 + eslint-scope: 5.1.1 + semver: 7.5.1 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys@5.59.9: + resolution: {integrity: sha512-bT7s0td97KMaLwpEBckbzj/YohnvXtqbe2XgqNvTl6RJVakY5mvENOTPvw5u66nljfZxthESpDozs86U+oLY8Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.59.9 + eslint-visitor-keys: 3.4.1 + dev: true + + /acorn-jsx@5.3.2(acorn@8.8.2): + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + acorn: 8.8.2 + dev: true + + /acorn@8.8.2: + resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + + /ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + dev: true + + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + dev: true + + /anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: true + + /arg@5.0.2: + resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} + dev: true + + /argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true + + /array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + dev: true + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /binary-extensions@2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: true + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /braces@3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + + /bundle-require@4.0.1(esbuild@0.17.19): + resolution: {integrity: sha512-9NQkRHlNdNpDBGmLpngF3EFDcwodhMUuLz9PaWYciVcQF9SE4LFjM2DB/xV1Li5JiuDMv7ZUWuC3rGbqR0MAXQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.17' + dependencies: + esbuild: 0.17.19 + load-tsconfig: 0.2.5 + dev: true + + /cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + dev: true + + /callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + dev: true + + /camelcase-css@2.0.1: + resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} + engines: {node: '>= 6'} + dev: true + + /chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /chokidar@3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + dev: true + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true + + /cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + + /cssesc@3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + dev: true + + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: true + + /didyoumean@1.2.2: + resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + dev: true + + /dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: true + + /dlv@1.1.3: + resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + dev: true + + /doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dependencies: + esutils: 2.0.3 + dev: true + + /esbuild@0.17.19: + resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.17.19 + '@esbuild/android-arm64': 0.17.19 + '@esbuild/android-x64': 0.17.19 + '@esbuild/darwin-arm64': 0.17.19 + '@esbuild/darwin-x64': 0.17.19 + '@esbuild/freebsd-arm64': 0.17.19 + '@esbuild/freebsd-x64': 0.17.19 + '@esbuild/linux-arm': 0.17.19 + '@esbuild/linux-arm64': 0.17.19 + '@esbuild/linux-ia32': 0.17.19 + '@esbuild/linux-loong64': 0.17.19 + '@esbuild/linux-mips64el': 0.17.19 + '@esbuild/linux-ppc64': 0.17.19 + '@esbuild/linux-riscv64': 0.17.19 + '@esbuild/linux-s390x': 0.17.19 + '@esbuild/linux-x64': 0.17.19 + '@esbuild/netbsd-x64': 0.17.19 + '@esbuild/openbsd-x64': 0.17.19 + '@esbuild/sunos-x64': 0.17.19 + '@esbuild/win32-arm64': 0.17.19 + '@esbuild/win32-ia32': 0.17.19 + '@esbuild/win32-x64': 0.17.19 + dev: true + + /escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + dev: true + + /eslint-config-prettier@8.8.0(eslint@8.42.0): + resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + dependencies: + eslint: 8.42.0 + dev: true + + /eslint-scope@5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + dev: true + + /eslint-scope@7.2.0: + resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + + /eslint-visitor-keys@3.4.1: + resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /eslint@8.42.0: + resolution: {integrity: sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.42.0) + '@eslint-community/regexpp': 4.5.1 + '@eslint/eslintrc': 2.0.3 + '@eslint/js': 8.42.0 + '@humanwhocodes/config-array': 0.11.10 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.0 + eslint-visitor-keys: 3.4.1 + espree: 9.5.2 + esquery: 1.5.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.20.0 + graphemer: 1.4.0 + ignore: 5.2.4 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.1 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + dev: true + + /espree@9.5.2: + resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.8.2 + acorn-jsx: 5.3.2(acorn@8.8.2) + eslint-visitor-keys: 3.4.1 + dev: true + + /esquery@1.5.0: + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + engines: {node: '>=0.10'} + dependencies: + estraverse: 5.3.0 + dev: true + + /esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + dependencies: + estraverse: 5.3.0 + dev: true + + /estraverse@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + dev: true + + /estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + dev: true + + /esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + dev: true + + /execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + dependencies: + cross-spawn: 7.0.3 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + dev: true + + /fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: true + + /fast-glob@3.2.12: + resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + + /fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + dev: true + + /fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + dev: true + + /fastq@1.15.0: + resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + dependencies: + reusify: 1.0.4 + dev: true + + /file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flat-cache: 3.0.4 + dev: true + + /fill-range@7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true + + /flat-cache@3.0.4: + resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flatted: 3.2.7 + rimraf: 3.0.2 + dev: true + + /flatted@3.2.7: + resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} + dev: true + + /fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /function-bind@1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: true + + /get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + dev: true + + /get-tsconfig@4.6.0: + resolution: {integrity: sha512-lgbo68hHTQnFddybKbbs/RDRJnJT5YyGy2kQzVwbq+g67X73i+5MVTval34QxGkOe9X5Ujf1UYpCaphLyltjEg==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + + /glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob@7.1.6: + resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /globals@13.20.0: + resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 + dev: true + + /globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.2.12 + ignore: 5.2.4 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + + /grapheme-splitter@1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + dev: true + + /graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + dev: true + + /has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /has@1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + dependencies: + function-bind: 1.1.1 + dev: true + + /human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + dev: true + + /ignore@5.2.4: + resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} + engines: {node: '>= 4'} + dev: true + + /import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: true + + /imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + dev: true + + /inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true + + /is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: true + + /is-core-module@2.12.1: + resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} + dependencies: + has: 1.0.3 + dev: true + + /is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + dev: true + + /is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + dev: true + + /isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /jiti@1.18.2: + resolution: {integrity: sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==} + hasBin: true + dev: true + + /joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + dev: true + + /js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + + /json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + dev: true + + /json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + dev: true + + /levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + + /lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + dev: true + + /lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + dev: true + + /load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + + /locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: true + + /lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + dev: true + + /lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + dev: true + + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: true + + /merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + dev: true + + /merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /micromatch@4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + + /mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + dev: true + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true + + /mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + dev: true + + /nanoid@3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /natural-compare-lite@1.4.0: + resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + dev: true + + /natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + dev: true + + /normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + + /npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + dependencies: + path-key: 3.1.1 + dev: true + + /object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + dev: true + + /object-hash@3.0.0: + resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} + engines: {node: '>= 6'} + dev: true + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: true + + /onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + dependencies: + mimic-fn: 2.1.0 + dev: true + + /optionator@0.9.1: + resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} + engines: {node: '>= 0.8.0'} + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.3 + dev: true + + /p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true + + /parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + dependencies: + callsites: 3.1.0 + dev: true + + /path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + dev: true + + /path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: true + + /path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + dev: true + + /path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true + + /path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: true + + /picocolors@1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /pify@2.3.0: + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} + engines: {node: '>=0.10.0'} + dev: true + + /pirates@4.0.5: + resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} + engines: {node: '>= 6'} + dev: true + + /postcss-import@15.1.0(postcss@8.4.24): + resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} + engines: {node: '>=14.0.0'} + peerDependencies: + postcss: ^8.0.0 + dependencies: + postcss: 8.4.24 + postcss-value-parser: 4.2.0 + read-cache: 1.0.0 + resolve: 1.22.2 + dev: true + + /postcss-js@4.0.1(postcss@8.4.24): + resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} + engines: {node: ^12 || ^14 || >= 16} + peerDependencies: + postcss: ^8.4.21 + dependencies: + camelcase-css: 2.0.1 + postcss: 8.4.24 + dev: true + + /postcss-load-config@3.1.4(postcss@8.4.24): + resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} + engines: {node: '>= 10'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 2.1.0 + postcss: 8.4.24 + yaml: 1.10.2 + dev: true + + /postcss-load-config@4.0.1(postcss@8.4.24): + resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 2.1.0 + postcss: 8.4.24 + yaml: 2.3.1 + dev: true + + /postcss-nested@6.0.1(postcss@8.4.24): + resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.2.14 + dependencies: + postcss: 8.4.24 + postcss-selector-parser: 6.0.13 + dev: true + + /postcss-selector-parser@6.0.13: + resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==} + engines: {node: '>=4'} + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + dev: true + + /postcss-value-parser@4.2.0: + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + dev: true + + /postcss@8.4.24: + resolution: {integrity: sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + dev: true + + /prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: true + + /punycode@2.3.0: + resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} + engines: {node: '>=6'} + dev: true + + /queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /read-cache@1.0.0: + resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} + dependencies: + pify: 2.3.0 + dev: true + + /readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.1 + dev: true + + /resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + dev: true + + /resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + dev: true + + /resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true + + /resolve@1.22.2: + resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} + hasBin: true + dependencies: + is-core-module: 2.12.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /rollup@3.24.0: + resolution: {integrity: sha512-OgraHOIg2YpHQTjl0/ymWfFNBEyPucB7lmhXrQUh38qNOegxLapSPFs9sNr0qKR75awW41D93XafoR2QfhBdUQ==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /semver@7.5.1: + resolution: {integrity: sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + + /shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + dependencies: + shebang-regex: 3.0.0 + dev: true + + /shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + dev: true + + /signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + dev: true + + /slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: true + + /source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /source-map@0.8.0-beta.0: + resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} + engines: {node: '>= 8'} + dependencies: + whatwg-url: 7.1.0 + dev: true + + /strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true + + /strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + dev: true + + /strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + dev: true + + /sucrase@3.32.0: + resolution: {integrity: sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==} + engines: {node: '>=8'} + hasBin: true + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + commander: 4.1.1 + glob: 7.1.6 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.5 + ts-interface-checker: 0.1.13 + dev: true + + /supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: true + + /tailwindcss@3.3.2: + resolution: {integrity: sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.5.3 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.2.12 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.18.2 + lilconfig: 2.1.0 + micromatch: 4.0.5 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.0.0 + postcss: 8.4.24 + postcss-import: 15.1.0(postcss@8.4.24) + postcss-js: 4.0.1(postcss@8.4.24) + postcss-load-config: 4.0.1(postcss@8.4.24) + postcss-nested: 6.0.1(postcss@8.4.24) + postcss-selector-parser: 6.0.13 + postcss-value-parser: 4.2.0 + resolve: 1.22.2 + sucrase: 3.32.0 + transitivePeerDependencies: + - ts-node + dev: true + + /text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + dev: true + + /thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + dependencies: + thenify: 3.3.1 + dev: true + + /thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + dependencies: + any-promise: 1.3.0 + dev: true + + /to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /tr46@1.0.1: + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + dependencies: + punycode: 2.3.0 + dev: true + + /tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + dev: true + + /ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + dev: true + + /tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: true + + /tslib@2.5.3: + resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} + dev: true + + /tsup@6.7.0(postcss@8.4.24)(typescript@5.0.3): + resolution: {integrity: sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==} + engines: {node: '>=14.18'} + hasBin: true + peerDependencies: + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.1.0' + peerDependenciesMeta: + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + dependencies: + bundle-require: 4.0.1(esbuild@0.17.19) + cac: 6.7.14 + chokidar: 3.5.3 + debug: 4.3.4 + esbuild: 0.17.19 + execa: 5.1.1 + globby: 11.1.0 + joycon: 3.1.1 + postcss: 8.4.24 + postcss-load-config: 3.1.4(postcss@8.4.24) + resolve-from: 5.0.0 + rollup: 3.24.0 + source-map: 0.8.0-beta.0 + sucrase: 3.32.0 + tree-kill: 1.2.2 + typescript: 5.0.3 + transitivePeerDependencies: + - supports-color + - ts-node + dev: true + + /tsutils@3.21.0(typescript@5.0.3): + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 5.0.3 + dev: true + + /tsx@3.12.7: + resolution: {integrity: sha512-C2Ip+jPmqKd1GWVQDvz/Eyc6QJbGfE7NrR3fx5BpEHMZsEHoIxHL1j+lKdGobr8ovEyqeNkPLSKp6SCSOt7gmw==} + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': 2.4.2 + '@esbuild-kit/core-utils': 3.1.0 + '@esbuild-kit/esm-loader': 2.5.5 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + dev: true + + /type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + dev: true + + /typescript@5.0.3: + resolution: {integrity: sha512-xv8mOEDnigb/tN9PSMTwSEqAnUvkoXMQlicOb0IUVDBSQCgBSaAAROUZYy2IcUy5qU6XajK5jjjO7TMWqBTKZA==} + engines: {node: '>=12.20'} + hasBin: true + dev: true + + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.3.0 + dev: true + + /util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: true + + /webidl-conversions@4.0.2: + resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} + dev: true + + /whatwg-url@7.1.0: + resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + dev: true + + /which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /word-wrap@1.2.3: + resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} + engines: {node: '>=0.10.0'} + dev: true + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true + + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true + + /yaml@1.10.2: + resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} + engines: {node: '>= 6'} + dev: true + + /yaml@2.3.1: + resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} + engines: {node: '>= 14'} + dev: true + + /yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true diff --git a/packages/plugin/postcss.config.cjs b/packages/plugin/postcss.config.cjs new file mode 100644 index 00000000..d37fcf98 --- /dev/null +++ b/packages/plugin/postcss.config.cjs @@ -0,0 +1,11 @@ +const tailwindcss = require('tailwindcss'); + +const config = { + plugins: [ + require('postcss-import'), + //Some plugins, like tailwindcss/nesting, need to run before Tailwind, + tailwindcss() + ] +}; + +module.exports = config; diff --git a/packages/plugin/scripts/@types/postcss-js.d.ts b/packages/plugin/scripts/@types/postcss-js.d.ts new file mode 100755 index 00000000..f5da9439 --- /dev/null +++ b/packages/plugin/scripts/@types/postcss-js.d.ts @@ -0,0 +1,36 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +// Type definitions for postcss-js 4.0 +// Project: https://github.com/postcss/postcss-js +// Definitions by: Adam Thompson-Sharpe +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'postcss-js' { + type CssInJs = Record; + /** + * Convert a PostCSS `Root` into a CSS-in-JS object + * @param root The root to convert + * @returns CSS-in-JS object + */ + function objectify(root: import('postcss').Root): CssInJs; + + /** + * Parse a CSS-in-JS object into a PostCSS `Root` + * @param obj The CSS-in-JS to parse + * @returns A PostCSS `Root` + */ + function parse(obj: CssInJs): import('postcss').Root; + + /** + * Create a PostCSS processor with a simple API + * @param plugins Synchronous plugins to use with PostCSS + * @returns A processor function that accepts (idk) and returns a CSS-in-JS object + */ + function sync(plugins: import('postcss').AcceptedPlugin[]): (input: CssInJs) => CssInJs; + + /** + * Create a PostCSS processor with a simple API, allowing asynchronous plugins + * @param plugins Plugins to use with PostCSS + * @returns A processor function that accepts (idk) and returns a CSS-in-JS object + */ + function async(plugins: import('postcss').AcceptedPlugin[]): (input: CssInJs) => Promise; +} diff --git a/packages/skeleton/scripts/compile-css-to-js.cjs b/packages/plugin/scripts/compile-css-to-js.ts similarity index 63% rename from packages/skeleton/scripts/compile-css-to-js.cjs rename to packages/plugin/scripts/compile-css-to-js.ts index 1f1e83eb..11011f87 100644 --- a/packages/skeleton/scripts/compile-css-to-js.cjs +++ b/packages/plugin/scripts/compile-css-to-js.ts @@ -1,18 +1,23 @@ -const postcss = require('postcss'); -const postcssJs = require('postcss-js'); -const fs = require('fs'); -const postcssImport = require('postcss-import'); -const tailwindcss = require('tailwindcss'); +import postcss, { type PluginCreator } from 'postcss'; +import postcssJs from 'postcss-js'; +import { readFileSync } from 'fs'; +import postcssImport from 'postcss-import'; +import tw from 'tailwindcss'; +import type { Config } from 'tailwindcss'; +import { corePlugin } from '../src/tailwind/core.js'; + +// tailwind needs to fix their exports :] +const tailwindcss = tw as unknown as PluginCreator; // Transpiles all of our library's CSS to JS -async function transpileCssToJs(cssEntryPath, plugins = []) { - const selectors = []; +export async function transpileCssToJs(cssEntryPath: string, plugins: Config['plugins'] = []) { + const selectors: string[] = []; - // We'll first get all the custom the class names, + // We'll first get all the custom class names, // then we can feed that into the TW preprocessor as the `content` // so that TW can detect and generate them properly - const css = fs.readFileSync(cssEntryPath, 'utf8'); + const css = readFileSync(cssEntryPath, 'utf8'); const processor = postcss([postcssImport()]); const result = await processor.process(css, { from: cssEntryPath }); @@ -27,11 +32,11 @@ async function transpileCssToJs(cssEntryPath, plugins = []) { darkMode: 'class', content: [{ raw: selectors.join(' ') }], plugins: [ - require('../src/lib/tailwind/core.cjs'), + corePlugin, // add skeleton component classes for the base styles ...plugins ] - }; + } satisfies Config; const result2 = await postcss([postcssImport(), tailwindcss(twConfig)]).process(css, { from: cssEntryPath }); if (result2.root.type === 'document') throw Error('This should never happen'); @@ -44,10 +49,10 @@ async function transpileCssToJs(cssEntryPath, plugins = []) { // Generates all TW base styles so that we can use this to // the remove duplicates in our plugin. // Takes ~600ms second to run. -async function generateBaseTWStyles() { +export async function generateBaseTWStyles() { const twConfig = { content: [{ raw: 'w-1' }] - }; + } satisfies Config; const result = await postcss(tailwindcss(twConfig)).process('@tailwind base', { from: undefined }); if (result.root.type === 'document') throw Error('This should never happen'); @@ -56,5 +61,3 @@ async function generateBaseTWStyles() { return cssInJs; } - -module.exports = { transpileCssToJs, generateBaseTWStyles }; diff --git a/packages/plugin/scripts/convert-theme.ts b/packages/plugin/scripts/convert-theme.ts new file mode 100644 index 00000000..13ca7f20 --- /dev/null +++ b/packages/plugin/scripts/convert-theme.ts @@ -0,0 +1,35 @@ +import { readFileSync } from 'fs'; +import { writeFile } from 'fs/promises'; +import postcss from 'postcss'; +import postcssJs from 'postcss-js'; +import type { Theme } from '../src/tailwind/themes'; + +// Converts a theme's .css file into a .ts file. +export async function convertTheme(name: string) { + const cssEntryPath = `./src/themes/theme-${name}.css`; + const css = readFileSync(cssEntryPath, 'utf8'); + const result = postcss().process(css, { from: cssEntryPath }); + + const cssInJs = postcssJs.objectify(result.root); + + const properties = { ...cssInJs[':root'] }; + + delete cssInJs[':root']; + + const theme = { + properties: properties, + enhancements: { ...cssInJs } + } satisfies Theme; + + // Creates the generated CSS-in-JS file + await writeFile( + `./src/tailwind/themes/${name}.ts`, + `import type { Theme } from './index.js'; + +const ${name} = ${JSON.stringify(theme, undefined, '\t')} satisfies Theme; + +export default ${name};` + ).catch((e) => console.error(e)); +} + +convertTheme('vintage'); diff --git a/packages/plugin/scripts/generate-jss.ts b/packages/plugin/scripts/generate-jss.ts new file mode 100644 index 00000000..673ef031 --- /dev/null +++ b/packages/plugin/scripts/generate-jss.ts @@ -0,0 +1,63 @@ +#!/usr/bin/env tsx +import type { CssInJs } from 'postcss-js'; +import { generateBaseTWStyles, transpileCssToJs } from './compile-css-to-js.js'; +import { mkdir, writeFile } from 'fs/promises'; +import plugin from 'tailwindcss/plugin.js'; + +const INTELLISENSE_FILE_NAME = 'generated-classes.js'; +const GENERATED_DIR_PATH = `./src/tailwind/generated`; + +async function exec() { + // Makes directory that stores our generated CSS-in-JS + await mkdir(GENERATED_DIR_PATH).catch(() => { + // directory already exists + }); + + const baseTWStyles = await generateBaseTWStyles(); + + const generatedComponentJSS = await transpileCssToJs('./src/styles/components.css'); + const cleanedComponentClasses = removeDuplicateClasses(generatedComponentJSS, baseTWStyles); + const componentClasses = patchMediaQueries(cleanedComponentClasses); + + const componentPlugin = plugin(({ addComponents }) => { + addComponents(componentClasses); + }); + const generatedBaseJSS = await transpileCssToJs('./src/styles/base.css', [componentPlugin]); + const baseStyles = removeDuplicateClasses(generatedBaseJSS, baseTWStyles); + + // Creates the generated CSS-in-JS file + await writeFile( + `${GENERATED_DIR_PATH}/${INTELLISENSE_FILE_NAME}`, + `module.exports = { components: ${JSON.stringify(componentClasses)}, base: ${JSON.stringify(baseStyles)} };` + ).catch((e) => console.error(e)); +} + +// Purges the generated CSS-in-JS file of duplicate TW classes +function removeDuplicateClasses(cssInJs: CssInJs, baseTWStyles: CssInJs) { + // We'll delete all the TW Base styles (i.e. html {...} body {...} etc.) + for (const key of Object.keys(cssInJs)) { + if (baseTWStyles[key] !== undefined) delete cssInJs[key]; + } + + return cssInJs; +} + +// Moves all of the media queries towards the end of the cssInJs object. +function patchMediaQueries(cssInJs: CssInJs) { + const mediaQueries: CssInJs = {}; + + for (const key of Object.keys(cssInJs)) { + if (key.startsWith('@media')) { + mediaQueries[key] = cssInJs[key]; + delete cssInJs[key]; + } + } + + for (const key of Object.keys(mediaQueries)) { + cssInJs[key] = mediaQueries[key]; + } + + return cssInJs; +} + +exec(); diff --git a/packages/plugin/scripts/watcher.js b/packages/plugin/scripts/watcher.js new file mode 100644 index 00000000..be2a0c7e --- /dev/null +++ b/packages/plugin/scripts/watcher.js @@ -0,0 +1,24 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const chokidar = require('chokidar'); +const { join, resolve, basename } = require('path'); +const { exec } = require('child_process'); + +const pathToStyles = resolve('.', join('src')); +// We want to ignore the `generated` dir so we don't have an endless loop +const generatedPath = resolve('.', join('src', 'tailwind', 'generated')); + +// Simple watcher to detect changes in /packages/plugin/src +// This will rebuild the package on any `src` file changes. +let locked = false; + +chokidar.watch(pathToStyles, { ignored: [generatedPath] }).on('change', (path) => { + const now = Date.now(); + console.log(`[Build Start]: File Updated: ${basename(path)}`); + if (!locked) { + locked = true; + exec('pnpm -F @skeletonlabs/tw-plugin build', () => { + console.log(`[Build End]: Completed in ${Date.now() - now}ms`); + locked = false; + }); + } +}); diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts new file mode 100644 index 00000000..8dbd815f --- /dev/null +++ b/packages/plugin/src/index.ts @@ -0,0 +1,73 @@ +import plugin from 'tailwindcss/plugin.js'; +import postcssJs from 'postcss-js'; +import { coreConfig, coreUtilities, getSkeletonClasses } from './tailwind/core.js'; +import { themes, getThemeProperties } from './tailwind/themes/index.js'; +import { prefixSelector } from './tailwind/prefixSelector.js'; +import type { CSSRuleObject } from 'tailwindcss/types/config.js'; +import type { ConfigOptions, CustomThemeConfig, PresetThemeConfig, ThemeConfig } from './types.js'; + +const skeleton = plugin.withOptions( + // Plugin Creator + (options) => { + return ({ addBase, addComponents, addUtilities }) => { + const { components, base } = getSkeletonClasses(); + let baseStyles: CSSRuleObject = {}; + let componentStyles = components; + + // Base styles configuration + if (options?.base !== false) { + baseStyles = { ...base }; + } + + // Custom Themes configuration + options?.themes?.custom?.forEach((theme) => { + // it's a custom theme + baseStyles[`:root [data-theme='${theme.name}']`] = theme.properties; + }); + + // Preset Themes configuration + options?.themes?.preset?.forEach((theme) => { + // it's a preset theme but just the name was passed in + if (typeof theme === 'string') { + const themeName = theme; + // we only want the properties + baseStyles[`:root [data-theme='${themeName}']`] = themes[themeName].properties; + return; + } + + // it's a preset theme + if (!('properties' in theme)) { + baseStyles[`:root [data-theme='${theme.name}']`] = themes[theme.name].properties; + + if (theme.enhancements === true) { + // enhancements are opt-in + baseStyles = { ...baseStyles, ...themes[theme.name].enhancements }; + } + return; + } + }); + + // Prefix component classes + if (options?.prefix) { + const prefix = options?.prefix; + const root = postcssJs.parse(components); + root.walkRules((rule) => { + rule.selector = prefixSelector(prefix, rule.selector); + }); + + componentStyles = postcssJs.objectify(root); + } + + addBase(baseStyles); + addUtilities(coreUtilities); + addComponents(componentStyles, { respectPrefix: false }); + }; + }, + // Config + () => { + return { ...coreConfig }; + } +); + +export { getThemeProperties, skeleton }; +export type { CustomThemeConfig, ConfigOptions, PresetThemeConfig, ThemeConfig }; diff --git a/packages/plugin/src/styles/base.css b/packages/plugin/src/styles/base.css new file mode 100644 index 00000000..c74dd0d2 --- /dev/null +++ b/packages/plugin/src/styles/base.css @@ -0,0 +1,2 @@ +@import 'tailwind.css'; +@import 'base/index.css'; diff --git a/packages/skeleton/src/lib/styles/partials/core.css b/packages/plugin/src/styles/base/core.css similarity index 78% rename from packages/skeleton/src/lib/styles/partials/core.css rename to packages/plugin/src/styles/base/core.css index da541546..56893edc 100644 --- a/packages/skeleton/src/lib/styles/partials/core.css +++ b/packages/plugin/src/styles/base/core.css @@ -5,6 +5,8 @@ body { @apply bg-surface-50-900-token; + /* Typography */ + @apply text-base font-token text-token; } /* === Selection === */ @@ -46,21 +48,9 @@ scrollbar-color: rgba(255, 255, 255, 0.1) rgba(0, 0, 0, 0.05); } - /* Hide Scrollbars */ - .hide-scrollbar::-webkit-scrollbar { - display: none; - } - .hide-scrollbar { - -ms-overflow-style: none; /* IE/Edge */ - scrollbar-width: none; /* Firefox */ - } - /* === Horizontal Rules === */ hr:not(.divider) { @apply block border-t border-solid border-surface-300-600-token; } - .divider-vertical { - @apply inline-block border-l border-solid border-surface-300-600-token min-h-[10px] mx-auto; - } } diff --git a/packages/plugin/src/styles/base/elements.css b/packages/plugin/src/styles/base/elements.css new file mode 100644 index 00000000..4b19e9fe --- /dev/null +++ b/packages/plugin/src/styles/base/elements.css @@ -0,0 +1,35 @@ +/* Tailwind Elements: elements.css */ + +@layer base { + /* === States === */ + + /* File Input Button */ + input[type='file']:not(.file-dropzone-input)::file-selector-button { + @apply border-0 btn variant-filled btn-sm mr-2; + } + + /* Range Input */ + /* https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color */ + [type='range'] { + @apply w-full accent-surface-900 dark:accent-surface-50; + } + + /* === Sort Styles ==== */ + + [data-sort] { + @apply hover:bg-primary-hover-token cursor-pointer; + /* Sort Icon - invisible by default */ + @apply after:opacity-0 after:!ml-2 after:!content-['↓']; + } + + /* === Popup === */ + + [data-popup] { + /* https://floating-ui.com/docs/computeposition#usage */ + @apply absolute top-0 left-0; + /* Set hidden on page load */ + @apply hidden; + /* Transitions */ + @apply transition-opacity duration-150; + } +} diff --git a/packages/plugin/src/styles/base/forms.css b/packages/plugin/src/styles/base/forms.css new file mode 100644 index 00000000..01a73d81 --- /dev/null +++ b/packages/plugin/src/styles/base/forms.css @@ -0,0 +1,63 @@ +/* Stylesheet: forms.css */ + +@layer base { + /* === Resets === */ + + fieldset, + legend, + label { + @apply block; + } + + /* Placeholders */ + ::-moz-placeholder { + @apply text-surface-500-400-token; + } + :-ms-input-placeholder { + @apply text-surface-500-400-token; + } + ::placeholder { + @apply text-surface-500-400-token; + } + + /* Date Calendar Picker (Webkit) */ + input::-webkit-calendar-picker-indicator { + @apply dark:invert; + } + + /* Search Input "X" Cancel Button (Webkit) */ + /* Source: https://stackoverflow.com/a/64267916 */ + input[type='search']::-webkit-search-cancel-button { + -webkit-appearance: none; + background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z'/%3E%3C/svg%3E") + no-repeat 50% 50%; + @apply h-4 w-4 rounded-full bg-contain opacity-0 pointer-events-none; + } + input[type='search']:focus::-webkit-search-cancel-button { + @apply opacity-100 pointer-events-auto; + } + input[type='search']::-webkit-search-cancel-button { + @apply dark:invert; + } + + /* Progress Bar */ + progress { + webkit-appearance: none; + -moz-appearance: none; + appearance: none; + @apply w-full h-2 overflow-hidden rounded-token; + @apply bg-surface-400-500-token; + } + progress::-webkit-progress-bar { + @apply bg-surface-400-500-token; + } + progress::-webkit-progress-value { + @apply bg-surface-900-50-token; + } + ::-moz-progress-bar { + @apply bg-surface-900-50-token; + } + :indeterminate::-moz-progress-bar { + width: 0; + } +} diff --git a/packages/plugin/src/styles/base/index.css b/packages/plugin/src/styles/base/index.css new file mode 100644 index 00000000..06ba53aa --- /dev/null +++ b/packages/plugin/src/styles/base/index.css @@ -0,0 +1,4 @@ +/* Core should be optional in the plugin */ +@import 'core.css'; +@import 'forms.css'; +@import 'elements.css'; diff --git a/packages/plugin/src/styles/components.css b/packages/plugin/src/styles/components.css new file mode 100644 index 00000000..f70a14c6 --- /dev/null +++ b/packages/plugin/src/styles/components.css @@ -0,0 +1,2 @@ +@import 'tailwind.css'; +@import 'components/index.css'; diff --git a/packages/skeleton/src/lib/styles/elements/alerts.css b/packages/plugin/src/styles/components/alerts.css similarity index 100% rename from packages/skeleton/src/lib/styles/elements/alerts.css rename to packages/plugin/src/styles/components/alerts.css diff --git a/packages/skeleton/src/lib/styles/elements/badges.css b/packages/plugin/src/styles/components/badges.css similarity index 100% rename from packages/skeleton/src/lib/styles/elements/badges.css rename to packages/plugin/src/styles/components/badges.css diff --git a/packages/skeleton/src/lib/styles/elements/breadcrumbs.css b/packages/plugin/src/styles/components/breadcrumbs.css similarity index 68% rename from packages/skeleton/src/lib/styles/elements/breadcrumbs.css rename to packages/plugin/src/styles/components/breadcrumbs.css index deac4834..f1f4d6e0 100644 --- a/packages/skeleton/src/lib/styles/elements/breadcrumbs.css +++ b/packages/plugin/src/styles/components/breadcrumbs.css @@ -1,16 +1,6 @@ /* Tailwind Elements: breadcrumbs.css */ @layer components { - /* Hide Scrollbars */ - /* Duplicated from core.css to support `skeleton-minimal.css` */ - .hide-scrollbar::-webkit-scrollbar { - display: none; - } - .hide-scrollbar { - -ms-overflow-style: none; /* IE/Edge */ - scrollbar-width: none; /* Firefox */ - } - .breadcrumb, .breadcrumb-nonresponsive { @apply flex items-center space-x-4 w-full hide-scrollbar overflow-x-auto; diff --git a/packages/skeleton/src/lib/styles/elements/buttons.css b/packages/plugin/src/styles/components/buttons.css similarity index 93% rename from packages/skeleton/src/lib/styles/elements/buttons.css rename to packages/plugin/src/styles/components/buttons.css index 518a9d5a..221e9dda 100644 --- a/packages/skeleton/src/lib/styles/elements/buttons.css +++ b/packages/plugin/src/styles/components/buttons.css @@ -3,10 +3,6 @@ @layer components { /* === States === */ - button:disabled { - @apply !opacity-50 !cursor-not-allowed active:scale-100 hover:brightness-100; - } - .button-base-styles { /* Size (match base) */ @apply text-base; @@ -29,6 +25,10 @@ @apply button-base-styles rounded-token active:scale-[95%] active:brightness-90; } + .btn:disabled { + @apply !opacity-50 !cursor-not-allowed active:scale-100 hover:brightness-100; + } + /* Button: Sizes */ /* Note: Default values are built into `.btn` */ .btn-sm { @@ -71,11 +71,6 @@ @apply text-xl aspect-square w-[63px]; } - /* File Input Button */ - input[type='file']:not(.file-dropzone-input)::file-selector-button { - @apply border-0 btn variant-filled btn-sm mr-2; - } - /* === Button Groups === */ .btn-group { diff --git a/packages/skeleton/src/lib/styles/elements/cards.css b/packages/plugin/src/styles/components/cards.css similarity index 100% rename from packages/skeleton/src/lib/styles/elements/cards.css rename to packages/plugin/src/styles/components/cards.css diff --git a/packages/skeleton/src/lib/styles/elements/chips.css b/packages/plugin/src/styles/components/chips.css similarity index 100% rename from packages/skeleton/src/lib/styles/elements/chips.css rename to packages/plugin/src/styles/components/chips.css diff --git a/packages/skeleton/src/lib/styles/elements/codeblocks.css b/packages/plugin/src/styles/components/codeblocks.css similarity index 100% rename from packages/skeleton/src/lib/styles/elements/codeblocks.css rename to packages/plugin/src/styles/components/codeblocks.css diff --git a/packages/plugin/src/styles/components/dividers.css b/packages/plugin/src/styles/components/dividers.css new file mode 100644 index 00000000..4446bf5d --- /dev/null +++ b/packages/plugin/src/styles/components/dividers.css @@ -0,0 +1,7 @@ +@layer components { + /* === Horizontal Rules === */ + + .divider-vertical { + @apply inline-block border-l border-solid border-surface-300-600-token min-h-[10px] mx-auto; + } +} diff --git a/packages/skeleton/src/lib/styles/elements/forms.css b/packages/plugin/src/styles/components/forms.css similarity index 70% rename from packages/skeleton/src/lib/styles/elements/forms.css rename to packages/plugin/src/styles/components/forms.css index 8e82390b..8f76696d 100644 --- a/packages/skeleton/src/lib/styles/elements/forms.css +++ b/packages/plugin/src/styles/components/forms.css @@ -1,72 +1,6 @@ /* Stylesheet: forms.css */ -@layer base { - /* === Resets === */ - - fieldset, - legend, - label { - @apply block; - } - - /* Placeholders */ - ::-moz-placeholder { - @apply text-surface-500-400-token; - } - :-ms-input-placeholder { - @apply text-surface-500-400-token; - } - ::placeholder { - @apply text-surface-500-400-token; - } - - /* Date Calendar Picker (Webkit) */ - input::-webkit-calendar-picker-indicator { - @apply dark:invert; - } - - /* Search Input "X" Cancel Button (Webkit) */ - /* Source: https://stackoverflow.com/a/64267916 */ - input[type='search']::-webkit-search-cancel-button { - -webkit-appearance: none; - background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z'/%3E%3C/svg%3E") - no-repeat 50% 50%; - @apply h-4 w-4 rounded-full bg-contain opacity-0 pointer-events-none; - } - input[type='search']:focus::-webkit-search-cancel-button { - @apply opacity-100 pointer-events-auto; - } - input[type='search']::-webkit-search-cancel-button { - @apply dark:invert; - } - - /* Progress Bar */ - progress { - webkit-appearance: none; - -moz-appearance: none; - appearance: none; - @apply w-full h-2 overflow-hidden rounded-token; - @apply bg-surface-400-500-token; - } - progress::-webkit-progress-bar { - @apply bg-surface-400-500-token; - } - progress::-webkit-progress-value { - @apply bg-surface-900-50-token; - } - ::-moz-progress-bar { - @apply bg-surface-900-50-token; - } - :indeterminate::-moz-progress-bar { - width: 0; - } - - /* Range Input */ - /* https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color */ - [type='range'] { - @apply w-full accent-surface-900 dark:accent-surface-50; - } - +@layer components { /* === Text Labeling === */ .legend { diff --git a/packages/plugin/src/styles/components/index.css b/packages/plugin/src/styles/components/index.css new file mode 100644 index 00000000..2e2149da --- /dev/null +++ b/packages/plugin/src/styles/components/index.css @@ -0,0 +1,23 @@ +@import 'scrollbars.css'; +@import 'dividers.css'; +@import 'typography.css'; + +/* Elements */ +@import 'alerts.css'; +@import 'badges.css'; +@import 'breadcrumbs.css'; +@import 'buttons.css'; +@import 'cards.css'; +@import 'codeblocks.css'; +@import 'chips.css'; +@import 'forms.css'; +@import 'lists.css'; +@import 'logo-clouds.css'; +@import 'placeholders.css'; +@import 'tables.css'; + +/* Utilities */ +@import 'modals.css'; +@import 'popups.css'; + +@import 'variants.css'; diff --git a/packages/skeleton/src/lib/styles/elements/lists.css b/packages/plugin/src/styles/components/lists.css similarity index 100% rename from packages/skeleton/src/lib/styles/elements/lists.css rename to packages/plugin/src/styles/components/lists.css diff --git a/packages/skeleton/src/lib/styles/elements/logo-clouds.css b/packages/plugin/src/styles/components/logo-clouds.css similarity index 100% rename from packages/skeleton/src/lib/styles/elements/logo-clouds.css rename to packages/plugin/src/styles/components/logo-clouds.css diff --git a/packages/plugin/src/styles/components/modals.css b/packages/plugin/src/styles/components/modals.css new file mode 100644 index 00000000..d1dd4385 --- /dev/null +++ b/packages/plugin/src/styles/components/modals.css @@ -0,0 +1,17 @@ +/* Tailwind Elements: modals.css */ + +@layer components { + /* === Modal (helpers) === */ + + .w-modal-slim { + @apply w-full max-w-[400px]; + } + + .w-modal { + @apply w-full max-w-[640px]; + } + + .w-modal-wide { + @apply w-full max-w-[80%]; + } +} diff --git a/packages/skeleton/src/lib/styles/elements/placeholders.css b/packages/plugin/src/styles/components/placeholders.css similarity index 100% rename from packages/skeleton/src/lib/styles/elements/placeholders.css rename to packages/plugin/src/styles/components/placeholders.css diff --git a/packages/plugin/src/styles/components/popups.css b/packages/plugin/src/styles/components/popups.css new file mode 100644 index 00000000..5505cf4e --- /dev/null +++ b/packages/plugin/src/styles/components/popups.css @@ -0,0 +1,9 @@ +/* Tailwind Elements: popups.css */ + +@layer components { + /* === Popup === */ + + [data-popup] .arrow { + @apply absolute rotate-45 w-2 h-2; + } +} diff --git a/packages/plugin/src/styles/components/scrollbars.css b/packages/plugin/src/styles/components/scrollbars.css new file mode 100644 index 00000000..d73796e9 --- /dev/null +++ b/packages/plugin/src/styles/components/scrollbars.css @@ -0,0 +1,11 @@ +@layer components { + /* === Hide Scrollbars === */ + + .hide-scrollbar::-webkit-scrollbar { + display: none; + } + .hide-scrollbar { + -ms-overflow-style: none; /* IE/Edge */ + scrollbar-width: none; /* Firefox */ + } +} diff --git a/packages/skeleton/src/lib/styles/elements/tables.css b/packages/plugin/src/styles/components/tables.css similarity index 90% rename from packages/skeleton/src/lib/styles/elements/tables.css rename to packages/plugin/src/styles/components/tables.css index 9a71f236..a6320166 100644 --- a/packages/skeleton/src/lib/styles/elements/tables.css +++ b/packages/plugin/src/styles/components/tables.css @@ -25,12 +25,6 @@ /* === Sort Styles ==== */ - [data-sort] { - @apply hover:bg-primary-hover-token cursor-pointer; - /* Sort Icon - invisible by default */ - @apply after:opacity-0 after:!ml-2 after:!content-['↓']; - } - .table-sort-asc { @apply after:opacity-50 after:!content-['↑']; } diff --git a/packages/skeleton/src/lib/styles/partials/typography-next.css b/packages/plugin/src/styles/components/typography.css similarity index 93% rename from packages/skeleton/src/lib/styles/partials/typography-next.css rename to packages/plugin/src/styles/components/typography.css index 6a338370..f4a5afe8 100644 --- a/packages/skeleton/src/lib/styles/partials/typography-next.css +++ b/packages/plugin/src/styles/components/typography.css @@ -2,14 +2,9 @@ /* This represents the OPT-IN typography styles. -IMPORTANT: take care to maintain parity with typography.css! */ -@layer base { - body { - @apply text-base font-token text-token; - } - +@layer components { /* === Headings === */ .h1 { diff --git a/packages/skeleton/src/lib/styles/partials/variants.css b/packages/plugin/src/styles/components/variants.css similarity index 100% rename from packages/skeleton/src/lib/styles/partials/variants.css rename to packages/plugin/src/styles/components/variants.css diff --git a/packages/plugin/src/styles/tailwind.css b/packages/plugin/src/styles/tailwind.css new file mode 100644 index 00000000..1e1ad6f6 --- /dev/null +++ b/packages/plugin/src/styles/tailwind.css @@ -0,0 +1,32 @@ +/* Stylesheet: tailwind.css */ + +/* + https://tailwindcss.com/docs/functions-and-directives +*/ + +/** + * This injects Tailwind's base styles and any base styles registered by + * plugins. + */ +@tailwind base; + +/** + * This injects Tailwind's component classes and any component classes + * registered by plugins. + */ +@tailwind components; + +/** + * This injects Tailwind's utility classes and any utility classes registered + * by plugins. + */ +@tailwind utilities; + +/** + * Use this directive to control where Tailwind injects the hover, focus, + * responsive, dark mode, and other variants of each class. + * + * If omitted, Tailwind will append these classes to the very end of + * your stylesheet by default. + */ +@tailwind variants; diff --git a/packages/skeleton/src/lib/tailwind/theme/colors.cjs b/packages/plugin/src/tailwind/colors.ts similarity index 62% rename from packages/skeleton/src/lib/tailwind/theme/colors.cjs rename to packages/plugin/src/tailwind/colors.ts index 5953e1e6..b05f93cc 100644 --- a/packages/skeleton/src/lib/tailwind/theme/colors.cjs +++ b/packages/plugin/src/tailwind/colors.ts @@ -1,18 +1,24 @@ // Extends Tailwind with Skeleton theme-specific colors values // Doc: https://tailwindcss.com/docs/customizing-colors#using-css-variables -const settings = require('../settings.cjs'); +import settings from './settings.js'; + +type Shade = { [shadeValue: number]: string }; // ex: `50: 'rgb(var(--color-primary-50) / )'` -function generatePaletteShades(colorName) { - const shadeObj = {}; +function generatePaletteShades(colorName: string) { + const shadeObj: Shade = {}; settings.colorShades.forEach((s) => (shadeObj[s] = `rgb(var(--color-${colorName}-${s}) / )`)); return shadeObj; } +type Palette = { [colorName: string]: Shade }; + // Generate a a color shade palette 50-900 per each color available -module.exports = () => { - const paletteObj = {}; +export const colors = () => { + const paletteObj: Palette = {}; settings.colorNames.forEach((n) => (paletteObj[n] = generatePaletteShades(n))); return paletteObj; }; + +export default colors; diff --git a/packages/plugin/src/tailwind/core.ts b/packages/plugin/src/tailwind/core.ts new file mode 100644 index 00000000..1f01bacb --- /dev/null +++ b/packages/plugin/src/tailwind/core.ts @@ -0,0 +1,59 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +// The Skeleton Tailwind Plugin +// Tailwind Docs: https://tailwindcss.com/docs/plugins +// Skeleton Docs: https://www.skeleton.dev/docs/get-started + +import plugin from 'tailwindcss/plugin.js'; + +// Skeleton Theme Modules +import themeColors from './colors.js'; +// Skeleton Design Token Modules +import tokensBackgrounds from './tokens/backgrounds.js'; +import tokensBorders from './tokens/borders.js'; +import tokensBorderRadius from './tokens/border-radius.js'; +import tokensFills from './tokens/fills.js'; +import tokensText from './tokens/text.js'; +import tokensRings from './tokens/rings.js'; + +export const coreUtilities = { + // Implement Skeleton design token classes + ...tokensBackgrounds(), + ...tokensBorders(), + ...tokensBorderRadius(), + ...tokensFills(), + ...tokensText(), + ...tokensRings() +}; + +export const coreConfig = { + theme: { + extend: { + // Implement Skeleton theme colors + colors: themeColors() + } + } +}; + +// export const coreClasses = getSkeletonClasses(); + +export function getSkeletonClasses() { + // try/catch because it will throw when generated-classes.js isn't generated yet + try { + const { components, base } = require('./generated/generated-classes.js'); + + if (typeof components !== 'object' || typeof base !== 'object') { + console.error('Failed to load Skeleton classes'); + process.exitCode = 1; + } + + return { components, base }; + } catch { + console.error("generated-classes.js hasn't generated yet"); + } + + return { components: undefined, base: undefined }; +} + +export const corePlugin = plugin(({ addUtilities }) => { + addUtilities(coreUtilities); +}, coreConfig); diff --git a/packages/plugin/src/tailwind/prefixSelector.ts b/packages/plugin/src/tailwind/prefixSelector.ts new file mode 100644 index 00000000..227a1b11 --- /dev/null +++ b/packages/plugin/src/tailwind/prefixSelector.ts @@ -0,0 +1,28 @@ +// Credits: https://github.com/tailwindlabs/tailwindcss/blob/master/src/util/prefixSelector.js +import parser from 'postcss-selector-parser'; + +/** + * Prefix all classes in the selector with the given prefix + */ +export function prefixSelector(prefix: string, selector: string, prependNegative = false): string { + if (prefix === '') { + return selector; + } + + const ast = parser().astSync(selector); + + ast.walkClasses((classSelector) => { + const baseClass = classSelector.value; + + // don't modify the dark class + if (baseClass === 'dark') { + return; + } + + const shouldPlaceNegativeBeforePrefix = prependNegative && baseClass.startsWith('-'); + + classSelector.value = shouldPlaceNegativeBeforePrefix ? `-${prefix}${baseClass.slice(1)}` : `${prefix}${baseClass}`; + }); + + return ast.toString(); +} diff --git a/packages/skeleton/src/lib/tailwind/settings.cjs b/packages/plugin/src/tailwind/settings.ts similarity index 79% rename from packages/skeleton/src/lib/tailwind/settings.cjs rename to packages/plugin/src/tailwind/settings.ts index d307494d..e068e97a 100644 --- a/packages/skeleton/src/lib/tailwind/settings.cjs +++ b/packages/plugin/src/tailwind/settings.ts @@ -1,6 +1,6 @@ // Common Shared Settings and Constants -module.exports = { +export const settings = { colorNames: ['primary', 'secondary', 'tertiary', 'success', 'warning', 'error', 'surface'], colorShades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900], colorPairings: [ @@ -17,4 +17,10 @@ module.exports = { { light: 600, dark: 300 }, { light: 500, dark: 400 } ] +} as const; + +export type CssClasses = { + [className: string]: string | CssClasses; }; + +export default settings; diff --git a/packages/plugin/src/tailwind/themes/crimson.ts b/packages/plugin/src/tailwind/themes/crimson.ts new file mode 100644 index 00000000..a414c0f9 --- /dev/null +++ b/packages/plugin/src/tailwind/themes/crimson.ts @@ -0,0 +1,94 @@ +import type { Theme } from './index.js'; + +const crimson = { + properties: { + '--theme-font-family-base': + "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n\t\t'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'", + '--theme-font-family-heading': 'system-ui', + '--theme-font-color-base': 'var(--color-surface-900)', + '--theme-font-color-dark': 'var(--color-surface-50)', + '--theme-rounded-base': '24px', + '--theme-rounded-container': '24px', + '--theme-border-base': '1px', + '--on-primary': '255 255 255', + '--on-secondary': '255 255 255', + '--on-tertiary': '0 0 0', + '--on-success': '0 0 0', + '--on-warning': '0 0 0', + '--on-error': '0 0 0', + '--on-surface': '255 255 255', + '--color-primary-50': '249 220 226', + '--color-primary-100': '246 208 216', + '--color-primary-200': '244 197 206', + '--color-primary-300': '238 162 177', + '--color-primary-400': '225 92 119', + '--color-primary-500': '212 22 60', + '--color-primary-600': '191 20 54', + '--color-primary-700': '159 17 45', + '--color-primary-800': '127 13 36', + '--color-primary-900': '104 11 29', + '--color-secondary-50': '227 237 243', + '--color-secondary-100': '218 231 239', + '--color-secondary-200': '209 225 235', + '--color-secondary-300': '181 206 223', + '--color-secondary-400': '126 170 199', + '--color-secondary-500': '70 133 175', + '--color-secondary-600': '63 120 158', + '--color-secondary-700': '53 100 131', + '--color-secondary-800': '42 80 105', + '--color-secondary-900': '34 65 86', + '--color-tertiary-50': '246 244 244', + '--color-tertiary-100': '242 240 240', + '--color-tertiary-200': '239 237 236', + '--color-tertiary-300': '230 226 225', + '--color-tertiary-400': '211 204 203', + '--color-tertiary-500': '192 182 180', + '--color-tertiary-600': '173 164 162', + '--color-tertiary-700': '144 137 135', + '--color-tertiary-800': '115 109 108', + '--color-tertiary-900': '94 89 88', + '--color-success-50': '246 250 239', + '--color-success-100': '243 248 234', + '--color-success-200': '240 247 229', + '--color-success-300': '230 241 213', + '--color-success-400': '212 231 182', + '--color-success-500': '193 221 151', + '--color-success-600': '174 199 136', + '--color-success-700': '145 166 113', + '--color-success-800': '116 133 91', + '--color-success-900': '95 108 74', + '--color-warning-50': '251 246 231', + '--color-warning-100': '250 243 223', + '--color-warning-200': '248 240 215', + '--color-warning-300': '244 231 191', + '--color-warning-400': '236 212 142', + '--color-warning-500': '228 194 94', + '--color-warning-600': '205 175 85', + '--color-warning-700': '171 146 71', + '--color-warning-800': '137 116 56', + '--color-warning-900': '112 95 46', + '--color-error-50': '248 236 236', + '--color-error-100': '246 229 230', + '--color-error-200': '244 223 224', + '--color-error-300': '237 204 205', + '--color-error-400': '224 165 167', + '--color-error-500': '210 127 129', + '--color-error-600': '189 114 116', + '--color-error-700': '158 95 97', + '--color-error-800': '126 76 77', + '--color-error-900': '103 62 63', + '--color-surface-50': '223 224 226', + '--color-surface-100': '213 213 217', + '--color-surface-200': '202 203 207', + '--color-surface-300': '170 171 179', + '--color-surface-400': '107 109 121', + '--color-surface-500': '43 46 64', + '--color-surface-600': '39 41 58', + '--color-surface-700': '32 35 48', + '--color-surface-800': '26 28 38', + '--color-surface-900': '21 23 31' + }, + enhancements: {} +} satisfies Theme; + +export default crimson; diff --git a/packages/plugin/src/tailwind/themes/gold-nouveau.ts b/packages/plugin/src/tailwind/themes/gold-nouveau.ts new file mode 100644 index 00000000..7b4499de --- /dev/null +++ b/packages/plugin/src/tailwind/themes/gold-nouveau.ts @@ -0,0 +1,117 @@ +import type { Theme } from './index.js'; + +const goldNouveau = { + properties: { + '--theme-font-family-base': 'system-ui, sans-serif', + '--theme-font-family-heading': "'Quicksand', sans-serif", + '--theme-font-color-base': 'var(--color-surface-900)', + '--theme-font-color-dark': 'var(--color-surface-50)', + '--theme-rounded-base': '4px', + '--theme-rounded-container': '4px', + '--theme-border-base': '1px', + '--on-primary': '255 255 255', + '--on-secondary': '255 255 255', + '--on-tertiary': '255 255 255', + '--on-success': '0 0 0', + '--on-warning': '0 0 0', + '--on-error': '255 255 255', + '--on-surface': '255 255 255', + '--color-primary-50': '250 248 252', + '--color-primary-100': '242 238 247', + '--color-primary-200': '229 220 239', + '--color-primary-300': '209 192 226', + '--color-primary-400': '162 129 197', + '--color-primary-500': '116 74 161', + '--color-primary-600': '83 53 115', + '--color-primary-700': '60 39 84', + '--color-primary-800': '35 22 49', + '--color-primary-900': '18 11 24', + '--color-secondary-50': '218 234 251', + '--color-secondary-100': '205 227 250', + '--color-secondary-200': '193 220 249', + '--color-secondary-300': '155 199 245', + '--color-secondary-400': '81 156 237', + '--color-secondary-500': '6 114 229', + '--color-secondary-600': '5 103 206', + '--color-secondary-700': '5 86 172', + '--color-secondary-800': '4 68 137', + '--color-secondary-900': '3 56 112', + '--color-tertiary-50': '236 235 250', + '--color-tertiary-100': '229 228 248', + '--color-tertiary-200': '223 221 247', + '--color-tertiary-300': '204 201 241', + '--color-tertiary-400': '165 161 231', + '--color-tertiary-500': '127 120 221', + '--color-tertiary-600': '114 108 199', + '--color-tertiary-700': '95 90 166', + '--color-tertiary-800': '76 72 133', + '--color-tertiary-900': '62 59 108', + '--color-success-50': '234 246 237', + '--color-success-100': '227 243 231', + '--color-success-200': '220 241 225', + '--color-success-300': '199 232 206', + '--color-success-400': '156 214 170', + '--color-success-500': '114 197 133', + '--color-success-600': '103 177 120', + '--color-success-700': '86 148 100', + '--color-success-800': '68 118 80', + '--color-success-900': '56 97 65', + '--color-warning-50': '251 236 218', + '--color-warning-100': '250 229 206', + '--color-warning-200': '249 223 193', + '--color-warning-300': '245 204 156', + '--color-warning-400': '238 165 82', + '--color-warning-500': '231 127 8', + '--color-warning-600': '208 114 7', + '--color-warning-700': '173 95 6', + '--color-warning-800': '139 76 5', + '--color-warning-900': '113 62 4', + '--color-error-50': '238 219 222', + '--color-error-100': '233 207 211', + '--color-error-200': '227 195 200', + '--color-error-300': '210 159 167', + '--color-error-400': '177 87 100', + '--color-error-500': '143 15 34', + '--color-error-600': '129 14 31', + '--color-error-700': '107 11 26', + '--color-error-800': '86 9 20', + '--color-error-900': '70 7 17', + '--color-surface-50': '250 248 252', + '--color-surface-100': '242 238 247', + '--color-surface-200': '229 220 239', + '--color-surface-300': '209 192 226', + '--color-surface-400': '162 129 197', + '--color-surface-500': '116 74 161', + '--color-surface-600': '83 53 115', + '--color-surface-700': '60 39 84', + '--color-surface-800': '35 22 49', + '--color-surface-900': '18 11 24' + }, + enhancements: { + ".dark [data-theme='gold-nouveau']": { + '--on-primary': '0 0 0', + '--color-primary-50': '251 247 224', + '--color-primary-100': '250 244 214', + '--color-primary-200': '249 241 204', + '--color-primary-300': '245 233 173', + '--color-primary-400': '238 217 112', + '--color-primary-500': '230 200 51', + '--color-primary-600': '207 180 46', + '--color-primary-700': '173 150 38', + '--color-primary-800': '138 120 31', + '--color-primary-900': '113 98 25' + }, + "[data-theme='gold-nouveau'] h1,\n[data-theme='gold-nouveau'] h2,\n[data-theme='gold-nouveau'] h3,\n[data-theme='gold-nouveau'] h4,\n[data-theme='gold-nouveau'] h5,\n[data-theme='gold-nouveau'] h6": + { fontWeight: 'bold' }, + "[data-theme='gold-nouveau']": { + backgroundImage: + 'radial-gradient(at 0% 100%, rgba(var(--color-secondary-500) / 0.33) 0px, transparent 50%),\n\t\tradial-gradient(at 98% 100%, rgba(var(--color-error-500) / 0.33) 0px, transparent 50%)', + backgroundAttachment: 'fixed', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + backgroundSize: 'cover' + } + } +} satisfies Theme; + +export default goldNouveau; diff --git a/packages/plugin/src/tailwind/themes/hamlindigo.ts b/packages/plugin/src/tailwind/themes/hamlindigo.ts new file mode 100644 index 00000000..b26f8cd8 --- /dev/null +++ b/packages/plugin/src/tailwind/themes/hamlindigo.ts @@ -0,0 +1,103 @@ +import type { Theme } from './index.js'; + +const hamlindigo = { + properties: { + '--theme-font-family-base': + "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n\t\t'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'", + '--theme-font-family-heading': 'serif', + '--theme-font-color-base': '0 0 0', + '--theme-font-color-dark': '255 255 255', + '--theme-rounded-base': '2px', + '--theme-rounded-container': '2px', + '--theme-border-base': '2px', + '--on-primary': '0 0 0', + '--on-secondary': '255 255 255', + '--on-tertiary': '255 255 255', + '--on-success': '255 255 255', + '--on-warning': '0 0 0', + '--on-error': '255 255 255', + '--on-surface': '255 255 255', + '--color-primary-50': '242 245 253', + '--color-primary-100': '238 242 252', + '--color-primary-200': '233 239 252', + '--color-primary-300': '220 229 249', + '--color-primary-400': '194 210 245', + '--color-primary-500': '168 190 241', + '--color-primary-600': '151 171 217', + '--color-primary-700': '126 143 181', + '--color-primary-800': '101 114 145', + '--color-primary-900': '82 93 118', + '--color-secondary-50': '241 238 230', + '--color-secondary-100': '237 232 222', + '--color-secondary-200': '232 227 214', + '--color-secondary-300': '219 210 189', + '--color-secondary-400': '191 176 140', + '--color-secondary-500': '164 142 91', + '--color-secondary-600': '148 128 82', + '--color-secondary-700': '123 107 68', + '--color-secondary-800': '98 85 55', + '--color-secondary-900': '80 70 45', + '--color-tertiary-50': '231 239 241', + '--color-tertiary-100': '223 234 237', + '--color-tertiary-200': '216 229 232', + '--color-tertiary-300': '192 213 218', + '--color-tertiary-400': '144 182 191', + '--color-tertiary-500': '97 151 163', + '--color-tertiary-600': '87 136 147', + '--color-tertiary-700': '73 113 122', + '--color-tertiary-800': '58 91 98', + '--color-tertiary-900': '48 74 80', + '--color-success-50': '227 239 236', + '--color-success-100': '218 234 229', + '--color-success-200': '209 228 223', + '--color-success-300': '181 212 203', + '--color-success-400': '126 180 164', + '--color-success-500': '71 148 125', + '--color-success-600': '64 133 113', + '--color-success-700': '53 111 94', + '--color-success-800': '43 89 75', + '--color-success-900': '35 73 61', + '--color-warning-50': '249 242 226', + '--color-warning-100': '248 238 216', + '--color-warning-200': '246 234 207', + '--color-warning-300': '240 221 178', + '--color-warning-400': '229 195 120', + '--color-warning-500': '218 169 62', + '--color-warning-600': '196 152 56', + '--color-warning-700': '164 127 47', + '--color-warning-800': '131 101 37', + '--color-warning-900': '107 83 30', + '--color-error-50': '241 231 234', + '--color-error-100': '236 223 227', + '--color-error-200': '232 216 221', + '--color-error-300': '218 192 200', + '--color-error-400': '190 144 158', + '--color-error-500': '162 97 117', + '--color-error-600': '146 87 105', + '--color-error-700': '122 73 88', + '--color-error-800': '97 58 70', + '--color-error-900': '79 48 57', + '--color-surface-50': '232 234 241', + '--color-surface-100': '224 228 237', + '--color-surface-200': '216 221 232', + '--color-surface-300': '193 200 218', + '--color-surface-400': '146 159 191', + '--color-surface-500': '99 118 163', + '--color-surface-600': '89 106 147', + '--color-surface-700': '74 89 122', + '--color-surface-800': '59 71 98', + '--color-surface-900': '49 58 80' + }, + enhancements: { + "[data-theme='hamlindigo']": { + backgroundImage: + "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23e0e4ed' fill-opacity='0.5'%3E%3Cpath fill-rule='evenodd' d='M0 0h4v4H0V0zm4 4h4v4H4V4z'/%3E%3C/g%3E%3C/svg%3E\")" + }, + ".dark [data-theme='hamlindigo']": { + backgroundImage: + "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%233b4762' fill-opacity='0.2'%3E%3Cpath fill-rule='evenodd' d='M0 0h4v4H0V0zm4 4h4v4H4V4z'/%3E%3C/g%3E%3C/svg%3E\")" + } + } +} satisfies Theme; + +export default hamlindigo; diff --git a/packages/plugin/src/tailwind/themes/index.ts b/packages/plugin/src/tailwind/themes/index.ts new file mode 100644 index 00000000..41f0f1ea --- /dev/null +++ b/packages/plugin/src/tailwind/themes/index.ts @@ -0,0 +1,119 @@ +import crimson from './crimson.js'; +import goldNouveau from './gold-nouveau.js'; +import hamlindigo from './hamlindigo.js'; +import modern from './modern.js'; +import rocket from './rocket.js'; +import sahara from './sahara.js'; +import seafoam from './seafoam.js'; +import skeleton from './skeleton.js'; +import vintage from './vintage.js'; +import type { CSSRuleObject } from 'tailwindcss/types/config.js'; + +export const themes = { crimson, 'gold-nouveau': goldNouveau, hamlindigo, modern, rocket, sahara, seafoam, skeleton, vintage }; + +export type PresetTheme = ObjectKeys; + +export function getThemeProperties(themeName: PresetTheme) { + return themes[themeName].properties; +} + +export type ObjectValues = T[keyof T]; +export type ObjectKeys = keyof T; + +export type Theme = { properties: ThemeProperties; enhancements: CSSRuleObject }; +export type ThemeProperties = { + /* =~= Theme Properties =~= */ + '--theme-font-family-base': string; + '--theme-font-family-heading': string; + '--theme-font-color-base': string; + '--theme-font-color-dark': string; + '--theme-rounded-base': string; + '--theme-rounded-container': string; + '--theme-border-base': string; + /* =~= Theme On-X Colors =~= */ + '--on-primary': string; + '--on-secondary': string; + '--on-tertiary': string; + '--on-success': string; + '--on-warning': string; + '--on-error': string; + '--on-surface': string; + /* =~= Theme Colors =~= */ + /* primary */ + '--color-primary-50': string; + '--color-primary-100': string; + '--color-primary-200': string; + '--color-primary-300': string; + '--color-primary-400': string; + '--color-primary-500': string; + '--color-primary-600': string; + '--color-primary-700': string; + '--color-primary-800': string; + '--color-primary-900': string; + /* secondary */ + '--color-secondary-50': string; + '--color-secondary-100': string; + '--color-secondary-200': string; + '--color-secondary-300': string; + '--color-secondary-400': string; + '--color-secondary-500': string; + '--color-secondary-600': string; + '--color-secondary-700': string; + '--color-secondary-800': string; + '--color-secondary-900': string; + /* tertiary */ + '--color-tertiary-50': string; + '--color-tertiary-100': string; + '--color-tertiary-200': string; + '--color-tertiary-300': string; + '--color-tertiary-400': string; + '--color-tertiary-500': string; + '--color-tertiary-600': string; + '--color-tertiary-700': string; + '--color-tertiary-800': string; + '--color-tertiary-900': string; + /* success */ + '--color-success-50': string; + '--color-success-100': string; + '--color-success-200': string; + '--color-success-300': string; + '--color-success-400': string; + '--color-success-500': string; + '--color-success-600': string; + '--color-success-700': string; + '--color-success-800': string; + '--color-success-900': string; + /* warning */ + '--color-warning-50': string; + '--color-warning-100': string; + '--color-warning-200': string; + '--color-warning-300': string; + '--color-warning-400': string; + '--color-warning-500': string; + '--color-warning-600': string; + '--color-warning-700': string; + '--color-warning-800': string; + '--color-warning-900': string; + /* error */ + '--color-error-50': string; + '--color-error-100': string; + '--color-error-200': string; + '--color-error-300': string; + '--color-error-400': string; + '--color-error-500': string; + '--color-error-600': string; + '--color-error-700': string; + '--color-error-800': string; + '--color-error-900': string; + /* surface */ + '--color-surface-50': string; + '--color-surface-100': string; + '--color-surface-200': string; + '--color-surface-300': string; + '--color-surface-400': string; + '--color-surface-500': string; + '--color-surface-600': string; + '--color-surface-700': string; + '--color-surface-800': string; + '--color-surface-900': string; +}; diff --git a/packages/plugin/src/tailwind/themes/modern.ts b/packages/plugin/src/tailwind/themes/modern.ts new file mode 100644 index 00000000..b111eeab --- /dev/null +++ b/packages/plugin/src/tailwind/themes/modern.ts @@ -0,0 +1,112 @@ +import type { Theme } from './index.js'; + +const modern = { + properties: { + '--theme-font-family-base': "'Quicksand', sans-serif", + '--theme-font-family-heading': "'Quicksand', sans-serif", + '--theme-font-color-base': 'var(--color-surface-900)', + '--theme-font-color-dark': 'var(--color-tertiary-50)', + '--theme-rounded-base': '9999px', + '--theme-rounded-container': '24px', + '--theme-border-base': '3px', + '--on-primary': '255 255 255', + '--on-secondary': '0 0 0', + '--on-tertiary': '0 0 0', + '--on-success': '0 0 0', + '--on-warning': '0 0 0', + '--on-error': '255 255 255', + '--on-surface': '255 255 255', + '--color-primary-50': '252 228 240', + '--color-primary-100': '251 218 235', + '--color-primary-200': '250 209 230', + '--color-primary-300': '247 182 214', + '--color-primary-400': '242 127 184', + '--color-primary-500': '236 72 153', + '--color-primary-600': '212 65 138', + '--color-primary-700': '177 54 115', + '--color-primary-800': '142 43 92', + '--color-primary-900': '116 35 75', + '--color-secondary-50': '218 244 249', + '--color-secondary-100': '205 240 246', + '--color-secondary-200': '193 237 244', + '--color-secondary-300': '155 226 238', + '--color-secondary-400': '81 204 225', + '--color-secondary-500': '6 182 212', + '--color-secondary-600': '5 164 191', + '--color-secondary-700': '5 137 159', + '--color-secondary-800': '4 109 127', + '--color-secondary-900': '3 89 104', + '--color-tertiary-50': '220 244 242', + '--color-tertiary-100': '208 241 237', + '--color-tertiary-200': '196 237 233', + '--color-tertiary-300': '161 227 219', + '--color-tertiary-400': '91 205 193', + '--color-tertiary-500': '20 184 166', + '--color-tertiary-600': '18 166 149', + '--color-tertiary-700': '15 138 125', + '--color-tertiary-800': '12 110 100', + '--color-tertiary-900': '10 90 81', + '--color-success-50': '237 247 220', + '--color-success-100': '230 245 208', + '--color-success-200': '224 242 197', + '--color-success-300': '206 235 162', + '--color-success-400': '169 219 92', + '--color-success-500': '132 204 22', + '--color-success-600': '119 184 20', + '--color-success-700': '99 153 17', + '--color-success-800': '79 122 13', + '--color-success-900': '65 100 11', + '--color-warning-50': '252 244 218', + '--color-warning-100': '251 240 206', + '--color-warning-200': '250 236 193', + '--color-warning-300': '247 225 156', + '--color-warning-400': '240 202 82', + '--color-warning-500': '234 179 8', + '--color-warning-600': '211 161 7', + '--color-warning-700': '176 134 6', + '--color-warning-800': '140 107 5', + '--color-warning-900': '115 88 4', + '--color-error-50': '253 227 227', + '--color-error-100': '252 218 218', + '--color-error-200': '251 208 208', + '--color-error-300': '249 180 180', + '--color-error-400': '244 124 124', + '--color-error-500': '239 68 68', + '--color-error-600': '215 61 61', + '--color-error-700': '179 51 51', + '--color-error-800': '143 41 41', + '--color-error-900': '117 33 33', + '--color-surface-50': '232 232 253', + '--color-surface-100': '224 224 252', + '--color-surface-200': '216 217 252', + '--color-surface-300': '193 194 249', + '--color-surface-400': '146 148 245', + '--color-surface-500': '99 102 241', + '--color-surface-600': '89 92 217', + '--color-surface-700': '74 77 181', + '--color-surface-800': '59 61 145', + '--color-surface-900': '49 50 118' + }, + enhancements: { + "[data-theme='modern'] h1,\n[data-theme='modern'] h2,\n[data-theme='modern'] h3,\n[data-theme='modern'] h4,\n[data-theme='modern'] h5,\n[data-theme='modern'] h6,\n[data-theme='modern'] a,\n[data-theme='modern'] button": + { fontWeight: 'bold' }, + "[data-theme='modern']": { + backgroundImage: + 'radial-gradient(at 76% 0%, hsla(189,100%,56%,0.36) 0px, transparent 50%),\n\t\tradial-gradient(at 1% 0%, hsla(340,100%,76%,0.26) 0px, transparent 50%),\n\t\tradial-gradient(at 20% 100%, hsla(241,100%,70%,0.47) 0px, transparent 50%)', + backgroundAttachment: 'fixed', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + backgroundSize: 'cover' + }, + ".dark [data-theme='modern']": { + backgroundImage: + 'radial-gradient(at 76% 0%, hsla(189,100%,56%,0.20) 0px, transparent 50%),\n\t\tradial-gradient(at 1% 0%, hsla(340,100%,76%,0.15) 0px, transparent 50%),\n\t\tradial-gradient(at 20% 100%, hsla(241,100%,70%,0.30) 0px, transparent 50%)', + backgroundAttachment: 'fixed', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + backgroundSize: 'cover' + } + } +} satisfies Theme; + +export default modern; diff --git a/packages/plugin/src/tailwind/themes/rocket.ts b/packages/plugin/src/tailwind/themes/rocket.ts new file mode 100644 index 00000000..091cc580 --- /dev/null +++ b/packages/plugin/src/tailwind/themes/rocket.ts @@ -0,0 +1,104 @@ +import type { Theme } from './index.js'; + +const rocket = { + properties: { + '--theme-font-family-base': 'system-ui', + '--theme-font-family-heading': "'Space Grotesk', sans-serif", + '--theme-font-color-base': 'var(--color-primary-900)', + '--theme-font-color-dark': 'var(--color-primary-100)', + '--theme-rounded-base': '0px', + '--theme-rounded-container': '0px', + '--theme-border-base': '0px', + '--on-primary': '0 0 0', + '--on-secondary': '255 255 255', + '--on-tertiary': '255 255 255', + '--on-success': '0 0 0', + '--on-warning': '0 0 0', + '--on-error': '255 255 255', + '--on-surface': '255 255 255', + '--color-primary-50': '218 244 249', + '--color-primary-100': '205 240 246', + '--color-primary-200': '193 237 244', + '--color-primary-300': '155 226 238', + '--color-primary-400': '81 204 225', + '--color-primary-500': '6 182 212', + '--color-primary-600': '5 164 191', + '--color-primary-700': '5 137 159', + '--color-primary-800': '4 109 127', + '--color-primary-900': '3 89 104', + '--color-secondary-50': '226 236 254', + '--color-secondary-100': '216 230 253', + '--color-secondary-200': '206 224 253', + '--color-secondary-300': '177 205 251', + '--color-secondary-400': '118 168 249', + '--color-secondary-500': '59 130 246', + '--color-secondary-600': '53 117 221', + '--color-secondary-700': '44 98 185', + '--color-secondary-800': '35 78 148', + '--color-secondary-900': '29 64 121', + '--color-tertiary-50': '242 230 254', + '--color-tertiary-100': '238 221 253', + '--color-tertiary-200': '233 213 253', + '--color-tertiary-300': '220 187 252', + '--color-tertiary-400': '194 136 249', + '--color-tertiary-500': '168 85 247', + '--color-tertiary-600': '151 77 222', + '--color-tertiary-700': '126 64 185', + '--color-tertiary-800': '101 51 148', + '--color-tertiary-900': '82 42 121', + '--color-success-50': '228 247 220', + '--color-success-100': '219 245 208', + '--color-success-200': '210 242 197', + '--color-success-300': '183 234 161', + '--color-success-400': '130 219 91', + '--color-success-500': '76 203 21', + '--color-success-600': '68 183 19', + '--color-success-700': '57 152 16', + '--color-success-800': '46 122 13', + '--color-success-900': '37 99 10', + '--color-warning-50': '253 246 223', + '--color-warning-100': '253 243 212', + '--color-warning-200': '252 240 202', + '--color-warning-300': '251 230 170', + '--color-warning-400': '247 212 106', + '--color-warning-500': '244 193 42', + '--color-warning-600': '220 174 38', + '--color-warning-700': '183 145 32', + '--color-warning-800': '146 116 25', + '--color-warning-900': '120 95 21', + '--color-error-50': '244 223 230', + '--color-error-100': '240 213 221', + '--color-error-200': '237 202 213', + '--color-error-300': '225 171 187', + '--color-error-400': '203 107 136', + '--color-error-500': '181 44 85', + '--color-error-600': '163 40 77', + '--color-error-700': '136 33 64', + '--color-error-800': '109 26 51', + '--color-error-900': '89 22 42', + '--color-surface-50': '232 234 238', + '--color-surface-100': '224 227 232', + '--color-surface-200': '216 220 226', + '--color-surface-300': '193 199 209', + '--color-surface-400': '147 158 174', + '--color-surface-500': '100 116 139', + '--color-surface-600': '90 104 125', + '--color-surface-700': '75 87 104', + '--color-surface-800': '60 70 83', + '--color-surface-900': '49 57 68' + }, + enhancements: { + "[data-theme='rocket'] h1,\n[data-theme='rocket'] h2,\n[data-theme='rocket'] h3,\n[data-theme='rocket'] h4,\n[data-theme='rocket'] h5,\n[data-theme='rocket'] h6": + { fontWeight: 'bold' }, + "[data-theme='rocket']": { + backgroundImage: + 'radial-gradient(at 0% 0%, rgba(var(--color-secondary-500) / 0.33) 0px, transparent 50%),\n\t\t\tradial-gradient(at 98% 1%, rgba(var(--color-error-500) / 0.33) 0px, transparent 50%)', + backgroundAttachment: 'fixed', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + backgroundSize: 'cover' + } + } +} satisfies Theme; + +export default rocket; diff --git a/packages/plugin/src/tailwind/themes/sahara.ts b/packages/plugin/src/tailwind/themes/sahara.ts new file mode 100644 index 00000000..90520745 --- /dev/null +++ b/packages/plugin/src/tailwind/themes/sahara.ts @@ -0,0 +1,115 @@ +import type { Theme } from './index.js'; + +const sahara = { + properties: { + '--theme-font-family-base': + "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n\t\t'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'", + '--theme-font-family-heading': + "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',\n\t\tArial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'", + '--theme-font-color-base': 'var(--color-secondary-900)', + '--theme-font-color-dark': 'var(--color-primary-100)', + '--theme-rounded-base': '9999px', + '--theme-rounded-container': '24px', + '--theme-border-base': '1px', + '--on-primary': '0 0 0', + '--on-secondary': '0 0 0', + '--on-tertiary': '0 0 0', + '--on-success': '0 0 0', + '--on-warning': '0 0 0', + '--on-error': '255 255 255', + '--on-surface': '255 255 255', + '--color-primary-50': '252 242 225', + '--color-primary-100': '251 238 215', + '--color-primary-200': '250 234 205', + '--color-primary-300': '247 221 175', + '--color-primary-400': '242 196 114', + '--color-primary-500': '236 170 54', + '--color-primary-600': '212 153 49', + '--color-primary-700': '177 128 41', + '--color-primary-800': '142 102 32', + '--color-primary-900': '116 83 26', + '--color-secondary-50': '225 247 245', + '--color-secondary-100': '216 245 241', + '--color-secondary-200': '206 242 238', + '--color-secondary-300': '176 234 227', + '--color-secondary-400': '117 219 207', + '--color-secondary-500': '58 203 186', + '--color-secondary-600': '52 183 167', + '--color-secondary-700': '44 152 140', + '--color-secondary-800': '35 122 112', + '--color-secondary-900': '28 99 91', + '--color-tertiary-50': '245 250 237', + '--color-tertiary-100': '241 249 231', + '--color-tertiary-200': '238 247 225', + '--color-tertiary-300': '228 242 207', + '--color-tertiary-400': '207 233 170', + '--color-tertiary-500': '187 223 134', + '--color-tertiary-600': '168 201 121', + '--color-tertiary-700': '140 167 101', + '--color-tertiary-800': '112 134 80', + '--color-tertiary-900': '92 109 66', + '--color-success-50': '237 247 220', + '--color-success-100': '230 245 208', + '--color-success-200': '224 242 197', + '--color-success-300': '206 235 162', + '--color-success-400': '169 219 92', + '--color-success-500': '132 204 22', + '--color-success-600': '119 184 20', + '--color-success-700': '99 153 17', + '--color-success-800': '79 122 13', + '--color-success-900': '65 100 11', + '--color-warning-50': '251 246 230', + '--color-warning-100': '250 243 221', + '--color-warning-200': '249 240 213', + '--color-warning-300': '245 230 188', + '--color-warning-400': '237 212 137', + '--color-warning-500': '229 193 87', + '--color-warning-600': '206 174 78', + '--color-warning-700': '172 145 65', + '--color-warning-800': '137 116 52', + '--color-warning-900': '112 95 43', + '--color-error-50': '250 231 240', + '--color-error-100': '248 222 235', + '--color-error-200': '246 214 230', + '--color-error-300': '241 190 215', + '--color-error-400': '230 141 186', + '--color-error-500': '219 92 156', + '--color-error-600': '197 83 140', + '--color-error-700': '164 69 117', + '--color-error-800': '131 55 94', + '--color-error-900': '107 45 76', + '--color-surface-50': '249 228 232', + '--color-surface-100': '248 220 224', + '--color-surface-200': '246 211 217', + '--color-surface-300': '240 184 193', + '--color-surface-400': '229 131 147', + '--color-surface-500': '218 78 101', + '--color-surface-600': '196 70 91', + '--color-surface-700': '164 59 76', + '--color-surface-800': '131 47 61', + '--color-surface-900': '107 38 49' + }, + enhancements: { + "[data-theme='sahara'] h1,\n[data-theme='sahara'] h2,\n[data-theme='sahara'] h3,\n[data-theme='sahara'] h4,\n[data-theme='sahara'] h5,\n[data-theme='sahara'] h6": + { fontWeight: '600' }, + "[data-theme='sahara'] p": { fontWeight: '400' }, + "[data-theme='sahara']": { + backgroundImage: + 'radial-gradient(at 100% 36%, hsla(37,81%,56%,0.15) 0px, transparent 50%),\n\t\tradial-gradient(at 7% 0%, hsla(37,81%,56%,0.20) 0px, transparent 50%)', + backgroundAttachment: 'fixed', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + backgroundSize: 'cover' + }, + ".dark [data-theme='sahara']": { + backgroundImage: + 'radial-gradient(at 100% 36%, hsla(37,81%,56%,0.15) 0px, transparent 50%),\n\t\tradial-gradient(at 7% 0%, hsla(37,81%,56%,0.20) 0px, transparent 50%)', + backgroundAttachment: 'fixed', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + backgroundSize: 'cover' + } + } +} satisfies Theme; + +export default sahara; diff --git a/packages/plugin/src/tailwind/themes/seafoam.ts b/packages/plugin/src/tailwind/themes/seafoam.ts new file mode 100644 index 00000000..769096b9 --- /dev/null +++ b/packages/plugin/src/tailwind/themes/seafoam.ts @@ -0,0 +1,111 @@ +import type { Theme } from './index.js'; + +const seafoam = { + properties: { + '--theme-font-family-base': + "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n\t\t'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'", + '--theme-font-family-heading': "'Playfair Display', serif", + '--theme-font-color-base': 'var(--color-surface-900)', + '--theme-font-color-dark': 'var(--color-secondary-100)', + '--theme-rounded-base': '16px', + '--theme-rounded-container': '16px', + '--theme-border-base': '3px', + '--on-primary': '0 0 0', + '--on-secondary': '255 255 255', + '--on-tertiary': '255 255 255', + '--on-success': '0 0 0', + '--on-warning': '0 0 0', + '--on-error': '255 255 255', + '--on-surface': '0 0 0', + '--color-primary-50': '237 248 247', + '--color-primary-100': '231 246 245', + '--color-primary-200': '225 243 242', + '--color-primary-300': '207 236 234', + '--color-primary-400': '170 222 219', + '--color-primary-500': '134 208 203', + '--color-primary-600': '121 187 183', + '--color-primary-700': '101 156 152', + '--color-primary-800': '80 125 122', + '--color-primary-900': '66 102 99', + '--color-secondary-50': '222 224 230', + '--color-secondary-100': '211 214 221', + '--color-secondary-200': '200 204 213', + '--color-secondary-300': '166 173 187', + '--color-secondary-400': '100 112 136', + '--color-secondary-500': '33 51 85', + '--color-secondary-600': '30 46 77', + '--color-secondary-700': '25 38 64', + '--color-secondary-800': '20 31 51', + '--color-secondary-900': '16 25 42', + '--color-tertiary-50': '255 226 217', + '--color-tertiary-100': '255 216 204', + '--color-tertiary-200': '255 207 191', + '--color-tertiary-300': '255 177 153', + '--color-tertiary-400': '255 119 77', + '--color-tertiary-500': '255 61 0', + '--color-tertiary-600': '230 55 0', + '--color-tertiary-700': '191 46 0', + '--color-tertiary-800': '153 37 0', + '--color-tertiary-900': '125 30 0', + '--color-success-50': '218 251 241', + '--color-success-100': '205 250 236', + '--color-success-200': '193 249 232', + '--color-success-300': '155 245 218', + '--color-success-400': '81 237 190', + '--color-success-500': '6 229 162', + '--color-success-600': '5 206 146', + '--color-success-700': '5 172 122', + '--color-success-800': '4 137 97', + '--color-success-900': '3 112 79', + '--color-warning-50': '252 251 230', + '--color-warning-100': '251 250 221', + '--color-warning-200': '250 249 213', + '--color-warning-300': '247 245 188', + '--color-warning-400': '240 237 137', + '--color-warning-500': '234 229 87', + '--color-warning-600': '211 206 78', + '--color-warning-700': '176 172 65', + '--color-warning-800': '140 137 52', + '--color-warning-900': '115 112 43', + '--color-error-50': '248 227 227', + '--color-error-100': '246 218 218', + '--color-error-200': '244 209 209', + '--color-error-300': '237 181 181', + '--color-error-400': '224 126 126', + '--color-error-500': '210 70 70', + '--color-error-600': '189 63 63', + '--color-error-700': '158 53 53', + '--color-error-800': '126 42 42', + '--color-error-900': '103 34 34', + '--color-surface-50': '222 248 249', + '--color-surface-100': '211 246 246', + '--color-surface-200': '201 244 244', + '--color-surface-300': '168 237 238', + '--color-surface-400': '102 223 225', + '--color-surface-500': '37 209 212', + '--color-surface-600': '33 188 191', + '--color-surface-700': '28 157 159', + '--color-surface-800': '22 125 127', + '--color-surface-900': '18 102 104' + }, + enhancements: { + "[data-theme='seafoam'] h1,\n[data-theme='seafoam'] h2,\n[data-theme='seafoam'] h3,\n[data-theme='seafoam'] h4,\n[data-theme='seafoam'] h5,\n[data-theme='seafoam'] h6": + { fontWeight: 'bold', fontStyle: 'italic', letterSpacing: '1px' }, + "[data-theme='seafoam']": { + background: 'linear-gradient(0deg, rgba(203, 221, 254, 0.75) 0%, rgba(163, 209, 206, 0.75) 100%)', + backgroundAttachment: 'fixed', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + backgroundSize: 'cover' + }, + ".dark [data-theme='seafoam']": { + background: 'linear-gradient(0deg, rgba(33, 50, 83, 1) 0%, rgba(8, 132, 124, 1) 100%)', + backgroundAttachment: 'fixed', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + backgroundSize: 'cover' + } + } +} satisfies Theme; + +export default seafoam; diff --git a/packages/plugin/src/tailwind/themes/skeleton.ts b/packages/plugin/src/tailwind/themes/skeleton.ts new file mode 100644 index 00000000..063abad5 --- /dev/null +++ b/packages/plugin/src/tailwind/themes/skeleton.ts @@ -0,0 +1,104 @@ +import type { Theme } from './index.js'; + +const skeleton = { + properties: { + '--theme-font-family-base': 'system-ui', + '--theme-font-family-heading': 'system-ui', + '--theme-font-color-base': '0 0 0', + '--theme-font-color-dark': '255 255 255', + '--theme-rounded-base': '9999px', + '--theme-rounded-container': '8px', + '--theme-border-base': '1px', + '--on-primary': '0 0 0', + '--on-secondary': '255 255 255', + '--on-tertiary': '0 0 0', + '--on-success': '0 0 0', + '--on-warning': '0 0 0', + '--on-error': '255 255 255', + '--on-surface': '255 255 255', + '--color-primary-50': '219 245 236', + '--color-primary-100': '207 241 230', + '--color-primary-200': '195 238 224', + '--color-primary-300': '159 227 205', + '--color-primary-400': '87 207 167', + '--color-primary-500': '15 186 129', + '--color-primary-600': '14 167 116', + '--color-primary-700': '11 140 97', + '--color-primary-800': '9 112 77', + '--color-primary-900': '7 91 63', + '--color-secondary-50': '229 227 251', + '--color-secondary-100': '220 218 250', + '--color-secondary-200': '211 209 249', + '--color-secondary-300': '185 181 245', + '--color-secondary-400': '132 126 237', + '--color-secondary-500': '79 70 229', + '--color-secondary-600': '71 63 206', + '--color-secondary-700': '59 53 172', + '--color-secondary-800': '47 42 137', + '--color-secondary-900': '39 34 112', + '--color-tertiary-50': '219 242 252', + '--color-tertiary-100': '207 237 251', + '--color-tertiary-200': '195 233 250', + '--color-tertiary-300': '159 219 246', + '--color-tertiary-400': '86 192 240', + '--color-tertiary-500': '14 165 233', + '--color-tertiary-600': '13 149 210', + '--color-tertiary-700': '11 124 175', + '--color-tertiary-800': '8 99 140', + '--color-tertiary-900': '7 81 114', + '--color-success-50': '237 247 220', + '--color-success-100': '230 245 208', + '--color-success-200': '224 242 197', + '--color-success-300': '206 235 162', + '--color-success-400': '169 219 92', + '--color-success-500': '132 204 22', + '--color-success-600': '119 184 20', + '--color-success-700': '99 153 17', + '--color-success-800': '79 122 13', + '--color-success-900': '65 100 11', + '--color-warning-50': '252 244 218', + '--color-warning-100': '251 240 206', + '--color-warning-200': '250 236 193', + '--color-warning-300': '247 225 156', + '--color-warning-400': '240 202 82', + '--color-warning-500': '234 179 8', + '--color-warning-600': '211 161 7', + '--color-warning-700': '176 134 6', + '--color-warning-800': '140 107 5', + '--color-warning-900': '115 88 4', + '--color-error-50': '249 221 234', + '--color-error-100': '246 209 228', + '--color-error-200': '244 198 221', + '--color-error-300': '238 163 200', + '--color-error-400': '225 94 159', + '--color-error-500': '212 25 118', + '--color-error-600': '191 23 106', + '--color-error-700': '159 19 89', + '--color-error-800': '127 15 71', + '--color-error-900': '104 12 58', + '--color-surface-50': '228 230 238', + '--color-surface-100': '219 222 233', + '--color-surface-200': '210 214 227', + '--color-surface-300': '182 189 210', + '--color-surface-400': '128 140 177', + '--color-surface-500': '73 90 143', + '--color-surface-600': '66 81 129', + '--color-surface-700': '55 68 107', + '--color-surface-800': '44 54 86', + '--color-surface-900': '36 44 70' + }, + enhancements: { + "[data-theme='skeleton'] h1,\n[data-theme='skeleton'] h2,\n[data-theme='skeleton'] h3,\n[data-theme='skeleton'] h4,\n[data-theme='skeleton'] h5,\n[data-theme='skeleton'] h6": + { fontWeight: 'bold' }, + "[data-theme='skeleton']": { + backgroundImage: + 'radial-gradient(at 0% 0%, rgba(var(--color-secondary-500) / 0.33) 0px, transparent 50%),\n\t\t\tradial-gradient(at 98% 1%, rgba(var(--color-error-500) / 0.33) 0px, transparent 50%)', + backgroundAttachment: 'fixed', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + backgroundSize: 'cover' + } + } +} satisfies Theme; + +export default skeleton; diff --git a/packages/plugin/src/tailwind/themes/vintage.ts b/packages/plugin/src/tailwind/themes/vintage.ts new file mode 100644 index 00000000..97900ff9 --- /dev/null +++ b/packages/plugin/src/tailwind/themes/vintage.ts @@ -0,0 +1,113 @@ +import type { Theme } from './index.js'; + +const vintage = { + properties: { + '--theme-font-family-base': + "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n\t\t'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'", + '--theme-font-family-heading': "'Abril Fatface', cursive", + '--theme-font-color-base': 'var(--color-primary-900)', + '--theme-font-color-dark': 'var(--color-primary-100)', + '--theme-rounded-base': '2px', + '--theme-rounded-container': '4px', + '--theme-border-base': '1px', + '--on-primary': '0 0 0', + '--on-secondary': '0 0 0', + '--on-tertiary': '0 0 0', + '--on-success': '0 0 0', + '--on-warning': '0 0 0', + '--on-error': '0 0 0', + '--on-surface': '255 255 255', + '--color-primary-50': '252 237 221', + '--color-primary-100': '251 231 209', + '--color-primary-200': '250 225 198', + '--color-primary-300': '247 207 163', + '--color-primary-400': '240 170 95', + '--color-primary-500': '234 134 26', + '--color-primary-600': '211 121 23', + '--color-primary-700': '176 101 20', + '--color-primary-800': '140 80 16', + '--color-primary-900': '115 66 13', + '--color-secondary-50': '239 248 242', + '--color-secondary-100': '234 245 237', + '--color-secondary-200': '229 243 233', + '--color-secondary-300': '213 235 219', + '--color-secondary-400': '182 221 192', + '--color-secondary-500': '151 206 165', + '--color-secondary-600': '136 185 149', + '--color-secondary-700': '113 155 124', + '--color-secondary-800': '91 124 99', + '--color-secondary-900': '74 101 81', + '--color-tertiary-50': '218 244 249', + '--color-tertiary-100': '205 240 246', + '--color-tertiary-200': '193 237 244', + '--color-tertiary-300': '155 226 238', + '--color-tertiary-400': '81 204 225', + '--color-tertiary-500': '6 182 212', + '--color-tertiary-600': '5 164 191', + '--color-tertiary-700': '5 137 159', + '--color-tertiary-800': '4 109 127', + '--color-tertiary-900': '3 89 104', + '--color-success-50': '237 247 231', + '--color-success-100': '230 245 223', + '--color-success-200': '224 242 215', + '--color-success-300': '206 234 190', + '--color-success-400': '169 219 142', + '--color-success-500': '132 203 93', + '--color-success-600': '119 183 84', + '--color-success-700': '99 152 70', + '--color-success-800': '79 122 56', + '--color-success-900': '65 99 46', + '--color-warning-50': '253 243 222', + '--color-warning-100': '252 238 211', + '--color-warning-200': '252 234 200', + '--color-warning-300': '250 222 167', + '--color-warning-400': '246 197 101', + '--color-warning-500': '242 172 35', + '--color-warning-600': '218 155 32', + '--color-warning-700': '182 129 26', + '--color-warning-800': '145 103 21', + '--color-warning-900': '119 84 17', + '--color-error-50': '249 236 235', + '--color-error-100': '247 229 228', + '--color-error-200': '245 223 221', + '--color-error-300': '238 203 201', + '--color-error-400': '226 165 161', + '--color-error-500': '213 126 120', + '--color-error-600': '192 113 108', + '--color-error-700': '160 95 90', + '--color-error-800': '128 76 72', + '--color-error-900': '104 62 59', + '--color-surface-50': '226 225 224', + '--color-surface-100': '217 215 214', + '--color-surface-200': '207 205 204', + '--color-surface-300': '178 175 173', + '--color-surface-400': '121 115 111', + '--color-surface-500': '63 55 49', + '--color-surface-600': '57 50 44', + '--color-surface-700': '47 41 37', + '--color-surface-800': '38 33 29', + '--color-surface-900': '31 27 24' + }, + enhancements: { + "[data-theme='vintage'] h1,\n[data-theme='vintage'] h2,\n[data-theme='vintage'] h3,\n[data-theme='vintage'] h4,\n[data-theme='vintage'] h5,\n[data-theme='vintage'] h6": + { letterSpacing: '1px' }, + "[data-theme='vintage']": { + backgroundImage: + 'radial-gradient(at 100% 0%, hsla(135,34%,70%,0.20) 0px, transparent 50%),\n\t\tradial-gradient(at 85% 100%, hsla(31,83%,50%,0.20) 0px, transparent 50%)', + backgroundAttachment: 'fixed', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + backgroundSize: 'cover' + }, + ".dark [data-theme='vintage']": { + backgroundImage: + 'radial-gradient(at 100% 0%, hsla(135,34%,70%,0.14) 0px, transparent 50%),\n\t\tradial-gradient(at 85% 100%, hsla(31,83%,50%,0.14) 0px, transparent 50%)', + backgroundAttachment: 'fixed', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + backgroundSize: 'cover' + } + } +} satisfies Theme; + +export default vintage; diff --git a/packages/skeleton/src/lib/tailwind/tokens/backgrounds.cjs b/packages/plugin/src/tailwind/tokens/backgrounds.ts similarity index 88% rename from packages/skeleton/src/lib/tailwind/tokens/backgrounds.cjs rename to packages/plugin/src/tailwind/tokens/backgrounds.ts index a22de281..51f322aa 100644 --- a/packages/skeleton/src/lib/tailwind/tokens/backgrounds.cjs +++ b/packages/plugin/src/tailwind/tokens/backgrounds.ts @@ -1,14 +1,14 @@ // Design Tokens: Background // Doc: https://www.skeleton.dev/docs/tokens -const settings = require('../settings.cjs'); +import { settings, type CssClasses } from '../settings.js'; // Defaults const backdropAlpha = 0.7; const hoverAlpha = 0.1; -module.exports = () => { - const classes = {}; +export const backgrounds = (): CssClasses => { + const classes: CssClasses = {}; settings.colorNames.forEach((n) => { // Backdrops // Example: .bg-primary-backdrop-token @@ -37,3 +37,5 @@ module.exports = () => { }); return classes; }; + +export default backgrounds; diff --git a/packages/skeleton/src/lib/tailwind/tokens/border-radius.cjs b/packages/plugin/src/tailwind/tokens/border-radius.ts similarity index 89% rename from packages/skeleton/src/lib/tailwind/tokens/border-radius.cjs rename to packages/plugin/src/tailwind/tokens/border-radius.ts index e2d02ce7..dd14287b 100644 --- a/packages/skeleton/src/lib/tailwind/tokens/border-radius.cjs +++ b/packages/plugin/src/tailwind/tokens/border-radius.ts @@ -1,9 +1,10 @@ // Design Tokens: Border Radius // Doc: https://www.skeleton.dev/docs/tokens -// const settings = require('../settings.cjs'); +import { CssClasses } from '../settings.js'; -module.exports = () => { +// const settings = require('../settings.cjs'); +export const borderRadius = (): CssClasses => { return { // Base '.rounded-token': { 'border-radius': 'var(--theme-rounded-base)' }, @@ -19,3 +20,5 @@ module.exports = () => { '.rounded-br-container-token': { 'border-bottom-right-radius': 'var(--theme-rounded-container)' } }; }; + +export default borderRadius; diff --git a/packages/skeleton/src/lib/tailwind/tokens/borders.cjs b/packages/plugin/src/tailwind/tokens/borders.ts similarity index 79% rename from packages/skeleton/src/lib/tailwind/tokens/borders.cjs rename to packages/plugin/src/tailwind/tokens/borders.ts index 3362c1c2..8f252631 100644 --- a/packages/skeleton/src/lib/tailwind/tokens/borders.cjs +++ b/packages/plugin/src/tailwind/tokens/borders.ts @@ -1,10 +1,10 @@ // Design Tokens: Borders // Doc: https://www.skeleton.dev/docs/tokens -const settings = require('../settings.cjs'); +import { settings, type CssClasses } from '../settings.js'; -module.exports = () => { - const classes = { +export const borders = (): CssClasses => { + const classes: CssClasses = { // Border Width - ex: .border-token '.border-token': { 'border-width': 'var(--theme-border-base)' } }; @@ -18,3 +18,5 @@ module.exports = () => { }); return classes; }; + +export default borders; diff --git a/packages/skeleton/src/lib/tailwind/tokens/fills.cjs b/packages/plugin/src/tailwind/tokens/fills.ts similarity index 78% rename from packages/skeleton/src/lib/tailwind/tokens/fills.cjs rename to packages/plugin/src/tailwind/tokens/fills.ts index a2ed3afd..eb937654 100644 --- a/packages/skeleton/src/lib/tailwind/tokens/fills.cjs +++ b/packages/plugin/src/tailwind/tokens/fills.ts @@ -1,10 +1,10 @@ // Design Tokens: SVG Fill // Doc: https://www.skeleton.dev/docs/tokens -const settings = require('../settings.cjs'); +import { settings, type CssClasses } from '../settings.js'; -module.exports = () => { - const classes = { +export const fills = (): CssClasses => { + const classes: CssClasses = { '.fill-base-token': { fill: 'rgba(var(--theme-font-color-base))' }, '.fill-dark-token': { fill: 'rgba(var(--theme-font-color-dark))' }, // Fill Token - ex: .fill-token @@ -18,3 +18,5 @@ module.exports = () => { }); return classes; }; + +export default fills; diff --git a/packages/skeleton/src/lib/tailwind/tokens/rings.cjs b/packages/plugin/src/tailwind/tokens/rings.ts similarity index 91% rename from packages/skeleton/src/lib/tailwind/tokens/rings.cjs rename to packages/plugin/src/tailwind/tokens/rings.ts index 464a2601..e535f089 100644 --- a/packages/skeleton/src/lib/tailwind/tokens/rings.cjs +++ b/packages/plugin/src/tailwind/tokens/rings.ts @@ -1,7 +1,7 @@ // Design Tokens: Rings // Doc: https://www.skeleton.dev/docs/tokens -const settings = require('../settings.cjs'); +import { settings, type CssClasses } from '../settings.js'; // Local const ringTokenTheme = { @@ -18,8 +18,8 @@ const ringOutlineShared = { '--tw-ring-inset': 'inset' }; -module.exports = () => { - const classes = { +export const rings = (): CssClasses => { + const classes: CssClasses = { '.ring-token': { ...ringTokenTheme }, @@ -48,3 +48,5 @@ module.exports = () => { }); return classes; }; + +export default rings; diff --git a/packages/skeleton/src/lib/tailwind/tokens/text.cjs b/packages/plugin/src/tailwind/tokens/text.ts similarity index 87% rename from packages/skeleton/src/lib/tailwind/tokens/text.cjs rename to packages/plugin/src/tailwind/tokens/text.ts index b3ec6e2e..397dad43 100644 --- a/packages/skeleton/src/lib/tailwind/tokens/text.cjs +++ b/packages/plugin/src/tailwind/tokens/text.ts @@ -1,10 +1,10 @@ // Design Tokens: Text // Doc: https://www.skeleton.dev/docs/tokens -const settings = require('../settings.cjs'); +import { settings, type CssClasses } from '../settings.js'; -module.exports = () => { - const classes = { +export const text = (): CssClasses => { + const classes: CssClasses = { // Font Family '.font-heading-token': { 'font-family': 'var(--theme-font-family-heading)' }, '.font-token': { 'font-family': 'var(--theme-font-family-base)' }, @@ -15,6 +15,7 @@ module.exports = () => { '.text-token': { color: 'rgba(var(--theme-font-color-base))' }, '.dark .text-token': { color: 'rgba(var(--theme-font-color-dark))' } }; + settings.colorNames.forEach((n) => { // On-X Text Colors // Example: .text-on-primary-token @@ -29,3 +30,5 @@ module.exports = () => { }); return classes; }; + +export default text; diff --git a/packages/skeleton/src/lib/themes/theme-crimson.css b/packages/plugin/src/themes/theme-crimson.css similarity index 100% rename from packages/skeleton/src/lib/themes/theme-crimson.css rename to packages/plugin/src/themes/theme-crimson.css diff --git a/packages/skeleton/src/lib/themes/theme-gold-nouveau.css b/packages/plugin/src/themes/theme-gold-nouveau.css similarity index 100% rename from packages/skeleton/src/lib/themes/theme-gold-nouveau.css rename to packages/plugin/src/themes/theme-gold-nouveau.css diff --git a/packages/skeleton/src/lib/themes/theme-hamlindigo.css b/packages/plugin/src/themes/theme-hamlindigo.css similarity index 100% rename from packages/skeleton/src/lib/themes/theme-hamlindigo.css rename to packages/plugin/src/themes/theme-hamlindigo.css diff --git a/packages/skeleton/src/lib/themes/theme-modern.css b/packages/plugin/src/themes/theme-modern.css similarity index 100% rename from packages/skeleton/src/lib/themes/theme-modern.css rename to packages/plugin/src/themes/theme-modern.css diff --git a/packages/skeleton/src/lib/themes/theme-rocket.css b/packages/plugin/src/themes/theme-rocket.css similarity index 100% rename from packages/skeleton/src/lib/themes/theme-rocket.css rename to packages/plugin/src/themes/theme-rocket.css diff --git a/packages/skeleton/src/lib/themes/theme-sahara.css b/packages/plugin/src/themes/theme-sahara.css similarity index 100% rename from packages/skeleton/src/lib/themes/theme-sahara.css rename to packages/plugin/src/themes/theme-sahara.css diff --git a/packages/skeleton/src/lib/themes/theme-seafoam.css b/packages/plugin/src/themes/theme-seafoam.css similarity index 100% rename from packages/skeleton/src/lib/themes/theme-seafoam.css rename to packages/plugin/src/themes/theme-seafoam.css diff --git a/packages/skeleton/src/lib/themes/theme-seasonal.css b/packages/plugin/src/themes/theme-seasonal.css similarity index 100% rename from packages/skeleton/src/lib/themes/theme-seasonal.css rename to packages/plugin/src/themes/theme-seasonal.css diff --git a/packages/skeleton/src/lib/themes/theme-skeleton.css b/packages/plugin/src/themes/theme-skeleton.css similarity index 100% rename from packages/skeleton/src/lib/themes/theme-skeleton.css rename to packages/plugin/src/themes/theme-skeleton.css diff --git a/packages/skeleton/src/lib/themes/theme-test.css b/packages/plugin/src/themes/theme-test.css similarity index 100% rename from packages/skeleton/src/lib/themes/theme-test.css rename to packages/plugin/src/themes/theme-test.css diff --git a/packages/skeleton/src/lib/themes/theme-vintage.css b/packages/plugin/src/themes/theme-vintage.css similarity index 100% rename from packages/skeleton/src/lib/themes/theme-vintage.css rename to packages/plugin/src/themes/theme-vintage.css diff --git a/packages/plugin/src/types.ts b/packages/plugin/src/types.ts new file mode 100644 index 00000000..41d4c854 --- /dev/null +++ b/packages/plugin/src/types.ts @@ -0,0 +1,145 @@ +import type { CSSRuleObject } from 'tailwindcss/types/config'; +import type { PresetTheme, ThemeProperties } from './tailwind/themes'; + +export type ConfigOptions = { + /** + * Prefixes Skeleton component classes with a specified string. + * + * This should be used when there are Skeleton class names + * that conflict with other plugins. For example, our `btn` class + * can often conflict with other UI libraries. + * + * **NOTE:** Only use this if you're using this plugin WITHOUT + * our accompanying component library, `@skeletonlabs/skeleton`. + * + * @example + * // Skeleton classes will be prefixed with 'sk-' (e.g., sk-btn) + * prefix = 'sk-' + * + * @default '' + */ + prefix?: string; + /** + * Whether to include Skeleton's base styles. + * @default true + */ + base?: boolean; + /** + * Theme config for configuring your themes. + */ + themes?: ThemeConfig; +}; + +export type ThemeConfig = { + /** + * Custom themes can be enabled by passing them to this option. + * + * @example + * custom = [ + * { + * name: "my-custom-theme", + * properties: { + * '--theme-font-family-base': 'system-ui', + * '--theme-font-family-heading': "'Space Grotesk', sans-serif", + * '--theme-font-color-base': 'var(--color-primary-900)', + * '--theme-font-color-dark': 'var(--color-primary-100)', + * // ... + * }, + * enhancements: { // optional + * "[data-theme='my-custom-theme'] h1": { + * fontWeight: "400" + * } + * } + * } + * ] + * + * + */ + custom?: Array; + /** + * Preset themes can be enabled by passing them to this option. + * + * @example + * // Preset themes can be enabled by simply passing their names + * preset = [ "skeleton", "modern", "rocket" ] + * + * @example + * // Or by passing an object, enabling the ability + * // to enable a preset's `enhancements` + * preset = [ + * { name: "skeleton", enhancements: true }, + * { name: "modern", enhancements: true }, + * ] + * + */ + preset?: Array; +}; + +export type CustomThemeConfig = { + /** + * The name of your custom theme. + * + * This is the required value to activate your + * theme with the `data-theme` attribute in your `body` element. + * + * @example + * // If name = "my-custom-theme" + * + */ + name: string; + /** + * Define your own custom theme properties here. + * + * To generate a custom theme, visit our Theme Generator. + * @see https://skeleton.dev/docs/generator + * + * @example + * properties = { + * '--theme-font-family-base': 'system-ui', + * '--theme-font-family-heading': "'Space Grotesk', sans-serif", + * '--theme-font-color-base': 'var(--color-primary-900)', + * '--theme-font-color-dark': 'var(--color-primary-100)', + * // ... + * } + * + * @example + * // If you wish to extend one of our preset themes, you can do so + * // with our provided `getThemeProperties()` function. + * import { getThemeProperties } from "@skeletonlabs/tw-plugin"; + * + * properties = { + * ...getThemeProperties("skeleton"), + * '--color-primary-50': '240 228 254', + * '--color-primary-100': '235 219 253', + * '--color-primary-200': '231 210 253', + * '--color-primary-300': '216 183 251', + * '--color-primary-400': '186 130 248', + * '--color-primary-500': '157 76 245', + * '--color-primary-600': '141 68 221', + * '--color-primary-700': '118 57 184', + * '--color-primary-800': '94 46 147', + * '--color-primary-900': '77 37 120' + * } + */ + properties: ThemeProperties; +}; + +export type PresetThemeConfig = { + /** + * Name of one of our provided theme presets. + */ + name: PresetTheme; + /** + * Whether to include the preset theme enhancements. Disabled by default. + * + * This implements additional settings such as background gradients, + * header font weights, and more. + * + * @example + * // These are disabled by default, so you must enable them to opt-in + * skeleton({ themes: [{ name: "skeleton", enhancements: true }] }) + * + * @default false + */ + enhancements?: boolean; +}; diff --git a/packages/plugin/tailwind.config.ts b/packages/plugin/tailwind.config.ts new file mode 100644 index 00000000..181341fc --- /dev/null +++ b/packages/plugin/tailwind.config.ts @@ -0,0 +1,10 @@ +import { Config } from 'tailwindcss'; +import { corePlugin } from './src/tailwind/core.js'; + +const config = { + darkMode: 'class', + content: [], + plugins: [corePlugin] +} satisfies Config; + +export default config; diff --git a/packages/plugin/tsconfig.json b/packages/plugin/tsconfig.json new file mode 100644 index 00000000..e2010051 --- /dev/null +++ b/packages/plugin/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "nodenext", + "lib": ["ES2020"], + "target": "ES2020", + "module": "CommonJS", + "typeRoots": ["./node_modules/@types", "./scripts/@types"] + }, + "include": ["src", "scripts"] +} diff --git a/packages/plugin/tsup.config.ts b/packages/plugin/tsup.config.ts new file mode 100644 index 00000000..1767ad12 --- /dev/null +++ b/packages/plugin/tsup.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entry: ['src/index.ts'], + outDir: 'dist', + sourcemap: true, + format: ['cjs'], + dts: true, + clean: true, + tsconfig: 'tsconfig.json', + ignoreWatch: ['src/tailwind/generated'] +}); diff --git a/packages/skeleton/package.json b/packages/skeleton/package.json index d4f20e00..53917e68 100644 --- a/packages/skeleton/package.json +++ b/packages/skeleton/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "vite dev", "build": "vite build", - "package": "node ./scripts/pre-build.js && pnpm build:jss && svelte-kit sync && svelte-package && node ./scripts/post-build.js", + "package": "node ./scripts/pre-build.js && svelte-kit sync && svelte-package && node ./scripts/post-build.js", "preview": "vite preview", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", @@ -14,8 +14,7 @@ "format": "prettier --ignore-path .prettierignore --write --plugin-search-dir=. .", "test": "vitest", "coverage": "vitest run --coverage", - "sync": "svelte-kit sync && pnpm build:jss", - "build:jss": "node ./scripts/generate-jss.js --package" + "sync": "svelte-kit sync" }, "repository": { "type": "git", @@ -82,21 +81,12 @@ "types": "./dist/index.d.ts", "svelte": "./dist/index.js", "default": "./dist/index.js" - }, - "./styles/*": "./dist/styles/*", - "./themes/*": "./dist/themes/*", - "./tailwind/skeleton.cjs": { - "types": "./dist/tailwind/skeleton.cts", - "default": "./dist/tailwind/skeleton.cjs" } }, "typesVersions": { ">4.0": { "index.d.ts": [ "./dist/index.d.ts" - ], - "tailwind/skeleton.cjs": [ - "./dist/tailwind/skeleton.d.cts" ] } } @@ -116,9 +106,6 @@ "./dist/**/*.d.ts", "./dist/**/*.cjs", "./dist/**/*.d.cts", - "./dist/styles/*", - "./dist/tailwind/*", - "./dist/themes/*", "!./dist/**/*.test.*" ] } diff --git a/packages/skeleton/scripts/generate-jss.js b/packages/skeleton/scripts/generate-jss.js deleted file mode 100644 index 9e62a996..00000000 --- a/packages/skeleton/scripts/generate-jss.js +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env node -import { generateBaseTWStyles, transpileCssToJs } from './compile-css-to-js.cjs'; -import { mkdir, writeFile, unlink } from 'fs/promises'; - -const INTELLISENSE_FILE_NAME = 'intellisense-classes.cjs'; - -exec(); - -async function exec() { - // Deletes the previously generated CSS-in-JS file. If we don't, our plugin will - // add duplicate classes to our newly generated CSS-in-JS file. - await unlink(`./src/lib/tailwind/generated/${INTELLISENSE_FILE_NAME}`).catch(() => { - // file doesn't exist, don't worry about it - }); - - // Makes directory that stores our generated CSS-in-JS - await mkdir('./src/lib/tailwind/generated').catch(() => { - // directory already exists - }); - - const baseTWStyles = await generateBaseTWStyles(); - const generatedComponentJSS = await transpileCssToJs('./src/lib/styles/skeleton.css'); - const cleanedComponentClasses = removeDuplicateClasses(generatedComponentJSS, baseTWStyles); - const componentClasses = patchMediaQueries(cleanedComponentClasses); - - // Creates the generated CSS-in-JS file - await writeFile(`./src/lib/tailwind/generated/${INTELLISENSE_FILE_NAME}`, `module.exports = ${JSON.stringify(componentClasses)}`).catch( - (e) => console.error(e) - ); -} - -// Purges the generated CSS-in-JS file of duplicate TW classes -function removeDuplicateClasses(cssInJs, baseTWStyles) { - for (const key of Object.keys(cssInJs)) { - // We'll delete all the TW Base styles (i.e. html {...} body {...} etc.) - if (baseTWStyles[key] !== undefined) delete cssInJs[key]; - if (key.includes(':is')) continue; - if (key.startsWith('@media')) continue; - // deletes the dark variant of type selectors (ex: .dark body {...}) - if (key.startsWith('.dark') && key[6] !== '.') delete cssInJs[key]; - // if it's not a class selector, delete it (only want classes in the intellisense) - if (key[0] !== '.') delete cssInJs[key]; - } - - return cssInJs; -} - -// Moves all of the media queries towards the end of the cssInJs object. -function patchMediaQueries(cssInJs) { - const mediaQueries = {}; - - for (const key of Object.keys(cssInJs)) { - if (key.startsWith('@media')) { - mediaQueries[key] = cssInJs[key]; - delete cssInJs[key]; - } - } - - for (const key of Object.keys(mediaQueries)) { - cssInJs[key] = mediaQueries[key]; - } - - return cssInJs; -} diff --git a/packages/skeleton/scripts/pre-build.js b/packages/skeleton/scripts/pre-build.js index 5c28cf07..908ba841 100644 --- a/packages/skeleton/scripts/pre-build.js +++ b/packages/skeleton/scripts/pre-build.js @@ -1,10 +1 @@ #!/usr/bin/env node - -import { rmSync } from 'fs'; - -try { - // We'll delete the .temp directory to force the regeneration of all of the TW Classes - rmSync('.temp', { recursive: true }); -} catch { - // Directory doesn't exist, don't worry about it -} diff --git a/packages/skeleton/src/lib/styles/all.css b/packages/skeleton/src/lib/styles/all.css deleted file mode 100644 index f457fbf6..00000000 --- a/packages/skeleton/src/lib/styles/all.css +++ /dev/null @@ -1,30 +0,0 @@ -/* Stylesheet: skeleton.css */ - -/* -- Will be replaced by `skeleton.css` in the next major release. -- All available stylesheets are imported -- Typography using on-by-default system -*/ - -/* NOTE: The order shown below is required */ -/* Import AFTER your theme, but BEFORE your global stylesheet. */ - -/* Tailwind Directives */ -@import 'partials/tailwind.css'; - -/* === OPTIONAL STYLESHEETS === */ - -/* Core Styles */ -@import 'partials/core.css'; - -/* Typography Settings */ -@import 'partials/typography.css'; -/* DEPRECATED: 'partials/typography-prose.css' must now be imported directly */ - -/* === REQUIRED STYLESHEETS === */ - -/* Imports all Tailwind Elements */ -@import 'partials/elements.css'; - -/* Imports all Variant Styles */ -@import 'partials/variants.css'; diff --git a/packages/skeleton/src/lib/styles/elements/modals.css b/packages/skeleton/src/lib/styles/elements/modals.css deleted file mode 100644 index 77274108..00000000 --- a/packages/skeleton/src/lib/styles/elements/modals.css +++ /dev/null @@ -1,15 +0,0 @@ -/* Tailwind Elements: modals.css */ - -/* === Modal (helpers) === */ - -.w-modal-slim { - @apply w-full max-w-[400px]; -} - -.w-modal { - @apply w-full max-w-[640px]; -} - -.w-modal-wide { - @apply w-full max-w-[80%]; -} diff --git a/packages/skeleton/src/lib/styles/elements/popups.css b/packages/skeleton/src/lib/styles/elements/popups.css deleted file mode 100644 index 587bb7da..00000000 --- a/packages/skeleton/src/lib/styles/elements/popups.css +++ /dev/null @@ -1,16 +0,0 @@ -/* Tailwind Elements: popups.css */ - -/* === Popup === */ - -[data-popup] { - /* https://floating-ui.com/docs/computeposition#usage */ - @apply absolute top-0 left-0; - /* Set hidden on page load */ - @apply hidden; - /* Transitions */ - @apply transition-opacity duration-150; -} - -[data-popup] .arrow { - @apply absolute rotate-45 w-2 h-2; -} diff --git a/packages/skeleton/src/lib/styles/partials/elements.css b/packages/skeleton/src/lib/styles/partials/elements.css deleted file mode 100644 index 1d374e2f..00000000 --- a/packages/skeleton/src/lib/styles/partials/elements.css +++ /dev/null @@ -1,20 +0,0 @@ -/* Stylesheet: elements.css */ -/* Import AFTER your theme, but BEFORE your global stylesheet. */ -/* Recommended as the LAST stylesheet in the set */ - -@import '../elements/alerts.css'; -@import '../elements/badges.css'; -@import '../elements/breadcrumbs.css'; -@import '../elements/buttons.css'; -@import '../elements/cards.css'; -@import '../elements/codeblocks.css'; -@import '../elements/chips.css'; -@import '../elements/forms.css'; -@import '../elements/lists.css'; -@import '../elements/logo-clouds.css'; -@import '../elements/placeholders.css'; -@import '../elements/tables.css'; - -/* Utilities */ -@import '../elements/modals.css'; -@import '../elements/popups.css'; diff --git a/packages/skeleton/src/lib/styles/partials/tailwind.css b/packages/skeleton/src/lib/styles/partials/tailwind.css deleted file mode 100644 index 46dc35d7..00000000 --- a/packages/skeleton/src/lib/styles/partials/tailwind.css +++ /dev/null @@ -1,16 +0,0 @@ -/* Stylesheet: tailwind.css */ - -/* -https://tailwindcss.com/docs/functions-and-directives - -IMPORTANT: -Be sure to remove these directives from your global CSS stylesheet. - -Tailwind directives should only be included ONCE per project. -These directives should precede ALL Skeleton stylesheets. -*/ - -@tailwind base; -@tailwind components; -@tailwind utilities; -@tailwind variants; diff --git a/packages/skeleton/src/lib/styles/partials/typography-prose.css b/packages/skeleton/src/lib/styles/partials/typography-prose.css deleted file mode 100644 index ed9497d7..00000000 --- a/packages/skeleton/src/lib/styles/partials/typography-prose.css +++ /dev/null @@ -1,49 +0,0 @@ -/* Stylesheet: typography-prose.css */ - -/* Provides default styling for the Tailwind Typography plugin via element modifiers. */ -/* https://tailwindcss.com/docs/typography-plugin */ - -.prose { - @apply text-base font-token text-token; - /* Element Modifiers */ - /* https://tailwindcss.com/docs/typography-plugin#element-modifiers */ - @apply prose-headings:text-token; - /* @apply prose-lead:{utility}; */ - @apply prose-h1:font-heading-token prose-h1:text-3xl prose-h1:md:text-5xl; - @apply prose-h2:font-heading-token prose-h2:text-2xl prose-h2:md:text-4xl; - @apply prose-h3:font-heading-token prose-h3:text-xl prose-h3:md:text-2xl; - @apply prose-h4:font-heading-token prose-h4:text-lg prose-h4:md:text-xl; - @apply prose-p:text-base; - /* @apply prose-a:{utility}; */ - @apply prose-a:text-primary-700 prose-a:dark:text-primary-500 prose-a:hover:brightness-110 prose-a:underline; - @apply prose-blockquote:text-token prose-blockquote:text-base prose-blockquote:!border-secondary-500; - /* @apply prose-figure:{utility}; */ - @apply prose-figcaption:text-token prose-figcaption:!text-sm prose-figcaption:italic prose-figcaption:text-center mt-3; - @apply prose-strong:text-token; - @apply prose-em:text-token; - /* @apply prose-ol:{utility}; */ - /* @apply prose-ul:{utility}; */ - @apply prose-li:text-base; - /* @apply prose-table:{utility}; */ - /* @apply prose-thead:{utility}; */ - /* @apply prose-tr:{utility}; */ - /* @apply prose-th:{utility}; */ - /* @apply prose-td:{utility}; */ - /* @apply prose-img:{utility}; */ - /* @apply prose-video:{utility}; */ - /* @apply prose-hr:{utility}; */ - - /* The following have special use cases and must be handled seperately */ - /* @apply prose-code:{utility}; */ - /* @apply prose-pre:{utility}; */ -} - -/* NOTE: keep these in sync with typography.css */ -.prose pre:not(.code-block pre) { - @apply font-mono text-base bg-neutral-900/90 text-white p-4 whitespace-pre-wrap overflow-x-auto rounded-container-token; -} -.prose code:is(:not(pre *)) { - @apply font-mono text-xs text-primary-700 dark:text-primary-400 whitespace-nowrap; - @apply bg-primary-500/30 dark:bg-primary-500/20; - @apply py-0.5 px-1 rounded; -} diff --git a/packages/skeleton/src/lib/styles/partials/typography.css b/packages/skeleton/src/lib/styles/partials/typography.css deleted file mode 100644 index 7de795f9..00000000 --- a/packages/skeleton/src/lib/styles/partials/typography.css +++ /dev/null @@ -1,99 +0,0 @@ -/* Stylesheet: typography.css */ - -/* -This represents the ON-BY-DEFAULT typography styles. -IMPORTANT: take care to maintain parity with typography-next.css! -*/ - -@layer base { - body { - @apply text-base font-token text-token; - } - - /* === Headings === */ - - h1:not(.unstyled) { - @apply font-heading-token text-3xl md:text-5xl; - } - h2:not(.unstyled) { - @apply font-heading-token text-2xl md:text-4xl; - } - h3:not(.unstyled) { - @apply font-heading-token text-xl md:text-2xl; - } - h4:not(.unstyled) { - @apply font-heading-token text-lg md:text-xl; - } - h5:not(.unstyled) { - @apply font-heading-token text-base md:text-lg; - } - h6:not(.unstyled) { - @apply font-heading-token text-sm md:text-base; - } - - /* === Elements === */ - - /* p { ... } */ - - a:not(.unstyled):not(.permalink):not(.btn):not(.btn-icon):not(.app-bar a):not(.logo-item):not(a.card):not(.list-nav a) { - @apply text-primary-700 dark:text-primary-500 hover:brightness-110 underline; - } - - blockquote:not(.unstyled) { - @apply text-token text-base italic border-l-8 border-secondary-500 px-4 pl-4; - } - - /* Keyboard */ - kbd:not(.unstyled) { - @apply font-sans font-bold text-sm; - @apply bg-surface-300-600-token px-1.5 py-[3px] rounded; - @apply ring-[1px] ring-surface-900 ring-inset; - @apply border-b-2 border-surface-900; - } - - /* Timestamps */ - time:not(.unstyled) { - @apply text-sm text-surface-500 dark:text-surface-400; - } - - /* === Preformatted / Code === */ - /* For use outside of Skeleton's CodeBlock component */ - - pre:not(.unstyled):not(.code-block pre) { - @apply font-mono text-base bg-neutral-900/90 text-white p-4 whitespace-pre-wrap overflow-x-auto rounded-container-token; - } - - code:not(.unstyled):is(:not(pre *)) { - @apply font-mono text-xs text-primary-700 dark:text-primary-400 whitespace-nowrap; - @apply bg-primary-500/30 dark:bg-primary-500/20; - @apply py-0.5 px-1 rounded; - } - - /* === Insertions / Deletions ==== */ - /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins */ - /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del */ - - ins:not(.unstyled), - del:not(.unstyled) { - @apply block relative p-0.5 pl-5; - text-decoration: none; - } - - ins:not(.unstyled)::before, - del:not(.unstyled)::before { - @apply absolute left-1 font-mono; - } - ins:not(.unstyled)::before { - content: '+'; - } - del:not(.unstyled)::before { - content: '−'; - } - - ins:not(.unstyled) { - @apply font-mono bg-success-500 text-on-success-token; - } - del:not(.unstyled) { - @apply font-mono bg-error-500 text-on-error-token; - } -} diff --git a/packages/skeleton/src/lib/styles/skeleton-minimal.css b/packages/skeleton/src/lib/styles/skeleton-minimal.css deleted file mode 100644 index 0c4a87c9..00000000 --- a/packages/skeleton/src/lib/styles/skeleton-minimal.css +++ /dev/null @@ -1,30 +0,0 @@ -/* Stylesheet: skeleton-minimal.css */ - -/* -- Only required stylesheets are provided. -- Optional stylesheets are not included. -- Typography using opt-in system -*/ - -/* NOTE: The order shown below is required */ -/* Import AFTER your theme, but BEFORE your global stylesheet. */ - -/* Tailwind Directives */ -@import 'partials/tailwind.css'; - -/* === OPTIONAL STYLESHEETS === */ - -/* Core Styles */ -/* (excluded - supplied by developer) */ - -/* Typography Settings */ -@import 'partials/typography-next.css'; -/* (prose excluded - supplied by developer) */ - -/* === REQUIRED STYLESHEETS === */ - -/* Imports all Tailwind Elements */ -@import 'partials/elements.css'; - -/* Imports all Variant Styles */ -@import 'partials/variants.css'; diff --git a/packages/skeleton/src/lib/styles/skeleton.css b/packages/skeleton/src/lib/styles/skeleton.css deleted file mode 100644 index bc834dcd..00000000 --- a/packages/skeleton/src/lib/styles/skeleton.css +++ /dev/null @@ -1,30 +0,0 @@ -/* Stylesheet: skeleton.css */ - -/* -- Slated to replace `all.css` in the next major release -- All available stylesheets are imported -- Typography using opt-in system -*/ - -/* NOTE: The order shown below is required */ -/* Import AFTER your theme, but BEFORE your global stylesheet. */ - -/* Tailwind Directives */ -@import 'partials/tailwind.css'; - -/* === OPTIONAL STYLESHEETS === */ - -/* Core Styles */ -@import 'partials/core.css'; - -/* Typography Settings */ -@import 'partials/typography-next.css'; -/* DEPRECATED: 'partials/typography-prose.css' must now be imported directly */ - -/* === REQUIRED STYLESHEETS === */ - -/* Imports all Tailwind Elements */ -@import 'partials/elements.css'; - -/* Imports all Variant Styles */ -@import 'partials/variants.css'; diff --git a/packages/skeleton/src/lib/tailwind/core.cjs b/packages/skeleton/src/lib/tailwind/core.cjs deleted file mode 100644 index 1d908116..00000000 --- a/packages/skeleton/src/lib/tailwind/core.cjs +++ /dev/null @@ -1,37 +0,0 @@ -// The Skeleton Tailwind Plugin -// Tailwind Docs: https://tailwindcss.com/docs/plugins -// Skeleton Docs: https://www.skeleton.dev/docs/get-started - -const plugin = require('tailwindcss/plugin'); - -// Skeleton Theme Modules -const themeColors = require('./theme/colors.cjs'); -// Skeleton Design Token Modules -const tokensBackgrounds = require('./tokens/backgrounds.cjs'); -const tokensBorders = require('./tokens/borders.cjs'); -const tokensBorderRadius = require('./tokens/border-radius.cjs'); -const tokensFills = require('./tokens/fills.cjs'); -const tokensText = require('./tokens/text.cjs'); -const tokensRings = require('./tokens/rings.cjs'); - -module.exports = plugin( - ({ addUtilities }) => { - addUtilities({ - // Implement Skeleton design token classes - ...tokensBackgrounds(), - ...tokensBorders(), - ...tokensBorderRadius(), - ...tokensFills(), - ...tokensText(), - ...tokensRings() - }); - }, - { - theme: { - extend: { - // Implement Skeleton theme colors - colors: themeColors() - } - } - } -); diff --git a/packages/skeleton/src/lib/tailwind/intellisense.cjs b/packages/skeleton/src/lib/tailwind/intellisense.cjs deleted file mode 100644 index 46804ee9..00000000 --- a/packages/skeleton/src/lib/tailwind/intellisense.cjs +++ /dev/null @@ -1,21 +0,0 @@ -// The Skeleton Intellisense Tailwind Plugin -// Tailwind Docs: https://tailwindcss.com/docs/plugins -// Skeleton Docs: https://www.skeleton.dev/docs/get-started - -const plugin = require('tailwindcss/plugin'); - -module.exports = plugin(({ addComponents }) => { - // The following will generate the non-token classes PURELY for Intellisense. - // These are excluded from production, which means we still need to lean into - // using the `skeleton.css` stylesheet to import non-token styles. - if (process.env.NODE_ENV !== 'production') { - // try/catch because it will throw when allComponents.cjs isn't generated yet - try { - const all = require('./generated/intellisense-classes.cjs'); - addComponents(all, { - respectImportant: true, - respectPrefix: true - }); - } catch {} - } -}); diff --git a/packages/skeleton/src/lib/tailwind/skeleton.cjs b/packages/skeleton/src/lib/tailwind/skeleton.cjs deleted file mode 100644 index 0f06e54b..00000000 --- a/packages/skeleton/src/lib/tailwind/skeleton.cjs +++ /dev/null @@ -1,19 +0,0 @@ -// The Skeleton Tailwind Plugin -// Tailwind Docs: https://tailwindcss.com/docs/plugins -// Skeleton Docs: https://www.skeleton.dev/docs/get-started - -const intellisensePlugin = require('./intellisense.cjs'); -const corePlugin = require('./core.cjs'); - -// The default export is a function that returns an array of plugins -// and accepts an optional config that determines which plugins are included. -// By default, all plugins are included. -module.exports = function (config = { intellisense: true }) { - const { intellisense } = config; - const plugins = [corePlugin]; - - // Add the plugin if the option is not explicitly set to false - if (intellisense !== false) plugins.push(intellisensePlugin); - - return plugins; -}; diff --git a/packages/skeleton/tailwind.config.cjs b/packages/skeleton/tailwind.config.cjs deleted file mode 100644 index 8a5efcbc..00000000 --- a/packages/skeleton/tailwind.config.cjs +++ /dev/null @@ -1,14 +0,0 @@ -const defaultTheme = require('tailwindcss/defaultTheme'); - -module.exports = { - darkMode: 'class', - content: ['./src/**/*.{html,js,svelte,ts}'], - theme: { - extend: { - fontFamily: { - sans: ['Inter', ...defaultTheme.fontFamily.sans] - } - } - }, - plugins: [...require('./src/lib/tailwind/skeleton.cjs')({ intellisense: false })] -}; diff --git a/packages/skeleton/tailwind.config.js b/packages/skeleton/tailwind.config.js new file mode 100644 index 00000000..39758dbd --- /dev/null +++ b/packages/skeleton/tailwind.config.js @@ -0,0 +1,8 @@ +import { skeleton } from '../../packages/plugin/dist/index.js'; + +/** @type {import("tailwindcss").Config} */ +export default { + darkMode: 'class', + content: ['./src/**/*.{html,js,svelte,ts}'], + plugins: [skeleton] +}; diff --git a/sites/skeleton.dev/package.json b/sites/skeleton.dev/package.json index 275436cc..ff4d2c87 100644 --- a/sites/skeleton.dev/package.json +++ b/sites/skeleton.dev/package.json @@ -23,6 +23,7 @@ "@faker-js/faker": "^8.0.2", "@floating-ui/dom": "^1.2.9", "@skeletonlabs/skeleton": "workspace:*", + "@skeletonlabs/tw-plugin": "workspace:*", "@sveltejs/adapter-vercel": "^3.0.1", "@sveltejs/kit": "^1.20.2", "@tailwindcss/forms": "^0.5.3", diff --git a/sites/skeleton.dev/pnpm-lock.yaml b/sites/skeleton.dev/pnpm-lock.yaml index 50d02635..ae6b661e 100644 --- a/sites/skeleton.dev/pnpm-lock.yaml +++ b/sites/skeleton.dev/pnpm-lock.yaml @@ -11,6 +11,9 @@ devDependencies: '@floating-ui/dom': specifier: ^1.2.9 version: 1.2.9 + '@skeletonlabs/tw-plugin': + specifier: workspace:* + version: link:../../packages/plugin '@skeletonlabs/skeleton': specifier: workspace:* version: link:../../packages/skeleton diff --git a/sites/skeleton.dev/src/app.html b/sites/skeleton.dev/src/app.html index 6f04cbde..b9568efe 100644 --- a/sites/skeleton.dev/src/app.html +++ b/sites/skeleton.dev/src/app.html @@ -16,7 +16,7 @@ - +
%sveltekit.body%
diff --git a/sites/skeleton.dev/src/app.postcss b/sites/skeleton.dev/src/app.postcss index 471ae5a4..d4e8f538 100644 --- a/sites/skeleton.dev/src/app.postcss +++ b/sites/skeleton.dev/src/app.postcss @@ -1,5 +1,7 @@ /* Global Stylesheet */ +@import 'tailwind.postcss'; + /* Ad Styles */ @import 'app-ads.postcss'; diff --git a/sites/skeleton.dev/src/hooks.server.ts b/sites/skeleton.dev/src/hooks.server.ts new file mode 100644 index 00000000..9e3f190b --- /dev/null +++ b/sites/skeleton.dev/src/hooks.server.ts @@ -0,0 +1,18 @@ +import type { Handle } from '@sveltejs/kit'; + +export const handle: Handle = async ({ event, resolve }) => { + let theme = ''; + + const cookieTheme = event.cookies.get('theme'); + + if (cookieTheme) { + theme = cookieTheme; + } else { + event.cookies.set('theme', 'skeleton'); + theme = 'skeleton'; + } + + return await resolve(event, { + transformPageChunk: ({ html }) => html.replace('data-theme=""', `data-theme="${theme}"`) + }); +}; diff --git a/sites/skeleton.dev/src/lib/components/DocsAppBar/DocsAppBar.svelte b/sites/skeleton.dev/src/lib/components/DocsAppBar/DocsAppBar.svelte index f906f370..a2589f86 100644 --- a/sites/skeleton.dev/src/lib/components/DocsAppBar/DocsAppBar.svelte +++ b/sites/skeleton.dev/src/lib/components/DocsAppBar/DocsAppBar.svelte @@ -14,8 +14,8 @@ import { AppBar, LightSwitch, popup, modalStore } from '@skeletonlabs/skeleton'; // Stores - import { storeTheme } from '$lib/stores/stores'; import { drawerStore } from '@skeletonlabs/skeleton'; + import { storeTheme } from '$lib/stores/stores'; // Local let isOsMac = false; @@ -66,14 +66,13 @@ // { type: 'test', name: 'Test', icon: '🚧' }, ]; - const setTheme: SubmitFunction = () => { - return async ({ result, update }) => { - await update(); - if (result.type === 'success') { - const theme = result.data?.theme as string; - storeTheme.set(theme); - } - }; + const setTheme: SubmitFunction = ({ formData }) => { + const theme = formData.get('theme')?.toString(); + + if (theme) { + document.body.setAttribute('data-theme', theme); + $storeTheme = theme; + } }; @@ -151,7 +150,7 @@
-