diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 4d861d5f5..c116d6da8 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,13 +1,18 @@ module.exports = { - extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], + extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:svelte/recommended", "prettier"], parser: "@typescript-eslint/parser", plugins: ["@typescript-eslint", "prettier"], root: true, env: { browser: true, - amd: true, + es2017: true, node: true, }, + parserOptions: { + sourceType: "module", + ecmaVersion: 2020, + extraFileExtensions: [".svelte"], + }, rules: { "no-constant-condition": "off", "@typescript-eslint/no-empty-function": "off", @@ -20,4 +25,13 @@ module.exports = { // For doc purposes, prefer interfaces "@typescript-eslint/consistent-type-definitions": ["error", "interface"], }, + overrides: [ + { + files: ["*.svelte"], + parser: "svelte-eslint-parser", + parserOptions: { + parser: "@typescript-eslint/parser", + }, + }, + ], }; diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index b7a516ebb..e75547281 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -45,7 +45,7 @@ jobs: pnpm --filter ...[${{ steps.since.outputs.SINCE }}] format:check - name: Check types - run: pnpm --filter ...[${{ steps.since.outputs.SINCE }}] type-check + run: pnpm --filter ...[${{ steps.since.outputs.SINCE }}] check - name: Test run: VCR_MODE=playback pnpm --filter ...[${{ steps.since.outputs.SINCE }}] test diff --git a/.github/workflows/widgets-publish.yml b/.github/workflows/widgets-publish.yml new file mode 100644 index 000000000..a663013cf --- /dev/null +++ b/.github/workflows/widgets-publish.yml @@ -0,0 +1,51 @@ +name: Widgets - Version and Release + +on: + workflow_dispatch: + inputs: + newversion: + description: "Semantic Version Bump Type (major minor patch)" + default: patch + +defaults: + run: + working-directory: packages/widgets + +jobs: + version_and_release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.BOT_ACCESS_TOKEN }} + - run: corepack enable + - uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "pnpm" + cache-dependency-path: | + packages/widgets/pnpm-lock.yaml + # setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED + registry-url: "https://registry.npmjs.org" + - run: pnpm install + - run: git config --global user.name machineuser + - run: git config --global user.email infra+machineuser@huggingface.co + - run: | + PACKAGE_VERSION=$(node -p "require('./package.json').version") + BUMPED_VERSION=$(node -p "require('semver').inc('$PACKAGE_VERSION', '${{ github.event.inputs.newversion }}')") + # Update package.json with the new version + node -e "const fs = require('fs'); const package = JSON.parse(fs.readFileSync('./package.json')); package.version = '$BUMPED_VERSION'; fs.writeFileSync('./package.json', JSON.stringify(package, null, '\t') + '\n');" + git commit . -m "🔖 @hugginface/widgets $BUMPED_VERSION" + git tag "widgets-v$BUMPED_VERSION" + - run: pnpm publish --no-git-checks . + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: git push --follow-tags + # hack - reuse actions/setup-node@v3 just to set a new registry + - uses: actions/setup-node@v3 + with: + node-version: "18" + registry-url: "https://npm.pkg.github.com" + - run: pnpm publish --no-git-checks . + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.prettierrc b/.prettierrc index 0001bb886..4593d117a 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,5 +3,7 @@ "useTabs": true, "tabWidth": 2, "printWidth": 120, - "trailingComma": "es5" + "trailingComma": "es5", + "plugins": ["prettier-plugin-svelte"], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] } diff --git a/package.json b/package.json index d25118752..c50760cbe 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,17 @@ { "license": "MIT", - "packageManager": "pnpm@8.3.1", + "packageManager": "pnpm@8.10.5", "dependencies": { "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.51.0", "eslint": "^8.35.0", - "eslint-config-prettier": "^8.6.0", + "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^4.2.1", - "prettier": "^2.8.4", - "typescript": "^4.9.5", - "vite": "^4.1.4" + "eslint-plugin-svelte": "^2.30.0", + "prettier": "^3.0.0", + "prettier-plugin-svelte": "^3.0.0", + "typescript": "^5.0.0", + "vite": "4.1.4" }, "scripts": { "lint": "eslint --quiet --fix --ext .cjs,.ts .eslintrc.cjs", @@ -20,8 +22,8 @@ "devDependencies": { "@vitest/browser": "^0.29.7", "semver": "^7.5.0", - "tsup": "^6.7.0", "ts-node": "^10.9.1", + "tsup": "^6.7.0", "vitest": "^0.29.4", "webdriverio": "^8.6.7" } diff --git a/packages/agents/package.json b/packages/agents/package.json index 3f9d9b0b1..183d27df6 100644 --- a/packages/agents/package.json +++ b/packages/agents/package.json @@ -1,6 +1,6 @@ { "name": "@huggingface/agents", - "packageManager": "pnpm@8.3.1", + "packageManager": "pnpm@8.10.5", "version": "0.0.5", "description": "Multi-modal agents using Hugging Face's models", "repository": "https://github.com/huggingface/huggingface.js.git", @@ -34,7 +34,7 @@ "build": "tsup", "test": "vitest run", "test:browser": "vitest run --browser.name=chrome --browser.headless --config ./vitest-browser.config.ts", - "type-check": "tsc" + "check": "tsc" }, "files": [ "src", diff --git a/packages/doc-internal/package.json b/packages/doc-internal/package.json index 47a947c89..1e3b6311c 100644 --- a/packages/doc-internal/package.json +++ b/packages/doc-internal/package.json @@ -1,6 +1,6 @@ { "name": "@huggingface/doc-internal", - "packageManager": "pnpm@8.3.1", + "packageManager": "pnpm@8.10.5", "version": "1.0.0", "description": "Package to generate doc for other @huggingface packages", "private": true, diff --git a/packages/hub/package.json b/packages/hub/package.json index 3f08e038d..fb2836544 100644 --- a/packages/hub/package.json +++ b/packages/hub/package.json @@ -1,6 +1,6 @@ { "name": "@huggingface/hub", - "packageManager": "pnpm@8.3.1", + "packageManager": "pnpm@8.10.5", "version": "0.12.2", "description": "Utilities to interact with the Hugging Face hub", "repository": "https://github.com/huggingface/huggingface.js.git", @@ -36,7 +36,7 @@ "build": "tsup", "test": "vitest run", "test:browser": "vitest run --browser.name=chrome --browser.headless --config ./vitest-browser.config.ts", - "type-check": "tsc" + "check": "tsc" }, "files": [ "src", diff --git a/packages/inference/package.json b/packages/inference/package.json index a6e4f0070..5c99559bd 100644 --- a/packages/inference/package.json +++ b/packages/inference/package.json @@ -1,7 +1,7 @@ { "name": "@huggingface/inference", "version": "2.6.4", - "packageManager": "pnpm@8.3.1", + "packageManager": "pnpm@8.10.5", "license": "MIT", "author": "Tim Mikeladze ", "description": "Typescript wrapper for the Hugging Face Inference API", @@ -44,10 +44,11 @@ "lint:check": "eslint --ext .cjs,.ts .", "format": "prettier --write .", "format:check": "prettier --check .", + "prepare": "pnpm run build", "prepublishOnly": "pnpm run build", "test": "vitest run --config vitest.config.ts", "test:browser": "vitest run --browser.name=chrome --browser.headless --config vitest.config.ts", - "type-check": "tsc" + "check": "tsc" }, "devDependencies": { "@types/node": "18.13.0", diff --git a/packages/languages/package.json b/packages/languages/package.json index 080d50d89..39075e311 100644 --- a/packages/languages/package.json +++ b/packages/languages/package.json @@ -1,6 +1,6 @@ { "name": "@huggingface/languages", - "packageManager": "pnpm@8.3.1", + "packageManager": "pnpm@8.10.5", "version": "1.0.0", "description": "List of ISO-639 languages used in the Hub", "repository": "https://github.com/huggingface/huggingface.js.git", @@ -26,7 +26,7 @@ "prepublishOnly": "pnpm run build", "build": "tsup src/index.ts --format cjs,esm --clean --dts", "test": "vitest run", - "type-check": "tsc" + "check": "tsc" }, "files": [ "dist", diff --git a/packages/tasks/package.json b/packages/tasks/package.json index f31c52d92..2ee60dac6 100644 --- a/packages/tasks/package.json +++ b/packages/tasks/package.json @@ -1,8 +1,8 @@ { "name": "@huggingface/tasks", - "packageManager": "pnpm@8.3.1", - "version": "0.0.4", - "description": "List of ISO-639 languages used in the Hub", + "packageManager": "pnpm@8.10.5", + "version": "0.0.5", + "description": "List of ML tasks for huggingface.co/tasks", "repository": "https://github.com/huggingface/huggingface.js.git", "publishConfig": { "access": "public" @@ -25,7 +25,8 @@ "format:check": "prettier --check .", "prepublishOnly": "pnpm run build", "build": "tsup src/index.ts --format cjs,esm --clean --dts", - "type-check": "tsc" + "prepare": "pnpm run build", + "check": "tsc" }, "files": [ "dist", diff --git a/packages/tasks/src/index.ts b/packages/tasks/src/index.ts index 0519b7d96..d45f5d541 100644 --- a/packages/tasks/src/index.ts +++ b/packages/tasks/src/index.ts @@ -1,4 +1,13 @@ export type { TaskData, TaskDemo, TaskDemoEntry, ExampleRepo } from "./Types"; export { TASKS_DATA } from "./tasksData"; -export { PIPELINE_DATA, type PipelineType, type PipelineData, type Modality, MODALITIES } from "./pipelines"; +export { + PIPELINE_DATA, + PIPELINE_TYPES, + type PipelineType, + type PipelineData, + type Modality, + MODALITIES, + MODALITY_LABELS, +} from "./pipelines"; export { ModelLibrary } from "./modelLibraries"; +export type { ModelLibraryKey } from "./modelLibraries"; diff --git a/packages/tasks/src/pipelines.ts b/packages/tasks/src/pipelines.ts index ab22782d5..ae487d5e3 100644 --- a/packages/tasks/src/pipelines.ts +++ b/packages/tasks/src/pipelines.ts @@ -2,6 +2,16 @@ export const MODALITIES = ["cv", "nlp", "audio", "tabular", "multimodal", "rl", export type Modality = (typeof MODALITIES)[number]; +export const MODALITY_LABELS = { + multimodal: "Multimodal", + nlp: "Natural Language Processing", + audio: "Audio", + cv: "Computer Vision", + rl: "Reinforcement Learning", + tabular: "Tabular", + other: "Other", +} satisfies Record; + /** * Public interface for a sub task. * @@ -606,3 +616,4 @@ export const PIPELINE_DATA = { } satisfies Record; export type PipelineType = keyof typeof PIPELINE_DATA; +export const PIPELINE_TYPES = Object.keys(PIPELINE_DATA) as PipelineType[]; diff --git a/packages/widgets/.eslintignore b/packages/widgets/.eslintignore new file mode 100644 index 000000000..03cc13658 --- /dev/null +++ b/packages/widgets/.eslintignore @@ -0,0 +1,14 @@ +.DS_Store +node_modules +/dist +/build +/.svelte-kit +/package +.env +.env.* +!.env.example + +# Ignore files for PNPM, NPM and YARN +pnpm-lock.yaml +package-lock.json +yarn.lock diff --git a/packages/widgets/.gitignore b/packages/widgets/.gitignore new file mode 100644 index 000000000..ac7211b40 --- /dev/null +++ b/packages/widgets/.gitignore @@ -0,0 +1,11 @@ +.DS_Store +node_modules +/build +/dist +/.svelte-kit +/package +.env +.env.* +!.env.example +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/packages/widgets/.prettierignore b/packages/widgets/.prettierignore new file mode 100644 index 000000000..03cc13658 --- /dev/null +++ b/packages/widgets/.prettierignore @@ -0,0 +1,14 @@ +.DS_Store +node_modules +/dist +/build +/.svelte-kit +/package +.env +.env.* +!.env.example + +# Ignore files for PNPM, NPM and YARN +pnpm-lock.yaml +package-lock.json +yarn.lock diff --git a/packages/widgets/README.md b/packages/widgets/README.md new file mode 100644 index 000000000..64d097d3a --- /dev/null +++ b/packages/widgets/README.md @@ -0,0 +1,18 @@ +# Huggingface Widgets + +Open-source version of the inference widgets from huggingface.co + +> Built with Svelte and SvelteKit + +**Demo page:** https://huggingface.co/spaces/huggingfacejs/inference-widgets + +You can also run the demo locally: + +```console +pnpm install +pnpm dev +``` + +## Publishing + +Because `@huggingface/widgets` depends on `@huggingface/tasks`, you need to publish `@huggingface/tasks` first, and then `@huggingface/widgets`. diff --git a/packages/widgets/package.json b/packages/widgets/package.json new file mode 100644 index 000000000..b8e394020 --- /dev/null +++ b/packages/widgets/package.json @@ -0,0 +1,59 @@ +{ + "name": "@huggingface/widgets", + "packageManager": "pnpm@8.10.5", + "version": "0.0.4", + "publishConfig": { + "access": "public" + }, + "scripts": { + "dev": "vite dev", + "build": "vite build && npm run package", + "preview": "vite preview", + "package": "svelte-kit sync && svelte-package && publint", + "prepublishOnly": "npm run package", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "eslint --quiet --fix --ext .cjs,.ts .", + "lint:check": "eslint --ext .cjs,.ts .", + "format": "prettier --write .", + "format:check": "prettier --check ." + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js" + } + }, + "files": [ + "dist", + "src", + "!dist/**/*.test.*", + "!dist/**/*.spec.*", + "static/audioProcessor.js" + ], + "dependencies": { + "@huggingface/tasks": "workspace:^" + }, + "peerDependencies": { + "svelte": "^3.59.2" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^2.0.0", + "@sveltejs/kit": "^1.27.4", + "@sveltejs/package": "^2.0.0", + "@tailwindcss/forms": "^0.5.7", + "autoprefixer": "^10.4.16", + "eslint": "^8.28.0", + "postcss": "^8.4.31", + "publint": "^0.1.9", + "svelte": "^3.59.2", + "svelte-check": "^3.6.0", + "tailwindcss": "^3.3.5", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "vite": "^4.0.0" + }, + "svelte": "./dist/index.js", + "types": "./dist/index.d.ts", + "type": "module" +} diff --git a/packages/widgets/pnpm-lock.yaml b/packages/widgets/pnpm-lock.yaml new file mode 100644 index 000000000..4703ba0b3 --- /dev/null +++ b/packages/widgets/pnpm-lock.yaml @@ -0,0 +1,1973 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + '@huggingface/tasks': + specifier: workspace:^ + version: link:../tasks + +devDependencies: + '@sveltejs/adapter-auto': + specifier: ^2.0.0 + version: 2.0.0(@sveltejs/kit@1.27.4) + '@sveltejs/kit': + specifier: ^1.27.4 + version: 1.27.4(svelte@3.59.2)(vite@4.5.0) + '@sveltejs/package': + specifier: ^2.0.0 + version: 2.0.0(svelte@3.59.2)(typescript@5.0.4) + '@tailwindcss/forms': + specifier: ^0.5.7 + version: 0.5.7(tailwindcss@3.3.5) + autoprefixer: + specifier: ^10.4.16 + version: 10.4.16(postcss@8.4.31) + eslint: + specifier: ^8.28.0 + version: 8.28.0 + postcss: + specifier: ^8.4.31 + version: 8.4.31 + publint: + specifier: ^0.1.9 + version: 0.1.9 + svelte: + specifier: ^3.59.2 + version: 3.59.2 + svelte-check: + specifier: ^3.6.0 + version: 3.6.0(postcss@8.4.31)(svelte@3.59.2) + tailwindcss: + specifier: ^3.3.5 + version: 3.3.5 + tslib: + specifier: ^2.4.1 + version: 2.4.1 + typescript: + specifier: ^5.0.0 + version: 5.0.4 + vite: + specifier: ^4.0.0 + version: 4.5.0 + +packages: + + /@aashutoshrathi/word-wrap@1.2.6: + resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} + engines: {node: '>=0.10.0'} + dev: true + + /@alloc/quick-lru@5.2.0: + resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} + engines: {node: '>=10'} + dev: true + + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@eslint/eslintrc@1.4.1: + resolution: {integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 9.6.1 + globals: 13.23.0 + ignore: 5.3.0 + 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 + + /@fastify/busboy@2.1.0: + resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==} + engines: {node: '>=14'} + dev: true + + /@humanwhocodes/config-array@0.11.13: + resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} + engines: {node: '>=10.10.0'} + dependencies: + '@humanwhocodes/object-schema': 2.0.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@2.0.1: + resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} + 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.20 + dev: true + + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} + 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.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + + /@jridgewell/trace-mapping@0.3.20: + resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} + dependencies: + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 + 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 + + /@polka/url@1.0.0-next.23: + resolution: {integrity: sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==} + dev: true + + /@sveltejs/adapter-auto@2.0.0(@sveltejs/kit@1.27.4): + resolution: {integrity: sha512-b+gkHFZgD771kgV3aO4avHFd7y1zhmMYy9i6xOK7m/rwmwaRO8gnF5zBc0Rgca80B2PMU1bKNxyBTHA14OzUAQ==} + peerDependencies: + '@sveltejs/kit': ^1.0.0 + dependencies: + '@sveltejs/kit': 1.27.4(svelte@3.59.2)(vite@4.5.0) + import-meta-resolve: 2.2.2 + dev: true + + /@sveltejs/kit@1.27.4(svelte@3.59.2)(vite@4.5.0): + resolution: {integrity: sha512-Vxl8Jf0C1+/8i/slsxFOnwJntCBDLueO/O6GJ0390KUnyW3Zs+4ZiIinD+cEcYnJPQQ9CRzVSr9Bn6DbmTn4Dw==} + engines: {node: ^16.14 || >=18} + hasBin: true + requiresBuild: true + peerDependencies: + svelte: ^3.54.0 || ^4.0.0-next.0 || ^5.0.0-next.0 + vite: ^4.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte': 2.5.2(svelte@3.59.2)(vite@4.5.0) + '@types/cookie': 0.5.4 + cookie: 0.5.0 + devalue: 4.3.2 + esm-env: 1.0.0 + kleur: 4.1.5 + magic-string: 0.30.5 + mrmime: 1.0.1 + sade: 1.8.1 + set-cookie-parser: 2.6.0 + sirv: 2.0.3 + svelte: 3.59.2 + tiny-glob: 0.2.9 + undici: 5.26.5 + vite: 4.5.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@sveltejs/package@2.0.0(svelte@3.59.2)(typescript@5.0.4): + resolution: {integrity: sha512-sANz/dJibOHOe83hl8pFWUSypqefdYwPp6SUr0SmJxTNQFB5dDECEqwAwoy28DWCQFYl7DU+C1hKkTXyuKOdug==} + engines: {node: ^16.14 || >=18} + hasBin: true + peerDependencies: + svelte: ^3.44.0 + dependencies: + chokidar: 3.5.3 + kleur: 4.1.5 + sade: 1.8.1 + svelte: 3.59.2 + svelte2tsx: 0.6.25(svelte@3.59.2)(typescript@5.0.4) + transitivePeerDependencies: + - typescript + dev: true + + /@sveltejs/vite-plugin-svelte-inspector@1.0.4(@sveltejs/vite-plugin-svelte@2.5.2)(svelte@3.59.2)(vite@4.5.0): + resolution: {integrity: sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ==} + engines: {node: ^14.18.0 || >= 16} + peerDependencies: + '@sveltejs/vite-plugin-svelte': ^2.2.0 + svelte: ^3.54.0 || ^4.0.0 + vite: ^4.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte': 2.5.2(svelte@3.59.2)(vite@4.5.0) + debug: 4.3.4 + svelte: 3.59.2 + vite: 4.5.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@sveltejs/vite-plugin-svelte@2.5.2(svelte@3.59.2)(vite@4.5.0): + resolution: {integrity: sha512-Dfy0Rbl+IctOVfJvWGxrX/3m6vxPLH8o0x+8FA5QEyMUQMo4kGOVIojjryU7YomBAexOTAuYf1RT7809yDziaA==} + engines: {node: ^14.18.0 || >= 16} + peerDependencies: + svelte: ^3.54.0 || ^4.0.0 || ^5.0.0-next.0 + vite: ^4.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.5.2)(svelte@3.59.2)(vite@4.5.0) + debug: 4.3.4 + deepmerge: 4.3.1 + kleur: 4.1.5 + magic-string: 0.30.5 + svelte: 3.59.2 + svelte-hmr: 0.15.3(svelte@3.59.2) + vite: 4.5.0 + vitefu: 0.2.5(vite@4.5.0) + transitivePeerDependencies: + - supports-color + dev: true + + /@tailwindcss/forms@0.5.7(tailwindcss@3.3.5): + resolution: {integrity: sha512-QE7X69iQI+ZXwldE+rzasvbJiyV/ju1FGHH0Qn2W3FKbuYtqp8LKcy6iSw79fVUT5/Vvf+0XgLCeYVG+UV6hOw==} + peerDependencies: + tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1' + dependencies: + mini-svg-data-uri: 1.4.4 + tailwindcss: 3.3.5 + dev: true + + /@types/cookie@0.5.4: + resolution: {integrity: sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA==} + dev: true + + /@types/pug@2.0.9: + resolution: {integrity: sha512-Yg4LkgFYvn1faISbDNWmcAC1XoDT8IoMUFspp5mnagKk+UvD2N0IWt5A7GRdMubsNWqgCLmrkf8rXkzNqb4szA==} + dev: true + + /acorn-jsx@5.3.2(acorn@8.11.2): + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + acorn: 8.11.2 + dev: true + + /acorn@8.11.2: + resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} + 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 + + /autoprefixer@10.4.16(postcss@8.4.31): + resolution: {integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + dependencies: + browserslist: 4.22.1 + caniuse-lite: 1.0.30001563 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.0.0 + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + 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 + + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + + /braces@3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /browserslist@4.22.1: + resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001563 + electron-to-chromium: 1.4.588 + node-releases: 2.0.13 + update-browserslist-db: 1.0.13(browserslist@4.22.1) + dev: true + + /buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + 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 + + /caniuse-lite@1.0.30001563: + resolution: {integrity: sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==} + 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.3 + 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 + + /cookie@0.5.0: + resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} + engines: {node: '>= 0.6'} + 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 + + /dedent-js@1.0.1: + resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} + dev: true + + /deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: true + + /deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + dev: true + + /detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + dev: true + + /devalue@4.3.2: + resolution: {integrity: sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==} + dev: true + + /didyoumean@1.2.2: + resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + 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 + + /electron-to-chromium@1.4.588: + resolution: {integrity: sha512-soytjxwbgcCu7nh5Pf4S2/4wa6UIu+A3p03U2yVr53qGxi1/VTR3ENI+p50v+UxqqZAfl48j3z55ud7VHIOr9w==} + dev: true + + /es6-promise@3.3.1: + resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} + dev: true + + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /escalade@3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} + dev: true + + /escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + dev: true + + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + + /eslint-utils@3.0.0(eslint@8.28.0): + resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} + engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} + peerDependencies: + eslint: '>=5' + dependencies: + eslint: 8.28.0 + eslint-visitor-keys: 2.1.0 + dev: true + + /eslint-visitor-keys@2.1.0: + resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} + engines: {node: '>=10'} + dev: true + + /eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /eslint@8.28.0: + resolution: {integrity: sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint/eslintrc': 1.4.1 + '@humanwhocodes/config-array': 0.11.13 + '@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.2 + eslint-utils: 3.0.0(eslint@8.28.0) + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + 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.23.0 + grapheme-splitter: 1.0.4 + ignore: 5.3.0 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-sdsl: 4.4.2 + 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.3 + regexpp: 3.2.0 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + dev: true + + /esm-env@1.0.0: + resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} + dev: true + + /espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.11.2 + acorn-jsx: 5.3.2(acorn@8.11.2) + eslint-visitor-keys: 3.4.3 + 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@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 + + /fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: true + + /fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + 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.2.0 + 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.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flatted: 3.2.9 + keyv: 4.5.4 + rimraf: 3.0.2 + dev: true + + /flatted@3.2.9: + resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} + dev: true + + /fraction.js@4.3.7: + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} + dev: true + + /fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + 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 + + /glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + dev: true + + /globals@13.23.0: + resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 + dev: true + + /globalyzer@0.1.0: + resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} + dev: true + + /globrex@0.1.2: + resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + dev: true + + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true + + /grapheme-splitter@1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + dev: true + + /has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /hasown@2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + dev: true + + /ignore-walk@5.0.1: + resolution: {integrity: sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + minimatch: 5.1.6 + dev: true + + /ignore@5.3.0: + resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} + 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 + + /import-meta-resolve@2.2.2: + resolution: {integrity: sha512-f8KcQ1D80V7RnqVm+/lirO9zkOxjGxhaTC1IPrBGd3MEfNgmNG67tSUO9gTi2F3Blr2Az6g1vocaxzkVnWl9MA==} + 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.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + dependencies: + hasown: 2.0.0 + 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 + + /isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /jiti@1.21.0: + resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} + hasBin: true + dev: true + + /js-sdsl@4.4.2: + resolution: {integrity: sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==} + dev: true + + /js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + 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 + + /keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + dependencies: + json-buffer: 3.0.1 + dev: true + + /kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + 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 + + /lilconfig@3.0.0: + resolution: {integrity: sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==} + engines: {node: '>=14'} + dev: true + + /lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + 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 + + /lower-case@2.0.2: + resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} + dependencies: + tslib: 2.4.1 + dev: true + + /magic-string@0.27.0: + resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + + /magic-string@0.30.5: + resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + 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 + + /min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + dev: true + + /mini-svg-data-uri@1.4.4: + resolution: {integrity: sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==} + hasBin: true + dev: true + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + + /mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + dependencies: + minimist: 1.2.8 + dev: true + + /mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + dev: true + + /mrmime@1.0.1: + resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} + engines: {node: '>=10'} + 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.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + dev: true + + /no-case@3.0.4: + resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} + dependencies: + lower-case: 2.0.2 + tslib: 2.4.1 + dev: true + + /node-releases@2.0.13: + resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} + dev: true + + /normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + + /normalize-range@0.1.2: + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} + engines: {node: '>=0.10.0'} + dev: true + + /npm-bundled@2.0.1: + resolution: {integrity: sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + npm-normalize-package-bin: 2.0.0 + dev: true + + /npm-normalize-package-bin@2.0.0: + resolution: {integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dev: true + + /npm-packlist@5.1.3: + resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + hasBin: true + dependencies: + glob: 8.1.0 + ignore-walk: 5.0.1 + npm-bundled: 2.0.1 + npm-normalize-package-bin: 2.0.0 + 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 + + /optionator@0.9.3: + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + engines: {node: '>= 0.8.0'} + dependencies: + '@aashutoshrathi/word-wrap': 1.2.6 + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + 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 + + /pascal-case@3.1.2: + resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} + dependencies: + no-case: 3.0.4 + tslib: 2.4.1 + 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 + + /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.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + dev: true + + /postcss-import@15.1.0(postcss@8.4.31): + resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} + engines: {node: '>=14.0.0'} + peerDependencies: + postcss: ^8.0.0 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + read-cache: 1.0.0 + resolve: 1.22.8 + dev: true + + /postcss-js@4.0.1(postcss@8.4.31): + 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.31 + dev: true + + /postcss-load-config@4.0.2(postcss@8.4.31): + resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 3.0.0 + postcss: 8.4.31 + yaml: 2.3.4 + dev: true + + /postcss-nested@6.0.1(postcss@8.4.31): + resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.2.14 + dependencies: + postcss: 8.4.31 + 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.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + 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 + + /publint@0.1.9: + resolution: {integrity: sha512-O53y7vbePxuGFmEjgcrafMSlDpOJwOkj8YdexOt7yWlv7SB3rXoT3mHknyMJ3lf2UFH5Bmt6tnIkHcOTR6dEoA==} + engines: {node: '>=16'} + hasBin: true + dependencies: + npm-packlist: 5.1.3 + picocolors: 1.0.0 + sade: 1.8.1 + dev: true + + /punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + 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 + + /regexpp@3.2.0: + resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} + engines: {node: '>=8'} + dev: true + + /resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + dev: true + + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + dependencies: + is-core-module: 2.13.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@2.7.1: + resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /rollup@3.29.4: + resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + dependencies: + mri: 1.2.0 + dev: true + + /sander@0.5.1: + resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==} + dependencies: + es6-promise: 3.3.1 + graceful-fs: 4.2.11 + mkdirp: 0.5.6 + rimraf: 2.7.1 + dev: true + + /set-cookie-parser@2.6.0: + resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} + 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 + + /sirv@2.0.3: + resolution: {integrity: sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==} + engines: {node: '>= 10'} + dependencies: + '@polka/url': 1.0.0-next.23 + mrmime: 1.0.1 + totalist: 3.0.1 + dev: true + + /sorcery@0.11.0: + resolution: {integrity: sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==} + hasBin: true + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + buffer-crc32: 0.2.13 + minimist: 1.2.8 + sander: 0.5.1 + dev: true + + /source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.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-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + dependencies: + min-indent: 1.0.1 + dev: true + + /strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + dev: true + + /sucrase@3.34.0: + resolution: {integrity: sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==} + 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.6 + 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 + + /svelte-check@3.6.0(postcss@8.4.31)(svelte@3.59.2): + resolution: {integrity: sha512-8VfqhfuRJ1sKW+o8isH2kPi0RhjXH1nNsIbCFGyoUHG+ZxVxHYRKcb+S8eaL/1tyj3VGvWYx3Y5+oCUsJgnzcw==} + hasBin: true + peerDependencies: + svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 + dependencies: + '@jridgewell/trace-mapping': 0.3.20 + chokidar: 3.5.3 + fast-glob: 3.3.2 + import-fresh: 3.3.0 + picocolors: 1.0.0 + sade: 1.8.1 + svelte: 3.59.2 + svelte-preprocess: 5.1.0(postcss@8.4.31)(svelte@3.59.2)(typescript@5.0.4) + typescript: 5.0.4 + transitivePeerDependencies: + - '@babel/core' + - coffeescript + - less + - postcss + - postcss-load-config + - pug + - sass + - stylus + - sugarss + dev: true + + /svelte-hmr@0.15.3(svelte@3.59.2): + resolution: {integrity: sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==} + engines: {node: ^12.20 || ^14.13.1 || >= 16} + peerDependencies: + svelte: ^3.19.0 || ^4.0.0 + dependencies: + svelte: 3.59.2 + dev: true + + /svelte-preprocess@5.1.0(postcss@8.4.31)(svelte@3.59.2)(typescript@5.0.4): + resolution: {integrity: sha512-EkErPiDzHAc0k2MF5m6vBNmRUh338h2myhinUw/xaqsLs7/ZvsgREiLGj03VrSzbY/TB5ZXgBOsKraFee5yceA==} + engines: {node: '>= 14.10.0'} + requiresBuild: true + peerDependencies: + '@babel/core': ^7.10.2 + coffeescript: ^2.5.1 + less: ^3.11.3 || ^4.0.0 + postcss: ^7 || ^8 + postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 + pug: ^3.0.0 + sass: ^1.26.8 + stylus: ^0.55.0 + sugarss: ^2.0.0 || ^3.0.0 || ^4.0.0 + svelte: ^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 + typescript: '>=3.9.5 || ^4.0.0 || ^5.0.0' + peerDependenciesMeta: + '@babel/core': + optional: true + coffeescript: + optional: true + less: + optional: true + postcss: + optional: true + postcss-load-config: + optional: true + pug: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + typescript: + optional: true + dependencies: + '@types/pug': 2.0.9 + detect-indent: 6.1.0 + magic-string: 0.27.0 + postcss: 8.4.31 + sorcery: 0.11.0 + strip-indent: 3.0.0 + svelte: 3.59.2 + typescript: 5.0.4 + dev: true + + /svelte2tsx@0.6.25(svelte@3.59.2)(typescript@5.0.4): + resolution: {integrity: sha512-hhBKL5X9gGvKQAZ9xLoHnbE9Yb00HxEZJlxcj2drxWK+Tpqcs/bnodjSfCGbqEhvNaUXYNbVL7s4dEXT+o0f6w==} + peerDependencies: + svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 + typescript: ^4.9.4 || ^5.0.0 + dependencies: + dedent-js: 1.0.1 + pascal-case: 3.1.2 + svelte: 3.59.2 + typescript: 5.0.4 + dev: true + + /svelte@3.59.2: + resolution: {integrity: sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA==} + engines: {node: '>= 8'} + dev: true + + /tailwindcss@3.3.5: + resolution: {integrity: sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==} + 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.3.2 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.0 + 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.31 + postcss-import: 15.1.0(postcss@8.4.31) + postcss-js: 4.0.1(postcss@8.4.31) + postcss-load-config: 4.0.2(postcss@8.4.31) + postcss-nested: 6.0.1(postcss@8.4.31) + postcss-selector-parser: 6.0.13 + resolve: 1.22.8 + sucrase: 3.34.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 + + /tiny-glob@0.2.9: + resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} + dependencies: + globalyzer: 0.1.0 + globrex: 0.1.2 + 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 + + /totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + dev: true + + /ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + dev: true + + /tslib@2.4.1: + resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} + 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.4: + resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} + engines: {node: '>=12.20'} + hasBin: true + dev: true + + /undici@5.26.5: + resolution: {integrity: sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==} + engines: {node: '>=14.0'} + dependencies: + '@fastify/busboy': 2.1.0 + dev: true + + /update-browserslist-db@1.0.13(browserslist@4.22.1): + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.22.1 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.3.1 + dev: true + + /util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: true + + /vite@4.5.0: + resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.31 + rollup: 3.29.4 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /vitefu@0.2.5(vite@4.5.0): + resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + vite: 4.5.0 + dev: true + + /which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true + + /yaml@2.3.4: + resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} + 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/widgets/postcss.config.js b/packages/widgets/postcss.config.js new file mode 100644 index 000000000..7b75c83af --- /dev/null +++ b/packages/widgets/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/packages/widgets/src/app.d.ts b/packages/widgets/src/app.d.ts new file mode 100644 index 000000000..f59b884c5 --- /dev/null +++ b/packages/widgets/src/app.d.ts @@ -0,0 +1,12 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface Platform {} + } +} + +export {}; diff --git a/packages/widgets/src/app.html b/packages/widgets/src/app.html new file mode 100644 index 000000000..f22aeaad5 --- /dev/null +++ b/packages/widgets/src/app.html @@ -0,0 +1,12 @@ + + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ + diff --git a/packages/widgets/src/lib/components/DemoThemeSwitcher/DemoThemeSwitcher.svelte b/packages/widgets/src/lib/components/DemoThemeSwitcher/DemoThemeSwitcher.svelte new file mode 100644 index 000000000..244e51cc6 --- /dev/null +++ b/packages/widgets/src/lib/components/DemoThemeSwitcher/DemoThemeSwitcher.svelte @@ -0,0 +1,60 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconAudioClassification.svelte b/packages/widgets/src/lib/components/Icons/IconAudioClassification.svelte new file mode 100644 index 000000000..963570923 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconAudioClassification.svelte @@ -0,0 +1,21 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconAudioToAudio.svelte b/packages/widgets/src/lib/components/Icons/IconAudioToAudio.svelte new file mode 100644 index 000000000..ae5c4aeef --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconAudioToAudio.svelte @@ -0,0 +1,23 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconAutomaticSpeechRecognition.svelte b/packages/widgets/src/lib/components/Icons/IconAutomaticSpeechRecognition.svelte new file mode 100644 index 000000000..01b18c541 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconAutomaticSpeechRecognition.svelte @@ -0,0 +1,23 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconAzureML.svelte b/packages/widgets/src/lib/components/Icons/IconAzureML.svelte new file mode 100644 index 000000000..3fc373b4b --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconAzureML.svelte @@ -0,0 +1,40 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconCaretDown.svelte b/packages/widgets/src/lib/components/Icons/IconCaretDown.svelte new file mode 100644 index 000000000..ae3574382 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconCaretDown.svelte @@ -0,0 +1,19 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconCaretDownV2.svelte b/packages/widgets/src/lib/components/Icons/IconCaretDownV2.svelte new file mode 100644 index 000000000..f8b4baac5 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconCaretDownV2.svelte @@ -0,0 +1,11 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconCode.svelte b/packages/widgets/src/lib/components/Icons/IconCode.svelte new file mode 100644 index 000000000..a84e7b970 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconCode.svelte @@ -0,0 +1,21 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconConversational.svelte b/packages/widgets/src/lib/components/Icons/IconConversational.svelte new file mode 100644 index 000000000..38e01c10b --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconConversational.svelte @@ -0,0 +1,23 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconCross.svelte b/packages/widgets/src/lib/components/Icons/IconCross.svelte new file mode 100644 index 000000000..ae6b04ffc --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconCross.svelte @@ -0,0 +1,21 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconDepthEstimation.svelte b/packages/widgets/src/lib/components/Icons/IconDepthEstimation.svelte new file mode 100644 index 000000000..83362801b --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconDepthEstimation.svelte @@ -0,0 +1,10 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconDocumentQuestionAnswering.svelte b/packages/widgets/src/lib/components/Icons/IconDocumentQuestionAnswering.svelte new file mode 100644 index 000000000..6c1c84297 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconDocumentQuestionAnswering.svelte @@ -0,0 +1,13 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconFeatureExtraction.svelte b/packages/widgets/src/lib/components/Icons/IconFeatureExtraction.svelte new file mode 100644 index 000000000..c1806a76a --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconFeatureExtraction.svelte @@ -0,0 +1,21 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconFile.svelte b/packages/widgets/src/lib/components/Icons/IconFile.svelte new file mode 100644 index 000000000..0d50da5d5 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconFile.svelte @@ -0,0 +1,21 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconFillMask.svelte b/packages/widgets/src/lib/components/Icons/IconFillMask.svelte new file mode 100644 index 000000000..e096d5a8c --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconFillMask.svelte @@ -0,0 +1,27 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconGraphML.svelte b/packages/widgets/src/lib/components/Icons/IconGraphML.svelte new file mode 100644 index 000000000..6000b5ab3 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconGraphML.svelte @@ -0,0 +1,23 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconImageClassification.svelte b/packages/widgets/src/lib/components/Icons/IconImageClassification.svelte new file mode 100644 index 000000000..fa83eb205 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconImageClassification.svelte @@ -0,0 +1,23 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconImageSegmentation.svelte b/packages/widgets/src/lib/components/Icons/IconImageSegmentation.svelte new file mode 100644 index 000000000..d84e55c74 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconImageSegmentation.svelte @@ -0,0 +1,24 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconImageToImage.svelte b/packages/widgets/src/lib/components/Icons/IconImageToImage.svelte new file mode 100644 index 000000000..1ea332d30 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconImageToImage.svelte @@ -0,0 +1,25 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconImageToText.svelte b/packages/widgets/src/lib/components/Icons/IconImageToText.svelte new file mode 100644 index 000000000..8263c0801 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconImageToText.svelte @@ -0,0 +1,28 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconInfo.svelte b/packages/widgets/src/lib/components/Icons/IconInfo.svelte new file mode 100644 index 000000000..6b5a9b1f9 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconInfo.svelte @@ -0,0 +1,20 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconLightning.svelte b/packages/widgets/src/lib/components/Icons/IconLightning.svelte new file mode 100644 index 000000000..91d87c2cc --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconLightning.svelte @@ -0,0 +1,18 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconMagicWand.svelte b/packages/widgets/src/lib/components/Icons/IconMagicWand.svelte new file mode 100644 index 000000000..7aa63b2a2 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconMagicWand.svelte @@ -0,0 +1,22 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconMaximize.svelte b/packages/widgets/src/lib/components/Icons/IconMaximize.svelte new file mode 100644 index 000000000..872037067 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconMaximize.svelte @@ -0,0 +1,23 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconMicrophone.svelte b/packages/widgets/src/lib/components/Icons/IconMicrophone.svelte new file mode 100644 index 000000000..d46385493 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconMicrophone.svelte @@ -0,0 +1,25 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconObjectDetection.svelte b/packages/widgets/src/lib/components/Icons/IconObjectDetection.svelte new file mode 100644 index 000000000..ae1e1a7a6 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconObjectDetection.svelte @@ -0,0 +1,25 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconQuestionAnswering.svelte b/packages/widgets/src/lib/components/Icons/IconQuestionAnswering.svelte new file mode 100644 index 000000000..b57d90ac4 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconQuestionAnswering.svelte @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/packages/widgets/src/lib/components/Icons/IconReinforcementLearning.svelte b/packages/widgets/src/lib/components/Icons/IconReinforcementLearning.svelte new file mode 100644 index 000000000..802dc2437 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconReinforcementLearning.svelte @@ -0,0 +1,23 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconRobotics.svelte b/packages/widgets/src/lib/components/Icons/IconRobotics.svelte new file mode 100644 index 000000000..6f354638e --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconRobotics.svelte @@ -0,0 +1,22 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconRow.svelte b/packages/widgets/src/lib/components/Icons/IconRow.svelte new file mode 100644 index 000000000..7710d2b52 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconRow.svelte @@ -0,0 +1,16 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconSentenceSimilarity.svelte b/packages/widgets/src/lib/components/Icons/IconSentenceSimilarity.svelte new file mode 100644 index 000000000..def158c73 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconSentenceSimilarity.svelte @@ -0,0 +1,25 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconSpin.svelte b/packages/widgets/src/lib/components/Icons/IconSpin.svelte new file mode 100644 index 000000000..2afa35d83 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconSpin.svelte @@ -0,0 +1,30 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconSummarization.svelte b/packages/widgets/src/lib/components/Icons/IconSummarization.svelte new file mode 100644 index 000000000..8c0ee2fc5 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconSummarization.svelte @@ -0,0 +1,22 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconTableQuestionAnswering.svelte b/packages/widgets/src/lib/components/Icons/IconTableQuestionAnswering.svelte new file mode 100644 index 000000000..c11027345 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconTableQuestionAnswering.svelte @@ -0,0 +1,21 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconTabularClassification.svelte b/packages/widgets/src/lib/components/Icons/IconTabularClassification.svelte new file mode 100644 index 000000000..d4ce233b1 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconTabularClassification.svelte @@ -0,0 +1,22 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconTabularRegression.svelte b/packages/widgets/src/lib/components/Icons/IconTabularRegression.svelte new file mode 100644 index 000000000..ed4355c5d --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconTabularRegression.svelte @@ -0,0 +1,20 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconText2textGeneration.svelte b/packages/widgets/src/lib/components/Icons/IconText2textGeneration.svelte new file mode 100644 index 000000000..ed5a2c6c7 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconText2textGeneration.svelte @@ -0,0 +1,27 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconTextClassification.svelte b/packages/widgets/src/lib/components/Icons/IconTextClassification.svelte new file mode 100644 index 000000000..e747e6d2d --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconTextClassification.svelte @@ -0,0 +1,33 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconTextGeneration.svelte b/packages/widgets/src/lib/components/Icons/IconTextGeneration.svelte new file mode 100644 index 000000000..fa0153e0d --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconTextGeneration.svelte @@ -0,0 +1,25 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconTextToImage.svelte b/packages/widgets/src/lib/components/Icons/IconTextToImage.svelte new file mode 100644 index 000000000..a7adab86f --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconTextToImage.svelte @@ -0,0 +1,25 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconTextToSpeech.svelte b/packages/widgets/src/lib/components/Icons/IconTextToSpeech.svelte new file mode 100644 index 000000000..7c533cfcb --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconTextToSpeech.svelte @@ -0,0 +1,23 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconTextToVideo.svelte b/packages/widgets/src/lib/components/Icons/IconTextToVideo.svelte new file mode 100644 index 000000000..3082ea2e6 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconTextToVideo.svelte @@ -0,0 +1,23 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconTokenClassification.svelte b/packages/widgets/src/lib/components/Icons/IconTokenClassification.svelte new file mode 100644 index 000000000..27f3d3625 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconTokenClassification.svelte @@ -0,0 +1,33 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconTranslation.svelte b/packages/widgets/src/lib/components/Icons/IconTranslation.svelte new file mode 100644 index 000000000..c0d344420 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconTranslation.svelte @@ -0,0 +1,24 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconUnconditionalImageGeneration.svelte b/packages/widgets/src/lib/components/Icons/IconUnconditionalImageGeneration.svelte new file mode 100644 index 000000000..880d6ae9c --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconUnconditionalImageGeneration.svelte @@ -0,0 +1,22 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconVideoClassification.svelte b/packages/widgets/src/lib/components/Icons/IconVideoClassification.svelte new file mode 100644 index 000000000..669a372ca --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconVideoClassification.svelte @@ -0,0 +1,24 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconVoiceActivityDetection.svelte b/packages/widgets/src/lib/components/Icons/IconVoiceActivityDetection.svelte new file mode 100644 index 000000000..c896fee50 --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconVoiceActivityDetection.svelte @@ -0,0 +1,23 @@ + + + diff --git a/packages/widgets/src/lib/components/Icons/IconZeroShotClassification.svelte b/packages/widgets/src/lib/components/Icons/IconZeroShotClassification.svelte new file mode 100644 index 000000000..ebbe940ef --- /dev/null +++ b/packages/widgets/src/lib/components/Icons/IconZeroShotClassification.svelte @@ -0,0 +1,51 @@ + + + diff --git a/packages/widgets/src/lib/components/InferenceWidget/InferenceWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/InferenceWidget.svelte new file mode 100644 index 000000000..faf06bf8e --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/InferenceWidget.svelte @@ -0,0 +1,100 @@ + + +{#if widgetComponent} + +{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetAddSentenceBtn/WidgetAddSentenceBtn.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetAddSentenceBtn/WidgetAddSentenceBtn.svelte new file mode 100644 index 000000000..7eca76ae4 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetAddSentenceBtn/WidgetAddSentenceBtn.svelte @@ -0,0 +1,12 @@ + + +{#if !isDisabled} + + +{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetAudioTrack/WidgetAudioTrack.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetAudioTrack/WidgetAudioTrack.svelte new file mode 100644 index 000000000..b17f29a56 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetAudioTrack/WidgetAudioTrack.svelte @@ -0,0 +1,17 @@ + + +
+ {#if $$slots.default} + + {:else if label.length} +
{label}
+ {/if} + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetBloomDecoding/WidgetBloomDecoding.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetBloomDecoding/WidgetBloomDecoding.svelte new file mode 100644 index 000000000..19d630645 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetBloomDecoding/WidgetBloomDecoding.svelte @@ -0,0 +1,55 @@ + + + (isPromptTipOpen = false)} /> + +
+
+
+ sampling + +
+
+
+
+
+ greedy +
+
+ + (isPromptTipOpen = true)} + >ⓘ BLOOM prompting tips + {#if isPromptTipOpen} +
+ A good prompt: Do NOT talk to Bloom as an entity, it's not a chatbot but a webpage/blog/article completion + model. For the best behaviours: MIMIC a few words of a webpage similar to the content you want to generate. + Start a sentence as if YOU were writing a blog, webpage, math post, coding article and Bloom will generate a + coherent follow-up. +
+ {/if} +
+
+

+ {description} +

+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetCheckbox/WidgetCheckbox.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetCheckbox/WidgetCheckbox.svelte new file mode 100644 index 000000000..e4e975e81 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetCheckbox/WidgetCheckbox.svelte @@ -0,0 +1,17 @@ + + + + + + + diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetDropzone/WidgetDropzone.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetDropzone/WidgetDropzone.svelte new file mode 100644 index 000000000..3cfb0f007 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetDropzone/WidgetDropzone.svelte @@ -0,0 +1,89 @@ + + + + +
{ + fileInput.click(); + }} + on:dragenter={() => { + isDragging = true; + }} + on:dragleave={() => { + isDragging = false; + }} + on:dragover|preventDefault + on:drop|preventDefault={onDrop} +> + {#if !imgSrc && !isDisabled} + {label} + {:else} +
+ +
+ {/if} + {#if isLoading} +
+ +
+ {/if} +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetExample.ts b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetExample.ts new file mode 100644 index 000000000..6428e7b0a --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetExample.ts @@ -0,0 +1,114 @@ +type TableData = Record; + +//#region outputs +export type WidgetExampleOutputLabels = Array<{ label: string; score: number }>; +export interface WidgetExampleOutputAnswerScore { + answer: string; + score: number; +} +export interface WidgetExampleOutputText { + text: string; +} +export interface WidgetExampleOutputUrl { + url: string; +} + +export type WidgetExampleOutput = + | WidgetExampleOutputLabels + | WidgetExampleOutputAnswerScore + | WidgetExampleOutputText + | WidgetExampleOutputUrl; +//#endregion + +export interface WidgetExampleBase { + example_title?: string; + group?: string; + /** + * Potential overrides to API parameters for this specific example + * (takes precedences over the model card metadata's inference.parameters) + */ + parameters?: { + /// token-classification + aggregation_strategy?: string; + /// text-generation + top_k?: number; + top_p?: number; + temperature?: number; + max_new_tokens?: number; + do_sample?: boolean; + /// text-to-image + negative_prompt?: string; + guidance_scale?: number; + num_inference_steps?: number; + }; + /** + * Optional output + */ + output?: TOutput; +} + +export interface WidgetExampleTextInput extends WidgetExampleBase { + text: string; +} + +export interface WidgetExampleTextAndContextInput + extends WidgetExampleTextInput { + context: string; +} + +export interface WidgetExampleTextAndTableInput extends WidgetExampleTextInput { + table: TableData; +} + +export interface WidgetExampleAssetInput extends WidgetExampleBase { + src: string; +} +export interface WidgetExampleAssetAndPromptInput + extends WidgetExampleAssetInput { + prompt: string; +} + +export type WidgetExampleAssetAndTextInput = WidgetExampleAssetInput & + WidgetExampleTextInput; + +export type WidgetExampleAssetAndZeroShotInput = WidgetExampleAssetInput & + WidgetExampleZeroShotTextInput; + +export interface WidgetExampleStructuredDataInput extends WidgetExampleBase { + structured_data: TableData; +} + +export interface WidgetExampleTableDataInput extends WidgetExampleBase { + table: TableData; +} + +export interface WidgetExampleZeroShotTextInput extends WidgetExampleTextInput { + text: string; + candidate_labels: string; + multi_class: boolean; +} + +export interface WidgetExampleSentenceSimilarityInput + extends WidgetExampleBase { + source_sentence: string; + sentences: string[]; +} + +//#endregion + +export type WidgetExample = + | WidgetExampleTextInput + | WidgetExampleTextAndContextInput + | WidgetExampleTextAndTableInput + | WidgetExampleAssetInput + | WidgetExampleAssetAndPromptInput + | WidgetExampleAssetAndTextInput + | WidgetExampleAssetAndZeroShotInput + | WidgetExampleStructuredDataInput + | WidgetExampleTableDataInput + | WidgetExampleZeroShotTextInput + | WidgetExampleSentenceSimilarityInput; + +type KeysOfUnion = T extends unknown ? keyof T : never; + +export type WidgetExampleAttribute = KeysOfUnion; diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetFileInput/WidgetFileInput.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetFileInput/WidgetFileInput.svelte new file mode 100644 index 000000000..9e4c6a54f --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetFileInput/WidgetFileInput.svelte @@ -0,0 +1,56 @@ + + +{#if !isDisabled} +
{ + isDragging = true; + }} + on:dragover|preventDefault + on:dragleave={() => { + isDragging = false; + }} + on:drop|preventDefault={(e) => { + isDragging = false; + fileInput.files = e.dataTransfer?.files ?? null; + onChange(); + }} + > + +
+{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetFooter/WidgetFooter.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetFooter/WidgetFooter.svelte new file mode 100644 index 000000000..1ff674949 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetFooter/WidgetFooter.svelte @@ -0,0 +1,33 @@ + + +
+ {#if !isDisabled} + + {/if} + +
+{#if outputJson && isOutputJsonVisible} +
{outputJson}
+{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetHeader/WidgetHeader.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetHeader/WidgetHeader.svelte new file mode 100644 index 000000000..a899908a4 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetHeader/WidgetHeader.svelte @@ -0,0 +1,49 @@ + + +
+ {#if !noTitle} + {#if title} +
+ {title} +
+ {:else} +
+ {#if !isDisabled} + + Inference API + {:else} + Inference Examples + {/if} +
+ + + + {/if} + {/if} +
+
+ {#if pipeline && task} + + + + {/if} + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetInfo/WidgetInfo.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetInfo/WidgetInfo.svelte new file mode 100644 index 000000000..f374dabef --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetInfo/WidgetInfo.svelte @@ -0,0 +1,116 @@ + + +
+
+ {#if model.id === "bigscience/bloom"} +
+
+ Powered by  + AzureML +
+
+
+ {@html getStatusReport(modelLoadInfo, azureState, true)} +
+
+ {:else if computeTime} + Computation time on {getComputeTypeMsg()}: {computeTime} + {:else if (model.inference === InferenceDisplayability.Yes || model.pipeline_tag === "reinforcement-learning") && !modelTooBig} + {@html getStatusReport(modelLoadInfo, state)} + {:else if model.inference === InferenceDisplayability.ExplicitOptOut} + Inference API has been turned off for this model. + {:else if model.inference === InferenceDisplayability.CustomCode} + Inference API does not yet support model repos that contain custom code. + {:else if model.inference === InferenceDisplayability.LibraryNotDetected} + + Unable to determine this model's library. Check the + + docs + . + + {:else if model.inference === InferenceDisplayability.PipelineNotDetected} + + Unable to determine this model’s pipeline type. Check the + + docs + . + + {:else if model.inference === InferenceDisplayability.PipelineLibraryPairNotSupported} + + Inference API does not yet support {model.library_name} models for this pipeline type. + + {:else if modelTooBig} + + Model is too large to load onto the free Inference API. To try the model, launch it on Inference Endpoints + instead. + + {:else} + + + Inference API is disabled for an unknown reason. Please open a + Discussion in the Community tab. + + {/if} +
+ {#if error} +
{error}
+ {/if} +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetInputSamples/WidgetInputSamples.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetInputSamples/WidgetInputSamples.svelte new file mode 100644 index 000000000..be37c4b60 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetInputSamples/WidgetInputSamples.svelte @@ -0,0 +1,98 @@ + + + + +
+ +
+
{title}
+ +
+ + {#if isOptionsVisible} +
+
+ {#each inputSamples as { example_title }, i} + +
_previewInputSample(i)} + on:click={() => _applyInputSample(i)} + > + {example_title} +
+ {/each} +
+
+ {/if} +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetInputSamplesGroup/WidgetInputSamplesGroup.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetInputSamplesGroup/WidgetInputSamplesGroup.svelte new file mode 100644 index 000000000..97283b988 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetInputSamplesGroup/WidgetInputSamplesGroup.svelte @@ -0,0 +1,81 @@ + + + + +
+ +
+
{title}
+ +
+ + {#if isOptionsVisible} +
+
+ {#each inputGroups as inputGroup, i} + +
chooseInputGroup(i)} + > + {inputGroup} +
+ {/each} +
+
+ {/if} +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetLabel/WidgetLabel.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetLabel/WidgetLabel.svelte new file mode 100644 index 000000000..03f1e5c9e --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetLabel/WidgetLabel.svelte @@ -0,0 +1,13 @@ + + + diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetModelLoading/WidgetModelLoading.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetModelLoading/WidgetModelLoading.svelte new file mode 100644 index 000000000..5c7e5f761 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetModelLoading/WidgetModelLoading.svelte @@ -0,0 +1,38 @@ + + +
+
+
+ + Model is loading +
+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOuputConvoBubble/WidgetOutputConvoBubble.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOuputConvoBubble/WidgetOutputConvoBubble.svelte new file mode 100644 index 000000000..31ab4efa5 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOuputConvoBubble/WidgetOutputConvoBubble.svelte @@ -0,0 +1,12 @@ + + +
+ {text} +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputChart/WidgetOutputChart.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputChart/WidgetOutputChart.svelte new file mode 100644 index 000000000..a1fe65892 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputChart/WidgetOutputChart.svelte @@ -0,0 +1,65 @@ + + + +{#if output.length} +
+ + {#each output as { score, color }, index} + +
mouseover(index)} + on:mouseout={mouseout} + > +
+
+ {text(output[index])} +
+ {score.toFixed(3)} +
+ {/each} +
+{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputConvo/WidgetOutputConvo.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputConvo/WidgetOutputConvo.svelte new file mode 100644 index 000000000..5a14cf9db --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputConvo/WidgetOutputConvo.svelte @@ -0,0 +1,33 @@ + + +
+
+ Input a message to start chatting with + {modelId}. +
+
+ {#each output as exchange} + + + {/each} +
+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputTableQA/WidgetOutputTableQA.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputTableQA/WidgetOutputTableQA.svelte new file mode 100644 index 000000000..410fc55c3 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputTableQA/WidgetOutputTableQA.svelte @@ -0,0 +1,52 @@ + + +
+ {#if isAnswerOnlyOutput} + {output.answer} + {:else} + + {#if output.cells.length} + {output.cells.length} + match{output.cells.length > 1 ? "es" : ""} + : + {:else} + No matches + {/if} + + {#if output.cells.length} + {#each output.cells as answer} + {answer} + {/each} + {#if output.aggregator !== "NONE"} + {output.aggregator} + {/if} + {/if} + {/if} +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputText/WidgetOutputText.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputText/WidgetOutputText.svelte new file mode 100644 index 000000000..e1d051506 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputText/WidgetOutputText.svelte @@ -0,0 +1,10 @@ + + +{#if output.length} +

+ {output} +

+{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputTokens/WidgetOutputTokens.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputTokens/WidgetOutputTokens.svelte new file mode 100644 index 000000000..58343a2cc --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetOutputTokens/WidgetOutputTokens.svelte @@ -0,0 +1,94 @@ + + +{#if text && output.length} + +
+ {@html render(text, output)} +
+{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetQuickInput/WidgetQuickInput.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetQuickInput/WidgetQuickInput.svelte new file mode 100644 index 000000000..3a60295b8 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetQuickInput/WidgetQuickInput.svelte @@ -0,0 +1,29 @@ + + +
+ + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRadio/WidgetRadio.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRadio/WidgetRadio.svelte new file mode 100644 index 000000000..7cfb06a49 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRadio/WidgetRadio.svelte @@ -0,0 +1,21 @@ + + + + + + + diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRealtimeRecorder/Recorder.ts b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRealtimeRecorder/Recorder.ts new file mode 100644 index 000000000..be0e295d5 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRealtimeRecorder/Recorder.ts @@ -0,0 +1,103 @@ +export default class Recorder { + // see developers.google.com/web/updates/2016/01/mediarecorder + type: "audio" | "video" = "audio"; + private apiToken: string | undefined; + private audioContext: AudioContext | undefined; + private isLoggedIn = false; + private isModelLoaded = false; + private isEmptyBuffer = false; + private modelId: string; + private onError: (err: string) => void; + private updateModelLoading: (isLoading: boolean, estimatedTime?: number) => void; + private renderText: (txt: string) => void; + private renderWarning: (warning: string) => void; + private socket: WebSocket | undefined; + private stream: MediaStream | undefined; + + constructor( + modelId: string, + apiToken: string | undefined, + renderText: (txt: string) => void, + renderWarning: (warning: string) => void, + onError: (err: string) => void, + updateModelLoading: (isLoading: boolean, estimatedTime?: number) => void + ) { + this.modelId = modelId; + this.apiToken = apiToken || ""; + this.renderText = renderText; + this.renderWarning = renderWarning; + this.onError = onError; + this.updateModelLoading = updateModelLoading; + } + + async start(): Promise { + const constraints: MediaStreamConstraints = this.type === "video" ? { audio: true, video: true } : { audio: true }; + this.stream = await navigator.mediaDevices.getUserMedia(constraints); + + this.socket = new WebSocket(`wss://api-inference.huggingface.co/asr/live/cpu/${this.modelId}`); + + this.socket.onerror = () => { + this.onError("Webscoket connection error"); + }; + + this.socket.onopen = () => { + this.socket?.send(`Bearer ${this.apiToken}`); + }; + + this.updateModelLoading(true); + + this.socket.onmessage = (e: MessageEvent) => { + const data = JSON.parse(e.data); + if (data.type === "status" && data.message === "Successful login") { + this.isLoggedIn = true; + } else if (data.type === "status" && !!data.estimated_time && !this.isModelLoaded) { + this.updateModelLoading(true, data.estimated_time); + } else { + // data.type === "results" + this.isModelLoaded = true; + if (data.text) { + this.renderText(data.text); + } else if (!this.isEmptyBuffer) { + this.renderWarning("result was empty"); + } + } + }; + + this.audioContext = new AudioContext(); + await this.audioContext.audioWorklet.addModule("/audioProcessor.js"); + const microphone = this.audioContext.createMediaStreamSource(this.stream); + const dataExtractor = new AudioWorkletNode(this.audioContext, "AudioDataExtractor"); + microphone.connect(dataExtractor).connect(this.audioContext.destination); + + dataExtractor.port.onmessage = (event) => { + const { buffer, sampling_rate: samplingRate } = event.data; + this.isEmptyBuffer = buffer.reduce((sum: number, x: number) => sum + x) === 0; + if (this.isModelLoaded && this.isEmptyBuffer) { + this.renderWarning("🎤 input is empty: try speaking louder 🗣️ & make sure correct mic source is selected"); + } + const base64: string = btoa(String.fromCharCode(...new Uint8Array(buffer.buffer))); + const message = { + raw: base64, + sampling_rate: samplingRate, + }; + if (this.isLoggedIn) { + try { + this.socket?.send(JSON.stringify(message)); + } catch (e) { + this.onError(`Error sending data to websocket: ${e}`); + } + } + }; + } + + stop(): void { + this.isLoggedIn = false; + void this.audioContext?.close(); + this.socket?.close(); + if (this.stream) { + for (const t of this.stream.getTracks()) { + t.stop(); + } + } + } +} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRealtimeRecorder/WidgetRealtimeRecorder.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRealtimeRecorder/WidgetRealtimeRecorder.svelte new file mode 100644 index 000000000..6056084c2 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRealtimeRecorder/WidgetRealtimeRecorder.svelte @@ -0,0 +1,98 @@ + + + + +{#if isRecording} +
+ {#if warning} +

{warning}

+ {:else} +

{txt}

+ {/if} +
+{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRecorder/Recorder.ts b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRecorder/Recorder.ts new file mode 100644 index 000000000..39bed256c --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRecorder/Recorder.ts @@ -0,0 +1,69 @@ +import { delay } from "$lib/utils/ViewUtils.js"; + +export default class Recorder { + // see developers.google.com/web/updates/2016/01/mediarecorder + type: "audio" | "video" = "audio"; + private stream?: MediaStream; + private mediaRecorder?: MediaRecorder; + private recordedBlobs: Blob[] = []; + public outputBlob?: Blob; + + get desiredMimeType(): string { + return this.type === "video" ? "video/webm" : "audio/webm"; + } + get mimeType(): string { + if (!this.mediaRecorder) { + throw new Error("MediaRecorder not initialized"); + } + return this.mediaRecorder.mimeType; + } + async start(): Promise { + this.recordedBlobs = []; + + const constraints: MediaStreamConstraints = this.type === "video" ? { audio: true, video: true } : { audio: true }; + this.stream = await navigator.mediaDevices.getUserMedia(constraints); + this.startRecording(); + } + private startRecording() { + if (!this.stream) { + throw new Error("Stream not initialized"); + } + this.outputBlob = undefined; + this.mediaRecorder = new MediaRecorder(this.stream, { + mimeType: this.desiredMimeType, + }); + this.mediaRecorder.onstop = this.handleStop.bind(this); + this.mediaRecorder.ondataavailable = this.handleDataAvailable.bind(this); + this.mediaRecorder.start(10); // timeslice in ms + } + handleStop(): void {} + handleDataAvailable(evt: BlobEvent): void { + if (evt.data && evt.data.size > 0) { + this.recordedBlobs.push(evt.data); + } + } + async stopRecording(): Promise { + if (this.mediaRecorder) { + this.mediaRecorder.stop(); + } + if (this.stream) { + for (const t of this.stream.getTracks()) { + t.stop(); // Stop stream. + } + } + + // handle stopRecording gets called before this.mediaRecorder is initialized + if (!this.mediaRecorder) { + return new Blob(this.recordedBlobs); + } + + await delay(30); + // Wait for the last blob in handleDataAvailable. + // Alternative: hook into `onstop` event. + const superBuffer = new Blob(this.recordedBlobs, { + type: this.mimeType, + }); + this.outputBlob = superBuffer; + return superBuffer; + } +} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRecorder/WidgetRecorder.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRecorder/WidgetRecorder.svelte new file mode 100644 index 000000000..05de83da5 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetRecorder/WidgetRecorder.svelte @@ -0,0 +1,67 @@ + + + diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetShortcutRunLabel/WidgetShortcutRunLabel.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetShortcutRunLabel/WidgetShortcutRunLabel.svelte new file mode 100644 index 000000000..322663467 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetShortcutRunLabel/WidgetShortcutRunLabel.svelte @@ -0,0 +1,22 @@ + + +{#if !isDisabled} + +{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetState/WidgetState.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetState/WidgetState.svelte new file mode 100644 index 000000000..94be11f7b --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetState/WidgetState.svelte @@ -0,0 +1,17 @@ + + +
+
+
+ This model is currently loaded and running on the Inference API. +
+
+ ⚠️ This model could not be loaded by the inference API. ⚠️ +
+
+ This model can be loaded on the Inference API on-demand. +
+
+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetSubmitBtn/WidgetSubmitBtn.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetSubmitBtn/WidgetSubmitBtn.svelte new file mode 100644 index 000000000..6fc03b2b1 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetSubmitBtn/WidgetSubmitBtn.svelte @@ -0,0 +1,37 @@ + + + + +{#if !isDisabled} + +{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTableInput/WidgetTableInput.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTableInput/WidgetTableInput.svelte new file mode 100644 index 000000000..765ef6d23 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTableInput/WidgetTableInput.svelte @@ -0,0 +1,112 @@ + + +
+ {#if table.length > 1} + + + + {#each table[0] as header, x} + + {/each} + + + + {#each table.slice(1) as row, y} + + {#each row as cell, x} + + {/each} + + {/each} + +
editCell(e, [x, 0])} + > + {header} +
editCell(e, [x, y + 1])}>{cell}
+ {/if} +
+ +
+ {#if canAddRow} + + {/if} + {#if canAddCol} + + {/if} + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTextInput/WidgetTextInput.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTextInput/WidgetTextInput.svelte new file mode 100644 index 000000000..50665b478 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTextInput/WidgetTextInput.svelte @@ -0,0 +1,20 @@ + + + + + + + diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTextarea/WidgetTextarea.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTextarea/WidgetTextarea.svelte new file mode 100644 index 000000000..2f56f7314 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTextarea/WidgetTextarea.svelte @@ -0,0 +1,106 @@ + + + + + + + + + + diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTimer/WidgetTimer.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTimer/WidgetTimer.svelte new file mode 100644 index 000000000..2d41e1ac5 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetTimer/WidgetTimer.svelte @@ -0,0 +1,35 @@ + + +{#if shouldDisplay && !isDisabled} + {counterHuman} +{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetWrapper/WidgetWrapper.svelte b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetWrapper/WidgetWrapper.svelte new file mode 100644 index 000000000..4d171a03b --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/WidgetWrapper/WidgetWrapper.svelte @@ -0,0 +1,159 @@ + + +{#if isDisabled && !inputSamples.length} + + +{:else} +
+ {#if isMaximized} + + {/if} + + {#if !!inputGroups.length} +
+ + {#if inputGroups.length > 1} + group)} + /> + {/if} + +
+ {/if} +
+ + + {#if modelLoading.isLoading} + + {/if} + + +
+{/if} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/consts.ts b/packages/widgets/src/lib/components/InferenceWidget/shared/consts.ts new file mode 100644 index 000000000..1ec7359bf --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/consts.ts @@ -0,0 +1,37 @@ +/** + * Color palette for obj-det & img-seg widgets + */ +export const COLORS = [ + { + color: "red", + hex: "#f87171", + }, + { + color: "green", + hex: "#4ade80", + }, + { + color: "yellow", + hex: "#facc15", + }, + { + color: "blue", + hex: "#60a5fa", + }, + { + color: "orange", + hex: "#fb923c", + }, + { + color: "purple", + hex: "#c084fc", + }, + { + color: "cyan", + hex: "#22d3ee", + }, + { + color: "lime", + hex: "#a3e635", + }, +] as const; diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/helpers.ts b/packages/widgets/src/lib/components/InferenceWidget/shared/helpers.ts new file mode 100644 index 000000000..d34113757 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/helpers.ts @@ -0,0 +1,251 @@ +import type { ModelData } from "$lib/interfaces/Types.js"; +import { randomItem, parseJSON } from "../../../utils/ViewUtils.js"; +import type { WidgetExample, WidgetExampleAttribute } from "./WidgetExample.js"; +import type { ModelLoadInfo, TableData } from "./types.js"; +import { LoadState } from "./types.js"; + +const KEYS_TEXT: WidgetExampleAttribute[] = ["text", "context", "candidate_labels"]; +const KEYS_TABLE: WidgetExampleAttribute[] = ["table", "structured_data"]; +type QueryParamVal = string | null | boolean | (string | number)[][]; + +export function getQueryParamVal(key: WidgetExampleAttribute): QueryParamVal { + const searchParams = new URL(window.location.href).searchParams; + const value = searchParams.get(key); + if (KEYS_TEXT.includes(key)) { + return value; + } else if (KEYS_TABLE.includes(key)) { + const table = convertDataToTable((parseJSON(value) as TableData) ?? {}); + return table; + } else if (key === "multi_class") { + return value === "true"; + } + return value; +} + +export function getWidgetExample( + model: ModelData, + validateExample: (sample: WidgetExample) => sample is TWidgetExample +): TWidgetExample | undefined { + const validExamples = model.widgetData?.filter( + (sample): sample is TWidgetExample => sample && validateExample(sample) + ); + return validExamples?.length ? randomItem(validExamples) : undefined; +} + +// Update current url search params, keeping existing keys intact. +export function updateUrl(obj: Partial>): void { + if (!window) { + return; + } + + const sp = new URL(window.location.href).searchParams; + for (const [k, v] of Object.entries(obj)) { + if (v === undefined) { + sp.delete(k); + } else { + sp.set(k, v); + } + } + const path = `${window.location.pathname}?${sp.toString()}`; + window.history.replaceState(null, "", path); +} + +// Run through our own proxy to bypass CORS: +function proxify(url: string): string { + return url.startsWith(`http://localhost`) || new URL(url).host === window.location.host + ? url + : `https://widgets.hf.co/proxy?url=${url}`; +} + +// Get BLOB from a given URL after proxifying the URL +export async function getBlobFromUrl(url: string): Promise { + const proxiedUrl = proxify(url); + const res = await fetch(proxiedUrl); + const blob = await res.blob(); + return blob; +} + +interface Success { + computeTime: string; + output: T; + outputJson: string; + response: Response; + status: "success"; +} + +interface LoadingModel { + error: string; + estimatedTime: number; + status: "loading-model"; +} + +interface Error { + error: string; + status: "error"; +} + +interface CacheNotFound { + status: "cache not found"; +} + +type Result = Success | LoadingModel | Error | CacheNotFound; + +export async function callInferenceApi( + url: string, + repoId: string, + requestBody: Record, + apiToken = "", + outputParsingFn: (x: unknown) => T, + waitForModel = false, // If true, the server will only respond once the model has been loaded on the inference API, + includeCredentials = false, + isOnLoadCall = false, // If true, the server will try to answer from cache and not do anything if not + useCache = true +): Promise> { + const contentType = + "file" in requestBody && + requestBody["file"] && + typeof requestBody["file"] === "object" && + "type" in requestBody["file"] && + typeof requestBody["file"]["type"] === "string" + ? requestBody["file"]["type"] + : "application/json"; + + const headers = new Headers(); + headers.set("Content-Type", contentType); + if (apiToken) { + headers.set("Authorization", `Bearer ${apiToken}`); + } + if (waitForModel) { + headers.set("X-Wait-For-Model", "true"); + } + if (useCache === false) { + headers.set("X-Use-Cache", "false"); + } + if (isOnLoadCall) { + headers.set("X-Load-Model", "0"); + } + + const reqBody: File | string = + "file" in requestBody && requestBody["file"] instanceof File ? requestBody.file : JSON.stringify(requestBody); + + const response = await fetch(`${url}/models/${repoId}`, { + method: "POST", + body: reqBody, + headers, + credentials: includeCredentials ? "include" : "same-origin", + }); + + if (response.ok) { + // Success + const computeTime = response.headers.has("x-compute-time") + ? `${response.headers.get("x-compute-time")} s` + : `cached`; + const isMediaContent = (response.headers.get("content-type")?.search(/^(?:audio|image)/i) ?? -1) !== -1; + + const body = !isMediaContent ? await response.json() : await response.blob(); + + try { + const output = outputParsingFn(body); + const outputJson = !isMediaContent ? JSON.stringify(body, null, 2) : ""; + return { computeTime, output, outputJson, response, status: "success" }; + } catch (e) { + if (isOnLoadCall && body.error === "not loaded yet") { + return { status: "cache not found" }; + } + // Invalid output + const error = `API Implementation Error: ${String(e).replace(/^Error: /, "")}`; + return { error, status: "error" }; + } + } else { + // Error + const bodyText = await response.text(); + const body = parseJSON>(bodyText) ?? {}; + + if ( + body["error"] && + response.status === 503 && + body["estimated_time"] !== null && + body["estimated_time"] !== undefined + ) { + // Model needs loading + return { error: String(body["error"]), estimatedTime: +body["estimated_time"], status: "loading-model" }; + } else { + // Other errors + const { status, statusText } = response; + return { + error: String(body["error"]) || String(body["traceback"]) || `${status} ${statusText}`, + status: "error", + }; + } + } +} + +export async function getModelLoadInfo( + url: string, + repoId: string, + includeCredentials = false +): Promise { + const response = await fetch(`${url}/status/${repoId}`, { + credentials: includeCredentials ? "include" : "same-origin", + }); + const output = await response.json(); + if (response.ok && typeof output === "object" && output.loaded !== undefined) { + // eslint-disable-next-line @typescript-eslint/naming-convention + const { state, compute_type } = output; + return { compute_type, state }; + } else { + console.warn(response.status, output.error); + return { state: LoadState.Error }; + } +} + +// Extend Inference API requestBody with user supplied Inference API parameters +export function addInferenceParameters(requestBody: Record, model: ModelData): void { + const inference = model?.cardData?.inference; + if (typeof inference === "object") { + const inferenceParameters = inference?.parameters; + if (inferenceParameters) { + if (requestBody.parameters) { + requestBody.parameters = { ...requestBody.parameters, ...inferenceParameters }; + } else { + requestBody.parameters = inferenceParameters; + } + } + } +} + +/* + * Converts table from [[Header0, Header1, Header2], [Column0Val0, Column1Val0, Column2Val0], ...] + * to {Header0: [ColumnVal0, ...], Header1: [Column1Val0, ...], Header2: [Column2Val0, ...]} + */ +export function convertTableToData(table: (string | number)[][]): TableData { + return Object.fromEntries( + table[0].map((cell, x) => { + return [ + cell, + table + .slice(1) + .flat() + .filter((_, i) => i % table[0].length === x) + .map((v) => String(v)), // some models can only handle strings (no numbers) + ]; + }) + ); +} + +/** + * Converts data from {Header0: [ColumnVal0, ...], Header1: [Column1Val0, ...], Header2: [Column2Val0, ...]} + * to [[Header0, Header1, Header2], [Column0Val0, Column1Val0, Column2Val0], ...] + */ +export function convertDataToTable(data: TableData): (string | number)[][] { + const dataArray = Object.entries(data); // [header, cell[]][] + const nbCols = dataArray.length; + const nbRows = (dataArray[0]?.[1]?.length ?? 0) + 1; + return Array(nbRows) + .fill("") + .map((_, y) => + Array(nbCols) + .fill("") + .map((__, x) => (y === 0 ? dataArray[x][0] : dataArray[x][1][y - 1])) + ); +} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/inputValidation.ts b/packages/widgets/src/lib/components/InferenceWidget/shared/inputValidation.ts new file mode 100644 index 000000000..06224afdd --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/inputValidation.ts @@ -0,0 +1,87 @@ +import type { + WidgetExample, + WidgetExampleAssetAndPromptInput, + WidgetExampleAssetAndTextInput, + WidgetExampleAssetAndZeroShotInput, + WidgetExampleAssetInput, + WidgetExampleSentenceSimilarityInput, + WidgetExampleStructuredDataInput, + WidgetExampleTableDataInput, + WidgetExampleTextAndContextInput, + WidgetExampleTextAndTableInput, + WidgetExampleTextInput, + WidgetExampleZeroShotTextInput, +} from "./WidgetExample.js"; + +export function isTextInput(sample: WidgetExample): sample is WidgetExampleTextInput { + return "text" in sample; +} + +export function isTextAndContextInput( + sample: WidgetExample +): sample is WidgetExampleTextAndContextInput { + return isTextInput(sample) && "context" in sample; +} + +export function isAssetInput(sample: WidgetExample): sample is WidgetExampleAssetInput { + return "src" in sample; +} + +export function isAssetAndPromptInput( + sample: WidgetExample +): sample is WidgetExampleAssetAndPromptInput { + return isAssetInput(sample) && "prompt" in sample && typeof sample.prompt === "string"; +} + +export function isAssetAndTextInput( + sample: WidgetExample +): sample is WidgetExampleAssetAndTextInput { + return isAssetInput(sample) && isTextInput(sample); +} + +export function isStructuredDataInput( + sample: WidgetExample +): sample is WidgetExampleStructuredDataInput { + return "structured_data" in sample; +} + +export function isTableDataInput( + sample: WidgetExample +): sample is WidgetExampleTableDataInput { + return "table" in sample; +} + +function _isZeroShotTextInput( + sample: WidgetExample +): sample is Exclude, "text"> { + return "candidate_labels" in sample && "multi_class" in sample; +} + +export function isZeroShotTextInput( + sample: WidgetExample +): sample is WidgetExampleZeroShotTextInput { + return isTextInput(sample) && _isZeroShotTextInput(sample); +} + +export function isSentenceSimilarityInput( + sample: WidgetExample +): sample is WidgetExampleSentenceSimilarityInput { + return "source_sentence" in sample && "sentences" in sample; +} + +export function isTextAndTableInput( + sample: WidgetExample +): sample is WidgetExampleTextAndTableInput { + return ( + isTextInput(sample) && + "table" in sample && + Array.isArray(sample.table) && + sample.table.every((r) => Array.isArray(r) && r.every((c) => typeof c === "string" || typeof c === "number")) + ); +} + +export function isAssetAndZeroShotInput( + sample: WidgetExample +): sample is WidgetExampleAssetAndZeroShotInput { + return isAssetInput(sample) && _isZeroShotTextInput(sample); +} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/outputValidation.ts b/packages/widgets/src/lib/components/InferenceWidget/shared/outputValidation.ts new file mode 100644 index 000000000..66b092a2c --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/outputValidation.ts @@ -0,0 +1,35 @@ +import type { + WidgetExampleOutputLabels, + WidgetExampleOutputAnswerScore, + WidgetExampleOutputText, + WidgetExampleOutputUrl, +} from "./WidgetExample.js"; + +export function isValidOutputLabels(arg: unknown): arg is WidgetExampleOutputLabels { + return Array.isArray(arg) && arg.every((x) => typeof x.label === "string" && typeof x.score === "number"); +} + +export function isValidOutputAnswerScore(arg: unknown): arg is WidgetExampleOutputAnswerScore { + return ( + !!arg && + typeof arg === "object" && + "answer" in arg && + typeof arg["answer"] === "string" && + "score" in arg && + typeof arg["score"] === "number" + ); +} + +export function isValidOutputText(arg: unknown): arg is WidgetExampleOutputText { + return !!arg && typeof arg === "object" && "text" in arg && typeof arg["text"] === "string"; +} + +export function isValidOutputUrl(arg: unknown): arg is WidgetExampleOutputUrl { + return ( + !!arg && + typeof arg === "object" && + "url" in arg && + typeof arg["url"] === "string" && + arg["url"].startsWith("https://") + ); +} diff --git a/packages/widgets/src/lib/components/InferenceWidget/shared/types.ts b/packages/widgets/src/lib/components/InferenceWidget/shared/types.ts new file mode 100644 index 000000000..70b6f4b41 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/shared/types.ts @@ -0,0 +1,68 @@ +import type { ModelData } from "../../../interfaces/Types.js"; +import type { WidgetExampleOutput } from "./WidgetExample.js"; + +export interface WidgetProps { + apiToken?: string; + apiUrl: string; + callApiOnMount: boolean; + model: ModelData; + noTitle: boolean; + shouldUpdateUrl: boolean; + includeCredentials: boolean; + isLoggedIn?: boolean; +} + +export interface InferenceRunOpts { + withModelLoading?: boolean; + isOnLoadCall?: boolean; + useCache?: boolean; + exampleOutput?: TOutput; +} + +export interface ExampleRunOpts { + isPreview?: boolean; + inferenceOpts?: InferenceRunOpts; +} + +export enum LoadState { + Loadable = "Loadable", + Loaded = "Loaded", + TooBig = "TooBig", + Error = "error", +} + +export enum ComputeType { + CPU = "cpu", + GPU = "gpu", +} + +export interface ModelLoadInfo { + state: LoadState; + compute_type?: ComputeType; +} + +export type TableData = Record; + +export type HighlightCoordinates = Record; + +interface Box { + xmin: number; + ymin: number; + xmax: number; + ymax: number; +} + +export interface DetectedObject { + box: Box; + label: string; + score: number; + color?: string; +} +export interface ImageSegment { + label: string; + score: number; + mask: string; + color?: string; + imgData?: ImageData; + bitmap?: ImageBitmap; +} diff --git a/packages/widgets/src/lib/components/InferenceWidget/stores.ts b/packages/widgets/src/lib/components/InferenceWidget/stores.ts new file mode 100644 index 000000000..a9ed4f27e --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/stores.ts @@ -0,0 +1,4 @@ +import { writable } from "svelte/store"; +import type { ModelLoadInfo } from "./shared/types.js"; + +export const modelLoadStates = writable>({}); diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/AudioClassificationWidget/AudioClassificationWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/AudioClassificationWidget/AudioClassificationWidget.svelte new file mode 100644 index 000000000..d75cea4f8 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/AudioClassificationWidget/AudioClassificationWidget.svelte @@ -0,0 +1,202 @@ + + + + +
+ + {#if fileUrl} + + {/if} + { + getOutput(); + }} + /> + {#if warning} +
{warning}
+ {/if} + +
+ + + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/AudioToAudioWidget/AudioToAudioWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/AudioToAudioWidget/AudioToAudioWidget.svelte new file mode 100644 index 000000000..5592fc579 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/AudioToAudioWidget/AudioToAudioWidget.svelte @@ -0,0 +1,191 @@ + + + + +
+ + {#if fileUrl} + + {/if} + { + getOutput(); + }} + /> + +
+ + {#each output as item} +
+ {item.label}: + +
+ {/each} +
+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/AutomaticSpeechRecognitionWidget/AutomaticSpeechRecognitionWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/AutomaticSpeechRecognitionWidget/AutomaticSpeechRecognitionWidget.svelte new file mode 100644 index 000000000..94687285a --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/AutomaticSpeechRecognitionWidget/AutomaticSpeechRecognitionWidget.svelte @@ -0,0 +1,226 @@ + + + + +
+ + {#if !isRealtimeRecording} + {#if fileUrl} + + {/if} + { + getOutput(); + }} + /> + {#if warning} +
{warning}
+ {/if} + {/if} + +
+ + + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ConversationalWidget/ConversationalWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ConversationalWidget/ConversationalWidget.svelte new file mode 100644 index 000000000..b3d90789d --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ConversationalWidget/ConversationalWidget.svelte @@ -0,0 +1,190 @@ + + + + + +
+ { + getOutput(); + }} + submitButtonLabel="Send" + /> + +
+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/FeatureExtractionWidget/DataTable.ts b/packages/widgets/src/lib/components/InferenceWidget/widgets/FeatureExtractionWidget/DataTable.ts new file mode 100644 index 000000000..551868a38 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/FeatureExtractionWidget/DataTable.ts @@ -0,0 +1,43 @@ +export class DataTable { + max: number; + min: number; + std: number; + + constructor(public body: number[] | number[][]) { + const all = this.body.flat(); + this.max = Math.max(...all); + this.min = Math.min(...all); + this.std = this.max - this.min; + } + + get isArrLevel0(): boolean { + return isArrLevel0(this.body); + } + + get oneDim(): number[] { + return this.body as number[]; + } + get twoDim(): number[][] { + return this.body as number[][]; + } + + bg(value: number): string { + if (value > this.min + this.std * 0.7) { + return "bg-green-100 dark:bg-green-800"; + } + if (value > this.min + this.std * 0.6) { + return "bg-green-50 dark:bg-green-900"; + } + if (value < this.min + this.std * 0.3) { + return "bg-red-100 dark:bg-red-800"; + } + if (value < this.min + this.std * 0.4) { + return "bg-red-50 dark:bg-red-900"; + } + return ""; + } +} + +function isArrLevel0(x: number[] | number[][]): x is number[] { + return typeof x[0] === "number"; +} diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/FeatureExtractionWidget/FeatureExtractionWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/FeatureExtractionWidget/FeatureExtractionWidget.svelte new file mode 100644 index 000000000..d9f07a526 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/FeatureExtractionWidget/FeatureExtractionWidget.svelte @@ -0,0 +1,200 @@ + + + + +
+ { + getOutput(); + }} + /> + +
+ + {#if output} + {#if output.isArrLevel0} +
+ + {#each range(numOfRows(output.oneDim.length)) as i} + + {#each range(SINGLE_DIM_COLS) as j} + {#if j * numOfRows(output.oneDim.length) + i < output.oneDim.length} + + + {/if} + {/each} + + {/each} +
+ {j * numOfRows(output.oneDim.length) + i} + + {output.oneDim[j * numOfRows(output.oneDim.length) + i].toFixed(3)} +
+
+ {:else} +
+ + + + {/each} + + {#each output.twoDim as column, i} + + + {#each column as x} + + {/each} + + {/each} +
+ {#each range(output.twoDim[0].length) as j} + {j}
{i} + {x.toFixed(3)} +
+
+ {/if} + {/if} +
+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/FillMaskWidget/FillMaskWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/FillMaskWidget/FillMaskWidget.svelte new file mode 100644 index 000000000..b8c00e06d --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/FillMaskWidget/FillMaskWidget.svelte @@ -0,0 +1,178 @@ + + + + +
+ {#if model.pipeline_tag === "fill-mask"} +
+ Mask token: {model.mask_token} +
+ {/if} + + { + getOutput(); + }} + /> + +
+ + + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageClassificationWidget/ImageClassificationWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageClassificationWidget/ImageClassificationWidget.svelte new file mode 100644 index 000000000..33961aed5 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageClassificationWidget/ImageClassificationWidget.svelte @@ -0,0 +1,176 @@ + + + + +
+ (error = e)} + > + {#if imgSrc} + + {/if} + + + {#if imgSrc} + {#if imgSrc} +
+ +
+ {/if} + {/if} + + {#if warning} +
{warning}
+ {/if} + +
+ + + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageSegmentationWidget/Canvas.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageSegmentationWidget/Canvas.svelte new file mode 100644 index 000000000..082b1062e --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageSegmentationWidget/Canvas.svelte @@ -0,0 +1,75 @@ + + + + +
+
+ +
+ {#if output.length} + + mousemove(e, width, height)} + on:mouseout={mouseout} + /> + {/if} +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageSegmentationWidget/ImageSegmentationWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageSegmentationWidget/ImageSegmentationWidget.svelte new file mode 100644 index 000000000..beff590a6 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageSegmentationWidget/ImageSegmentationWidget.svelte @@ -0,0 +1,286 @@ + + + + +
+ (error = e)} + > + {#if imgSrc} + + {/if} + + + {#if imgSrc} + + {/if} + + {#if warning} +
{warning}
+ {/if} + + +
+ + + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageToImageWidget/ImageToImageWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageToImageWidget/ImageToImageWidget.svelte new file mode 100644 index 000000000..2d1ecbf36 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageToImageWidget/ImageToImageWidget.svelte @@ -0,0 +1,202 @@ + + + + +
+ (error = e)} + > + {#if imgSrc} + + {/if} + + + {#if imgSrc} + {#if imgSrc} +
+ +
+ {/if} + {/if} + + + { + getOutput(); + }} + /> + +
+ + {#if output.length} +
+ +
+ {/if} +
+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageToTextWidget/ImageToTextWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageToTextWidget/ImageToTextWidget.svelte new file mode 100644 index 000000000..0b7acee47 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ImageToTextWidget/ImageToTextWidget.svelte @@ -0,0 +1,161 @@ + + + + +
+ (error = e)} + > + {#if imgSrc} + + {/if} + + + {#if imgSrc} + {#if imgSrc} +
+ +
+ {/if} + {/if} + + {#if warning} +
{warning}
+ {/if} + +
+ + {#if model?.pipeline_tag !== "text-generation"} + + {/if} + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ObjectDetectionWidget/ObjectDetectionWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ObjectDetectionWidget/ObjectDetectionWidget.svelte new file mode 100644 index 000000000..a14e3ba28 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ObjectDetectionWidget/ObjectDetectionWidget.svelte @@ -0,0 +1,197 @@ + + + + +
+ (error = e)} + > + {#if imgSrc} + + {/if} + + + {#if imgSrc} + + {/if} + + {#if warning} +
{warning}
+ {/if} + +
+ + + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ObjectDetectionWidget/SvgBoundingBoxes.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ObjectDetectionWidget/SvgBoundingBoxes.svelte new file mode 100644 index 000000000..90446b606 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ObjectDetectionWidget/SvgBoundingBoxes.svelte @@ -0,0 +1,93 @@ + + + +
+
+ +
+ + + {#each boxes as { rect, color, index }} + + mouseover(index)} + on:mouseout={mouseout} + /> + {/each} + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/QuestionAnsweringWidget/QuestionAnsweringWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/QuestionAnsweringWidget/QuestionAnsweringWidget.svelte new file mode 100644 index 000000000..53479ee8f --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/QuestionAnsweringWidget/QuestionAnsweringWidget.svelte @@ -0,0 +1,177 @@ + + + + +
+ { + getOutput(); + }} + /> + + +
+ + {#if output} +
+ {output.answer} + {output.score.toFixed(3)} +
+ {/if} +
+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ReinforcementLearningWidget/ReinforcementLearningWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ReinforcementLearningWidget/ReinforcementLearningWidget.svelte new file mode 100644 index 000000000..3e6714ab2 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ReinforcementLearningWidget/ReinforcementLearningWidget.svelte @@ -0,0 +1,62 @@ + + + +
+ +
+ {#if replay === Replay.Available} + +
+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/SentenceSimilarityWidget/SentenceSimilarityWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/SentenceSimilarityWidget/SentenceSimilarityWidget.svelte new file mode 100644 index 000000000..07308d7a8 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/SentenceSimilarityWidget/SentenceSimilarityWidget.svelte @@ -0,0 +1,187 @@ + + + + +
+ + + {#each Array(nComparisonSentences - 1) as _, idx} + + {/each} + { + nComparisonSentences++; + }} + /> + { + getOutput(); + }} + /> + +
+ + {#if output.length} + + {/if} + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/SummarizationWidget/SummarizationWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/SummarizationWidget/SummarizationWidget.svelte new file mode 100644 index 000000000..e2e4680d1 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/SummarizationWidget/SummarizationWidget.svelte @@ -0,0 +1,140 @@ + + + + +
+ + { + getOutput(); + }} + /> + +
+ + + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/TableQuestionAnsweringWidget/TableQuestionAnsweringWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/TableQuestionAnsweringWidget/TableQuestionAnsweringWidget.svelte new file mode 100644 index 000000000..d252b25c8 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/TableQuestionAnsweringWidget/TableQuestionAnsweringWidget.svelte @@ -0,0 +1,196 @@ + + + + +
+ { + getOutput(); + }} + /> + +
+ {#if output} + + {/if} + {#if table.length > 1 || table[0].length > 1} + + {/if} +
+
+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/TabularDataWidget/TabularDataWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/TabularDataWidget/TabularDataWidget.svelte new file mode 100644 index 000000000..3c0a12f47 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/TabularDataWidget/TabularDataWidget.svelte @@ -0,0 +1,228 @@ + + + + +
+
+ {#if table.length > 1 || table[1]?.length > 1} + + {/if} +
+ { + getOutput(); + }} + /> + +
+ +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/TextGenerationWidget/TextGenerationWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/TextGenerationWidget/TextGenerationWidget.svelte new file mode 100644 index 000000000..9a23bb5ad --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/TextGenerationWidget/TextGenerationWidget.svelte @@ -0,0 +1,268 @@ + + + + +
+ + {#if model.id === "bigscience/bloom"} + + {/if} +
+ { + getOutput({ useCache }); + }} + /> + +
+ +
+
+ {#if warning} +
{warning}
+ {/if} + {#if isBloomLoginRequired} +
+ + Please + login + or + + register to try BLOOM 🌸 +
+ {/if} + +
+ + {#if model?.pipeline_tag !== "text-generation"} + + + {/if} + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/TextToImageWidget/TextToImageWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/TextToImageWidget/TextToImageWidget.svelte new file mode 100644 index 000000000..ff2d09221 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/TextToImageWidget/TextToImageWidget.svelte @@ -0,0 +1,155 @@ + + + + +
+ getOutput()} /> + +
+ + {#if output.length} +
+ +
+ {/if} +
+
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/TextToSpeechWidget/TextToSpeechWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/TextToSpeechWidget/TextToSpeechWidget.svelte new file mode 100644 index 000000000..27c174be9 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/TextToSpeechWidget/TextToSpeechWidget.svelte @@ -0,0 +1,143 @@ + + + + +
+ + { + getOutput(); + }} + /> + +
+ + {#if output.length} + + {/if} + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/TokenClassificationWidget/TokenClassificationWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/TokenClassificationWidget/TokenClassificationWidget.svelte new file mode 100644 index 000000000..f0f9fb258 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/TokenClassificationWidget/TokenClassificationWidget.svelte @@ -0,0 +1,265 @@ + + + + +
+ + { + getOutput(); + }} + /> + {#if warning} +
{warning}
+ {/if} + +
+ + + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/VisualQuestionAnsweringWidget/VisualQuestionAnsweringWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/VisualQuestionAnsweringWidget/VisualQuestionAnsweringWidget.svelte new file mode 100644 index 000000000..b37c6ea6d --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/VisualQuestionAnsweringWidget/VisualQuestionAnsweringWidget.svelte @@ -0,0 +1,204 @@ + + + + +
+ (error = e)} + > + {#if imgSrc} + + {/if} + + + {#if imgSrc} + {#if imgSrc} +
+ +
+ {/if} + {/if} + + { + getOutput(); + }} + /> + +
+ + {#if output} + + {/if} + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ZeroShotImageClassificationWidget/ZeroShotImageClassificationWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ZeroShotImageClassificationWidget/ZeroShotImageClassificationWidget.svelte new file mode 100644 index 000000000..cb2d4ee89 --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ZeroShotImageClassificationWidget/ZeroShotImageClassificationWidget.svelte @@ -0,0 +1,228 @@ + + + + +
+ (error = e)} + > + {#if imgSrc} + + {/if} + + + {#if imgSrc} + {#if imgSrc} +
+ +
+ {/if} + {/if} + + + { + getOutput(); + }} + /> + +
+ + {#if output.length} + + {/if} + +
diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ZeroShowClassificationWidget/ZeroShotClassificationWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ZeroShowClassificationWidget/ZeroShotClassificationWidget.svelte new file mode 100644 index 000000000..d3742b8ca --- /dev/null +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ZeroShowClassificationWidget/ZeroShotClassificationWidget.svelte @@ -0,0 +1,200 @@ + + + + +
+ + + + { + getOutput(); + }} + /> + {#if warning} +
{warning}
+ {/if} + +
+ + {#if output.length} + + {/if} + +
diff --git a/packages/widgets/src/lib/components/PipelineIcon/PipelineIcon.svelte b/packages/widgets/src/lib/components/PipelineIcon/PipelineIcon.svelte new file mode 100644 index 000000000..990019763 --- /dev/null +++ b/packages/widgets/src/lib/components/PipelineIcon/PipelineIcon.svelte @@ -0,0 +1,89 @@ + + + diff --git a/packages/widgets/src/lib/components/PipelineTag/PipelineTag.svelte b/packages/widgets/src/lib/components/PipelineTag/PipelineTag.svelte new file mode 100644 index 000000000..dc2afad8a --- /dev/null +++ b/packages/widgets/src/lib/components/PipelineTag/PipelineTag.svelte @@ -0,0 +1,16 @@ + + +
+ + + {pipelineData ? pipelineData.name : pipeline} + +
diff --git a/packages/widgets/src/lib/index.ts b/packages/widgets/src/lib/index.ts new file mode 100644 index 000000000..a37f99cf4 --- /dev/null +++ b/packages/widgets/src/lib/index.ts @@ -0,0 +1,38 @@ +import InferenceWidget from "./components/InferenceWidget/InferenceWidget.svelte"; +import WidgetOutputChart from "./components/InferenceWidget/shared/WidgetOutputChart/WidgetOutputChart.svelte"; +import WidgetOutputTokens from "./components/InferenceWidget/shared/WidgetOutputTokens/WidgetOutputTokens.svelte"; +import PipelineIcon from "./components/PipelineIcon/PipelineIcon.svelte"; +import { modelLoadStates } from "./components/InferenceWidget/stores.js"; +import { InferenceDisplayability } from "./interfaces/InferenceDisplayability.js"; +import * as serveCurl from "./inferenceSnippets/serveCurl.js"; +import * as serveJs from "./inferenceSnippets/serveJs.js"; +import * as servePython from "./inferenceSnippets/servePython.js"; +import * as snippetInputs from "./inferenceSnippets/inputs.js"; +import { MODEL_LIBRARIES_UI_ELEMENTS } from "./interfaces/Libraries.js"; +import type { LibraryUiElement } from "./interfaces/Libraries.js"; +import type { TransformersInfo } from "./interfaces/Types.js"; +import { MAPPING_DEFAULT_WIDGET } from "./interfaces/DefaultWidget.js"; +import { LIBRARY_TASK_MAPPING_EXCLUDING_TRANSFORMERS } from "./interfaces/LibrariesToTasks.js"; + +export { + InferenceWidget, + WidgetOutputChart, + WidgetOutputTokens, + modelLoadStates, + InferenceDisplayability, + PipelineIcon, + serveCurl, + serveJs, + servePython, + snippetInputs, + MODEL_LIBRARIES_UI_ELEMENTS, + MAPPING_DEFAULT_WIDGET, + LIBRARY_TASK_MAPPING_EXCLUDING_TRANSFORMERS, +}; +export type { + WidgetExample, + WidgetExampleOutput, + WidgetExampleOutputUrl, + WidgetExampleTextInput, +} from "./components/InferenceWidget/shared/WidgetExample.js"; +export type { LibraryUiElement, TransformersInfo }; diff --git a/packages/widgets/src/lib/inferenceSnippets/inputs.ts b/packages/widgets/src/lib/inferenceSnippets/inputs.ts new file mode 100644 index 000000000..64e8c4c41 --- /dev/null +++ b/packages/widgets/src/lib/inferenceSnippets/inputs.ts @@ -0,0 +1,129 @@ +import type { PipelineType } from "@huggingface/tasks"; +import type { ModelData } from "../interfaces/Types.js"; + +const inputsZeroShotClassification = () => + `"Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!"`; + +const inputsTranslation = () => `"Меня зовут Вольфганг и я живу в Берлине"`; + +const inputsSummarization = () => + `"The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct."`; + +const inputsConversational = () => + `{ + "past_user_inputs": ["Which movie is the best ?"], + "generated_responses": ["It is Die Hard for sure."], + "text": "Can you explain why ?" + }`; + +const inputsTableQuestionAnswering = () => + `{ + "query": "How many stars does the transformers repository have?", + "table": { + "Repository": ["Transformers", "Datasets", "Tokenizers"], + "Stars": ["36542", "4512", "3934"], + "Contributors": ["651", "77", "34"], + "Programming language": [ + "Python", + "Python", + "Rust, Python and NodeJS" + ] + } + }`; + +const inputsQuestionAnswering = () => + `{ + "question": "What is my name?", + "context": "My name is Clara and I live in Berkeley." + }`; + +const inputsTextClassification = () => `"I like you. I love you"`; + +const inputsTokenClassification = () => `"My name is Sarah Jessica Parker but you can call me Jessica"`; + +const inputsTextGeneration = () => `"Can you please let us know more details about your "`; + +const inputsText2TextGeneration = () => `"The answer to the universe is"`; + +const inputsFillMask = (model: ModelData) => `"The answer to the universe is ${model.mask_token}."`; + +const inputsSentenceSimilarity = () => + `{ + "source_sentence": "That is a happy person", + "sentences": [ + "That is a happy dog", + "That is a very happy person", + "Today is a sunny day" + ] + }`; + +const inputsFeatureExtraction = () => `"Today is a sunny day and I will get some ice cream."`; + +const inputsImageClassification = () => `"cats.jpg"`; + +const inputsImageToText = () => `"cats.jpg"`; + +const inputsImageSegmentation = () => `"cats.jpg"`; + +const inputsObjectDetection = () => `"cats.jpg"`; + +const inputsAudioToAudio = () => `"sample1.flac"`; + +const inputsAudioClassification = () => `"sample1.flac"`; + +const inputsTextToImage = () => `"Astronaut riding a horse"`; + +const inputsTextToSpeech = () => `"The answer to the universe is 42"`; + +const inputsTextToAudio = () => `"liquid drum and bass, atmospheric synths, airy sounds"`; + +const inputsAutomaticSpeechRecognition = () => `"sample1.flac"`; + +const modelInputSnippets: { + [key in PipelineType]?: (model: ModelData) => string; +} = { + "audio-to-audio": inputsAudioToAudio, + "audio-classification": inputsAudioClassification, + "automatic-speech-recognition": inputsAutomaticSpeechRecognition, + conversational: inputsConversational, + "feature-extraction": inputsFeatureExtraction, + "fill-mask": inputsFillMask, + "image-classification": inputsImageClassification, + "image-to-text": inputsImageToText, + "image-segmentation": inputsImageSegmentation, + "object-detection": inputsObjectDetection, + "question-answering": inputsQuestionAnswering, + "sentence-similarity": inputsSentenceSimilarity, + summarization: inputsSummarization, + "table-question-answering": inputsTableQuestionAnswering, + "text-classification": inputsTextClassification, + "text-generation": inputsTextGeneration, + "text-to-image": inputsTextToImage, + "text-to-speech": inputsTextToSpeech, + "text-to-audio": inputsTextToAudio, + "text2text-generation": inputsText2TextGeneration, + "token-classification": inputsTokenClassification, + translation: inputsTranslation, + "zero-shot-classification": inputsZeroShotClassification, +}; + +// Use noWrap to put the whole snippet on a single line (removing new lines and tabulations) +// Use noQuotes to strip quotes from start & end (example: "abc" -> abc) +export function getModelInputSnippet(model: ModelData, noWrap = false, noQuotes = false): string { + if (model.pipeline_tag) { + const inputs = modelInputSnippets[model.pipeline_tag]; + if (inputs) { + let result = inputs(model); + if (noWrap) { + result = result.replace(/(?:(?:\r?\n|\r)\t*)|\t+/g, " "); + } + if (noQuotes) { + const REGEX_QUOTES = /^"(.+)"$/s; + const match = result.match(REGEX_QUOTES); + result = match ? match[1] : result; + } + return result; + } + } + return "No input example has been defined for this model task."; +} diff --git a/packages/widgets/src/lib/inferenceSnippets/serveCurl.ts b/packages/widgets/src/lib/inferenceSnippets/serveCurl.ts new file mode 100644 index 000000000..7a801e934 --- /dev/null +++ b/packages/widgets/src/lib/inferenceSnippets/serveCurl.ts @@ -0,0 +1,63 @@ +import type { PipelineType } from "@huggingface/tasks"; +import type { ModelData } from "../interfaces/Types.js"; +import { getModelInputSnippet } from "./inputs.js"; + +export const snippetBasic = (model: ModelData, accessToken: string): string => + `curl https://api-inference.huggingface.co/models/${model.id} \\ + -X POST \\ + -d '{"inputs": ${getModelInputSnippet(model, true)}}' \\ + -H 'Content-Type: application/json' \\ + -H "Authorization: Bearer ${accessToken || `{API_TOKEN}`}" +`; + +export const snippetZeroShotClassification = (model: ModelData, accessToken: string): string => + `curl https://api-inference.huggingface.co/models/${model.id} \\ + -X POST \\ + -d '{"inputs": ${getModelInputSnippet(model, true)}, "parameters": {"candidate_labels": ["refund", "legal", "faq"]}}' \\ + -H 'Content-Type: application/json' \\ + -H "Authorization: Bearer ${accessToken || `{API_TOKEN}`}" +`; + +export const snippetFile = (model: ModelData, accessToken: string): string => + `curl https://api-inference.huggingface.co/models/${model.id} \\ + -X POST \\ + --data-binary '@${getModelInputSnippet(model, true, true)}' \\ + -H "Authorization: Bearer ${accessToken || `{API_TOKEN}`}" +`; + +export const curlSnippets: Partial string>> = { + // Same order as in js/src/lib/interfaces/Types.ts + "text-classification": snippetBasic, + "token-classification": snippetBasic, + "table-question-answering": snippetBasic, + "question-answering": snippetBasic, + "zero-shot-classification": snippetZeroShotClassification, + translation: snippetBasic, + summarization: snippetBasic, + conversational: snippetBasic, + "feature-extraction": snippetBasic, + "text-generation": snippetBasic, + "text2text-generation": snippetBasic, + "fill-mask": snippetBasic, + "sentence-similarity": snippetBasic, + "automatic-speech-recognition": snippetFile, + "text-to-image": snippetBasic, + "text-to-speech": snippetBasic, + "text-to-audio": snippetBasic, + "audio-to-audio": snippetFile, + "audio-classification": snippetFile, + "image-classification": snippetFile, + "image-to-text": snippetFile, + "object-detection": snippetFile, + "image-segmentation": snippetFile, +}; + +export function getCurlInferenceSnippet(model: ModelData, accessToken: string): string { + return model.pipeline_tag && model.pipeline_tag in curlSnippets + ? curlSnippets[model.pipeline_tag]?.(model, accessToken) ?? "" + : ""; +} + +export function hasCurlInferenceSnippet(model: ModelData): boolean { + return !!model.pipeline_tag && model.pipeline_tag in curlSnippets; +} diff --git a/packages/widgets/src/lib/inferenceSnippets/serveJs.ts b/packages/widgets/src/lib/inferenceSnippets/serveJs.ts new file mode 100644 index 000000000..ef94c3064 --- /dev/null +++ b/packages/widgets/src/lib/inferenceSnippets/serveJs.ts @@ -0,0 +1,150 @@ +import type { PipelineType } from "@huggingface/tasks"; +import type { ModelData } from "../interfaces/Types.js"; +import { getModelInputSnippet } from "./inputs.js"; + +export const snippetBasic = (model: ModelData, accessToken: string): string => + `async function query(data) { + const response = await fetch( + "https://api-inference.huggingface.co/models/${model.id}", + { + headers: { Authorization: "Bearer ${accessToken || `{API_TOKEN}`}" }, + method: "POST", + body: JSON.stringify(data), + } + ); + const result = await response.json(); + return result; +} + +query({"inputs": ${getModelInputSnippet(model)}}).then((response) => { + console.log(JSON.stringify(response)); +});`; + +export const snippetZeroShotClassification = (model: ModelData, accessToken: string): string => + `async function query(data) { + const response = await fetch( + "https://api-inference.huggingface.co/models/${model.id}", + { + headers: { Authorization: "Bearer ${accessToken || `{API_TOKEN}`}" }, + method: "POST", + body: JSON.stringify(data), + } + ); + const result = await response.json(); + return result; +} + +query({"inputs": ${getModelInputSnippet( + model + )}, "parameters": {"candidate_labels": ["refund", "legal", "faq"]}}).then((response) => { + console.log(JSON.stringify(response)); +});`; + +export const snippetTextToImage = (model: ModelData, accessToken: string): string => + `async function query(data) { + const response = await fetch( + "https://api-inference.huggingface.co/models/${model.id}", + { + headers: { Authorization: "Bearer ${accessToken || `{API_TOKEN}`}" }, + method: "POST", + body: JSON.stringify(data), + } + ); + const result = await response.blob(); + return result; +} +query({"inputs": ${getModelInputSnippet(model)}}).then((response) => { + // Use image +});`; + +export const snippetTextToAudio = (model: ModelData, accessToken: string): string => { + const commonSnippet = `async function query(data) { + const response = await fetch( + "https://api-inference.huggingface.co/models/${model.id}", + { + headers: { Authorization: "Bearer ${accessToken || `{API_TOKEN}`}" }, + method: "POST", + body: JSON.stringify(data), + } + );`; + if (model.library_name === "transformers") { + return ( + commonSnippet + + ` + const result = await response.blob(); + return result; + } + query({"inputs": ${getModelInputSnippet(model)}}).then((response) => { + // Returns a byte object of the Audio wavform. Use it directly! + });` + ); + } else { + return ( + commonSnippet + + ` + const result = await response.json(); + return result; + } + + query({"inputs": ${getModelInputSnippet(model)}}).then((response) => { + console.log(JSON.stringify(response)); + });` + ); + } +}; + +export const snippetFile = (model: ModelData, accessToken: string): string => + `async function query(filename) { + const data = fs.readFileSync(filename); + const response = await fetch( + "https://api-inference.huggingface.co/models/${model.id}", + { + headers: { Authorization: "Bearer ${accessToken || `{API_TOKEN}`}" }, + method: "POST", + body: data, + } + ); + const result = await response.json(); + return result; +} + +query(${getModelInputSnippet(model)}).then((response) => { + console.log(JSON.stringify(response)); +});`; + +export const jsSnippets: Partial string>> = { + // Same order as in js/src/lib/interfaces/Types.ts + "text-classification": snippetBasic, + "token-classification": snippetBasic, + "table-question-answering": snippetBasic, + "question-answering": snippetBasic, + "zero-shot-classification": snippetZeroShotClassification, + translation: snippetBasic, + summarization: snippetBasic, + conversational: snippetBasic, + "feature-extraction": snippetBasic, + "text-generation": snippetBasic, + "text2text-generation": snippetBasic, + "fill-mask": snippetBasic, + "sentence-similarity": snippetBasic, + "automatic-speech-recognition": snippetFile, + "text-to-image": snippetTextToImage, + "text-to-speech": snippetTextToAudio, + "text-to-audio": snippetTextToAudio, + "audio-to-audio": snippetFile, + "audio-classification": snippetFile, + "image-classification": snippetFile, + "image-to-text": snippetFile, + "object-detection": snippetFile, + "image-segmentation": snippetFile, +}; + +export function getJsInferenceSnippet(model: ModelData, accessToken: string): string { + return model.pipeline_tag && model.pipeline_tag in jsSnippets + ? jsSnippets[model.pipeline_tag]?.(model, accessToken) ?? "" + : ""; +} + +export function hasJsInferenceSnippet(model: ModelData): boolean { + return !!model.pipeline_tag && model.pipeline_tag in jsSnippets; +} diff --git a/packages/widgets/src/lib/inferenceSnippets/servePython.ts b/packages/widgets/src/lib/inferenceSnippets/servePython.ts new file mode 100644 index 000000000..5ddbeabeb --- /dev/null +++ b/packages/widgets/src/lib/inferenceSnippets/servePython.ts @@ -0,0 +1,114 @@ +import type { PipelineType } from "@huggingface/tasks"; +import type { ModelData } from "../interfaces/Types.js"; +import { getModelInputSnippet } from "./inputs.js"; + +export const snippetZeroShotClassification = (model: ModelData): string => + `def query(payload): + response = requests.post(API_URL, headers=headers, json=payload) + return response.json() + +output = query({ + "inputs": ${getModelInputSnippet(model)}, + "parameters": {"candidate_labels": ["refund", "legal", "faq"]}, +})`; + +export const snippetBasic = (model: ModelData): string => + `def query(payload): + response = requests.post(API_URL, headers=headers, json=payload) + return response.json() + +output = query({ + "inputs": ${getModelInputSnippet(model)}, +})`; + +export const snippetFile = (model: ModelData): string => + `def query(filename): + with open(filename, "rb") as f: + data = f.read() + response = requests.post(API_URL, headers=headers, data=data) + return response.json() + +output = query(${getModelInputSnippet(model)})`; + +export const snippetTextToImage = (model: ModelData): string => + `def query(payload): + response = requests.post(API_URL, headers=headers, json=payload) + return response.content +image_bytes = query({ + "inputs": ${getModelInputSnippet(model)}, +}) +# You can access the image with PIL.Image for example +import io +from PIL import Image +image = Image.open(io.BytesIO(image_bytes))`; + +export const snippetTextToAudio = (model: ModelData): string => { + // Transformers TTS pipeline and api-inference-community (AIC) pipeline outputs are diverged + // with the latest update to inference-api (IA). + // Transformers IA returns a byte object (wav file), whereas AIC returns wav and sampling_rate. + if (model.library_name === "transformers") { + return `def query(payload): + response = requests.post(API_URL, headers=headers, json=payload) + return response.content + +audio_bytes = query({ + "inputs": ${getModelInputSnippet(model)}, +}) +# You can access the audio with IPython.display for example +from IPython.display import Audio +Audio(audio_bytes)`; + } else { + return `def query(payload): + response = requests.post(API_URL, headers=headers, json=payload) + return response.json() + +audio, sampling_rate = query({ + "inputs": ${getModelInputSnippet(model)}, +}) +# You can access the audio with IPython.display for example +from IPython.display import Audio +Audio(audio, rate=sampling_rate)`; + } +}; +export const pythonSnippets: Partial string>> = { + // Same order as in js/src/lib/interfaces/Types.ts + "text-classification": snippetBasic, + "token-classification": snippetBasic, + "table-question-answering": snippetBasic, + "question-answering": snippetBasic, + "zero-shot-classification": snippetZeroShotClassification, + translation: snippetBasic, + summarization: snippetBasic, + conversational: snippetBasic, + "feature-extraction": snippetBasic, + "text-generation": snippetBasic, + "text2text-generation": snippetBasic, + "fill-mask": snippetBasic, + "sentence-similarity": snippetBasic, + "automatic-speech-recognition": snippetFile, + "text-to-image": snippetTextToImage, + "text-to-speech": snippetTextToAudio, + "text-to-audio": snippetTextToAudio, + "audio-to-audio": snippetFile, + "audio-classification": snippetFile, + "image-classification": snippetFile, + "image-to-text": snippetFile, + "object-detection": snippetFile, + "image-segmentation": snippetFile, +}; + +export function getPythonInferenceSnippet(model: ModelData, accessToken: string): string { + const body = + model.pipeline_tag && model.pipeline_tag in pythonSnippets ? pythonSnippets[model.pipeline_tag]?.(model) ?? "" : ""; + + return `import requests + +API_URL = "https://api-inference.huggingface.co/models/${model.id}" +headers = {"Authorization": ${accessToken ? `"Bearer ${accessToken}"` : `f"Bearer {API_TOKEN}"`}} + +${body}`; +} + +export function hasPythonInferenceSnippet(model: ModelData): boolean { + return !!model.pipeline_tag && model.pipeline_tag in pythonSnippets; +} diff --git a/packages/widgets/src/lib/interfaces/DefaultWidget.ts b/packages/widgets/src/lib/interfaces/DefaultWidget.ts new file mode 100644 index 000000000..e7ad19621 --- /dev/null +++ b/packages/widgets/src/lib/interfaces/DefaultWidget.ts @@ -0,0 +1,718 @@ +import type { PipelineType } from "@huggingface/tasks"; +import type { WidgetExample } from "../components/InferenceWidget/shared/WidgetExample.js"; + +type LanguageCode = string; + +type PerLanguageMapping = Map; + +/// NOTE TO CONTRIBUTORS: +/// +/// When adding sample inputs for a new language, you don't +/// necessarily have to translate the inputs from existing languages. +/// (which were quite random to begin with) +/// +/// i.e. Feel free to be creative and provide better samples. +// + +/// The placeholder will be replaced by the correct mask token +/// in the following examples, depending on the model type +/// +/// see [INTERNAL] github.com/huggingface/moon-landing/blob/c5c3d45fe0ab27347b3ab27bdad646ef20732351/server/lib/App.ts#L254 +// + +const MAPPING_EN: PerLanguageMapping = new Map([ + ["text-classification", [`I like you. I love you`]], + [ + "token-classification", + [ + `My name is Wolfgang and I live in Berlin`, + `My name is Sarah and I live in London`, + `My name is Clara and I live in Berkeley, California.`, + ], + ], + [ + "table-question-answering", + [ + { + text: `How many stars does the transformers repository have?`, + table: { + Repository: ["Transformers", "Datasets", "Tokenizers"], + Stars: [36542, 4512, 3934], + Contributors: [651, 77, 34], + "Programming language": ["Python", "Python", "Rust, Python and NodeJS"], + }, + }, + ], + ], + [ + "question-answering", + [ + { + text: `Where do I live?`, + context: `My name is Wolfgang and I live in Berlin`, + }, + { + text: `Where do I live?`, + context: `My name is Sarah and I live in London`, + }, + { + text: `What's my name?`, + context: `My name is Clara and I live in Berkeley.`, + }, + { + text: `Which name is also used to describe the Amazon rainforest in English?`, + context: `The Amazon rainforest (Portuguese: Floresta Amazônica or Amazônia; Spanish: Selva Amazónica, Amazonía or usually Amazonia; French: Forêt amazonienne; Dutch: Amazoneregenwoud), also known in English as Amazonia or the Amazon Jungle, is a moist broadleaf forest that covers most of the Amazon basin of South America. This basin encompasses 7,000,000 square kilometres (2,700,000 sq mi), of which 5,500,000 square kilometres (2,100,000 sq mi) are covered by the rainforest. This region includes territory belonging to nine nations. The majority of the forest is contained within Brazil, with 60% of the rainforest, followed by Peru with 13%, Colombia with 10%, and with minor amounts in Venezuela, Ecuador, Bolivia, Guyana, Suriname and French Guiana. States or departments in four nations contain "Amazonas" in their names. The Amazon represents over half of the planet's remaining rainforests, and comprises the largest and most biodiverse tract of tropical rainforest in the world, with an estimated 390 billion individual trees divided into 16,000 species.`, + }, + ], + ], + [ + "zero-shot-classification", + [ + { + text: "I have a problem with my iphone that needs to be resolved asap!!", + candidate_labels: "urgent, not urgent, phone, tablet, computer", + multi_class: true, + }, + { + text: "Last week I upgraded my iOS version and ever since then my phone has been overheating whenever I use your app.", + candidate_labels: "mobile, website, billing, account access", + multi_class: false, + }, + { + text: "A new model offers an explanation for how the Galilean satellites formed around the solar system’s largest world. Konstantin Batygin did not set out to solve one of the solar system’s most puzzling mysteries when he went for a run up a hill in Nice, France. Dr. Batygin, a Caltech researcher, best known for his contributions to the search for the solar system’s missing “Planet Nine,” spotted a beer bottle. At a steep, 20 degree grade, he wondered why it wasn’t rolling down the hill. He realized there was a breeze at his back holding the bottle in place. Then he had a thought that would only pop into the mind of a theoretical astrophysicist: “Oh! This is how Europa formed.” Europa is one of Jupiter’s four large Galilean moons. And in a paper published Monday in the Astrophysical Journal, Dr. Batygin and a co-author, Alessandro Morbidelli, a planetary scientist at the Côte d’Azur Observatory in France, present a theory explaining how some moons form around gas giants like Jupiter and Saturn, suggesting that millimeter-sized grains of hail produced during the solar system’s formation became trapped around these massive worlds, taking shape one at a time into the potentially habitable moons we know today.", + candidate_labels: "space & cosmos, scientific discovery, microbiology, robots, archeology", + multi_class: true, + }, + ], + ], + ["translation", [`My name is Wolfgang and I live in Berlin`, `My name is Sarah and I live in London`]], + [ + "summarization", + [ + `The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.`, + ], + ], + [ + "conversational", + [ + `Hey my name is Julien! How are you?`, + `Hey my name is Thomas! How are you?`, + `Hey my name is Mariama! How are you?`, + `Hey my name is Clara! How are you?`, + `Hey my name is Julien! How are you?`, + `Hi.`, + ], + ], + [ + "text-generation", + [ + `My name is Julien and I like to`, + `My name is Thomas and my main`, + `My name is Mariama, my favorite`, + `My name is Clara and I am`, + `My name is Lewis and I like to`, + `My name is Merve and my favorite`, + `My name is Teven and I am`, + `Once upon a time,`, + ], + ], + ["fill-mask", [`Paris is the of France.`, `The goal of life is .`]], + [ + "sentence-similarity", + [ + { + source_sentence: "That is a happy person", + sentences: ["That is a happy dog", "That is a very happy person", "Today is a sunny day"], + }, + ], + ], +]); + +const MAPPING_ZH: PerLanguageMapping = new Map([ + ["text-classification", [`我喜欢你。 我爱你`]], + ["token-classification", [`我叫沃尔夫冈,我住在柏林。`, `我叫萨拉,我住在伦敦。`, `我叫克拉拉,我住在加州伯克利。`]], + [ + "question-answering", + [ + { + text: `我住在哪里?`, + context: `我叫沃尔夫冈,我住在柏林。`, + }, + { + text: `我住在哪里?`, + context: `我叫萨拉,我住在伦敦。`, + }, + { + text: `我的名字是什么?`, + context: `我叫克拉拉,我住在伯克利。`, + }, + ], + ], + ["translation", [`我叫沃尔夫冈,我住在柏林。`, `我叫萨拉,我住在伦敦。`]], + [ + "zero-shot-classification", + [ + { + text: "房间干净明亮,非常不错", + candidate_labels: "这是一条差评, 这是一条好评", + }, + ], + ], + [ + "summarization", + [ + `该塔高324米(1063英尺),与一幢81层的建筑物一样高,是巴黎最高的建筑物。 它的底座是方形的,每边长125米(410英尺)。 在建造过程中,艾菲尔铁塔超过了华盛顿纪念碑,成为世界上最高的人造结构,它保持了41年的头衔,直到1930年纽约市的克莱斯勒大楼竣工。这是第一个到达300米高度的结构。 由于1957年在塔顶增加了广播天线,因此它现在比克莱斯勒大厦高5.2米(17英尺)。 除发射器外,艾菲尔铁塔是法国第二高的独立式建筑,仅次于米劳高架桥。`, + ], + ], + [ + "text-generation", + [`我叫朱利安,我喜欢`, `我叫托马斯,我的主要`, `我叫玛丽亚,我最喜欢的`, `我叫克拉拉,我是`, `从前,`], + ], + ["fill-mask", [`巴黎是国的首都。`, `生活的真谛是。`]], + [ + "sentence-similarity", + [ + { + source_sentence: "那是 個快樂的人", + sentences: ["那是 條快樂的狗", "那是 個非常幸福的人", "今天是晴天"], + }, + ], + ], +]); + +const MAPPING_FR: PerLanguageMapping = new Map([ + ["text-classification", [`Je t'apprécie beaucoup. Je t'aime.`]], + ["token-classification", [`Mon nom est Wolfgang et je vis à Berlin`]], + [ + "question-answering", + [ + { + text: `Où est-ce que je vis?`, + context: `Mon nom est Wolfgang et je vis à Berlin`, + }, + ], + ], + ["translation", [`Mon nom est Wolfgang et je vis à Berlin`]], + [ + "summarization", + [ + `La tour fait 324 mètres (1,063 pieds) de haut, environ la même hauteur qu'un immeuble de 81 étages, et est la plus haute structure de Paris. Sa base est carrée, mesurant 125 mètres (410 pieds) sur chaque côté. Durant sa construction, la tour Eiffel surpassa le Washington Monument pour devenir la plus haute structure construite par l'homme dans le monde, un titre qu'elle conserva pendant 41 ans jusqu'à l'achèvement du Chrysler Building à New-York City en 1930. Ce fut la première structure à atteindre une hauteur de 300 mètres. Avec l'ajout d'une antenne de radiodiffusion au sommet de la tour Eiffel en 1957, celle-ci redevint plus haute que le Chrysler Building de 5,2 mètres (17 pieds). En excluant les transmetteurs, elle est la seconde plus haute stucture autoportante de France après le viaduc de Millau.`, + ], + ], + ["text-generation", [`Mon nom est Julien et j'aime`, `Mon nom est Thomas et mon principal`, `Il était une fois`]], + ["fill-mask", [`Paris est la de la France.`]], + [ + "sentence-similarity", + [ + { + source_sentence: "C'est une personne heureuse", + sentences: [ + "C'est un chien heureux", + "C'est une personne très heureuse", + "Aujourd'hui est une journée ensoleillée", + ], + }, + ], + ], +]); + +const MAPPING_ES: PerLanguageMapping = new Map([ + ["text-classification", [`Te quiero. Te amo.`]], + ["token-classification", [`Me llamo Wolfgang y vivo en Berlin`]], + [ + "question-answering", + [ + { + text: `¿Dónde vivo?`, + context: `Me llamo Wolfgang y vivo en Berlin`, + }, + { + text: `¿Quién inventó el submarino?`, + context: `Isaac Peral fue un murciano que inventó el submarino`, + }, + { + text: `¿Cuántas personas hablan español?`, + context: `El español es el segundo idioma más hablado del mundo con más de 442 millones de hablantes`, + }, + ], + ], + [ + "translation", + [ + `Me llamo Wolfgang y vivo en Berlin`, + `Los ingredientes de una tortilla de patatas son: huevos, patatas y cebolla`, + ], + ], + [ + "summarization", + [ + `La torre tiene 324 metros (1.063 pies) de altura, aproximadamente la misma altura que un edificio de 81 pisos y la estructura más alta de París. Su base es cuadrada, mide 125 metros (410 pies) a cada lado. Durante su construcción, la Torre Eiffel superó al Washington Monument para convertirse en la estructura artificial más alta del mundo, un título que mantuvo durante 41 años hasta que el Chrysler Building en la ciudad de Nueva York se terminó en 1930. Fue la primera estructura en llegar Una altura de 300 metros. Debido a la adición de una antena de transmisión en la parte superior de la torre en 1957, ahora es más alta que el Chrysler Building en 5,2 metros (17 pies). Excluyendo los transmisores, la Torre Eiffel es la segunda estructura independiente más alta de Francia después del Viaducto de Millau.`, + ], + ], + [ + "text-generation", + [ + `Me llamo Julien y me gusta`, + `Me llamo Thomas y mi principal`, + `Me llamo Manuel y trabajo en`, + `Érase una vez,`, + `Si tú me dices ven, `, + ], + ], + ["fill-mask", [`Mi nombre es y vivo en Nueva York.`, `El español es un idioma muy en el mundo.`]], + [ + "sentence-similarity", + [ + { + source_sentence: "Esa es una persona feliz", + sentences: ["Ese es un perro feliz", "Esa es una persona muy feliz", "Hoy es un día soleado"], + }, + ], + ], +]); + +const MAPPING_RU: PerLanguageMapping = new Map([ + ["text-classification", [`Ты мне нравишься. Я тебя люблю`]], + ["token-classification", [`Меня зовут Вольфганг и я живу в Берлине`]], + [ + "question-answering", + [ + { + text: `Где живу?`, + context: `Меня зовут Вольфганг и я живу в Берлине`, + }, + ], + ], + ["translation", [`Меня зовут Вольфганг и я живу в Берлине`]], + [ + "summarization", + [ + `Высота башни составляет 324 метра (1063 фута), примерно такая же высота, как у 81-этажного здания, и самое высокое сооружение в Париже. Его основание квадратно, размером 125 метров (410 футов) с любой стороны. Во время строительства Эйфелева башня превзошла монумент Вашингтона, став самым высоким искусственным сооружением в мире, и этот титул она удерживала в течение 41 года до завершения строительство здания Крайслер в Нью-Йорке в 1930 году. Это первое сооружение которое достигло высоты 300 метров. Из-за добавления вещательной антенны на вершине башни в 1957 году она сейчас выше здания Крайслер на 5,2 метра (17 футов). За исключением передатчиков, Эйфелева башня является второй самой высокой отдельно стоящей структурой во Франции после виадука Мийо.`, + ], + ], + ["text-generation", [`Меня зовут Жюльен и`, `Меня зовут Томас и мой основной`, `Однажды`]], + ["fill-mask", [`Меня зовут и я инженер живущий в Нью-Йорке.`]], + [ + "sentence-similarity", + [ + { + source_sentence: "Это счастливый человек", + sentences: ["Это счастливая собака", "Это очень счастливый человек", "Сегодня солнечный день"], + }, + ], + ], +]); + +const MAPPING_UK: PerLanguageMapping = new Map([ + ["translation", [`Мене звати Вольфґанґ і я живу в Берліні.`]], + ["fill-mask", [`Мене звати .`]], +]); + +const MAPPING_IT: PerLanguageMapping = new Map([ + ["text-classification", [`Mi piaci. Ti amo`]], + [ + "token-classification", + [ + `Mi chiamo Wolfgang e vivo a Berlino`, + `Mi chiamo Sarah e vivo a Londra`, + `Mi chiamo Clara e vivo a Berkeley in California.`, + ], + ], + [ + "question-answering", + [ + { + text: `Dove vivo?`, + context: `Mi chiamo Wolfgang e vivo a Berlino`, + }, + { + text: `Dove vivo?`, + context: `Mi chiamo Sarah e vivo a Londra`, + }, + { + text: `Come mio chiamo?`, + context: `Mi chiamo Clara e vivo a Berkeley.`, + }, + ], + ], + ["translation", [`Mi chiamo Wolfgang e vivo a Berlino`, `Mi chiamo Sarah e vivo a Londra`]], + [ + "summarization", + [ + `La torre degli Asinelli è una delle cosiddette due torri di Bologna, simbolo della città, situate in piazza di porta Ravegnana, all'incrocio tra le antiche strade San Donato (ora via Zamboni), San Vitale, Maggiore e Castiglione. Eretta, secondo la tradizione, fra il 1109 e il 1119 dal nobile Gherardo Asinelli, la torre è alta 97,20 metri, pende verso ovest per 2,23 metri e presenta all'interno una scalinata composta da 498 gradini. Ancora non si può dire con certezza quando e da chi fu costruita la torre degli Asinelli. Si presume che la torre debba il proprio nome a Gherardo Asinelli, il nobile cavaliere di fazione ghibellina al quale se ne attribuisce la costruzione, iniziata secondo una consolidata tradizione l'11 ottobre 1109 e terminata dieci anni dopo, nel 1119.`, + ], + ], + [ + "text-generation", + [ + `Mi chiamo Loreto e mi piace`, + `Mi chiamo Thomas e il mio principale`, + `Mi chiamo Marianna, la mia cosa preferita`, + `Mi chiamo Clara e sono`, + `C'era una volta`, + ], + ], + ["fill-mask", [`Roma è la d'Italia.`, `Lo scopo della vita è .`]], + [ + "sentence-similarity", + [ + { + source_sentence: "Questa è una persona felice", + sentences: ["Questo è un cane felice", "Questa è una persona molto felice", "Oggi è una giornata di sole"], + }, + ], + ], +]); + +const MAPPING_FA: PerLanguageMapping = new Map([ + [ + "text-classification", + [`پروژه به موقع تحویل شد و همه چیز خوب بود.`, `سیب‌زمینی بی‌کیفیت بود.`, `قیمت و کیفیت عالی`, `خوب نبود اصلا`], + ], + [ + "token-classification", + [ + `این سریال به صورت رسمی در تاریخ دهم می ۲۰۱۱ توسط شبکه فاکس برای پخش رزرو شد.`, + `دفتر مرکزی شرکت پارس‌مینو در شهر اراک در استان مرکزی قرار دارد.`, + `وی در سال ۲۰۱۳ درگذشت و مسئول خاکسپاری و اقوامش برای او مراسم یادبود گرفتند.`, + ], + ], + [ + "question-answering", + [ + { + text: `من کجا زندگی میکنم؟`, + context: `نام من پژمان است و در گرگان زندگی میکنم.`, + }, + { + text: `نامم چیست و کجا زندگی می‌کنم؟`, + context: `اسمم سارا است و در آفریقای جنوبی زندگی میکنم.`, + }, + { + text: `نام من چیست؟`, + context: `من مریم هستم و در تبریز زندگی می‌کنم.`, + }, + { + text: `بیشترین مساحت جنگل آمازون در کدام کشور است؟`, + context: [ + "آمازون نام بزرگ‌ترین جنگل بارانی جهان است که در شمال آمریکای جنوبی قرار گرفته و بیشتر آن در خاک برزیل و پرو", + "جای دارد. بیش از نیمی از همه جنگل‌های بارانی باقی‌مانده در جهان در آمازون قرار دارد.", + "مساحت جنگل‌های آمازون ۵٫۵ میلیون کیلومتر مربع است که بین ۹ کشور تقسیم شده‌است.", + ].join("\n"), + }, + ], + ], + [ + "translation", + [ + "بیشتر مساحت جنگل‌های آمازون در حوضه آبریز رود آمازون و ۱۱۰۰ شاخه آن واقع شده‌است.", + "مردمان نَبَطی از هزاره‌های یکم و دوم پیش از میلاد در این منطقه زندگی می‌کردند.", + ], + ], + [ + "summarization", + [ + [ + "شاهنامه اثر حکیم ابوالقاسم فردوسی توسی، حماسه‌ای منظوم، بر حسب دست نوشته‌های ", + "موجود دربرگیرنده نزدیک به ۵۰٬۰۰۰ بیت تا نزدیک به ۶۱٬۰۰۰ بیت و یکی از ", + "بزرگ‌ترین و برجسته‌ترین سروده‌های حماسی جهان است که سرایش آن دست‌آوردِ ", + "دست‌کم سی سال کارِ پیوستهٔ این سخن‌سرای نامدار ایرانی است. موضوع این شاهکار ادبی،", + " افسانه‌ها و تاریخ ایران از آغاز تا حملهٔ عرب‌ها به ایران در سدهٔ هفتم میلادی است", + " (شاهنامه از سه بخش اسطوره، پهلوانی و تاریخی تشکیل شده‌است) که در چهار", + " دودمان پادشاهیِ پیشدادیان، کیانیان، اشکانیان و ساسانیان گنجانده می‌شود.", + " شاهنامه بر وزن «فَعولُن فعولن فعولن فَعَلْ»، در بحرِ مُتَقارِبِ مثمَّنِ محذوف نگاشته شده‌است.", + "هنگامی که زبان دانش و ادبیات در ایران زبان عربی بود، فردوسی، با سرودن شاهنامه", + " با ویژگی‌های هدف‌مندی که داشت، زبان پارسی را زنده و پایدار کرد. یکی از ", + " بن‌مایه‌های مهمی که فردوسی برای سرودن شاهنامه از آن استفاده کرد،", + " شاهنامهٔ ابومنصوری بود. شاهنامه نفوذ بسیاری در جهت‌گیری ", + " فرهنگ فارسی و نیز بازتاب‌های شکوه‌مندی در ادبیات جهان داشته‌است و شاعران ", + " بزرگی مانند گوته و ویکتور هوگو از آن به نیکی یاد کرده‌اند.", + ].join("\n"), + ], + ], + ["text-generation", ["اسم من نازنین است و من", "روزی روزگاری"]], + [ + "fill-mask", + [ + `زندگی یک سوال است و این که چگونه کنیم پاسخ این سوال!`, + `زندگی از مرگ پرسید: چرا همه من را دارند اما از تو متنفرند؟`, + ], + ], +]); + +const MAPPING_AR: PerLanguageMapping = new Map([ + ["text-classification", [`أحبك. أهواك`]], + [ + "token-classification", + [`إسمي محمد وأسكن في برلين`, `إسمي ساره وأسكن في لندن`, `إسمي سامي وأسكن في القدس في فلسطين.`], + ], + [ + "question-answering", + [ + { + text: `أين أسكن؟`, + context: `إسمي محمد وأسكن في بيروت`, + }, + { + text: `أين أسكن؟`, + context: `إسمي ساره وأسكن في لندن`, + }, + { + text: `ما اسمي؟`, + context: `اسمي سعيد وأسكن في حيفا.`, + }, + { + text: `ما لقب خالد بن الوليد بالعربية؟`, + context: `خالد بن الوليد من أبطال وقادة الفتح الإسلامي وقد تحدثت عنه اللغات الإنجليزية والفرنسية والإسبانية ولقب بسيف الله المسلول.`, + }, + ], + ], + ["translation", [`إسمي محمد وأسكن في برلين`, `إسمي ساره وأسكن في لندن`]], + [ + "summarization", + [ + `تقع الأهرامات في الجيزة قرب القاهرة في مصر وقد بنيت منذ عدة قرون، وقيل إنها كانت قبورا للفراعنة وتم بناؤها بعملية هندسية رائعة واستقدمت حجارتها من جبل المقطم وتم نقلها بالسفن أو على الرمل، وما تزال شامخة ويقصدها السياح من كافة أرجاء المعمورة.`, + ], + ], + [ + "text-generation", + [ + `إسمي محمد وأحب أن`, + `دع المكارم لا ترحل لبغيتها - واقعد فإنك أنت الطاعم الكاسي.`, + `لماذا نحن هنا؟`, + `القدس مدينة تاريخية، بناها الكنعانيون في`, + `كان يا ما كان في قديم الزمان`, + ], + ], + ["fill-mask", [`باريس فرنسا.`, `فلسفة الحياة هي .`]], + [ + "sentence-similarity", + [ + { + source_sentence: "هذا شخص سعيد", + sentences: ["هذا كلب سعيد", "هذا شخص سعيد جدا", "اليوم هو يوم مشمس"], + }, + ], + ], +]); + +const MAPPING_BN: PerLanguageMapping = new Map([ + ["text-classification", [`বাঙালির ঘরে ঘরে আজ নবান্ন উৎসব।`]], + [ + "token-classification", + [`আমার নাম জাহিদ এবং আমি ঢাকায় বাস করি।`, `তিনি গুগলে চাকরী করেন।`, `আমার নাম সুস্মিতা এবং আমি কলকাতায় বাস করি।`], + ], + ["translation", [`আমার নাম জাহিদ, আমি রংপুরে বাস করি।`, `আপনি কী আজকে বাসায় আসবেন?`]], + [ + "summarization", + [ + `‘ইকোনমিস্ট’ লিখেছে, অ্যান্টিবডির চার মাস স্থায়ী হওয়ার খবরটি দুই কারণে আনন্দের। অ্যান্টিবডি যত দিন পর্যন্ত শরীরে টিকবে, তত দিন সংক্রমণ থেকে সুরক্ষিত থাকা সম্ভব। অর্থাৎ, এমন এক টিকার প্রয়োজন হবে, যা অ্যান্টিবডির উত্পাদনকে প্ররোচিত করতে পারে এবং দীর্ঘস্থায়ী সুরক্ষা দিতে পারে। এগুলো খুঁজে বের করাও সহজ। এটি আভাস দেয়, ব্যাপক হারে অ্যান্টিবডি শনাক্তকরণ ফলাফল মোটামুটি নির্ভুল হওয়া উচিত। দ্বিতীয় আরেকটি গবেষণার নেতৃত্ব দিয়েছেন যুক্তরাজ্যের মেডিকেল রিসার্চ কাউন্সিলের (এমআরসি) ইমিউনোলজিস্ট তাও দং। তিনি টি-সেল শনাক্তকরণে কাজ করেছেন। টি-সেল শনাক্তকরণের প্রক্রিয়া অবশ্য অ্যান্টিবডির মতো এত আলোচিত নয়। তবে সংক্রমণের বিরুদ্ধে লড়াই এবং দীর্ঘমেয়াদি সুরক্ষায় সমান গুরুত্বপূর্ণ ভূমিকা পালন করে। গবেষণাসংক্রান্ত নিবন্ধ প্রকাশিত হয়েছে ‘নেচার ইমিউনোলজি’ সাময়িকীতে। তাঁরা বলছেন, গবেষণার ক্ষেত্রে কোভিড-১৯ মৃদু সংক্রমণের শিকার ২৮ ব্যক্তির রক্তের নমুনা, ১৪ জন গুরুতর অসুস্থ ও ১৬ জন সুস্থ ব্যক্তির রক্তের নমুনা পরীক্ষা করেছেন। গবেষণা নিবন্ধে বলা হয়, সংক্রমিত ব্যক্তিদের ক্ষেত্রে টি-সেলের তীব্র প্রতিক্রিয়া তাঁরা দেখেছেন। এ ক্ষেত্রে মৃদু ও গুরুতর অসুস্থ ব্যক্তিদের ক্ষেত্রে প্রতিক্রিয়ার ভিন্নতা পাওয়া গেছে।`, + ], + ], + ["text-generation", [`আমি রতন এবং আমি`, `তুমি যদি চাও তবে`, `মিথিলা আজকে বড্ড`]], + ["fill-mask", [`আমি বাংলায় গাই।`, `আমি খুব ভালোবাসি। `]], + [ + "question-answering", + [ + { + text: `প্রথম এশিয়া কাপ ক্রিকেট টুর্নামেন্ট কোথায় অনুষ্ঠিত হয় ?`, + context: `প্রথম টুর্নামেন্ট অনুষ্ঠিত হয় ১৯৮৪ সালে সংযুক্ত আরব আমিরাত এর শারজাহ তে যেখানে কাউন্সিলের মূল অফিস ছিল (১৯৯৫ পর্যন্ত)। ভারত শ্রীলঙ্কার সাথে আন্তরিকতাহীন ক্রিকেট সম্পর্কের কারণে ১৯৮৬ সালের টুর্নামেন্ট বর্জন করে। ১৯৯৩ সালে ভারত ও পাকিস্তান এর মধ্যে রাজনৈতিক অস্থিরতার কারণে এটি বাতিল হয়ে যায়। শ্রীলঙ্কা এশিয়া কাপ শুরু থেকে অংশ গ্রহণ করে আসছে। আন্তর্জাতিক ক্রিকেট কাউন্সিল নিয়ম করে দিয়েছে যে এশিয়া কাপের সকল খেলা অনুষ্ঠিত হবে অফিসিয়াল একদিনের আন্তর্জাতিক ক্রিকেট হিসেবে। এসিসি ঘোষনা অনুযায়ী প্রতি দুই বছর পর পর টুর্নামেন্ট অনুষ্ঠিত হয় ২০০৮ সাল থেকে।`, + }, + { + text: `ভারতীয় বাঙালি কথাসাহিত্যিক মহাশ্বেতা দেবীর মৃত্যু কবে হয় ?`, + context: `২০১৬ সালের ২৩ জুলাই হৃদরোগে আক্রান্ত হয়ে মহাশ্বেতা দেবী কলকাতার বেল ভিউ ক্লিনিকে ভর্তি হন। সেই বছরই ২৮ জুলাই একাধিক অঙ্গ বিকল হয়ে তাঁর মৃত্যু ঘটে। তিনি মধুমেহ, সেপ্টিসেমিয়া ও মূত্র সংক্রমণ রোগেও ভুগছিলেন।`, + }, + { + text: `মাস্টারদা সূর্যকুমার সেনের বাবার নাম কী ছিল ?`, + context: `সূর্য সেন ১৮৯৪ সালের ২২ মার্চ চট্টগ্রামের রাউজান থানার নোয়াপাড়ায় অর্থনৈতিক ভাবে অস্বচ্ছল পরিবারে জন্মগ্রহণ করেন। তাঁর পিতার নাম রাজমনি সেন এবং মাতার নাম শশী বালা সেন। রাজমনি সেনের দুই ছেলে আর চার মেয়ে। সূর্য সেন তাঁদের পরিবারের চতুর্থ সন্তান। দুই ছেলের নাম সূর্য ও কমল। চার মেয়ের নাম বরদাসুন্দরী, সাবিত্রী, ভানুমতী ও প্রমিলা। শৈশবে পিতা মাতাকে হারানো সূর্য সেন কাকা গৌরমনি সেনের কাছে মানুষ হয়েছেন। সূর্য সেন ছেলেবেলা থেকেই খুব মনোযোগী ভাল ছাত্র ছিলেন এবং ধর্মভাবাপন্ন গম্ভীর প্রকৃতির ছিলেন।`, + }, + ], + ], + [ + "sentence-similarity", + [ + { + source_sentence: "সে একজন সুখী ব্যক্তি", + sentences: ["সে হ্যাপি কুকুর", "সে খুব সুখী মানুষ", "আজ একটি রৌদ্রোজ্জ্বল দিন"], + }, + ], + ], +]); + +const MAPPING_MN: PerLanguageMapping = new Map([ + ["text-classification", [`Би чамд хайртай`]], + [ + "token-classification", + [ + `Намайг Дорж гэдэг. Би Улаанбаатарт амьдардаг.`, + `Намайг Ганбат гэдэг. Би Увс аймагт төрсөн.`, + `Манай улс таван хошуу малтай.`, + ], + ], + [ + "question-answering", + [ + { + text: `Та хаана амьдардаг вэ?`, + context: `Намайг Дорж гэдэг. Би Улаанбаатарт амьдардаг.`, + }, + { + text: `Таныг хэн гэдэг вэ?`, + context: `Намайг Дорж гэдэг. Би Улаанбаатарт амьдардаг.`, + }, + { + text: `Миний нэрийг хэн гэдэг вэ?`, + context: `Намайг Ганбат гэдэг. Би Увс аймагт төрсөн.`, + }, + ], + ], + ["translation", [`Намайг Дорж гэдэг. Би Улаанбаатарт амьдардаг.`, `Намайг Ганбат гэдэг. Би Увс аймагт төрсөн.`]], + [ + "summarization", + [ + `Монгол Улс (1992 оноос хойш) — дорно болон төв Азид оршдог бүрэн эрхт улс. Хойд талаараа Орос, бусад талаараа Хятад улстай хиллэдэг далайд гарцгүй орон. Нийслэл — Улаанбаатар хот. Алтайн нуруунаас Хянган, Соёноос Говь хүрсэн 1 сая 566 мянган км2 уудам нутагтай, дэлхийд нутаг дэвсгэрийн хэмжээгээр 19-рт жагсдаг. 2015 оны эхэнд Монгол Улсын хүн ам 3 сая хүрсэн (135-р олон). Үндсэндээ монгол үндэстэн (95 хувь), мөн хасаг, тува хүн байна. 16-р зуунаас хойш буддын шашин, 20-р зуунаас шашингүй байдал дэлгэрсэн ба албан хэрэгт монгол хэлээр харилцана.`, + ], + ], + [ + "text-generation", + [`Намайг Дорж гэдэг. Би`, `Хамгийн сайн дуучин бол`, `Миний дуртай хамтлаг бол`, `Эрт урьдын цагт`], + ], + ["fill-mask", [`Монгол улсын Улаанбаатар хотоос ярьж байна.`, `Миний амьдралын зорилго бол .`]], + [ + "automatic-speech-recognition", + [ + { + label: `Common Voice Train Example`, + src: `https://cdn-media.huggingface.co/common_voice/train/common_voice_mn_18577472.wav`, + }, + { + label: `Common Voice Test Example`, + src: `https://cdn-media.huggingface.co/common_voice/test/common_voice_mn_18577346.wav`, + }, + ], + ], + [ + "text-to-speech", + [ + `Би Монгол улсын иргэн.`, + `Энэхүү жишээ нь цаанаа ямар ч утга агуулаагүй болно`, + `Сар шинэдээ сайхан шинэлэж байна уу?`, + ], + ], + [ + "sentence-similarity", + [ + { + source_sentence: "Энэ бол аз жаргалтай хүн юм", + sentences: ["Энэ бол аз жаргалтай нохой юм", "Энэ бол маш их аз жаргалтай хүн юм", "Өнөөдөр нарлаг өдөр байна"], + }, + ], + ], +]); + +const MAPPING_SI: PerLanguageMapping = new Map([ + ["translation", [`සිංහල ඉතා අලංකාර භාෂාවකි.`, `මෙම තාක්ෂණය භාවිතා කරන ඔබට ස්තූතියි.`]], + ["fill-mask", [`මම ගෙදර .`, ` ඉගෙනීමට ගියාය.`]], +]); + +const MAPPING_DE: PerLanguageMapping = new Map([ + [ + "question-answering", + [ + { + text: `Wo wohne ich?`, + context: `Mein Name ist Wolfgang und ich lebe in Berlin`, + }, + { + text: `Welcher Name wird auch verwendet, um den Amazonas-Regenwald auf Englisch zu beschreiben?`, + context: `Der Amazonas-Regenwald, auf Englisch auch als Amazonien oder Amazonas-Dschungel bekannt, ist ein feuchter Laubwald, der den größten Teil des Amazonas-Beckens Südamerikas bedeckt. Dieses Becken umfasst 7.000.000 Quadratkilometer (2.700.000 Quadratmeilen), von denen 5.500.000 Quadratkilometer (2.100.000 Quadratmeilen) vom Regenwald bedeckt sind. Diese Region umfasst Gebiete von neun Nationen. Der größte Teil des Waldes befindet sich in Brasilien mit 60% des Regenwaldes, gefolgt von Peru mit 13%, Kolumbien mit 10% und geringen Mengen in Venezuela, Ecuador, Bolivien, Guyana, Suriname und Französisch-Guayana. Staaten oder Abteilungen in vier Nationen enthalten "Amazonas" in ihren Namen. Der Amazonas repräsentiert mehr als die Hälfte der verbleibenden Regenwälder des Planeten und umfasst den größten und artenreichsten tropischen Regenwald der Welt mit geschätzten 390 Milliarden Einzelbäumen, die in 16.000 Arten unterteilt sind.`, + }, + ], + ], + [ + "sentence-similarity", + [ + { + source_sentence: "Das ist eine glückliche Person", + sentences: [ + "Das ist ein glücklicher Hund", + "Das ist eine sehr glückliche Person", + "Heute ist ein sonniger Tag", + ], + }, + ], + ], +]); + +const MAPPING_DV: PerLanguageMapping = new Map([ + ["text-classification", [`އަހަރެން ގަޔާވޭ. އަހަރެން ލޯބިވޭ`]], + [ + "token-classification", + [ + `އަހަރެންގެ ނަމަކީ އަހުމަދު އަދި އަހަރެން ދިރިއުޅެނީ މާލޭގަ`, + `އަހަރެންގެ ނަމަކީ ސާރާ އަދި އަހަރެން ދިރިއުޅެނީ އުތީމުގަ`, + `އަހަރެންގެ ނަމަކީ އައިޝާ އަދި އަހަރެން ދިރިއުޅެނީ ފޭދޫ، އައްޑޫގަ`, + ], + ], + [ + "question-answering", + [ + { + text: `އަހަރެން ދިރިއުޅެނީ ކޮންތާކު؟`, + context: `އަހަރެންގެ ނަމަކީ އަހުމަދު އަދި އަހަރެން ދިރިއުޅެނީ މާލޭގަ`, + }, + { + text: `އަހަރެން ދިރިއުޅެނީ ކޮންތާކު؟`, + context: `އަހަރެންގެ ނަމަކީ ސާރާ އަދި އަހަރެން ދިރިއުޅެނީ އުތީމުގަ`, + }, + { + text: `އަހަރެންގެ ނަމަކީ ކޮބާ؟`, + context: `އަހަރެންގެ ނަމަކީ އައިޝާ އަދި އަހަރެން ދިރިއުޅެނީ ފޭދޫގަ`, + }, + { + text: `އެމޭޒަން ރެއިންފޮރެސްޓް ސިފަކޮށްދިނުމަށް އިނގިރޭސި ބަހުން ބޭނުންކުރާނީ ކޮންނަމެއް؟`, + context: `އެމޭޒަން ރެއިންފޮރެސްޓް (ޕޯޗުޖީޒް: ފްލޮރެސްޓާ އެމަސޮނިކާ ނުވަތަ އެމަސޮނިއާ؛ ސްޕެނިޝް: ސެލްވާ އެމަސޮނިކާ, އެމަސޮނިއާ ނޫނީ އާންމުކޮށް އެމަޒޯނިއާ؛ ފްރެންޗް: ފޮރޭ އެމެޒޮނިއެން؛ ޑަޗް: އެމެޒޯންރޭގެވައުޑް)، އިގިރޭސި ބަހުން ބުނާ އެމެޒޯނިއާ ނުވަތަ ދަ އެމޭޒަން ޖަންގަލް އަކީ, ސައުތު އެމެރިކާގެ އެމޭޒަން ބޭސިން ސަރަހައްދުގެ ބޮޑުބައެއްގައި ހިމެނޭ މޮއިސްޓް ބޮރޯޑްލީފް ފޮރެސްޓެއެކެވެ. އެމޭޒަން ބޭސިން ސަރަހައްދުގެ ބޮޑު މިނަކީ 7 މިލިއަން އަކަ ކިލޯމީޓަރ (2.7 މިލިއަން އަކަ މައިލް(. މީގެ ތެރެއިން 5.5 މިލިއަން އަކަ ކިލޯމީޓަރ (2.1 މިލިއަން އަކަ މައިލް) އަކީ މި ފޮރެސްޓެވެ. މި ސަރަހައްދުގައި 9 ގައުމަކަށް ނިސްބަތްވާ ޓެރިޓަރީ ހިމެނެއެވެ. 60% އާއިއެކެ އެންމެ ބޮޑު ބައެއް ނިސްބަތްވަނީ ބްރެޒިލްއަށެވެ. އޭގެ ފަހުތުން 13% އާއެކު ޕެރޫ އާއި 10% އާއެކު ކޮލަމްބިއާ އަދި ކުޑަ ބައެއް ހިމެނޭ ގޮތުން ވެނެޒުއެލާ, އެކްއަޑޯ, ބޮލިވިއާ, ގުޔާނާ, ސުރިނާމް އަދި ފްރެންޗް ގްއާނާ އަށް ވެސް ނިސްބަތްވެއެވެ. މީގެ ތެރެއިން 4 ގައުމެއްގައި "އެމެޒޮނާސް" ހިމަނައިގެން ސްޓޭޓް ނުވަތަ ޑިޕާޓްމަންޓް އަކަށް ނަންދީފައިވެއެވެ. މުޅި ދުނިޔޭގައި ބާކީ ހުރި ރެއިންފޮރެސްޓްގެ ތެރެއިން ދެބައިކުޅަ އެއްބަޔަށްވުރެބޮޑުވަރެއް އެމޭޒޮން ރެއިންފޮރެސްޓް ހިއްސާކުރެއެވެ. މިއީ މުޅި ދުނިޔެއިން އެންމޮ ބޮޑު އަދި އެންމެ ބައޮޑައިވަރސް ރެއިންފޮރެސްޓް ޓްރެކްޓެވެ. ލަފާކުރެވޭ ގޮތުން 16 ހާސް ސްޕީޝީސްއަށް ބެހިގެންވާ 390 މިލިއަން ވައްތަރުގެ ގަސް މިތާގައި ހިމެނެއެވެ`, + }, + ], + ], + [ + "translation", + [ + `އަހަރެންގެ ނަމަކީ އަހުމަދު އަދި އަހަރެން ދިރިއުޅެނީ މާލޭގަ`, + `އަހަރެންގެ ނަމަކީ ސާރާ އަދި އަހަރެން ދިރިއުޅެނީ އުތީމުގަ`, + ], + ], + [ + "summarization", + [ + `ޓަވަރުގެ އުސްމިނަކީ 324 މީޓަރު، އެއީ ގާތްގަނޑަކަށް 81 ބުރީގެ އިމާރާތަކާއި އެއްވަރެވެ. އެއީ ޕެރިސްގައި ހުރި އެންމެ އުސް އިމާރާތެވެ. އޭގެ ހަތަރެސްކަނަށް ހުރި ބުޑުގެ ދިގުމިނަކީ ކޮންމެ ފަރާތަކުން 125 މީޓަރެވެ. (410 ފޫޓު) އައިފިލް ޓަވަރު ބިނާކުރި އިރު، ވޮޝިންގްޓަން މޮނިއުމެންޓްގެ އުސްމިން ފަހަނައަޅާ ގޮސް، ދުނިޔޭގައި މީހުން އުފެއްދި ތަންތަނުގެ ތެރެއިން އެންމެ އުސް ތަނުގެ ލަގަބު ލިބުނެވެ. އަދި 1930 ގައި ނިއު ޔޯކްގެ ކްރައިސްލަރ ބިލްޑިންގް ބިނާކުރުމާއި ހަމައަށް 41 އަހަރު ވަންދެން މިލަގަބު ހިފެހެއްޓިއެވެ. މިއީ 300 މީޓަރަށް ވުރެ އުސްކޮށް އިމާރާތްކުރެވުނު ފުރަތަމަ ތަނެވެ. 1957 ގައި ޓަވަރުގެ އެންމެ މަތީގައި ހަރުކުރެވުނު ބްރޯޑްކާސްޓިންގ އޭރިއަލްގެ ސަބަބުން މިހާރު މި ޓަވަރު ކްރައިސްލަރ ބިލްޑިންގއަށް ވުރެ 5.2 މީޓަރ (17 ފޫޓު) އުހެވެ. މި ޓްރާންސްމިޓަރު ނުލާ، އައިފިލް ޓަވަރަކީ، މިލާއު ވިއާޑަކްޓަށް ފަހު ފްރާންސްގައި ހުރި 2 ވަނައަށް އެންމެ އުސް ފްރީސްޓޭންޑިންގ އިމާރާތެވެ`, + ], + ], + [ + "text-generation", + [ + `އަހަރެންގެ ނަމަކީ ޔޫސުފް އަދި އަހަރެންގެ މައިގަނޑު`, + `އަހަރެންގެ ނަމަކީ މަރިއަމް، އަހަރެން އެންމެ ގަޔާވާ`, + `އަހަރެންގެ ނަމަކީ ފާތުމަތު އަދި އަހަރެން`, + `،އެއް ޒަމާނެއްގައި`, + ], + ], + ["fill-mask", [`. މާލެ އަކީ ދިވެހިރާއްޖޭގެ`, `ގަރުދިޔައަކީ ދިވެހިންގެ މެދުގައި ކެއުމެއް.`]], +]); + +export const MAPPING_DEFAULT_WIDGET = new Map([ + ["en", MAPPING_EN], + ["zh", MAPPING_ZH], + ["fr", MAPPING_FR], + ["es", MAPPING_ES], + ["ru", MAPPING_RU], + ["uk", MAPPING_UK], + ["it", MAPPING_IT], + ["fa", MAPPING_FA], + ["ar", MAPPING_AR], + ["bn", MAPPING_BN], + ["mn", MAPPING_MN], + ["si", MAPPING_SI], + ["de", MAPPING_DE], + ["dv", MAPPING_DV], +]); diff --git a/packages/widgets/src/lib/interfaces/InferenceDisplayability.ts b/packages/widgets/src/lib/interfaces/InferenceDisplayability.ts new file mode 100644 index 000000000..06f3fd403 --- /dev/null +++ b/packages/widgets/src/lib/interfaces/InferenceDisplayability.ts @@ -0,0 +1,14 @@ +export enum InferenceDisplayability { + /** + * Yes + */ + Yes = "Yes", + /** + * And then, all the possible reasons why it's no: + */ + ExplicitOptOut = "ExplicitOptOut", + CustomCode = "CustomCode", + LibraryNotDetected = "LibraryNotDetected", + PipelineNotDetected = "PipelineNotDetected", + PipelineLibraryPairNotSupported = "PipelineLibraryPairNotSupported", +} diff --git a/packages/widgets/src/lib/interfaces/Libraries.ts b/packages/widgets/src/lib/interfaces/Libraries.ts new file mode 100644 index 000000000..d723b627c --- /dev/null +++ b/packages/widgets/src/lib/interfaces/Libraries.ts @@ -0,0 +1,766 @@ +import type { ModelLibraryKey } from "@huggingface/tasks"; +/* eslint-disable @typescript-eslint/naming-convention */ +import type { ModelData } from "./Types.js"; + +/** + * Elements configurable by a model library. + */ +export interface LibraryUiElement { + /** + * Name displayed on the main + * call-to-action button on the model page. + */ + btnLabel: string; + /** + * Repo name + */ + repoName: string; + /** + * URL to library's repo + */ + repoUrl: string; + /** + * URL to library's docs + */ + docsUrl?: string; + /** + * Code snippet displayed on model page + */ + snippets: (model: ModelData) => string[]; +} + +function nameWithoutNamespace(modelId: string): string { + const splitted = modelId.split("/"); + return splitted.length === 1 ? splitted[0] : splitted[1]; +} + +//#region snippets + +const adapter_transformers = (model: ModelData) => [ + `from transformers import ${model.config?.adapter_transformers?.model_class} + +model = ${model.config?.adapter_transformers?.model_class}.from_pretrained("${model.config?.adapter_transformers?.model_name}") +model.load_adapter("${model.id}", source="hf")`, +]; + +const allennlpUnknown = (model: ModelData) => [ + `import allennlp_models +from allennlp.predictors.predictor import Predictor + +predictor = Predictor.from_path("hf://${model.id}")`, +]; + +const allennlpQuestionAnswering = (model: ModelData) => [ + `import allennlp_models +from allennlp.predictors.predictor import Predictor + +predictor = Predictor.from_path("hf://${model.id}") +predictor_input = {"passage": "My name is Wolfgang and I live in Berlin", "question": "Where do I live?"} +predictions = predictor.predict_json(predictor_input)`, +]; + +const allennlp = (model: ModelData) => { + if (model.tags?.includes("question-answering")) { + return allennlpQuestionAnswering(model); + } + return allennlpUnknown(model); +}; + +const asteroid = (model: ModelData) => [ + `from asteroid.models import BaseModel + +model = BaseModel.from_pretrained("${model.id}")`, +]; + +function get_base_diffusers_model(model: ModelData): string { + return model.cardData?.base_model ?? "fill-in-base-model"; +} + +const bertopic = (model: ModelData) => [ + `from bertopic import BERTopic + +model = BERTopic.load("${model.id}")`, +]; + +const diffusers_default = (model: ModelData) => [ + `from diffusers import DiffusionPipeline + +pipeline = DiffusionPipeline.from_pretrained("${model.id}")`, +]; + +const diffusers_controlnet = (model: ModelData) => [ + `from diffusers import ControlNetModel, StableDiffusionControlNetPipeline + +controlnet = ControlNetModel.from_pretrained("${model.id}") +pipeline = StableDiffusionControlNetPipeline.from_pretrained( + "${get_base_diffusers_model(model)}", controlnet=controlnet +)`, +]; + +const diffusers_lora = (model: ModelData) => [ + `from diffusers import DiffusionPipeline + +pipeline = DiffusionPipeline.from_pretrained("${get_base_diffusers_model(model)}") +pipeline.load_lora_weights("${model.id}")`, +]; + +const diffusers_textual_inversion = (model: ModelData) => [ + `from diffusers import DiffusionPipeline + +pipeline = DiffusionPipeline.from_pretrained("${get_base_diffusers_model(model)}") +pipeline.load_textual_inversion("${model.id}")`, +]; + +const diffusers = (model: ModelData) => { + if (model.tags?.includes("controlnet")) { + return diffusers_controlnet(model); + } else if (model.tags?.includes("lora")) { + return diffusers_lora(model); + } else if (model.tags?.includes("textual_inversion")) { + return diffusers_textual_inversion(model); + } else { + return diffusers_default(model); + } +}; + +const espnetTTS = (model: ModelData) => [ + `from espnet2.bin.tts_inference import Text2Speech + +model = Text2Speech.from_pretrained("${model.id}") + +speech, *_ = model("text to generate speech from")`, +]; + +const espnetASR = (model: ModelData) => [ + `from espnet2.bin.asr_inference import Speech2Text + +model = Speech2Text.from_pretrained( + "${model.id}" +) + +speech, rate = soundfile.read("speech.wav") +text, *_ = model(speech)[0]`, +]; + +const espnetUnknown = () => [`unknown model type (must be text-to-speech or automatic-speech-recognition)`]; + +const espnet = (model: ModelData) => { + if (model.tags?.includes("text-to-speech")) { + return espnetTTS(model); + } else if (model.tags?.includes("automatic-speech-recognition")) { + return espnetASR(model); + } + return espnetUnknown(); +}; + +const fairseq = (model: ModelData) => [ + `from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub + +models, cfg, task = load_model_ensemble_and_task_from_hf_hub( + "${model.id}" +)`, +]; + +const flair = (model: ModelData) => [ + `from flair.models import SequenceTagger + +tagger = SequenceTagger.load("${model.id}")`, +]; + +const keras = (model: ModelData) => [ + `from huggingface_hub import from_pretrained_keras + +model = from_pretrained_keras("${model.id}") +`, +]; + +const open_clip = (model: ModelData) => [ + `import open_clip + +model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:${model.id}') +tokenizer = open_clip.get_tokenizer('hf-hub:${model.id}')`, +]; + +const paddlenlp = (model: ModelData) => { + if (model.config?.architectures?.[0]) { + const architecture = model.config.architectures[0]; + return [ + [ + `from paddlenlp.transformers import AutoTokenizer, ${architecture}`, + "", + `tokenizer = AutoTokenizer.from_pretrained("${model.id}"${ + model.private ? ", use_auth_token=True" : "" + }, from_hf_hub=True)`, + `model = ${architecture}.from_pretrained("${model.id}"${ + model.private ? ", use_auth_token=True" : "" + }, from_hf_hub=True)`, + ].join("\n"), + ]; + } else { + return [ + [ + `# ⚠️ Type of model unknown`, + `from paddlenlp.transformers import AutoTokenizer, AutoModel`, + "", + `tokenizer = AutoTokenizer.from_pretrained("${model.id}"${ + model.private ? ", use_auth_token=True" : "" + }, from_hf_hub=True)`, + `model = AutoModel.from_pretrained("${model.id}"${ + model.private ? ", use_auth_token=True" : "" + }, from_hf_hub=True)`, + ].join("\n"), + ]; + } +}; + +const pyannote_audio_pipeline = (model: ModelData) => [ + `from pyannote.audio import Pipeline + +pipeline = Pipeline.from_pretrained("${model.id}") + +# inference on the whole file +pipeline("file.wav") + +# inference on an excerpt +from pyannote.core import Segment +excerpt = Segment(start=2.0, end=5.0) + +from pyannote.audio import Audio +waveform, sample_rate = Audio().crop("file.wav", excerpt) +pipeline({"waveform": waveform, "sample_rate": sample_rate})`, +]; + +const pyannote_audio_model = (model: ModelData) => [ + `from pyannote.audio import Model, Inference + +model = Model.from_pretrained("${model.id}") +inference = Inference(model) + +# inference on the whole file +inference("file.wav") + +# inference on an excerpt +from pyannote.core import Segment +excerpt = Segment(start=2.0, end=5.0) +inference.crop("file.wav", excerpt)`, +]; + +const pyannote_audio = (model: ModelData) => { + if (model.tags?.includes("pyannote-audio-pipeline")) { + return pyannote_audio_pipeline(model); + } + return pyannote_audio_model(model); +}; + +const tensorflowttsTextToMel = (model: ModelData) => [ + `from tensorflow_tts.inference import AutoProcessor, TFAutoModel + +processor = AutoProcessor.from_pretrained("${model.id}") +model = TFAutoModel.from_pretrained("${model.id}") +`, +]; + +const tensorflowttsMelToWav = (model: ModelData) => [ + `from tensorflow_tts.inference import TFAutoModel + +model = TFAutoModel.from_pretrained("${model.id}") +audios = model.inference(mels) +`, +]; + +const tensorflowttsUnknown = (model: ModelData) => [ + `from tensorflow_tts.inference import TFAutoModel + +model = TFAutoModel.from_pretrained("${model.id}") +`, +]; + +const tensorflowtts = (model: ModelData) => { + if (model.tags?.includes("text-to-mel")) { + return tensorflowttsTextToMel(model); + } else if (model.tags?.includes("mel-to-wav")) { + return tensorflowttsMelToWav(model); + } + return tensorflowttsUnknown(model); +}; + +const timm = (model: ModelData) => [ + `import timm + +model = timm.create_model("hf_hub:${model.id}", pretrained=True)`, +]; + +const skopsPickle = (model: ModelData, modelFile: string) => { + return [ + `import joblib +from skops.hub_utils import download +download("${model.id}", "path_to_folder") +model = joblib.load( + "${modelFile}" +) +# only load pickle files from sources you trust +# read more about it here https://skops.readthedocs.io/en/stable/persistence.html`, + ]; +}; + +const skopsFormat = (model: ModelData, modelFile: string) => { + return [ + `from skops.hub_utils import download +from skops.io import load +download("${model.id}", "path_to_folder") +# make sure model file is in skops format +# if model is a pickle file, make sure it's from a source you trust +model = load("path_to_folder/${modelFile}")`, + ]; +}; + +const skopsJobLib = (model: ModelData) => { + return [ + `from huggingface_hub import hf_hub_download +import joblib +model = joblib.load( + hf_hub_download("${model.id}", "sklearn_model.joblib") +) +# only load pickle files from sources you trust +# read more about it here https://skops.readthedocs.io/en/stable/persistence.html`, + ]; +}; + +const sklearn = (model: ModelData) => { + if (model.tags?.includes("skops")) { + const skopsmodelFile = model.config?.sklearn?.filename; + const skopssaveFormat = model.config?.sklearn?.model_format; + if (!skopsmodelFile) { + return [`# ⚠️ Model filename not specified in config.json`]; + } + if (skopssaveFormat === "pickle") { + return skopsPickle(model, skopsmodelFile); + } else { + return skopsFormat(model, skopsmodelFile); + } + } else { + return skopsJobLib(model); + } +}; + +const fastai = (model: ModelData) => [ + `from huggingface_hub import from_pretrained_fastai + +learn = from_pretrained_fastai("${model.id}")`, +]; + +const sampleFactory = (model: ModelData) => [ + `python -m sample_factory.huggingface.load_from_hub -r ${model.id} -d ./train_dir`, +]; + +const sentenceTransformers = (model: ModelData) => [ + `from sentence_transformers import SentenceTransformer + +model = SentenceTransformer("${model.id}")`, +]; + +const spacy = (model: ModelData) => [ + `!pip install https://huggingface.co/${model.id}/resolve/main/${nameWithoutNamespace(model.id)}-any-py3-none-any.whl + +# Using spacy.load(). +import spacy +nlp = spacy.load("${nameWithoutNamespace(model.id)}") + +# Importing as module. +import ${nameWithoutNamespace(model.id)} +nlp = ${nameWithoutNamespace(model.id)}.load()`, +]; + +const span_marker = (model: ModelData) => [ + `from span_marker import SpanMarkerModel + +model = SpanMarkerModel.from_pretrained("${model.id}")`, +]; + +const stanza = (model: ModelData) => [ + `import stanza + +stanza.download("${nameWithoutNamespace(model.id).replace("stanza-", "")}") +nlp = stanza.Pipeline("${nameWithoutNamespace(model.id).replace("stanza-", "")}")`, +]; + +const speechBrainMethod = (speechbrainInterface: string) => { + switch (speechbrainInterface) { + case "EncoderClassifier": + return "classify_file"; + case "EncoderDecoderASR": + case "EncoderASR": + return "transcribe_file"; + case "SpectralMaskEnhancement": + return "enhance_file"; + case "SepformerSeparation": + return "separate_file"; + default: + return undefined; + } +}; + +const speechbrain = (model: ModelData) => { + const speechbrainInterface = model.config?.speechbrain?.interface; + if (speechbrainInterface === undefined) { + return [`# interface not specified in config.json`]; + } + + const speechbrainMethod = speechBrainMethod(speechbrainInterface); + if (speechbrainMethod === undefined) { + return [`# interface in config.json invalid`]; + } + + return [ + `from speechbrain.pretrained import ${speechbrainInterface} +model = ${speechbrainInterface}.from_hparams( + "${model.id}" +) +model.${speechbrainMethod}("file.wav")`, + ]; +}; + +const transformers = (model: ModelData) => { + const info = model.transformersInfo; + if (!info) { + return [`# ⚠️ Type of model unknown`]; + } + const remote_code_snippet = info.custom_class ? ", trust_remote_code=True" : ""; + + let autoSnippet: string; + if (info.processor) { + const varName = + info.processor === "AutoTokenizer" + ? "tokenizer" + : info.processor === "AutoFeatureExtractor" + ? "extractor" + : "processor"; + autoSnippet = [ + "# Load model directly", + `from transformers import ${info.processor}, ${info.auto_model}`, + "", + `${varName} = ${info.processor}.from_pretrained("${model.id}"` + remote_code_snippet + ")", + `model = ${info.auto_model}.from_pretrained("${model.id}"` + remote_code_snippet + ")", + ].join("\n"); + } else { + autoSnippet = [ + "# Load model directly", + `from transformers import ${info.auto_model}`, + `model = ${info.auto_model}.from_pretrained("${model.id}"` + remote_code_snippet + ")", + ].join("\n"); + } + + if (model.pipeline_tag) { + const pipelineSnippet = [ + "# Use a pipeline as a high-level helper", + "from transformers import pipeline", + "", + `pipe = pipeline("${model.pipeline_tag}", model="${model.id}"` + remote_code_snippet + ")", + ].join("\n"); + return [pipelineSnippet, autoSnippet]; + } + return [autoSnippet]; +}; + +const transformersJS = (model: ModelData) => { + if (!model.pipeline_tag) { + return [`// ⚠️ Unknown pipeline tag`]; + } + + const libName = "@xenova/transformers"; + + return [ + `// npm i ${libName} +import { pipeline } from '${libName}'; + +// Allocate pipeline +const pipe = await pipeline('${model.pipeline_tag}', '${model.id}');`, + ]; +}; + +const peftTask = (peftTaskType?: string) => { + switch (peftTaskType) { + case "CAUSAL_LM": + return "CausalLM"; + case "SEQ_2_SEQ_LM": + return "Seq2SeqLM"; + case "TOKEN_CLS": + return "TokenClassification"; + case "SEQ_CLS": + return "SequenceClassification"; + default: + return undefined; + } +}; + +const peft = (model: ModelData) => { + const { base_model_name: peftBaseModel, task_type: peftTaskType } = model.config?.peft ?? {}; + const pefttask = peftTask(peftTaskType); + if (!pefttask) { + return [`Task type is invalid.`]; + } + if (!peftBaseModel) { + return [`Base model is not found.`]; + } + + return [ + `from peft import PeftModel, PeftConfig +from transformers import AutoModelFor${pefttask} + +config = PeftConfig.from_pretrained("${model.id}") +model = AutoModelFor${pefttask}.from_pretrained("${peftBaseModel}") +model = PeftModel.from_pretrained(model, "${model.id}")`, + ]; +}; + +const fasttext = (model: ModelData) => [ + `from huggingface_hub import hf_hub_download +import fasttext + +model = fasttext.load_model(hf_hub_download("${model.id}", "model.bin"))`, +]; + +const stableBaselines3 = (model: ModelData) => [ + `from huggingface_sb3 import load_from_hub +checkpoint = load_from_hub( + repo_id="${model.id}", + filename="{MODEL FILENAME}.zip", +)`, +]; + +const nemoDomainResolver = (domain: string, model: ModelData): string[] | undefined => { + switch (domain) { + case "ASR": + return [ + `import nemo.collections.asr as nemo_asr +asr_model = nemo_asr.models.ASRModel.from_pretrained("${model.id}") + +transcriptions = asr_model.transcribe(["file.wav"])`, + ]; + default: + return undefined; + } +}; + +const mlAgents = (model: ModelData) => [`mlagents-load-from-hf --repo-id="${model.id}" --local-dir="./downloads"`]; + +const nemo = (model: ModelData) => { + let command: string[] | undefined = undefined; + // Resolve the tag to a nemo domain/sub-domain + if (model.tags?.includes("automatic-speech-recognition")) { + command = nemoDomainResolver("ASR", model); + } + + return command ?? [`# tag did not correspond to a valid NeMo domain.`]; +}; + +const pythae = (model: ModelData) => [ + `from pythae.models import AutoModel + +model = AutoModel.load_from_hf_hub("${model.id}")`, +]; + +//#endregion + +export const MODEL_LIBRARIES_UI_ELEMENTS: Partial> = { + "adapter-transformers": { + btnLabel: "Adapter Transformers", + repoName: "adapter-transformers", + repoUrl: "https://github.com/Adapter-Hub/adapter-transformers", + docsUrl: "https://huggingface.co/docs/hub/adapter-transformers", + snippets: adapter_transformers, + }, + allennlp: { + btnLabel: "AllenNLP", + repoName: "AllenNLP", + repoUrl: "https://github.com/allenai/allennlp", + docsUrl: "https://huggingface.co/docs/hub/allennlp", + snippets: allennlp, + }, + asteroid: { + btnLabel: "Asteroid", + repoName: "Asteroid", + repoUrl: "https://github.com/asteroid-team/asteroid", + docsUrl: "https://huggingface.co/docs/hub/asteroid", + snippets: asteroid, + }, + bertopic: { + btnLabel: "BERTopic", + repoName: "BERTopic", + repoUrl: "https://github.com/MaartenGr/BERTopic", + snippets: bertopic, + }, + diffusers: { + btnLabel: "Diffusers", + repoName: "🤗/diffusers", + repoUrl: "https://github.com/huggingface/diffusers", + docsUrl: "https://huggingface.co/docs/hub/diffusers", + snippets: diffusers, + }, + espnet: { + btnLabel: "ESPnet", + repoName: "ESPnet", + repoUrl: "https://github.com/espnet/espnet", + docsUrl: "https://huggingface.co/docs/hub/espnet", + snippets: espnet, + }, + fairseq: { + btnLabel: "Fairseq", + repoName: "fairseq", + repoUrl: "https://github.com/pytorch/fairseq", + snippets: fairseq, + }, + flair: { + btnLabel: "Flair", + repoName: "Flair", + repoUrl: "https://github.com/flairNLP/flair", + docsUrl: "https://huggingface.co/docs/hub/flair", + snippets: flair, + }, + keras: { + btnLabel: "Keras", + repoName: "Keras", + repoUrl: "https://github.com/keras-team/keras", + docsUrl: "https://huggingface.co/docs/hub/keras", + snippets: keras, + }, + nemo: { + btnLabel: "NeMo", + repoName: "NeMo", + repoUrl: "https://github.com/NVIDIA/NeMo", + snippets: nemo, + }, + open_clip: { + btnLabel: "OpenCLIP", + repoName: "OpenCLIP", + repoUrl: "https://github.com/mlfoundations/open_clip", + snippets: open_clip, + }, + paddlenlp: { + btnLabel: "paddlenlp", + repoName: "PaddleNLP", + repoUrl: "https://github.com/PaddlePaddle/PaddleNLP", + docsUrl: "https://huggingface.co/docs/hub/paddlenlp", + snippets: paddlenlp, + }, + peft: { + btnLabel: "PEFT", + repoName: "PEFT", + repoUrl: "https://github.com/huggingface/peft", + snippets: peft, + }, + "pyannote-audio": { + btnLabel: "pyannote.audio", + repoName: "pyannote-audio", + repoUrl: "https://github.com/pyannote/pyannote-audio", + snippets: pyannote_audio, + }, + "sentence-transformers": { + btnLabel: "sentence-transformers", + repoName: "sentence-transformers", + repoUrl: "https://github.com/UKPLab/sentence-transformers", + docsUrl: "https://huggingface.co/docs/hub/sentence-transformers", + snippets: sentenceTransformers, + }, + sklearn: { + btnLabel: "Scikit-learn", + repoName: "Scikit-learn", + repoUrl: "https://github.com/scikit-learn/scikit-learn", + snippets: sklearn, + }, + fastai: { + btnLabel: "fastai", + repoName: "fastai", + repoUrl: "https://github.com/fastai/fastai", + docsUrl: "https://huggingface.co/docs/hub/fastai", + snippets: fastai, + }, + spacy: { + btnLabel: "spaCy", + repoName: "spaCy", + repoUrl: "https://github.com/explosion/spaCy", + docsUrl: "https://huggingface.co/docs/hub/spacy", + snippets: spacy, + }, + "span-marker": { + btnLabel: "SpanMarker", + repoName: "SpanMarkerNER", + repoUrl: "https://github.com/tomaarsen/SpanMarkerNER", + docsUrl: "https://huggingface.co/docs/hub/span_marker", + snippets: span_marker, + }, + speechbrain: { + btnLabel: "speechbrain", + repoName: "speechbrain", + repoUrl: "https://github.com/speechbrain/speechbrain", + docsUrl: "https://huggingface.co/docs/hub/speechbrain", + snippets: speechbrain, + }, + stanza: { + btnLabel: "Stanza", + repoName: "stanza", + repoUrl: "https://github.com/stanfordnlp/stanza", + docsUrl: "https://huggingface.co/docs/hub/stanza", + snippets: stanza, + }, + tensorflowtts: { + btnLabel: "TensorFlowTTS", + repoName: "TensorFlowTTS", + repoUrl: "https://github.com/TensorSpeech/TensorFlowTTS", + snippets: tensorflowtts, + }, + timm: { + btnLabel: "timm", + repoName: "pytorch-image-models", + repoUrl: "https://github.com/rwightman/pytorch-image-models", + docsUrl: "https://huggingface.co/docs/hub/timm", + snippets: timm, + }, + transformers: { + btnLabel: "Transformers", + repoName: "🤗/transformers", + repoUrl: "https://github.com/huggingface/transformers", + docsUrl: "https://huggingface.co/docs/hub/transformers", + snippets: transformers, + }, + "transformers.js": { + btnLabel: "Transformers.js", + repoName: "transformers.js", + repoUrl: "https://github.com/xenova/transformers.js", + docsUrl: "https://huggingface.co/docs/hub/transformers-js", + snippets: transformersJS, + }, + fasttext: { + btnLabel: "fastText", + repoName: "fastText", + repoUrl: "https://fasttext.cc/", + snippets: fasttext, + }, + "sample-factory": { + btnLabel: "sample-factory", + repoName: "sample-factory", + repoUrl: "https://github.com/alex-petrenko/sample-factory", + docsUrl: "https://huggingface.co/docs/hub/sample-factory", + snippets: sampleFactory, + }, + "stable-baselines3": { + btnLabel: "stable-baselines3", + repoName: "stable-baselines3", + repoUrl: "https://github.com/huggingface/huggingface_sb3", + docsUrl: "https://huggingface.co/docs/hub/stable-baselines3", + snippets: stableBaselines3, + }, + "ml-agents": { + btnLabel: "ml-agents", + repoName: "ml-agents", + repoUrl: "https://github.com/huggingface/ml-agents", + docsUrl: "https://huggingface.co/docs/hub/ml-agents", + snippets: mlAgents, + }, + pythae: { + btnLabel: "pythae", + repoName: "pythae", + repoUrl: "https://github.com/clementchadebec/benchmark_VAE", + snippets: pythae, + }, +} as const; diff --git a/packages/widgets/src/lib/interfaces/LibrariesToTasks.ts b/packages/widgets/src/lib/interfaces/LibrariesToTasks.ts new file mode 100644 index 000000000..780323f9f --- /dev/null +++ b/packages/widgets/src/lib/interfaces/LibrariesToTasks.ts @@ -0,0 +1,46 @@ +import type { ModelLibraryKey, PipelineType } from "@huggingface/tasks"; + +/** + * Mapping from library name (excluding Transformers) to its supported tasks. + * Inference API should be disabled for all other (library, task) pairs beyond this mapping. + * As an exception, we assume Transformers supports all inference tasks. + * This mapping is generated automatically by "python-api-export-tasks" action in huggingface/api-inference-community repo upon merge. + * Ref: https://github.com/huggingface/api-inference-community/pull/158 + */ +export const LIBRARY_TASK_MAPPING_EXCLUDING_TRANSFORMERS: Partial> = { + "adapter-transformers": ["question-answering", "text-classification", "token-classification"], + allennlp: ["question-answering"], + asteroid: [ + // "audio-source-separation", + "audio-to-audio", + ], + bertopic: ["text-classification"], + diffusers: ["image-to-image", "text-to-image"], + doctr: ["object-detection"], + espnet: ["text-to-speech", "automatic-speech-recognition"], + fairseq: ["text-to-speech", "audio-to-audio"], + fastai: ["image-classification"], + fasttext: ["feature-extraction", "text-classification"], + flair: ["token-classification"], + k2: ["automatic-speech-recognition"], + keras: ["image-classification"], + nemo: ["automatic-speech-recognition"], + open_clip: ["zero-shot-classification", "zero-shot-image-classification"], + paddlenlp: ["conversational", "fill-mask", "summarization", "zero-shot-classification"], + peft: ["text-generation"], + "pyannote-audio": ["automatic-speech-recognition"], + "sentence-transformers": ["feature-extraction", "sentence-similarity"], + sklearn: ["tabular-classification", "tabular-regression", "text-classification"], + spacy: ["token-classification", "text-classification", "sentence-similarity"], + "span-marker": ["token-classification"], + speechbrain: [ + "audio-classification", + "audio-to-audio", + "automatic-speech-recognition", + "text-to-speech", + "text2text-generation", + ], + stanza: ["token-classification"], + timm: ["image-classification"], + mindspore: ["image-classification"], +}; diff --git a/packages/widgets/src/lib/interfaces/README.md b/packages/widgets/src/lib/interfaces/README.md new file mode 100644 index 000000000..d2de77460 --- /dev/null +++ b/packages/widgets/src/lib/interfaces/README.md @@ -0,0 +1,13 @@ +# Interfaces + +This folder contains the definition files (written in Typescript) for the huggingface.co hub's: + +- **pipeline types** a.k.a. **task types** (used to determine which widget to display on the model page, and which inference API to run) +- **default widget inputs** (when they aren't provided in the model card) +- definitions and UI elements for **third party libraries**. + +Please add to any of those definitions by opening a PR. Thanks 🔥 + +⚠️ The hub's definitive doc is at https://huggingface.co/docs/hub. + +## Feedback (feature requests, bugs, etc.) is super welcome 💙💚💛💜♥️🧡 diff --git a/packages/widgets/src/lib/interfaces/Types.ts b/packages/widgets/src/lib/interfaces/Types.ts new file mode 100644 index 000000000..7c9ef752f --- /dev/null +++ b/packages/widgets/src/lib/interfaces/Types.ts @@ -0,0 +1,111 @@ +import type { PipelineType } from "@huggingface/tasks"; +import type { WidgetExample } from "../components/InferenceWidget/shared/WidgetExample.js"; +import type { InferenceDisplayability } from "./InferenceDisplayability.js"; + +/** + * Public interface for model metadata + */ +export interface ModelData { + /** + * id of model (e.g. 'user/repo_name') + */ + id: string; + /** + * Kept for backward compatibility + */ + modelId?: string; + /** + * Whether or not to enable inference widget for this model + */ + inference: InferenceDisplayability; + /** + * is this model private? + */ + private?: boolean; + /** + * this dictionary has useful information about the model configuration + */ + config?: Record & { + adapter_transformers?: { model_class?: string; model_name?: string }; + architectures?: string[]; + sklearn?: { + filename?: string; + model_format?: string; + }; + speechbrain?: { + interface?: string; + }; + peft?: { + base_model_name?: string; + task_type?: string; + }; + }; + /** + * all the model tags + */ + tags?: string[]; + /** + * transformers-specific info to display in the code sample. + */ + transformersInfo?: TransformersInfo; + /** + * Pipeline type + */ + pipeline_tag?: PipelineType | undefined; + /** + * for relevant models, get mask token + */ + mask_token?: string | undefined; + /** + * Example data that will be fed into the widget. + * + * can be set in the model card metadata (under `widget`), + * or by default in `DefaultWidget.ts` + */ + widgetData?: WidgetExample[] | undefined; + /** + * Parameters that will be used by the widget when calling Inference API + * https://huggingface.co/docs/api-inference/detailed_parameters + * + * can be set in the model card metadata (under `inference/parameters`) + * Example: + * inference: + * parameters: + * key: val + */ + cardData?: { + inference?: + | boolean + | { + parameters?: Record; + }; + base_model?: string; + }; + /** + * Library name + * Example: transformers, SpeechBrain, Stanza, etc. + */ + library_name?: string; +} + +/** + * transformers-specific info to display in the code sample. + */ +export interface TransformersInfo { + /** + * e.g. AutoModelForSequenceClassification + */ + auto_model: string; + /** + * if set in config.json's auto_map + */ + custom_class?: string; + /** + * e.g. text-classification + */ + pipeline_tag?: PipelineType; + /** + * e.g. "AutoTokenizer" | "AutoFeatureExtractor" | "AutoProcessor" + */ + processor?: string; +} diff --git a/packages/widgets/src/lib/utils/ViewUtils.ts b/packages/widgets/src/lib/utils/ViewUtils.ts new file mode 100644 index 000000000..86cdd0df1 --- /dev/null +++ b/packages/widgets/src/lib/utils/ViewUtils.ts @@ -0,0 +1,138 @@ +import type { PipelineType } from "@huggingface/tasks"; + +const ESCAPED = { + '"': """, + "'": "'", + "&": "&", + "<": "<", + ">": ">", +}; + +/** + * Returns a function that clamps input value to range [min <= x <= max]. + */ +export function clamp(x: number, min: number, max: number): number { + return Math.max(min, Math.min(x, max)); +} + +/** + * Similar to lodash's uniqBy. In case of multiple items with the same key, + * only the first one is kept. + */ +export function uniqBy(items: T[], itemToKey: (item: T) => K): T[] { + const keys = new Set(items.map((item) => itemToKey(item))); + + return items.filter((item) => { + // Will return true if was in set - e.g. was the first item with its key. + return keys.delete(itemToKey(item)); + }); +} + +export function typedKeys(obj: { [k in K]: V }): K[] { + return Object.keys(obj) as K[]; +} + +/** + * HTML escapes the passed string + */ +export function escape(html: unknown): string { + return String(html).replace(/["'&<>]/g, (match) => ESCAPED[match as keyof typeof ESCAPED]); +} + +/** + * Returns a promise that will resolve after the specified time + * @param ms Number of ms to wait + */ +export function delay(ms: number): Promise { + return new Promise((resolve) => { + setTimeout(() => resolve(), ms); + }); +} + +/** + * "Real" modulo (always >= 0), not remainder. + */ +export function mod(a: number, n: number): number { + return ((a % n) + n) % n; +} + +/** + * Sum of elements in array + */ +export function sum(arr: number[]): number { + return arr.reduce((a, b) => a + b, 0); +} + +/** + * Return a random item from an array + */ +export function randomItem(arr: T[]): T { + return arr[Math.floor(Math.random() * arr.length)]; +} + +/** + * Safely parse JSON + */ +export function parseJSON(x: unknown): T | undefined { + if (!x || typeof x !== "string") { + return undefined; + } + try { + return JSON.parse(x); + } catch (e) { + if (e instanceof SyntaxError) { + console.error(e.name); + } else if (e instanceof Error) { + console.error(e.message); + } else { + console.error(e); + } + return undefined; + } +} + +/** + * Return true if an HTML element is scrolled all the way + */ +export function isFullyScrolled(elt: HTMLElement): boolean { + return elt.scrollHeight - Math.abs(elt.scrollTop) === elt.clientHeight; +} + +/** + * Smoothly scroll an element all the way + */ +export function scrollToMax(elt: HTMLElement, axis: "x" | "y" = "y"): void { + elt.scroll({ + behavior: "smooth", + left: axis === "x" ? elt.scrollWidth : undefined, + top: axis === "y" ? elt.scrollHeight : undefined, + }); +} + +/** + * Converts hex string to rgb array (i.e. [r,g,b]) + * original from https://stackoverflow.com/a/39077686/6558628 + */ +export function hexToRgb(hex: string): number[] { + return ( + hex + .replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (_, r, g, b) => "#" + r + r + g + g + b + b) + .substring(1) + .match(/.{2}/g) + ?.map((x) => parseInt(x, 16)) || [0, 0, 0] + ); +} + +// Get the Task id corresponding to the modelPipeline (should be === in 99% cases) +export function getPipelineTask(modelPipeline: PipelineType): PipelineType { + return modelPipeline === "text2text-generation" ? "text-generation" : modelPipeline; +} + +/** +* For Tailwind: +bg-blue-100 border-blue-100 dark:bg-blue-800 dark:border-blue-800 +bg-green-100 border-green-100 dark:bg-green-800 dark:border-green-800 +bg-yellow-100 border-yellow-100 dark:bg-yellow-800 dark:border-yellow-800 +bg-purple-100 border-purple-100 dark:bg-purple-800 dark:border-purple-800 +bg-red-100 border-red-100 dark:bg-red-800 dark:border-red-800 +*/ diff --git a/packages/widgets/src/routes/+layout.svelte b/packages/widgets/src/routes/+layout.svelte new file mode 100644 index 000000000..fd328954f --- /dev/null +++ b/packages/widgets/src/routes/+layout.svelte @@ -0,0 +1,7 @@ + + +
+ +
diff --git a/packages/widgets/src/routes/+page.svelte b/packages/widgets/src/routes/+page.svelte new file mode 100644 index 000000000..ad261bedd --- /dev/null +++ b/packages/widgets/src/routes/+page.svelte @@ -0,0 +1,581 @@ + + +
+ + + + +
+

Showcase of all types of inference widgets running

+
+ {#each models as model} + + {/each} +
+
+ +
+

Showcase of all types of disabled inference

+
+ {#each modelsDisabled as model} + + {/each} +
+
+ +
+

Showcase of all types of disabled inference with example outputs

+
+ {#each modelsDisabledWithExamples as model} + + {/each} +
+
+
diff --git a/packages/widgets/src/routes/[...model]/+page.svelte b/packages/widgets/src/routes/[...model]/+page.svelte new file mode 100644 index 000000000..c63519c95 --- /dev/null +++ b/packages/widgets/src/routes/[...model]/+page.svelte @@ -0,0 +1,28 @@ + + +← Back to index + + +
+ {#if data.model} + + +
+			{JSON.stringify(data.model, null, 2)}
+		
+ {:else} +
Error. Probably non existent model. {data.message}
+ {/if} +
diff --git a/packages/widgets/src/routes/[...model]/+page.ts b/packages/widgets/src/routes/[...model]/+page.ts new file mode 100644 index 000000000..ac2edfd7d --- /dev/null +++ b/packages/widgets/src/routes/[...model]/+page.ts @@ -0,0 +1,17 @@ +import type { WidgetProps } from "$lib/components/InferenceWidget/shared/types.js"; +import type { Load } from "@sveltejs/kit"; + +export const load: Load = async ({ params, fetch }): Promise<{ model?: WidgetProps["model"]; message?: string }> => { + const url = `https://huggingface.co/api/models/${params.model}`; + try { + const model = await (await fetch(url)).json(); + return { + model, + }; + } catch { + // todo: throw error() instead + return { + message: `Model ${params.model} not found (probably)`, + }; + } +}; diff --git a/packages/widgets/src/tailwind.css b/packages/widgets/src/tailwind.css new file mode 100644 index 000000000..8f335baed --- /dev/null +++ b/packages/widgets/src/tailwind.css @@ -0,0 +1,226 @@ +@tailwind base; + +@layer base { + html.dark { + --scrollbarBG: #020011; + --thumbBG: #374151; + } + .dark *::-webkit-scrollbar { + width: 11px; + height: 11px; + } + .dark * { + scrollbar-width: thin; + scrollbar-color: var(--thumbBG) var(--scrollbarBG); + } + + .dark input, + .dark textarea, + .dark [contenteditable] { + caret-color: white !important; + } + + .dark *::-webkit-scrollbar-track { + background: var(--scrollbarBG); + } + .dark *::-webkit-scrollbar-thumb { + background-color: var(--thumbBG); + border-radius: 6px; + border: 3px solid var(--scrollbarBG); + } + /* .dark input:-internal-autofill-selected { + @apply bg-gray-925; + } */ + .dark .bg-white { + @apply bg-gray-950; + } + .dark .text-black { + @apply text-gray-200; + } + .dark .text-gray-900 { + @apply text-gray-200; + } + .dark .text-gray-800 { + @apply text-gray-300; + } + .dark .text-gray-700 { + @apply text-gray-300; + } + .dark .text-gray-600 { + @apply text-gray-350; + } + .dark .text-gray-500 { + @apply text-gray-400; + } + .dark .border-gray-200, + .dark .border-gray-100, + .dark .border, + .dark .border-b { + @apply border-gray-850; + } +} + +@tailwind components; + +@layer components { + .btn, + .btn-widget { + @apply inline-flex cursor-pointer select-none items-center justify-center whitespace-nowrap rounded-lg border bg-gradient-to-b px-3 py-1 focus:outline-none focus:ring; + } + .btn { + @apply border-gray-200 from-white to-gray-100 text-gray-800 hover:shadow-inner dark:border-gray-900 dark:from-gray-800 dark:to-gray-950 dark:text-gray-200 dark:hover:from-gray-700; + } + .btn-widget { + @apply h-8 from-gray-50 to-gray-200 hover:from-gray-100 dark:border-gray-900 dark:from-gray-800 dark:to-gray-950 dark:hover:from-gray-700; + } + .btn:disabled, + .btn-widget:disabled { + @apply cursor-not-allowed opacity-50; + } + .btn.btn-lg { + @apply px-4 py-1.5 font-semibold; + } + .overview-card-wrapper { + @apply from-gray-50-to-white rounded-lg border border-gray-100 bg-gradient-to-r via-white text-base shadow-sm hover:via-gray-50 hover:to-gray-100 dark:border-gray-900 dark:via-gray-950 dark:hover:from-gray-950 dark:hover:via-gray-925 dark:hover:to-gray-925; + } + .overview-card-wrapper.white { + @apply from-white to-white dark:from-gray-925 dark:to-gray-950; + } + .tab { + @apply -mb-px flex cursor-pointer select-none items-center border-r border-gray-200 px-4 text-center; + } + .tab:not(.active) { + @apply hover:text-gray-700; + } + .tab.active { + @apply flex items-center border-r border-gray-200 bg-white px-4 text-center font-semibold; + } + .tab-alternate { + @apply flex h-full items-center whitespace-nowrap border-b-2 border-transparent px-2.5 font-medium text-gray-600 dark:text-gray-400 sm:px-3.5; + } + .tab-alternate:not(.active) { + @apply hover:border-gray-200 dark:hover:border-gray-800; + } + .tab-alternate.active { + @apply border-gray-700 font-semibold text-gray-800 dark:border-gray-400; + } + .tag { + @apply mr-1 mb-1 inline-flex h-7 max-w-full flex-none items-center overflow-hidden truncate rounded-lg border border-transparent bg-gradient-to-b text-sm dark:border-gray-900 md:mr-1.5 md:mb-1.5; + } + .tag > span { + @apply px-2; + } + .tag.inactive { + @apply filter-grayscale opacity-50; + } + .tag-blue { + @apply from-blue-50 to-blue-50 text-blue-800 hover:to-blue-100 dark:from-gray-925 dark:to-gray-925 dark:text-gray-300 dark:hover:to-gray-950; + } + .tag-ghost { + @apply from-transparent to-transparent text-gray-400 hover:from-gray-100 hover:to-gray-100 hover:text-gray-600; + } + .tag-green { + @apply from-green-50 to-green-50 text-green-800 hover:to-green-100 dark:from-gray-925 dark:to-gray-925 dark:text-gray-300 dark:hover:to-gray-950; + } + .tag-indigo { + @apply from-indigo-50 to-indigo-50 text-indigo-800 hover:to-indigo-100 dark:from-gray-925 dark:to-gray-925 dark:text-gray-300 dark:hover:to-gray-950; + } + .tag-orange { + @apply from-orange-50 to-orange-50 text-orange-800 hover:to-orange-100 dark:from-gray-925 dark:to-gray-925 dark:text-gray-300 dark:hover:to-gray-950; + } + .tag-purple { + @apply from-purple-50 to-purple-50 text-purple-800 hover:to-purple-100 dark:from-gray-925 dark:to-gray-925 dark:text-gray-300 dark:hover:to-gray-950; + } + .tag-red { + @apply from-red-50 to-red-50 text-red-800 hover:to-red-100 dark:from-gray-925 dark:to-gray-925 dark:text-gray-300 dark:hover:to-gray-950; + } + .tag-yellow { + @apply from-yellow-50 text-yellow-800 hover:to-yellow-100 dark:from-gray-925 dark:to-gray-925 dark:text-gray-300 dark:hover:to-gray-950; + } + .tag-white { + @apply border-gray-100 from-white to-white text-gray-700 hover:to-gray-100 dark:border-gray-900 dark:from-gray-925 dark:to-gray-925 dark:text-gray-300 dark:hover:to-gray-950; + } + .tag-ico { + @apply flex h-7 w-8 flex-none items-center bg-gradient-to-t to-white pl-2 dark:to-gray-950; + } + .tag-ico-blue { + @apply from-blue-50 text-blue-500 dark:from-gray-925; + } + .tag-ico-green { + @apply from-green-50 text-green-500 dark:from-gray-925; + } + .tag-ico-indigo { + @apply from-indigo-50 text-indigo-500 dark:from-gray-925; + } + .tag-ico-orange { + @apply from-orange-50 text-orange-500 dark:from-gray-925; + } + .tag-ico-purple { + @apply from-purple-50 text-purple-500 dark:from-gray-925; + } + .tag-ico-red { + @apply from-red-50 text-red-500 dark:from-gray-925; + } + .tag-ico-yellow { + @apply from-yellow-50 text-yellow-500 dark:from-gray-925; + } + .form-input:not([type="checkbox"]) { + @apply border-2 border-gray-200 shadow-sm + focus:border-blue-300 focus:ring focus:ring-blue-200 + focus:ring-opacity-50 dark:border-gray-700 dark:bg-gray-950; + } + .form-input:not([type="radio"]):not([type="checkbox"]) { + @apply mt-1 block w-full rounded-md; + } + .form-input[type="radio"] { + @apply mt-2 mr-1.5 h-3.5 w-3.5; + } + .form-input[type="checkbox"] { + @apply rounded border-transparent bg-gray-200 text-blue-500 focus:border-transparent focus:ring-1 focus:ring-gray-200 focus:ring-offset-2; + } + .form-input[type="checkbox"]:checked { + @apply bg-blue-500; + } + .form-input:disabled { + @apply cursor-not-allowed opacity-50; + } + .form-input-alt { + @apply h-10 rounded-lg border border-gray-200 px-3 placeholder-gray-400 shadow-inner outline-none focus:shadow-inner focus:ring-1 focus:ring-inset focus:ring-indigo-200 dark:bg-gray-925 dark:focus:ring-indigo-50; + } +} + +@tailwind utilities; + +@layer utilities { + .filter-none { + filter: none; + } + .filter-grayscale { + filter: grayscale(100%); + } + .from-gray-50-to-white { + @apply from-gray-50 to-white dark:from-gray-925 dark:to-gray-950; + } + + .from-gray-100-to-white { + @apply from-gray-100 to-white dark:from-gray-925 dark:to-gray-925; + } + .min-h-main { + min-height: calc(100vh - theme(spacing.16) - 1px); + } +} +.alert { + @apply rounded-md border border-blue-100 bg-blue-50 py-2 px-3 text-blue-900 dark:border-blue-700 dark:bg-blue-800 dark:text-blue-200; +} +.alert a { + @apply underline; +} +.alert-error { + @apply border-red-100 bg-red-50 text-red-900 dark:border-red-700 dark:bg-red-800 dark:text-red-200; +} +.alert-success { + @apply border-green-100 bg-green-50 text-green-900; +} +.alert-warning { + @apply border-yellow-100 bg-yellow-50 text-yellow-900; +} diff --git a/packages/widgets/static/audioProcessor.js b/packages/widgets/static/audioProcessor.js new file mode 100644 index 000000000..f1cde75a5 --- /dev/null +++ b/packages/widgets/static/audioProcessor.js @@ -0,0 +1,39 @@ +// for js/src/lib/components/InferenceWidget/shared/WidgetRealtimeRecorder/Recorder.ts +class AudioDataExtractor extends AudioWorkletProcessor { + _updateIntervalInMS; + _sampleInFrames; + _index; + _buffer; + + constructor() { + super(); + this._updateIntervalInMS = 50; + this._sampleInFrames = parseInt((this._updateIntervalInMS / 1000.0) * sampleRate); + this._index = 0; + this._buffer = new Float32Array(this._sampleInFrames); + } + + process(inputs, outputs, parameters) { + // Note that the input will be down-mixed to mono; however, if no inputs are + // connected then zero channels will be passed in. + if (inputs.length > 0 && inputs[0].length > 0) { + const rest = this._buffer.length - this._index; + if (rest < inputs[0][0].length) { + this._buffer.set(inputs[0][0].slice(0, rest), this._index); + this.port.postMessage({ + buffer: this._buffer.slice(0), + sampling_rate: sampleRate, + }); + this._buffer.fill(0); + this._index = inputs[0][0].length - rest; + } else { + this._buffer.set(inputs[0][0], this._index); + this._index += inputs[0][0].length; + } + } + + return true; + } +} + +registerProcessor("AudioDataExtractor", AudioDataExtractor); diff --git a/packages/widgets/static/cats.jpg b/packages/widgets/static/cats.jpg new file mode 100644 index 000000000..e131e8ecd Binary files /dev/null and b/packages/widgets/static/cats.jpg differ diff --git a/packages/widgets/static/favicon.png b/packages/widgets/static/favicon.png new file mode 100644 index 000000000..825b9e65a Binary files /dev/null and b/packages/widgets/static/favicon.png differ diff --git a/packages/widgets/svelte.config.js b/packages/widgets/svelte.config.js new file mode 100644 index 000000000..456afa84b --- /dev/null +++ b/packages/widgets/svelte.config.js @@ -0,0 +1,18 @@ +import adapter from "@sveltejs/adapter-auto"; +import { vitePreprocess } from "@sveltejs/kit/vite"; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess(), + + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter(), + }, +}; + +export default config; diff --git a/packages/widgets/tailwind.config.cjs b/packages/widgets/tailwind.config.cjs new file mode 100644 index 000000000..6853e61fa --- /dev/null +++ b/packages/widgets/tailwind.config.cjs @@ -0,0 +1,43 @@ +// eslint-disable-next-line @typescript-eslint/no-var-requires +const defaultTheme = require("tailwindcss/defaultTheme"); +// eslint-disable-next-line @typescript-eslint/no-var-requires +const colors = require("tailwindcss/colors"); + +module.exports = { + content: ["./src/**/*.{html,js,svelte,ts}"], + darkMode: "class", + theme: { + container: { + center: true, + padding: { DEFAULT: "1rem" }, + }, + extend: { + colors: { + green: colors.emerald, + yellow: colors.amber, + purple: colors.violet, + gray: { + 350: "#b3bcc9", + // Dark blue + // 925: '#131f3d', + // 950: '#0a1226', + // Darker + 850: "#141c2e", + 925: "#101623", + 950: "#0b0f19", + // Darkest + // 925: '#081122', + // 950: '#000511', + }, + }, + gridTemplateRows: { + full: "100%", + }, + fontFamily: { + sans: ["Source Sans Pro", ...defaultTheme.fontFamily.sans], + mono: ["IBM Plex Mono", ...defaultTheme.fontFamily.mono], + }, + }, + }, + plugins: [require("@tailwindcss/forms")], +}; diff --git a/packages/widgets/tsconfig.json b/packages/widgets/tsconfig.json new file mode 100644 index 000000000..6f788f160 --- /dev/null +++ b/packages/widgets/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "module": "NodeNext", + "moduleResolution": "NodeNext" + } +} diff --git a/packages/widgets/vite.config.ts b/packages/widgets/vite.config.ts new file mode 100644 index 000000000..6b9eb5d39 --- /dev/null +++ b/packages/widgets/vite.config.ts @@ -0,0 +1,6 @@ +import { sveltekit } from "@sveltejs/kit/vite"; +import { defineConfig } from "vite"; + +export default defineConfig({ + plugins: [sveltekit()], +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b73cbe566..c4935b405 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,29 +1,39 @@ lockfileVersion: '6.0' +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + dependencies: '@typescript-eslint/eslint-plugin': specifier: ^5.51.0 - version: 5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.35.0)(typescript@4.9.5) + version: 5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.35.0)(typescript@5.0.2) '@typescript-eslint/parser': specifier: ^5.51.0 - version: 5.54.0(eslint@8.35.0)(typescript@4.9.5) + version: 5.54.0(eslint@8.35.0)(typescript@5.0.2) eslint: specifier: ^8.35.0 version: 8.35.0 eslint-config-prettier: - specifier: ^8.6.0 - version: 8.6.0(eslint@8.35.0) + specifier: ^9.0.0 + version: 9.0.0(eslint@8.35.0) eslint-plugin-prettier: specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.35.0)(prettier@2.8.4) + version: 4.2.1(eslint-config-prettier@9.0.0)(eslint@8.35.0)(prettier@3.0.0) + eslint-plugin-svelte: + specifier: ^2.30.0 + version: 2.30.0(eslint@8.35.0)(svelte@4.2.5)(ts-node@10.9.1) prettier: - specifier: ^2.8.4 - version: 2.8.4 + specifier: ^3.0.0 + version: 3.0.0 + prettier-plugin-svelte: + specifier: ^3.0.0 + version: 3.1.0(prettier@3.0.0)(svelte@4.2.5) typescript: - specifier: ^4.9.5 - version: 4.9.5 + specifier: ^5.0.0 + version: 5.0.2 vite: - specifier: ^4.1.4 + specifier: 4.1.4 version: 4.1.4(@types/node@18.14.6) devDependencies: @@ -35,19 +45,27 @@ devDependencies: version: 7.5.0 ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@18.14.6)(typescript@4.9.5) + version: 10.9.1(@types/node@18.14.6)(typescript@5.0.2) tsup: specifier: ^6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) + version: 6.7.0(postcss@8.4.31)(ts-node@10.9.1)(typescript@5.0.2) vitest: specifier: ^0.29.4 version: 0.29.7(@vitest/browser@0.29.7)(webdriverio@8.6.7) webdriverio: specifier: ^8.6.7 - version: 8.6.7(typescript@4.9.5) + version: 8.6.7(typescript@5.0.2) packages: + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.18 + dev: false + /@babel/code-frame@7.18.6: resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} engines: {node: '>=6.9.0'} @@ -74,7 +92,6 @@ packages: engines: {node: '>=12'} dependencies: '@jridgewell/trace-mapping': 0.3.9 - dev: true /@esbuild/android-arm64@0.16.17: resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==} @@ -459,6 +476,16 @@ packages: dev: true optional: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.35.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.35.0 + eslint-visitor-keys: 3.3.0 + dev: false + /@eslint/eslintrc@2.0.0: resolution: {integrity: sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -508,39 +535,32 @@ packages: '@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 /@jridgewell/trace-mapping@0.3.9: resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} dependencies: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.15 - dev: true /@jspm/core@2.0.0-beta.24: resolution: {integrity: sha512-a4Bo/80Z6CoJNor5ldgs6002utmmbttP4JYd/FJ0Ob2fVdf6O6ha5SORBCqrnDnBvMc1TlrHY7dCfat5+H0a6A==} @@ -605,19 +625,15 @@ packages: /@tsconfig/node10@1.0.9: resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} - dev: true /@tsconfig/node12@1.0.11: resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - dev: true /@tsconfig/node14@1.0.3: resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - dev: true /@tsconfig/node16@1.0.4: resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - dev: true /@types/chai-subset@1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} @@ -633,6 +649,10 @@ packages: resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} dev: true + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + dev: false + /@types/http-cache-semantics@4.0.1: resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==} dev: true @@ -670,7 +690,7 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin@5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.35.0)(typescript@4.9.5): + /@typescript-eslint/eslint-plugin@5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.35.0)(typescript@5.0.2): resolution: {integrity: sha512-+hSN9BdSr629RF02d7mMtXhAJvDTyCbprNYJKrXETlul/Aml6YZwd90XioVbjejQeHbb3R8Dg0CkRgoJDxo8aw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -681,10 +701,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.54.0(eslint@8.35.0)(typescript@4.9.5) + '@typescript-eslint/parser': 5.54.0(eslint@8.35.0)(typescript@5.0.2) '@typescript-eslint/scope-manager': 5.54.0 - '@typescript-eslint/type-utils': 5.54.0(eslint@8.35.0)(typescript@4.9.5) - '@typescript-eslint/utils': 5.54.0(eslint@8.35.0)(typescript@4.9.5) + '@typescript-eslint/type-utils': 5.54.0(eslint@8.35.0)(typescript@5.0.2) + '@typescript-eslint/utils': 5.54.0(eslint@8.35.0)(typescript@5.0.2) debug: 4.3.4 eslint: 8.35.0 grapheme-splitter: 1.0.4 @@ -692,13 +712,13 @@ packages: natural-compare-lite: 1.4.0 regexpp: 3.2.0 semver: 7.5.0 - tsutils: 3.21.0(typescript@4.9.5) - typescript: 4.9.5 + tsutils: 3.21.0(typescript@5.0.2) + typescript: 5.0.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/parser@5.54.0(eslint@8.35.0)(typescript@4.9.5): + /@typescript-eslint/parser@5.54.0(eslint@8.35.0)(typescript@5.0.2): resolution: {integrity: sha512-aAVL3Mu2qTi+h/r04WI/5PfNWvO6pdhpeMRWk9R7rEV4mwJNzoWf5CCU5vDKBsPIFQFjEq1xg7XBI2rjiMXQbQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -710,10 +730,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.54.0 '@typescript-eslint/types': 5.54.0 - '@typescript-eslint/typescript-estree': 5.54.0(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 5.54.0(typescript@5.0.2) debug: 4.3.4 eslint: 8.35.0 - typescript: 4.9.5 + typescript: 5.0.2 transitivePeerDependencies: - supports-color dev: false @@ -726,7 +746,7 @@ packages: '@typescript-eslint/visitor-keys': 5.54.0 dev: false - /@typescript-eslint/type-utils@5.54.0(eslint@8.35.0)(typescript@4.9.5): + /@typescript-eslint/type-utils@5.54.0(eslint@8.35.0)(typescript@5.0.2): resolution: {integrity: sha512-WI+WMJ8+oS+LyflqsD4nlXMsVdzTMYTxl16myXPaCXnSgc7LWwMsjxQFZCK/rVmTZ3FN71Ct78ehO9bRC7erYQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -736,12 +756,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.54.0(typescript@4.9.5) - '@typescript-eslint/utils': 5.54.0(eslint@8.35.0)(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 5.54.0(typescript@5.0.2) + '@typescript-eslint/utils': 5.54.0(eslint@8.35.0)(typescript@5.0.2) debug: 4.3.4 eslint: 8.35.0 - tsutils: 3.21.0(typescript@4.9.5) - typescript: 4.9.5 + tsutils: 3.21.0(typescript@5.0.2) + typescript: 5.0.2 transitivePeerDependencies: - supports-color dev: false @@ -751,7 +771,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: false - /@typescript-eslint/typescript-estree@5.54.0(typescript@4.9.5): + /@typescript-eslint/typescript-estree@5.54.0(typescript@5.0.2): resolution: {integrity: sha512-X2rJG97Wj/VRo5YxJ8Qx26Zqf0RRKsVHd4sav8NElhbZzhpBI8jU54i6hfo9eheumj4oO4dcRN1B/zIVEqR/MQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -766,13 +786,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.0 - tsutils: 3.21.0(typescript@4.9.5) - typescript: 4.9.5 + tsutils: 3.21.0(typescript@5.0.2) + typescript: 5.0.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/utils@5.54.0(eslint@8.35.0)(typescript@4.9.5): + /@typescript-eslint/utils@5.54.0(eslint@8.35.0)(typescript@5.0.2): resolution: {integrity: sha512-cuwm8D/Z/7AuyAeJ+T0r4WZmlnlxQ8wt7C7fLpFlKMR+dY6QO79Cq1WpJhvZbMA4ZeZGHiRWnht7ZJ8qkdAunw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -782,7 +802,7 @@ packages: '@types/semver': 7.3.13 '@typescript-eslint/scope-manager': 5.54.0 '@typescript-eslint/types': 5.54.0 - '@typescript-eslint/typescript-estree': 5.54.0(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 5.54.0(typescript@5.0.2) eslint: 8.35.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0(eslint@8.35.0) @@ -908,7 +928,12 @@ packages: /acorn-walk@8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} - dev: true + + /acorn@8.11.2: + resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: false /acorn@8.8.2: resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} @@ -1009,7 +1034,6 @@ packages: /arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - dev: true /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -1021,6 +1045,12 @@ packages: deep-equal: 2.2.0 dev: true + /aria-query@5.3.0: + resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} + dependencies: + dequal: 2.0.3 + dev: false + /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} @@ -1038,6 +1068,12 @@ packages: engines: {node: '>= 0.4'} dev: true + /axobject-query@3.2.1: + resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} + dependencies: + dequal: 2.0.3 + dev: false + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -1220,6 +1256,16 @@ packages: string-width: 5.1.2 dev: true + /code-red@1.0.4: + resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + '@types/estree': 1.0.5 + acorn: 8.11.2 + estree-walker: 3.0.3 + periscopic: 3.1.0 + dev: false + /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -1279,7 +1325,6 @@ packages: /create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - dev: true /cross-fetch@3.1.5: resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==} @@ -1301,6 +1346,14 @@ packages: resolution: {integrity: sha512-Md+Juc7M3uOdbAFwOYlTrccIZ7oCFuzrhKYQjdeUEW/sE1hv17Jp/Bws+ReOPpGVBTYCBoYo+G17V5Qo8QQ75A==} dev: true + /css-tree@2.3.1: + resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + dependencies: + mdn-data: 2.0.30 + source-map-js: 1.0.2 + dev: false + /css-value@0.0.1: resolution: {integrity: sha512-FUV3xaJ63buRLgHrLQVlVgQnQdR4yqdLGaDu7g8CQcWjInDfM9plBTPI9FRfpahju1UBSaMckeb2/46ApS/V1Q==} dev: true @@ -1390,6 +1443,11 @@ packages: object-keys: 1.1.1 dev: true + /dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + dev: false + /devtools-protocol@0.0.1094867: resolution: {integrity: sha512-pmMDBKiRVjh0uKK6CT1WqZmM3hBVSgD+N2MrgyV1uNizAZMw4tx6i/RTc+/uCsKSCmg0xXx7arCP/OFcIwTsiQ==} dev: true @@ -1398,7 +1456,7 @@ packages: resolution: {integrity: sha512-ewXoFOkLIpKqsiZ19Rm8l46FqDlj+yACbysDIKlUWqTbZ4BBovWmoCegkLHbfTSjGrrLdaXkD1EKA4VF0O9q3g==} dev: true - /devtools@8.6.6(typescript@4.9.5): + /devtools@8.6.6(typescript@5.0.2): resolution: {integrity: sha512-ea6a7XqflRSVe/eJ28eaJJtjrpoqP3OeZ5fyI7SIGGYvyuw9Ha7ZTL9aMYB9TBDw15iNXjIa1a/wuOjQVd80jA==} engines: {node: ^16.13 || >=18} dependencies: @@ -1411,7 +1469,7 @@ packages: chrome-launcher: 0.15.1 edge-paths: 3.0.5 import-meta-resolve: 2.2.2 - puppeteer-core: 19.7.5(typescript@4.9.5) + puppeteer-core: 19.7.5(typescript@5.0.2) query-selector-shadow-dom: 1.0.1 ua-parser-js: 1.0.34 uuid: 9.0.0 @@ -1427,7 +1485,6 @@ packages: /diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} - dev: true /diff@5.1.0: resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} @@ -1766,8 +1823,8 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /eslint-config-prettier@8.6.0(eslint@8.35.0): - resolution: {integrity: sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==} + /eslint-config-prettier@9.0.0(eslint@8.35.0): + resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -1775,7 +1832,7 @@ packages: eslint: 8.35.0 dev: false - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.6.0)(eslint@8.35.0)(prettier@2.8.4): + /eslint-plugin-prettier@4.2.1(eslint-config-prettier@9.0.0)(eslint@8.35.0)(prettier@3.0.0): resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -1787,11 +1844,37 @@ packages: optional: true dependencies: eslint: 8.35.0 - eslint-config-prettier: 8.6.0(eslint@8.35.0) - prettier: 2.8.4 + eslint-config-prettier: 9.0.0(eslint@8.35.0) + prettier: 3.0.0 prettier-linter-helpers: 1.0.0 dev: false + /eslint-plugin-svelte@2.30.0(eslint@8.35.0)(svelte@4.2.5)(ts-node@10.9.1): + resolution: {integrity: sha512-2/qj0BJsfM0U2j4EjGb7iC/0nbUvXx1Gn78CdtyuXpi/rSomLPCPwnsZsloXMzlt6Xwe8LBlpRvZObSKEHLP5A==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0-0 + svelte: ^3.37.0 || ^4.0.0-0 + peerDependenciesMeta: + svelte: + optional: true + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.35.0) + '@jridgewell/sourcemap-codec': 1.4.15 + debug: 4.3.4 + eslint: 8.35.0 + esutils: 2.0.3 + known-css-properties: 0.27.0 + postcss: 8.4.31 + postcss-load-config: 3.1.4(postcss@8.4.31)(ts-node@10.9.1) + postcss-safe-parser: 6.0.0(postcss@8.4.31) + svelte: 4.2.5 + svelte-eslint-parser: 0.30.0(svelte@4.2.5) + transitivePeerDependencies: + - supports-color + - ts-node + dev: false + /eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} @@ -1922,6 +2005,12 @@ packages: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} dev: true + /estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + dependencies: + '@types/estree': 1.0.5 + dev: false + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -2065,6 +2154,10 @@ packages: /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: true + + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} @@ -2223,6 +2316,13 @@ packages: engines: {node: '>= 0.4.0'} dependencies: function-bind: 1.1.1 + dev: true + + /hasown@2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 /hosted-git-info@4.1.0: resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} @@ -2351,6 +2451,12 @@ packages: resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} dependencies: has: 1.0.3 + dev: true + + /is-core-module@2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + dependencies: + hasown: 2.0.0 /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} @@ -2405,6 +2511,12 @@ packages: engines: {node: '>=12'} dev: true + /is-reference@3.0.2: + resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} + dependencies: + '@types/estree': 1.0.5 + dev: false + /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -2528,6 +2640,10 @@ packages: json-buffer: 3.0.1 dev: true + /known-css-properties@0.27.0: + resolution: {integrity: sha512-uMCj6+hZYDoffuvAJjFAPz56E9uoowFHmTkqRtRq5WyC5Q6Cu/fTZKNQpX/RbzChBYLLl3lo8CjFZBAZXq9qFg==} + dev: false + /ky@0.33.3: resolution: {integrity: sha512-CasD9OCEQSFIam2U8efFK81Yeg8vNMTBUqtMOHlrcWQHqUX3HeCl9Dr31u4toV7emlH8Mymk5+9p0lL6mKb/Xw==} engines: {node: '>=14.16'} @@ -2560,7 +2676,6 @@ packages: /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==} @@ -2576,6 +2691,10 @@ packages: engines: {node: '>=14'} dev: true + /locate-character@3.0.0: + resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} + dev: false + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -2663,14 +2782,24 @@ packages: sourcemap-codec: 1.4.8 dev: true + /magic-string@0.30.5: + resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: false + /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: true /marky@1.2.5: resolution: {integrity: sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==} dev: true + /mdn-data@2.0.30: + resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} + dev: false + /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true @@ -2773,8 +2902,8 @@ packages: thenify-all: 1.6.0 dev: true - /nanoid@3.3.4: - resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} + /nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -2981,6 +3110,14 @@ packages: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} dev: true + /periscopic@3.1.0: + resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} + dependencies: + '@types/estree': 1.0.5 + estree-walker: 3.0.3 + is-reference: 3.0.2 + dev: false + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -3001,7 +3138,7 @@ packages: pathe: 1.1.0 dev: true - /postcss-load-config@3.1.4(ts-node@10.9.1): + /postcss-load-config@3.1.4(postcss@8.4.31)(ts-node@10.9.1): resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} peerDependencies: @@ -3014,15 +3151,24 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - ts-node: 10.9.1(@types/node@18.14.6)(typescript@4.9.5) + postcss: 8.4.31 + ts-node: 10.9.1(@types/node@18.14.6)(typescript@5.0.2) yaml: 1.10.2 - dev: true - /postcss@8.4.21: - resolution: {integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==} + /postcss-safe-parser@6.0.0(postcss@8.4.31): + resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.3.3 + dependencies: + postcss: 8.4.31 + dev: false + + /postcss@8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} dependencies: - nanoid: 3.3.4 + nanoid: 3.3.7 picocolors: 1.0.0 source-map-js: 1.0.2 @@ -3038,9 +3184,19 @@ packages: fast-diff: 1.2.0 dev: false - /prettier@2.8.4: - resolution: {integrity: sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==} - engines: {node: '>=10.13.0'} + /prettier-plugin-svelte@3.1.0(prettier@3.0.0)(svelte@4.2.5): + resolution: {integrity: sha512-96+AZxs2ESqIFA9j+o+DHqY+BsUglezfl553LQd6VOtTyJq5GPuBEb3ElxF2cerFzKlYKttlH/VcVmRNj5oc3A==} + peerDependencies: + prettier: ^3.0.0 + svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 + dependencies: + prettier: 3.0.0 + svelte: 4.2.5 + dev: false + + /prettier@3.0.0: + resolution: {integrity: sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==} + engines: {node: '>=14'} hasBin: true dev: false @@ -3072,7 +3228,7 @@ packages: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} - /puppeteer-core@19.7.5(typescript@4.9.5): + /puppeteer-core@19.7.5(typescript@5.0.2): resolution: {integrity: sha512-EJuNha+SxPfaYFbkoWU80H3Wb1SiQH5fFyb2xdbWda0ziax5mhV63UMlqNfPeTDIWarwtR4OIcq/9VqY8HPOsg==} engines: {node: '>=14.14.0'} peerDependencies: @@ -3090,7 +3246,7 @@ packages: proxy-from-env: 1.1.0 rimraf: 4.4.0 tar-fs: 2.1.1 - typescript: 4.9.5 + typescript: 5.0.2 unbzip2-stream: 1.4.3 ws: 8.12.1 transitivePeerDependencies: @@ -3197,11 +3353,11 @@ packages: engines: {node: '>=8'} dev: true - /resolve@1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: - is-core-module: 2.11.0 + is-core-module: 2.13.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -3276,6 +3432,14 @@ packages: hasBin: true optionalDependencies: fsevents: 2.3.2 + dev: true + + /rollup@3.29.4: + resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -3491,6 +3655,40 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + /svelte-eslint-parser@0.30.0(svelte@4.2.5): + resolution: {integrity: sha512-H0Cn2TKr70DU9p/Gb04CfwtS7eK28MYumrHYPaDNkIFbfwGDLADpbERBn7u8G1Rcm2RMr2/mL6mq0J2e8iKFlA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + svelte: ^3.37.0 || ^4.0.0-0 + peerDependenciesMeta: + svelte: + optional: true + dependencies: + eslint-scope: 7.1.1 + eslint-visitor-keys: 3.3.0 + espree: 9.4.1 + svelte: 4.2.5 + dev: false + + /svelte@4.2.5: + resolution: {integrity: sha512-P9YPKsGkNdw4OJbtpd1uzimQHPj7Ai2sPcOHmmD6VgkFhFDmcYevQi7vE4cQ1g8/Vs64aL2TwMoCNFAzv7TPaQ==} + engines: {node: '>=16'} + dependencies: + '@ampproject/remapping': 2.2.1 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.18 + acorn: 8.11.2 + aria-query: 5.3.0 + axobject-query: 3.2.1 + code-red: 1.0.4 + css-tree: 2.3.1 + estree-walker: 3.0.3 + is-reference: 3.0.2 + locate-character: 3.0.0 + magic-string: 0.30.5 + periscopic: 3.1.0 + dev: false + /tar-fs@2.1.1: resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} dependencies: @@ -3576,7 +3774,7 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true - /ts-node@10.9.1(@types/node@18.14.6)(typescript@4.9.5): + /ts-node@10.9.1(@types/node@18.14.6)(typescript@5.0.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -3602,16 +3800,15 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.9.5 + typescript: 5.0.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - dev: true /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: false - /tsup@6.7.0(ts-node@10.9.1)(typescript@4.9.5): + /tsup@6.7.0(postcss@8.4.31)(ts-node@10.9.1)(typescript@5.0.2): resolution: {integrity: sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==} engines: {node: '>=14.18'} hasBin: true @@ -3635,26 +3832,27 @@ packages: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 3.1.4(ts-node@10.9.1) + postcss: 8.4.31 + postcss-load-config: 3.1.4(postcss@8.4.31)(ts-node@10.9.1) resolve-from: 5.0.0 rollup: 3.18.0 source-map: 0.8.0-beta.0 sucrase: 3.32.0 tree-kill: 1.2.2 - typescript: 4.9.5 + typescript: 5.0.2 transitivePeerDependencies: - supports-color - ts-node dev: true - /tsutils@3.21.0(typescript@4.9.5): + /tsutils@3.21.0(typescript@5.0.2): 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: 4.9.5 + typescript: 5.0.2 dev: false /type-check@0.4.0: @@ -3678,9 +3876,9 @@ packages: engines: {node: '>=12.20'} dev: true - /typescript@4.9.5: - resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} - engines: {node: '>=4.2.0'} + /typescript@5.0.2: + resolution: {integrity: sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==} + engines: {node: '>=12.20'} hasBin: true /ua-parser-js@1.0.34: @@ -3715,7 +3913,6 @@ packages: /v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - dev: true /validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} @@ -3772,9 +3969,9 @@ packages: dependencies: '@types/node': 18.14.6 esbuild: 0.16.17 - postcss: 8.4.21 - resolve: 1.22.1 - rollup: 3.18.0 + postcss: 8.4.31 + resolve: 1.22.8 + rollup: 3.29.4 optionalDependencies: fsevents: 2.3.2 @@ -3830,7 +4027,7 @@ packages: tinyspy: 1.1.1 vite: 4.1.4(@types/node@18.14.6) vite-node: 0.29.7(@types/node@18.14.6) - webdriverio: 8.6.7(typescript@4.9.5) + webdriverio: 8.6.7(typescript@5.0.2) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -3861,7 +4058,7 @@ packages: - utf-8-validate dev: true - /webdriverio@8.6.7(typescript@4.9.5): + /webdriverio@8.6.7(typescript@5.0.2): resolution: {integrity: sha512-uaBovfcJQ+g5olfveeku2GT6kGx8qZ74fVvxZVRM/6FYWK6eMT//MPVnmM9UducYHApcxXFULrA+UTtOY5EEag==} engines: {node: ^16.13 || >=18} dependencies: @@ -3876,7 +4073,7 @@ packages: aria-query: 5.1.3 css-shorthand-properties: 1.1.1 css-value: 0.0.1 - devtools: 8.6.6(typescript@4.9.5) + devtools: 8.6.6(typescript@5.0.2) devtools-protocol: 0.0.1119014 grapheme-splitter: 1.0.4 import-meta-resolve: 2.2.2 @@ -3884,7 +4081,7 @@ packages: lodash.clonedeep: 4.5.0 lodash.zip: 4.2.0 minimatch: 7.4.2 - puppeteer-core: 19.7.5(typescript@4.9.5) + puppeteer-core: 19.7.5(typescript@5.0.2) query-selector-shadow-dom: 1.0.1 resq: 1.11.0 rgb2hex: 0.2.5 @@ -4016,7 +4213,6 @@ packages: /yaml@1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - dev: true /yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} @@ -4028,7 +4224,6 @@ packages: /yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} - dev: true /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8991ef9f1..24042e0d7 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -6,3 +6,4 @@ packages: - "packages/agents" - "packages/languages" - "packages/tasks" + - "packages/widgets"