From 3392ef4071417805a1cd5f42d877cfac3a2ce0a6 Mon Sep 17 00:00:00 2001 From: atanasster Date: Thu, 18 Feb 2021 23:16:32 -0500 Subject: [PATCH] fix: avatar search lookup --- .../test/__snapshots__/esm-async.test.ts.snap | 16 ++-- .../test/__snapshots__/esm-doc.test.ts.snap | 24 +++--- .../__snapshots__/esm-hoisted.test.ts.snap | 16 ++-- .../esm-named-exports.test.ts.snap | 12 +-- .../__snapshots__/esm-parameters.test.ts.snap | 16 ++-- .../esm-props-info-external.test.ts.snap | 4 +- .../__snapshots__/esm-props-info.test.ts.snap | 20 ++--- .../esm-props-usage.test.ts.snap | 56 ++++++------- .../__snapshots__/esm-stories.test.ts.snap | 36 ++++---- .../__snapshots__/esm-template.test.ts.snap | 8 +- .../__snapshots__/esm-toggle.test.ts.snap | 4 +- .../extract-component.test.ts.snap | 36 ++++---- .../test/__snapshots__/mdx-async.test.ts.snap | 4 +- .../__snapshots__/mdx-stories.test.ts.snap | 32 +++---- .../__snapshots__/mdx-template.test.ts.snap | 4 +- .../__snapshots__/package-info.test.ts.snap | 4 +- .../react-typescript.test.ts.snap | 8 +- ui/blocks/src/Title/Title.tsx | 4 +- .../GithubAvatarList/GithubAvatar.stories.tsx | 30 +++++++ ...{GithubAvatarItem.tsx => GithubAvatar.tsx} | 60 +++++++------- .../src/GithubAvatarList/GithubAvatarList.tsx | 8 +- ui/components/src/GithubAvatarList/index.ts | 1 + .../src/GithubAvatarList/useGithubProfile.tsx | 83 +++++++++++++++---- ui/components/src/index.ts | 1 - 24 files changed, 287 insertions(+), 200 deletions(-) create mode 100644 ui/components/src/GithubAvatarList/GithubAvatar.stories.tsx rename ui/components/src/GithubAvatarList/{GithubAvatarItem.tsx => GithubAvatar.tsx} (75%) diff --git a/core/instrument/test/__snapshots__/esm-async.test.ts.snap b/core/instrument/test/__snapshots__/esm-async.test.ts.snap index e0d53b7ed..3ab98effd 100644 --- a/core/instrument/test/__snapshots__/esm-async.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-async.test.ts.snap @@ -17,7 +17,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -57,7 +57,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -101,7 +101,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -141,7 +141,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -201,7 +201,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -241,7 +241,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -285,7 +285,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -325,7 +325,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { diff --git a/core/instrument/test/__snapshots__/esm-doc.test.ts.snap b/core/instrument/test/__snapshots__/esm-doc.test.ts.snap index 7d8696b1c..5cdca1a10 100644 --- a/core/instrument/test/__snapshots__/esm-doc.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-doc.test.ts.snap @@ -28,7 +28,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -68,14 +68,14 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, "73cac298d983c71aec166657453a64fe": Object { "dependencies": Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -115,7 +115,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object {}, @@ -163,7 +163,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -203,14 +203,14 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, "eef0b4fe04a3c49402964c3c8dbe5bc8": Object { "dependencies": Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -250,7 +250,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object {}, @@ -287,7 +287,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -327,7 +327,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object {}, @@ -357,7 +357,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -397,7 +397,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object {}, diff --git a/core/instrument/test/__snapshots__/esm-hoisted.test.ts.snap b/core/instrument/test/__snapshots__/esm-hoisted.test.ts.snap index 333a26262..2660d3af6 100644 --- a/core/instrument/test/__snapshots__/esm-hoisted.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-hoisted.test.ts.snap @@ -24,7 +24,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -64,14 +64,14 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, "f287f1a0ceeea6cbbc4c37123d236d06": Object { "dependencies": Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -111,7 +111,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -164,7 +164,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -204,7 +204,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -271,7 +271,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -311,7 +311,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { diff --git a/core/instrument/test/__snapshots__/esm-named-exports.test.ts.snap b/core/instrument/test/__snapshots__/esm-named-exports.test.ts.snap index 9c85b50a8..39f57e20c 100644 --- a/core/instrument/test/__snapshots__/esm-named-exports.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-named-exports.test.ts.snap @@ -17,7 +17,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -57,7 +57,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -106,7 +106,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -146,7 +146,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -195,7 +195,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -235,7 +235,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object {}, diff --git a/core/instrument/test/__snapshots__/esm-parameters.test.ts.snap b/core/instrument/test/__snapshots__/esm-parameters.test.ts.snap index 93ad6006d..55d3e5121 100644 --- a/core/instrument/test/__snapshots__/esm-parameters.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-parameters.test.ts.snap @@ -24,7 +24,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -64,14 +64,14 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, "88c5aea0fddc19a67df23e2335e64036": Object { "dependencies": Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -111,7 +111,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -166,7 +166,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -206,7 +206,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -275,7 +275,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -315,7 +315,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { diff --git a/core/instrument/test/__snapshots__/esm-props-info-external.test.ts.snap b/core/instrument/test/__snapshots__/esm-props-info-external.test.ts.snap index f264871f2..080742dbd 100644 --- a/core/instrument/test/__snapshots__/esm-props-info-external.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-props-info-external.test.ts.snap @@ -3068,7 +3068,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -3108,7 +3108,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, "8f6835169f285fcd3ad5425d9268a8f1": Object { "dependencies": Object { diff --git a/core/instrument/test/__snapshots__/esm-props-info.test.ts.snap b/core/instrument/test/__snapshots__/esm-props-info.test.ts.snap index e3bca5921..e6ccab082 100644 --- a/core/instrument/test/__snapshots__/esm-props-info.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-props-info.test.ts.snap @@ -395,12 +395,12 @@ Object { "packages": Object { "5633741e98073052cbece6fcd32011e3": Object { "dependencies": Object { - "@component-controls/components": "^2.7.0", - "@component-controls/core": "^2.7.0", - "@component-controls/editors": "^2.7.0", - "@component-controls/render": "^2.7.0", - "@component-controls/search-algolia": "^2.7.0", - "@component-controls/store": "^2.7.0", + "@component-controls/components": "^2.8.0", + "@component-controls/core": "^2.8.0", + "@component-controls/editors": "^2.8.0", + "@component-controls/render": "^2.8.0", + "@component-controls/search-algolia": "^2.8.0", + "@component-controls/store": "^2.8.0", "@theme-ui/css": "^0.6.0-alpha.6", "copy-to-clipboard": "^3.2.1", "global": "^4.3.2", @@ -413,7 +413,7 @@ Object { "theme-ui": "^0.6.0-alpha.6", }, "devDependencies": Object { - "@component-controls/jest-snapshots": "^2.7.0", + "@component-controls/jest-snapshots": "^2.8.0", "@component-controls/ts-markdown-docs": "^2.6.0", "@primer/octicons-react": "^10.0.0", "@theme-ui/presets": "^0.6.0-alpha.6", @@ -444,14 +444,14 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, "942f7c3f19d9e197f86041eed5e46838": Object { "dependencies": Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -491,7 +491,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object {}, diff --git a/core/instrument/test/__snapshots__/esm-props-usage.test.ts.snap b/core/instrument/test/__snapshots__/esm-props-usage.test.ts.snap index 71a659c1a..fd05b105f 100644 --- a/core/instrument/test/__snapshots__/esm-props-usage.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-props-usage.test.ts.snap @@ -17,7 +17,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -57,7 +57,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -138,7 +138,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -178,7 +178,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -287,7 +287,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -327,7 +327,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -418,7 +418,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -458,7 +458,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -567,7 +567,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -607,7 +607,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -722,7 +722,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -762,7 +762,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -959,7 +959,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -999,7 +999,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -1075,7 +1075,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -1115,7 +1115,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -1221,7 +1221,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -1261,7 +1261,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -1370,7 +1370,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -1410,7 +1410,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -1527,7 +1527,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -1567,7 +1567,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -1741,7 +1741,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -1781,7 +1781,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -1871,7 +1871,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -1911,7 +1911,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -2035,7 +2035,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -2075,7 +2075,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { diff --git a/core/instrument/test/__snapshots__/esm-stories.test.ts.snap b/core/instrument/test/__snapshots__/esm-stories.test.ts.snap index c9b79ac10..f2224dd97 100644 --- a/core/instrument/test/__snapshots__/esm-stories.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-stories.test.ts.snap @@ -17,7 +17,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -57,7 +57,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object {}, @@ -86,7 +86,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -126,7 +126,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -170,7 +170,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -210,7 +210,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object {}, @@ -237,7 +237,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -277,7 +277,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -336,7 +336,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -376,7 +376,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -493,7 +493,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -533,7 +533,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -606,7 +606,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -646,7 +646,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -734,7 +734,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -774,7 +774,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -862,7 +862,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -902,7 +902,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { diff --git a/core/instrument/test/__snapshots__/esm-template.test.ts.snap b/core/instrument/test/__snapshots__/esm-template.test.ts.snap index 4c20337e8..0da4e0acd 100644 --- a/core/instrument/test/__snapshots__/esm-template.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-template.test.ts.snap @@ -158,7 +158,7 @@ export const Button: FC = props => ( "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -198,14 +198,14 @@ export const Button: FC = props => ( "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, "fbea66d4bd64ea2b935855efa5d522a1": Object { "dependencies": Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -245,7 +245,7 @@ export const Button: FC = props => ( "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { diff --git a/core/instrument/test/__snapshots__/esm-toggle.test.ts.snap b/core/instrument/test/__snapshots__/esm-toggle.test.ts.snap index da13e479a..cb008c34f 100644 --- a/core/instrument/test/__snapshots__/esm-toggle.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-toggle.test.ts.snap @@ -26,7 +26,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -66,7 +66,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { diff --git a/core/instrument/test/__snapshots__/extract-component.test.ts.snap b/core/instrument/test/__snapshots__/extract-component.test.ts.snap index 8631c52ef..6940726b6 100644 --- a/core/instrument/test/__snapshots__/extract-component.test.ts.snap +++ b/core/instrument/test/__snapshots__/extract-component.test.ts.snap @@ -30,7 +30,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -70,7 +70,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, } `; @@ -105,7 +105,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -145,7 +145,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, } `; @@ -244,7 +244,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -284,7 +284,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, } `; @@ -299,7 +299,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -339,7 +339,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, } `; @@ -356,7 +356,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -396,7 +396,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, } `; @@ -431,7 +431,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -471,7 +471,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, } `; @@ -575,7 +575,7 @@ Object { "theme-ui": "^0.6.0-alpha.6", }, "devDependencies": Object { - "@component-controls/jest-snapshots": "^2.7.0", + "@component-controls/jest-snapshots": "^2.8.0", "@component-controls/ts-markdown-docs": "^2.6.0", "@theme-ui/css": "^0.6.0-alpha.6", "@types/markdown-to-jsx": "^6.11.0", @@ -601,7 +601,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, } `; @@ -647,7 +647,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -687,7 +687,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, } `; @@ -722,7 +722,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -762,7 +762,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, } `; diff --git a/core/instrument/test/__snapshots__/mdx-async.test.ts.snap b/core/instrument/test/__snapshots__/mdx-async.test.ts.snap index 60f82efc7..02b02c242 100644 --- a/core/instrument/test/__snapshots__/mdx-async.test.ts.snap +++ b/core/instrument/test/__snapshots__/mdx-async.test.ts.snap @@ -33,7 +33,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -73,7 +73,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { diff --git a/core/instrument/test/__snapshots__/mdx-stories.test.ts.snap b/core/instrument/test/__snapshots__/mdx-stories.test.ts.snap index 6320f57da..b46605e1a 100644 --- a/core/instrument/test/__snapshots__/mdx-stories.test.ts.snap +++ b/core/instrument/test/__snapshots__/mdx-stories.test.ts.snap @@ -33,7 +33,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -73,7 +73,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object {}, @@ -122,7 +122,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -162,7 +162,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -296,7 +296,7 @@ export default Button; "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -336,14 +336,14 @@ export default Button; "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, "ceea0565a65f75c8c7b6b355d6d335ac": Object { "dependencies": Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -383,7 +383,7 @@ export default Button; "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -450,7 +450,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -490,7 +490,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -631,7 +631,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -671,7 +671,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -782,7 +782,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -822,7 +822,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { @@ -918,7 +918,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -958,7 +958,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { diff --git a/core/instrument/test/__snapshots__/mdx-template.test.ts.snap b/core/instrument/test/__snapshots__/mdx-template.test.ts.snap index ce93a94fc..e93b50ded 100644 --- a/core/instrument/test/__snapshots__/mdx-template.test.ts.snap +++ b/core/instrument/test/__snapshots__/mdx-template.test.ts.snap @@ -41,7 +41,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -81,7 +81,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "stories": Object { diff --git a/core/instrument/test/__snapshots__/package-info.test.ts.snap b/core/instrument/test/__snapshots__/package-info.test.ts.snap index 565e4c453..8b7e8350e 100644 --- a/core/instrument/test/__snapshots__/package-info.test.ts.snap +++ b/core/instrument/test/__snapshots__/package-info.test.ts.snap @@ -6,7 +6,7 @@ Object { "@babel/generator": "^7.12.5", "@babel/parser": "^7.12.5", "@babel/traverse": "^7.12.5", - "@component-controls/core": "^2.7.0", + "@component-controls/core": "^2.8.0", "@hutson/parse-repository-url": "^5.0.0", "@mdx-js/loader": "^1.5.5", "@mdx-js/react": "^1.6.5", @@ -46,7 +46,7 @@ Object { "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", } `; diff --git a/core/webpack-compile/tests/__snapshots__/react-typescript.test.ts.snap b/core/webpack-compile/tests/__snapshots__/react-typescript.test.ts.snap index 213d73dae..ca06f74f4 100644 --- a/core/webpack-compile/tests/__snapshots__/react-typescript.test.ts.snap +++ b/core/webpack-compile/tests/__snapshots__/react-typescript.test.ts.snap @@ -681,7 +681,7 @@ export const ActionBar: FC = ({ "theme-ui": "^0.6.0-alpha.6", }, "devDependencies": Object { - "@component-controls/jest-snapshots": "^2.7.0", + "@component-controls/jest-snapshots": "^2.8.0", "@component-controls/ts-markdown-docs": "^2.6.0", "@theme-ui/css": "^0.6.0-alpha.6", "@types/markdown-to-jsx": "^6.11.0", @@ -707,7 +707,7 @@ export const ActionBar: FC = ({ "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, "fded7dbaa855ea6869a794f877eab680": Object { "dependencies": Object { @@ -729,7 +729,7 @@ export const ActionBar: FC = ({ "theme-ui": "^0.6.0-alpha.6", }, "devDependencies": Object { - "@component-controls/jest-snapshots": "^2.7.0", + "@component-controls/jest-snapshots": "^2.8.0", "@component-controls/ts-markdown-docs": "^2.6.0", "@theme-ui/css": "^0.6.0-alpha.6", "@types/markdown-to-jsx": "^6.11.0", @@ -755,7 +755,7 @@ export const ActionBar: FC = ({ "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", "issues": "https://github.com/ccontrols/component-controls/issues", }, - "version": "2.7.0", + "version": "2.8.0", }, }, "search": [Function], diff --git a/ui/blocks/src/Title/Title.tsx b/ui/blocks/src/Title/Title.tsx index 9624109d0..74eb5aae6 100644 --- a/ui/blocks/src/Title/Title.tsx +++ b/ui/blocks/src/Title/Title.tsx @@ -45,7 +45,9 @@ export const Title: FC = ({ {...rest} > {title} - {contributors && } + {component?.info?.displayName === title && contributors && ( + + )} ) : null; }; diff --git a/ui/components/src/GithubAvatarList/GithubAvatar.stories.tsx b/ui/components/src/GithubAvatarList/GithubAvatar.stories.tsx new file mode 100644 index 000000000..e278eb8f4 --- /dev/null +++ b/ui/components/src/GithubAvatarList/GithubAvatar.stories.tsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Document, Example } from '@component-controls/core'; +import { GithubAvatar, GithubAvatarProps } from './GithubAvatar'; + +export default { + title: 'Components/GithubAvatar', + component: GithubAvatar, + category: 'Display', +} as Document; + +export const overview: Example = ({ + size, + overlap, + username, + useremail, +}) => { + return ( + + ); +}; + +overview.controls = { + username: 'Atanas Stoyanov', + useremail: 'atanasster@gmail.com', +}; diff --git a/ui/components/src/GithubAvatarList/GithubAvatarItem.tsx b/ui/components/src/GithubAvatarList/GithubAvatar.tsx similarity index 75% rename from ui/components/src/GithubAvatarList/GithubAvatarItem.tsx rename to ui/components/src/GithubAvatarList/GithubAvatar.tsx index 8998ccb2d..23e6877df 100644 --- a/ui/components/src/GithubAvatarList/GithubAvatarItem.tsx +++ b/ui/components/src/GithubAvatarList/GithubAvatar.tsx @@ -1,13 +1,13 @@ /** @jsx jsx */ import { FC, ReactNode } from 'react'; -import { jsx, Avatar } from 'theme-ui'; +import { jsx, Avatar, BoxProps } from 'theme-ui'; import { LocationIcon } from '@primer/octicons-react'; import { Value } from '../Value'; import { Link } from '../Link'; import { Popover } from '../Popover'; import { useGithubProfile } from './useGithubProfile'; -export interface GithubAvatarItemProps { +export interface GithubAvatarProps { /** * user name */ @@ -30,9 +30,9 @@ export interface GithubAvatarItemProps { */ size?: number; /** - * whether to freeze the size of the avataro on hover + * whether to fix the size of the avataro on hover */ - freeze?: boolean; + fixedSize?: boolean; /** * to increase access rate for github user profile info */ @@ -42,15 +42,15 @@ export interface GithubAvatarItemProps { /** * avatar to be used in an AvatarList container */ -export const GithubAvatarItem: FC = ({ +export const GithubAvatar: FC = ({ username, useremail, size = 48, overlap = 0.4, - freeze = false, + fixedSize = true, githubAccessToken, }) => { - const profile = useGithubProfile(username, useremail, githubAccessToken); + const profile = useGithubProfile({ username, useremail, githubAccessToken }); const profileBox = (
@@ -76,6 +76,9 @@ export const GithubAvatarItem: FC = ({ justifyContent: 'space-between', }} > + {profile.name && ( +
{profile.login}
+ )}

{profile.bio}

{profile.location && (
= ({ )}
); - const link = ( + const avatar = ( + + ); + const imgSx: BoxProps['sx'] = { + maxWidth: 'unset', + display: 'block', + overflow: 'hidden', + lineHeight: 1, + width: size, + height: size, + verticalAlign: 'middle', + }; + const link = profile.html_url ? ( - + {avatar} + ) : ( +
{avatar}
); - return profile.id ? ( + return ( profileBox} sx={{ - maxWidth: Math.round(size * (1 - overlap)), + maxWidth: fixedSize ? undefined : Math.round(size * (1 - overlap)), transition: '0.2s ease', - ':hover': !freeze + ':hover': !fixedSize ? { maxWidth: size, } @@ -149,7 +153,5 @@ export const GithubAvatarItem: FC = ({ > {link} - ) : ( - link ); }; diff --git a/ui/components/src/GithubAvatarList/GithubAvatarList.tsx b/ui/components/src/GithubAvatarList/GithubAvatarList.tsx index 321e841dd..4587cc7db 100644 --- a/ui/components/src/GithubAvatarList/GithubAvatarList.tsx +++ b/ui/components/src/GithubAvatarList/GithubAvatarList.tsx @@ -1,7 +1,7 @@ /** @jsx jsx */ import { FC, useMemo } from 'react'; import { jsx, Box, BoxProps } from 'theme-ui'; -import { GithubAvatarItem, GithubAvatarItemProps } from './GithubAvatarItem'; +import { GithubAvatar, GithubAvatarProps } from './GithubAvatar'; export interface GithubAvatarUser { username: string; @@ -21,7 +21,7 @@ export interface GithubAvatarListOwnProps { } export type GithubAvatarListProps = GithubAvatarListOwnProps & - Omit & + Omit & BoxProps; /** @@ -53,14 +53,14 @@ export const GithubAvatarList: FC = ({ {...rest} > {users.slice(0, maxItems).map((user, index) => ( - ))} {users.length > maxItems && ( diff --git a/ui/components/src/GithubAvatarList/index.ts b/ui/components/src/GithubAvatarList/index.ts index 46657a5d2..88a81c1b4 100644 --- a/ui/components/src/GithubAvatarList/index.ts +++ b/ui/components/src/GithubAvatarList/index.ts @@ -1 +1,2 @@ export * from './GithubAvatarList'; +export * from './GithubAvatar'; diff --git a/ui/components/src/GithubAvatarList/useGithubProfile.tsx b/ui/components/src/GithubAvatarList/useGithubProfile.tsx index 0ebcd1576..f4cf6b5d7 100644 --- a/ui/components/src/GithubAvatarList/useGithubProfile.tsx +++ b/ui/components/src/GithubAvatarList/useGithubProfile.tsx @@ -1,6 +1,5 @@ import { useState, useEffect } from 'react'; import md5 from 'md5'; - export interface GithubProfile { login: string | null; id: number; @@ -38,36 +37,90 @@ export interface GithubProfile { const profilesCache: Record = {}; -export const useGithubProfile = ( - username: string, - useremail?: string, - githubToken?: string, -): GithubProfile => { +export const useGithubProfile = ({ + username, + useremail, + githubAccessToken, + size = 128, +}: { + username: string; + useremail?: string; + githubAccessToken?: string; + size?: number; +}): GithubProfile => { const [profile, setProfile] = useState( profilesCache[username] || { login: username, email: useremail, avatar_url: useremail - ? `https://www.gravatar.com/avatar/${md5( - useremail.trim().toLowerCase(), - )}` - : `https://github.com/${username}`, + ? `//www.gravatar.com/avatar/${md5(useremail)}?s=${size}` + : `//github.com/${username}`, }, ); useEffect(() => { - const headers = githubToken + const headers = githubAccessToken ? { - Authorization: `token ${githubToken}`, + Authorization: `token ${githubAccessToken}`, } : undefined; const fetchData = async () => { - fetch(`https://api.github.com/users/${username}`, { + fetch(`https://api.github.com/users/${encodeURIComponent(username)}`, { headers, }) .then(res => res.json()) .then(result => { - profilesCache[username] = result; - setProfile(result); + if (!result.message) { + profilesCache[username] = result; + setProfile(profilesCache[username]); + } else { + // could not find + profilesCache[username] = profile; + fetch( + `https://api.github.com/search/users?q=${encodeURIComponent( + `${username} in:name`, + )}`, + { + headers, + }, + ) + .then(res => res.json()) + .then(result => { + if (result.items) { + // if only one user with this user name is found, attach it + if (result.items.length === 1) { + profilesCache[username] = result.items[0]; + setProfile(profilesCache[username]); + } else if (useremail) { + // search for email matching the github login + const lcEmail = useremail.toLowerCase(); + const match = result.items.find( + (item: { login: string; email: string | null }) => + item.email?.toLowerCase() === lcEmail || + lcEmail.includes(item.login), + ); + if (match) { + fetch( + `https://api.github.com/users/${encodeURIComponent( + match.login, + )}`, + { + headers, + }, + ) + .then(res => res.json()) + .then(result => { + console.log('MATCH', result); + profilesCache[username] = result; + setProfile(profilesCache[username]); + }); + } + } + } + }); + } + }) + .catch(() => { + profilesCache[username] = profile; }); }; if (!profile.id && typeof fetch !== 'undefined') { diff --git a/ui/components/src/index.ts b/ui/components/src/index.ts index b88fb2537..57f89b053 100644 --- a/ui/components/src/index.ts +++ b/ui/components/src/index.ts @@ -1,4 +1,3 @@ -import {} from 'react'; import { ThemeUIStyleObject } from 'theme-ui'; declare module 'react' {