From 5e7604605569664a90212a48a6037c6b50a34264 Mon Sep 17 00:00:00 2001 From: atanasster Date: Wed, 17 Feb 2021 17:52:39 -0500 Subject: [PATCH] feat: components history and catalog --- .vscode/launch.json | 4 +- .../test/__snapshots__/stories.test.ts.snap | 14 +- core/core/src/common.ts | 5 + core/core/src/components.ts | 11 + core/core/src/controls-utils.ts | 1 + core/core/src/files.ts | 81 + core/core/src/index.ts | 1 + core/core/src/utility.ts | 5 + core/instrument/package.json | 4 + .../instrument/src/babel/extract-component.ts | 21 +- core/instrument/src/index.ts | 8 +- core/instrument/src/misc/chached-file.ts | 55 + core/instrument/src/misc/file-info.ts | 95 + core/instrument/src/misc/package-info.ts | 3 + core/instrument/src/misc/props-info.ts | 44 +- .../test/__snapshots__/esm-async.test.ts.snap | 32 +- .../__snapshots__/esm-components.test.ts.snap | 97 +- .../test/__snapshots__/esm-doc.test.ts.snap | 40 +- .../__snapshots__/esm-hoisted.test.ts.snap | 28 +- .../esm-named-exports.test.ts.snap | 24 +- .../__snapshots__/esm-parameters.test.ts.snap | 28 +- .../esm-props-info-external.test.ts.snap | 25 +- .../__snapshots__/esm-props-info.test.ts.snap | 275 +- .../esm-props-usage.test.ts.snap | 112 +- .../__snapshots__/esm-stories.test.ts.snap | 72 +- .../esm-story-source.test.ts.snap | 20 +- .../__snapshots__/esm-template.test.ts.snap | 50 +- .../__snapshots__/esm-toggle.test.ts.snap | 8 +- .../extract-component.test.ts.snap | 156 + .../extract-props-info.test.ts.snap | 34 +- .../test/__snapshots__/mdx-async.test.ts.snap | 8 +- .../__snapshots__/mdx-component.test.ts.snap | 126 +- .../__snapshots__/mdx-playground.test.ts.snap | 36 +- .../__snapshots__/mdx-stories.test.ts.snap | 77 +- .../mdx-story-source.test.ts.snap | 20 +- .../__snapshots__/mdx-template.test.ts.snap | 8 +- .../__snapshots__/package-info.test.ts.snap | 5 + core/instrument/test/file-info.test.ts | 34 + core/store/src/serialization/load-store.ts | 2 + .../react-typescript.test.ts.snap | 414 +- core/webpack-configs/src/react/index.ts | 2 +- .../tests/__snapshots__/react.test.ts.snap | 2 +- .../custom-pages-storybook-6/package.json | 6 +- examples/gatsby/.config/buildtime.js | 4 +- examples/gatsby/.config/runtime.tsx | 65 +- examples/gatsby/package.json | 4 +- examples/nextjs/.config/buildtime.js | 4 +- examples/nextjs/.config/runtime.tsx | 8 +- examples/nextjs/package.json | 4 +- examples/stories/src/catalogs/Meta.jsx | 1 + examples/stories/src/catalogs/app.mdx | 21 + examples/stories/src/catalogs/blocks.mdx | 32 + examples/stories/src/catalogs/components.mdx | 37 + examples/stories/src/catalogs/editors.mdx | 22 + examples/stories/src/catalogs/plugins.mdx | 16 + .../stories/src/components/VariantButton.tsx | 17 +- examples/stories/src/pages/home-page.mdx | 2 +- .../template-doc.stories.tsx | 0 .../getting-started/external-libraries.mdx | 4 +- .../storybook-6-no-docs/.storybook/main.js | 5 +- .../storybook-6-no-docs/.storybook/preview.js | 18 +- examples/storybook-6-no-docs/package.json | 2 +- examples/storybook-6/.storybook/main.js | 4 +- examples/storybook-6/.storybook/preview.js | 18 +- examples/storybook-6/package.json | 4 +- .../gatsby-theme-stories/src/pages/404.tsx | 6 +- integrations/storybook/package.json | 6 +- misc/storybook-custom-docs/package.json | 8 +- plugins/addon-catalog/.config/buildtime.js | 5 + plugins/addon-catalog/.eslintignore | 1 + plugins/addon-catalog/CHANGELOG.md | 163 + plugins/addon-catalog/LICENSE.md | 21 + plugins/addon-catalog/README.md | 195 + plugins/addon-catalog/package.json | 60 + plugins/addon-catalog/rollup.config.js | 5 + plugins/addon-catalog/src/Catalog/Catalog.tsx | 22 + plugins/addon-catalog/src/Catalog/index.ts | 1 + .../src/ComponentCard/ComponentCard.tsx | 152 + .../addon-catalog/src/ComponentCard/index.ts | 1 + .../src/ComponentFilter/ComponentFilter.tsx | 63 + .../src/ComponentFilter/index.ts | 1 + .../src/ComponentList/ComponentList.tsx | 41 + .../addon-catalog/src/ComponentList/index.ts | 1 + .../ComponentsCatalog/ComponentsCatalog.tsx | 232 + .../src/ComponentsCatalog/index.ts | 1 + .../src/context/ComponentCatalogContext.tsx | 48 + plugins/addon-catalog/src/context/index.ts | 1 + plugins/addon-catalog/src/index.ts | 6 + .../src/stories/Catalog.stories.tsx | 21 + .../src/stories/ComponentCard.stories.tsx | 21 + .../src/stories/ComponentFilter.stories.tsx | 18 + .../src/stories/ComponentList.stories.tsx | 28 + .../src/stories/ComponentsCatalog.stories.tsx | 21 + .../tests/__snapshots__/stories.test.js.snap | 1193 ++ plugins/addon-catalog/tsconfig.json | 15 + plugins/addon-images/.eslintignore | 1 + .../src/stories/ImagesBlock.stories.tsx | 1 + plugins/addon-notes/.eslintignore | 1 + .../src/stories/NotesBlock.stories.tsx | 1 + .../src/stories/AttributeUsage.stories.tsx | 1 + .../AttributesUsageDetails.stories.tsx | 1 + .../stories/AttributesUsageList.stories.tsx | 1 + .../src/stories/ComponentUsage.stories.tsx | 1 + .../stories/ComponentUsageDetails.stories.tsx | 1 + .../stories/ComponentUsageList.stories.tsx | 1 + .../src/stories/AllyBlock.stories.tsx | 1 + .../src/stories/FigmaEmbedBlock.stories.tsx | 1 + plugins/figma-embed/.eslintignore | 1 + .../src/stories/FigmaEmbedBlock.stories.tsx | 1 + .../src/stories/ViewportBlock.stories.tsx | 1 + .../tests/__snapshots__/stories.test.js.snap | 4 +- .../test/__snapshots__/extends.test.ts.snap | 5 +- .../test/__snapshots__/full.test.ts.snap | 12 +- .../test/__snapshots__/imports.test.ts.snap | 12 +- .../test/__snapshots__/jsx.test.ts.snap | 5 +- .../test/__snapshots__/other.test.ts.snap | 1 + .../test/fixtures/full/typescript.tsx | 7 + .../test/loadTestFiles.ts | 3 +- ui/app/src/App/App.stories.tsx | 1 + ui/app/src/AppError/AppError.stories.tsx | 1 + .../src/CategoryList/CategoryList.stories.tsx | 1 + ui/app/src/CategoryList/CategoryList.tsx | 5 +- .../src/CategoryPage/CategoryPage.stories.tsx | 1 + ui/app/src/CategoryPage/CategoryPage.tsx | 6 +- ui/app/src/Container/Container.stories.tsx | 1 + ui/app/src/DocPage/DocPage.stories.tsx | 1 + .../DocumentHomePage.stories.tsx | 1 + .../src/DocumentHomePage/DocumentHomePage.tsx | 5 +- .../DocumentsList/DocumentsList.stories.tsx | 1 + ui/app/src/Footer/Footer.stories.tsx | 1 + ui/app/src/Header/Header.stories.tsx | 1 + ui/app/src/Sidebar/Sidebar.stories.tsx | 1 + .../src/SidebarsPage/SidebarsPage.stories.tsx | 1 + .../tests/__snapshots__/stories.test.js.snap | 548 +- ui/blocks/.eslintignore | 3 +- .../ComponentContributors.stories.tsx | 23 + .../ComponentContributors.tsx | 57 + ui/blocks/src/ComponentContributors/index.ts | 1 + .../ComponentDependencies.tsx | 67 - .../ComponentDeps.stories.tsx | 17 - .../ComponentExternalDependencies.tsx | 128 + .../ComponentLocalDependencies.tsx | 94 + .../ExternalDependencies.stories.tsx | 13 + .../ExternalDependencies.tsx | 140 +- .../LocalDependencies.stories.tsx | 13 + .../LocalDependencies.tsx | 105 +- ui/blocks/src/ComponentDependencies/index.ts | 4 +- ui/blocks/src/ComponentDependencies/types.ts | 6 + .../src/ComponentJSX/ComponentJSX.stories.tsx | 1 + .../src/ComponentJSX/ComponentJSXTree.tsx | 5 +- .../ComponentSource/BaseComponentSource.tsx | 54 +- .../ComponentSource.stories.tsx | 1 + .../src/ComponentStats/ComponentStats.tsx | 40 + ui/blocks/src/ComponentStats/index.ts | 1 + ui/blocks/src/Container/Container.stories.tsx | 1 + ui/blocks/src/Container/Container.tsx | 2 +- .../src/Description/Description.stories.tsx | 1 + .../src/DocumentItem/DocumentItem.stories.tsx | 1 + ui/blocks/src/EditPage/EditPage.stories.tsx | 1 + ui/blocks/src/PackageLink/PackageLink.tsx | 9 +- ui/blocks/src/PackageLink/PackageVersion.tsx | 2 +- .../PageContainer/PageContainer.stories.tsx | 1 + .../src/PageTypeTag/PageTypeTag.stories.tsx | 1 + .../src/Pagination/Pagination.stories.tsx | 1 + .../src/Playground/Playground.stories.tsx | 1 + .../src/PropsTable/PropsTable.stories.tsx | 1 + ui/blocks/src/Search/Search.stories.tsx | 1 + ui/blocks/src/Stories/Stories.stories.tsx | 1 + ui/blocks/src/Story/Story.stories.tsx | 1 + .../src/StoryConfig/StoryConfig.stories.tsx | 1 + .../src/StorySource/StorySource.stories.tsx | 1 + ui/blocks/src/Subtitle/Subtitle.stories.tsx | 1 + ui/blocks/src/TagsList/TagsList.stories.tsx | 1 + ui/blocks/src/Title/Title.stories.tsx | 1 + ui/blocks/src/Title/Title.tsx | 35 +- ui/blocks/src/index.ts | 2 + ui/blocks/src/test/storyStore.tsx | 22 +- .../tests/__snapshots__/stories.test.js.snap | 1459 +- ui/components/.eslintignore | 3 +- ui/components/README.md | 2 +- ui/components/package.json | 2 + .../src/ActionBar/ActionBar.stories.tsx | 2 + ui/components/src/ActionBar/ActionBar.tsx | 6 +- .../ActionContainer.stories.tsx | 33 +- .../src/ActionContainer/ActionContainer.tsx | 2 +- .../BlockContainer/BlockContainer.stories.tsx | 1 + .../src/BlockContainer/BlockContainer.tsx | 2 +- .../src/Collapsible/Collapsible.stories.tsx | 5 +- ui/components/src/Collapsible/Collapsible.tsx | 2 +- .../src/ColorMode/ColorMode.stories.tsx | 1 + ui/components/src/ColorMode/ColorMode.tsx | 2 +- .../CopyContainer/CopyContainer.stories.tsx | 1 + .../src/CopyContainer/CopyContainer.tsx | 2 +- .../src/Description/Description.stories.tsx | 1 + .../src/ExternalLink/ExternalLink.stories.tsx | 1 + .../src/ExternalLink/ExternalLink.tsx | 2 +- .../src/GithubAvatarList/GithubAvatarItem.tsx | 150 + .../GithubAvatarList.stories.tsx | 36 + .../src/GithubAvatarList/GithubAvatarList.tsx | 71 + ui/components/src/GithubAvatarList/index.ts | 1 + .../src/GithubAvatarList/useGithubProfile.tsx | 71 + ui/components/src/Header/Header.stories.tsx | 1 + .../src/HoverBox/HoverBox.stories.tsx | 1 + ui/components/src/HoverBox/HoverBox.tsx | 2 +- ui/components/src/Link/Link.stories.tsx | 1 + ui/components/src/Link/Link.tsx | 3 + .../src/LinkHeading/LinkHeading.stories.tsx | 5 +- ui/components/src/LinkHeading/LinkHeading.tsx | 2 +- .../src/Markdown/Markdown.stories.tsx | 1 + ui/components/src/Markdown/Markdown.tsx | 2 +- .../src/Multiselect/Multiselect.stories.tsx | 1 + ui/components/src/Multiselect/Multiselect.tsx | 2 +- .../src/Pagination/Pagination.stories.tsx | 24 +- ui/components/src/Pagination/Pagination.tsx | 2 +- .../PanelContainer/PanelContainer.stories.tsx | 13 +- .../src/PanelContainer/PanelContainer.tsx | 2 +- ui/components/src/Popover/Popover.stories.tsx | 1 + ui/components/src/Popover/Popover.tsx | 11 +- .../ProgressIndicator.stories.tsx | 7 +- .../ProgressIndicator/ProgressIndicator.tsx | 4 + .../src/SearchInput/SearchInput.stories.tsx | 1 + ui/components/src/SearchInput/SearchInput.tsx | 4 +- ui/components/src/Sidebar/Sidebar.stories.tsx | 1 + ui/components/src/Source/Source.stories.tsx | 1 + ui/components/src/Subheading/Subheading.tsx | 15 - .../src/Subheading/Subjeading.stories.tsx | 16 - ui/components/src/Subheading/index.ts | 1 - .../src/Subtitle/Subtitle.stories.tsx | 1 + .../SyntaxHighlighter.stories.tsx | 1 + .../SyntaxHighlighter/SyntaxHighlighter.tsx | 2 +- ui/components/src/Table/Table.stories.tsx | 1 + ui/components/src/Table/Table.tsx | 2 +- ui/components/src/Tabs/Tabs.stories.tsx | 1 + ui/components/src/Tabs/Tabs.tsx | 2 +- ui/components/src/Tag/Tag.stories.tsx | 1 + ui/components/src/Tag/Tag.tsx | 2 +- ui/components/src/ThemeContext/theme.ts | 12 +- ui/components/src/Title/Title.stories.tsx | 16 - ui/components/src/Title/Title.tsx | 19 - ui/components/src/Title/index.ts | 1 - .../src/TitledImage/TitledImage.stories.tsx | 1 + ui/components/src/TitledImage/TitledImage.tsx | 2 +- ui/components/src/Toggle/Toggle.stories.tsx | 1 + ui/components/src/Tree/Tree.stories.tsx | 5 +- ui/components/src/Value/Value.stories.tsx | 1 + ui/components/src/Value/Value.tsx | 10 +- ui/components/src/Zoom/Zoom.stories.tsx | 47 +- ui/components/src/Zoom/Zoom.tsx | 2 +- ui/components/src/index.ts | 3 +- .../tests/__snapshots__/stories.test.js.snap | 3846 ++--- .../tests/__snapshots__/stories.test.js.snap | 1371 +- .../tests/__snapshots__/stories.test.js.snap | 16 +- ui/pages/src/pages/ClassicPage.tsx | 8 +- ui/pages/src/pages/ComponentPage.tsx | 8 +- yarn.lock | 12052 +++++++--------- 255 files changed, 14939 insertions(+), 10721 deletions(-) create mode 100644 core/core/src/files.ts create mode 100644 core/instrument/src/misc/chached-file.ts create mode 100644 core/instrument/src/misc/file-info.ts create mode 100644 core/instrument/test/file-info.test.ts create mode 100644 examples/stories/src/catalogs/Meta.jsx create mode 100644 examples/stories/src/catalogs/app.mdx create mode 100644 examples/stories/src/catalogs/blocks.mdx create mode 100644 examples/stories/src/catalogs/components.mdx create mode 100644 examples/stories/src/catalogs/editors.mdx create mode 100644 examples/stories/src/catalogs/plugins.mdx rename examples/stories/src/{stories => stories_native}/template-doc.stories.tsx (100%) create mode 100644 plugins/addon-catalog/.config/buildtime.js create mode 100644 plugins/addon-catalog/.eslintignore create mode 100644 plugins/addon-catalog/CHANGELOG.md create mode 100644 plugins/addon-catalog/LICENSE.md create mode 100644 plugins/addon-catalog/README.md create mode 100644 plugins/addon-catalog/package.json create mode 100644 plugins/addon-catalog/rollup.config.js create mode 100644 plugins/addon-catalog/src/Catalog/Catalog.tsx create mode 100644 plugins/addon-catalog/src/Catalog/index.ts create mode 100644 plugins/addon-catalog/src/ComponentCard/ComponentCard.tsx create mode 100644 plugins/addon-catalog/src/ComponentCard/index.ts create mode 100644 plugins/addon-catalog/src/ComponentFilter/ComponentFilter.tsx create mode 100644 plugins/addon-catalog/src/ComponentFilter/index.ts create mode 100644 plugins/addon-catalog/src/ComponentList/ComponentList.tsx create mode 100644 plugins/addon-catalog/src/ComponentList/index.ts create mode 100644 plugins/addon-catalog/src/ComponentsCatalog/ComponentsCatalog.tsx create mode 100644 plugins/addon-catalog/src/ComponentsCatalog/index.ts create mode 100644 plugins/addon-catalog/src/context/ComponentCatalogContext.tsx create mode 100644 plugins/addon-catalog/src/context/index.ts create mode 100644 plugins/addon-catalog/src/index.ts create mode 100644 plugins/addon-catalog/src/stories/Catalog.stories.tsx create mode 100644 plugins/addon-catalog/src/stories/ComponentCard.stories.tsx create mode 100644 plugins/addon-catalog/src/stories/ComponentFilter.stories.tsx create mode 100644 plugins/addon-catalog/src/stories/ComponentList.stories.tsx create mode 100644 plugins/addon-catalog/src/stories/ComponentsCatalog.stories.tsx create mode 100644 plugins/addon-catalog/tests/__snapshots__/stories.test.js.snap create mode 100644 plugins/addon-catalog/tsconfig.json create mode 100644 plugins/addon-images/.eslintignore create mode 100644 plugins/addon-notes/.eslintignore create mode 100644 plugins/figma-embed/.eslintignore create mode 100644 ui/blocks/src/ComponentContributors/ComponentContributors.stories.tsx create mode 100644 ui/blocks/src/ComponentContributors/ComponentContributors.tsx create mode 100644 ui/blocks/src/ComponentContributors/index.ts delete mode 100644 ui/blocks/src/ComponentDependencies/ComponentDependencies.tsx delete mode 100644 ui/blocks/src/ComponentDependencies/ComponentDeps.stories.tsx create mode 100644 ui/blocks/src/ComponentDependencies/ComponentExternalDependencies.tsx create mode 100644 ui/blocks/src/ComponentDependencies/ComponentLocalDependencies.tsx create mode 100644 ui/blocks/src/ComponentDependencies/ExternalDependencies.stories.tsx create mode 100644 ui/blocks/src/ComponentDependencies/LocalDependencies.stories.tsx create mode 100644 ui/blocks/src/ComponentDependencies/types.ts create mode 100644 ui/blocks/src/ComponentStats/ComponentStats.tsx create mode 100644 ui/blocks/src/ComponentStats/index.ts create mode 100644 ui/components/src/GithubAvatarList/GithubAvatarItem.tsx create mode 100644 ui/components/src/GithubAvatarList/GithubAvatarList.stories.tsx create mode 100644 ui/components/src/GithubAvatarList/GithubAvatarList.tsx create mode 100644 ui/components/src/GithubAvatarList/index.ts create mode 100644 ui/components/src/GithubAvatarList/useGithubProfile.tsx delete mode 100644 ui/components/src/Subheading/Subheading.tsx delete mode 100644 ui/components/src/Subheading/Subjeading.stories.tsx delete mode 100644 ui/components/src/Subheading/index.ts delete mode 100644 ui/components/src/Title/Title.stories.tsx delete mode 100644 ui/components/src/Title/Title.tsx delete mode 100644 ui/components/src/Title/index.ts diff --git a/.vscode/launch.json b/.vscode/launch.json index ee1f22dee..9e449c482 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -112,7 +112,7 @@ "name": "jest instrument", "program": "${workspaceFolder}/node_modules/.bin/jest", "cwd": "${workspaceFolder}/core/instrument", - "args": ["mdx-story-source"], + "args": ["file-info"], "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "disableOptimisticBPs": true, @@ -126,7 +126,7 @@ "name": "jest react-docgen-typescript", "program": "${workspaceFolder}/node_modules/.bin/jest", "cwd": "${workspaceFolder}/props-info/react-docgen-typescript", - "args": ["extends"], + "args": ["full"], "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "disableOptimisticBPs": true, diff --git a/core/config/test/__snapshots__/stories.test.ts.snap b/core/config/test/__snapshots__/stories.test.ts.snap index e99c54813..510730d75 100644 --- a/core/config/test/__snapshots__/stories.test.ts.snap +++ b/core/config/test/__snapshots__/stories.test.ts.snap @@ -21,6 +21,7 @@ Array [ "/Users/atanasster/component-controls/ui/components/src/CopyContainer/CopyContainer.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Description/Description.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/ExternalLink/ExternalLink.stories.tsx", + "/Users/atanasster/component-controls/ui/components/src/GithubAvatarList/GithubAvatarList.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Header/Header.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/HoverBox/HoverBox.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Link/Link.stories.tsx", @@ -34,19 +35,19 @@ Array [ "/Users/atanasster/component-controls/ui/components/src/SearchInput/SearchInput.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Sidebar/Sidebar.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Source/Source.stories.tsx", - "/Users/atanasster/component-controls/ui/components/src/Subheading/Subjeading.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Subtitle/Subtitle.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/SyntaxHighlighter/SyntaxHighlighter.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Table/Table.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Tabs/Tabs.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Tag/Tag.stories.tsx", - "/Users/atanasster/component-controls/ui/components/src/Title/Title.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/TitledImage/TitledImage.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Toggle/Toggle.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Tree/Tree.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Value/Value.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Zoom/Zoom.stories.tsx", - "/Users/atanasster/component-controls/ui/blocks/src/ComponentDependencies/ComponentDeps.stories.tsx", + "/Users/atanasster/component-controls/ui/blocks/src/ComponentContributors/ComponentContributors.stories.tsx", + "/Users/atanasster/component-controls/ui/blocks/src/ComponentDependencies/ExternalDependencies.stories.tsx", + "/Users/atanasster/component-controls/ui/blocks/src/ComponentDependencies/LocalDependencies.stories.tsx", "/Users/atanasster/component-controls/ui/blocks/src/ComponentJSX/ComponentJSX.stories.tsx", "/Users/atanasster/component-controls/ui/blocks/src/ComponentSource/ComponentSource.stories.tsx", "/Users/atanasster/component-controls/ui/blocks/src/Container/Container.stories.tsx", @@ -99,6 +100,7 @@ Array [ "/Users/atanasster/component-controls/ui/components/src/CopyContainer/CopyContainer.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Description/Description.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/ExternalLink/ExternalLink.stories.tsx", + "/Users/atanasster/component-controls/ui/components/src/GithubAvatarList/GithubAvatarList.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Header/Header.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/HoverBox/HoverBox.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Link/Link.stories.tsx", @@ -112,19 +114,19 @@ Array [ "/Users/atanasster/component-controls/ui/components/src/SearchInput/SearchInput.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Sidebar/Sidebar.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Source/Source.stories.tsx", - "/Users/atanasster/component-controls/ui/components/src/Subheading/Subjeading.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Subtitle/Subtitle.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/SyntaxHighlighter/SyntaxHighlighter.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Table/Table.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Tabs/Tabs.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Tag/Tag.stories.tsx", - "/Users/atanasster/component-controls/ui/components/src/Title/Title.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/TitledImage/TitledImage.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Toggle/Toggle.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Tree/Tree.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Value/Value.stories.tsx", "/Users/atanasster/component-controls/ui/components/src/Zoom/Zoom.stories.tsx", - "/Users/atanasster/component-controls/ui/blocks/src/ComponentDependencies/ComponentDeps.stories.tsx", + "/Users/atanasster/component-controls/ui/blocks/src/ComponentContributors/ComponentContributors.stories.tsx", + "/Users/atanasster/component-controls/ui/blocks/src/ComponentDependencies/ExternalDependencies.stories.tsx", + "/Users/atanasster/component-controls/ui/blocks/src/ComponentDependencies/LocalDependencies.stories.tsx", "/Users/atanasster/component-controls/ui/blocks/src/ComponentJSX/ComponentJSX.stories.tsx", "/Users/atanasster/component-controls/ui/blocks/src/ComponentSource/ComponentSource.stories.tsx", "/Users/atanasster/component-controls/ui/blocks/src/Container/Container.stories.tsx", diff --git a/core/core/src/common.ts b/core/core/src/common.ts index edfdcd681..5047b40da 100644 --- a/core/core/src/common.ts +++ b/core/core/src/common.ts @@ -54,4 +54,9 @@ export interface StoryProps { * plugins configuration settings */ plugins?: any; + + /** + * category string - can be used for cleanly separating stories/components + */ + category?: string; } diff --git a/core/core/src/components.ts b/core/core/src/components.ts index dcf3c5c37..1eb290ad1 100644 --- a/core/core/src/components.ts +++ b/core/core/src/components.ts @@ -1,4 +1,5 @@ import { CodeLocation, ImportType, Imports } from './utility'; +import { FileInfo } from './files'; export type TypeValue = | 'any' @@ -126,6 +127,11 @@ export interface Component { */ request?: string; + /** + * file name with extension + */ + fileName?: string; + /** * file containing the component's props info * sometimes different from the component source file @@ -165,6 +171,11 @@ export interface Component { * jsx component tree */ jsx?: JSXTree; + + /** + * source file info + */ + fileInfo?: FileInfo; } /** * given a component, return its name diff --git a/core/core/src/controls-utils.ts b/core/core/src/controls-utils.ts index 44e8d313c..d2dac8d74 100644 --- a/core/core/src/controls-utils.ts +++ b/core/core/src/controls-utils.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import escape from 'escape-html'; import { deepmerge } from './deepMerge'; import { diff --git a/core/core/src/files.ts b/core/core/src/files.ts new file mode 100644 index 000000000..b74b278d1 --- /dev/null +++ b/core/core/src/files.ts @@ -0,0 +1,81 @@ +/** + * git commits fields + */ +export interface Commit { + commitHash?: string; + subject?: string; + authorName?: string; + authorData?: string; + authorEmail?: string; + committerName?: string; + committerDate?: string; + committerEmail?: string; +} + +export type Commits = Commit[]; + +export interface FileInfo { + /** + * date file created + */ + dateCreated?: Date; + + /** + * date last modified + */ + dateModified?: Date; + + /** + * git commits for the file + */ + commits?: Commits; + /** + * number of lines of code + */ + sloc?: { + /** + * lines of block comments + */ + block: number; + + /** + * empty lines of block comments + */ + + blockEmpty: number; + /** + * total lines of comments + */ + comment: number; + + /** + * empty lines + */ + empty: number; + + /** + * lines mixed up with source and comments + */ + mixed: number; + + /** + * lines with single-line comments + */ + single: number; + + /** + * lines of code (source) + */ + source: number; + + /** + * lines with TODO's + */ + todo: number; + + /** + * physical total lines + */ + total: number; + }; +} diff --git a/core/core/src/index.ts b/core/core/src/index.ts index d756c2feb..01bf673e4 100644 --- a/core/core/src/index.ts +++ b/core/core/src/index.ts @@ -8,6 +8,7 @@ export * from './deepMerge'; export * from './propsInfo'; export * from './document'; export * from './document-utils'; +export * from './files'; export * from './utility'; export { randomizeData, canRandomizeControl } from './controls-randomize'; export * from './controls-smart'; diff --git a/core/core/src/utility.ts b/core/core/src/utility.ts index c954d92ff..5a2556156 100644 --- a/core/core/src/utility.ts +++ b/core/core/src/utility.ts @@ -86,6 +86,11 @@ export interface PackageInfo { */ peerDependencies?: PackageDependencies; + /** + * if false, the package is not published to npm + */ + privateNpm?: boolean; + /** * repository information extracted from the "repository" field in package.json. */ diff --git a/core/instrument/package.json b/core/instrument/package.json index 6753286dd..85642a6e0 100644 --- a/core/instrument/package.json +++ b/core/instrument/package.json @@ -40,14 +40,17 @@ "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5" }, "devDependencies": { @@ -57,6 +60,7 @@ "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2" diff --git a/core/instrument/src/babel/extract-component.ts b/core/instrument/src/babel/extract-component.ts index 35db313af..d8fbfb4f6 100644 --- a/core/instrument/src/babel/extract-component.ts +++ b/core/instrument/src/babel/extract-component.ts @@ -13,6 +13,7 @@ import { followImports } from './follow-imports'; import { analyze_components } from './analyze-component'; import { packageInfo } from '../misc/package-info'; import { readSourceFile } from '../misc/source-options'; +import { getFileIinfo } from '../misc/file-info'; import { LoadingDocStore, InstrumentOptions } from '../types'; @@ -108,15 +109,7 @@ export const extractComponent = async ( } component.request = follow.filePath; - if (components && typeof components.resolvePropsFile === 'function') { - const propsFile = components.resolvePropsFile( - componentName, - follow.filePath, - ); - if (propsFile !== component.request) { - component.propsInfoFile = propsFile; - } - } + component.fileName = path.basename(follow.filePath); const saveSource = readSourceFile( components?.sourceFiles, follow.source, @@ -127,6 +120,16 @@ export const extractComponent = async ( component.source = saveSource; component.loc = follow.loc; } + component.fileInfo = await getFileIinfo(follow.filePath, saveSource); + if (components && typeof components.resolvePropsFile === 'function') { + const propsFile = components.resolvePropsFile( + componentName, + follow.filePath, + ); + if (propsFile !== component.request) { + component.propsInfoFile = propsFile; + } + } } componentPackage = await packageInfo( componentName, diff --git a/core/instrument/src/index.ts b/core/instrument/src/index.ts index b5daf64fb..4559f3999 100644 --- a/core/instrument/src/index.ts +++ b/core/instrument/src/index.ts @@ -1,4 +1,3 @@ -import * as fs from 'fs'; import mdx from '@mdx-js/mdx'; import matter from 'gray-matter'; import { File } from '@babel/types'; @@ -20,6 +19,7 @@ import { extractStoryExports } from './misc/mdx-exports'; import { prettify } from './misc/prettify'; import { parseFile } from './misc/ast_store'; import { readSourceFile } from './misc/source-options'; +import { getFileIinfo } from './misc/file-info'; import { LoadingDocStore, InstrumentOptions, @@ -96,9 +96,9 @@ const parseSource = async ( store.packages[storyPackage.fileHash] = storyPackage; doc.package = storyPackage.fileHash; } - const stats = fs.statSync(filePath); - doc.dateModified = doc.dateModified || stats.mtime; - doc.date = doc.date || stats.birthtime; + const fileInfo = await getFileIinfo(filePath); + doc.dateModified = doc.dateModified || fileInfo.dateModified; + doc.date = doc.date || fileInfo.dateCreated; } for (const key of Object.keys(store.stories)) { const story: Story = store.stories[key]; diff --git a/core/instrument/src/misc/chached-file.ts b/core/instrument/src/misc/chached-file.ts new file mode 100644 index 000000000..b1c03b5a0 --- /dev/null +++ b/core/instrument/src/misc/chached-file.ts @@ -0,0 +1,55 @@ +import * as fs from 'fs'; +import * as path from 'path'; +import * as os from 'os'; +import { createHash } from 'crypto'; +import findCacheDir from 'find-cache-dir'; + +export class CachedFileResource { + private folderKey: string; + private fileKey: string; + private filePath: string; + + constructor(folderKey: string, fileKey: string, filePath: string) { + this.folderKey = folderKey; + this.fileKey = fileKey; + this.filePath = filePath; + } + + private getCacheFolder = () => { + const folderName = + findCacheDir({ name: `component-controls-${this.folderKey}` }) || + os.tmpdir(); + if (!fs.existsSync(folderName)) { + fs.mkdirSync(folderName, { recursive: true }); + } + return folderName; + }; + + private getCachedFile = () => { + const cachedFolder = this.getCacheFolder(); + return path.join( + cachedFolder, + createHash('md5') + .update(this.fileKey) + .digest('hex'), + ); + }; + get = (): T | undefined => { + const cachedFileName = this.getCachedFile(); + if (fs.existsSync(cachedFileName)) { + const cacheStats = fs.statSync(cachedFileName); + const fileStats = fs.statSync(this.filePath); + if (cacheStats.mtime.getTime() >= fileStats.mtime.getTime()) { + const fileData = fs.readFileSync(cachedFileName, 'utf8'); + const json = JSON.parse(fileData); + return Object.keys(json).length ? json : undefined; + } + } + return undefined; + }; + + set = (data: T | undefined): void => { + const cachedFileName = this.getCachedFile(); + fs.writeFileSync(cachedFileName, JSON.stringify(data || {})); + }; +} diff --git a/core/instrument/src/misc/file-info.ts b/core/instrument/src/misc/file-info.ts new file mode 100644 index 000000000..5b8f8133a --- /dev/null +++ b/core/instrument/src/misc/file-info.ts @@ -0,0 +1,95 @@ +import fs from 'fs'; +import path from 'path'; +import gitlog, { GitlogOptions } from 'gitlog'; +import slocAPI from 'sloc'; +import { findUpFile } from '@component-controls/core/node-utils'; +import { FileInfo } from '@component-controls/core'; +import { CachedFileResource } from './chached-file'; +export const getFileIinfo = async ( + filePath: string, + source?: string, +): Promise => { + const cached = new CachedFileResource( + 'file-stats', + filePath, + filePath, + ); + let result: FileInfo | undefined; + result = cached.get(); + if (result) { + return result; + } + const sloc = source ? slocAPI(source, 'jsx') : undefined; + const gitFolder = findUpFile(path.dirname(filePath), '.git'); + if (gitFolder) { + //try to get file stats from github + const rootFolder = path.resolve(gitFolder, '..'); + const options: GitlogOptions< + | 'hash' + | 'subject' + | 'authorName' + | 'authorDate' + | 'authorEmail' + | 'committerName' + | 'committerDate' + | 'committerEmail' + > = { + repo: rootFolder, + number: 1000, + file: path.relative(rootFolder, filePath), + fields: [ + 'hash', + 'subject', + 'authorName', + 'authorDate', + 'authorEmail', + 'committerName', + 'committerDate', + 'committerEmail', + ], + execOptions: { maxBuffer: 1000 * 1024 }, + }; + + try { + const commits = gitlog(options); + if (commits.length > 0) { + result = { + dateCreated: new Date(commits[commits.length - 1].authorDate), + dateModified: new Date(commits[0].authorDate), + sloc, + commits: commits.map( + ({ + hash, + subject, + authorName, + authorDate, + authorEmail, + committerName, + committerDate, + committerEmail, + }) => ({ + hash, + subject, + authorName, + authorDate: new Date(authorDate).toISOString(), + authorEmail, + committerName, + committerDate: new Date(committerDate).toISOString(), + committerEmail, + }), + ), + }; + cached.set(result); + return result; + } + } catch (e) {} + } + const stats = fs.statSync(filePath); + result = { + dateCreated: stats.birthtime, + dateModified: stats.mtime, + sloc, + }; + cached.set(result); + return result; +}; diff --git a/core/instrument/src/misc/package-info.ts b/core/instrument/src/misc/package-info.ts index 6a88a990c..b9d1dee06 100644 --- a/core/instrument/src/misc/package-info.ts +++ b/core/instrument/src/misc/package-info.ts @@ -73,6 +73,9 @@ export const packageInfo = async ( devDependencies, peerDependencies, }; + if (packageJSON['private']) { + result.privateNpm = true; + } if (repositoryURL) { const templates = hostedGitInfo.fromUrl(repositoryURL) || diff --git a/core/instrument/src/misc/props-info.ts b/core/instrument/src/misc/props-info.ts index 5a947dce8..f2eaff3aa 100644 --- a/core/instrument/src/misc/props-info.ts +++ b/core/instrument/src/misc/props-info.ts @@ -1,13 +1,9 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import * as os from 'os'; -import { createHash } from 'crypto'; -import findCacheDir from 'find-cache-dir'; import { ComponentInfo, PropsInfoExtractorFunction, } from '@component-controls/core'; import { PropsLoaderConfig } from '../types'; +import { CachedFileResource } from './chached-file'; export const getComponentProps = async ( options: PropsLoaderConfig[], @@ -15,11 +11,6 @@ export const getComponentProps = async ( componentName?: string, source?: string, ): Promise => { - const cacheFolder = - findCacheDir({ name: 'component-controls-props-info' }) || os.tmpdir(); - if (!fs.existsSync(cacheFolder)) { - fs.mkdirSync(cacheFolder, { recursive: true }); - } const loaders = options.filter(loader => { const include = Array.isArray(loader.test) ? loader.test @@ -42,26 +33,20 @@ export const getComponentProps = async ( console.error(`Multiple propsloaders found for file ${filePath}`); } const propsLoaderName = loaders.length === 1 ? loaders[0] : undefined; - const cachedFileName = path.join( - cacheFolder, - createHash('md5') - .update( - `${filePath}-${componentName}-${ - propsLoaderName ? propsLoaderName.name : '' - }`, - ) - .digest('hex'), + + const cached = new CachedFileResource( + 'props-info', + `${filePath}-${componentName}-${ + propsLoaderName ? propsLoaderName.name : '' + }`, + filePath, ); - if (fs.existsSync(cachedFileName)) { - const cacheStats = fs.statSync(cachedFileName); - const fileStats = fs.statSync(filePath); - if (cacheStats.mtime.getTime() >= fileStats.mtime.getTime()) { - const fileData = fs.readFileSync(cachedFileName, 'utf8'); - const json = JSON.parse(fileData); - return Object.keys(json).length ? json : undefined; - } + + let result: ComponentInfo | undefined = cached.get(); + if (result) { + // already in cache and file has not changed + return result; } - let result: ComponentInfo | undefined = undefined; if (propsLoaderName) { const { run } = require(propsLoaderName.name); @@ -72,6 +57,7 @@ export const getComponentProps = async ( result = await propsLoader(filePath, componentName, source); } } - fs.writeFileSync(cachedFileName, JSON.stringify(result || {})); + // save to cache + cached.set(result); return result; }; diff --git a/core/instrument/test/__snapshots__/esm-async.test.ts.snap b/core/instrument/test/__snapshots__/esm-async.test.ts.snap index f367cacfd..e046c8d1c 100644 --- a/core/instrument/test/__snapshots__/esm-async.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-async.test.ts.snap @@ -6,8 +6,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.427Z, - "dateModified": 2020-10-21T01:23:26.427Z, + "date": "2020-10-13T05:44:51.000Z", + "dateModified": "2020-10-13T05:44:51.000Z", "package": "03e9ead294a52fb93b8bafaee7295e69", "title": "Story", }, @@ -24,14 +24,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -41,6 +44,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -86,8 +90,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.427Z, - "dateModified": 2020-10-21T01:23:26.427Z, + "date": "2020-10-13T05:44:51.000Z", + "dateModified": "2020-10-13T05:44:51.000Z", "package": "edd499a9a5eb06d2d2a7406ee10873b2", "title": "Story", }, @@ -104,14 +108,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -121,6 +128,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -182,8 +190,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.427Z, - "dateModified": 2020-10-21T01:23:26.427Z, + "date": "2020-10-13T05:44:51.000Z", + "dateModified": "2020-10-13T05:44:51.000Z", "package": "0597587489b541974c8824897528d020", "title": "Story", }, @@ -200,14 +208,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -217,6 +228,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -262,8 +274,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.427Z, - "dateModified": 2020-10-21T01:23:26.427Z, + "date": "2020-10-13T05:44:51.000Z", + "dateModified": "2020-10-13T05:44:51.000Z", "package": "c9acc309451d1827133fb0bc49b1d9c1", "title": "Story", }, @@ -280,14 +292,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -297,6 +312,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", diff --git a/core/instrument/test/__snapshots__/esm-components.test.ts.snap b/core/instrument/test/__snapshots__/esm-components.test.ts.snap index 4a3a5dc9e..a67a68621 100644 --- a/core/instrument/test/__snapshots__/esm-components.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-components.test.ts.snap @@ -12,6 +12,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-default-arrow-func.js", "from": "../../components/button-default-arrow-func", "importedName": "default", "jsx": Array [ @@ -32,8 +49,8 @@ Object { "componentsLookup": Object { "Button": "ceea0565a65f75c8c7b6b355d6d335ac", }, - "date": 2020-10-21T01:23:26.427Z, - "dateModified": 2020-10-21T01:23:26.427Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "title": "Story", }, "packages": Object {}, @@ -59,6 +76,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-named-arrow-func.js", "from": "../../components/button-named-arrow-func", "importedName": "Button", "jsx": Array [ @@ -81,6 +115,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-default-arrow-func.js", "from": "../../components/button-default-arrow-func", "importedName": "default", "jsx": Array [ @@ -101,8 +152,8 @@ Object { "ArrowButton": "dc262d21cd7820523c7e0bacca461e87", "Button": "2f4bd34d15be236674abaf6e894afe6e", }, - "date": 2020-12-04T07:09:16.743Z, - "dateModified": 2020-12-04T07:09:16.743Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "title": "Story", }, "packages": Object {}, @@ -157,6 +208,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-named-arrow-func.js", "from": "../../components/button-named-arrow-func", "importedName": "Button", "jsx": Array [ @@ -179,6 +247,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-default-arrow-func.js", "from": "../../components/button-default-arrow-func", "importedName": "default", "jsx": Array [ @@ -200,8 +285,8 @@ Object { "ArrowButton": "dc262d21cd7820523c7e0bacca461e87", "Button": "2f4bd34d15be236674abaf6e894afe6e", }, - "date": 2020-10-21T01:23:26.427Z, - "dateModified": 2020-10-21T01:23:26.427Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "subcomponents": Object { "Button": "Button", }, diff --git a/core/instrument/test/__snapshots__/esm-doc.test.ts.snap b/core/instrument/test/__snapshots__/esm-doc.test.ts.snap index 5426635a6..b0535aea7 100644 --- a/core/instrument/test/__snapshots__/esm-doc.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-doc.test.ts.snap @@ -14,8 +14,8 @@ Object { "componentsLookup": Object { "ControlsTable": "73cac298d983c71aec166657453a64fe", }, - "date": 2020-10-21T01:23:26.428Z, - "dateModified": 2020-10-21T01:23:26.428Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "66a23e9fdf3e9e6ca71ed416ae8a58d5", "smartControls": Object { "smart": false, @@ -35,14 +35,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -52,6 +55,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -78,14 +82,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -95,6 +102,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -144,8 +152,8 @@ Object { "value": "Mark", }, }, - "date": 2020-10-21T01:23:26.428Z, - "dateModified": 2020-10-21T01:23:26.428Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "e194529ece324f1590bfbf7aaec14410", "title": "Storybook/Kind", }, @@ -162,14 +170,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -179,6 +190,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -205,14 +217,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -222,6 +237,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -260,8 +276,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-12-30T06:22:19.020Z, - "dateModified": 2020-12-30T06:22:19.020Z, + "date": "2020-11-15T16:00:39.000Z", + "dateModified": "2020-11-15T16:00:39.000Z", "package": "847a998ed4a715ed09a24acd70b0c848", "title": "Story", }, @@ -278,14 +294,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -295,6 +314,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -326,8 +346,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.428Z, - "dateModified": 2020-10-21T01:23:26.428Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "7eb653b10808310c21c23cba95a76b32", "title": "Storybook/Blocks/ControlsTable", }, @@ -344,14 +364,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -361,6 +384,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", diff --git a/core/instrument/test/__snapshots__/esm-hoisted.test.ts.snap b/core/instrument/test/__snapshots__/esm-hoisted.test.ts.snap index c0deac434..9ed7b024e 100644 --- a/core/instrument/test/__snapshots__/esm-hoisted.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-hoisted.test.ts.snap @@ -13,8 +13,8 @@ Object { "componentsLookup": Object { "ControlsTable": "57e65d42bacf0af9b3f4dd3fe2377cde", }, - "date": 2020-10-21T01:23:26.428Z, - "dateModified": 2020-10-21T01:23:26.428Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "f287f1a0ceeea6cbbc4c37123d236d06", "title": "Story", }, @@ -31,14 +31,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -48,6 +51,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -74,14 +78,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -91,6 +98,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -145,8 +153,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.428Z, - "dateModified": 2020-10-21T01:23:26.429Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "882d9c5faa549a3a402322c66bc1fc90", "title": "Story", }, @@ -163,14 +171,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -180,6 +191,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -248,8 +260,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.429Z, - "dateModified": 2020-10-21T01:23:26.429Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "60758f1e6b5e3aeeaa541b7d91504436", "title": "Story", }, @@ -266,14 +278,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -283,6 +298,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", 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 4a6c7e352..ad147fd37 100644 --- a/core/instrument/test/__snapshots__/esm-named-exports.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-named-exports.test.ts.snap @@ -6,8 +6,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.429Z, - "dateModified": 2020-10-21T01:23:26.429Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "e53b3e5b7514bc8ba694d92494da097c", "title": "Story", }, @@ -24,14 +24,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -41,6 +44,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -91,8 +95,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.429Z, - "dateModified": 2020-10-21T01:23:26.429Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "9dbf4c8290952e00012d4800973d54e9", "title": "Story", }, @@ -109,14 +113,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -126,6 +133,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -176,8 +184,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.429Z, - "dateModified": 2020-10-21T01:23:26.429Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "618ca94e4346ec00c097481c1e57b5f6", "title": "Story", }, @@ -194,14 +202,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -211,6 +222,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", diff --git a/core/instrument/test/__snapshots__/esm-parameters.test.ts.snap b/core/instrument/test/__snapshots__/esm-parameters.test.ts.snap index 5c350bfad..4983fd32e 100644 --- a/core/instrument/test/__snapshots__/esm-parameters.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-parameters.test.ts.snap @@ -13,8 +13,8 @@ Object { "componentsLookup": Object { "ControlsTable": "3880efc294775fe5c4afbb60ef59b162", }, - "date": 2020-10-21T01:23:26.429Z, - "dateModified": 2020-10-21T01:23:26.429Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "88c5aea0fddc19a67df23e2335e64036", "title": "Story", }, @@ -31,14 +31,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -48,6 +51,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -74,14 +78,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -91,6 +98,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -147,8 +155,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.429Z, - "dateModified": 2020-10-21T01:23:26.429Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "34bc7325264153ecebfb43811bd20164", "title": "Story", }, @@ -165,14 +173,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -182,6 +193,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -252,8 +264,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.429Z, - "dateModified": 2020-10-21T01:23:26.429Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "514de6078cace1101b526c04fd631dce", "title": "Story", }, @@ -270,14 +282,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -287,6 +302,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", 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 7f784d3e0..3daa8f9cb 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 @@ -921,7 +921,7 @@ Array values are converted into responsive values. }, "inputMode": Object { "description": "Hints at the type of data that might be entered by the user while editing the element or its contents -@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", +@see https ://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", "parentName": "HTMLAttributes", "type": Object { "name": "enum", @@ -964,7 +964,7 @@ Array values are converted into responsive values. }, "is": Object { "description": "Specify that a standard HTML element should behave like a defined custom built-in element -@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", +@see https ://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", "parentName": "HTMLAttributes", "type": Object { "name": "string", @@ -2898,6 +2898,9 @@ behind an element is visible. }, }, }, + "tags": Object { + "see": "https ://theme-ui.com/components/button", + }, } `; @@ -2948,6 +2951,11 @@ Object { }, ], }, + "fileInfo": Object { + "dateCreated": "2021-02-14T20:01:09.002Z", + "dateModified": "2021-02-14T20:01:09.002Z", + }, + "fileName": "index.d.ts", "from": "theme-ui", "importedName": "Button", "jsx": Array [], @@ -3029,6 +3037,11 @@ Object { }, ], }, + "fileInfo": Object { + "dateCreated": "2021-02-14T20:01:09.002Z", + "dateModified": "2021-02-14T20:01:09.002Z", + }, + "fileName": "index.d.ts", "from": "theme-ui", "importedName": "Button", "jsx": Array [], @@ -3044,8 +3057,8 @@ Object { "componentsLookup": Object { "Button": "98b2111b08fbab8e38c938acaf3e129a", }, - "date": 2020-10-21T01:23:26.430Z, - "dateModified": 2020-10-21T01:23:26.430Z, + "date": "2020-08-05T13:28:21.000Z", + "dateModified": "2020-08-05T13:28:21.000Z", "package": "295d57ccad25aab2260adf38810e8858", "title": "Storybook/Blocks/Button", }, @@ -3062,14 +3075,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -3079,6 +3095,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", 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 97111868d..74f9ab0c0 100644 --- a/core/instrument/test/__snapshots__/esm-props-info.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-props-info.test.ts.snap @@ -34,6 +34,273 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-12-08T07:22:31.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-12-08T07:22:31.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "0204f50533cea5e2eeb694fe64cc6fc115fd2fd4", + "subject": "feat: addon-stats", + }, + Object { + "authorDate": "2020-09-07T16:05:15.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-09-07T16:05:15.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "7cbba59092b06fbc12e6e0bac8f63480afeecd12", + "subject": "feat: docz migration compatibility", + }, + Object { + "authorDate": "2020-08-08T07:56:52.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-08-08T07:56:52.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f46e8be0fcb7ac3588213423e82ce069928d310f", + "subject": "feat: props and controls table visibility", + }, + Object { + "authorDate": "2020-08-01T20:18:46.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-08-01T20:18:46.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "7af6bb892c03a6751db8f566b3171bbad7b29829", + "subject": "fix: notify stories on changes non-current", + }, + Object { + "authorDate": "2020-07-25T05:26:24.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-07-25T05:26:24.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "c6b78bc75e8464b7123436da485b985f0f1910ff", + "subject": "chore: remove react context api", + }, + Object { + "authorDate": "2020-07-10T23:27:51.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-07-10T23:27:51.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "07b9f6480ac7a2b1e0a3384007755f1e9a5c86ba", + "subject": "feat: data-testids", + }, + Object { + "authorDate": "2020-06-30T21:06:54.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-06-30T21:06:54.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "fc3c2fd047e56bb750b7669d5d474b6c605fb808", + "subject": "docs: writing mdx stories docs", + }, + Object { + "authorDate": "2020-05-10T20:20:37.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-10T20:20:37.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "0ac5038d49d9604c10728adddd54596383aa8370", + "subject": "feat: props table selectively display props, controls or both", + }, + Object { + "authorDate": "2020-05-08T17:41:12.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-08T17:41:12.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "6b91c0a7113ba12bf5f15db6164b7a8179dd4b4e", + "subject": "feat: copy table added to props table", + }, + Object { + "authorDate": "2020-05-04T23:53:45.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-04T23:53:45.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "62366e405fc254b30d293fd68d24ee6adb9e0858", + "subject": "feat: enhance object controls handling, merging", + }, + Object { + "authorDate": "2020-05-04T06:29:26.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-04T06:29:26.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "28b45b92d650629b126beb34c6f975706329ae33", + "subject": "chore: change editors from props to context", + }, + Object { + "authorDate": "2020-05-03T18:15:29.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-03T18:15:29.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "37fa1fbb1469dbbffa4298af59297e5516fcba0a", + "subject": "fix: remove args from context, issues", + }, + Object { + "authorDate": "2020-05-03T16:23:38.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-03T16:23:38.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "737aac65d45f9b978204f1087a762c543a9c9f3e", + "subject": "feat: use tags in PropsTable", + }, + Object { + "authorDate": "2020-05-03T05:14:37.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-03T05:14:37.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "fc9a8f7d83e400d534305c978247a93a2d73174d", + "subject": "feat: props table featured controls with actions", + }, + Object { + "authorDate": "2020-04-25T16:41:38.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-04-25T16:41:38.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "fa09d0efb3ff6d20549f34ff333771eb80bf2a9f", + "subject": "fix: force refresh props table on story change", + }, + Object { + "authorDate": "2020-04-16T12:42:11.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-04-16T12:42:11.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "7885080f3a723ed567544039ad422e6933d19856", + "subject": "fix: hide blocks that have no content", + }, + Object { + "authorDate": "2020-04-16T02:28:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-04-16T02:28:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "ae6f7c108dfb90b8bc0d841c3c60bc1b81d01bac", + "subject": "feat: added theme, components for PageContainer", + }, + Object { + "authorDate": "2020-04-12T00:10:52.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-04-12T00:10:52.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "95d071b28e35bf6c19ebecc03efb9576b10a603c", + "subject": "feat: optimize BlockContext", + }, + Object { + "authorDate": "2020-04-07T01:13:20.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-04-07T01:13:20.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "69f57622a97499f6196896aa685e4f0601ea8e0c", + "subject": "feat: initial check-in store package", + }, + Object { + "authorDate": "2020-04-01T15:17:43.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-04-01T15:17:43.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "b87ad46bafe71fcb74f32bdfef4c92b3f75afe10", + "subject": "fix: table editing lock update", + }, + Object { + "authorDate": "2020-03-31T00:05:00.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-31T00:05:00.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "70005845b211574d1b1d82a57f50b9678dbedab0", + "subject": "fix: blocks clean up", + }, + Object { + "authorDate": "2020-03-30T20:39:00.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-30T20:39:00.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "fdb5795f6b88d17cf49fc716c7c6d012b306079d", + "subject": "chore: refactor PropsTable", + }, + Object { + "authorDate": "2020-03-13T14:58:12.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-13T14:58:12.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "1ce84e4ceb3fbee6041151efc811a850813628b0", + "subject": "chore: separate PropsTable into Block", + }, + Object { + "authorDate": "2020-03-13T14:27:51.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-13T14:27:51.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "e1b8c87cbb2161e58ee452e33d5fa88dc02e57cb", + "subject": "fix: table block header styling", + }, + Object { + "authorDate": "2020-03-13T06:07:44.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-13T06:07:44.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "2711667bcdf1375819aa27e5ec085347855adffd", + "subject": "feat: add filtering to table", + }, + Object { + "authorDate": "2020-03-12T19:44:49.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-12T19:44:49.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "2c5a560958a9d1fcad6a0c57334808c8a5baf47a", + "subject": "feat: added PropsTable", + }, + ], + "dateCreated": "2020-03-12T19:44:49.000Z", + "dateModified": "2020-12-08T07:22:31.000Z", + }, + "fileName": "PropsTable.tsx", "from": "@component-controls/blocks", "importedName": "PropsTable", "jsx": Array [ @@ -120,8 +387,8 @@ Object { "componentsLookup": Object { "PropsTable": "26090286b0d42fa7a92590e6843f1687", }, - "date": 2020-10-21T01:23:26.430Z, - "dateModified": 2020-10-21T01:23:26.430Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "942f7c3f19d9e197f86041eed5e46838", "title": "Storybook/Blocks/PropsTable", }, @@ -191,14 +458,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -208,6 +478,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", 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 d4792782e..56e151e8e 100644 --- a/core/instrument/test/__snapshots__/esm-props-usage.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-props-usage.test.ts.snap @@ -6,8 +6,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.430Z, - "dateModified": 2020-10-21T01:23:26.430Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "a7193179ecf0779da0f8745aa25fb16f", "title": "Story", }, @@ -24,14 +24,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -41,6 +44,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -123,8 +127,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.430Z, - "dateModified": 2020-10-21T01:23:26.430Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "e29c8135e9c608fe008a315d25c201b0", "title": "Story", }, @@ -141,14 +145,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -158,6 +165,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -268,8 +276,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.430Z, - "dateModified": 2020-10-21T01:23:26.430Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "6b1e224ac16097889a07e950dc91da6a", "title": "Story", }, @@ -286,14 +294,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -303,6 +314,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -395,8 +407,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.430Z, - "dateModified": 2020-10-21T01:23:26.430Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "4c19f3b76b8ab9a7c8cd349af53adcd6", "title": "Story", }, @@ -413,14 +425,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -430,6 +445,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -540,8 +556,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.430Z, - "dateModified": 2020-10-21T01:23:26.430Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "31a3398d2705e8d1f3606294985d9c04", "title": "Story", }, @@ -558,14 +574,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -575,6 +594,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -691,8 +711,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.430Z, - "dateModified": 2020-10-21T01:23:26.430Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "02163b946b4a3e645402a9dd80ac6ad2", "title": "Story", }, @@ -709,14 +729,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -726,6 +749,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -924,8 +948,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.430Z, - "dateModified": 2020-10-21T01:23:26.431Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "148100976725fa64e0cd3e6b8f5ab70f", "title": "Story", }, @@ -942,14 +966,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -959,6 +986,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -1036,8 +1064,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.431Z, - "dateModified": 2020-10-21T01:23:26.431Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "5cb9f0e4e9b7610ff459490ccfda3dcc", "title": "Story", }, @@ -1054,14 +1082,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -1071,6 +1102,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -1178,8 +1210,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.431Z, - "dateModified": 2020-10-21T01:23:26.431Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "9f47664ae1fdd66baf7a9ce52c961032", "title": "Story", }, @@ -1196,14 +1228,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -1213,6 +1248,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -1323,8 +1359,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.431Z, - "dateModified": 2020-10-21T01:23:26.431Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "e293029d97356050be6d9dce1d8dad98", "title": "Story", }, @@ -1341,14 +1377,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -1358,6 +1397,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -1476,8 +1516,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.431Z, - "dateModified": 2020-10-21T01:23:26.431Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "c02f1c496c215a299355ba50a365e183", "title": "Story", }, @@ -1494,14 +1534,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -1511,6 +1554,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -1686,8 +1730,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.431Z, - "dateModified": 2020-10-21T01:23:26.431Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "3d35813c0140070f94d9f5783e7191c7", "title": "Story", }, @@ -1704,14 +1748,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -1721,6 +1768,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -1812,8 +1860,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.431Z, - "dateModified": 2020-10-21T01:23:26.431Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "71aec6b23825670f65c73ae6a7aa081d", "title": "Story", }, @@ -1830,14 +1878,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -1847,6 +1898,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -1972,8 +2024,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.431Z, - "dateModified": 2020-10-21T01:23:26.431Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "3446779011041fa8b753053121a4b4b0", "title": "Story", }, @@ -1990,14 +2042,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -2007,6 +2062,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", diff --git a/core/instrument/test/__snapshots__/esm-stories.test.ts.snap b/core/instrument/test/__snapshots__/esm-stories.test.ts.snap index 21bfcbda5..a419c1233 100644 --- a/core/instrument/test/__snapshots__/esm-stories.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-stories.test.ts.snap @@ -6,8 +6,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.432Z, - "dateModified": 2020-10-21T01:23:26.432Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "a764e2f1f1f8cc23edccb9cfb301ec8e", "title": "Story", }, @@ -24,14 +24,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -41,6 +44,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -71,8 +75,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.432Z, - "dateModified": 2020-10-21T01:23:26.432Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "5f97f1689681bb75b22fb6973c4c8397", "title": "Story", }, @@ -89,14 +93,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -106,6 +113,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -151,8 +159,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.432Z, - "dateModified": 2020-10-21T01:23:26.432Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "947c20fa355bb677d067a09d46558900", "title": "Story", }, @@ -169,14 +177,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -186,6 +197,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -214,8 +226,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.432Z, - "dateModified": 2020-11-15T16:38:06.844Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "c525e04e9beb03220dd4fa6d09af4958", "title": "Story", }, @@ -232,14 +244,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -249,6 +264,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -309,8 +325,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.432Z, - "dateModified": 2020-10-21T01:23:26.432Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "3135bea8e9a3103e26e81e541800e043", "title": "Story", }, @@ -327,14 +343,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -344,6 +363,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -462,8 +482,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.432Z, - "dateModified": 2020-10-21T01:23:26.432Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "33a786db69e3366a4131eef973b8ad77", "title": "Story", }, @@ -480,14 +500,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -497,6 +520,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -571,8 +595,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.432Z, - "dateModified": 2020-10-21T01:23:26.432Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "244bd9e12bf9fbfc25a493133455fa30", "title": "Story", }, @@ -589,14 +613,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -606,6 +633,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -695,8 +723,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.432Z, - "dateModified": 2020-10-21T01:23:26.433Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "dda8a6c0184dad7581d495667190312f", "title": "Story", }, @@ -713,14 +741,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -730,6 +761,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -819,8 +851,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.433Z, - "dateModified": 2020-10-21T01:23:26.433Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "b92edb32865b71e9d6623213bf5d565d", "title": "Story", }, @@ -837,14 +869,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -854,6 +889,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", diff --git a/core/instrument/test/__snapshots__/esm-story-source.test.ts.snap b/core/instrument/test/__snapshots__/esm-story-source.test.ts.snap index b40c83de8..1ee7bfb38 100644 --- a/core/instrument/test/__snapshots__/esm-story-source.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-story-source.test.ts.snap @@ -6,8 +6,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.433Z, - "dateModified": 2020-10-21T01:23:26.433Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "title": "Story", }, "packages": Object {}, @@ -43,8 +43,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.433Z, - "dateModified": 2020-10-21T01:23:26.433Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "title": "Story", }, "packages": Object {}, @@ -125,8 +125,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.433Z, - "dateModified": 2020-10-21T01:23:26.433Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "title": "Story", }, "packages": Object {}, @@ -192,8 +192,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.433Z, - "dateModified": 2020-10-21T01:23:26.433Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "title": "Story", }, "packages": Object {}, @@ -229,8 +229,8 @@ Object { "doc": Object { "components": Object {}, "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.433Z, - "dateModified": 2020-10-21T01:23:26.433Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "title": "Story", }, "packages": Object {}, diff --git a/core/instrument/test/__snapshots__/esm-template.test.ts.snap b/core/instrument/test/__snapshots__/esm-template.test.ts.snap index 3f8546031..4576dfb2d 100644 --- a/core/instrument/test/__snapshots__/esm-template.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-template.test.ts.snap @@ -20,6 +20,44 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-11-28T08:43:35.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-11-28T08:43:35.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "628d09ffa2c92a92805309ad16c4596f31259582", + "subject": "feat: local dependencies", + }, + Object { + "authorDate": "2020-11-15T22:37:57.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-11-15T22:37:57.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "a4dfb9ff61330620614c2faa0b6547a38f386368", + "subject": "feat: bind templates to stories", + }, + ], + "dateCreated": "2020-11-15T22:37:57.000Z", + "dateModified": "2020-11-28T08:43:35.000Z", + "sloc": Object { + "block": 0, + "blockEmpty": 0, + "comment": 0, + "empty": 1, + "mixed": 0, + "single": 0, + "source": 8, + "todo": 0, + "total": 9, + }, + }, + "fileName": "button-props.tsx", "from": "../../components/button-props", "importedName": "Button", "jsx": Array [ @@ -63,8 +101,8 @@ export const Button: FC = props => ( "componentsLookup": Object { "Button": "fbea66d4bd64ea2b935855efa5d522a1", }, - "date": 2020-12-30T06:22:19.021Z, - "dateModified": 2020-12-30T06:22:19.022Z, + "date": "2020-11-16T21:30:05.000Z", + "dateModified": "2020-11-16T21:30:05.000Z", "package": "f4ca1c7bc1501c3fcaf51e85d24145e2", "smartControls": false, "template": Object { @@ -127,14 +165,17 @@ export const Button: FC = props => ( "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -144,6 +185,7 @@ export const Button: FC = props => ( "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -170,14 +212,17 @@ export const Button: FC = props => ( "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -187,6 +232,7 @@ export const Button: FC = props => ( "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", diff --git a/core/instrument/test/__snapshots__/esm-toggle.test.ts.snap b/core/instrument/test/__snapshots__/esm-toggle.test.ts.snap index c0638eeb7..3af69c97b 100644 --- a/core/instrument/test/__snapshots__/esm-toggle.test.ts.snap +++ b/core/instrument/test/__snapshots__/esm-toggle.test.ts.snap @@ -15,8 +15,8 @@ Object { "componentsLookup": Object { "Toggle": "88b383f24b1cfbfb44763744ac121b71", }, - "date": 2020-10-21T01:23:26.434Z, - "dateModified": 2020-10-21T01:23:26.434Z, + "date": "2020-07-06T20:55:12.000Z", + "dateModified": "2020-07-06T20:55:12.000Z", "package": "bbdba31aae8aad2329b500b56e78cb36", "title": "Components/Toggle", }, @@ -33,14 +33,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -50,6 +53,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", diff --git a/core/instrument/test/__snapshots__/extract-component.test.ts.snap b/core/instrument/test/__snapshots__/extract-component.test.ts.snap index 8f25303e2..cf2aee279 100644 --- a/core/instrument/test/__snapshots__/extract-component.test.ts.snap +++ b/core/instrument/test/__snapshots__/extract-component.test.ts.snap @@ -11,6 +11,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-default-class-export.js", "from": "../components/button-default-class-export", "importedName": "namespace", "jsx": Array [ @@ -36,14 +53,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -53,6 +73,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -81,6 +102,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-default-arrow-func.js", "from": "../components/button-default-arrow-func", "importedName": "default", "jsx": Array [ @@ -106,14 +144,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -123,6 +164,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -159,6 +201,33 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-11-30T06:16:03.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-11-30T06:16:03.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "c530e29f73414fe47ae648134385ed7b36670955", + "subject": "feat: component jsx explorer", + }, + Object { + "authorDate": "2020-11-28T08:43:35.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-11-28T08:43:35.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "628d09ffa2c92a92805309ad16c4596f31259582", + "subject": "feat: local dependencies", + }, + ], + "dateCreated": "2020-11-28T08:43:35.000Z", + "dateModified": "2020-11-30T06:16:03.000Z", + }, + "fileName": "component-jsx.tsx", "from": "../components/component-jsx", "importedName": "Button", "jsx": Array [ @@ -240,14 +309,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -257,6 +329,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -291,14 +364,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -308,6 +384,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -344,14 +421,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -361,6 +441,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -389,6 +470,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-named-class.js", "from": "../components/button-named-class", "importedName": "Button", "jsx": Array [ @@ -414,14 +512,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -431,6 +532,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -459,6 +561,11 @@ Object { }, ], }, + "fileInfo": Object { + "dateCreated": "2021-02-14T20:01:09.002Z", + "dateModified": "2021-02-14T20:01:09.002Z", + }, + "fileName": "Button.js", "from": "theme-ui", "importedName": "Button", "jsx": Array [ @@ -518,6 +625,11 @@ exports[`extract-component node-modules-source.js 1`] = ` Object { "component": Object { "externalDependencies": Object {}, + "fileInfo": Object { + "dateCreated": "2020-04-04T08:48:22.000Z", + "dateModified": "2021-02-17T19:02:36.276Z", + }, + "fileName": "index.js", "from": "@component-controls/components", "importedName": "Subtitle", "jsx": Array [], @@ -533,6 +645,7 @@ Object { "copy-to-clipboard": "^3.2.1", "fast-memoize": "^2.5.2", "markdown-to-jsx": "^6.11.0", + "md5": "^2.3.0", "mdx-utils": "*", "prism-react-renderer": "^1.0.2", "react-animate-height": "^2.0.20", @@ -548,6 +661,7 @@ Object { "@component-controls/ts-markdown-docs": "^2.6.0", "@theme-ui/css": "^0.6.0-alpha.6", "@types/markdown-to-jsx": "^6.11.0", + "@types/md5": "^2.3.0", "@types/react": "^16.9.34", "@types/react-table": "^7.0.10", "@types/react-tabs": "^2.3.1", @@ -596,6 +710,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-named-arrow-func.js", "from": "../components/button-named-arrow-func", "importedName": "Button", "jsx": Array [ @@ -621,14 +752,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -638,6 +772,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -666,6 +801,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-named-class.js", "from": "../components/button-named-class", "importedName": "Button", "jsx": Array [ @@ -691,14 +843,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -708,6 +863,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", diff --git a/core/instrument/test/__snapshots__/extract-props-info.test.ts.snap b/core/instrument/test/__snapshots__/extract-props-info.test.ts.snap index 51082c168..22e7ea967 100644 --- a/core/instrument/test/__snapshots__/extract-props-info.test.ts.snap +++ b/core/instrument/test/__snapshots__/extract-props-info.test.ts.snap @@ -775,7 +775,7 @@ A hint could be a sample value or a brief description of the expected format.", "parentName": "BoxOwnProps", "type": Object { "name": "union", - "raw": "\\"symbol\\" | \\"object\\" | \\"a\\" | \\"abbr\\" | \\"address\\" | \\"area\\" | \\"article\\" | \\"aside\\" | \\"audio\\" | \\"b\\" | \\"base\\" | \\"bdi\\" | \\"bdo\\" | \\"big\\" | \\"blockquote\\" | \\"body\\" | \\"br\\" | \\"button\\" | \\"canvas\\" | ... 158 more ...", + "raw": "\\"symbol\\" | \\"object\\" | \\"div\\" | \\"a\\" | \\"abbr\\" | \\"address\\" | \\"area\\" | \\"article\\" | \\"aside\\" | \\"audio\\" | \\"b\\" | \\"base\\" | \\"bdi\\" | \\"bdo\\" | \\"big\\" | \\"blockquote\\" | \\"body\\" | \\"br\\" | \\"button\\" | \\"canvas\\" | ... 157 more ...", "value": Array [ Object { "name": "symbol", @@ -783,6 +783,9 @@ A hint could be a sample value or a brief description of the expected format.", Object { "name": "object", }, + Object { + "name": "div", + }, Object { "name": "a", }, @@ -835,7 +838,7 @@ A hint could be a sample value or a brief description of the expected format.", "name": "canvas", }, Object { - "name": "... 158 more ...", + "name": "... 157 more ...", }, ], }, @@ -1067,7 +1070,7 @@ from the title.", }, "inputMode": Object { "description": "Hints at the type of data that might be entered by the user while editing the element or its contents -@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", +@see https ://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", "parentName": "HTMLAttributes", "type": Object { "name": "union", @@ -1102,7 +1105,7 @@ from the title.", }, "is": Object { "description": "Specify that a standard HTML element should behave like a defined custom built-in element -@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", +@see https ://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", "parentName": "HTMLAttributes", "type": Object { "name": "string", @@ -2760,6 +2763,7 @@ user setting can display only props table or only controls", }, }, }, + "tags": Object {}, } `; @@ -4047,7 +4051,7 @@ A hint could be a sample value or a brief description of the expected format.", }, "inputMode": Object { "description": "Hints at the type of data that might be entered by the user while editing the element or its contents -@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", +@see https ://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", "parentName": "HTMLAttributes", "type": Object { "name": "union", @@ -4089,7 +4093,7 @@ A hint could be a sample value or a brief description of the expected format.", }, "is": Object { "description": "Specify that a standard HTML element should behave like a defined custom built-in element -@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", +@see https ://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", "parentName": "HTMLAttributes", "type": Object { "name": "string", @@ -5894,6 +5898,7 @@ A hint could be a sample value or a brief description of the expected format.", }, }, }, + "tags": Object {}, } `; @@ -7174,7 +7179,7 @@ A hint could be a sample value or a brief description of the expected format.", }, "inputMode": Object { "description": "Hints at the type of data that might be entered by the user while editing the element or its contents -@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", +@see https ://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", "parentName": "HTMLAttributes", "type": Object { "name": "union", @@ -7216,7 +7221,7 @@ A hint could be a sample value or a brief description of the expected format.", }, "is": Object { "description": "Specify that a standard HTML element should behave like a defined custom built-in element -@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", +@see https ://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", "parentName": "HTMLAttributes", "type": Object { "name": "string", @@ -9014,6 +9019,7 @@ A hint could be a sample value or a brief description of the expected format.", }, }, }, + "tags": Object {}, } `; @@ -10301,7 +10307,7 @@ A hint could be a sample value or a brief description of the expected format.", }, "inputMode": Object { "description": "Hints at the type of data that might be entered by the user while editing the element or its contents -@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", +@see https ://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", "parentName": "HTMLAttributes", "type": Object { "name": "union", @@ -10343,7 +10349,7 @@ A hint could be a sample value or a brief description of the expected format.", }, "is": Object { "description": "Specify that a standard HTML element should behave like a defined custom built-in element -@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", +@see https ://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", "parentName": "HTMLAttributes", "type": Object { "name": "string", @@ -12148,12 +12154,13 @@ A hint could be a sample value or a brief description of the expected format.", }, }, }, + "tags": Object {}, } `; exports[`extract-props-info Tabs 1`] = ` Object { - "description": "Create tabs and multi-page ui layouts. Uses [react-tabs](https://reactcommunity.org/react-tabs/) component.", + "description": "Tabs component with [react-tabs](https://reactcommunity.org/react-tabs/) and theme-ui styling.", "displayName": "Tabs", "methods": Array [], "props": Object { @@ -13479,7 +13486,7 @@ A hint could be a sample value or a brief description of the expected format.", }, "inputMode": Object { "description": "Hints at the type of data that might be entered by the user while editing the element or its contents -@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", +@see https ://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute", "parentName": "HTMLAttributes", "type": Object { "name": "union", @@ -13521,7 +13528,7 @@ A hint could be a sample value or a brief description of the expected format.", }, "is": Object { "description": "Specify that a standard HTML element should behave like a defined custom built-in element -@see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", +@see https ://html.spec.whatwg.org/multipage/custom-elements.html#attr-is", "parentName": "HTMLAttributes", "type": Object { "name": "string", @@ -15333,5 +15340,6 @@ A hint could be a sample value or a brief description of the expected format.", }, }, }, + "tags": Object {}, } `; diff --git a/core/instrument/test/__snapshots__/mdx-async.test.ts.snap b/core/instrument/test/__snapshots__/mdx-async.test.ts.snap index 74b6af260..aad8a2535 100644 --- a/core/instrument/test/__snapshots__/mdx-async.test.ts.snap +++ b/core/instrument/test/__snapshots__/mdx-async.test.ts.snap @@ -14,8 +14,8 @@ Object { "componentsLookup": Object { "Button": "fbc7c3606fe52918c0716b2079a81097", }, - "date": 2020-12-30T06:22:19.023Z, - "dateModified": 2020-12-30T06:22:19.023Z, + "date": "2020-10-13T05:44:51.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "mdxType": "Meta", "package": "fdb6fae63b892ee658c132e3eeaa8860", "title": "MDX", @@ -40,14 +40,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -57,6 +60,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", diff --git a/core/instrument/test/__snapshots__/mdx-component.test.ts.snap b/core/instrument/test/__snapshots__/mdx-component.test.ts.snap index ff6c970f5..38783fb03 100644 --- a/core/instrument/test/__snapshots__/mdx-component.test.ts.snap +++ b/core/instrument/test/__snapshots__/mdx-component.test.ts.snap @@ -12,6 +12,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-named-arrow-func.js", "from": "../../components/button-named-arrow-func", "importedName": "Button", "jsx": Array [ @@ -31,8 +48,8 @@ Object { "componentsLookup": Object { "Button": "2f4bd34d15be236674abaf6e894afe6e", }, - "date": 2020-12-30T06:22:19.023Z, - "dateModified": 2020-12-30T06:22:19.024Z, + "date": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "mdxType": "Meta", "title": "MDX", }, @@ -67,8 +84,8 @@ Object { "componentsLookup": Object { "Button": "dc86c4457416c54c13147e780d972747", }, - "date": 2020-12-30T06:22:19.024Z, - "dateModified": 2020-12-30T06:22:19.024Z, + "date": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "title": "MDX", }, "exports": Object { @@ -98,6 +115,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-default-arrow-func.js", "from": "../../components/button-default-arrow-func", "importedName": "default", "jsx": Array [ @@ -116,8 +150,8 @@ Object { "componentsLookup": Object { "ArrowButton": "dc262d21cd7820523c7e0bacca461e87", }, - "date": 2020-10-21T01:23:26.440Z, - "dateModified": 2020-10-21T01:23:26.440Z, + "date": "2020-03-16T23:53:33.000Z", + "dateModified": "2020-05-19T05:00:26.000Z", "mdxType": "Meta", "title": "Story", }, @@ -160,8 +194,8 @@ Object { "Button": "1e542c3ba23e8699f77ec19bf3f9e3ea", "Toggle": "7e2f74e50bd73c6a0bf50c40d3c149d4", }, - "date": 2020-12-30T06:22:19.025Z, - "dateModified": 2020-12-30T06:22:19.025Z, + "date": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "mdxType": "Meta", "title": "MDX", }, @@ -214,6 +248,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-named-arrow-func.js", "from": "../../components/button-named-arrow-func", "importedName": "Button", "jsx": Array [ @@ -236,6 +287,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-default-arrow-func.js", "from": "../../components/button-default-arrow-func", "importedName": "default", "jsx": Array [ @@ -255,8 +323,8 @@ Object { "ArrowButton": "dc262d21cd7820523c7e0bacca461e87", "Button": "2f4bd34d15be236674abaf6e894afe6e", }, - "date": 2020-10-21T01:23:26.441Z, - "dateModified": 2020-10-21T01:23:26.441Z, + "date": "2020-03-16T23:53:33.000Z", + "dateModified": "2020-05-19T05:00:26.000Z", "mdxType": "Meta", "title": "Story", }, @@ -319,6 +387,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-named-arrow-func.js", "from": "../../components/button-named-arrow-func", "importedName": "Button", "jsx": Array [ @@ -341,6 +426,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-default-arrow-func.js", "from": "../../components/button-default-arrow-func", "importedName": "default", "jsx": Array [ @@ -361,8 +463,8 @@ Object { "ArrowButton": "dc262d21cd7820523c7e0bacca461e87", "Button": "2f4bd34d15be236674abaf6e894afe6e", }, - "date": 2020-10-21T01:23:26.441Z, - "dateModified": 2020-10-21T01:23:26.441Z, + "date": "2020-03-16T23:53:33.000Z", + "dateModified": "2020-05-19T05:00:26.000Z", "mdxType": "Meta", "subcomponents": Object { "Button": "Button", diff --git a/core/instrument/test/__snapshots__/mdx-playground.test.ts.snap b/core/instrument/test/__snapshots__/mdx-playground.test.ts.snap index fb92025a9..6b7c630b6 100644 --- a/core/instrument/test/__snapshots__/mdx-playground.test.ts.snap +++ b/core/instrument/test/__snapshots__/mdx-playground.test.ts.snap @@ -5,16 +5,16 @@ Object { "components": Object {}, "doc": Object { "componentsLookup": Object {}, - "date": 2020-12-30T06:22:19.025Z, - "dateModified": 2020-12-30T06:22:19.025Z, + "date": "2020-11-13T00:59:52.000Z", + "dateModified": "2020-11-13T17:34:06.000Z", "title": "MDX", }, "exports": Object { "default": Object { "story": Object { "componentsLookup": Object {}, - "date": 2020-12-30T06:22:19.025Z, - "dateModified": 2020-12-30T06:22:19.025Z, + "date": "2020-11-13T00:59:52.000Z", + "dateModified": "2020-11-13T17:34:06.000Z", "title": "MDX", }, }, @@ -75,15 +75,7 @@ MDXContent.isMDXComponent = true; { } - ,\\"dateModified\\": - { - - } - ,\\"date\\": - { - - } - + ,\\"dateModified\\": \\"2020-11-13T17:34:06.000Z\\",\\"date\\": \\"2020-11-13T00:59:52.000Z\\" } ); export default mdxDefaultExport; @@ -96,16 +88,16 @@ Object { "components": Object {}, "doc": Object { "componentsLookup": Object {}, - "date": 2020-12-30T06:22:19.025Z, - "dateModified": 2020-12-30T06:22:19.026Z, + "date": "2020-11-13T00:59:52.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "title": "MDX", }, "exports": Object { "default": Object { "story": Object { "componentsLookup": Object {}, - "date": 2020-12-30T06:22:19.025Z, - "dateModified": 2020-12-30T06:22:19.026Z, + "date": "2020-11-13T00:59:52.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "title": "MDX", }, }, @@ -146,15 +138,7 @@ MDXContent.isMDXComponent = true; { } - ,\\"dateModified\\": - { - - } - ,\\"date\\": - { - - } - + ,\\"dateModified\\": \\"2020-11-13T00:59:52.000Z\\",\\"date\\": \\"2020-11-13T00:59:52.000Z\\" } ); export default mdxDefaultExport; diff --git a/core/instrument/test/__snapshots__/mdx-stories.test.ts.snap b/core/instrument/test/__snapshots__/mdx-stories.test.ts.snap index 0b6026909..5fd403ed4 100644 --- a/core/instrument/test/__snapshots__/mdx-stories.test.ts.snap +++ b/core/instrument/test/__snapshots__/mdx-stories.test.ts.snap @@ -14,8 +14,8 @@ Object { "componentsLookup": Object { "Button": "2855216c2faa4ab43ed978e3ff6743e4", }, - "date": 2020-12-30T06:22:19.026Z, - "dateModified": 2020-12-30T06:22:19.026Z, + "date": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "mdxType": "Meta", "package": "3ae9354c82688a27372041e032d9a3d2", "title": "MDX", @@ -40,14 +40,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -57,6 +60,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -99,8 +103,8 @@ Object { "componentsLookup": Object { "Button": "adb0a7ff2c278d595f4ce67bb4b42887", }, - "date": 2020-12-30T06:22:19.027Z, - "dateModified": 2020-12-30T06:22:19.027Z, + "date": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "mdxType": "Meta", "package": "2a402139de103fe4f924b61618619173", "title": "MDX", @@ -125,14 +129,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -142,6 +149,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -216,6 +224,23 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-03-14T17:49:39.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-14T17:49:39.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f0b0beb616c2b86713c4064552fa39dffcd60771", + "subject": "chore: rename examples go fixtures", + }, + ], + "dateCreated": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-03-14T17:49:39.000Z", + }, + "fileName": "button-default-arrow-func.js", "from": "../../components/button-default-arrow-func", "importedName": "default", "jsx": Array [ @@ -252,8 +277,8 @@ export default Button; "componentsLookup": Object { "Button": "ceea0565a65f75c8c7b6b355d6d335ac", }, - "date": 2020-12-30T06:22:19.027Z, - "dateModified": 2020-12-30T06:22:19.028Z, + "date": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "mdxType": "Meta", "package": "a588f2668941163f0163aabd28f5304e", "title": "MDX", @@ -278,14 +303,17 @@ export default Button; "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -295,6 +323,7 @@ export default Button; "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -321,14 +350,17 @@ export default Button; "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -338,6 +370,7 @@ export default Button; "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -398,8 +431,8 @@ Object { "componentsLookup": Object { "Button": "c63d685efb0c65f18ffc63184e852ef4", }, - "date": 2020-12-30T06:22:19.028Z, - "dateModified": 2020-12-30T06:22:19.028Z, + "date": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "mdxType": "Meta", "package": "92ff07f5e66bce7d793d8a6b561a1e0d", "title": "MDX", @@ -424,14 +457,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -441,6 +477,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -575,8 +612,8 @@ Object { "componentsLookup": Object { "Button": "88c2f5883a4daf6051d3f8a38ce7bf75", }, - "date": 2020-12-30T06:22:19.029Z, - "dateModified": 2020-12-30T06:22:19.029Z, + "date": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "mdxType": "Meta", "package": "6e59e023145bf99af36eacdfc87d4c4e", "title": "MDX", @@ -601,14 +638,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -618,6 +658,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -722,8 +763,8 @@ Object { "componentsLookup": Object { "Button": "fe664c2ffbbcacffdac896ace94db697", }, - "date": 2020-12-30T06:22:19.030Z, - "dateModified": 2020-12-30T06:22:19.030Z, + "date": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "mdxType": "Meta", "package": "a1ab80046bc96afbd8544a77ddf630e5", "title": "MDX", @@ -748,14 +789,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -765,6 +809,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -854,8 +899,8 @@ Object { "componentsLookup": Object { "Button": "0a73df5cffa26ca62ec534813a77384f", }, - "date": 2020-12-30T06:22:19.030Z, - "dateModified": 2020-12-30T06:22:19.030Z, + "date": "2020-03-14T17:49:39.000Z", + "dateModified": "2020-11-13T00:59:52.000Z", "mdxType": "Meta", "package": "195529eaaf75e7a96c882e2a716448ae", "title": "MDX", @@ -880,14 +925,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -897,6 +945,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", diff --git a/core/instrument/test/__snapshots__/mdx-story-source.test.ts.snap b/core/instrument/test/__snapshots__/mdx-story-source.test.ts.snap index cdcebe9a8..bbdede513 100644 --- a/core/instrument/test/__snapshots__/mdx-story-source.test.ts.snap +++ b/core/instrument/test/__snapshots__/mdx-story-source.test.ts.snap @@ -5,8 +5,8 @@ Object { "components": Object {}, "doc": Object { "componentsLookup": Object {}, - "date": 2020-12-29T05:27:27.469Z, - "dateModified": 2020-12-29T05:27:27.469Z, + "date": "2020-05-19T05:00:26.000Z", + "dateModified": "2020-05-19T05:00:26.000Z", "title": "MDX", }, "exports": Object { @@ -92,8 +92,8 @@ Object { "components": Object {}, "doc": Object { "componentsLookup": Object {}, - "date": 2020-12-29T05:27:27.468Z, - "dateModified": 2020-12-29T05:27:27.469Z, + "date": "2020-05-19T05:00:26.000Z", + "dateModified": "2020-05-19T05:00:26.000Z", "title": "MDX", }, "exports": Object { @@ -231,8 +231,8 @@ Object { "components": Object {}, "doc": Object { "componentsLookup": Object {}, - "date": 2020-12-29T05:27:27.469Z, - "dateModified": 2020-12-29T05:27:27.469Z, + "date": "2020-05-19T05:00:26.000Z", + "dateModified": "2020-05-19T05:00:26.000Z", "title": "MDX", }, "exports": Object { @@ -355,8 +355,8 @@ Object { "components": Object {}, "doc": Object { "componentsLookup": Object {}, - "date": 2020-10-21T01:23:26.442Z, - "dateModified": 2020-10-21T01:23:26.442Z, + "date": "2020-05-19T05:00:26.000Z", + "dateModified": "2020-05-19T05:00:26.000Z", "title": "MDX", }, "exports": Object { @@ -448,8 +448,8 @@ Object { "components": Object {}, "doc": Object { "componentsLookup": Object {}, - "date": 2020-12-29T05:27:27.469Z, - "dateModified": 2020-12-29T05:27:27.470Z, + "date": "2020-05-19T05:00:26.000Z", + "dateModified": "2020-05-19T05:00:26.000Z", "title": "MDX", }, "exports": Object { diff --git a/core/instrument/test/__snapshots__/mdx-template.test.ts.snap b/core/instrument/test/__snapshots__/mdx-template.test.ts.snap index c11e66b0b..125accb87 100644 --- a/core/instrument/test/__snapshots__/mdx-template.test.ts.snap +++ b/core/instrument/test/__snapshots__/mdx-template.test.ts.snap @@ -5,8 +5,8 @@ Object { "components": Object {}, "doc": Object { "componentsLookup": Object {}, - "date": 2020-12-30T06:22:19.031Z, - "dateModified": 2020-12-30T06:22:19.032Z, + "date": "2020-11-17T15:18:17.000Z", + "dateModified": "2020-11-17T15:18:17.000Z", "package": "b5d157962341328fdbed2962a4272111", "title": "MDX", }, @@ -48,14 +48,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -65,6 +68,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", diff --git a/core/instrument/test/__snapshots__/package-info.test.ts.snap b/core/instrument/test/__snapshots__/package-info.test.ts.snap index c31aa64cf..5d58e915b 100644 --- a/core/instrument/test/__snapshots__/package-info.test.ts.snap +++ b/core/instrument/test/__snapshots__/package-info.test.ts.snap @@ -13,14 +13,17 @@ Object { "camelcase": "^6.0.0", "deepmerge": "^4.2.2", "find-cache-dir": "^3.3.1", + "gitlog": "^4.0.4", "gray-matter": "^4.0.2", "hosted-git-info": "^3.0.4", + "isomorphic-git": "^1.8.0", "js-string-escape": "^1.0.1", "prettier": "^1.19.1", "read-package-json": "^2.1.1", "remark-emoji": "^2.1.0", "remark-images": "^2.0.0", "resolve": "^1.15.1", + "sloc": "^0.2.1", "typescript": "^4.0.5", }, "devDependencies": Object { @@ -30,6 +33,7 @@ Object { "@types/find-cache-dir": "^3.2.0", "@types/hosted-git-info": "^3.0.0", "@types/jest": "^26.0.10", + "@types/sloc": "^0.2.0", "cross-env": "^5.2.1", "eslint": "^6.5.1", "jest": "^26.4.2", @@ -114,6 +118,7 @@ Object { "fileHash": "82e7ff4ad10d0aa6da8708ad08b069ae", "name": "", "peerDependencies": undefined, + "privateNpm": true, "repository": Object { "browse": "https://github.com/ccontrols/component-controls/tree/master/", "docs": "https://github.com/ccontrols/component-controls/tree/master#readme", diff --git a/core/instrument/test/file-info.test.ts b/core/instrument/test/file-info.test.ts new file mode 100644 index 000000000..a423e45b8 --- /dev/null +++ b/core/instrument/test/file-info.test.ts @@ -0,0 +1,34 @@ +import path from 'path'; +import fs from 'fs'; +import { getFileIinfo } from '../src/misc/file-info'; + +const getFileInfoResults = async (filePath: string) => { + const source = fs.readFileSync(filePath, 'utf8'); + return await getFileIinfo(filePath, source); +}; +describe('file-info', () => { + it('tree', async () => { + const info = await getFileInfoResults( + path.resolve(__dirname, '../../../ui/components/src/Tree/Tree.tsx'), + ); + expect(info.commits[info.commits.length - 1].subject).toBe( + 'feat: component jsx explorer', + ); + }); + it('index file', async () => { + const info = await getFileInfoResults( + path.resolve(__dirname, '../src/index.ts'), + ); + expect(info.dateCreated).toBe('2020-02-13T13:10:53.000Z'); + }); + + it('actionbar', async () => { + const info = await getFileInfoResults( + path.resolve( + __dirname, + '../../../ui/components/src/ActionBar/ActionBar.tsx', + ), + ); + expect(info.dateCreated).toBe('2020-02-28T18:14:04.000Z'); + }); +}); diff --git a/core/store/src/serialization/load-store.ts b/core/store/src/serialization/load-store.ts index c77be2113..f34547a2a 100644 --- a/core/store/src/serialization/load-store.ts +++ b/core/store/src/serialization/load-store.ts @@ -47,6 +47,7 @@ export const loadStore = (store: LoadingStore, building?: boolean): Store => { subcomponents: globalStore.config.subcomponents, controls: globalStore.config.controls, smartControls: globalStore.config.smartControls, + category: globalStore.config.category, decorators: Array.isArray(globalStore.config.decorators) ? globalStore.config.decorators.filter(d => typeof d === 'function') : undefined, @@ -77,6 +78,7 @@ export const loadStore = (store: LoadingStore, building?: boolean): Store => { subcomponents: doc.subcomponents, controls: doc.controls, smartControls: doc.smartControls, + category: doc.category, decorators: Array.isArray(doc.decorators) ? doc.decorators.filter(d => typeof d === 'function') : undefined, 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 eabb3c982..53ea4e1a5 100644 --- a/core/webpack-compile/tests/__snapshots__/react-typescript.test.ts.snap +++ b/core/webpack-compile/tests/__snapshots__/react-typescript.test.ts.snap @@ -91,12 +91,380 @@ Object { }, ], }, + "fileInfo": Object { + "commits": Array [ + Object { + "authorDate": "2020-12-23T05:06:30.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-12-23T05:06:30.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "975030766aca0dddb9cab347dd9a16b8a14fff03", + "subject": "fix: sidebar styling", + }, + Object { + "authorDate": "2020-10-11T03:29:52.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-10-11T03:29:52.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "8d941dd0b6aca276ea70a18e3f0d137b728b5ffb", + "subject": "feat: site logo, default and custom", + }, + Object { + "authorDate": "2020-08-05T05:34:14.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-08-05T05:34:14.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "95aa431723311ffd1704628a07e90e60af8daa00", + "subject": "docs: customize sidebar items", + }, + Object { + "authorDate": "2020-08-05T04:18:41.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-08-05T04:18:41.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "66e08b5d85400daf0cb4831cb4cc320a0fda7174", + "subject": "feat: footer left and right customization", + }, + Object { + "authorDate": "2020-07-08T16:58:26.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-07-08T16:58:26.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "0528403711674527750cf5ea08d8776855fb5d46", + "subject": "chore: more spacing around toolbar links", + }, + Object { + "authorDate": "2020-06-24T21:41:16.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-06-24T21:41:16.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "c56b7e306a0652c5fafad31cc77867e05f873493", + "subject": "chore: actionitems node renamed", + }, + Object { + "authorDate": "2020-06-24T21:21:11.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-06-24T21:21:11.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "b37084a9eb078423cda27b00348282649401829d", + "subject": "feat: toolbar actionbar styling", + }, + Object { + "authorDate": "2020-06-13T03:46:14.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-06-13T03:46:14.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "c287815309631101b2b0a09a00ff87db550a1a22", + "subject": "feat: components in theme", + }, + Object { + "authorDate": "2020-06-10T23:29:45.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-06-10T23:29:45.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "b5aa2de671270708789493d4b62437b86c481089", + "subject": "chore: action items useMemo", + }, + Object { + "authorDate": "2020-06-10T23:09:40.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-06-10T23:09:40.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "182907d529da0cd48b868099c7fa6c2a73fcf139", + "subject": "feat: useTheme hook", + }, + Object { + "authorDate": "2020-06-07T16:47:38.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-06-07T16:47:38.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "c284170bed9d5b6dbc86db93a3da36d231621a79", + "subject": "fix: preserve component name as string", + }, + Object { + "authorDate": "2020-05-23T20:38:25.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-23T20:38:25.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "d7ea3a0798e8c6b3c52b7a5a36bec1520dd8ffc6", + "subject": "feat: initial checkin gatsby bundler", + }, + Object { + "authorDate": "2020-05-16T16:56:16.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-16T16:56:16.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "71b94aee7eebb8196d95645e9dc523032ef06936", + "subject": "docs: added props to stories for CONTROLS", + }, + Object { + "authorDate": "2020-05-16T13:37:01.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-16T13:37:01.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "b5e76dc9c8bcb0889d6c15fa867f72d529cf6bad", + "subject": "fix: safari action button color fix", + }, + Object { + "authorDate": "2020-05-14T21:54:04.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-14T21:54:04.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "e05e65f414538896d5670feb447ee6cfb6b49040", + "subject": "feat: deque's axe-core ally testing plugin", + }, + Object { + "authorDate": "2020-05-12T11:09:54.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-12T11:09:54.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "58bf9f3bd9be1e0ec0dbc30572a0ec44c276d856", + "subject": "feat: background and direction modes to playground", + }, + Object { + "authorDate": "2020-05-07T02:35:24.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-07T02:35:24.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "1608bb7f9e82a713c755ea4dfff86e8ed3d9b2f1", + "subject": "feat: array structured control editor", + }, + Object { + "authorDate": "2020-05-03T05:14:37.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-05-03T05:14:37.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "fc9a8f7d83e400d534305c978247a93a2d73174d", + "subject": "feat: props table featured controls with actions", + }, + Object { + "authorDate": "2020-04-12T17:52:00.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-04-12T17:52:00.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "b8ff182fcca57c237256c9be032e6207ce5daa96", + "subject": "fix: sync StoryContext on change story", + }, + Object { + "authorDate": "2020-04-04T08:22:04.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-04-04T08:22:04.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "f475d86a4e4ac5ba1ce11467d9ae45f24a518f79", + "subject": "Revert \\"chore: update infrastructure\\"", + }, + Object { + "authorDate": "2020-04-04T04:59:40.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-04-04T04:59:40.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "85a11b34e1484cc0a767b75ba537b0b53dab729b", + "subject": "chore: update infrastructure", + }, + Object { + "authorDate": "2020-03-31T21:35:28.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-31T21:35:28.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "c4347f242f0841b480d018e392c57b893018ef28", + "subject": "fix: actionbar styling", + }, + Object { + "authorDate": "2020-03-31T20:47:20.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-31T20:47:20.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "cf7d6a6769ecfba9c4d2887bca3b827e99a17589", + "subject": "fix: various fixes", + }, + Object { + "authorDate": "2020-03-31T17:22:19.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-31T17:22:19.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "6371068dde145474904445a2ae588f16c331fbdb", + "subject": "feat: add panels and story source to Playground", + }, + Object { + "authorDate": "2020-03-31T00:05:00.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-31T00:05:00.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "70005845b211574d1b1d82a57f50b9678dbedab0", + "subject": "fix: blocks clean up", + }, + Object { + "authorDate": "2020-03-30T22:41:38.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-30T22:41:38.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "ef3a2f30ff055f68538fcd8132aadd3aa10cd0e4", + "subject": "fix: margin on ActionItem group undefined", + }, + Object { + "authorDate": "2020-03-30T22:37:50.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-30T22:37:50.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "50e7fef4007b0e944421e7ddced1d7be1cab0e88", + "subject": "feat: group ActionItems", + }, + Object { + "authorDate": "2020-03-21T15:30:22.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-21T15:30:22.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "8b51ae1d9cb6283ce310bd444f5e54162a55f720", + "subject": "feat: add aria-label to action items", + }, + Object { + "authorDate": "2020-03-19T21:41:40.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-19T21:41:40.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "71ba0de0c0d61784a90c016a617dcfbc446894c6", + "subject": "fix: refactor bock components", + }, + Object { + "authorDate": "2020-03-12T19:44:49.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-12T19:44:49.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "2c5a560958a9d1fcad6a0c57334808c8a5baf47a", + "subject": "feat: added PropsTable", + }, + Object { + "authorDate": "2020-03-12T03:47:33.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-12T03:47:33.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "53aa0cb7f1d94ddef729cf023ebed49e59bd7c89", + "subject": "feat: add react-table to components", + }, + Object { + "authorDate": "2020-03-12T00:23:13.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-12T00:23:13.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "6dad9d969ab33470445703e132114a34eb635f50", + "subject": "fix: imporove actions and blocks ui", + }, + Object { + "authorDate": "2020-03-08T21:00:22.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-08T21:00:22.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "aa0c212fb042a03e0854f0042475bf590620cd26", + "subject": "feat: actionbar ui improvements", + }, + Object { + "authorDate": "2020-03-02T01:10:34.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-03-02T01:10:34.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "4d7ac924cdb3103e8fd3e2fd8d3d0a2f0999aade", + "subject": "feat: repository info for stories file", + }, + Object { + "authorDate": "2020-02-28T18:14:04.000Z", + "authorEmail": "atanasster@gmail.com", + "authorName": "atanasster", + "committerDate": "2020-02-28T18:14:04.000Z", + "committerEmail": "atanasster@gmail.com", + "committerName": "atanasster", + "hash": "8c11dcc447ea712048f95f71e7a902c892b9442f", + "subject": "chore: move to @component-controls/components", + }, + ], + "dateCreated": "2020-02-28T18:14:04.000Z", + "dateModified": "2020-12-23T05:06:30.000Z", + "sloc": Object { + "block": 13, + "blockEmpty": 0, + "comment": 13, + "empty": 3, + "mixed": 0, + "single": 0, + "source": 62, + "todo": 0, + "total": 78, + }, + }, + "fileName": "ActionBar.tsx", "from": "./ActionBar", "importedName": "ActionBar", "info": Object { - "description": "a strip of actions to be attached to a container -the action items contain the labels and click event handler -actions can accept an order prop, and can also be superimposed", + "description": "A strip of actions to be attached to a container. +The action items contain the labels and click event handlers. +Actions can accept an order prop, and can also overwrite default actions.", "displayName": "ActionBar", "methods": Array [], "props": Object { @@ -119,6 +487,7 @@ actions can accept an order prop, and can also be superimposed", }, }, }, + "tags": Object {}, }, "jsx": Array [ Object { @@ -228,9 +597,9 @@ export interface ActionBarProps { } /** - * a strip of actions to be attached to a container - * the action items contain the labels and click event handler - * actions can accept an order prop, and can also be superimposed + * A strip of actions to be attached to a container. + * The action items contain the labels and click event handlers. + * Actions can accept an order prop, and can also overwrite default actions. * */ export const ActionBar: FC = ({ @@ -300,6 +669,7 @@ export const ActionBar: FC = ({ "copy-to-clipboard": "^3.2.1", "fast-memoize": "^2.5.2", "markdown-to-jsx": "^6.11.0", + "md5": "^2.3.0", "mdx-utils": "*", "prism-react-renderer": "^1.0.2", "react-animate-height": "^2.0.20", @@ -315,6 +685,7 @@ export const ActionBar: FC = ({ "@component-controls/ts-markdown-docs": "^2.6.0", "@theme-ui/css": "^0.6.0-alpha.6", "@types/markdown-to-jsx": "^6.11.0", + "@types/md5": "^2.3.0", "@types/react": "^16.9.34", "@types/react-table": "^7.0.10", "@types/react-tabs": "^2.3.1", @@ -346,6 +717,7 @@ export const ActionBar: FC = ({ "copy-to-clipboard": "^3.2.1", "fast-memoize": "^2.5.2", "markdown-to-jsx": "^6.11.0", + "md5": "^2.3.0", "mdx-utils": "*", "prism-react-renderer": "^1.0.2", "react-animate-height": "^2.0.20", @@ -361,6 +733,7 @@ export const ActionBar: FC = ({ "@component-controls/ts-markdown-docs": "^2.6.0", "@theme-ui/css": "^0.6.0-alpha.6", "@types/markdown-to-jsx": "^6.11.0", + "@types/md5": "^2.3.0", "@types/react": "^16.9.34", "@types/react-table": "^7.0.10", "@types/react-tabs": "^2.3.1", @@ -389,13 +762,14 @@ export const ActionBar: FC = ({ "stores": Array [ Object { "doc": Object { + "category": "Navigation", "component": "ActionBar", "components": Object {}, "componentsLookup": Object { "ActionBar": "fded7dbaa855ea6869a794f877eab680", }, - "date": "2020-12-30T06:22:21.140Z", - "dateModified": "2020-12-30T06:22:21.141Z", + "date": "2020-03-08T21:00:22.000Z", + "dateModified": "2020-12-06T02:39:10.000Z", "fileName": "/Users/atanasster/component-controls/ui/components/src/ActionBar/ActionBar.stories.tsx", "package": "8c5a495b6c81e803332610dad9861480", "title": "Components/ActionBar", @@ -408,11 +782,11 @@ export const ActionBar: FC = ({ "loc": Object { "end": Object { "column": 1, - "line": 122, + "line": 124, }, "start": Object { "column": 33, - "line": 104, + "line": 106, }, }, "name": "groupEnd", @@ -443,11 +817,11 @@ export const ActionBar: FC = ({ "loc": Object { "end": Object { "column": 1, - "line": 142, + "line": 144, }, "start": Object { "column": 35, - "line": 124, + "line": 126, }, }, "name": "groupStart", @@ -478,11 +852,11 @@ export const ActionBar: FC = ({ "loc": Object { "end": Object { "column": 1, - "line": 61, + "line": 63, }, "start": Object { "column": 29, - "line": 51, + "line": 53, }, }, "name": "link", @@ -505,11 +879,11 @@ export const ActionBar: FC = ({ "loc": Object { "end": Object { "column": 1, - "line": 80, + "line": 82, }, "start": Object { "column": 30, - "line": 63, + "line": 65, }, }, "name": "order", @@ -539,11 +913,11 @@ export const ActionBar: FC = ({ "loc": Object { "end": Object { "column": 1, - "line": 102, + "line": 104, }, "start": Object { "column": 33, - "line": 82, + "line": 84, }, }, "name": "override", @@ -630,11 +1004,11 @@ export const ActionBar: FC = ({ "loc": Object { "end": Object { "column": 1, - "line": 41, + "line": 43, }, "start": Object { "column": 49, - "line": 25, + "line": 27, }, }, "name": "overview", diff --git a/core/webpack-configs/src/react/index.ts b/core/webpack-configs/src/react/index.ts index a9c6cb999..ad8b949b4 100644 --- a/core/webpack-configs/src/react/index.ts +++ b/core/webpack-configs/src/react/index.ts @@ -59,7 +59,7 @@ export const react: PresetType = (options: BuildProps) => { corejs: 3, }, ], - ['@babel/preset-react', { runtime: 'automatic' }], + ['@babel/preset-react', { runtime: 'classic' }], ], }, }, diff --git a/core/webpack-configs/tests/__snapshots__/react.test.ts.snap b/core/webpack-configs/tests/__snapshots__/react.test.ts.snap index a94114dc9..7ad323f09 100644 --- a/core/webpack-configs/tests/__snapshots__/react.test.ts.snap +++ b/core/webpack-configs/tests/__snapshots__/react.test.ts.snap @@ -32,7 +32,7 @@ Object { Array [ "@babel/preset-react", Object { - "runtime": "automatic", + "runtime": "classic", }, ], ], diff --git a/examples/custom-pages-storybook-6/package.json b/examples/custom-pages-storybook-6/package.json index 61688e6ba..3e701c7a3 100644 --- a/examples/custom-pages-storybook-6/package.json +++ b/examples/custom-pages-storybook-6/package.json @@ -20,9 +20,9 @@ "@babel/preset-react": "^7.9.4", "@component-controls/storybook": "^2.6.5", "@component-controls/storybook-custom-docs": "^2.6.0", - "@storybook/addon-docs": "^6.2.0-alpha.3", - "@storybook/client-api": "^6.2.0-alpha.3", - "@storybook/react": "^6.2.0-alpha.3", + "@storybook/addon-docs": "^6.2.0-alpha.29", + "@storybook/client-api": "^6.2.0-alpha.29", + "@storybook/react": "^6.2.0-alpha.29", "babel-loader": "^8.1.0", "prop-types": "^15.7.2", "react": "^17.0.1", diff --git a/examples/gatsby/.config/buildtime.js b/examples/gatsby/.config/buildtime.js index 659adf90d..261b000b9 100644 --- a/examples/gatsby/.config/buildtime.js +++ b/examples/gatsby/.config/buildtime.js @@ -19,7 +19,7 @@ module.exports = { '../../stories/src/stories/*.stories.@(js|jsx|tsx|mdx)', '../../stories/src/stories_native/*.stories.@(js|jsx|tsx|mdx)', '../../stories/src/mdx-stories/*.mdx', - '../../../ui/app/src/**/*.stories.@(js|jsx|tsx|mdx)', + '../../stories/src/catalogs/*.mdx', '../../../ui/components/src/**/*.mdx', '../../../ui/components/src/**/*.stories.@(js|jsx|tsx|mdx)', '../../../ui/blocks/src/**/*.mdx', @@ -30,9 +30,11 @@ module.exports = { '../../../plugins/axe-plugin/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', '../../../plugins/viewport-plugin/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', '../../../plugins/addon-stats/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', + '../../../plugins/addon-catalog/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', '../../../plugins/figma-embed/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', '../../../plugins/addon-notes/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', '../../../plugins/addon-images/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', + '../../../ui/app/src/**/*.stories.@(js|jsx|tsx|mdx)', //'../../stories/src/blogs/introduction-to-controls.mdx', //'../../stories/src/stories/controls-editors-starter.stories.tsx', //'../../stories/src/blogs/gatsby-nextjs-storybook.mdx', diff --git a/examples/gatsby/.config/runtime.tsx b/examples/gatsby/.config/runtime.tsx index 990b2cd25..8c087b79d 100644 --- a/examples/gatsby/.config/runtime.tsx +++ b/examples/gatsby/.config/runtime.tsx @@ -1,11 +1,20 @@ - /** @jsx jsx */ import { jsx, Box, Text } from 'theme-ui'; -import { RunOnlyConfiguration } from "@component-controls/core"; -import { Link } from "@component-controls/components"; +import { RunOnlyConfiguration } from '@component-controls/core'; +import { Link } from '@component-controls/components'; import { OctofaceIcon } from '@primer/octicons-react'; -const categories = ['ESM', 'MDX', 'Application','Controls','Blocks', 'Design Tokens', 'Editors', 'Components', 'Plugins'] +const categories = [ + 'ESM', + 'MDX', + 'Components', + 'Blocks', + 'Design Tokens', + 'Plugins', + 'Controls', + 'Editors', + 'Application', +]; const config: RunOnlyConfiguration = { analytics: 'UA-172446254-1', @@ -16,7 +25,7 @@ const config: RunOnlyConfiguration = { theme: { colors: { // primary: 'pink', - } + }, }, pages: { story: { @@ -41,14 +50,25 @@ const config: RunOnlyConfiguration = { { node: ( - - - - + + + - - twitter - + twitter ), @@ -56,17 +76,22 @@ const config: RunOnlyConfiguration = { { node: ( - + - - github - + github ), }, - ] - } -} + ], + }, +}; -export default config; \ No newline at end of file +export default config; diff --git a/examples/gatsby/package.json b/examples/gatsby/package.json index b43cb4caa..eff0e9cb3 100644 --- a/examples/gatsby/package.json +++ b/examples/gatsby/package.json @@ -14,11 +14,11 @@ "directory": "examples/gatsby" }, "dependencies": { - "@component-controls/axe-plugin": "^2.6.5", + "@component-controls/addon-catalog": "^2.6.5", "@component-controls/blocks": "^2.6.5", "@component-controls/core": "^2.6.3", "@component-controls/gatsby-theme-stories": "^2.6.5", - "@component-controls/viewport-plugin": "^2.6.5", + "@component-controls/pages": "^2.6.5", "@theme-ui/presets": "^0.6.0-alpha.6", "gatsby": "^2.27.4", "react": "^17.0.1", diff --git a/examples/nextjs/.config/buildtime.js b/examples/nextjs/.config/buildtime.js index d5b5ddd3e..cc3e63a0d 100644 --- a/examples/nextjs/.config/buildtime.js +++ b/examples/nextjs/.config/buildtime.js @@ -18,7 +18,7 @@ module.exports = { '../../stories/src/stories/*.stories.@(js|jsx|tsx|mdx)', '../../stories/src/stories_native/*.stories.@(js|jsx|tsx|mdx)', '../../stories/src/mdx-stories/*.mdx', - '../../../ui/app/src/**/*.stories.@(js|jsx|tsx|mdx)', + '../../stories/src/catalogs/*.mdx', '../../../ui/components/src/**/*.mdx', '../../../ui/components/src/**/*.stories.@(js|jsx|tsx|mdx)', '../../../ui/blocks/src/**/*.mdx', @@ -29,9 +29,11 @@ module.exports = { '../../../plugins/axe-plugin/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', '../../../plugins/viewport-plugin/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', '../../../plugins/addon-stats/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', + '../../../plugins/addon-catalog/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', '../../../plugins/figma-embed/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', '../../../plugins/addon-notes/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', '../../../plugins/addon-images/src/stories/**/*.stories.@(js|jsx|tsx|mdx)', + '../../../ui/app/src/**/*.stories.@(js|jsx|tsx|mdx)', // '../../stories/src/blogs/introduction-to-controls.mdx', ], siteUrl: diff --git a/examples/nextjs/.config/runtime.tsx b/examples/nextjs/.config/runtime.tsx index fac51f595..b2446cc3c 100644 --- a/examples/nextjs/.config/runtime.tsx +++ b/examples/nextjs/.config/runtime.tsx @@ -7,13 +7,13 @@ import { OctofaceIcon } from '@primer/octicons-react'; const categories = [ 'ESM', 'MDX', - 'Application', - 'Controls', + 'Components', 'Blocks', 'Design Tokens', - 'Editors', - 'Components', 'Plugins', + 'Controls', + 'Editors', + 'Application', ]; const config: RunOnlyConfiguration = { diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 922b3a5fc..4da1bab0b 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -16,11 +16,11 @@ "directory": "examples/nextjs" }, "dependencies": { - "@component-controls/axe-plugin": "^2.6.5", + "@component-controls/addon-catalog": "^2.6.5", "@component-controls/blocks": "^2.6.5", "@component-controls/core": "^2.6.3", "@component-controls/nextjs-plugin": "^2.6.5", - "@component-controls/viewport-plugin": "^2.6.5", + "@component-controls/pages": "^2.6.5", "@theme-ui/presets": "^0.6.0-alpha.6", "next": "^10.0.3", "react": "^17.0.1", diff --git a/examples/stories/src/catalogs/Meta.jsx b/examples/stories/src/catalogs/Meta.jsx new file mode 100644 index 000000000..68539f048 --- /dev/null +++ b/examples/stories/src/catalogs/Meta.jsx @@ -0,0 +1 @@ +export const Meta = () => null; diff --git a/examples/stories/src/catalogs/app.mdx b/examples/stories/src/catalogs/app.mdx new file mode 100644 index 000000000..73a9e8d86 --- /dev/null +++ b/examples/stories/src/catalogs/app.mdx @@ -0,0 +1,21 @@ +import { Meta } from './Meta'; +import { Catalog } from '@component-controls/addon-catalog'; + + + +# Overview + +Components to create a `@component-controls` standalone application, that is connected to the store of documents. + +- Portability between different build systems ie - Gatsby, CRA, Vercel. +- Create a true CMS-type user-interface, allowing for different document types ie. "stories", "blogs", "articles". +- Category pages for "tags", "authors". +- Fully customizable standalone pages, including Home page. +- Responsive user/interface, with sidebars transforming into popouts for small screen resolutions. + +# Components + + doc.title.startsWith('Application')} + group={({ story }) => story.category} +/> diff --git a/examples/stories/src/catalogs/blocks.mdx b/examples/stories/src/catalogs/blocks.mdx new file mode 100644 index 000000000..13c8de68e --- /dev/null +++ b/examples/stories/src/catalogs/blocks.mdx @@ -0,0 +1,32 @@ +import { Meta } from './Meta'; +import { Catalog } from '@component-controls/addon-catalog'; + + + +# Overview + +`@component-controls/blocks` is a library of context-sensitive components to display specific bits of information +about the pages, documents, components and stories in your documentation site. + +- There are thre main categories of components: + - that display information about a page/document. + - that display story data (i.e. story source, story render) + - that display component(s) data (i.e. prop tables, component sources) +- Many of the block components should have a 'plain' and a 'block' version, where the block version adds a collapsible box with a title. +- Some components accept a list of custom ActionItems to be extended. +- Components that deal with source code (story or component source) display actions to browse their respective repositories. + +# Installation + +This package is installed as part of `component-controls` and you should never need to install it manually. + +# Cross-usage + +You can view a table with the [cross-usage](/api/blocks-internal-usage) of the included components + +# Components + + doc.title.startsWith('Blocks')} + group={({ story }) => story.category} +/> diff --git a/examples/stories/src/catalogs/components.mdx b/examples/stories/src/catalogs/components.mdx new file mode 100644 index 000000000..0e0904414 --- /dev/null +++ b/examples/stories/src/catalogs/components.mdx @@ -0,0 +1,37 @@ +import { Meta } from './Meta'; +import { Catalog } from '@component-controls/addon-catalog'; + + + +# Overview + +`@component-controls/components` is an ecclectic collection of [theme-ui](https://theme-ui.com)-based components that are used throughout `component-controls`. + +Third-party libraries used: + +- [prism](https://prismjs.com) for source code syntax highlighting, rendered with [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer). +- [markdown-to-jsx](https://probablyup.com/markdown-to-jsx/) to transform markdown to JSX at runtime. +- [react-table](https://github.com/tannerlinsley/react-table) to display tabular data. +- [octicons](https://octicons.github.com) for icons used in the components. +- [react-tabs](https://reactcommunity.org/react-tabs/) for tabs and multi-page components. +- [react-popper-tooltip](https://react-popper-tooltip.netlify.com) for popups and tooltips. +- [react-animate-height](https://muffinman.io/react-animate-height/) for collapsible components. +- [@theme-ui/presets](https://theme-ui.com/packages/presets/) for custom theming. +- [react-switch](https://github.com/markusenglund/react-switch) for toggle/boolean inputs. + +# Installation + +```bash +$ npm install @component-controls/components --save +``` + +# Cross-usage + +You can view a table with the [cross-usage](/api/components-internal-usage) of the included components + +# Components + + doc.title.startsWith('Components')} + group={({ story }) => story.category} +/> diff --git a/examples/stories/src/catalogs/editors.mdx b/examples/stories/src/catalogs/editors.mdx new file mode 100644 index 000000000..79ecb334a --- /dev/null +++ b/examples/stories/src/catalogs/editors.mdx @@ -0,0 +1,22 @@ +import { Meta } from './Meta'; +import { Catalog } from '@component-controls/addon-catalog'; + + + +# Overview + +`@component-controls/editors` is a collection of control editors part to enable to run-time editing of [controls api](/tutorial/reference/controls-api) properties. + +- Extensible using `addPropertyEditor`, so you can replace or add new editors. +- All editors offer a consistent interface through the `getPropertyEditor` factory. + +# Installation + +This package is installed as part of `component-controls` and you should never need to install it manually. + +# Components + + doc.title.startsWith('Editors')} + group={({ story }) => story.category} +/> diff --git a/examples/stories/src/catalogs/plugins.mdx b/examples/stories/src/catalogs/plugins.mdx new file mode 100644 index 000000000..e35d51226 --- /dev/null +++ b/examples/stories/src/catalogs/plugins.mdx @@ -0,0 +1,16 @@ +import { Meta } from './Meta'; +import { Catalog } from '@component-controls/addon-catalog'; + + + +# Overview + +`component-controls` has a very flexible api that allows creating and installing various plugins. The following are the +official plaugins, please refer to each plugin's own documetation for installation and usage. + +# Components + + doc.title.startsWith('Plugins')} + group={({ story }) => story.category} +/> diff --git a/examples/stories/src/components/VariantButton.tsx b/examples/stories/src/components/VariantButton.tsx index faaaa265c..e7b2f0c17 100644 --- a/examples/stories/src/components/VariantButton.tsx +++ b/examples/stories/src/components/VariantButton.tsx @@ -8,6 +8,11 @@ import { ArrowUpIcon, } from '@primer/octicons-react'; +/** + * @todo Write the documentation. + * @todo Add variant for spinner. + */ + type ButtonVariant = | 'primary' | 'accent' @@ -94,6 +99,12 @@ export interface VariantButtonProps { * padding variants */ padding: SizeVariants; + + /** + * boolean switch for primary variant + * @deprecated since version 1.0 + */ + isPrimary?: boolean; } /** @@ -106,14 +117,16 @@ export const VariantButton: FC = ({ variant = 'primary', iconSide = 'left', padding = 'medium', + isPrimary = false, icon, }) => { const Icon = variant_icons[icon]; + const finalVariant = isPrimary ? 'primary' : variant; return ( -
-
- -
-
- + +
+ + story +
- - story - +
-
@@ -2271,38 +2299,42 @@ exports[`Application/Sidebar Overview 1`] = ` href="/docs/id-of-single" >
- + +
+ + story +
- - story - +
-
@@ -2323,38 +2355,42 @@ exports[`Application/Sidebar Overview 1`] = ` href="/docs/id-of-button-story" >
- + +
+ + button +
- - button - +
-
@@ -2375,38 +2411,42 @@ exports[`Application/Sidebar Overview 1`] = ` href="/docs/blocks-core-story-plain--controls" >
- + +
+ + controls +
- - controls - +
-
@@ -2428,38 +2468,42 @@ exports[`Application/Sidebar Overview 1`] = ` href="/docs/mdx-story" >
- + +
+ + MDX Story +
- - MDX Story - +
-
@@ -2596,13 +2640,17 @@ exports[`Application/SidebarsPage Overview 1`] = `
-

- Story -

+

+ Story +

+

@@ -11521,38 +11652,42 @@ exports[`Components/Tree Arrows Start 1`] = ` href="/inbox/starred" >
-
+ - - + Starred +
- - Starred - +
-
@@ -11573,38 +11708,42 @@ exports[`Components/Tree Arrows Start 1`] = ` href="/inbox/drafts" >
-
+ - - + Drafts +
- - Drafts - +
-
@@ -11625,38 +11764,42 @@ exports[`Components/Tree Arrows Start 1`] = ` href="/inbox/tagged" >
-
+ - - + Tagged +
- - Tagged - +
-
@@ -11677,38 +11820,42 @@ exports[`Components/Tree Arrows Start 1`] = ` href="/inbox/trash" >
-
+ - - + Trash +
- - Trash - +
-
@@ -11741,60 +11888,64 @@ exports[`Components/Tree Custom Expand Icons 1`] = ` class="css-t9fq0h" >
-
+ - - + + Inbox + +
- - - Inbox - - +
+ +
+ -
-
- -
-
- - All - + + All + +
+
+
+
+ 10 +
+
+
-
-
-
- 10 -
-
-
@@ -11857,29 +12012,33 @@ exports[`Components/Tree Custom Expand Icons 1`] = ` href="/inbox/gmail" >
- - GMail - + + GMail + +
+
+
+
+ 8 +
+
+
-
-
-
- 8 -
-
-
@@ -11900,29 +12059,33 @@ exports[`Components/Tree Custom Expand Icons 1`] = ` href="/inbox/work" >
- - Work - + + Work + +
+
+
+
+ 1 +
+
+
-
-
-
- 1 -
-
-
@@ -11943,29 +12106,33 @@ exports[`Components/Tree Custom Expand Icons 1`] = ` href="/inbox/amazon" >
- - Amazon - + + Amazon + +
+
+
+
+ 1 +
+
+
-
-
-
- 1 -
-
-
@@ -11987,38 +12154,42 @@ exports[`Components/Tree Custom Expand Icons 1`] = ` href="/inbox/sent" >
-
+ - - + Sent +
- - Sent - +
-
@@ -12039,48 +12210,52 @@ exports[`Components/Tree Custom Expand Icons 1`] = ` href="/inbox/flagged" >
-
+ - - + Flagged +
- - Flagged - +
+
+ 3 +
+
+ -
-
-
- 3 -
-
-
@@ -12101,38 +12276,42 @@ exports[`Components/Tree Custom Expand Icons 1`] = ` href="/inbox/starred" >
-
+ - - + Starred +
- - Starred - +
-
@@ -12153,38 +12332,42 @@ exports[`Components/Tree Custom Expand Icons 1`] = ` href="/inbox/drafts" >
- + +
+ + Drafts +
- - Drafts - +
-
@@ -12205,38 +12388,42 @@ exports[`Components/Tree Custom Expand Icons 1`] = ` href="/inbox/tagged" >
-
+ - - + Tagged +
- - Tagged - +
-
@@ -12257,38 +12444,42 @@ exports[`Components/Tree Custom Expand Icons 1`] = ` href="/inbox/trash" >
- + +
+ + Trash +
- - Trash - +
-
@@ -12321,61 +12512,65 @@ exports[`Components/Tree Items 1`] = ` class="css-t9fq0h" >
-
+ - - + + Inbox + +
- - - Inbox - - +
+ +
+ -
-
- -
-
- - All - + + All + +
+
+
+
+ 10 +
+
+
-
-
-
- 10 -
-
-
@@ -12438,29 +12637,33 @@ exports[`Components/Tree Items 1`] = ` href="/inbox/gmail" >
- - GMail - + + GMail + +
+
+
+
+ 8 +
+
+
-
-
-
- 8 -
-
-
@@ -12481,29 +12684,33 @@ exports[`Components/Tree Items 1`] = ` href="/inbox/work" >
- - Work - + + Work + +
+
+
+
+ 1 +
+
+
-
-
-
- 1 -
-
-
@@ -12524,29 +12731,33 @@ exports[`Components/Tree Items 1`] = ` href="/inbox/amazon" >
- - Amazon - + + Amazon + +
+
+
+
+ 1 +
+
+
-
-
-
- 1 -
-
-
@@ -12568,38 +12779,42 @@ exports[`Components/Tree Items 1`] = ` href="/inbox/sent" >
-
+ - - + Sent +
- - Sent - +
-
@@ -12620,48 +12835,52 @@ exports[`Components/Tree Items 1`] = ` href="/inbox/flagged" >
- + +
+ + Flagged +
- - Flagged - +
+
+ 3 +
+
+ -
-
-
- 3 -
-
-
@@ -12682,38 +12901,42 @@ exports[`Components/Tree Items 1`] = ` href="/inbox/starred" >
-
+ - - + Starred +
- - Starred - +
-
@@ -12734,38 +12957,42 @@ exports[`Components/Tree Items 1`] = ` href="/inbox/drafts" >
-
+ - - + Drafts +
- - Drafts - +
-
@@ -12786,38 +13013,42 @@ exports[`Components/Tree Items 1`] = ` href="/inbox/tagged" >
-
+ - - + Tagged +
- - Tagged - +
-
@@ -12838,38 +13069,42 @@ exports[`Components/Tree Items 1`] = ` href="/inbox/trash" >
-
+ - - + Trash +
- - Trash - +
-
@@ -12902,61 +13137,65 @@ exports[`Components/Tree Large Indentation 1`] = ` class="css-t9fq0h" >
-
+ - - + + Inbox + +
- - - Inbox - - +
+ +
+ -
-
- -
-
- - All - + + All + +
+
+
+
+ 10 +
+
+
-
-
-
- 10 -
-
-
@@ -13019,29 +13262,33 @@ exports[`Components/Tree Large Indentation 1`] = ` href="/inbox/gmail" >
- - GMail - + + GMail + +
+
+
+
+ 8 +
+
+
-
-
-
- 8 -
-
-
@@ -13062,29 +13309,33 @@ exports[`Components/Tree Large Indentation 1`] = ` href="/inbox/work" >
- - Work - + + Work + +
+
+
+
+ 1 +
+
+
-
-
-
- 1 -
-
-
@@ -13105,29 +13356,33 @@ exports[`Components/Tree Large Indentation 1`] = ` href="/inbox/amazon" >
- - Amazon - + + Amazon + +
+
+
+
+ 1 +
+
+
-
-
-
- 1 -
-
-
@@ -13149,38 +13404,42 @@ exports[`Components/Tree Large Indentation 1`] = ` href="/inbox/sent" >
-
+ - - + Sent +
- - Sent - +
-
@@ -13201,48 +13460,52 @@ exports[`Components/Tree Large Indentation 1`] = ` href="/inbox/flagged" >
-
+ - - + Flagged +
- - Flagged - +
+
+ 3 +
+
+ -
-
-
- 3 -
-
-
@@ -13263,38 +13526,42 @@ exports[`Components/Tree Large Indentation 1`] = ` href="/inbox/starred" >
- + +
+ + Starred +
- - Starred - +
-
@@ -13315,38 +13582,42 @@ exports[`Components/Tree Large Indentation 1`] = ` href="/inbox/drafts" >
-
+ - - + Drafts +
- - Drafts - +
-
@@ -13367,38 +13638,42 @@ exports[`Components/Tree Large Indentation 1`] = ` href="/inbox/tagged" >
- + +
+ + Tagged +
- - Tagged - +
-
@@ -13419,38 +13694,42 @@ exports[`Components/Tree Large Indentation 1`] = ` href="/inbox/trash" >
-
+ - - + Trash +
- - Trash - +
-
@@ -13483,42 +13762,46 @@ exports[`Components/Tree Overview 1`] = ` class="css-t9fq0h" >
- + + + Local + + +
+
- - Local - - +
+ +
+
-
-
- -
-
- - C: drive - + + C: drive + +
+
-
@@ -13572,19 +13859,23 @@ exports[`Components/Tree Overview 1`] = ` target="_blank" >
- - F: drive - + + F: drive + +
+
-
@@ -13605,42 +13896,46 @@ exports[`Components/Tree Overview 1`] = ` class="css-t9fq0h" >
- + + + Cloud + + +
+
- - Cloud - - +
+ +
+
-
-
- -
-
@@ -13678,61 +13973,65 @@ exports[`Components/Tree Search 1`] = ` class="css-t9fq0h" >
- + +
+ + + Inbox + +
- - - Inbox - - +
+ +
+ -
-
- -
-
- - All - + + All + +
+
+
+
+ 10 +
+
+
-
-
-
- 10 -
-
-
@@ -13795,29 +14098,33 @@ exports[`Components/Tree Search 1`] = ` href="/inbox/gmail" >
- - GMail - + + GMail + +
+
+
+
+ 8 +
+
+
-
-
-
- 8 -
-
-
@@ -13838,29 +14145,33 @@ exports[`Components/Tree Search 1`] = ` href="/inbox/work" >
- - Work - + + Work + +
+
+
+
+ 1 +
+
+
-
-
-
- 1 -
-
-
@@ -13881,29 +14192,33 @@ exports[`Components/Tree Search 1`] = ` href="/inbox/amazon" >
- - Amazon - + + Amazon + +
+
+
+
+ 1 +
+
+
-
-
-
- 1 -
-
-
@@ -13925,38 +14240,42 @@ exports[`Components/Tree Search 1`] = ` href="/inbox/sent" >
-
+ - - + Sent +
- - Sent - +
-
@@ -13977,48 +14296,52 @@ exports[`Components/Tree Search 1`] = ` href="/inbox/flagged" >
- + +
+ + Flagged +
- - Flagged - +
+
+ 3 +
+
+ -
-
-
- 3 -
-
-
@@ -14039,38 +14362,42 @@ exports[`Components/Tree Search 1`] = ` href="/inbox/starred" >
-
+ - - + Starred +
- - Starred - +
-
@@ -14091,38 +14418,42 @@ exports[`Components/Tree Search 1`] = ` href="/inbox/drafts" >
- + +
+ + Drafts +
- - Drafts - +
-
@@ -14143,38 +14474,42 @@ exports[`Components/Tree Search 1`] = ` href="/inbox/tagged" >
-
+ - - + Tagged +
- - Tagged - +
-
@@ -14195,38 +14530,42 @@ exports[`Components/Tree Search 1`] = ` href="/inbox/trash" >
-
+ - - + Trash +
- - Trash - +
-
@@ -14256,79 +14595,88 @@ exports[`Components/Value Overview 1`] = ` exports[`Components/Zoom Overview 1`] = ` -
-
+
+
- -
-
- +
+
- zoom out - -
-
- +
+
- zoom in - + +
-
-
- - - - +
+ + + + +
+
diff --git a/ui/design-tokens/tests/__snapshots__/stories.test.js.snap b/ui/design-tokens/tests/__snapshots__/stories.test.js.snap index 8f76ee622..0d49d141d 100644 --- a/ui/design-tokens/tests/__snapshots__/stories.test.js.snap +++ b/ui/design-tokens/tests/__snapshots__/stories.test.js.snap @@ -6,7 +6,8 @@ exports[`Design Tokens/Colors/AltaColor Hsl 1`] = ` class="css-439ki4-AltaColor" >
@@ -4026,7 +4117,8 @@ exports[`Design Tokens/Colors/BaseWebColor Palette 1`] = ` class="css-iiq0sn-BaseBaseWebColor" >
@@ -4057,7 +4149,8 @@ exports[`Design Tokens/Colors/BaseWebColor Palette 1`] = ` class="css-iiq0sn-BaseBaseWebColor" >
@@ -4088,7 +4181,8 @@ exports[`Design Tokens/Colors/BaseWebColor Palette 1`] = ` class="css-iiq0sn-BaseBaseWebColor" >
@@ -4119,7 +4213,8 @@ exports[`Design Tokens/Colors/BaseWebColor Palette 1`] = ` class="css-iiq0sn-BaseBaseWebColor" >
@@ -4150,7 +4245,8 @@ exports[`Design Tokens/Colors/BaseWebColor Palette 1`] = ` class="css-iiq0sn-BaseBaseWebColor" >
@@ -4181,7 +4277,8 @@ exports[`Design Tokens/Colors/BaseWebColor Palette 1`] = ` class="css-iiq0sn-BaseBaseWebColor" >
@@ -4212,7 +4309,8 @@ exports[`Design Tokens/Colors/BaseWebColor Palette 1`] = ` class="css-iiq0sn-BaseBaseWebColor" >
@@ -4243,7 +4341,8 @@ exports[`Design Tokens/Colors/BaseWebColor Palette 1`] = ` class="css-iiq0sn-BaseBaseWebColor" >
@@ -4277,7 +4376,8 @@ exports[`Design Tokens/Colors/BeelineColor Hsl 1`] = ` class="css-8jebb7-BeelineColor" >
#2F9D89
@@ -8233,7 +8372,8 @@ exports[`Design Tokens/Colors/CometColor Palette 1`] = ` class="css-qe1bk5-BaseCometColor" >
#020D17
@@ -8271,7 +8411,8 @@ exports[`Design Tokens/Colors/CometColor Palette 1`] = ` class="css-qe1bk5-BaseCometColor" >
#041B2F
@@ -8309,7 +8450,8 @@ exports[`Design Tokens/Colors/CometColor Palette 1`] = ` class="css-qe1bk5-BaseCometColor" >
#08365E
@@ -8347,7 +8489,8 @@ exports[`Design Tokens/Colors/CometColor Palette 1`] = ` class="css-qe1bk5-BaseCometColor" >
#0C518D
@@ -8385,7 +8528,8 @@ exports[`Design Tokens/Colors/CometColor Palette 1`] = ` class="css-qe1bk5-BaseCometColor" >
#106CBC
@@ -8423,7 +8567,8 @@ exports[`Design Tokens/Colors/CometColor Palette 1`] = ` class="css-qe1bk5-BaseCometColor" >
#1487EB
@@ -8461,7 +8606,8 @@ exports[`Design Tokens/Colors/CometColor Palette 1`] = ` class="css-qe1bk5-BaseCometColor" >
#439FEF
@@ -8499,7 +8645,8 @@ exports[`Design Tokens/Colors/CometColor Palette 1`] = ` class="css-qe1bk5-BaseCometColor" >
#72B7F3
@@ -8537,7 +8684,8 @@ exports[`Design Tokens/Colors/CometColor Palette 1`] = ` class="css-qe1bk5-BaseCometColor" >
#A1CFF7
@@ -8575,7 +8723,8 @@ exports[`Design Tokens/Colors/CometColor Palette 1`] = ` class="css-qe1bk5-BaseCometColor" >
#D0E7FB
@@ -8608,7 +8757,8 @@ exports[`Design Tokens/Colors/DuetColor Overview 1`] = `
#f2f2f2
@@ -11903,7 +12173,8 @@ exports[`Design Tokens/Colors/MorningstarColor Palette 1`] = `
#c9c7c5
@@ -11928,7 +12199,8 @@ exports[`Design Tokens/Colors/MorningstarColor Palette 1`] = `
#ff0000
@@ -11953,7 +12225,8 @@ exports[`Design Tokens/Colors/MorningstarColor Palette 1`] = `
#ffe5e5
@@ -11978,7 +12251,8 @@ exports[`Design Tokens/Colors/MorningstarColor Palette 1`] = `
#f5c400
@@ -12003,7 +12277,8 @@ exports[`Design Tokens/Colors/MorningstarColor Palette 1`] = `
#fef9e5
@@ -12028,7 +12303,8 @@ exports[`Design Tokens/Colors/MorningstarColor Palette 1`] = `
#00af41
@@ -12053,7 +12329,8 @@ exports[`Design Tokens/Colors/MorningstarColor Palette 1`] = `
#e5f7eb
@@ -12078,7 +12355,8 @@ exports[`Design Tokens/Colors/MorningstarColor Palette 1`] = `
#004376
@@ -12100,7 +12378,8 @@ exports[`Design Tokens/Colors/OPatternColor Overview 1`] = ` class="css-1jam8bv-BaseOPatternColor" >
@@ -12186,7 +12465,8 @@ exports[`Design Tokens/Colors/OPatternColor Palette 1`] = ` class="css-1jam8bv-BaseOPatternColor" >
@@ -12215,7 +12495,8 @@ exports[`Design Tokens/Colors/OPatternColor Palette 1`] = ` class="css-1jam8bv-BaseOPatternColor" >
@@ -12236,7 +12517,8 @@ exports[`Design Tokens/Colors/OPatternColor Palette 1`] = ` class="css-1jam8bv-BaseOPatternColor" >
@@ -12265,7 +12547,8 @@ exports[`Design Tokens/Colors/OPatternColor Palette 1`] = ` class="css-1jam8bv-BaseOPatternColor" >
@@ -12286,7 +12569,8 @@ exports[`Design Tokens/Colors/OPatternColor Palette 1`] = ` class="css-1jam8bv-BaseOPatternColor" >
@@ -12324,7 +12608,8 @@ exports[`Design Tokens/Colors/PajamasColor Overview 1`] = ` class="css-1djey04-PajamasColor" >
.fill-red
@@ -14837,7 +15203,8 @@ exports[`Design Tokens/Colors/SolidColor Overview 1`] = `
@@ -14858,7 +15225,8 @@ exports[`Design Tokens/Colors/SolidColor Palette 1`] = ` class="css-1smpc93-SolidColor" >
.fill-red
@@ -14870,7 +15238,8 @@ exports[`Design Tokens/Colors/SolidColor Palette 1`] = `
.fill-red-lighter
@@ -14895,7 +15265,8 @@ exports[`Design Tokens/Colors/SolidColor Palette 1`] = `
.fill-pink
@@ -14920,7 +15292,8 @@ exports[`Design Tokens/Colors/SolidColor Palette 1`] = `
.fill-blue
@@ -14945,7 +15319,8 @@ exports[`Design Tokens/Colors/SolidColor Palette 1`] = `
.fill-purple
@@ -14970,7 +15346,8 @@ exports[`Design Tokens/Colors/SolidColor Palette 1`] = `
.fill-promoted-orange
@@ -14995,7 +15373,8 @@ exports[`Design Tokens/Colors/SolidColor Palette 1`] = `
.fill-twitter
@@ -15020,7 +15400,8 @@ exports[`Design Tokens/Colors/SolidColor Palette 1`] = `
@@ -15168,7 +15549,8 @@ exports[`Design Tokens/Colors/TableColor Overview 1`] = ` class="css-qxabq3-BaseTableColor" >
@@ -16993,7 +17418,8 @@ exports[`Design Tokens/Colors/UniformColor Palette 1`] = ` class="css-dez9lm-BaseUniformColor" >
@@ -17018,7 +17444,8 @@ exports[`Design Tokens/Colors/UniformColor Palette 1`] = ` class="css-dez9lm-BaseUniformColor" >
@@ -17043,7 +17470,8 @@ exports[`Design Tokens/Colors/UniformColor Palette 1`] = ` class="css-dez9lm-BaseUniformColor" >
@@ -17068,7 +17496,8 @@ exports[`Design Tokens/Colors/UniformColor Palette 1`] = ` class="css-dez9lm-BaseUniformColor" >
@@ -17093,7 +17522,8 @@ exports[`Design Tokens/Colors/UniformColor Palette 1`] = ` class="css-dez9lm-BaseUniformColor" >
@@ -17121,7 +17551,8 @@ exports[`Design Tokens/Colors/VanillaColor Overview 1`] = ` class="css-1m19f2s-VanillaColor" >