diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 59a1d4cecc6..6745b25d4ff 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -124,6 +124,7 @@ jobs: env: GENERATE_SOURCEMAP: 'false' run: | + yarn typegen:write yarn build cd plugin-server yarn build diff --git a/frontend/@posthog/apps-common/.gitignore b/frontend/@posthog/apps-common/.gitignore new file mode 100644 index 00000000000..92e2a2b8d04 --- /dev/null +++ b/frontend/@posthog/apps-common/.gitignore @@ -0,0 +1,3 @@ +dist +node_modules +build.json diff --git a/frontend/@posthog/apps-common/README.md b/frontend/@posthog/apps-common/README.md new file mode 100644 index 00000000000..9a2ab10e1b6 --- /dev/null +++ b/frontend/@posthog/apps-common/README.md @@ -0,0 +1,3 @@ +# PostHog App Common Packages + +This is an experimental package that contains tools frontend apps can use. Please don't use yet. diff --git a/frontend/@posthog/apps-common/build.mjs b/frontend/@posthog/apps-common/build.mjs new file mode 100644 index 00000000000..e6abfa4d706 --- /dev/null +++ b/frontend/@posthog/apps-common/build.mjs @@ -0,0 +1,35 @@ +#!/usr/bin/env node +import * as path from 'path' +import * as fs from 'fs' +import { startDevServer, buildInParallel, printResponse } from '../../utils.mjs' +import url from 'url' + +export const __dirname = path.dirname(url.fileURLToPath(import.meta.url)) +const { name, peerDependencies } = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'))) + +startDevServer(__dirname) + +await buildInParallel( + [ + { + name, + absWorkingDir: __dirname, + entryPoints: ['./src/index.ts'], + format: 'cjs', + outfile: 'dist/index.js', + bundle: true, + chunkNames: '[name]', + entryNames: '[dir]/[name]', + external: Object.keys(peerDependencies ?? []), + publicPath: '', + minify: true, + target: 'esnext', + sourcemap: false, + }, + ], + { + async onBuildComplete(config, response) { + await printResponse(response, { verbose: true, compact: false }) + }, + } +) diff --git a/frontend/@posthog/apps-common/package.json b/frontend/@posthog/apps-common/package.json new file mode 100644 index 00000000000..9f92b6c10c2 --- /dev/null +++ b/frontend/@posthog/apps-common/package.json @@ -0,0 +1,26 @@ +{ + "name": "@posthog/apps-common", + "version": "0.0.0", + "license": "MIT", + "source": "src/index.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "build": "yarn build:source && yarn build:types && ls -lah dist/", + "build:source": "echo \"Building source\" && node build.mjs", + "build:types": "echo \"Building types\" && tsup src/index.ts --dts-only", + "prepublishOnly": "yarn build" + }, + "devDependencies": { + "tsup": "^5.12.8", + "typescript": ">=4.0.0" + }, + "peerDependencies": { + "@posthog/lemonade": "*", + "antd": "*", + "kea": "*", + "kea-router": "*", + "react": "*", + "react-dom": "*" + } +} diff --git a/frontend/@posthog/apps-common/src/index.ts b/frontend/@posthog/apps-common/src/index.ts new file mode 100644 index 00000000000..e8f1c16684f --- /dev/null +++ b/frontend/@posthog/apps-common/src/index.ts @@ -0,0 +1,7 @@ +import '~/styles' +import '~/initKea' + +export * from 'lib/components/AdHocInsight/AdHocInsight' + +import api_ from 'lib/api' +export const api = api_ diff --git a/frontend/@posthog/apps-common/tsconfig.json b/frontend/@posthog/apps-common/tsconfig.json new file mode 100644 index 00000000000..a2aad1f5d78 --- /dev/null +++ b/frontend/@posthog/apps-common/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "emitDeclarationOnly": true, + "noEmit": false + } +} diff --git a/frontend/@posthog/apps-common/yarn.lock b/frontend/@posthog/apps-common/yarn.lock new file mode 100644 index 00000000000..579c65d9b95 --- /dev/null +++ b/frontend/@posthog/apps-common/yarn.lock @@ -0,0 +1,710 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== + +anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +bundle-require@^3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-3.0.4.tgz#2b52ba77d99c0a586b5854cd21d36954e63cc110" + integrity sha512-VXG6epB1yrLAvWVQpl92qF347/UXmncQj7J3U8kZEbdVZ1ZkQyr4hYeL/9RvcE8vVVdp53dY78Fd/3pqfRqI1A== + dependencies: + load-tsconfig "^0.2.0" + +cac@^6.7.12: + version "6.7.12" + resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.12.tgz#6fb5ea2ff50bd01490dbda497f4ae75a99415193" + integrity sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA== + +chokidar@^3.5.1: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +commander@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +debug@^4.3.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +esbuild-android-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.39.tgz#09f12a372eed9743fd77ff6d889ac14f7b340c21" + integrity sha512-EJOu04p9WgZk0UoKTqLId9VnIsotmI/Z98EXrKURGb3LPNunkeffqQIkjS2cAvidh+OK5uVrXaIP229zK6GvhQ== + +esbuild-android-arm64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.39.tgz#f608d00ea03fe26f3b1ab92a30f99220390f3071" + integrity sha512-+twajJqO7n3MrCz9e+2lVOnFplRsaGRwsq1KL/uOy7xK7QdRSprRQcObGDeDZUZsacD5gUkk6OiHiYp6RzU3CA== + +esbuild-darwin-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.39.tgz#31528daa75b4c9317721ede344195163fae3e041" + integrity sha512-ImT6eUw3kcGcHoUxEcdBpi6LfTRWaV6+qf32iYYAfwOeV+XaQ/Xp5XQIBiijLeo+LpGci9M0FVec09nUw41a5g== + +esbuild-darwin-arm64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.39.tgz#247f770d86d90a215fa194f24f90e30a0bd97245" + integrity sha512-/fcQ5UhE05OiT+bW5v7/up1bDsnvaRZPJxXwzXsMRrr7rZqPa85vayrD723oWMT64dhrgWeA3FIneF8yER0XTw== + +esbuild-freebsd-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.39.tgz#479414d294905055eb396ebe455ed42213284ee0" + integrity sha512-oMNH8lJI4wtgN5oxuFP7BQ22vgB/e3Tl5Woehcd6i2r6F3TszpCnNl8wo2d/KvyQ4zvLvCWAlRciumhQg88+kQ== + +esbuild-freebsd-arm64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.39.tgz#cedeb10357c88533615921ae767a67dc870a474c" + integrity sha512-1GHK7kwk57ukY2yI4ILWKJXaxfr+8HcM/r/JKCGCPziIVlL+Wi7RbJ2OzMcTKZ1HpvEqCTBT/J6cO4ZEwW4Ypg== + +esbuild-linux-32@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.39.tgz#d9f008c4322d771f3958f59c1eee5a05cdf92485" + integrity sha512-g97Sbb6g4zfRLIxHgW2pc393DjnkTRMeq3N1rmjDUABxpx8SjocK4jLen+/mq55G46eE2TA0MkJ4R3SpKMu7dg== + +esbuild-linux-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.39.tgz#ba58d7f66858913aeb1ab5c6bde1bbd824731795" + integrity sha512-4tcgFDYWdI+UbNMGlua9u1Zhu0N5R6u9tl5WOM8aVnNX143JZoBZLpCuUr5lCKhnD0SCO+5gUyMfupGrHtfggQ== + +esbuild-linux-arm64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.39.tgz#708785a30072702b5b1c16b65cf9c25c51202529" + integrity sha512-23pc8MlD2D6Px1mV8GMglZlKgwgNKAO8gsgsLLcXWSs9lQsCYkIlMo/2Ycfo5JrDIbLdwgP8D2vpfH2KcBqrDQ== + +esbuild-linux-arm@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.39.tgz#4e8b5deaa7ab60d0d28fab131244ef82b40684f4" + integrity sha512-t0Hn1kWVx5UpCzAJkKRfHeYOLyFnXwYynIkK54/h3tbMweGI7dj400D1k0Vvtj2u1P+JTRT9tx3AjtLEMmfVBQ== + +esbuild-linux-mips64le@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.39.tgz#6f3bf3023f711084e5a1e8190487d2020f39f0f7" + integrity sha512-epwlYgVdbmkuRr5n4es3B+yDI0I2e/nxhKejT9H0OLxFAlMkeQZxSpxATpDc9m8NqRci6Kwyb/SfmD1koG2Zuw== + +esbuild-linux-ppc64le@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.39.tgz#900e718a4ea3f6aedde8424828eeefdd4b48d4b9" + integrity sha512-W/5ezaq+rQiQBThIjLMNjsuhPHg+ApVAdTz2LvcuesZFMsJoQAW2hutoyg47XxpWi7aEjJGrkS26qCJKhRn3QQ== + +esbuild-linux-riscv64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.39.tgz#dcbff622fa37047a75d2ff7a1d8d2949d80277e4" + integrity sha512-IS48xeokcCTKeQIOke2O0t9t14HPvwnZcy+5baG13Z1wxs9ZrC5ig5ypEQQh4QMKxURD5TpCLHw2W42CLuVZaA== + +esbuild-linux-s390x@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.39.tgz#3f725a7945b419406c99d93744b28552561dcdfd" + integrity sha512-zEfunpqR8sMomqXhNTFEKDs+ik7HC01m3M60MsEjZOqaywHu5e5682fMsqOlZbesEAAaO9aAtRBsU7CHnSZWyA== + +esbuild-netbsd-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.39.tgz#e10e40b6a765798b90d4eb85901cc85c8b7ff85e" + integrity sha512-Uo2suJBSIlrZCe4E0k75VDIFJWfZy+bOV6ih3T4MVMRJh1lHJ2UyGoaX4bOxomYN3t+IakHPyEoln1+qJ1qYaA== + +esbuild-openbsd-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.39.tgz#935ec143f75ce10bd9cdb1c87fee00287eb0edbc" + integrity sha512-secQU+EpgUPpYjJe3OecoeGKVvRMLeKUxSMGHnK+aK5uQM3n1FPXNJzyz1LHFOo0WOyw+uoCxBYdM4O10oaCAA== + +esbuild-sunos-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.39.tgz#0e7aa82b022a2e6d55b0646738b2582c2d72c3c0" + integrity sha512-qHq0t5gePEDm2nqZLb+35p/qkaXVS7oIe32R0ECh2HOdiXXkj/1uQI9IRogGqKkK+QjDG+DhwiUw7QoHur/Rwg== + +esbuild-windows-32@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.39.tgz#3f1538241f31b538545f4b5841b248cac260fa35" + integrity sha512-XPjwp2OgtEX0JnOlTgT6E5txbRp6Uw54Isorm3CwOtloJazeIWXuiwK0ONJBVb/CGbiCpS7iP2UahGgd2p1x+Q== + +esbuild-windows-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.39.tgz#b100c59f96d3c2da2e796e42fee4900d755d3e03" + integrity sha512-E2wm+5FwCcLpKsBHRw28bSYQw0Ikxb7zIMxw3OPAkiaQhLVr3dnVO8DofmbWhhf6b97bWzg37iSZ45ZDpLw7Ow== + +esbuild-windows-arm64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.39.tgz#00268517e665b33c89778d61f144e4256b39f631" + integrity sha512-sBZQz5D+Gd0EQ09tZRnz/PpVdLwvp/ufMtJ1iDFYddDaPpZXKqPyaxfYBLs3ueiaksQ26GGa7sci0OqFzNs7KA== + +esbuild@^0.14.25: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.39.tgz#c926b2259fe6f6d3a94f528fb42e103c5a6d909a" + integrity sha512-2kKujuzvRWYtwvNjYDY444LQIA3TyJhJIX3Yo4+qkFlDDtGlSicWgeHVJqMUP/2sSfH10PGwfsj+O2ro1m10xQ== + optionalDependencies: + esbuild-android-64 "0.14.39" + esbuild-android-arm64 "0.14.39" + esbuild-darwin-64 "0.14.39" + esbuild-darwin-arm64 "0.14.39" + esbuild-freebsd-64 "0.14.39" + esbuild-freebsd-arm64 "0.14.39" + esbuild-linux-32 "0.14.39" + esbuild-linux-64 "0.14.39" + esbuild-linux-arm "0.14.39" + esbuild-linux-arm64 "0.14.39" + esbuild-linux-mips64le "0.14.39" + esbuild-linux-ppc64le "0.14.39" + esbuild-linux-riscv64 "0.14.39" + esbuild-linux-s390x "0.14.39" + esbuild-netbsd-64 "0.14.39" + esbuild-openbsd-64 "0.14.39" + esbuild-sunos-64 "0.14.39" + esbuild-windows-32 "0.14.39" + esbuild-windows-64 "0.14.39" + esbuild-windows-arm64 "0.14.39" + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + dependencies: + reusify "^1.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globby@^11.0.3: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +joycon@^3.0.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" + integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== + +lilconfig@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" + integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +load-tsconfig@^0.2.0: + version "0.2.3" + resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.3.tgz#08af3e7744943caab0c75f8af7f1703639c3ef1f" + integrity sha512-iyT2MXws+dc2Wi6o3grCFtGXpeMvHmJqS27sMPGtV2eUu4PeFnG+33I8BlFK1t1NWMjOpcx9bridn5yxLDX2gQ== + +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^3.0.4: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +mz@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pirates@^4.0.1: + version "4.0.5" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" + integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== + +postcss-load-config@^3.0.1: + version "3.1.4" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" + integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== + dependencies: + lilconfig "^2.0.5" + yaml "^1.10.2" + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rollup@^2.60.0: + version "2.74.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.74.1.tgz#4fba0ff1c312cc4ee82691b154eee69a0d01929f" + integrity sha512-K2zW7kV8Voua5eGkbnBtWYfMIhYhT9Pel2uhBk2WO5eMee161nPze/XRfvEQPFYz7KgrCCnmh2Wy0AMFLGGmMA== + optionalDependencies: + fsevents "~2.3.2" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map@0.8.0-beta.0: + version "0.8.0-beta.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11" + integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA== + dependencies: + whatwg-url "^7.0.0" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +sucrase@^3.20.3: + version "3.21.0" + resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.21.0.tgz#6a5affdbe716b22e4dc99c57d366ad0d216444b9" + integrity sha512-FjAhMJjDcifARI7bZej0Bi1yekjWQHoEvWIXhLPwDhC6O4iZ5PtGb86WV56riW87hzpgB13wwBKO9vKAiWu5VQ== + dependencies: + commander "^4.0.0" + glob "7.1.6" + lines-and-columns "^1.1.6" + mz "^2.7.0" + pirates "^4.0.1" + ts-interface-checker "^0.1.9" + +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= + dependencies: + punycode "^2.1.0" + +tree-kill@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== + +ts-interface-checker@^0.1.9: + version "0.1.13" + resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" + integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== + +tsup@^5.12.8: + version "5.12.8" + resolved "https://registry.yarnpkg.com/tsup/-/tsup-5.12.8.tgz#8f5c0b160be317a661883e89c1f1051ca82ad3ad" + integrity sha512-fSBzUBtrnAQ+XKPfj1KcZ2Pl0EUlKBqpbTmRAs+2mL34fQlowrm6ccQgOYyMe9MMAcejMP6/7Rw3qKjx1lreZA== + dependencies: + bundle-require "^3.0.2" + cac "^6.7.12" + chokidar "^3.5.1" + debug "^4.3.1" + esbuild "^0.14.25" + execa "^5.0.0" + globby "^11.0.3" + joycon "^3.0.1" + postcss-load-config "^3.0.1" + resolve-from "^5.0.0" + rollup "^2.60.0" + source-map "0.8.0-beta.0" + sucrase "^3.20.3" + tree-kill "^1.2.2" + +typescript@>=4.0.0: + version "4.6.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" + integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== + +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + +whatwg-url@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" + integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +yaml@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== diff --git a/frontend/@posthog/lemon-ui/.gitignore b/frontend/@posthog/lemon-ui/.gitignore new file mode 100644 index 00000000000..92e2a2b8d04 --- /dev/null +++ b/frontend/@posthog/lemon-ui/.gitignore @@ -0,0 +1,3 @@ +dist +node_modules +build.json diff --git a/frontend/@posthog/lemon-ui/README.md b/frontend/@posthog/lemon-ui/README.md new file mode 100644 index 00000000000..f0eb91cdcde --- /dev/null +++ b/frontend/@posthog/lemon-ui/README.md @@ -0,0 +1,7 @@ +# PostHog Lemon UI + +[![npm package](https://img.shields.io/npm/v/@posthog/lemon-ui?style=flat-square)](https://www.npmjs.com/package/@posthog/lemon-ui) +[![MIT License](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](https://opensource.org/licenses/MIT) + +Please see [PostHog Storybook](https://storybook.posthog.net/). +Specifically, [Lemon UI Overview](https://storybook.posthog.net/?path=/docs/lemon-ui-overview--page). diff --git a/frontend/@posthog/lemon-ui/build.mjs b/frontend/@posthog/lemon-ui/build.mjs new file mode 100755 index 00000000000..e6abfa4d706 --- /dev/null +++ b/frontend/@posthog/lemon-ui/build.mjs @@ -0,0 +1,35 @@ +#!/usr/bin/env node +import * as path from 'path' +import * as fs from 'fs' +import { startDevServer, buildInParallel, printResponse } from '../../utils.mjs' +import url from 'url' + +export const __dirname = path.dirname(url.fileURLToPath(import.meta.url)) +const { name, peerDependencies } = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'))) + +startDevServer(__dirname) + +await buildInParallel( + [ + { + name, + absWorkingDir: __dirname, + entryPoints: ['./src/index.ts'], + format: 'cjs', + outfile: 'dist/index.js', + bundle: true, + chunkNames: '[name]', + entryNames: '[dir]/[name]', + external: Object.keys(peerDependencies ?? []), + publicPath: '', + minify: true, + target: 'esnext', + sourcemap: false, + }, + ], + { + async onBuildComplete(config, response) { + await printResponse(response, { verbose: true, compact: false }) + }, + } +) diff --git a/frontend/@posthog/lemon-ui/package.json b/frontend/@posthog/lemon-ui/package.json new file mode 100644 index 00000000000..0f81e2e7abf --- /dev/null +++ b/frontend/@posthog/lemon-ui/package.json @@ -0,0 +1,26 @@ +{ + "name": "@posthog/lemon-ui", + "version": "0.0.0", + "license": "MIT", + "homepage": "https://storybook.posthog.net/?path=/docs/lemon-ui-overview--page", + "source": "src/index.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "build": "yarn build:source && yarn build:types && ls -lah dist/", + "build:source": "echo \"Building source\" && node build.mjs", + "build:types": "echo \"Building types\" && tsup src/index.ts --dts-only", + "prepublishOnly": "yarn build" + }, + "devDependencies": { + "tsup": "^5.12.8", + "typescript": ">=4.0.0" + }, + "peerDependencies": { + "antd": "*", + "kea": "*", + "kea-router": "*", + "react": "*", + "react-dom": "*" + } +} diff --git a/frontend/src/packages/apps-common.ts b/frontend/@posthog/lemon-ui/src/index.ts similarity index 86% rename from frontend/src/packages/apps-common.ts rename to frontend/@posthog/lemon-ui/src/index.ts index 286df7d3e49..d464e1861f0 100644 --- a/frontend/src/packages/apps-common.ts +++ b/frontend/@posthog/lemon-ui/src/index.ts @@ -1,3 +1,4 @@ +import '../../../src/styles/global.scss' export * from 'lib/components/LemonBubble/LemonBubble' export * from 'lib/components/LemonButton/LemonButton' export * from 'lib/components/LemonCheckbox/LemonCheckbox' @@ -11,9 +12,4 @@ export * from 'lib/components/LemonTable/LemonTable' export * from 'lib/components/LemonTag/LemonTag' export * from 'lib/components/LemonTextArea/LemonTextArea' export * from 'lib/components/lemonToast' - -export * from 'lib/components/AdHocInsight/AdHocInsight' export * from 'lib/components/Link' - -import api_ from 'lib/api' -export const api = api_ diff --git a/frontend/@posthog/lemon-ui/tsconfig.json b/frontend/@posthog/lemon-ui/tsconfig.json new file mode 100644 index 00000000000..a2aad1f5d78 --- /dev/null +++ b/frontend/@posthog/lemon-ui/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "emitDeclarationOnly": true, + "noEmit": false + } +} diff --git a/frontend/@posthog/lemon-ui/yarn.lock b/frontend/@posthog/lemon-ui/yarn.lock new file mode 100644 index 00000000000..579c65d9b95 --- /dev/null +++ b/frontend/@posthog/lemon-ui/yarn.lock @@ -0,0 +1,710 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== + +anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +bundle-require@^3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-3.0.4.tgz#2b52ba77d99c0a586b5854cd21d36954e63cc110" + integrity sha512-VXG6epB1yrLAvWVQpl92qF347/UXmncQj7J3U8kZEbdVZ1ZkQyr4hYeL/9RvcE8vVVdp53dY78Fd/3pqfRqI1A== + dependencies: + load-tsconfig "^0.2.0" + +cac@^6.7.12: + version "6.7.12" + resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.12.tgz#6fb5ea2ff50bd01490dbda497f4ae75a99415193" + integrity sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA== + +chokidar@^3.5.1: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +commander@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +debug@^4.3.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +esbuild-android-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.39.tgz#09f12a372eed9743fd77ff6d889ac14f7b340c21" + integrity sha512-EJOu04p9WgZk0UoKTqLId9VnIsotmI/Z98EXrKURGb3LPNunkeffqQIkjS2cAvidh+OK5uVrXaIP229zK6GvhQ== + +esbuild-android-arm64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.39.tgz#f608d00ea03fe26f3b1ab92a30f99220390f3071" + integrity sha512-+twajJqO7n3MrCz9e+2lVOnFplRsaGRwsq1KL/uOy7xK7QdRSprRQcObGDeDZUZsacD5gUkk6OiHiYp6RzU3CA== + +esbuild-darwin-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.39.tgz#31528daa75b4c9317721ede344195163fae3e041" + integrity sha512-ImT6eUw3kcGcHoUxEcdBpi6LfTRWaV6+qf32iYYAfwOeV+XaQ/Xp5XQIBiijLeo+LpGci9M0FVec09nUw41a5g== + +esbuild-darwin-arm64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.39.tgz#247f770d86d90a215fa194f24f90e30a0bd97245" + integrity sha512-/fcQ5UhE05OiT+bW5v7/up1bDsnvaRZPJxXwzXsMRrr7rZqPa85vayrD723oWMT64dhrgWeA3FIneF8yER0XTw== + +esbuild-freebsd-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.39.tgz#479414d294905055eb396ebe455ed42213284ee0" + integrity sha512-oMNH8lJI4wtgN5oxuFP7BQ22vgB/e3Tl5Woehcd6i2r6F3TszpCnNl8wo2d/KvyQ4zvLvCWAlRciumhQg88+kQ== + +esbuild-freebsd-arm64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.39.tgz#cedeb10357c88533615921ae767a67dc870a474c" + integrity sha512-1GHK7kwk57ukY2yI4ILWKJXaxfr+8HcM/r/JKCGCPziIVlL+Wi7RbJ2OzMcTKZ1HpvEqCTBT/J6cO4ZEwW4Ypg== + +esbuild-linux-32@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.39.tgz#d9f008c4322d771f3958f59c1eee5a05cdf92485" + integrity sha512-g97Sbb6g4zfRLIxHgW2pc393DjnkTRMeq3N1rmjDUABxpx8SjocK4jLen+/mq55G46eE2TA0MkJ4R3SpKMu7dg== + +esbuild-linux-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.39.tgz#ba58d7f66858913aeb1ab5c6bde1bbd824731795" + integrity sha512-4tcgFDYWdI+UbNMGlua9u1Zhu0N5R6u9tl5WOM8aVnNX143JZoBZLpCuUr5lCKhnD0SCO+5gUyMfupGrHtfggQ== + +esbuild-linux-arm64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.39.tgz#708785a30072702b5b1c16b65cf9c25c51202529" + integrity sha512-23pc8MlD2D6Px1mV8GMglZlKgwgNKAO8gsgsLLcXWSs9lQsCYkIlMo/2Ycfo5JrDIbLdwgP8D2vpfH2KcBqrDQ== + +esbuild-linux-arm@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.39.tgz#4e8b5deaa7ab60d0d28fab131244ef82b40684f4" + integrity sha512-t0Hn1kWVx5UpCzAJkKRfHeYOLyFnXwYynIkK54/h3tbMweGI7dj400D1k0Vvtj2u1P+JTRT9tx3AjtLEMmfVBQ== + +esbuild-linux-mips64le@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.39.tgz#6f3bf3023f711084e5a1e8190487d2020f39f0f7" + integrity sha512-epwlYgVdbmkuRr5n4es3B+yDI0I2e/nxhKejT9H0OLxFAlMkeQZxSpxATpDc9m8NqRci6Kwyb/SfmD1koG2Zuw== + +esbuild-linux-ppc64le@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.39.tgz#900e718a4ea3f6aedde8424828eeefdd4b48d4b9" + integrity sha512-W/5ezaq+rQiQBThIjLMNjsuhPHg+ApVAdTz2LvcuesZFMsJoQAW2hutoyg47XxpWi7aEjJGrkS26qCJKhRn3QQ== + +esbuild-linux-riscv64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.39.tgz#dcbff622fa37047a75d2ff7a1d8d2949d80277e4" + integrity sha512-IS48xeokcCTKeQIOke2O0t9t14HPvwnZcy+5baG13Z1wxs9ZrC5ig5ypEQQh4QMKxURD5TpCLHw2W42CLuVZaA== + +esbuild-linux-s390x@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.39.tgz#3f725a7945b419406c99d93744b28552561dcdfd" + integrity sha512-zEfunpqR8sMomqXhNTFEKDs+ik7HC01m3M60MsEjZOqaywHu5e5682fMsqOlZbesEAAaO9aAtRBsU7CHnSZWyA== + +esbuild-netbsd-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.39.tgz#e10e40b6a765798b90d4eb85901cc85c8b7ff85e" + integrity sha512-Uo2suJBSIlrZCe4E0k75VDIFJWfZy+bOV6ih3T4MVMRJh1lHJ2UyGoaX4bOxomYN3t+IakHPyEoln1+qJ1qYaA== + +esbuild-openbsd-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.39.tgz#935ec143f75ce10bd9cdb1c87fee00287eb0edbc" + integrity sha512-secQU+EpgUPpYjJe3OecoeGKVvRMLeKUxSMGHnK+aK5uQM3n1FPXNJzyz1LHFOo0WOyw+uoCxBYdM4O10oaCAA== + +esbuild-sunos-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.39.tgz#0e7aa82b022a2e6d55b0646738b2582c2d72c3c0" + integrity sha512-qHq0t5gePEDm2nqZLb+35p/qkaXVS7oIe32R0ECh2HOdiXXkj/1uQI9IRogGqKkK+QjDG+DhwiUw7QoHur/Rwg== + +esbuild-windows-32@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.39.tgz#3f1538241f31b538545f4b5841b248cac260fa35" + integrity sha512-XPjwp2OgtEX0JnOlTgT6E5txbRp6Uw54Isorm3CwOtloJazeIWXuiwK0ONJBVb/CGbiCpS7iP2UahGgd2p1x+Q== + +esbuild-windows-64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.39.tgz#b100c59f96d3c2da2e796e42fee4900d755d3e03" + integrity sha512-E2wm+5FwCcLpKsBHRw28bSYQw0Ikxb7zIMxw3OPAkiaQhLVr3dnVO8DofmbWhhf6b97bWzg37iSZ45ZDpLw7Ow== + +esbuild-windows-arm64@0.14.39: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.39.tgz#00268517e665b33c89778d61f144e4256b39f631" + integrity sha512-sBZQz5D+Gd0EQ09tZRnz/PpVdLwvp/ufMtJ1iDFYddDaPpZXKqPyaxfYBLs3ueiaksQ26GGa7sci0OqFzNs7KA== + +esbuild@^0.14.25: + version "0.14.39" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.39.tgz#c926b2259fe6f6d3a94f528fb42e103c5a6d909a" + integrity sha512-2kKujuzvRWYtwvNjYDY444LQIA3TyJhJIX3Yo4+qkFlDDtGlSicWgeHVJqMUP/2sSfH10PGwfsj+O2ro1m10xQ== + optionalDependencies: + esbuild-android-64 "0.14.39" + esbuild-android-arm64 "0.14.39" + esbuild-darwin-64 "0.14.39" + esbuild-darwin-arm64 "0.14.39" + esbuild-freebsd-64 "0.14.39" + esbuild-freebsd-arm64 "0.14.39" + esbuild-linux-32 "0.14.39" + esbuild-linux-64 "0.14.39" + esbuild-linux-arm "0.14.39" + esbuild-linux-arm64 "0.14.39" + esbuild-linux-mips64le "0.14.39" + esbuild-linux-ppc64le "0.14.39" + esbuild-linux-riscv64 "0.14.39" + esbuild-linux-s390x "0.14.39" + esbuild-netbsd-64 "0.14.39" + esbuild-openbsd-64 "0.14.39" + esbuild-sunos-64 "0.14.39" + esbuild-windows-32 "0.14.39" + esbuild-windows-64 "0.14.39" + esbuild-windows-arm64 "0.14.39" + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + dependencies: + reusify "^1.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globby@^11.0.3: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +joycon@^3.0.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" + integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== + +lilconfig@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" + integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +load-tsconfig@^0.2.0: + version "0.2.3" + resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.3.tgz#08af3e7744943caab0c75f8af7f1703639c3ef1f" + integrity sha512-iyT2MXws+dc2Wi6o3grCFtGXpeMvHmJqS27sMPGtV2eUu4PeFnG+33I8BlFK1t1NWMjOpcx9bridn5yxLDX2gQ== + +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^3.0.4: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +mz@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pirates@^4.0.1: + version "4.0.5" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" + integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== + +postcss-load-config@^3.0.1: + version "3.1.4" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" + integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== + dependencies: + lilconfig "^2.0.5" + yaml "^1.10.2" + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rollup@^2.60.0: + version "2.74.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.74.1.tgz#4fba0ff1c312cc4ee82691b154eee69a0d01929f" + integrity sha512-K2zW7kV8Voua5eGkbnBtWYfMIhYhT9Pel2uhBk2WO5eMee161nPze/XRfvEQPFYz7KgrCCnmh2Wy0AMFLGGmMA== + optionalDependencies: + fsevents "~2.3.2" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map@0.8.0-beta.0: + version "0.8.0-beta.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11" + integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA== + dependencies: + whatwg-url "^7.0.0" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +sucrase@^3.20.3: + version "3.21.0" + resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.21.0.tgz#6a5affdbe716b22e4dc99c57d366ad0d216444b9" + integrity sha512-FjAhMJjDcifARI7bZej0Bi1yekjWQHoEvWIXhLPwDhC6O4iZ5PtGb86WV56riW87hzpgB13wwBKO9vKAiWu5VQ== + dependencies: + commander "^4.0.0" + glob "7.1.6" + lines-and-columns "^1.1.6" + mz "^2.7.0" + pirates "^4.0.1" + ts-interface-checker "^0.1.9" + +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= + dependencies: + punycode "^2.1.0" + +tree-kill@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== + +ts-interface-checker@^0.1.9: + version "0.1.13" + resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" + integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== + +tsup@^5.12.8: + version "5.12.8" + resolved "https://registry.yarnpkg.com/tsup/-/tsup-5.12.8.tgz#8f5c0b160be317a661883e89c1f1051ca82ad3ad" + integrity sha512-fSBzUBtrnAQ+XKPfj1KcZ2Pl0EUlKBqpbTmRAs+2mL34fQlowrm6ccQgOYyMe9MMAcejMP6/7Rw3qKjx1lreZA== + dependencies: + bundle-require "^3.0.2" + cac "^6.7.12" + chokidar "^3.5.1" + debug "^4.3.1" + esbuild "^0.14.25" + execa "^5.0.0" + globby "^11.0.3" + joycon "^3.0.1" + postcss-load-config "^3.0.1" + resolve-from "^5.0.0" + rollup "^2.60.0" + source-map "0.8.0-beta.0" + sucrase "^3.20.3" + tree-kill "^1.2.2" + +typescript@>=4.0.0: + version "4.6.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" + integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== + +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + +whatwg-url@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" + integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +yaml@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== diff --git a/frontend/build.mjs b/frontend/build.mjs index 61035ff4518..83243f38f84 100755 --- a/frontend/build.mjs +++ b/frontend/build.mjs @@ -9,13 +9,11 @@ import { buildInParallel, copyIndexHtml, } from './utils.mjs' -import fse from 'fs-extra' export const __dirname = path.dirname(fileURLToPath(import.meta.url)) startDevServer(__dirname) copyPublicFolder(path.resolve(__dirname, 'public'), path.resolve(__dirname, 'dist')) -writeSourceCodeEditorTypes() writeIndexHtml() writeSharedDashboardHtml() @@ -28,6 +26,7 @@ await buildInParallel( [ { name: 'PostHog App', + absWorkingDir: __dirname, entryPoints: ['src/index.tsx'], splitting: true, format: 'esm', @@ -36,6 +35,7 @@ await buildInParallel( }, { name: 'Shared Dashboard', + absWorkingDir: __dirname, entryPoints: ['src/scenes/dashboard/SharedDashboard.tsx'], format: 'iife', outfile: path.resolve(__dirname, 'dist', 'shared_dashboard.js'), @@ -43,6 +43,7 @@ await buildInParallel( }, { name: 'Exporter', + absWorkingDir: __dirname, entryPoints: ['src/exporter/ExportViewer.tsx'], format: 'iife', outfile: path.resolve(__dirname, 'dist', 'exporter.js'), @@ -50,6 +51,7 @@ await buildInParallel( }, { name: 'Toolbar', + absWorkingDir: __dirname, entryPoints: ['src/toolbar/index.tsx'], format: 'iife', outfile: path.resolve(__dirname, 'dist', 'toolbar.js'), @@ -83,31 +85,6 @@ await buildInParallel( } ) -export function writeSourceCodeEditorTypes() { - const readFile = (p) => { - try { - return fse.readFileSync(path.resolve(__dirname, p), { encoding: 'utf-8' }) - } catch (e) { - if (isDev) { - console.warn( - `🙈 Didn't find "${p}" for the app source editor. Build it with: yarn build:packages:types` - ) - } else { - throw e - } - } - } - const types = { - '@types/react/index.d.ts': readFile('../node_modules/@types/react/index.d.ts'), - '@types/react/global.d.ts': readFile('../node_modules/@types/react/global.d.ts'), - '@types/kea/index.d.ts': readFile('../node_modules/kea/lib/index.d.ts'), - } - fse.writeFileSync( - path.resolve(__dirname, './src/scenes/plugins/source/types/packages.json'), - JSON.stringify(types, null, 4) + '\n' - ) -} - export function writeIndexHtml(chunks = {}, entrypoints = []) { copyIndexHtml(__dirname, 'src/index.html', 'dist/index.html', 'index', chunks, entrypoints) copyIndexHtml(__dirname, 'src/layout.html', 'dist/layout.html', 'index', chunks, entrypoints) diff --git a/frontend/editor-update-tsd.mjs b/frontend/editor-update-tsd.mjs new file mode 100644 index 00000000000..f105dfc2287 --- /dev/null +++ b/frontend/editor-update-tsd.mjs @@ -0,0 +1,33 @@ +import fse from 'fs-extra' +import path from 'path' +import { isDev } from './utils.mjs' +import { fileURLToPath } from 'url' +export const __dirname = path.dirname(fileURLToPath(import.meta.url)) + +export function writeSourceCodeEditorTypes() { + const readFile = (p) => { + try { + return fse.readFileSync(path.resolve(__dirname, p), { encoding: 'utf-8' }) + } catch (e) { + if (isDev) { + console.warn( + `🙈 Didn't find "${p}" for the app source editor. Build it with: yarn build:packages:types` + ) + } else { + throw e + } + } + } + const types = { + '@types/react/index.d.ts': readFile('../node_modules/@types/react/index.d.ts'), + '@types/react/global.d.ts': readFile('../node_modules/@types/react/global.d.ts'), + '@types/kea/index.d.ts': readFile('../node_modules/kea/lib/index.d.ts'), + '@posthog/apps-common/index.d.ts': readFile('./@posthog/apps-common/dist/index.d.ts'), + '@posthog/lemon-ui/index.d.ts': readFile('./@posthog/lemon-ui/dist/index.d.ts'), + } + const packagesJsonFile = path.resolve(__dirname, './src/scenes/plugins/source/types/packages.json') + fse.mkdirpSync(path.dirname(packagesJsonFile)) + fse.writeFileSync(packagesJsonFile, JSON.stringify(types, null, 4) + '\n') +} + +writeSourceCodeEditorTypes() diff --git a/frontend/src/layout/navigation/TopBar/SitePopover.tsx b/frontend/src/layout/navigation/TopBar/SitePopover.tsx index db87657d8f3..2898e221a6d 100644 --- a/frontend/src/layout/navigation/TopBar/SitePopover.tsx +++ b/frontend/src/layout/navigation/TopBar/SitePopover.tsx @@ -34,7 +34,7 @@ import { import { dayjs } from 'lib/dayjs' import { inviteLogic } from 'scenes/organization/Settings/inviteLogic' import { Tooltip } from 'lib/components/Tooltip' -import { LemonButtonPropsBase } from '~/packages/apps-common' +import { LemonButtonPropsBase } from '@posthog/lemon-ui' import { eventUsageLogic } from 'lib/utils/eventUsageLogic' function SitePopoverSection({ title, children }: { title?: string | JSX.Element; children: any }): JSX.Element { diff --git a/frontend/src/scenes/apps/frontendAppRequire.ts b/frontend/src/scenes/apps/frontendAppRequire.ts index 5c1ea2695a6..d64bfbe22a3 100644 --- a/frontend/src/scenes/apps/frontendAppRequire.ts +++ b/frontend/src/scenes/apps/frontendAppRequire.ts @@ -5,7 +5,8 @@ import * as allKeaLoaders from 'kea-loaders' import * as allKeaForms from 'kea-forms' import * as allKeaWindowValues from 'kea-window-values' import * as allKeaSubscriptions from 'kea-subscriptions' -import * as appsCommon from 'packages/apps-common' +import * as appsCommon from '@posthog/apps-common' +import * as lemonUi from '@posthog/lemon-ui' const packages = { react: React, @@ -16,6 +17,7 @@ const packages = { 'kea-subscriptions': allKeaSubscriptions, 'kea-window-values': allKeaWindowValues, '@posthog/apps-common': appsCommon, + '@posthog/lemon-ui': lemonUi, } /** Every `import` in a frontend app will be piped through here */ diff --git a/frontend/src/scenes/insights/WorldMap/WorldMap.scss b/frontend/src/scenes/insights/WorldMap/WorldMap.scss index 6dbad6a478a..1adae733b1c 100644 --- a/frontend/src/scenes/insights/WorldMap/WorldMap.scss +++ b/frontend/src/scenes/insights/WorldMap/WorldMap.scss @@ -1,7 +1,7 @@ .WorldMap { padding: 1rem 0; width: 100%; - color: hsl(0, 0, 85%); // Alpha-less equivalent of --border + color: hsl(0, 0%, 85%); // Alpha-less equivalent of --border .landxx { fill: currentColor; stroke: var(--bg-light); diff --git a/frontend/src/scenes/organization/Settings/InviteModal.tsx b/frontend/src/scenes/organization/Settings/InviteModal.tsx index 2a4dbbebb76..f1bcf5b8a4c 100644 --- a/frontend/src/scenes/organization/Settings/InviteModal.tsx +++ b/frontend/src/scenes/organization/Settings/InviteModal.tsx @@ -10,7 +10,7 @@ import { LemonButton } from 'lib/components/LemonButton' import { AlertMessage } from 'lib/components/AlertMessage' import { LemonModal } from 'lib/components/LemonModal' import { LemonDivider } from 'lib/components/LemonDivider' -import { LemonInput, LemonTextArea } from '~/packages/apps-common' +import { LemonTextArea, LemonInput } from '@posthog/lemon-ui' import { CopyToClipboardInline } from 'lib/components/CopyToClipboard' import { OrganizationInviteType } from '~/types' import { userLogic } from 'scenes/userLogic' diff --git a/frontend/src/scenes/plugins/source/PluginSource.tsx b/frontend/src/scenes/plugins/source/PluginSource.tsx index 9d4d7f0a34e..d7707016c77 100644 --- a/frontend/src/scenes/plugins/source/PluginSource.tsx +++ b/frontend/src/scenes/plugins/source/PluginSource.tsx @@ -54,7 +54,7 @@ export function PluginSource({ } import('./types/packages.json').then((files) => { for (const fileName in files) { - const fakePath = `file:///node_modules/@types/${fileName}` + const fakePath = `file:///node_modules/${fileName}` monaco?.languages.typescript.typescriptDefaults.addExtraLib(files[fileName], fakePath) } }) diff --git a/frontend/src/scenes/plugins/source/types/packages.json b/frontend/src/scenes/plugins/source/types/packages.json index 50f309851b2..934a4c5cf5a 100644 --- a/frontend/src/scenes/plugins/source/types/packages.json +++ b/frontend/src/scenes/plugins/source/types/packages.json @@ -1,5 +1,7 @@ { "@types/react/index.d.ts": "// Type definitions for React 16.14\n// Project: http://facebook.github.io/react/\n// Definitions by: Asana \n// AssureSign \n// Microsoft \n// John Reilly \n// Benoit Benezech \n// Patricio Zavolinsky \n// Digiguru \n// Eric Anderson \n// Dovydas Navickas \n// Josh Rutherford \n// Guilherme Hübner \n// Ferdy Budhidharma \n// Johann Rakotoharisoa \n// Olivier Pascal \n// Martin Hochel \n// Frank Li \n// Jessica Franco \n// Saransh Kataria \n// Kanitkorn Sujautra \n// Sebastian Silbermann \n// Kyle Scully \n// Cong Zhang \n// Dimitri Mitropoulos \n// JongChan Choi \n// Victor Magalhães \n// Dale Tan \n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n// TypeScript Version: 2.8\n\n// NOTE: Users of the `experimental` builds of React should add a reference\n// to 'react/experimental' in their project. See experimental.d.ts's top comment\n// for reference and documentation on how exactly to do it.\n\n/// \n\nimport * as CSS from 'csstype';\nimport * as PropTypes from 'prop-types';\n\ntype NativeAnimationEvent = AnimationEvent;\ntype NativeClipboardEvent = ClipboardEvent;\ntype NativeCompositionEvent = CompositionEvent;\ntype NativeDragEvent = DragEvent;\ntype NativeFocusEvent = FocusEvent;\ntype NativeKeyboardEvent = KeyboardEvent;\ntype NativeMouseEvent = MouseEvent;\ntype NativeTouchEvent = TouchEvent;\ntype NativePointerEvent = PointerEvent;\ntype NativeTransitionEvent = TransitionEvent;\ntype NativeUIEvent = UIEvent;\ntype NativeWheelEvent = WheelEvent;\ntype Booleanish = boolean | 'true' | 'false';\n\n/**\n * defined in scheduler/tracing\n */\ninterface SchedulerInteraction {\n id: number;\n name: string;\n timestamp: number;\n}\n\n// tslint:disable-next-line:export-just-namespace\nexport = React;\nexport as namespace React;\n\ndeclare namespace React {\n //\n // React Elements\n // ----------------------------------------------------------------------\n\n type ElementType

=\n {\n [K in keyof JSX.IntrinsicElements]: P extends JSX.IntrinsicElements[K] ? K : never\n }[keyof JSX.IntrinsicElements] |\n ComponentType

;\n /**\n * @deprecated Please use `ElementType`\n */\n type ReactType

= ElementType

;\n type ComponentType

= ComponentClass

| FunctionComponent

;\n\n type JSXElementConstructor

=\n | ((props: P) => ReactElement | null)\n | (new (props: P) => Component);\n\n interface RefObject {\n readonly current: T | null;\n }\n type RefCallback = { bivarianceHack(instance: T | null): void }[\"bivarianceHack\"];\n type Ref = RefCallback | RefObject | null;\n type LegacyRef = string | Ref;\n /**\n * Gets the instance type for a React element. The instance will be different for various component types:\n *\n * - React class components will be the class instance. So if you had `class Foo extends React.Component<{}> {}`\n * and used `React.ElementRef` then the type would be the instance of `Foo`.\n * - React stateless functional components do not have a backing instance and so `React.ElementRef`\n * (when `Bar` is `function Bar() {}`) will give you the `undefined` type.\n * - JSX intrinsics like `div` will give you their DOM instance. For `React.ElementRef<'div'>` that would be\n * `HTMLDivElement`. For `React.ElementRef<'input'>` that would be `HTMLInputElement`.\n * - React stateless functional components that forward a `ref` will give you the `ElementRef` of the forwarded\n * to component.\n *\n * `C` must be the type _of_ a React component so you need to use typeof as in React.ElementRef.\n *\n * @todo In Flow, this works a little different with forwarded refs and the `AbstractComponent` that\n * `React.forwardRef()` returns.\n */\n type ElementRef<\n C extends\n | ForwardRefExoticComponent\n | { new (props: any): Component }\n | ((props: any, context?: any) => ReactElement | null)\n | keyof JSX.IntrinsicElements\n > =\n // need to check first if `ref` is a valid prop for ts@3.0\n // otherwise it will infer `{}` instead of `never`\n \"ref\" extends keyof ComponentPropsWithRef\n ? NonNullable[\"ref\"]> extends Ref<\n infer Instance\n >\n ? Instance\n : never\n : never;\n\n type ComponentState = any;\n\n type Key = string | number;\n\n /**\n * @internal You shouldn't need to use this type since you never see these attributes\n * inside your component or have to validate them.\n */\n interface Attributes {\n key?: Key | null;\n }\n interface RefAttributes extends Attributes {\n ref?: Ref;\n }\n interface ClassAttributes extends Attributes {\n ref?: LegacyRef;\n }\n\n interface ReactElement

= string | JSXElementConstructor> {\n type: T;\n props: P;\n key: Key | null;\n }\n\n interface ReactComponentElement<\n T extends keyof JSX.IntrinsicElements | JSXElementConstructor,\n P = Pick, Exclude, 'key' | 'ref'>>\n > extends ReactElement> { }\n\n /**\n * @deprecated Please use `FunctionComponentElement`\n */\n type SFCElement

= FunctionComponentElement

;\n\n interface FunctionComponentElement

extends ReactElement> {\n ref?: 'ref' extends keyof P ? P extends { ref?: infer R } ? R : never : never;\n }\n\n type CElement> = ComponentElement;\n interface ComponentElement> extends ReactElement> {\n ref?: LegacyRef;\n }\n\n type ClassicElement

= CElement>;\n\n // string fallback for custom web-components\n interface DOMElement

| SVGAttributes, T extends Element> extends ReactElement {\n ref: LegacyRef;\n }\n\n // ReactHTML for ReactHTMLElement\n // tslint:disable-next-line:no-empty-interface\n interface ReactHTMLElement extends DetailedReactHTMLElement, T> { }\n\n interface DetailedReactHTMLElement

, T extends HTMLElement> extends DOMElement {\n type: keyof ReactHTML;\n }\n\n // ReactSVG for ReactSVGElement\n interface ReactSVGElement extends DOMElement, SVGElement> {\n type: keyof ReactSVG;\n }\n\n interface ReactPortal extends ReactElement {\n key: Key | null;\n children: ReactNode;\n }\n\n //\n // Factories\n // ----------------------------------------------------------------------\n\n type Factory

= (props?: Attributes & P, ...children: ReactNode[]) => ReactElement

;\n\n /**\n * @deprecated Please use `FunctionComponentFactory`\n */\n type SFCFactory

= FunctionComponentFactory

;\n\n type FunctionComponentFactory

= (props?: Attributes & P, ...children: ReactNode[]) => FunctionComponentElement

;\n\n type ComponentFactory> =\n (props?: ClassAttributes & P, ...children: ReactNode[]) => CElement;\n\n type CFactory> = ComponentFactory;\n type ClassicFactory

= CFactory>;\n\n type DOMFactory

, T extends Element> =\n (props?: ClassAttributes & P | null, ...children: ReactNode[]) => DOMElement;\n\n // tslint:disable-next-line:no-empty-interface\n interface HTMLFactory extends DetailedHTMLFactory, T> {}\n\n interface DetailedHTMLFactory

, T extends HTMLElement> extends DOMFactory {\n (props?: ClassAttributes & P | null, ...children: ReactNode[]): DetailedReactHTMLElement;\n }\n\n interface SVGFactory extends DOMFactory, SVGElement> {\n (props?: ClassAttributes & SVGAttributes | null, ...children: ReactNode[]): ReactSVGElement;\n }\n\n //\n // React Nodes\n // http://facebook.github.io/react/docs/glossary.html\n // ----------------------------------------------------------------------\n\n type ReactText = string | number;\n type ReactChild = ReactElement | ReactText;\n\n interface ReactNodeArray extends Array {}\n type ReactFragment = {} | ReactNodeArray;\n type ReactNode = ReactChild | ReactFragment | ReactPortal | boolean | null | undefined;\n\n //\n // Top Level API\n // ----------------------------------------------------------------------\n\n // DOM Elements\n function createFactory(\n type: keyof ReactHTML): HTMLFactory;\n function createFactory(\n type: keyof ReactSVG): SVGFactory;\n function createFactory

, T extends Element>(\n type: string): DOMFactory;\n\n // Custom components\n function createFactory

(type: FunctionComponent

): FunctionComponentFactory

;\n function createFactory

(\n type: ClassType, ClassicComponentClass

>): CFactory>;\n function createFactory, C extends ComponentClass

>(\n type: ClassType): CFactory;\n function createFactory

(type: ComponentClass

): Factory

;\n\n // DOM Elements\n // TODO: generalize this to everything in `keyof ReactHTML`, not just \"input\"\n function createElement(\n type: \"input\",\n props?: InputHTMLAttributes & ClassAttributes | null,\n ...children: ReactNode[]): DetailedReactHTMLElement, HTMLInputElement>;\n function createElement

, T extends HTMLElement>(\n type: keyof ReactHTML,\n props?: ClassAttributes & P | null,\n ...children: ReactNode[]): DetailedReactHTMLElement;\n function createElement

, T extends SVGElement>(\n type: keyof ReactSVG,\n props?: ClassAttributes & P | null,\n ...children: ReactNode[]): ReactSVGElement;\n function createElement

, T extends Element>(\n type: string,\n props?: ClassAttributes & P | null,\n ...children: ReactNode[]): DOMElement;\n\n // Custom components\n\n function createElement

(\n type: FunctionComponent

,\n props?: Attributes & P | null,\n ...children: ReactNode[]): FunctionComponentElement

;\n function createElement

(\n type: ClassType, ClassicComponentClass

>,\n props?: ClassAttributes> & P | null,\n ...children: ReactNode[]): CElement>;\n function createElement

, C extends ComponentClass

>(\n type: ClassType,\n props?: ClassAttributes & P | null,\n ...children: ReactNode[]): CElement;\n function createElement

(\n type: FunctionComponent

| ComponentClass

| string,\n props?: Attributes & P | null,\n ...children: ReactNode[]): ReactElement

;\n\n // DOM Elements\n // ReactHTMLElement\n function cloneElement

, T extends HTMLElement>(\n element: DetailedReactHTMLElement,\n props?: P,\n ...children: ReactNode[]): DetailedReactHTMLElement;\n // ReactHTMLElement, less specific\n function cloneElement

, T extends HTMLElement>(\n element: ReactHTMLElement,\n props?: P,\n ...children: ReactNode[]): ReactHTMLElement;\n // SVGElement\n function cloneElement

, T extends SVGElement>(\n element: ReactSVGElement,\n props?: P,\n ...children: ReactNode[]): ReactSVGElement;\n // DOM Element (has to be the last, because type checking stops at first overload that fits)\n function cloneElement

, T extends Element>(\n element: DOMElement,\n props?: DOMAttributes & P,\n ...children: ReactNode[]): DOMElement;\n\n // Custom components\n function cloneElement

(\n element: FunctionComponentElement

,\n props?: Partial

& Attributes,\n ...children: ReactNode[]): FunctionComponentElement

;\n function cloneElement>(\n element: CElement,\n props?: Partial

& ClassAttributes,\n ...children: ReactNode[]): CElement;\n function cloneElement

(\n element: ReactElement

,\n props?: Partial

& Attributes,\n ...children: ReactNode[]): ReactElement

;\n\n // Context via RenderProps\n interface ProviderProps {\n value: T;\n children?: ReactNode;\n }\n\n interface ConsumerProps {\n children: (value: T) => ReactNode;\n }\n\n // TODO: similar to how Fragment is actually a symbol, the values returned from createContext,\n // forwardRef and memo are actually objects that are treated specially by the renderer; see:\n // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/ReactContext.js#L35-L48\n // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/forwardRef.js#L42-L45\n // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/memo.js#L27-L31\n // However, we have no way of telling the JSX parser that it's a JSX element type or its props other than\n // by pretending to be a normal component.\n //\n // We don't just use ComponentType or SFC types because you are not supposed to attach statics to this\n // object, but rather to the original function.\n interface ExoticComponent

{\n /**\n * **NOTE**: Exotic components are not callable.\n */\n (props: P): (ReactElement|null);\n readonly $$typeof: symbol;\n }\n\n interface NamedExoticComponent

extends ExoticComponent

{\n displayName?: string;\n }\n\n interface ProviderExoticComponent

extends ExoticComponent

{\n propTypes?: WeakValidationMap

;\n }\n\n type ContextType> = C extends Context ? T : never;\n\n // NOTE: only the Context object itself can get a displayName\n // https://github.com/facebook/react-devtools/blob/e0b854e4c/backend/attachRendererFiber.js#L310-L325\n type Provider = ProviderExoticComponent>;\n type Consumer = ExoticComponent>;\n interface Context {\n Provider: Provider;\n Consumer: Consumer;\n displayName?: string;\n }\n function createContext(\n // If you thought this should be optional, see\n // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509#issuecomment-382213106\n defaultValue: T,\n ): Context;\n\n function isValidElement

(object: {} | null | undefined): object is ReactElement

;\n\n const Children: ReactChildren;\n const Fragment: ExoticComponent<{ children?: ReactNode }>;\n const StrictMode: ExoticComponent<{ children?: ReactNode }>;\n\n interface SuspenseProps {\n children?: ReactNode;\n\n /** A fallback react tree to show when a Suspense child (like React.lazy) suspends */\n fallback: NonNullable|null;\n }\n /**\n * This feature is not yet available for server-side rendering.\n * Suspense support will be added in a later release.\n */\n const Suspense: ExoticComponent;\n const version: string;\n\n /**\n * {@link https://github.com/bvaughn/rfcs/blob/profiler/text/0000-profiler.md#detailed-design | API}\n */\n type ProfilerOnRenderCallback = (\n id: string,\n phase: \"mount\" | \"update\",\n actualDuration: number,\n baseDuration: number,\n startTime: number,\n commitTime: number,\n interactions: Set,\n ) => void;\n interface ProfilerProps {\n children?: ReactNode;\n id: string;\n onRender: ProfilerOnRenderCallback;\n }\n\n const Profiler: ExoticComponent;\n\n //\n // Component API\n // ----------------------------------------------------------------------\n\n type ReactInstance = Component | Element;\n\n // Base component for plain JS classes\n // tslint:disable-next-line:no-empty-interface\n interface Component

extends ComponentLifecycle { }\n class Component {\n // tslint won't let me format the sample code in a way that vscode likes it :(\n /**\n * If set, `this.context` will be set at runtime to the current value of the given Context.\n *\n * Usage:\n *\n * ```ts\n * type MyContext = number\n * const Ctx = React.createContext(0)\n *\n * class Foo extends React.Component {\n * static contextType = Ctx\n * context!: React.ContextType\n * render () {\n * return <>My context's value: {this.context};\n * }\n * }\n * ```\n *\n * @see https://reactjs.org/docs/context.html#classcontexttype\n */\n static contextType?: Context;\n\n /**\n * If using the new style context, re-declare this in your class to be the\n * `React.ContextType` of your `static contextType`.\n * Should be used with type annotation or static contextType.\n *\n * ```ts\n * static contextType = MyContext\n * // For TS pre-3.7:\n * context!: React.ContextType\n * // For TS 3.7 and above:\n * declare context: React.ContextType\n * ```\n *\n * @see https://reactjs.org/docs/context.html\n */\n // TODO (TypeScript 3.0): unknown\n context: any;\n\n constructor(props: Readonly

| P);\n /**\n * @deprecated\n * @see https://reactjs.org/docs/legacy-context.html\n */\n constructor(props: P, context: any);\n\n // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.\n // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257\n // Also, the ` | S` allows intellisense to not be dumbisense\n setState(\n state: ((prevState: Readonly, props: Readonly

) => (Pick | S | null)) | (Pick | S | null),\n callback?: () => void\n ): void;\n\n forceUpdate(callback?: () => void): void;\n render(): ReactNode;\n\n // React.Props is now deprecated, which means that the `children`\n // property is not available on `P` by default, even though you can\n // always pass children as variadic arguments to `createElement`.\n // In the future, if we can define its call signature conditionally\n // on the existence of `children` in `P`, then we should remove this.\n readonly props: Readonly

& Readonly<{ children?: ReactNode }>;\n state: Readonly;\n /**\n * @deprecated\n * https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs\n */\n refs: {\n [key: string]: ReactInstance\n };\n }\n\n class PureComponent

extends Component { }\n\n interface ClassicComponent

extends Component {\n replaceState(nextState: S, callback?: () => void): void;\n isMounted(): boolean;\n getInitialState?(): S;\n }\n\n interface ChildContextProvider {\n getChildContext(): CC;\n }\n\n //\n // Class Interfaces\n // ----------------------------------------------------------------------\n\n /**\n * @deprecated as of recent React versions, function components can no\n * longer be considered 'stateless'. Please use `FunctionComponent` instead.\n *\n * @see [React Hooks](https://reactjs.org/docs/hooks-intro.html)\n */\n type SFC

= FunctionComponent

;\n\n /**\n * @deprecated as of recent React versions, function components can no\n * longer be considered 'stateless'. Please use `FunctionComponent` instead.\n *\n * @see [React Hooks](https://reactjs.org/docs/hooks-intro.html)\n */\n type StatelessComponent

= FunctionComponent

;\n\n type FC

= FunctionComponent

;\n\n interface FunctionComponent

{\n (props: PropsWithChildren

, context?: any): ReactElement | null;\n propTypes?: WeakValidationMap

;\n contextTypes?: ValidationMap;\n defaultProps?: Partial

;\n displayName?: string;\n }\n\n type VFC

= VoidFunctionComponent

;\n\n interface VoidFunctionComponent

{\n (props: P, context?: any): ReactElement | null;\n propTypes?: WeakValidationMap

;\n contextTypes?: ValidationMap;\n defaultProps?: Partial

;\n displayName?: string;\n }\n\n interface ForwardRefRenderFunction {\n (props: PropsWithChildren

, ref: ((instance: T | null) => void) | MutableRefObject | null): ReactElement | null;\n displayName?: string;\n // explicit rejected with `never` required due to\n // https://github.com/microsoft/TypeScript/issues/36826\n /**\n * defaultProps are not supported on render functions\n */\n defaultProps?: never;\n /**\n * propTypes are not supported on render functions\n */\n propTypes?: never;\n }\n\n /**\n * @deprecated Use ForwardRefRenderFunction. forwardRef doesn't accept a\n * \"real\" component.\n */\n interface RefForwardingComponent extends ForwardRefRenderFunction {}\n\n interface ComponentClass

extends StaticLifecycle {\n new (props: P, context?: any): Component;\n propTypes?: WeakValidationMap

;\n contextType?: Context;\n contextTypes?: ValidationMap;\n childContextTypes?: ValidationMap;\n defaultProps?: Partial

;\n displayName?: string;\n }\n\n interface ClassicComponentClass

extends ComponentClass

{\n new (props: P, context?: any): ClassicComponent;\n getDefaultProps?(): P;\n }\n\n /**\n * We use an intersection type to infer multiple type parameters from\n * a single argument, which is useful for many top-level API defs.\n * See https://github.com/Microsoft/TypeScript/issues/7234 for more info.\n */\n type ClassType, C extends ComponentClass

> =\n C &\n (new (props: P, context?: any) => T);\n\n //\n // Component Specs and Lifecycle\n // ----------------------------------------------------------------------\n\n // This should actually be something like `Lifecycle | DeprecatedLifecycle`,\n // as React will _not_ call the deprecated lifecycle methods if any of the new lifecycle\n // methods are present.\n interface ComponentLifecycle extends NewLifecycle, DeprecatedLifecycle {\n /**\n * Called immediately after a component is mounted. Setting state here will trigger re-rendering.\n */\n componentDidMount?(): void;\n /**\n * Called to determine whether the change in props and state should trigger a re-render.\n *\n * `Component` always returns true.\n * `PureComponent` implements a shallow comparison on props and state and returns true if any\n * props or states have changed.\n *\n * If false is returned, `Component#render`, `componentWillUpdate`\n * and `componentDidUpdate` will not be called.\n */\n shouldComponentUpdate?(nextProps: Readonly

, nextState: Readonly, nextContext: any): boolean;\n /**\n * Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as\n * cancelled network requests, or cleaning up any DOM elements created in `componentDidMount`.\n */\n componentWillUnmount?(): void;\n /**\n * Catches exceptions generated in descendant components. Unhandled exceptions will cause\n * the entire component tree to unmount.\n */\n componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;\n }\n\n // Unfortunately, we have no way of declaring that the component constructor must implement this\n interface StaticLifecycle {\n getDerivedStateFromProps?: GetDerivedStateFromProps;\n getDerivedStateFromError?: GetDerivedStateFromError;\n }\n\n type GetDerivedStateFromProps =\n /**\n * Returns an update to a component's state based on its new props and old state.\n *\n * Note: its presence prevents any of the deprecated lifecycle methods from being invoked\n */\n (nextProps: Readonly

, prevState: S) => Partial | null;\n\n type GetDerivedStateFromError =\n /**\n * This lifecycle is invoked after an error has been thrown by a descendant component.\n * It receives the error that was thrown as a parameter and should return a value to update state.\n *\n * Note: its presence prevents any of the deprecated lifecycle methods from being invoked\n */\n (error: any) => Partial | null;\n\n // This should be \"infer SS\" but can't use it yet\n interface NewLifecycle {\n /**\n * Runs before React applies the result of `render` to the document, and\n * returns an object to be given to componentDidUpdate. Useful for saving\n * things such as scroll position before `render` causes changes to it.\n *\n * Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated\n * lifecycle events from running.\n */\n getSnapshotBeforeUpdate?(prevProps: Readonly

, prevState: Readonly): SS | null;\n /**\n * Called immediately after updating occurs. Not called for the initial render.\n *\n * The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.\n */\n componentDidUpdate?(prevProps: Readonly

, prevState: Readonly, snapshot?: SS): void;\n }\n\n interface DeprecatedLifecycle {\n /**\n * Called immediately before mounting occurs, and before `Component#render`.\n * Avoid introducing any side-effects or subscriptions in this method.\n *\n * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\n * prevents this from being invoked.\n *\n * @deprecated 16.3, use componentDidMount or the constructor instead; will stop working in React 17\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path\n */\n componentWillMount?(): void;\n /**\n * Called immediately before mounting occurs, and before `Component#render`.\n * Avoid introducing any side-effects or subscriptions in this method.\n *\n * This method will not stop working in React 17.\n *\n * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\n * prevents this from being invoked.\n *\n * @deprecated 16.3, use componentDidMount or the constructor instead\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path\n */\n UNSAFE_componentWillMount?(): void;\n /**\n * Called when the component may be receiving new props.\n * React may call this even if props have not changed, so be sure to compare new and existing\n * props if you only want to handle changes.\n *\n * Calling `Component#setState` generally does not trigger this method.\n *\n * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\n * prevents this from being invoked.\n *\n * @deprecated 16.3, use static getDerivedStateFromProps instead; will stop working in React 17\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path\n */\n componentWillReceiveProps?(nextProps: Readonly

, nextContext: any): void;\n /**\n * Called when the component may be receiving new props.\n * React may call this even if props have not changed, so be sure to compare new and existing\n * props if you only want to handle changes.\n *\n * Calling `Component#setState` generally does not trigger this method.\n *\n * This method will not stop working in React 17.\n *\n * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\n * prevents this from being invoked.\n *\n * @deprecated 16.3, use static getDerivedStateFromProps instead\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path\n */\n UNSAFE_componentWillReceiveProps?(nextProps: Readonly

, nextContext: any): void;\n /**\n * Called immediately before rendering when new props or state is received. Not called for the initial render.\n *\n * Note: You cannot call `Component#setState` here.\n *\n * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\n * prevents this from being invoked.\n *\n * @deprecated 16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path\n */\n componentWillUpdate?(nextProps: Readonly

, nextState: Readonly, nextContext: any): void;\n /**\n * Called immediately before rendering when new props or state is received. Not called for the initial render.\n *\n * Note: You cannot call `Component#setState` here.\n *\n * This method will not stop working in React 17.\n *\n * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps\n * prevents this from being invoked.\n *\n * @deprecated 16.3, use getSnapshotBeforeUpdate instead\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update\n * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path\n */\n UNSAFE_componentWillUpdate?(nextProps: Readonly

, nextState: Readonly, nextContext: any): void;\n }\n\n interface Mixin extends ComponentLifecycle {\n mixins?: Array>;\n statics?: {\n [key: string]: any;\n };\n\n displayName?: string;\n propTypes?: ValidationMap;\n contextTypes?: ValidationMap;\n childContextTypes?: ValidationMap;\n\n getDefaultProps?(): P;\n getInitialState?(): S;\n }\n\n interface ComponentSpec extends Mixin {\n render(): ReactNode;\n\n [propertyName: string]: any;\n }\n\n function createRef(): RefObject;\n\n // will show `ForwardRef(${Component.displayName || Component.name})` in devtools by default,\n // but can be given its own specific name\n interface ForwardRefExoticComponent

extends NamedExoticComponent

{\n defaultProps?: Partial

;\n propTypes?: WeakValidationMap

;\n }\n\n function forwardRef(render: ForwardRefRenderFunction): ForwardRefExoticComponent & RefAttributes>;\n\n /** Ensures that the props do not include ref at all */\n type PropsWithoutRef

=\n // Just Pick would be sufficient for this, but I'm trying to avoid unnecessary mapping over union types\n // https://github.com/Microsoft/TypeScript/issues/28339\n 'ref' extends keyof P\n ? Pick>\n : P;\n /** Ensures that the props do not include string ref, which cannot be forwarded */\n type PropsWithRef

=\n // Just \"P extends { ref?: infer R }\" looks sufficient, but R will infer as {} if P is {}.\n 'ref' extends keyof P\n ? P extends { ref?: infer R }\n ? string extends R\n ? PropsWithoutRef

& { ref?: Exclude }\n : P\n : P\n : P;\n\n type PropsWithChildren

= P & { children?: ReactNode };\n\n /**\n * NOTE: prefer ComponentPropsWithRef, if the ref is forwarded,\n * or ComponentPropsWithoutRef when refs are not supported.\n */\n type ComponentProps> =\n T extends JSXElementConstructor\n ? P\n : T extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[T]\n : {};\n type ComponentPropsWithRef =\n T extends ComponentClass\n ? PropsWithoutRef

& RefAttributes>\n : PropsWithRef>;\n type ComponentPropsWithoutRef =\n PropsWithoutRef>;\n\n // will show `Memo(${Component.displayName || Component.name})` in devtools by default,\n // but can be given its own specific name\n type MemoExoticComponent> = NamedExoticComponent> & {\n readonly type: T;\n };\n\n function memo

(\n Component: SFC

,\n propsAreEqual?: (prevProps: Readonly>, nextProps: Readonly>) => boolean\n ): NamedExoticComponent

;\n function memo>(\n Component: T,\n propsAreEqual?: (prevProps: Readonly>, nextProps: Readonly>) => boolean\n ): MemoExoticComponent;\n\n type LazyExoticComponent> = ExoticComponent> & {\n readonly _result: T;\n };\n\n function lazy>(\n factory: () => Promise<{ default: T }>\n ): LazyExoticComponent;\n\n //\n // React Hooks\n // ----------------------------------------------------------------------\n\n // based on the code in https://github.com/facebook/react/pull/13968\n\n // Unlike the class component setState, the updates are not allowed to be partial\n type SetStateAction = S | ((prevState: S) => S);\n // this technically does accept a second argument, but it's already under a deprecation warning\n // and it's not even released so probably better to not define it.\n type Dispatch = (value: A) => void;\n // Since action _can_ be undefined, dispatch may be called without any parameters.\n type DispatchWithoutAction = () => void;\n // Unlike redux, the actions _can_ be anything\n type Reducer = (prevState: S, action: A) => S;\n // If useReducer accepts a reducer without action, dispatch may be called without any parameters.\n type ReducerWithoutAction = (prevState: S) => S;\n // types used to try and prevent the compiler from reducing S\n // to a supertype common with the second argument to useReducer()\n type ReducerState> = R extends Reducer ? S : never;\n type ReducerAction> = R extends Reducer ? A : never;\n // The identity check is done with the SameValue algorithm (Object.is), which is stricter than ===\n type ReducerStateWithoutAction> =\n R extends ReducerWithoutAction ? S : never;\n // TODO (TypeScript 3.0): ReadonlyArray\n type DependencyList = ReadonlyArray;\n\n // NOTE: callbacks are _only_ allowed to return either void, or a destructor.\n // The destructor is itself only allowed to return void.\n type EffectCallback = () => (void | (() => void | undefined));\n\n interface MutableRefObject {\n current: T;\n }\n\n // This will technically work if you give a Consumer or Provider but it's deprecated and warns\n /**\n * Accepts a context object (the value returned from `React.createContext`) and returns the current\n * context value, as given by the nearest context provider for the given context.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#usecontext\n */\n function useContext(context: Context/*, (not public API) observedBits?: number|boolean */): T;\n /**\n * Returns a stateful value, and a function to update it.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#usestate\n */\n function useState(initialState: S | (() => S)): [S, Dispatch>];\n // convenience overload when first argument is omitted\n /**\n * Returns a stateful value, and a function to update it.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#usestate\n */\n function useState(): [S | undefined, Dispatch>];\n /**\n * An alternative to `useState`.\n *\n * `useReducer` is usually preferable to `useState` when you have complex state logic that involves\n * multiple sub-values. It also lets you optimize performance for components that trigger deep\n * updates because you can pass `dispatch` down instead of callbacks.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#usereducer\n */\n // overload where dispatch could accept 0 arguments.\n function useReducer, I>(\n reducer: R,\n initializerArg: I,\n initializer: (arg: I) => ReducerStateWithoutAction\n ): [ReducerStateWithoutAction, DispatchWithoutAction];\n /**\n * An alternative to `useState`.\n *\n * `useReducer` is usually preferable to `useState` when you have complex state logic that involves\n * multiple sub-values. It also lets you optimize performance for components that trigger deep\n * updates because you can pass `dispatch` down instead of callbacks.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#usereducer\n */\n // overload where dispatch could accept 0 arguments.\n function useReducer>(\n reducer: R,\n initializerArg: ReducerStateWithoutAction,\n initializer?: undefined\n ): [ReducerStateWithoutAction, DispatchWithoutAction];\n /**\n * An alternative to `useState`.\n *\n * `useReducer` is usually preferable to `useState` when you have complex state logic that involves\n * multiple sub-values. It also lets you optimize performance for components that trigger deep\n * updates because you can pass `dispatch` down instead of callbacks.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#usereducer\n */\n // overload where \"I\" may be a subset of ReducerState; used to provide autocompletion.\n // If \"I\" matches ReducerState exactly then the last overload will allow initializer to be omitted.\n // the last overload effectively behaves as if the identity function (x => x) is the initializer.\n function useReducer, I>(\n reducer: R,\n initializerArg: I & ReducerState,\n initializer: (arg: I & ReducerState) => ReducerState\n ): [ReducerState, Dispatch>];\n /**\n * An alternative to `useState`.\n *\n * `useReducer` is usually preferable to `useState` when you have complex state logic that involves\n * multiple sub-values. It also lets you optimize performance for components that trigger deep\n * updates because you can pass `dispatch` down instead of callbacks.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#usereducer\n */\n // overload for free \"I\"; all goes as long as initializer converts it into \"ReducerState\".\n function useReducer, I>(\n reducer: R,\n initializerArg: I,\n initializer: (arg: I) => ReducerState\n ): [ReducerState, Dispatch>];\n /**\n * An alternative to `useState`.\n *\n * `useReducer` is usually preferable to `useState` when you have complex state logic that involves\n * multiple sub-values. It also lets you optimize performance for components that trigger deep\n * updates because you can pass `dispatch` down instead of callbacks.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#usereducer\n */\n\n // I'm not sure if I keep this 2-ary or if I make it (2,3)-ary; it's currently (2,3)-ary.\n // The Flow types do have an overload for 3-ary invocation with undefined initializer.\n\n // NOTE: without the ReducerState indirection, TypeScript would reduce S to be the most common\n // supertype between the reducer's return type and the initialState (or the initializer's return type),\n // which would prevent autocompletion from ever working.\n\n // TODO: double-check if this weird overload logic is necessary. It is possible it's either a bug\n // in older versions, or a regression in newer versions of the typescript completion service.\n function useReducer>(\n reducer: R,\n initialState: ReducerState,\n initializer?: undefined\n ): [ReducerState, Dispatch>];\n /**\n * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument\n * (`initialValue`). The returned object will persist for the full lifetime of the component.\n *\n * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable\n * value around similar to how you’d use instance fields in classes.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n */\n // TODO (TypeScript 3.0): \n function useRef(initialValue: T): MutableRefObject;\n // convenience overload for refs given as a ref prop as they typically start with a null value\n /**\n * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument\n * (`initialValue`). The returned object will persist for the full lifetime of the component.\n *\n * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable\n * value around similar to how you’d use instance fields in classes.\n *\n * Usage note: if you need the result of useRef to be directly mutable, include `| null` in the type\n * of the generic argument.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n */\n // TODO (TypeScript 3.0): \n function useRef(initialValue: T|null): RefObject;\n // convenience overload for potentially undefined initialValue / call with 0 arguments\n // has a default to stop it from defaulting to {} instead\n /**\n * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument\n * (`initialValue`). The returned object will persist for the full lifetime of the component.\n *\n * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable\n * value around similar to how you’d use instance fields in classes.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n */\n // TODO (TypeScript 3.0): \n function useRef(): MutableRefObject;\n /**\n * The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations.\n * Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside\n * `useLayoutEffect` will be flushed synchronously, before the browser has a chance to paint.\n *\n * Prefer the standard `useEffect` when possible to avoid blocking visual updates.\n *\n * If you’re migrating code from a class component, `useLayoutEffect` fires in the same phase as\n * `componentDidMount` and `componentDidUpdate`.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\n function useLayoutEffect(effect: EffectCallback, deps?: DependencyList): void;\n /**\n * Accepts a function that contains imperative, possibly effectful code.\n *\n * @param effect Imperative function that can return a cleanup function\n * @param deps If present, effect will only activate if the values in the list change.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#useeffect\n */\n function useEffect(effect: EffectCallback, deps?: DependencyList): void;\n // NOTE: this does not accept strings, but this will have to be fixed by removing strings from type Ref\n /**\n * `useImperativeHandle` customizes the instance value that is exposed to parent components when using\n * `ref`. As always, imperative code using refs should be avoided in most cases.\n *\n * `useImperativeHandle` should be used with `React.forwardRef`.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle\n */\n function useImperativeHandle(ref: Ref|undefined, init: () => R, deps?: DependencyList): void;\n // I made 'inputs' required here and in useMemo as there's no point to memoizing without the memoization key\n // useCallback(X) is identical to just using X, useMemo(() => Y) is identical to just using Y.\n /**\n * `useCallback` will return a memoized version of the callback that only changes if one of the `inputs`\n * has changed.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#usecallback\n */\n // TODO (TypeScript 3.0): unknown>\n function useCallback any>(callback: T, deps: DependencyList): T;\n /**\n * `useMemo` will only recompute the memoized value when one of the `deps` has changed.\n *\n * Usage note: if calling `useMemo` with a referentially stable function, also give it as the input in\n * the second argument.\n *\n * ```ts\n * function expensive () { ... }\n *\n * function Component () {\n * const expensiveResult = useMemo(expensive, [expensive])\n * return ...\n * }\n * ```\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#usememo\n */\n // allow undefined, but don't make it optional as that is very likely a mistake\n function useMemo(factory: () => T, deps: DependencyList | undefined): T;\n /**\n * `useDebugValue` can be used to display a label for custom hooks in React DevTools.\n *\n * NOTE: We don’t recommend adding debug values to every custom hook.\n * It’s most valuable for custom hooks that are part of shared libraries.\n *\n * @version 16.8.0\n * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue\n */\n // the name of the custom hook is itself derived from the function name at runtime:\n // it's just the function name without the \"use\" prefix.\n function useDebugValue(value: T, format?: (value: T) => any): void;\n\n //\n // Event System\n // ----------------------------------------------------------------------\n // TODO: change any to unknown when moving to TS v3\n interface BaseSyntheticEvent {\n nativeEvent: E;\n currentTarget: C;\n target: T;\n bubbles: boolean;\n cancelable: boolean;\n defaultPrevented: boolean;\n eventPhase: number;\n isTrusted: boolean;\n preventDefault(): void;\n isDefaultPrevented(): boolean;\n stopPropagation(): void;\n isPropagationStopped(): boolean;\n persist(): void;\n timeStamp: number;\n type: string;\n }\n\n /**\n * currentTarget - a reference to the element on which the event listener is registered.\n *\n * target - a reference to the element from which the event was originally dispatched.\n * This might be a child element to the element on which the event listener is registered.\n * If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11508#issuecomment-256045682\n */\n interface SyntheticEvent extends BaseSyntheticEvent {}\n\n interface ClipboardEvent extends SyntheticEvent {\n clipboardData: DataTransfer;\n }\n\n interface CompositionEvent extends SyntheticEvent {\n data: string;\n }\n\n interface DragEvent extends MouseEvent {\n dataTransfer: DataTransfer;\n }\n\n interface PointerEvent extends MouseEvent {\n pointerId: number;\n pressure: number;\n tangentialPressure: number;\n tiltX: number;\n tiltY: number;\n twist: number;\n width: number;\n height: number;\n pointerType: 'mouse' | 'pen' | 'touch';\n isPrimary: boolean;\n }\n\n interface FocusEvent extends SyntheticEvent {\n relatedTarget: EventTarget | null;\n target: EventTarget & T;\n }\n\n // tslint:disable-next-line:no-empty-interface\n interface FormEvent extends SyntheticEvent {\n }\n\n interface InvalidEvent extends SyntheticEvent {\n target: EventTarget & T;\n }\n\n interface ChangeEvent extends SyntheticEvent {\n target: EventTarget & T;\n }\n\n interface KeyboardEvent extends SyntheticEvent {\n altKey: boolean;\n /** @deprecated */\n charCode: number;\n ctrlKey: boolean;\n /**\n * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.\n */\n getModifierState(key: string): boolean;\n /**\n * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values\n */\n key: string;\n /** @deprecated */\n keyCode: number;\n locale: string;\n location: number;\n metaKey: boolean;\n repeat: boolean;\n shiftKey: boolean;\n /** @deprecated */\n which: number;\n }\n\n interface MouseEvent extends UIEvent {\n altKey: boolean;\n button: number;\n buttons: number;\n clientX: number;\n clientY: number;\n ctrlKey: boolean;\n /**\n * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.\n */\n getModifierState(key: string): boolean;\n metaKey: boolean;\n movementX: number;\n movementY: number;\n pageX: number;\n pageY: number;\n relatedTarget: EventTarget | null;\n screenX: number;\n screenY: number;\n shiftKey: boolean;\n }\n\n interface TouchEvent extends UIEvent {\n altKey: boolean;\n changedTouches: TouchList;\n ctrlKey: boolean;\n /**\n * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.\n */\n getModifierState(key: string): boolean;\n metaKey: boolean;\n shiftKey: boolean;\n targetTouches: TouchList;\n touches: TouchList;\n }\n\n interface UIEvent extends SyntheticEvent {\n detail: number;\n view: AbstractView;\n }\n\n interface WheelEvent extends MouseEvent {\n deltaMode: number;\n deltaX: number;\n deltaY: number;\n deltaZ: number;\n }\n\n interface AnimationEvent extends SyntheticEvent {\n animationName: string;\n elapsedTime: number;\n pseudoElement: string;\n }\n\n interface TransitionEvent extends SyntheticEvent {\n elapsedTime: number;\n propertyName: string;\n pseudoElement: string;\n }\n\n //\n // Event Handler Types\n // ----------------------------------------------------------------------\n\n type EventHandler> = { bivarianceHack(event: E): void }[\"bivarianceHack\"];\n\n type ReactEventHandler = EventHandler>;\n\n type ClipboardEventHandler = EventHandler>;\n type CompositionEventHandler = EventHandler>;\n type DragEventHandler = EventHandler>;\n type FocusEventHandler = EventHandler>;\n type FormEventHandler = EventHandler>;\n type ChangeEventHandler = EventHandler>;\n type KeyboardEventHandler = EventHandler>;\n type MouseEventHandler = EventHandler>;\n type TouchEventHandler = EventHandler>;\n type PointerEventHandler = EventHandler>;\n type UIEventHandler = EventHandler>;\n type WheelEventHandler = EventHandler>;\n type AnimationEventHandler = EventHandler>;\n type TransitionEventHandler = EventHandler>;\n\n //\n // Props / DOM Attributes\n // ----------------------------------------------------------------------\n\n /**\n * @deprecated. This was used to allow clients to pass `ref` and `key`\n * to `createElement`, which is no longer necessary due to intersection\n * types. If you need to declare a props object before passing it to\n * `createElement` or a factory, use `ClassAttributes`:\n *\n * ```ts\n * var b: Button | null;\n * var props: ButtonProps & ClassAttributes