From c9dc4e01a05b21d9163c7d29d88ea31fd1468c20 Mon Sep 17 00:00:00 2001 From: Jorge Ji Date: Tue, 12 Mar 2024 19:57:43 +0000 Subject: [PATCH 001/117] Fix #25759: Panel resizing is not applied when done too fast When trying to resize any panel too fast, the changes would not be applied. The fix was done by changing a comparison condition in "useLayoutEffect()". Instead of using a variable ("prevManagerLayoutStateRef") that was also modified by another function ("useEffect()") that could execute at the same time, it now uses a variable that is only modified by the own function, making it so that the supposed layout values are not changed after they are set. --- code/ui/manager/src/components/layout/Layout.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ui/manager/src/components/layout/Layout.tsx b/code/ui/manager/src/components/layout/Layout.tsx index a17636ceadbd..f0c087b2dcad 100644 --- a/code/ui/manager/src/components/layout/Layout.tsx +++ b/code/ui/manager/src/components/layout/Layout.tsx @@ -81,7 +81,7 @@ const useLayoutSyncingState = ({ useLayoutEffect(() => { if ( internalDraggingSizeState.isDragging || // wait with syncing managerLayoutState until user is done dragging - layoutStateIsEqual(prevManagerLayoutStateRef.current, internalDraggingSizeState) // don't sync managerLayoutState if it doesn't differ from internalDraggingSizeState + layoutStateIsEqual(managerLayoutState, internalDraggingSizeState) // don't sync managerLayoutState if it doesn't differ from internalDraggingSizeStatee) ) { return; } @@ -95,7 +95,7 @@ const useLayoutSyncingState = ({ ...nextState, }; setManagerLayoutState(nextState); - }, [internalDraggingSizeState, setManagerLayoutState]); + }, [internalDraggingSizeState, managerLayoutState, setManagerLayoutState]); const isPagesShown = managerLayoutState.viewMode !== 'story' && managerLayoutState.viewMode !== 'docs'; From 32e854a5a89d9c3353d458ca1027bd61dfd27584 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sun, 24 Mar 2024 23:35:44 +0800 Subject: [PATCH 002/117] Add metaTags, tag removal --- code/addons/links/package.json | 2 +- code/lib/codemod/package.json | 2 +- code/lib/core-server/package.json | 2 +- .../src/utils/StoryIndexGenerator.ts | 23 +++++++--- code/lib/csf-tools/package.json | 2 +- code/lib/manager-api/package.json | 2 +- code/lib/preview-api/package.json | 2 +- .../src/modules/store/csf/prepareStory.ts | 8 +++- .../template/stories/tags.stories.ts | 4 ++ code/lib/source-loader/package.json | 2 +- code/lib/types/package.json | 2 +- code/lib/types/src/modules/indexer.ts | 1 + code/package.json | 2 +- code/renderers/server/package.json | 2 +- code/ui/blocks/package.json | 2 +- code/ui/components/package.json | 2 +- code/yarn.lock | 42 +++++++++---------- 17 files changed, 62 insertions(+), 40 deletions(-) diff --git a/code/addons/links/package.json b/code/addons/links/package.json index ed71883923f1..6a135b3c576a 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -67,7 +67,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/addon-bundle.ts" }, "dependencies": { - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@storybook/global": "^5.0.0", "ts-dedent": "^2.0.0" }, diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 1213fe7dd30f..8c355eb93454 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -57,7 +57,7 @@ "@babel/core": "^7.23.2", "@babel/preset-env": "^7.23.2", "@babel/types": "^7.23.0", - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@storybook/csf-tools": "workspace:*", "@storybook/node-logger": "workspace:*", "@storybook/types": "workspace:*", diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index b1c6880972ad..1526c391dff0 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -62,7 +62,7 @@ "@storybook/channels": "workspace:*", "@storybook/core-common": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@storybook/csf-tools": "workspace:*", "@storybook/docs-mdx": "3.0.0", "@storybook/global": "^5.0.0", diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.ts index a650f04c1ffa..0e036f685355 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.ts @@ -23,7 +23,7 @@ import { userOrAutoTitleFromSpecifier, sortStoriesV7 } from '@storybook/preview- import { commonGlobOptions, normalizeStoryPath } from '@storybook/core-common'; import { logger, once } from '@storybook/node-logger'; import { getStorySortParameter } from '@storybook/csf-tools'; -import { storyNameFromExport, toId } from '@storybook/csf'; +import { storyNameFromExport, toId, combineTags } from '@storybook/csf'; import { analyze } from '@storybook/docs-mdx'; import dedent from 'ts-dedent'; import { autoName } from './autoName'; @@ -55,6 +55,7 @@ export type StoryIndexGeneratorOptions = { }; export const AUTODOCS_TAG = 'autodocs'; +export const NO_AUTODOCS_TAG = `-${AUTODOCS_TAG}`; export const STORIES_MDX_TAG = 'stories-mdx'; export const PLAY_FN_TAG = 'play-fn'; @@ -291,7 +292,7 @@ export class StoryIndexGenerator { const title = input.title ?? defaultMakeTitle(); // eslint-disable-next-line no-underscore-dangle const id = input.__id ?? toId(input.metaId ?? title, storyNameFromExport(input.exportName)); - const tags = (input.tags || []).concat('story'); + const tags = combineTags(...(input.tags ?? []), ...(input.metaTags ?? []), 'story'); return { type: 'story', @@ -300,6 +301,7 @@ export class StoryIndexGenerator { name, title, importPath, + metaTags: input.metaTags ?? [], tags, }; }); @@ -312,7 +314,9 @@ export class StoryIndexGenerator { const hasAutodocsTag = entries.some((entry) => entry.tags.includes(AUTODOCS_TAG)); const isStoriesMdx = entries.some((entry) => entry.tags.includes(STORIES_MDX_TAG)); const createDocEntry = - autodocs === true || (autodocs === 'tag' && hasAutodocsTag) || isStoriesMdx; + (autodocs === true && !entries.some((entry) => entry.tags.includes(NO_AUTODOCS_TAG))) || + (autodocs === 'tag' && hasAutodocsTag) || + isStoriesMdx; if (createDocEntry && this.options.build?.test?.disableAutoDocs !== true) { const name = this.options.docs.defaultName ?? 'Docs'; @@ -326,7 +330,12 @@ export class StoryIndexGenerator { name, importPath, type: 'docs', - tags: [...metaTags, 'docs', ...(!hasAutodocsTag && !isStoriesMdx ? [AUTODOCS_TAG] : [])], + metaTags, + tags: combineTags( + ...metaTags, + 'docs', + ...(!hasAutodocsTag && !isStoriesMdx ? [AUTODOCS_TAG] : []) + ), storiesImports: [], }); } @@ -433,7 +442,11 @@ export class StoryIndexGenerator { storiesImports: sortedDependencies.map((dep) => dep.entries[0].importPath), type: 'docs', // FIXME: update this to use the index entry's metaTags once we update this to run on `IndexInputs` - tags: [...(result.tags || []), csfEntry ? 'attached-mdx' : 'unattached-mdx', 'docs'], + tags: combineTags( + ...(result.tags || []), + csfEntry ? 'attached-mdx' : 'unattached-mdx', + 'docs' + ), }; return docsEntry; } catch (err) { diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index 7aff878d6a68..39d063d32d01 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -46,7 +46,7 @@ "@babel/parser": "^7.23.0", "@babel/traverse": "^7.23.2", "@babel/types": "^7.23.0", - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@storybook/types": "workspace:*", "fs-extra": "^11.1.0", "recast": "^0.23.5", diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index d9b7b6b39cf2..9fd9941ef00f 100644 --- a/code/lib/manager-api/package.json +++ b/code/lib/manager-api/package.json @@ -47,7 +47,7 @@ "@storybook/channels": "workspace:*", "@storybook/client-logger": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", "@storybook/router": "workspace:*", diff --git a/code/lib/preview-api/package.json b/code/lib/preview-api/package.json index 8c64089acdec..23bd408491db 100644 --- a/code/lib/preview-api/package.json +++ b/code/lib/preview-api/package.json @@ -47,7 +47,7 @@ "@storybook/channels": "workspace:*", "@storybook/client-logger": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@storybook/global": "^5.0.0", "@storybook/types": "workspace:*", "@types/qs": "^6.9.5", diff --git a/code/lib/preview-api/src/modules/store/csf/prepareStory.ts b/code/lib/preview-api/src/modules/store/csf/prepareStory.ts index 0e5ea37500cd..ad35eff50f07 100644 --- a/code/lib/preview-api/src/modules/store/csf/prepareStory.ts +++ b/code/lib/preview-api/src/modules/store/csf/prepareStory.ts @@ -20,7 +20,7 @@ import type { StoryContextForLoaders, StrictArgTypes, } from '@storybook/types'; -import { includeConditionalArg } from '@storybook/csf'; +import { includeConditionalArg, combineTags } from '@storybook/csf'; import { applyHooks } from '../../addons'; import { combineParameters } from '../parameters'; @@ -140,7 +140,11 @@ function preparePartialAnnotations( // anything at render time. The assumption is that as we don't load all the stories at once, this // will have a limited cost. If this proves misguided, we can refactor it. - const tags = [...(storyAnnotations?.tags || componentAnnotations.tags || []), 'story']; + const tags = combineTags( + ...(storyAnnotations?.tags ?? []), + ...(componentAnnotations.tags ?? []), + 'story' + ); const parameters: Parameters = combineParameters( projectAnnotations.parameters, diff --git a/code/lib/preview-api/template/stories/tags.stories.ts b/code/lib/preview-api/template/stories/tags.stories.ts index 61ffe8811429..9af5be843d5f 100644 --- a/code/lib/preview-api/template/stories/tags.stories.ts +++ b/code/lib/preview-api/template/stories/tags.stories.ts @@ -37,3 +37,7 @@ export const TestOnly = { export const DevOnly = { tags: ['dev-only'], }; + +export const TagRemoval = { + tags: ['-component-two'], +}; diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index dca73497297f..c0578007e242 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -45,7 +45,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@storybook/types": "workspace:*", "estraverse": "^5.2.0", "lodash": "^4.17.21", diff --git a/code/lib/types/package.json b/code/lib/types/package.json index c936f0d7514d..c09dfb384b39 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -49,7 +49,7 @@ "file-system-cache": "2.3.0" }, "devDependencies": { - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@types/fs-extra": "^11.0.1", "@types/node": "^18.0.0", "typescript": "^5.3.2" diff --git a/code/lib/types/src/modules/indexer.ts b/code/lib/types/src/modules/indexer.ts index 1064354eefe0..42f0e21640e8 100644 --- a/code/lib/types/src/modules/indexer.ts +++ b/code/lib/types/src/modules/indexer.ts @@ -73,6 +73,7 @@ export interface BaseIndexEntry { id: StoryId; name: StoryName; title: ComponentTitle; + metaTags?: Tag[]; tags?: Tag[]; importPath: Path; } diff --git a/code/package.json b/code/package.json index 6e2885c0d0c1..c882ef4cf53d 100644 --- a/code/package.json +++ b/code/package.json @@ -127,7 +127,7 @@ "@storybook/core-events": "workspace:*", "@storybook/core-server": "workspace:*", "@storybook/core-webpack": "workspace:*", - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@storybook/csf-plugin": "workspace:*", "@storybook/csf-tools": "workspace:*", "@storybook/docs-tools": "workspace:*", diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 321308cbbf11..5a18737a65ca 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -46,7 +46,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@storybook/csf-tools": "workspace:*", "@storybook/global": "^5.0.0", "@storybook/preview-api": "workspace:*", diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index 683c5fbf25d7..a7b11a866577 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -48,7 +48,7 @@ "@storybook/client-logger": "workspace:*", "@storybook/components": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@storybook/docs-tools": "workspace:*", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", diff --git a/code/ui/components/package.json b/code/ui/components/package.json index 56a624b9e90c..1160d1a0d126 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -61,7 +61,7 @@ "dependencies": { "@radix-ui/react-slot": "^1.0.2", "@storybook/client-logger": "workspace:*", - "@storybook/csf": "^0.1.2", + "@storybook/csf": "0.1.4--canary.80.632d12b.0", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", "@storybook/theming": "workspace:*", diff --git a/code/yarn.lock b/code/yarn.lock index 664e1ed4eb15..e8d2a6a1df31 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5256,7 +5256,7 @@ __metadata: dependencies: "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@storybook/global": "npm:^5.0.0" "@storybook/manager-api": "workspace:*" "@storybook/preview-api": "workspace:*" @@ -5524,7 +5524,7 @@ __metadata: "@storybook/client-logger": "workspace:*" "@storybook/components": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@storybook/docs-tools": "workspace:*" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" @@ -5755,7 +5755,7 @@ __metadata: "@babel/core": "npm:^7.23.2" "@babel/preset-env": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@storybook/csf-tools": "workspace:*" "@storybook/node-logger": "workspace:*" "@storybook/types": "workspace:*" @@ -5791,7 +5791,7 @@ __metadata: "@radix-ui/react-scroll-area": "npm:^1.0.5" "@radix-ui/react-slot": "npm:^1.0.2" "@storybook/client-logger": "workspace:*" - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" "@storybook/test": "workspace:*" @@ -5884,7 +5884,7 @@ __metadata: "@storybook/channels": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@storybook/csf-tools": "workspace:*" "@storybook/docs-mdx": "npm:3.0.0" "@storybook/global": "npm:^5.0.0" @@ -5964,7 +5964,7 @@ __metadata: "@babel/parser": "npm:^7.23.0" "@babel/traverse": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@storybook/types": "workspace:*" "@types/fs-extra": "npm:^11.0.1" "@types/js-yaml": "npm:^4.0.5" @@ -5976,6 +5976,15 @@ __metadata: languageName: unknown linkType: soft +"@storybook/csf@npm:0.1.4--canary.80.632d12b.0": + version: 0.1.4--canary.80.632d12b.0 + resolution: "@storybook/csf@npm:0.1.4--canary.80.632d12b.0" + dependencies: + type-fest: "npm:^2.19.0" + checksum: 10c0/8e2c9562d874ea78ad578eac3132bcc0dc4116e52a0cea7921888796ffa4225f106d4286bce92655584ae1ad1cf5150fd891af6cec5eb261a2e5ba5ecc4fa879 + languageName: node + linkType: hard + "@storybook/csf@npm:^0.0.1": version: 0.0.1 resolution: "@storybook/csf@npm:0.0.1" @@ -5985,15 +5994,6 @@ __metadata: languageName: node linkType: hard -"@storybook/csf@npm:^0.1.2": - version: 0.1.2 - resolution: "@storybook/csf@npm:0.1.2" - dependencies: - type-fest: "npm:^2.19.0" - checksum: 10c0/b51a55292e5d2af8b1d135a28ecaa94f8860ddfedcb393adfa2cca1ee23853156066f737d8be1cb5412f572781aa525dc0b2f6e4a6f6ce805489f0149efe837c - languageName: node - linkType: hard - "@storybook/docs-mdx@npm:3.0.0": version: 3.0.0 resolution: "@storybook/docs-mdx@npm:3.0.0" @@ -6161,7 +6161,7 @@ __metadata: "@storybook/channels": "workspace:*" "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" "@storybook/router": "workspace:*" @@ -6493,7 +6493,7 @@ __metadata: "@storybook/client-logger": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@storybook/global": "npm:^5.0.0" "@storybook/types": "workspace:*" "@types/qs": "npm:^6.9.5" @@ -6678,7 +6678,7 @@ __metadata: "@storybook/core-events": "workspace:*" "@storybook/core-server": "workspace:*" "@storybook/core-webpack": "workspace:*" - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@storybook/csf-plugin": "workspace:*" "@storybook/csf-tools": "workspace:*" "@storybook/docs-tools": "workspace:*" @@ -6833,7 +6833,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/server@workspace:renderers/server" dependencies: - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@storybook/csf-tools": "workspace:*" "@storybook/global": "npm:^5.0.0" "@storybook/preview-api": "workspace:*" @@ -6850,7 +6850,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/source-loader@workspace:lib/source-loader" dependencies: - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@storybook/types": "workspace:*" estraverse: "npm:^5.2.0" lodash: "npm:^4.17.21" @@ -7028,7 +7028,7 @@ __metadata: resolution: "@storybook/types@workspace:lib/types" dependencies: "@storybook/channels": "workspace:*" - "@storybook/csf": "npm:^0.1.2" + "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" "@types/express": "npm:^4.7.0" "@types/fs-extra": "npm:^11.0.1" "@types/node": "npm:^18.0.0" From ab64211167ab223a01c06d119f6084e056ce817d Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 26 Mar 2024 13:12:56 +0800 Subject: [PATCH 003/117] Switch tag removal prefix from `-` to `!` --- code/addons/links/package.json | 2 +- code/lib/codemod/package.json | 2 +- code/lib/core-server/package.json | 2 +- .../src/utils/StoryIndexGenerator.ts | 2 +- code/lib/csf-tools/package.json | 2 +- code/lib/manager-api/package.json | 2 +- code/lib/preview-api/package.json | 2 +- .../template/stories/tags.stories.ts | 2 +- code/lib/source-loader/package.json | 2 +- code/lib/types/package.json | 2 +- code/package.json | 2 +- code/renderers/server/package.json | 2 +- code/ui/blocks/package.json | 2 +- code/ui/components/package.json | 2 +- code/yarn.lock | 32 +++++++++---------- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 6a135b3c576a..6718bb96b849 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -67,7 +67,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/addon-bundle.ts" }, "dependencies": { - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@storybook/global": "^5.0.0", "ts-dedent": "^2.0.0" }, diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 8c355eb93454..954ed90c5aa3 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -57,7 +57,7 @@ "@babel/core": "^7.23.2", "@babel/preset-env": "^7.23.2", "@babel/types": "^7.23.0", - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@storybook/csf-tools": "workspace:*", "@storybook/node-logger": "workspace:*", "@storybook/types": "workspace:*", diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index 1526c391dff0..8a785c9d4e3e 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -62,7 +62,7 @@ "@storybook/channels": "workspace:*", "@storybook/core-common": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@storybook/csf-tools": "workspace:*", "@storybook/docs-mdx": "3.0.0", "@storybook/global": "^5.0.0", diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.ts index 0e036f685355..8b1fbbe738d7 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.ts @@ -55,7 +55,7 @@ export type StoryIndexGeneratorOptions = { }; export const AUTODOCS_TAG = 'autodocs'; -export const NO_AUTODOCS_TAG = `-${AUTODOCS_TAG}`; +export const NO_AUTODOCS_TAG = `!${AUTODOCS_TAG}`; export const STORIES_MDX_TAG = 'stories-mdx'; export const PLAY_FN_TAG = 'play-fn'; diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index 39d063d32d01..bc45285b5242 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -46,7 +46,7 @@ "@babel/parser": "^7.23.0", "@babel/traverse": "^7.23.2", "@babel/types": "^7.23.0", - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@storybook/types": "workspace:*", "fs-extra": "^11.1.0", "recast": "^0.23.5", diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index 9fd9941ef00f..51621f8445d1 100644 --- a/code/lib/manager-api/package.json +++ b/code/lib/manager-api/package.json @@ -47,7 +47,7 @@ "@storybook/channels": "workspace:*", "@storybook/client-logger": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", "@storybook/router": "workspace:*", diff --git a/code/lib/preview-api/package.json b/code/lib/preview-api/package.json index 23bd408491db..c3705da914f7 100644 --- a/code/lib/preview-api/package.json +++ b/code/lib/preview-api/package.json @@ -47,7 +47,7 @@ "@storybook/channels": "workspace:*", "@storybook/client-logger": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@storybook/global": "^5.0.0", "@storybook/types": "workspace:*", "@types/qs": "^6.9.5", diff --git a/code/lib/preview-api/template/stories/tags.stories.ts b/code/lib/preview-api/template/stories/tags.stories.ts index 9af5be843d5f..b6b89c37ec6c 100644 --- a/code/lib/preview-api/template/stories/tags.stories.ts +++ b/code/lib/preview-api/template/stories/tags.stories.ts @@ -39,5 +39,5 @@ export const DevOnly = { }; export const TagRemoval = { - tags: ['-component-two'], + tags: ['!component-two'], }; diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index c0578007e242..624a582ef899 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -45,7 +45,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@storybook/types": "workspace:*", "estraverse": "^5.2.0", "lodash": "^4.17.21", diff --git a/code/lib/types/package.json b/code/lib/types/package.json index c09dfb384b39..fe29111a2043 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -49,7 +49,7 @@ "file-system-cache": "2.3.0" }, "devDependencies": { - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@types/fs-extra": "^11.0.1", "@types/node": "^18.0.0", "typescript": "^5.3.2" diff --git a/code/package.json b/code/package.json index c882ef4cf53d..44ed3a2544ad 100644 --- a/code/package.json +++ b/code/package.json @@ -127,7 +127,7 @@ "@storybook/core-events": "workspace:*", "@storybook/core-server": "workspace:*", "@storybook/core-webpack": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@storybook/csf-plugin": "workspace:*", "@storybook/csf-tools": "workspace:*", "@storybook/docs-tools": "workspace:*", diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 5a18737a65ca..70fda2b74aff 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -46,7 +46,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@storybook/csf-tools": "workspace:*", "@storybook/global": "^5.0.0", "@storybook/preview-api": "workspace:*", diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index a7b11a866577..f93dfeeb03d1 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -48,7 +48,7 @@ "@storybook/client-logger": "workspace:*", "@storybook/components": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@storybook/docs-tools": "workspace:*", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", diff --git a/code/ui/components/package.json b/code/ui/components/package.json index 1160d1a0d126..470a71dda15d 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -61,7 +61,7 @@ "dependencies": { "@radix-ui/react-slot": "^1.0.2", "@storybook/client-logger": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.632d12b.0", + "@storybook/csf": "0.1.4--canary.80.aedde7f.0", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", "@storybook/theming": "workspace:*", diff --git a/code/yarn.lock b/code/yarn.lock index e8d2a6a1df31..6faa6a67ad53 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5256,7 +5256,7 @@ __metadata: dependencies: "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@storybook/global": "npm:^5.0.0" "@storybook/manager-api": "workspace:*" "@storybook/preview-api": "workspace:*" @@ -5524,7 +5524,7 @@ __metadata: "@storybook/client-logger": "workspace:*" "@storybook/components": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@storybook/docs-tools": "workspace:*" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" @@ -5755,7 +5755,7 @@ __metadata: "@babel/core": "npm:^7.23.2" "@babel/preset-env": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@storybook/csf-tools": "workspace:*" "@storybook/node-logger": "workspace:*" "@storybook/types": "workspace:*" @@ -5791,7 +5791,7 @@ __metadata: "@radix-ui/react-scroll-area": "npm:^1.0.5" "@radix-ui/react-slot": "npm:^1.0.2" "@storybook/client-logger": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" "@storybook/test": "workspace:*" @@ -5884,7 +5884,7 @@ __metadata: "@storybook/channels": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@storybook/csf-tools": "workspace:*" "@storybook/docs-mdx": "npm:3.0.0" "@storybook/global": "npm:^5.0.0" @@ -5964,7 +5964,7 @@ __metadata: "@babel/parser": "npm:^7.23.0" "@babel/traverse": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@storybook/types": "workspace:*" "@types/fs-extra": "npm:^11.0.1" "@types/js-yaml": "npm:^4.0.5" @@ -5976,12 +5976,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/csf@npm:0.1.4--canary.80.632d12b.0": - version: 0.1.4--canary.80.632d12b.0 - resolution: "@storybook/csf@npm:0.1.4--canary.80.632d12b.0" +"@storybook/csf@npm:0.1.4--canary.80.aedde7f.0": + version: 0.1.4--canary.80.aedde7f.0 + resolution: "@storybook/csf@npm:0.1.4--canary.80.aedde7f.0" dependencies: type-fest: "npm:^2.19.0" - checksum: 10c0/8e2c9562d874ea78ad578eac3132bcc0dc4116e52a0cea7921888796ffa4225f106d4286bce92655584ae1ad1cf5150fd891af6cec5eb261a2e5ba5ecc4fa879 + checksum: 10c0/14bf5d4f7cb44a2534a2ea37e88350a44d43e33218184d57e7cfcf1e029967454fb16118e21ce5ebce21e1d783fe807723d8d8babf7b2cc806207e2345033748 languageName: node linkType: hard @@ -6161,7 +6161,7 @@ __metadata: "@storybook/channels": "workspace:*" "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" "@storybook/router": "workspace:*" @@ -6493,7 +6493,7 @@ __metadata: "@storybook/client-logger": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@storybook/global": "npm:^5.0.0" "@storybook/types": "workspace:*" "@types/qs": "npm:^6.9.5" @@ -6678,7 +6678,7 @@ __metadata: "@storybook/core-events": "workspace:*" "@storybook/core-server": "workspace:*" "@storybook/core-webpack": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@storybook/csf-plugin": "workspace:*" "@storybook/csf-tools": "workspace:*" "@storybook/docs-tools": "workspace:*" @@ -6833,7 +6833,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/server@workspace:renderers/server" dependencies: - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@storybook/csf-tools": "workspace:*" "@storybook/global": "npm:^5.0.0" "@storybook/preview-api": "workspace:*" @@ -6850,7 +6850,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/source-loader@workspace:lib/source-loader" dependencies: - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@storybook/types": "workspace:*" estraverse: "npm:^5.2.0" lodash: "npm:^4.17.21" @@ -7028,7 +7028,7 @@ __metadata: resolution: "@storybook/types@workspace:lib/types" dependencies: "@storybook/channels": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.632d12b.0" + "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" "@types/express": "npm:^4.7.0" "@types/fs-extra": "npm:^11.0.1" "@types/node": "npm:^18.0.0" From b5b17f5dee27f16fcfc2cf51eec7d2dbd27d5486 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Fri, 29 Mar 2024 21:39:17 +0800 Subject: [PATCH 004/117] Add project-level tags --- code/addons/links/package.json | 2 +- code/lib/codemod/package.json | 2 +- code/lib/core-server/package.json | 2 +- .../src/utils/StoryIndexGenerator.ts | 57 ++++++++++++------- code/lib/csf-tools/package.json | 2 +- code/lib/manager-api/package.json | 2 +- code/lib/preview-api/package.json | 2 +- .../src/modules/store/csf/composeConfigs.ts | 1 + .../src/modules/store/csf/prepareStory.ts | 7 ++- code/lib/source-loader/package.json | 2 +- code/lib/types/package.json | 2 +- code/package.json | 2 +- code/renderers/server/package.json | 2 +- code/ui/blocks/package.json | 2 +- code/ui/components/package.json | 2 +- code/yarn.lock | 32 +++++------ 16 files changed, 73 insertions(+), 48 deletions(-) diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 6718bb96b849..8a2c600d574c 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -67,7 +67,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/addon-bundle.ts" }, "dependencies": { - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/global": "^5.0.0", "ts-dedent": "^2.0.0" }, diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 954ed90c5aa3..35e5ebab28c9 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -57,7 +57,7 @@ "@babel/core": "^7.23.2", "@babel/preset-env": "^7.23.2", "@babel/types": "^7.23.0", - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/csf-tools": "workspace:*", "@storybook/node-logger": "workspace:*", "@storybook/types": "workspace:*", diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index 8a785c9d4e3e..6e88034f3591 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -62,7 +62,7 @@ "@storybook/channels": "workspace:*", "@storybook/core-common": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/csf-tools": "workspace:*", "@storybook/docs-mdx": "3.0.0", "@storybook/global": "^5.0.0", diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.ts index 8b1fbbe738d7..0aaba41efd67 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.ts @@ -22,7 +22,7 @@ import type { import { userOrAutoTitleFromSpecifier, sortStoriesV7 } from '@storybook/preview-api'; import { commonGlobOptions, normalizeStoryPath } from '@storybook/core-common'; import { logger, once } from '@storybook/node-logger'; -import { getStorySortParameter } from '@storybook/csf-tools'; +import { getStorySortParameter, loadConfig } from '@storybook/csf-tools'; import { storyNameFromExport, toId, combineTags } from '@storybook/csf'; import { analyze } from '@storybook/docs-mdx'; import dedent from 'ts-dedent'; @@ -156,8 +156,11 @@ export class StoryIndexGenerator { this.specifierToCache.set(specifier, cache) ); + const previewCode = await this.getPreviewCode(); + const projectTags = previewCode && this.getProjectTags(previewCode); + // Extract stories for each file - await this.ensureExtracted(); + await this.ensureExtracted({ projectTags }); } /** @@ -211,7 +214,11 @@ export class StoryIndexGenerator { return /(? { + async ensureExtracted({ + projectTags, + }: { + projectTags?: Tag[]; + }): Promise<(IndexEntry | ErrorEntry)[]> { // First process all the story files. Then, in a second pass, // process the docs files. The reason for this is that the docs // files may use the `` syntax, which requires @@ -234,19 +241,26 @@ export class StoryIndexGenerator { ); return Object.values(cache).flatMap((entry): (IndexEntry | ErrorEntry)[] => { if (!entry) return []; - if (entry.type === 'docs') return [entry]; + if (entry.type === 'docs') return [this.addProjectTags(entry, projectTags)]; if (entry.type === 'error') return [entry]; return entry.entries.map((item) => { - if (item.type === 'docs') return item; + if (item.type === 'docs') return this.addProjectTags(item, projectTags); // Drop the meta id as it isn't part of the index, we just used it for record keeping in `extractDocs` const { metaId, ...existing } = item; - return existing; + return this.addProjectTags(existing, projectTags); }); }); }); } + addProjectTags(entry: IndexEntry, projectTags?: Tag[]) { + return { + ...entry, + metaTags: combineTags(...(projectTags || []), ...(entry.metaTags || [])), + }; + } + findDependencies(absoluteImports: Path[]) { return [...this.specifierToCache.values()].flatMap((cache: SpecifierStoriesCache) => Object.entries(cache) @@ -535,10 +549,8 @@ export class StoryIndexGenerator { return betterEntry; } - async sortStories(entries: StoryIndex['entries']) { + async sortStories(entries: StoryIndex['entries'], storySortParameter: any) { const sortableStories = Object.values(entries); - - const storySortParameter = await this.getStorySortParameter(); const fileNameOrder = this.storyFileNames(); sortStoriesV7(sortableStories, storySortParameter, fileNameOrder); @@ -555,9 +567,12 @@ export class StoryIndexGenerator { if (this.lastIndex) return this.lastIndex; if (this.lastError) throw this.lastError; + const previewCode = await this.getPreviewCode(); + const projectTags = previewCode && this.getProjectTags(previewCode); + // Extract any entries that are currently missing // Pull out each file's stories into a list of stories, to be composed and sorted - const storiesList = await this.ensureExtracted(); + const storiesList = await this.ensureExtracted({ projectTags }); try { const errorEntries = storiesList.filter((entry) => entry.type === 'error'); @@ -581,7 +596,10 @@ export class StoryIndexGenerator { }); if (duplicateErrors.length) throw new MultipleIndexingError(duplicateErrors); - const sorted = await this.sortStories(indexEntries); + const sorted = await this.sortStories( + indexEntries, + previewCode && getStorySortParameter(previewCode) + ); this.lastIndex = { v: 4, @@ -641,17 +659,18 @@ export class StoryIndexGenerator { this.lastError = null; } - async getStorySortParameter() { - const previewFile = ['js', 'jsx', 'ts', 'tsx', 'mjs', 'cjs'] + async getPreviewCode() { + const previewFile = ['js', 'jsx', 'ts', 'tsx', 'mjs', 'cjs', 'mts'] .map((ext) => path.join(this.options.configDir, `preview.${ext}`)) .find((fname) => fs.existsSync(fname)); - let storySortParameter; - if (previewFile) { - const previewCode = (await fs.readFile(previewFile, 'utf-8')).toString(); - storySortParameter = await getStorySortParameter(previewCode); - } - return storySortParameter; + return previewFile && (await fs.readFile(previewFile, 'utf-8')).toString(); + } + + getProjectTags(previewCode: string) { + const projectAnnotations = loadConfig(previewCode).parse(); + const projectTags = projectAnnotations.getFieldValue(['tags']); + return projectTags; } // Get the story file names in "imported order" diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index bc45285b5242..1f8b41d7b51b 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -46,7 +46,7 @@ "@babel/parser": "^7.23.0", "@babel/traverse": "^7.23.2", "@babel/types": "^7.23.0", - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/types": "workspace:*", "fs-extra": "^11.1.0", "recast": "^0.23.5", diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index 51621f8445d1..abced2447faf 100644 --- a/code/lib/manager-api/package.json +++ b/code/lib/manager-api/package.json @@ -47,7 +47,7 @@ "@storybook/channels": "workspace:*", "@storybook/client-logger": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", "@storybook/router": "workspace:*", diff --git a/code/lib/preview-api/package.json b/code/lib/preview-api/package.json index c3705da914f7..cb995ab59c37 100644 --- a/code/lib/preview-api/package.json +++ b/code/lib/preview-api/package.json @@ -47,7 +47,7 @@ "@storybook/channels": "workspace:*", "@storybook/client-logger": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/global": "^5.0.0", "@storybook/types": "workspace:*", "@types/qs": "^6.9.5", diff --git a/code/lib/preview-api/src/modules/store/csf/composeConfigs.ts b/code/lib/preview-api/src/modules/store/csf/composeConfigs.ts index e5785a6a3f01..29823816beaf 100644 --- a/code/lib/preview-api/src/modules/store/csf/composeConfigs.ts +++ b/code/lib/preview-api/src/modules/store/csf/composeConfigs.ts @@ -63,5 +63,6 @@ export function composeConfigs( renderToDOM: getSingletonField(moduleExportList, 'renderToDOM'), // deprecated applyDecorators: getSingletonField(moduleExportList, 'applyDecorators'), runStep: composeStepRunners(stepRunners), + tags: getArrayField(moduleExportList, 'tags'), }; } diff --git a/code/lib/preview-api/src/modules/store/csf/prepareStory.ts b/code/lib/preview-api/src/modules/store/csf/prepareStory.ts index ad35eff50f07..4b8035f606d3 100644 --- a/code/lib/preview-api/src/modules/store/csf/prepareStory.ts +++ b/code/lib/preview-api/src/modules/store/csf/prepareStory.ts @@ -125,6 +125,10 @@ export function prepareMeta( projectAnnotations: NormalizedProjectAnnotations, moduleExport: ModuleExport ): PreparedMeta { + console.log('prepareMeta', { + metaTags: componentAnnotations.tags, + projectAnnotations, + }); return { ...preparePartialAnnotations(undefined, componentAnnotations, projectAnnotations), moduleExport, @@ -141,8 +145,9 @@ function preparePartialAnnotations( // will have a limited cost. If this proves misguided, we can refactor it. const tags = combineTags( - ...(storyAnnotations?.tags ?? []), + ...(projectAnnotations.tags ?? []), ...(componentAnnotations.tags ?? []), + ...(storyAnnotations?.tags ?? []), 'story' ); diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index 624a582ef899..5f1ac102b5d6 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -45,7 +45,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/types": "workspace:*", "estraverse": "^5.2.0", "lodash": "^4.17.21", diff --git a/code/lib/types/package.json b/code/lib/types/package.json index fe29111a2043..f9eb319420b7 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -49,7 +49,7 @@ "file-system-cache": "2.3.0" }, "devDependencies": { - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@types/fs-extra": "^11.0.1", "@types/node": "^18.0.0", "typescript": "^5.3.2" diff --git a/code/package.json b/code/package.json index 44ed3a2544ad..454f5b0dd84a 100644 --- a/code/package.json +++ b/code/package.json @@ -127,7 +127,7 @@ "@storybook/core-events": "workspace:*", "@storybook/core-server": "workspace:*", "@storybook/core-webpack": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/csf-plugin": "workspace:*", "@storybook/csf-tools": "workspace:*", "@storybook/docs-tools": "workspace:*", diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 70fda2b74aff..54c669fac08a 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -46,7 +46,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/csf-tools": "workspace:*", "@storybook/global": "^5.0.0", "@storybook/preview-api": "workspace:*", diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index f93dfeeb03d1..a28714a17228 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -48,7 +48,7 @@ "@storybook/client-logger": "workspace:*", "@storybook/components": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/docs-tools": "workspace:*", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", diff --git a/code/ui/components/package.json b/code/ui/components/package.json index 470a71dda15d..6569d692d59a 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -61,7 +61,7 @@ "dependencies": { "@radix-ui/react-slot": "^1.0.2", "@storybook/client-logger": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.aedde7f.0", + "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", "@storybook/theming": "workspace:*", diff --git a/code/yarn.lock b/code/yarn.lock index 6faa6a67ad53..30fe40584238 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5256,7 +5256,7 @@ __metadata: dependencies: "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/global": "npm:^5.0.0" "@storybook/manager-api": "workspace:*" "@storybook/preview-api": "workspace:*" @@ -5524,7 +5524,7 @@ __metadata: "@storybook/client-logger": "workspace:*" "@storybook/components": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/docs-tools": "workspace:*" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" @@ -5755,7 +5755,7 @@ __metadata: "@babel/core": "npm:^7.23.2" "@babel/preset-env": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/csf-tools": "workspace:*" "@storybook/node-logger": "workspace:*" "@storybook/types": "workspace:*" @@ -5791,7 +5791,7 @@ __metadata: "@radix-ui/react-scroll-area": "npm:^1.0.5" "@radix-ui/react-slot": "npm:^1.0.2" "@storybook/client-logger": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" "@storybook/test": "workspace:*" @@ -5884,7 +5884,7 @@ __metadata: "@storybook/channels": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/csf-tools": "workspace:*" "@storybook/docs-mdx": "npm:3.0.0" "@storybook/global": "npm:^5.0.0" @@ -5964,7 +5964,7 @@ __metadata: "@babel/parser": "npm:^7.23.0" "@babel/traverse": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/types": "workspace:*" "@types/fs-extra": "npm:^11.0.1" "@types/js-yaml": "npm:^4.0.5" @@ -5976,12 +5976,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/csf@npm:0.1.4--canary.80.aedde7f.0": - version: 0.1.4--canary.80.aedde7f.0 - resolution: "@storybook/csf@npm:0.1.4--canary.80.aedde7f.0" +"@storybook/csf@npm:0.1.4--canary.80.f469755.0": + version: 0.1.4--canary.80.f469755.0 + resolution: "@storybook/csf@npm:0.1.4--canary.80.f469755.0" dependencies: type-fest: "npm:^2.19.0" - checksum: 10c0/14bf5d4f7cb44a2534a2ea37e88350a44d43e33218184d57e7cfcf1e029967454fb16118e21ce5ebce21e1d783fe807723d8d8babf7b2cc806207e2345033748 + checksum: 10c0/a5b2dfe1c2d02b6ab072c7ca0b3918f24ac3093ec740cd79a44f178b583d02ad1f838bfd77cd30ea486c92e7a9b37a921d2e0807e3b1a7cc26f57c62a446ed24 languageName: node linkType: hard @@ -6161,7 +6161,7 @@ __metadata: "@storybook/channels": "workspace:*" "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" "@storybook/router": "workspace:*" @@ -6493,7 +6493,7 @@ __metadata: "@storybook/client-logger": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/global": "npm:^5.0.0" "@storybook/types": "workspace:*" "@types/qs": "npm:^6.9.5" @@ -6678,7 +6678,7 @@ __metadata: "@storybook/core-events": "workspace:*" "@storybook/core-server": "workspace:*" "@storybook/core-webpack": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/csf-plugin": "workspace:*" "@storybook/csf-tools": "workspace:*" "@storybook/docs-tools": "workspace:*" @@ -6833,7 +6833,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/server@workspace:renderers/server" dependencies: - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/csf-tools": "workspace:*" "@storybook/global": "npm:^5.0.0" "@storybook/preview-api": "workspace:*" @@ -6850,7 +6850,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/source-loader@workspace:lib/source-loader" dependencies: - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/types": "workspace:*" estraverse: "npm:^5.2.0" lodash: "npm:^4.17.21" @@ -7028,7 +7028,7 @@ __metadata: resolution: "@storybook/types@workspace:lib/types" dependencies: "@storybook/channels": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.aedde7f.0" + "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@types/express": "npm:^4.7.0" "@types/fs-extra": "npm:^11.0.1" "@types/node": "npm:^18.0.0" From c52d9438e5654559a8b787300d650f4812ce37a4 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sat, 30 Mar 2024 00:29:57 +0800 Subject: [PATCH 005/117] Deprecate main.js docs.autodocs in favor of tags --- .../src/utils/StoryIndexGenerator.ts | 35 ++++++++++++------- .../src/modules/store/csf/prepareStory.ts | 4 --- code/lib/types/src/modules/core-common.ts | 2 ++ 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.ts index 0aaba41efd67..fae54d3f9372 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.ts @@ -55,7 +55,6 @@ export type StoryIndexGeneratorOptions = { }; export const AUTODOCS_TAG = 'autodocs'; -export const NO_AUTODOCS_TAG = `!${AUTODOCS_TAG}`; export const STORIES_MDX_TAG = 'stories-mdx'; export const PLAY_FN_TAG = 'play-fn'; @@ -254,10 +253,18 @@ export class StoryIndexGenerator { }); } + getExtraTags() { + return this.options.docs.autodocs === true ? [AUTODOCS_TAG] : []; + } + addProjectTags(entry: IndexEntry, projectTags?: Tag[]) { return { ...entry, - metaTags: combineTags(...(projectTags || []), ...(entry.metaTags || [])), + metaTags: combineTags( + ...this.getExtraTags(), + ...(projectTags ?? []), + ...(entry.metaTags ?? []) + ), }; } @@ -306,7 +313,13 @@ export class StoryIndexGenerator { const title = input.title ?? defaultMakeTitle(); // eslint-disable-next-line no-underscore-dangle const id = input.__id ?? toId(input.metaId ?? title, storyNameFromExport(input.exportName)); - const tags = combineTags(...(input.tags ?? []), ...(input.metaTags ?? []), 'story'); + const extraTags = this.getExtraTags(); + const tags = combineTags( + ...extraTags, + ...(input.metaTags ?? []), + ...(input.tags ?? []), + 'story' + ); return { type: 'story', @@ -320,23 +333,18 @@ export class StoryIndexGenerator { }; }); - const { autodocs } = this.options.docs; // We need a docs entry attached to the CSF file if either: - // a) autodocs is globally enabled - // b) we have autodocs enabled for this file - // c) it is a stories.mdx transpiled to CSF + // a) we have autodocs enabled for this file + // b) it is a stories.mdx transpiled to CSF const hasAutodocsTag = entries.some((entry) => entry.tags.includes(AUTODOCS_TAG)); const isStoriesMdx = entries.some((entry) => entry.tags.includes(STORIES_MDX_TAG)); - const createDocEntry = - (autodocs === true && !entries.some((entry) => entry.tags.includes(NO_AUTODOCS_TAG))) || - (autodocs === 'tag' && hasAutodocsTag) || - isStoriesMdx; + const createDocEntry = (hasAutodocsTag && this.options.docs.autodocs !== false) || isStoriesMdx; if (createDocEntry && this.options.build?.test?.disableAutoDocs !== true) { const name = this.options.docs.defaultName ?? 'Docs'; const { metaId } = indexInputs[0]; const { title } = entries[0]; - const metaTags = indexInputs[0].metaTags || []; + const metaTags = indexInputs[0].metaTags ?? []; const id = toId(metaId ?? title, name); entries.unshift({ id, @@ -457,7 +465,8 @@ export class StoryIndexGenerator { type: 'docs', // FIXME: update this to use the index entry's metaTags once we update this to run on `IndexInputs` tags: combineTags( - ...(result.tags || []), + ...this.getExtraTags(), + ...(result.tags ?? []), csfEntry ? 'attached-mdx' : 'unattached-mdx', 'docs' ), diff --git a/code/lib/preview-api/src/modules/store/csf/prepareStory.ts b/code/lib/preview-api/src/modules/store/csf/prepareStory.ts index 4b8035f606d3..f7bb302c0d74 100644 --- a/code/lib/preview-api/src/modules/store/csf/prepareStory.ts +++ b/code/lib/preview-api/src/modules/store/csf/prepareStory.ts @@ -125,10 +125,6 @@ export function prepareMeta( projectAnnotations: NormalizedProjectAnnotations, moduleExport: ModuleExport ): PreparedMeta { - console.log('prepareMeta', { - metaTags: componentAnnotations.tags, - projectAnnotations, - }); return { ...preparePartialAnnotations(undefined, componentAnnotations, projectAnnotations), moduleExport, diff --git a/code/lib/types/src/modules/core-common.ts b/code/lib/types/src/modules/core-common.ts index c4aeeacbcf1f..0e8dd7f002cd 100644 --- a/code/lib/types/src/modules/core-common.ts +++ b/code/lib/types/src/modules/core-common.ts @@ -280,6 +280,8 @@ export type DocsOptions = { * Should we generate a docs entry per CSF file? * Set to 'tag' (the default) to generate an entry for every CSF file with the * 'autodocs' tag. + * + * @deprecated Use `tags: ['autodocs']` in .storybook/preview.js instead */ autodocs?: boolean | 'tag'; /** From ebce0807d1b1ad53334fef14b8ddfad70ea22511 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sat, 30 Mar 2024 01:00:51 +0800 Subject: [PATCH 006/117] Add autodocs tag in preview if docs.autodics is true --- code/lib/preview-api/src/modules/store/csf/prepareStory.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/lib/preview-api/src/modules/store/csf/prepareStory.ts b/code/lib/preview-api/src/modules/store/csf/prepareStory.ts index f7bb302c0d74..3350a32e3fe3 100644 --- a/code/lib/preview-api/src/modules/store/csf/prepareStory.ts +++ b/code/lib/preview-api/src/modules/store/csf/prepareStory.ts @@ -21,6 +21,7 @@ import type { StrictArgTypes, } from '@storybook/types'; import { includeConditionalArg, combineTags } from '@storybook/csf'; +import { global as globalThis } from '@storybook/global'; import { applyHooks } from '../../addons'; import { combineParameters } from '../parameters'; @@ -140,7 +141,10 @@ function preparePartialAnnotations( // anything at render time. The assumption is that as we don't load all the stories at once, this // will have a limited cost. If this proves misguided, we can refactor it. + const extraTags = globalThis.DOCS_OPTIONS?.autodocs === true ? ['autodocs'] : []; + const tags = combineTags( + ...extraTags, ...(projectAnnotations.tags ?? []), ...(componentAnnotations.tags ?? []), ...(storyAnnotations?.tags ?? []), From 33176192adcbbcc06382a0b6cf4a1122242da6c3 Mon Sep 17 00:00:00 2001 From: Kyle Gach Date: Tue, 2 Apr 2024 12:38:54 -0600 Subject: [PATCH 007/117] Add docs for story tags - API reference - Guide - CLI options --- docs/api/cli-options.md | 9 +++- docs/api/main-config-tags.md | 40 +++++++++++++++ docs/api/main-config.md | 1 + docs/toc.js | 12 ++++- docs/writing-stories/tags.md | 99 ++++++++++++++++++++++++++++++++++++ 5 files changed, 158 insertions(+), 3 deletions(-) create mode 100644 docs/api/main-config-tags.md create mode 100644 docs/writing-stories/tags.md diff --git a/docs/api/cli-options.md b/docs/api/cli-options.md index 3aa9f0a3f0a1..39b366429daf 100644 --- a/docs/api/cli-options.md +++ b/docs/api/cli-options.md @@ -1,5 +1,6 @@ --- title: 'CLI options' +hideRendererSelector: true --- The Storybook command line interface (CLI) is the main tool you use to build and develop Storybook. @@ -46,9 +47,11 @@ Options include: | `--no-open` | Do not open Storybook automatically in the browser
`storybook dev --no-open` | | `--quiet` | Suppress verbose build output
`storybook dev --quiet` | | `--debug-webpack` | Display final webpack configurations for debugging purposes
`storybook dev --debug-webpack` | -| `--stats-json` | Write stats JSON to disk
`storybook dev ---stats-json /tmp/stats`
NOTE: only works for webpack. | +| `--stats-json` | Write stats JSON to disk
`storybook dev ---stats-json /tmp/stats`
NOTE: only works for webpack. | | `--docs` | Starts Storybook in documentation mode. Learn more about it in [here](../writing-docs/build-documentation.md#preview-storybooks-documentation)
`storybook dev --docs` | | `--disable-telemetry` | Disables Storybook's telemetry. Learn more about it [here](../configure/telemetry.md)
`storybook dev --disable-telemetry` | +| `--tags` | Select which [story tags](../writing-stories/tags.md) to include. Accepts a comma-seperated string.
`storybook dev --tags "dev,test"` | +| `--exclude-tags` | Select which [story tags](../writing-stories/tags.md) to exclude. Accepts a comma-seperated string.
`storybook dev --tags "docs, test"` | @@ -75,10 +78,12 @@ Options include: | `--loglevel [level]` | Controls level of logging during build.
Available options: `silly`, `verbose`, `info` (default), `warn`, `error`, `silent`
`storybook build --loglevel warn` | | `--quiet` | Suppress verbose build output
`storybook build --quiet` | | `--debug-webpack` | Display final webpack configurations for debugging purposes
`storybook build --debug-webpack` | -| `---stats-json` | Write stats JSON to disk
`storybook build -stats-json /my-storybook/-stats` | +| `---stats-json` | Write stats JSON to disk
`storybook build -stats-json /my-storybook/-stats` | | `--docs` | Builds Storybook in documentation mode. Learn more about it in [here](../writing-docs/build-documentation.md#publish-storybooks-documentation)
`storybook build --docs` | | `--disable-telemetry` | Disables Storybook's telemetry. Learn more about it [here](../configure/telemetry.md).
`storybook build --disable-telemetry` | | `--test` | Optimize Storybook's production build for performance and tests by removing unnecessary features with the `test` option. Learn more [here](../api/main-config-build.md).
`storybook build --test` | +| `--tags` | Select which [story tags](../writing-stories/tags.md) to include. Accepts a comma-seperated string.
`storybook dev --tags "dev,test"` | +| `--exclude-tags` | Select which [story tags](../writing-stories/tags.md) to exclude. Accepts a comma-seperated string.
`storybook dev --tags "docs, test"` | diff --git a/docs/api/main-config-tags.md b/docs/api/main-config-tags.md new file mode 100644 index 000000000000..cb593d36afb5 --- /dev/null +++ b/docs/api/main-config-tags.md @@ -0,0 +1,40 @@ +--- +title: 'tags' +hideRendererSelector: true +--- + +Parent: [main.js|ts configuration](./main-config.md) + +Type: `{ [key: string]: { description?: string } }` + +[Tags](../writing-stories/tags.md) allow you to control which stories are included in your Storybook. They are defined in the `tags` property of the Storybook configuration. Then they can be [applied to stories](../writing-stories/tags.md#tagging-stories) at the project, component, and story levels using the `tags` array. + +## Default tags + +The following tags are available by default in your project: + +```js +{ + dev: { description: 'Rendered in the Storybook UI, but only in development mode. They do not appear in the sidebar in production mode.' }, + docs: { description: 'Rendered in the Storybook UI, but only in the docs page. They do not appear in the sidebar.' }, + test: { description: 'Not rendered in the Storybook UI, in either development or production mode.' }, +} +``` + +## Custom tags + +You can [define your own tags](../writing-stories/tags.md#custom-tags). When doing so, the key is the tag name, and the value is an object with an optional `description` property. + +```ts +// .storybook/main.ts +import { StorybookConfig } from '@storybook/'; + +const config: StorybookConfig = { + // ...rest of config + tags: { + experimental: { description: 'Stories for experimental components or features' }, + }, +}; + +export default config; +``` diff --git a/docs/api/main-config.md b/docs/api/main-config.md index a9013268e45c..e347bc355b5f 100644 --- a/docs/api/main-config.md +++ b/docs/api/main-config.md @@ -44,6 +44,7 @@ An object to configure Storybook containing the following properties: - [`refs`](./main-config-refs.md) - [`staticDirs`](./main-config-static-dirs.md) - [`swc`](./main-config-swc.md) +- [`tags`](./main-config-tags.md) - [`typescript`](./main-config-typescript.md) - [`viteFinal`](./main-config-vite-final.md) - [`webpackFinal`](./main-config-webpack-final.md) diff --git a/docs/toc.js b/docs/toc.js index a4d3e85cf6be..7f3b62cbe9e8 100644 --- a/docs/toc.js +++ b/docs/toc.js @@ -136,6 +136,11 @@ module.exports = { title: 'Loaders', type: 'link', }, + { + pathSegment: 'tags', + title: 'Tags', + type: 'link', + }, { pathSegment: 'naming-components-and-hierarchy', title: 'Naming components and hierarchy', @@ -611,11 +616,16 @@ module.exports = { pathSegment: 'main-config-static-dirs', type: 'link', }, - { + { title: 'swc', pathSegment: 'main-config-swc', type: 'link', }, + { + title: 'tags', + pathSegment: 'main-config-tags', + type: 'link', + }, { title: 'typescript', pathSegment: 'main-config-typescript', diff --git a/docs/writing-stories/tags.md b/docs/writing-stories/tags.md new file mode 100644 index 000000000000..174cfab0183a --- /dev/null +++ b/docs/writing-stories/tags.md @@ -0,0 +1,99 @@ +--- +title: 'Tags' +--- + +Tags allow you to control which stories are included in your Storybook. + +## Default tags + +By default, the following tags are available in your project: + +- `dev`: Stories tagged with `dev` are rendered in the Storybook UI, but only in development mode. They do not appear in the sidebar in [production mode](../sharing/publish-storybook.md#build-storybook-as-a-static-web-application). +- `docs`: Stories tagged with `docs` are rendered in the Storybook UI, but only in the [docs page](../writing-docs/autodocs.md). They do not appear in the sidebar. +- `test`: Stories tagged with `test` are not rendered in the Storybook UI, in either development or production mode. + +## Custom tags + +You can define your own tags by adding them to the [`tags` property](../api/main-config-tags.md) in your `main.js|ts` file. For example: + +```ts +// .storybook/main.ts +import { StorybookConfig } from '@storybook/'; + +const config: StorybookConfig = { + // ...rest of config + tags: { + experimental: { description: 'Stories for experimental components or features' }, + }, +}; + +export default config; +``` + +## Tagging stories + +You tag stories by defining a `tags` array in the story or meta definitions: + +```ts +// Button.stories.ts +import { Meta, StoryObj } from '@storybook/'; + +import { Button } from './Button'; + +const meta = { + component: Button, + // 👇 Stories in this file will only be included for development mode, not production + tags: ['dev'], +} satisfies Meta; +export default meta; + +type Story = StoryObj; + +export const InternalStory: Story = { + /** + * 👇 This story inherits the tags from `meta` and defines its own, + * making the applied tags `['dev', 'test']`. + * It will not be included in the UI, only for testing environments + */ + tags: ['test'], +}; +``` + +If you want to add tags to all stories in your project, you can apply them in your `preview.js|ts` file: + +```ts +// .storybook/preview.ts +import { Preview } from '@storybook/'; + +const preview: Preview = { + // ...rest of preview + tags: ['dev'], +}; + +export default preview; +``` + +### Removing tags + +To remove a tag from a story, prefix it with `!`. For example: + +```ts +// Button.stories.ts +import { Meta, StoryObj } from '@storybook/'; + +import { Button } from './Button'; + +const meta = { + component: Button, + // 👇 Stories in this file will only be included for development mode, not production + tags: ['dev'], +} satisfies Meta; +export default meta; + +type Story = StoryObj; + +export const InternalStory: Story = { + // 👇 Remove the inherited `dev` tag by using the `!` prefix + tags: ['!dev'], +}; +``` From f54b030b80ef7cc10e0490e66303aa2d94385e26 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Thu, 4 Apr 2024 21:22:40 +0800 Subject: [PATCH 008/117] Always apply dev/docs/test tags --- code/lib/core-server/package.json | 2 +- .../src/utils/StoryIndexGenerator.ts | 100 ++++++++---------- .../src/modules/store/csf/prepareStory.ts | 2 + .../template/stories/tags.stories.ts | 2 +- code/yarn.lock | 10 +- 5 files changed, 52 insertions(+), 64 deletions(-) diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index 6e88034f3591..562e76e0a022 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -64,7 +64,7 @@ "@storybook/core-events": "workspace:*", "@storybook/csf": "0.1.4--canary.80.f469755.0", "@storybook/csf-tools": "workspace:*", - "@storybook/docs-mdx": "3.0.0", + "@storybook/docs-mdx": "3.1.0-next.0", "@storybook/global": "^5.0.0", "@storybook/manager": "workspace:*", "@storybook/manager-api": "workspace:*", diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.ts index fae54d3f9372..bd8ebe25d105 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.ts @@ -9,13 +9,11 @@ import type { IndexEntry, StoryIndexEntry, DocsIndexEntry, - ComponentTitle, NormalizedStoriesSpecifier, DocsOptions, Path, Tag, StoryIndex, - StoryName, Indexer, StorybookConfigRaw, } from '@storybook/types'; @@ -156,7 +154,7 @@ export class StoryIndexGenerator { ); const previewCode = await this.getPreviewCode(); - const projectTags = previewCode && this.getProjectTags(previewCode); + const projectTags = previewCode ? this.getProjectTags(previewCode) : []; // Extract stories for each file await this.ensureExtracted({ projectTags }); @@ -223,11 +221,13 @@ export class StoryIndexGenerator { // files may use the `` syntax, which requires // that the story file that contains the meta be processed first. await this.updateExtracted(async (specifier, absolutePath) => - this.isDocsMdx(absolutePath) ? false : this.extractStories(specifier, absolutePath) + this.isDocsMdx(absolutePath) + ? false + : this.extractStories(specifier, absolutePath, projectTags) ); await this.updateExtracted(async (specifier, absolutePath) => - this.extractDocs(specifier, absolutePath) + this.extractDocs(specifier, absolutePath, projectTags) ); return this.specifiers.flatMap((specifier) => { @@ -240,34 +240,19 @@ export class StoryIndexGenerator { ); return Object.values(cache).flatMap((entry): (IndexEntry | ErrorEntry)[] => { if (!entry) return []; - if (entry.type === 'docs') return [this.addProjectTags(entry, projectTags)]; + if (entry.type === 'docs') return [entry]; if (entry.type === 'error') return [entry]; return entry.entries.map((item) => { - if (item.type === 'docs') return this.addProjectTags(item, projectTags); + if (item.type === 'docs') return item; // Drop the meta id as it isn't part of the index, we just used it for record keeping in `extractDocs` const { metaId, ...existing } = item; - return this.addProjectTags(existing, projectTags); + return existing; }); }); }); } - getExtraTags() { - return this.options.docs.autodocs === true ? [AUTODOCS_TAG] : []; - } - - addProjectTags(entry: IndexEntry, projectTags?: Tag[]) { - return { - ...entry, - metaTags: combineTags( - ...this.getExtraTags(), - ...(projectTags ?? []), - ...(entry.metaTags ?? []) - ), - }; - } - findDependencies(absoluteImports: Path[]) { return [...this.specifierToCache.values()].flatMap((cache: SpecifierStoriesCache) => Object.entries(cache) @@ -288,7 +273,8 @@ export class StoryIndexGenerator { async extractStories( specifier: NormalizedStoriesSpecifier, - absolutePath: Path + absolutePath: Path, + projectTags: Tag[] = [] ): Promise { const relativePath = path.relative(this.options.workingDir, absolutePath); const importPath = slash(normalizeStoryPath(relativePath)); @@ -313,13 +299,8 @@ export class StoryIndexGenerator { const title = input.title ?? defaultMakeTitle(); // eslint-disable-next-line no-underscore-dangle const id = input.__id ?? toId(input.metaId ?? title, storyNameFromExport(input.exportName)); - const extraTags = this.getExtraTags(); - const tags = combineTags( - ...extraTags, - ...(input.metaTags ?? []), - ...(input.tags ?? []), - 'story' - ); + const metaTags = combineTags(...projectTags, ...(input.metaTags ?? [])); + const tags = combineTags(...metaTags, ...(input.tags ?? [])); return { type: 'story', @@ -328,7 +309,7 @@ export class StoryIndexGenerator { name, title, importPath, - metaTags: input.metaTags ?? [], + metaTags, tags, }; }); @@ -344,8 +325,10 @@ export class StoryIndexGenerator { const name = this.options.docs.defaultName ?? 'Docs'; const { metaId } = indexInputs[0]; const { title } = entries[0]; - const metaTags = indexInputs[0].metaTags ?? []; const id = toId(metaId ?? title, name); + const metaTags = combineTags(...projectTags, ...(indexInputs[0].metaTags ?? [])); + const tags = combineTags(...metaTags, ...(indexInputs[0].tags ?? [])); + entries.unshift({ id, title, @@ -353,11 +336,7 @@ export class StoryIndexGenerator { importPath, type: 'docs', metaTags, - tags: combineTags( - ...metaTags, - 'docs', - ...(!hasAutodocsTag && !isStoriesMdx ? [AUTODOCS_TAG] : []) - ), + tags, storiesImports: [], }); } @@ -373,7 +352,11 @@ export class StoryIndexGenerator { }; } - async extractDocs(specifier: NormalizedStoriesSpecifier, absolutePath: Path) { + async extractDocs( + specifier: NormalizedStoriesSpecifier, + absolutePath: Path, + projectTags: Tag[] = [] + ) { const relativePath = path.relative(this.options.workingDir, absolutePath); try { const normalizedPath = normalizeStoryPath(relativePath); @@ -381,14 +364,7 @@ export class StoryIndexGenerator { const content = await fs.readFile(absolutePath, 'utf8'); - const result: { - title?: ComponentTitle; - of?: Path; - name?: StoryName; - isTemplate?: boolean; - imports?: Path[]; - tags?: Tag[]; - } = analyze(content); + const result = analyze(content); // Templates are not indexed if (result.isTemplate) return false; @@ -454,8 +430,21 @@ export class StoryIndexGenerator { const name = result.name || (csfEntry ? autoName(importPath, csfEntry.importPath, defaultName) : defaultName); + const id = toId(csfEntry?.metaId || title, name); + const metaTags = combineTags( + ...projectTags, + ...(result.metaTags ?? []), + ...(csfEntry?.metaTags ?? []) + ); + const tags = combineTags( + ...metaTags, + ...(csfEntry?.tags ?? []), + csfEntry ? 'attached-mdx' : 'unattached-mdx' + ); + console.log({ projectTags, metaTags, tags }); + const docsEntry: DocsCacheEntry = { id, title, @@ -463,13 +452,8 @@ export class StoryIndexGenerator { importPath, storiesImports: sortedDependencies.map((dep) => dep.entries[0].importPath), type: 'docs', - // FIXME: update this to use the index entry's metaTags once we update this to run on `IndexInputs` - tags: combineTags( - ...this.getExtraTags(), - ...(result.tags ?? []), - csfEntry ? 'attached-mdx' : 'unattached-mdx', - 'docs' - ), + metaTags, + tags, }; return docsEntry; } catch (err) { @@ -577,7 +561,7 @@ export class StoryIndexGenerator { if (this.lastError) throw this.lastError; const previewCode = await this.getPreviewCode(); - const projectTags = previewCode && this.getProjectTags(previewCode); + const projectTags = previewCode ? this.getProjectTags(previewCode) : []; // Extract any entries that are currently missing // Pull out each file's stories into a list of stories, to be composed and sorted @@ -678,8 +662,10 @@ export class StoryIndexGenerator { getProjectTags(previewCode: string) { const projectAnnotations = loadConfig(previewCode).parse(); - const projectTags = projectAnnotations.getFieldValue(['tags']); - return projectTags; + const defaultTags = ['dev', 'docs', 'test']; + const extraTags = this.options.docs.autodocs === true ? [AUTODOCS_TAG] : []; + const projectTags = projectAnnotations.getFieldValue(['tags']) ?? []; + return [...defaultTags, ...projectTags, ...extraTags]; } // Get the story file names in "imported order" diff --git a/code/lib/preview-api/src/modules/store/csf/prepareStory.ts b/code/lib/preview-api/src/modules/store/csf/prepareStory.ts index 3350a32e3fe3..bd4a4fc33d1d 100644 --- a/code/lib/preview-api/src/modules/store/csf/prepareStory.ts +++ b/code/lib/preview-api/src/modules/store/csf/prepareStory.ts @@ -141,9 +141,11 @@ function preparePartialAnnotations( // anything at render time. The assumption is that as we don't load all the stories at once, this // will have a limited cost. If this proves misguided, we can refactor it. + const defaultTags = ['dev', 'docs', 'test']; const extraTags = globalThis.DOCS_OPTIONS?.autodocs === true ? ['autodocs'] : []; const tags = combineTags( + ...defaultTags, ...extraTags, ...(projectAnnotations.tags ?? []), ...(componentAnnotations.tags ?? []), diff --git a/code/lib/preview-api/template/stories/tags.stories.ts b/code/lib/preview-api/template/stories/tags.stories.ts index b6b89c37ec6c..f86b36f08491 100644 --- a/code/lib/preview-api/template/stories/tags.stories.ts +++ b/code/lib/preview-api/template/stories/tags.stories.ts @@ -4,7 +4,7 @@ import { within, expect } from '@storybook/test'; export default { component: globalThis.Components.Pre, - tags: ['component-one', 'component-two', 'autodocs'], + tags: ['component-one', 'component-two', '!autodocs'], decorators: [ (storyFn: PartialStoryFn, context: StoryContext) => { return storyFn({ diff --git a/code/yarn.lock b/code/yarn.lock index 30fe40584238..b284385e5ec3 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5886,7 +5886,7 @@ __metadata: "@storybook/core-events": "workspace:*" "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" "@storybook/csf-tools": "workspace:*" - "@storybook/docs-mdx": "npm:3.0.0" + "@storybook/docs-mdx": "npm:3.1.0-next.0" "@storybook/global": "npm:^5.0.0" "@storybook/manager": "workspace:*" "@storybook/manager-api": "workspace:*" @@ -5994,10 +5994,10 @@ __metadata: languageName: node linkType: hard -"@storybook/docs-mdx@npm:3.0.0": - version: 3.0.0 - resolution: "@storybook/docs-mdx@npm:3.0.0" - checksum: 10c0/4f4242fc05b57e8dc239204c71fd0d1481c9abbf20d12dd0f3dace74f77a7ff7cbe0bd07d7d785873b45747be64cad273423d3dc0cf89b52e9f117592a4b054f +"@storybook/docs-mdx@npm:3.1.0-next.0": + version: 3.1.0-next.0 + resolution: "@storybook/docs-mdx@npm:3.1.0-next.0" + checksum: 10c0/7622d7c6318e842c90a71c1836d68531236c31fff7081c885803eddfafb7e3f8998689f612eaa0292209ada8352a36657dcacb5d3ef4632b8e8b8a283c39602e languageName: node linkType: hard From fea9c2e44bba9437d32cb813e4affa34e9f6443a Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Fri, 5 Apr 2024 10:04:01 +0800 Subject: [PATCH 009/117] Fix tag precedence in CSF combineTags util --- code/addons/links/package.json | 2 +- code/lib/codemod/package.json | 2 +- code/lib/core-server/package.json | 2 +- code/lib/csf-tools/package.json | 2 +- code/lib/manager-api/package.json | 2 +- code/lib/preview-api/package.json | 2 +- code/lib/source-loader/package.json | 2 +- code/lib/types/package.json | 2 +- code/package.json | 2 +- code/renderers/server/package.json | 2 +- code/ui/blocks/package.json | 2 +- code/ui/components/package.json | 2 +- code/yarn.lock | 32 ++++++++++++++--------------- 13 files changed, 28 insertions(+), 28 deletions(-) diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 8a2c600d574c..8d0cb0156fc6 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -67,7 +67,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/addon-bundle.ts" }, "dependencies": { - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@storybook/global": "^5.0.0", "ts-dedent": "^2.0.0" }, diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 35e5ebab28c9..494aefdeae80 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -57,7 +57,7 @@ "@babel/core": "^7.23.2", "@babel/preset-env": "^7.23.2", "@babel/types": "^7.23.0", - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@storybook/csf-tools": "workspace:*", "@storybook/node-logger": "workspace:*", "@storybook/types": "workspace:*", diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index 562e76e0a022..3eab0e705596 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -62,7 +62,7 @@ "@storybook/channels": "workspace:*", "@storybook/core-common": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@storybook/csf-tools": "workspace:*", "@storybook/docs-mdx": "3.1.0-next.0", "@storybook/global": "^5.0.0", diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index 1f8b41d7b51b..70f557e61717 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -46,7 +46,7 @@ "@babel/parser": "^7.23.0", "@babel/traverse": "^7.23.2", "@babel/types": "^7.23.0", - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@storybook/types": "workspace:*", "fs-extra": "^11.1.0", "recast": "^0.23.5", diff --git a/code/lib/manager-api/package.json b/code/lib/manager-api/package.json index abced2447faf..1bd4b13a2894 100644 --- a/code/lib/manager-api/package.json +++ b/code/lib/manager-api/package.json @@ -47,7 +47,7 @@ "@storybook/channels": "workspace:*", "@storybook/client-logger": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", "@storybook/router": "workspace:*", diff --git a/code/lib/preview-api/package.json b/code/lib/preview-api/package.json index cb995ab59c37..18d14c1dc6e6 100644 --- a/code/lib/preview-api/package.json +++ b/code/lib/preview-api/package.json @@ -47,7 +47,7 @@ "@storybook/channels": "workspace:*", "@storybook/client-logger": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@storybook/global": "^5.0.0", "@storybook/types": "workspace:*", "@types/qs": "^6.9.5", diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index 5f1ac102b5d6..d6e881699e63 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -45,7 +45,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@storybook/types": "workspace:*", "estraverse": "^5.2.0", "lodash": "^4.17.21", diff --git a/code/lib/types/package.json b/code/lib/types/package.json index f9eb319420b7..5beadddb167c 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -49,7 +49,7 @@ "file-system-cache": "2.3.0" }, "devDependencies": { - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@types/fs-extra": "^11.0.1", "@types/node": "^18.0.0", "typescript": "^5.3.2" diff --git a/code/package.json b/code/package.json index 454f5b0dd84a..fa57cc16f825 100644 --- a/code/package.json +++ b/code/package.json @@ -127,7 +127,7 @@ "@storybook/core-events": "workspace:*", "@storybook/core-server": "workspace:*", "@storybook/core-webpack": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@storybook/csf-plugin": "workspace:*", "@storybook/csf-tools": "workspace:*", "@storybook/docs-tools": "workspace:*", diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 54c669fac08a..ee1d7500c933 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -46,7 +46,7 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@storybook/csf-tools": "workspace:*", "@storybook/global": "^5.0.0", "@storybook/preview-api": "workspace:*", diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index a28714a17228..6af6b19568c2 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -48,7 +48,7 @@ "@storybook/client-logger": "workspace:*", "@storybook/components": "workspace:*", "@storybook/core-events": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@storybook/docs-tools": "workspace:*", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", diff --git a/code/ui/components/package.json b/code/ui/components/package.json index 6569d692d59a..82dbd87d5f3e 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -61,7 +61,7 @@ "dependencies": { "@radix-ui/react-slot": "^1.0.2", "@storybook/client-logger": "workspace:*", - "@storybook/csf": "0.1.4--canary.80.f469755.0", + "@storybook/csf": "0.1.4--canary.80.ba37fd5.0", "@storybook/global": "^5.0.0", "@storybook/icons": "^1.2.5", "@storybook/theming": "workspace:*", diff --git a/code/yarn.lock b/code/yarn.lock index b284385e5ec3..a8a50005249a 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5256,7 +5256,7 @@ __metadata: dependencies: "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@storybook/global": "npm:^5.0.0" "@storybook/manager-api": "workspace:*" "@storybook/preview-api": "workspace:*" @@ -5524,7 +5524,7 @@ __metadata: "@storybook/client-logger": "workspace:*" "@storybook/components": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@storybook/docs-tools": "workspace:*" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" @@ -5755,7 +5755,7 @@ __metadata: "@babel/core": "npm:^7.23.2" "@babel/preset-env": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@storybook/csf-tools": "workspace:*" "@storybook/node-logger": "workspace:*" "@storybook/types": "workspace:*" @@ -5791,7 +5791,7 @@ __metadata: "@radix-ui/react-scroll-area": "npm:^1.0.5" "@radix-ui/react-slot": "npm:^1.0.2" "@storybook/client-logger": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" "@storybook/test": "workspace:*" @@ -5884,7 +5884,7 @@ __metadata: "@storybook/channels": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@storybook/csf-tools": "workspace:*" "@storybook/docs-mdx": "npm:3.1.0-next.0" "@storybook/global": "npm:^5.0.0" @@ -5964,7 +5964,7 @@ __metadata: "@babel/parser": "npm:^7.23.0" "@babel/traverse": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@storybook/types": "workspace:*" "@types/fs-extra": "npm:^11.0.1" "@types/js-yaml": "npm:^4.0.5" @@ -5976,12 +5976,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/csf@npm:0.1.4--canary.80.f469755.0": - version: 0.1.4--canary.80.f469755.0 - resolution: "@storybook/csf@npm:0.1.4--canary.80.f469755.0" +"@storybook/csf@npm:0.1.4--canary.80.ba37fd5.0": + version: 0.1.4--canary.80.ba37fd5.0 + resolution: "@storybook/csf@npm:0.1.4--canary.80.ba37fd5.0" dependencies: type-fest: "npm:^2.19.0" - checksum: 10c0/a5b2dfe1c2d02b6ab072c7ca0b3918f24ac3093ec740cd79a44f178b583d02ad1f838bfd77cd30ea486c92e7a9b37a921d2e0807e3b1a7cc26f57c62a446ed24 + checksum: 10c0/88518cff77be4b8a714fdfa091686455e3cbe0023116ca4b9bce2b72cc5e0659c6fd6b5a4920a31e51db0050fb622bbcb0f32fffb09c9b84a068df92cb0b0585 languageName: node linkType: hard @@ -6161,7 +6161,7 @@ __metadata: "@storybook/channels": "workspace:*" "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" "@storybook/router": "workspace:*" @@ -6493,7 +6493,7 @@ __metadata: "@storybook/client-logger": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@storybook/global": "npm:^5.0.0" "@storybook/types": "workspace:*" "@types/qs": "npm:^6.9.5" @@ -6678,7 +6678,7 @@ __metadata: "@storybook/core-events": "workspace:*" "@storybook/core-server": "workspace:*" "@storybook/core-webpack": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@storybook/csf-plugin": "workspace:*" "@storybook/csf-tools": "workspace:*" "@storybook/docs-tools": "workspace:*" @@ -6833,7 +6833,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/server@workspace:renderers/server" dependencies: - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@storybook/csf-tools": "workspace:*" "@storybook/global": "npm:^5.0.0" "@storybook/preview-api": "workspace:*" @@ -6850,7 +6850,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/source-loader@workspace:lib/source-loader" dependencies: - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@storybook/types": "workspace:*" estraverse: "npm:^5.2.0" lodash: "npm:^4.17.21" @@ -7028,7 +7028,7 @@ __metadata: resolution: "@storybook/types@workspace:lib/types" dependencies: "@storybook/channels": "workspace:*" - "@storybook/csf": "npm:0.1.4--canary.80.f469755.0" + "@storybook/csf": "npm:0.1.4--canary.80.ba37fd5.0" "@types/express": "npm:^4.7.0" "@types/fs-extra": "npm:^11.0.1" "@types/node": "npm:^18.0.0" From bcd3da875a7e3c716576cdcf25b54965c9366271 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Fri, 5 Apr 2024 11:40:35 +0800 Subject: [PATCH 010/117] Remove metaTags concept --- .../src/utils/StoryIndexGenerator.test.ts | 225 +++++++++++++----- .../src/utils/StoryIndexGenerator.ts | 19 +- .../utils/__tests__/index-extraction.test.ts | 34 +-- .../src/utils/stories-json.test.ts | 52 +++- code/lib/csf-tools/src/CsfFile.test.ts | 10 - code/lib/csf-tools/src/CsfFile.ts | 5 +- .../modules/preview-web/PreviewWeb.test.ts | 12 + .../src/modules/store/StoryStore.test.ts | 30 +++ code/lib/types/src/modules/indexer.ts | 3 - 9 files changed, 266 insertions(+), 124 deletions(-) diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts index ad4aafd4a26e..ed9ed2a20b2c 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts @@ -79,9 +79,11 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/A.stories.js", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "component-tag", "story-tag", - "story", ], "title": "A", "type": "story", @@ -110,8 +112,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/F.story.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "F", "type": "story", @@ -140,8 +144,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/stories.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "stories", "type": "story", @@ -170,8 +176,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/nested/Button.stories.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "component-tag", - "story", ], "title": "nested/Button", "type": "story", @@ -181,7 +189,9 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/second-nested/G.stories.ts", "name": "Story One", "tags": [ - "story", + "dev", + "docs", + "test", ], "title": "second-nested/G", "type": "story", @@ -210,9 +220,11 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/A.stories.js", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "component-tag", "story-tag", - "story", ], "title": "A", "type": "story", @@ -222,8 +234,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/B.stories.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "B", "type": "story", @@ -233,8 +247,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/D.stories.jsx", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "D", "type": "story", @@ -244,7 +260,9 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/first-nested/deeply/F.stories.js", "name": "Story One", "tags": [ - "story", + "dev", + "docs", + "test", ], "title": "first-nested/deeply/F", "type": "story", @@ -254,8 +272,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/H.stories.mjs", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "H", "type": "story", @@ -265,8 +285,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/nested/Button.stories.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "component-tag", - "story", ], "title": "nested/Button", "type": "story", @@ -276,7 +298,9 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/second-nested/G.stories.ts", "name": "Story One", "tags": [ - "story", + "dev", + "docs", + "test", ], "title": "second-nested/G", "type": "story", @@ -310,9 +334,11 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/A.stories.js", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "component-tag", "story-tag", - "story", ], "title": "A", "type": "story", @@ -323,8 +349,10 @@ describe('StoryIndexGenerator', () => { "name": "docs", "storiesImports": [], "tags": [ - "autodocs", + "dev", "docs", + "test", + "autodocs", ], "title": "B", "type": "docs", @@ -334,8 +362,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/B.stories.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "B", "type": "story", @@ -346,8 +376,10 @@ describe('StoryIndexGenerator', () => { "name": "docs", "storiesImports": [], "tags": [ - "autodocs", + "dev", "docs", + "test", + "autodocs", ], "title": "D", "type": "docs", @@ -357,8 +389,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/D.stories.jsx", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "D", "type": "story", @@ -368,7 +402,9 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/first-nested/deeply/F.stories.js", "name": "Story One", "tags": [ - "story", + "dev", + "docs", + "test", ], "title": "first-nested/deeply/F", "type": "story", @@ -379,8 +415,10 @@ describe('StoryIndexGenerator', () => { "name": "docs", "storiesImports": [], "tags": [ - "autodocs", + "dev", "docs", + "test", + "autodocs", ], "title": "H", "type": "docs", @@ -390,8 +428,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/H.stories.mjs", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "H", "type": "story", @@ -401,8 +441,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/nested/Button.stories.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "component-tag", - "story", ], "title": "nested/Button", "type": "story", @@ -412,7 +454,9 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/second-nested/G.stories.ts", "name": "Story One", "tags": [ - "story", + "dev", + "docs", + "test", ], "title": "second-nested/G", "type": "story", @@ -535,8 +579,10 @@ describe('StoryIndexGenerator', () => { "name": "docs", "storiesImports": [], "tags": [ - "autodocs", + "dev", "docs", + "test", + "autodocs", ], "title": "B", "type": "docs", @@ -549,8 +595,11 @@ describe('StoryIndexGenerator', () => { "./src/B.stories.ts", ], "tags": [ - "attached-mdx", + "dev", "docs", + "test", + "autodocs", + "attached-mdx", ], "title": "B", "type": "docs", @@ -560,8 +609,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/B.stories.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "B", "type": "story", @@ -594,8 +645,10 @@ describe('StoryIndexGenerator', () => { "name": "docs", "storiesImports": [], "tags": [ - "autodocs", + "dev", "docs", + "test", + "autodocs", ], "title": "B", "type": "docs", @@ -608,8 +661,11 @@ describe('StoryIndexGenerator', () => { "./src/B.stories.ts", ], "tags": [ - "attached-mdx", + "dev", "docs", + "test", + "autodocs", + "attached-mdx", ], "title": "B", "type": "docs", @@ -619,8 +675,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/B.stories.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "B", "type": "story", @@ -653,14 +711,19 @@ describe('StoryIndexGenerator', () => { "entries": { "a--docs": { "id": "a--docs", - "importPath": "./errors/A.mdx", + "importPath": "./src/A.stories.js", "name": "docs", "storiesImports": [ + "./errors/A.mdx", "./src/A.stories.js", ], "tags": [ - "attached-mdx", + "dev", "docs", + "test", + "autodocs", + "component-tag", + "story-tag", ], "title": "A", "type": "docs", @@ -670,9 +733,12 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/A.stories.js", "name": "Story One", "tags": [ + "dev", + "docs", + "test", + "autodocs", "component-tag", "story-tag", - "story", ], "title": "A", "type": "story", @@ -703,8 +769,10 @@ describe('StoryIndexGenerator', () => { "./duplicate/SecondA.stories.js", ], "tags": [ - "autodocs", + "dev", "docs", + "test", + "autodocs", ], "title": "duplicate/A", "type": "docs", @@ -714,8 +782,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./duplicate/A.stories.js", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "duplicate/A", "type": "story", @@ -725,8 +795,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./duplicate/SecondA.stories.js", "name": "Story Two", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "duplicate/A", "type": "story", @@ -773,8 +845,10 @@ describe('StoryIndexGenerator', () => { "name": "docs", "storiesImports": [], "tags": [ - "autodocs", + "dev", "docs", + "test", + "autodocs", ], "title": "A", "type": "docs", @@ -784,8 +858,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./docs-id-generation/A.stories.jsx", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "A", "type": "story", @@ -813,8 +889,12 @@ describe('StoryIndexGenerator', () => { "./src/A.stories.js", ], "tags": [ - "attached-mdx", + "dev", "docs", + "test", + "component-tag", + "story-tag", + "attached-mdx", ], "title": "A", "type": "docs", @@ -827,8 +907,12 @@ describe('StoryIndexGenerator', () => { "./src/A.stories.js", ], "tags": [ - "attached-mdx", + "dev", "docs", + "test", + "component-tag", + "story-tag", + "attached-mdx", ], "title": "A", "type": "docs", @@ -838,9 +922,11 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/A.stories.js", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "component-tag", "story-tag", - "story", ], "title": "A", "type": "story", @@ -851,8 +937,10 @@ describe('StoryIndexGenerator', () => { "name": "docs", "storiesImports": [], "tags": [ - "unattached-mdx", + "dev", "docs", + "test", + "unattached-mdx", ], "title": "ComponentReference", "type": "docs", @@ -863,8 +951,10 @@ describe('StoryIndexGenerator', () => { "name": "docs", "storiesImports": [], "tags": [ - "unattached-mdx", + "dev", "docs", + "test", + "unattached-mdx", ], "title": "docs2/Yabbadabbadooo", "type": "docs", @@ -875,8 +965,10 @@ describe('StoryIndexGenerator', () => { "name": "docs", "storiesImports": [], "tags": [ - "unattached-mdx", + "dev", "docs", + "test", + "unattached-mdx", ], "title": "NoTitle", "type": "docs", @@ -936,8 +1028,12 @@ describe('StoryIndexGenerator', () => { "./src/A.stories.js", ], "tags": [ - "attached-mdx", + "dev", "docs", + "test", + "component-tag", + "story-tag", + "attached-mdx", ], "title": "A", "type": "docs", @@ -950,8 +1046,12 @@ describe('StoryIndexGenerator', () => { "./src/A.stories.js", ], "tags": [ - "attached-mdx", + "dev", "docs", + "test", + "component-tag", + "story-tag", + "attached-mdx", ], "title": "A", "type": "docs", @@ -961,9 +1061,11 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/A.stories.js", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "component-tag", "story-tag", - "story", ], "title": "A", "type": "story", @@ -974,8 +1076,10 @@ describe('StoryIndexGenerator', () => { "name": "Info", "storiesImports": [], "tags": [ - "unattached-mdx", + "dev", "docs", + "test", + "unattached-mdx", ], "title": "ComponentReference", "type": "docs", @@ -986,8 +1090,10 @@ describe('StoryIndexGenerator', () => { "name": "Info", "storiesImports": [], "tags": [ - "unattached-mdx", + "dev", "docs", + "test", + "unattached-mdx", ], "title": "docs2/Yabbadabbadooo", "type": "docs", @@ -998,8 +1104,10 @@ describe('StoryIndexGenerator', () => { "name": "Info", "storiesImports": [], "tags": [ - "unattached-mdx", + "dev", "docs", + "test", + "unattached-mdx", ], "title": "NoTitle", "type": "docs", @@ -1028,9 +1136,11 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/A.stories.js", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "component-tag", "story-tag", - "story", ], "title": "A", "type": "story", @@ -1040,8 +1150,10 @@ describe('StoryIndexGenerator', () => { "importPath": "./src/B.stories.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "B", "type": "story", @@ -1055,8 +1167,11 @@ describe('StoryIndexGenerator', () => { "./src/A.stories.js", ], "tags": [ - "attached-mdx", + "dev", "docs", + "test", + "autodocs", + "attached-mdx", ], "title": "B", "type": "docs", @@ -1092,8 +1207,10 @@ describe('StoryIndexGenerator', () => { "./docs-id-generation/B.stories.jsx", ], "tags": [ - "attached-mdx", + "dev", "docs", + "test", + "attached-mdx", ], "title": "B", "type": "docs", @@ -1103,7 +1220,9 @@ describe('StoryIndexGenerator', () => { "importPath": "./docs-id-generation/B.stories.jsx", "name": "Story One", "tags": [ - "story", + "dev", + "docs", + "test", ], "title": "B", "type": "story", diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.ts index bd8ebe25d105..ae97d6acfb11 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.ts @@ -299,8 +299,7 @@ export class StoryIndexGenerator { const title = input.title ?? defaultMakeTitle(); // eslint-disable-next-line no-underscore-dangle const id = input.__id ?? toId(input.metaId ?? title, storyNameFromExport(input.exportName)); - const metaTags = combineTags(...projectTags, ...(input.metaTags ?? [])); - const tags = combineTags(...metaTags, ...(input.tags ?? [])); + const tags = combineTags(...projectTags, ...(input.tags ?? [])); return { type: 'story', @@ -309,7 +308,6 @@ export class StoryIndexGenerator { name, title, importPath, - metaTags, tags, }; }); @@ -326,8 +324,7 @@ export class StoryIndexGenerator { const { metaId } = indexInputs[0]; const { title } = entries[0]; const id = toId(metaId ?? title, name); - const metaTags = combineTags(...projectTags, ...(indexInputs[0].metaTags ?? [])); - const tags = combineTags(...metaTags, ...(indexInputs[0].tags ?? [])); + const tags = combineTags(...projectTags, ...(indexInputs[0].tags ?? [])); entries.unshift({ id, @@ -335,7 +332,6 @@ export class StoryIndexGenerator { name, importPath, type: 'docs', - metaTags, tags, storiesImports: [], }); @@ -433,17 +429,13 @@ export class StoryIndexGenerator { const id = toId(csfEntry?.metaId || title, name); - const metaTags = combineTags( - ...projectTags, - ...(result.metaTags ?? []), - ...(csfEntry?.metaTags ?? []) - ); const tags = combineTags( - ...metaTags, + ...projectTags, ...(csfEntry?.tags ?? []), + ...(result.metaTags ?? []), csfEntry ? 'attached-mdx' : 'unattached-mdx' ); - console.log({ projectTags, metaTags, tags }); + console.log({ projectTags, tags }); const docsEntry: DocsCacheEntry = { id, @@ -452,7 +444,6 @@ export class StoryIndexGenerator { importPath, storiesImports: sortedDependencies.map((dep) => dep.entries[0].importPath), type: 'docs', - metaTags, tags, }; return docsEntry; diff --git a/code/lib/core-server/src/utils/__tests__/index-extraction.test.ts b/code/lib/core-server/src/utils/__tests__/index-extraction.test.ts index a1936c6719dd..a7bc19ae8ab9 100644 --- a/code/lib/core-server/src/utils/__tests__/index-extraction.test.ts +++ b/code/lib/core-server/src/utils/__tests__/index-extraction.test.ts @@ -70,7 +70,6 @@ describe('story extraction', () => { "name": "Story One", "tags": [ "story-tag-from-indexer", - "story", ], "title": "A", "type": "story", @@ -82,7 +81,6 @@ describe('story extraction', () => { "name": "Another Story Name", "tags": [ "story-tag-from-indexer", - "story", ], "title": "Custom Title", "type": "story", @@ -124,9 +122,7 @@ describe('story extraction', () => { "importPath": "./src/first-nested/deeply/F.stories.js", "metaId": undefined, "name": "Story One", - "tags": [ - "story", - ], + "tags": [], "title": "F", "type": "story", }, @@ -173,7 +169,6 @@ describe('story extraction', () => { "name": "Story One", "tags": [ "story-tag-from-indexer", - "story", ], "title": "F", "type": "story", @@ -221,7 +216,6 @@ describe('story extraction', () => { "name": "Story One", "tags": [ "story-tag-from-indexer", - "story", ], "title": "A", "type": "story", @@ -287,7 +281,6 @@ describe('story extraction', () => { "name": "Story One", "tags": [ "story-tag-from-indexer", - "story", ], "title": "A", "type": "story", @@ -299,7 +292,6 @@ describe('story extraction', () => { "name": "Custom Name For Second Story", "tags": [ "story-tag-from-indexer", - "story", ], "title": "Custom Title", "type": "story", @@ -311,7 +303,6 @@ describe('story extraction', () => { "name": "Story Three", "tags": [ "story-tag-from-indexer", - "story", ], "title": "Custom Title", "type": "story", @@ -356,7 +347,6 @@ describe('story extraction', () => { "name": "Story One", "tags": [ "story-tag-from-indexer", - "story", ], "title": "A", "type": "story", @@ -399,18 +389,6 @@ describe('docs entries from story extraction', () => { { "dependents": [], "entries": [ - { - "id": "a--docs", - "importPath": "./src/A.stories.js", - "name": "docs", - "storiesImports": [], - "tags": [ - "docs", - "autodocs", - ], - "title": "A", - "type": "docs", - }, { "id": "a--story-one", "importPath": "./src/A.stories.js", @@ -418,7 +396,6 @@ describe('docs entries from story extraction', () => { "name": "Story One", "tags": [ "story-tag-from-indexer", - "story", ], "title": "A", "type": "story", @@ -465,7 +442,8 @@ describe('docs entries from story extraction', () => { "name": "docs", "storiesImports": [], "tags": [ - "docs", + "autodocs", + "story-tag-from-indexer", ], "title": "A", "type": "docs", @@ -478,7 +456,6 @@ describe('docs entries from story extraction', () => { "tags": [ "autodocs", "story-tag-from-indexer", - "story", ], "title": "A", "type": "story", @@ -527,7 +504,6 @@ describe('docs entries from story extraction', () => { "tags": [ "autodocs", "story-tag-from-indexer", - "story", ], "title": "A", "type": "story", @@ -574,7 +550,8 @@ describe('docs entries from story extraction', () => { "name": "docs", "storiesImports": [], "tags": [ - "docs", + "stories-mdx", + "story-tag-from-indexer", ], "title": "A", "type": "docs", @@ -587,7 +564,6 @@ describe('docs entries from story extraction', () => { "tags": [ "stories-mdx", "story-tag-from-indexer", - "story", ], "title": "A", "type": "story", diff --git a/code/lib/core-server/src/utils/stories-json.test.ts b/code/lib/core-server/src/utils/stories-json.test.ts index a621f5443ce3..81fd7b8bfa3a 100644 --- a/code/lib/core-server/src/utils/stories-json.test.ts +++ b/code/lib/core-server/src/utils/stories-json.test.ts @@ -113,8 +113,12 @@ describe('useStoriesJson', () => { "./src/A.stories.js", ], "tags": [ - "attached-mdx", + "dev", "docs", + "test", + "component-tag", + "story-tag", + "attached-mdx", ], "title": "A", "type": "docs", @@ -127,8 +131,12 @@ describe('useStoriesJson', () => { "./src/A.stories.js", ], "tags": [ - "attached-mdx", + "dev", "docs", + "test", + "component-tag", + "story-tag", + "attached-mdx", ], "title": "A", "type": "docs", @@ -138,9 +146,11 @@ describe('useStoriesJson', () => { "importPath": "./src/A.stories.js", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "component-tag", "story-tag", - "story", ], "title": "A", "type": "story", @@ -150,8 +160,10 @@ describe('useStoriesJson', () => { "importPath": "./src/B.stories.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "B", "type": "story", @@ -161,8 +173,10 @@ describe('useStoriesJson', () => { "importPath": "./src/D.stories.jsx", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "D", "type": "story", @@ -173,8 +187,10 @@ describe('useStoriesJson', () => { "name": "docs", "storiesImports": [], "tags": [ - "unattached-mdx", + "dev", "docs", + "test", + "unattached-mdx", ], "title": "docs2/ComponentReference", "type": "docs", @@ -185,8 +201,10 @@ describe('useStoriesJson', () => { "name": "docs", "storiesImports": [], "tags": [ - "unattached-mdx", + "dev", "docs", + "test", + "unattached-mdx", ], "title": "docs2/NoTitle", "type": "docs", @@ -197,8 +215,10 @@ describe('useStoriesJson', () => { "name": "docs", "storiesImports": [], "tags": [ - "unattached-mdx", + "dev", "docs", + "test", + "unattached-mdx", ], "title": "docs2/Yabbadabbadooo", "type": "docs", @@ -208,7 +228,9 @@ describe('useStoriesJson', () => { "importPath": "./src/first-nested/deeply/F.stories.js", "name": "Story One", "tags": [ - "story", + "dev", + "docs", + "test", ], "title": "first-nested/deeply/F", "type": "story", @@ -218,8 +240,10 @@ describe('useStoriesJson', () => { "importPath": "./src/H.stories.mjs", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "autodocs", - "story", ], "title": "H", "type": "story", @@ -229,8 +253,10 @@ describe('useStoriesJson', () => { "importPath": "./src/nested/Button.stories.ts", "name": "Story One", "tags": [ + "dev", + "docs", + "test", "component-tag", - "story", ], "title": "nested/Button", "type": "story", @@ -240,7 +266,9 @@ describe('useStoriesJson', () => { "importPath": "./src/second-nested/G.stories.ts", "name": "Story One", "tags": [ - "story", + "dev", + "docs", + "test", ], "title": "second-nested/G", "type": "story", diff --git a/code/lib/csf-tools/src/CsfFile.test.ts b/code/lib/csf-tools/src/CsfFile.test.ts index 21e902cce52f..cfc650e30e2e 100644 --- a/code/lib/csf-tools/src/CsfFile.test.ts +++ b/code/lib/csf-tools/src/CsfFile.test.ts @@ -1104,8 +1104,6 @@ describe('CsfFile', () => { - component-tag - story-tag - play-fn - metaTags: &ref_0 - - component-tag __id: component-id--a - type: story importPath: foo/bar.stories.js @@ -1117,7 +1115,6 @@ describe('CsfFile', () => { - component-tag - story-tag - play-fn - metaTags: *ref_0 __id: component-id--b `); }); @@ -1147,8 +1144,6 @@ describe('CsfFile', () => { metaId: component-id tags: - component-tag - metaTags: - - component-tag __id: custom-story-id `); }); @@ -1180,11 +1175,6 @@ describe('CsfFile', () => { - inherit-tag-dup - story-tag - story-tag-dup - metaTags: - - component-tag - - component-tag-dup - - component-tag-dup - - inherit-tag-dup __id: custom-foo-title--a `); }); diff --git a/code/lib/csf-tools/src/CsfFile.ts b/code/lib/csf-tools/src/CsfFile.ts index 4516a293b1cc..dc0270b72804 100644 --- a/code/lib/csf-tools/src/CsfFile.ts +++ b/code/lib/csf-tools/src/CsfFile.ts @@ -8,7 +8,7 @@ import * as generate from '@babel/generator'; import * as recast from 'recast'; import * as traverse from '@babel/traverse'; -import { toId, isExportStory, storyNameFromExport } from '@storybook/csf'; +import { toId, isExportStory, storyNameFromExport, combineTags } from '@storybook/csf'; import type { Tag, StoryAnnotations, @@ -559,7 +559,7 @@ export class CsfFile { } return Object.entries(this._stories).map(([exportName, story]) => { // combine meta and story tags, removing any duplicates - const tags = Array.from(new Set([...(this._meta?.tags ?? []), ...(story.tags ?? [])])); + const tags = combineTags(...(this._meta?.tags ?? []), ...(story.tags ?? [])); return { type: 'story', importPath: this._fileName, @@ -568,7 +568,6 @@ export class CsfFile { title: this.meta?.title, metaId: this.meta?.id, tags, - metaTags: this.meta?.tags, __id: story.id, }; }); diff --git a/code/lib/preview-api/src/modules/preview-web/PreviewWeb.test.ts b/code/lib/preview-api/src/modules/preview-web/PreviewWeb.test.ts index e20af13752a6..d0d9ed357704 100644 --- a/code/lib/preview-api/src/modules/preview-web/PreviewWeb.test.ts +++ b/code/lib/preview-api/src/modules/preview-web/PreviewWeb.test.ts @@ -3625,7 +3625,10 @@ describe('PreviewWeb', () => { "story": "A", "subcomponents": undefined, "tags": [ + "dev", + "docs", "story", + "test", ], "title": "Component One", }, @@ -3672,7 +3675,10 @@ describe('PreviewWeb', () => { "story": "B", "subcomponents": undefined, "tags": [ + "dev", + "docs", "story", + "test", ], "title": "Component One", }, @@ -3697,7 +3703,10 @@ describe('PreviewWeb', () => { "story": "E", "subcomponents": undefined, "tags": [ + "dev", + "docs", "story", + "test", ], "title": "Component One", }, @@ -3732,7 +3741,10 @@ describe('PreviewWeb', () => { "story": "C", "subcomponents": undefined, "tags": [ + "dev", + "docs", "story", + "test", ], "title": "Component Two", }, diff --git a/code/lib/preview-api/src/modules/store/StoryStore.test.ts b/code/lib/preview-api/src/modules/store/StoryStore.test.ts index 65f225c8ef6e..5bb56dc106d9 100644 --- a/code/lib/preview-api/src/modules/store/StoryStore.test.ts +++ b/code/lib/preview-api/src/modules/store/StoryStore.test.ts @@ -311,7 +311,10 @@ describe('StoryStore', () => { "story": "A", "subcomponents": undefined, "tags": [ + "dev", + "docs", "story", + "test", ], "title": "Component One", }, @@ -476,7 +479,10 @@ describe('StoryStore', () => { "story": "A", "subcomponents": undefined, "tags": [ + "dev", + "docs", "story", + "test", ], "title": "Component One", }, @@ -514,7 +520,10 @@ describe('StoryStore', () => { "story": "B", "subcomponents": undefined, "tags": [ + "dev", + "docs", "story", + "test", ], "title": "Component One", }, @@ -552,7 +561,10 @@ describe('StoryStore', () => { "story": "C", "subcomponents": undefined, "tags": [ + "dev", + "docs", "story", + "test", ], "title": "Component Two", }, @@ -659,6 +671,9 @@ describe('StoryStore', () => { "storyFn": [Function], "subcomponents": undefined, "tags": [ + "dev", + "docs", + "test", "story", ], "title": "Component One", @@ -704,6 +719,9 @@ describe('StoryStore', () => { "storyFn": [Function], "subcomponents": undefined, "tags": [ + "dev", + "docs", + "test", "story", ], "title": "Component One", @@ -749,6 +767,9 @@ describe('StoryStore', () => { "storyFn": [Function], "subcomponents": undefined, "tags": [ + "dev", + "docs", + "test", "story", ], "title": "Component Two", @@ -810,7 +831,10 @@ describe('StoryStore', () => { "story": "A", "subcomponents": undefined, "tags": [ + "dev", + "docs", "story", + "test", ], "title": "Component One", }, @@ -848,7 +872,10 @@ describe('StoryStore', () => { "story": "B", "subcomponents": undefined, "tags": [ + "dev", + "docs", "story", + "test", ], "title": "Component One", }, @@ -886,7 +913,10 @@ describe('StoryStore', () => { "story": "C", "subcomponents": undefined, "tags": [ + "dev", + "docs", "story", + "test", ], "title": "Component Two", }, diff --git a/code/lib/types/src/modules/indexer.ts b/code/lib/types/src/modules/indexer.ts index 42f0e21640e8..56d435cdb533 100644 --- a/code/lib/types/src/modules/indexer.ts +++ b/code/lib/types/src/modules/indexer.ts @@ -73,7 +73,6 @@ export interface BaseIndexEntry { id: StoryId; name: StoryName; title: ComponentTitle; - metaTags?: Tag[]; tags?: Tag[]; importPath: Path; } @@ -108,8 +107,6 @@ export type BaseIndexInput = { metaId?: MetaId; /** Tags for filtering entries in Storybook and its tools. */ tags?: Tag[]; - /** Tags from the meta for filtering entries in Storybook and its tools. */ - metaTags?: Tag[]; /** * The id of the entry, auto-generated from {@link title}/{@link metaId} and {@link exportName} if unspecified. * If specified, the story in the CSF file _must_ have a matching id set at `parameters.__id`, to be correctly matched. From 1efccbe46433eea26e92065b4e198614efba1926 Mon Sep 17 00:00:00 2001 From: Kyle Gach Date: Mon, 15 Apr 2024 12:24:59 -0600 Subject: [PATCH 011/117] WIP --- ...ch-ts.mdx => document-screen-fetch.ts.mdx} | 0 docs/toc.js | 5 + docs/writing-stories/mocks.md | 309 ++++++++++++++++++ 3 files changed, 314 insertions(+) rename docs/snippets/react/{document-screen-fetch-ts.mdx => document-screen-fetch.ts.mdx} (100%) create mode 100644 docs/writing-stories/mocks.md diff --git a/docs/snippets/react/document-screen-fetch-ts.mdx b/docs/snippets/react/document-screen-fetch.ts.mdx similarity index 100% rename from docs/snippets/react/document-screen-fetch-ts.mdx rename to docs/snippets/react/document-screen-fetch.ts.mdx diff --git a/docs/toc.js b/docs/toc.js index a4d3e85cf6be..1a8530bbc6bd 100644 --- a/docs/toc.js +++ b/docs/toc.js @@ -141,6 +141,11 @@ module.exports = { title: 'Naming components and hierarchy', type: 'link', }, + { + pathSegment: 'mocks', + title: 'Mocking data and modules', + type: 'link', + }, { pathSegment: 'build-pages-with-storybook', title: 'Build pages and screens', diff --git a/docs/writing-stories/mocks.md b/docs/writing-stories/mocks.md new file mode 100644 index 000000000000..67b354eff23c --- /dev/null +++ b/docs/writing-stories/mocks.md @@ -0,0 +1,309 @@ +--- +title: 'Mocking data and modules' +--- + +1. Intro +2. Providers + 1. Decorators +3. Network requests + 1. MSW +4. Modules + 1. Mock files + 1. Naming convention + 2. Cannot use subpath imports in a mocked file; must use relative + 3. Watch out for side effects + 2. Subpath imports + 1. Relative imports not supported + 2. Fallback to builder aliases + 3. Next.js callout + 3. Configuring mocks + 1. `fn.mock` and friends + 2. `beforeEach` + +Components that rely on external data or modules can be difficult to use in isolation. Mocking is a way to replace these dependencies with fake data or modules that you control. This allows you to develop and test your components without worrying about the behavior or stability of the external dependencies. + +Storybook provides different tools and techniques to help you mock data and modules. + + + +## Providers + +Components can receive data or configuration from context providers. For example, a styled component might access its theme from a ThemeProvider. To mock a provider, you can wrap your component in a [decorator](./decorators.md) that includes the necessary context. + + + + + + + + + +## Network requests + +For components that make network requests (e.g. fetching data from a REST or GraphQL API), you can mock those requests using a tool like [Mock Service Worker (MSW)](https://mswjs.io/). MSW allows you to intercept requests made by your components and respond with fake data. + +The MSW addon adds this functionality into Storybook, allowing you to mock API requests in your stories. Below is an overview of how to set up and use the addon. + +
+Set up MSW in Storybook + +First, run this command to install MSW: + + + +```sh +npm install msw --save-dev +``` + +Next, install and register the MSW addon: + + + +```sh +npx storybook@latest add msw-storybook-addon +``` + +Then, generate the service worker file necessary for MSW to work: + + + + + + + + + + + + +Angular projects will likely need to adjust the command to save the mock service worker file in a different directory (e.g., `src`). + + + + + +Initialize the addon and apply it to all stories with a [project-level loader](./loaders.md#global-loaders): + + + + + + + + +Finally, ensure the [`staticDirs`](../api/main-config-static-dirs.md) property in your Storybook configuration will include the generated service worker file: + + + + + + + + +
+ +Let's use an example of a document screen component that requests data from an API to demonstrate how to mock network requests in Storybook. The following snippets show an example implementation using `fetch` for a REST API and/or GraphQL: + + + + + + + + + + + + + + + + +These examples use the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/fetch) or GraphQL with [Apollo Client](https://www.apollographql.com/docs/) to make network requests. If you're using a different library (e.g. [`axios`](https://axios-http.com/), [URQL](https://formidable.com/open-source/urql/), or [React Query](https://react-query.tanstack.com/)), you can apply the same principles to mock network requests in Storybook. + + + +### Mocking REST requests + +To mock a REST request, you can use the `msw` library to intercept the request and respond with mock data. Here's an example showing two stories for the document screen component. They are each configured to use mock data: one that fetches data successfully and another that fails. + + + + + + + + +Note how each story is configured with `parameters.msw` to define the request handlers for the mock server. Because it uses parameters in this way, it can also be configured at the [component](./parameters.md#component-parameters) or even [project](./parameters.md#global-parameters) level. + +### Mocking GraphQL requests + +In addition to mocking RESTful requests, the MSW addon can also mock GraphQL requests. + +Here's an example showing two stories for the document screen component. They are each configured to use mock data: one that queries data successfully and another that fails. + + + + + + + + +## Modules + +Components can also depend on modules that are imported into the component file. These can be from external packages or internal to your project. When rendering those components in Storybook or testing them, you may want to mock those modules to control their behavior. + +There are two primary approaches to mocking modules in Storybook. They both involve creating a mock file to replace the original module. The difference between the two approaches is how you import the mock file into your component. + +For either approach, relative imports of the mocked module are not supported. + +### Mock files + +To mock a module, create a file with the same name as the module you want to mock. For example, if you want to mock a module named `api`, create a file named `api.mock.js|ts` in the same directory as the original module. This file should match the exports of the original module but with fake data or behavior. + +Here's an example of a mock file for a module named `api`: + +```js +// api.mock.js +TK: Add snippet +``` + + + +When creating a mock file, be careful not to introduce side effects that could affect other tests or components. Mock files should be isolated and only affect the component they are mocking. + +Additionally, you must use absolute paths to import any dependencies in the mock file. Relative imports can cause issues when importing the mock file into your component. + + + +### Subpath imports + +The recommended method for mocking modules is to use [subpath imports](https://nodejs.org/api/packages.html#subpath-imports), a feature of Node packages that is supported by both [Vite](../builders/vite.md) and [Webpack](../builders/webpack.md). + +To configure subpath imports, you define the `imports` property in your project's `package.json` file. This property maps the subpath to the actual file path. The example below configures subpath imports for the `api` and `prisma` internal modules: + +TK: External module example? + +```json +// package.json +{ + "imports": { + "#api": { + "storybook": "./api.mock.ts", + "default": "./api.ts" + }, + "#prisma/prisma": { + "storybook": "./prisma/prisma.mock.ts", + "default": "./prisma/prisma.ts" + }, + "#*": ["./*", "./*.ts", "./*.tsx"] + } +} +``` + + + +Each subpath must begin with `#`, to differentiate it from a regular module path. The `#*` entry is a catch-all that maps all subpaths to the root directory. + + + +You can then update your component file to use the subpath import: + +```ts +TK: Component snippet +``` + +#### Conditional imports + +Note the `storybook` and `default` keys in each module's entry. The `storybook` key is used to import the mock file in Storybook, while the `default` key is used to import the original module in your project. + +The Storybook environment will match the conditions `storybook` and `test`, so you can apply the same module mapping for both Storybook and your tests. + +### Builder aliases + +If your project is unable to use [subpath imports](#subpath-imports), you can configure your Storybook builder to alias the module to the mock file. + +```js +// .storybook/main.ts + +webpackFinal: async (config) => { + if (config.resolve) { + config.resolve.alias = { + ...config.resolve.alias, + 'next/headers': require.resolve('./next-headers'), + '@/api/todo$': path.resolve(__dirname, './api/todo.mock.ts'), + } + } + + return config +}, +``` From 024237154fc718da4c186273eeb283db5d8ed744 Mon Sep 17 00:00:00 2001 From: Kyle Gach Date: Mon, 15 Apr 2024 23:28:21 -0600 Subject: [PATCH 012/117] Split into 3 pages --- docs/toc.js | 21 +- docs/writing-stories/mocking-modules.md | 93 ++++++ .../mocking-network-requests.md | 178 ++++++++++ docs/writing-stories/mocking-providers.md | 24 ++ docs/writing-stories/mocks.md | 309 ------------------ 5 files changed, 314 insertions(+), 311 deletions(-) create mode 100644 docs/writing-stories/mocking-modules.md create mode 100644 docs/writing-stories/mocking-network-requests.md create mode 100644 docs/writing-stories/mocking-providers.md delete mode 100644 docs/writing-stories/mocks.md diff --git a/docs/toc.js b/docs/toc.js index 1a8530bbc6bd..7dbc4bceec4c 100644 --- a/docs/toc.js +++ b/docs/toc.js @@ -142,9 +142,26 @@ module.exports = { type: 'link', }, { - pathSegment: 'mocks', + pathSegment: '', title: 'Mocking data and modules', - type: 'link', + type: 'menu', + children: [ + { + pathSegment: 'mocking-providers', + title: 'Providers', + type: 'link', + }, + { + pathSegment: 'mocking-network-requests', + title: 'Network requests', + type: 'link', + }, + { + pathSegment: 'mocking-modules', + title: 'Modules', + type: 'link', + }, + ], }, { pathSegment: 'build-pages-with-storybook', diff --git a/docs/writing-stories/mocking-modules.md b/docs/writing-stories/mocking-modules.md new file mode 100644 index 000000000000..3c0365382b3a --- /dev/null +++ b/docs/writing-stories/mocking-modules.md @@ -0,0 +1,93 @@ +--- +title: Mocking modules +--- + +Components can also depend on modules that are imported into the component file. These can be from external packages or internal to your project. When rendering those components in Storybook or testing them, you may want to mock those modules to control their behavior. + +There are two primary approaches to mocking modules in Storybook. They both involve creating a mock file to replace the original module. The difference between the two approaches is how you import the mock file into your component. + +For either approach, relative imports of the mocked module are not supported. + +### Mock files + +To mock a module, create a file with the same name as the module you want to mock. For example, if you want to mock a module named `api`, create a file named `api.mock.js|ts` in the same directory as the original module. This file should match the exports of the original module but with fake data or behavior. + +Here's an example of a mock file for a module named `api`: + +```js +// api.mock.js +TK: Add snippet +``` + + + +When creating a mock file, be careful not to introduce side effects that could affect other tests or components. Mock files should be isolated and only affect the component they are mocking. + +Additionally, you must use absolute paths to import any dependencies in the mock file. Relative imports can cause issues when importing the mock file into your component. + + + +### Subpath imports + +The recommended method for mocking modules is to use [subpath imports](https://nodejs.org/api/packages.html#subpath-imports), a feature of Node packages that is supported by both [Vite](../builders/vite.md) and [Webpack](../builders/webpack.md). + +To configure subpath imports, you define the `imports` property in your project's `package.json` file. This property maps the subpath to the actual file path. The example below configures subpath imports for the `api` and `prisma` internal modules: + +TK: External module example? + +```json +// package.json +{ + "imports": { + "#api": { + "storybook": "./api.mock.ts", + "default": "./api.ts" + }, + "#prisma/prisma": { + "storybook": "./prisma/prisma.mock.ts", + "default": "./prisma/prisma.ts" + }, + "#*": ["./*", "./*.ts", "./*.tsx"] + } +} +``` + + + +Each subpath must begin with `#`, to differentiate it from a regular module path. The `#*` entry is a catch-all that maps all subpaths to the root directory. + + + +You can then update your component file to use the subpath import: + +```ts +TK: Component snippet +``` + +#### Conditional imports + +Note the `storybook` and `default` keys in each module's entry. The `storybook` key is used to import the mock file in Storybook, while the `default` key is used to import the original module in your project. + +The Storybook environment will match the conditions `storybook` and `test`, so you can apply the same module mapping for both Storybook and your tests. + +### Builder aliases + +If your project is unable to use [subpath imports](#subpath-imports), you can configure your Storybook builder to alias the module to the mock file. + + + +```js +// .storybook/main.ts + +webpackFinal: async (config) => { + if (config.resolve) { + config.resolve.alias = { + ...config.resolve.alias, + 'next/headers': require.resolve('./next-headers'), + '@/api/todo$': path.resolve(__dirname, './api/todo.mock.ts'), + } + } + + return config +}, +``` diff --git a/docs/writing-stories/mocking-network-requests.md b/docs/writing-stories/mocking-network-requests.md new file mode 100644 index 000000000000..28afb5e12697 --- /dev/null +++ b/docs/writing-stories/mocking-network-requests.md @@ -0,0 +1,178 @@ +--- +title: Mocking network requests +--- + +For components that make network requests (e.g. fetching data from a REST or GraphQL API), you can mock those requests using a tool like [Mock Service Worker (MSW)](https://mswjs.io/). MSW allows you to intercept requests made by your components and respond with fake data. + +The [MSW addon]https://storybook.js.org/addons/msw-storybook-addon/ brings this functionality into Storybook, allowing you to mock API requests in your stories. Below is an overview of how to set up and use the addon. + +## Set up the MSW addon + +First, if necessary, run this command to install MSW: + + + +```sh +npm install msw --save-dev +``` + +Then generate the service worker file necessary for MSW to work: + + + + + + + + + + + + +Angular projects will likely need to adjust the command to save the mock service worker file in a different directory (e.g., `src`). + + + + + +Next, install and register the MSW addon: + + + +```sh +npx storybook@latest add msw-storybook-addon +``` + +Then ensure the [`staticDirs`](../api/main-config-static-dirs.md) property in your Storybook configuration will include the generated service worker file: + + + + + + + + +Finally, initialize the addon and apply it to all stories with a [project-level loader](./loaders.md#global-loaders): + + + + + + + + +## Mocking REST requests + +If your component fetches data from a REST API, you can use MSW to mock those requests in Storybook. As an example, consider this document screen component: + + + + + + + + + +This example uses the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/fetch) to make network requests. If you're using a different library (e.g. [`axios`](https://axios-http.com/)), you can apply the same principles to mock network requests in Storybook. + + + +With the MSW addon, we can write stories that use MSW to mock the REST requests. Here's an example of two stories for the document screen component: one that fetches data successfully and another that fails. + + + + + + + + +## Mocking GraphQL requests + +GraphQL is another common way to fetch data in components. You can use MSW to mock GraphQL requests in Storybook. Here's an example of a document screen component that fetches data from a GraphQL API: + + + + + + + + + +This example uses GraphQL with [Apollo Client](https://www.apollographql.com/docs/) to make network requests. If you're using a different library (e.g. [URQL](https://formidable.com/open-source/urql/) or [React Query](https://react-query.tanstack.com/)), you can apply the same principles to mock network requests in Storybook. + + + +The MSW addon allows you to write stories that use MSW to mock the GraphQL requests. Here's an example demonstrating two stories for the document screen component. The first story fetches data successfully, while the second story fails. + + + + + + + + +## Configuring MSW for stories + +In the examples above, note how each story is configured with `parameters.msw` to define the request handlers for the mock server. Because it uses parameters in this way, it can also be configured at the [component](./parameters.md#component-parameters) or even [project](./parameters.md#global-parameters) level, allowing you to share the same mock server configuration across multiple stories. diff --git a/docs/writing-stories/mocking-providers.md b/docs/writing-stories/mocking-providers.md new file mode 100644 index 000000000000..a6000ff59558 --- /dev/null +++ b/docs/writing-stories/mocking-providers.md @@ -0,0 +1,24 @@ +--- +title: Mocking providers +--- + + + +## Providers + +Components can receive data or configuration from context providers. For example, a styled component might access its theme from a ThemeProvider. To mock a provider, you can wrap your component in a [decorator](./decorators.md) that includes the necessary context. + + + + + + + +TK: Something about the `context` argument? diff --git a/docs/writing-stories/mocks.md b/docs/writing-stories/mocks.md deleted file mode 100644 index 67b354eff23c..000000000000 --- a/docs/writing-stories/mocks.md +++ /dev/null @@ -1,309 +0,0 @@ ---- -title: 'Mocking data and modules' ---- - -1. Intro -2. Providers - 1. Decorators -3. Network requests - 1. MSW -4. Modules - 1. Mock files - 1. Naming convention - 2. Cannot use subpath imports in a mocked file; must use relative - 3. Watch out for side effects - 2. Subpath imports - 1. Relative imports not supported - 2. Fallback to builder aliases - 3. Next.js callout - 3. Configuring mocks - 1. `fn.mock` and friends - 2. `beforeEach` - -Components that rely on external data or modules can be difficult to use in isolation. Mocking is a way to replace these dependencies with fake data or modules that you control. This allows you to develop and test your components without worrying about the behavior or stability of the external dependencies. - -Storybook provides different tools and techniques to help you mock data and modules. - - - -## Providers - -Components can receive data or configuration from context providers. For example, a styled component might access its theme from a ThemeProvider. To mock a provider, you can wrap your component in a [decorator](./decorators.md) that includes the necessary context. - - - - - - - - - -## Network requests - -For components that make network requests (e.g. fetching data from a REST or GraphQL API), you can mock those requests using a tool like [Mock Service Worker (MSW)](https://mswjs.io/). MSW allows you to intercept requests made by your components and respond with fake data. - -The MSW addon adds this functionality into Storybook, allowing you to mock API requests in your stories. Below is an overview of how to set up and use the addon. - -
-Set up MSW in Storybook - -First, run this command to install MSW: - - - -```sh -npm install msw --save-dev -``` - -Next, install and register the MSW addon: - - - -```sh -npx storybook@latest add msw-storybook-addon -``` - -Then, generate the service worker file necessary for MSW to work: - - - - - - - - - - - - -Angular projects will likely need to adjust the command to save the mock service worker file in a different directory (e.g., `src`). - - - - - -Initialize the addon and apply it to all stories with a [project-level loader](./loaders.md#global-loaders): - - - - - - - - -Finally, ensure the [`staticDirs`](../api/main-config-static-dirs.md) property in your Storybook configuration will include the generated service worker file: - - - - - - - - -
- -Let's use an example of a document screen component that requests data from an API to demonstrate how to mock network requests in Storybook. The following snippets show an example implementation using `fetch` for a REST API and/or GraphQL: - - - - - - - - - - - - - - - - -These examples use the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/fetch) or GraphQL with [Apollo Client](https://www.apollographql.com/docs/) to make network requests. If you're using a different library (e.g. [`axios`](https://axios-http.com/), [URQL](https://formidable.com/open-source/urql/), or [React Query](https://react-query.tanstack.com/)), you can apply the same principles to mock network requests in Storybook. - - - -### Mocking REST requests - -To mock a REST request, you can use the `msw` library to intercept the request and respond with mock data. Here's an example showing two stories for the document screen component. They are each configured to use mock data: one that fetches data successfully and another that fails. - - - - - - - - -Note how each story is configured with `parameters.msw` to define the request handlers for the mock server. Because it uses parameters in this way, it can also be configured at the [component](./parameters.md#component-parameters) or even [project](./parameters.md#global-parameters) level. - -### Mocking GraphQL requests - -In addition to mocking RESTful requests, the MSW addon can also mock GraphQL requests. - -Here's an example showing two stories for the document screen component. They are each configured to use mock data: one that queries data successfully and another that fails. - - - - - - - - -## Modules - -Components can also depend on modules that are imported into the component file. These can be from external packages or internal to your project. When rendering those components in Storybook or testing them, you may want to mock those modules to control their behavior. - -There are two primary approaches to mocking modules in Storybook. They both involve creating a mock file to replace the original module. The difference between the two approaches is how you import the mock file into your component. - -For either approach, relative imports of the mocked module are not supported. - -### Mock files - -To mock a module, create a file with the same name as the module you want to mock. For example, if you want to mock a module named `api`, create a file named `api.mock.js|ts` in the same directory as the original module. This file should match the exports of the original module but with fake data or behavior. - -Here's an example of a mock file for a module named `api`: - -```js -// api.mock.js -TK: Add snippet -``` - - - -When creating a mock file, be careful not to introduce side effects that could affect other tests or components. Mock files should be isolated and only affect the component they are mocking. - -Additionally, you must use absolute paths to import any dependencies in the mock file. Relative imports can cause issues when importing the mock file into your component. - - - -### Subpath imports - -The recommended method for mocking modules is to use [subpath imports](https://nodejs.org/api/packages.html#subpath-imports), a feature of Node packages that is supported by both [Vite](../builders/vite.md) and [Webpack](../builders/webpack.md). - -To configure subpath imports, you define the `imports` property in your project's `package.json` file. This property maps the subpath to the actual file path. The example below configures subpath imports for the `api` and `prisma` internal modules: - -TK: External module example? - -```json -// package.json -{ - "imports": { - "#api": { - "storybook": "./api.mock.ts", - "default": "./api.ts" - }, - "#prisma/prisma": { - "storybook": "./prisma/prisma.mock.ts", - "default": "./prisma/prisma.ts" - }, - "#*": ["./*", "./*.ts", "./*.tsx"] - } -} -``` - - - -Each subpath must begin with `#`, to differentiate it from a regular module path. The `#*` entry is a catch-all that maps all subpaths to the root directory. - - - -You can then update your component file to use the subpath import: - -```ts -TK: Component snippet -``` - -#### Conditional imports - -Note the `storybook` and `default` keys in each module's entry. The `storybook` key is used to import the mock file in Storybook, while the `default` key is used to import the original module in your project. - -The Storybook environment will match the conditions `storybook` and `test`, so you can apply the same module mapping for both Storybook and your tests. - -### Builder aliases - -If your project is unable to use [subpath imports](#subpath-imports), you can configure your Storybook builder to alias the module to the mock file. - -```js -// .storybook/main.ts - -webpackFinal: async (config) => { - if (config.resolve) { - config.resolve.alias = { - ...config.resolve.alias, - 'next/headers': require.resolve('./next-headers'), - '@/api/todo$': path.resolve(__dirname, './api/todo.mock.ts'), - } - } - - return config -}, -``` From ff3f2e9f966f4580d7b8a23552ba03af72646800 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 16 Apr 2024 15:06:44 +0200 Subject: [PATCH 013/117] Add Modules section to Next.js docs --- docs/get-started/nextjs.md | 104 +++++++++++++++++++++++++------------ 1 file changed, 71 insertions(+), 33 deletions(-) diff --git a/docs/get-started/nextjs.md b/docs/get-started/nextjs.md index b17cf19661b3..f1e024ef6049 100644 --- a/docs/get-started/nextjs.md +++ b/docs/get-started/nextjs.md @@ -885,54 +885,43 @@ You can refer to the [Install `sharp` to Use Built-In Image Optimization](https: ## API -### Parameters +### Modules -This framework contributes the following [parameters](../writing-stories/parameters.md) to Storybook, under the `nextjs` namespace: +The `@storybook/nextjs` package exports a number of modules that enables you to [mock](/TODO_LINK_TO_MOCKING) Next.js's internal behavior. -#### `appDirectory` +#### `@storybook/nextjs/headers.mock` -Type: `boolean` +Type: [`cookies`](https://nextjs.org/docs/app/api-reference/functions/cookies#cookiessetname-value-options), [`headers`](https://nextjs.org/docs/app/api-reference/functions/headers) and [`draftMode`](https://nextjs.org/docs/app/api-reference/functions/draft-mode) from Next.js -Default: `false` +Exports _writable_ mocks that replaces the actual implementation of `next/headers` exports. Use this to set up cookies or headers that are read in your story, and to later assert that they have been called. -If your story imports components that use `next/navigation`, you need to set the parameter `nextjs.appDirectory` to `true`. Because this is a parameter, you can apply it to a [single story](../api/parameters.md#story-parameters), [all stories for a component](../api/parameters.md#meta-parameters), or [every story in your Storybook](../api/parameters.md#project-parameters). See [Next.js Navigation](#nextjs-navigation) for more details. +Next.js's default [`headers()`](https://nextjs.org/docs/app/api-reference/functions/headers) export is read-only, but this module exposes methods allowing you to write to the headers: -#### `navigation` +- **`headers().append(name: string, value: string)`**: Appends the value to the header if it exists already. +- **`headers().delete(name: string)`**: Deletes the header +- **`headers().set(name: string, value: string)`**: Sets the header to the value provided. -Type: +For cookies, you can use the existing API to write them, eg. `cookies().set('firstName', 'Jane')`. -```ts -{ - asPath?: string; - pathname?: string; - query?: Record; - segments?: (string | [string, string])[]; -} -``` +Because `headers()`, `cookies()` and their sub-functions are all mocks you can use any [mock utilities](https://vitest.dev/api/mock.html) in your stories, like `headers().getAll.mock.calls`. -Default value: +#### `@storybook/nextjs/navigation.mock` -```js -{ - segments: []; -} -``` +Type: `typeof import('next/navigation')` -The router object that is passed to the `next/navigation` context. See [Next.js's navigation docs](https://nextjs.org/docs/app/building-your-application/routing) for more details. +Exports mocks that replaces the actual implementation of `next/navigation` exports. Use these to mock implementations or assert on mock calls in a story's `play`-function. -#### `router` +#### `@storybook/nextjs/router.mock` -Type: +Type: `typeof import('next/router')` -```ts -{ - asPath?: string; - pathname?: string; - query?: Record; -} -``` +Exports mocks that replaces the actual implementation of `next/router` exports. Use these to mock implementations or assert on mock calls in a story's `play`-function. -The router object that is passed to the `next/router` context. See [Next.js's router docs](https://nextjs.org/docs/pages/building-your-application/routing) for more details. +#### `@storybook/nextjs/export-mocks` + +Type: `{ getPackageAliases: ({ useESM?: boolean }) => void }` + +`getPackageAliases` returns the aliases needed to set up Portable Stories in a Jest environment. See the [Portable Stories](TODO) section. ### Options @@ -976,6 +965,55 @@ Type: `string` The absolute path to the `next.config.js` file. This is necessary if you have a custom `next.config.js` file that is not in the root directory of your project. +### Parameters + +This framework contributes the following [parameters](../writing-stories/parameters.md) to Storybook, under the `nextjs` namespace: + +#### `appDirectory` + +Type: `boolean` + +Default: `false` + +If your story imports components that use `next/navigation`, you need to set the parameter `nextjs.appDirectory` to `true`. Because this is a parameter, you can apply it to a [single story](../api/parameters.md#story-parameters), [all stories for a component](../api/parameters.md#meta-parameters), or [every story in your Storybook](../api/parameters.md#project-parameters). See [Next.js Navigation](#nextjs-navigation) for more details. + +#### `navigation` + +Type: + +```ts +{ + asPath?: string; + pathname?: string; + query?: Record; + segments?: (string | [string, string])[]; +} +``` + +Default value: + +```js +{ + segments: []; +} +``` + +The router object that is passed to the `next/navigation` context. See [Next.js's navigation docs](https://nextjs.org/docs/app/building-your-application/routing) for more details. + +#### `router` + +Type: + +```ts +{ + asPath?: string; + pathname?: string; + query?: Record; +} +``` + +The router object that is passed to the `next/router` context. See [Next.js's router docs](https://nextjs.org/docs/pages/building-your-application/routing) for more details. + From 92e13821355628eb7a383e9058ee9d539b360afa Mon Sep 17 00:00:00 2001 From: Kyle Gach Date: Tue, 16 Apr 2024 13:17:37 -0600 Subject: [PATCH 014/117] More mocking content - Providers - Configuring mocked providers with parameters - Network requests - Bad link - Modules - Better mock files section - Using mocked files in stories --- docs/writing-stories/mocking-modules.md | 148 +++++++++++++++--- .../mocking-network-requests.md | 2 +- docs/writing-stories/mocking-providers.md | 68 +++++++- 3 files changed, 196 insertions(+), 22 deletions(-) diff --git a/docs/writing-stories/mocking-modules.md b/docs/writing-stories/mocking-modules.md index 3c0365382b3a..e59f0f7c2b59 100644 --- a/docs/writing-stories/mocking-modules.md +++ b/docs/writing-stories/mocking-modules.md @@ -8,26 +8,27 @@ There are two primary approaches to mocking modules in Storybook. They both invo For either approach, relative imports of the mocked module are not supported. -### Mock files +## Mock files -To mock a module, create a file with the same name as the module you want to mock. For example, if you want to mock a module named `api`, create a file named `api.mock.js|ts` in the same directory as the original module. This file should match the exports of the original module but with fake data or behavior. +To mock a module, create a file with the same name and in the same directory as the module you want to mock. For example, to mock a module named `session`, create a file next to it named `session.mock.js|ts`, with a few characteristics: -Here's an example of a mock file for a module named `api`: +- It should re-export all exports from the original module. +- It should use the `fn` utility to mock any necessary functionality from the original module. +- It cannot use subpath imports or builder aliases for its dependencies. +- It should not introduce side effects that could affect other tests or components. Mock files should be isolated and only affect the module they are mocking. -```js -// api.mock.js -TK: Add snippet -``` - - - -When creating a mock file, be careful not to introduce side effects that could affect other tests or components. Mock files should be isolated and only affect the component they are mocking. +Here's an example of a mock file for a module named `session`: -Additionally, you must use absolute paths to import any dependencies in the mock file. Relative imports can cause issues when importing the mock file into your component. +```js +// session.mock.js +import { fn } from '@storybook/test'; +import * as actual from './session'; - +export * from './session'; +export const getUserFromSession = fn(actual.getUserFromSession); +``` -### Subpath imports +## Subpath imports The recommended method for mocking modules is to use [subpath imports](https://nodejs.org/api/packages.html#subpath-imports), a feature of Node packages that is supported by both [Vite](../builders/vite.md) and [Webpack](../builders/webpack.md). @@ -64,17 +65,17 @@ You can then update your component file to use the subpath import: TK: Component snippet ``` -#### Conditional imports +### Conditional imports Note the `storybook` and `default` keys in each module's entry. The `storybook` key is used to import the mock file in Storybook, while the `default` key is used to import the original module in your project. The Storybook environment will match the conditions `storybook` and `test`, so you can apply the same module mapping for both Storybook and your tests. -### Builder aliases +## Builder aliases -If your project is unable to use [subpath imports](#subpath-imports), you can configure your Storybook builder to alias the module to the mock file. +If your project is unable to use [subpath imports](#subpath-imports), you can configure your Storybook builder to alias the module to the mock file. This will instruct the builder to replace the module with the mock file when bundling your Storybook stories. - +TK: Vite version, too ```js // .storybook/main.ts @@ -91,3 +92,114 @@ webpackFinal: async (config) => { return config }, ``` + +## Using mocked modules in stories + +When you use the `fn` utility to mock a module, you create full [mock functions](https://vitest.dev/api/mock.html) which have many useful methods. For example, you can use the [`mockReturnValue`](https://vitest.dev/api/mock.html#mockreturnvalue) method to set a return value for the mocked function or [`mockImplementation`](https://vitest.dev/api/mock.html#mockimplementation) to define a custom implementation. + +Here, we define `beforeEach` on a story (which will run before the story is rendered) to set a mocked return value for the `getUserFromSession` function used by the Page component: + + + +```js +// Page.stories.tsx +import { Meta, StoryObj } from '@storybook/react'; +import { fn } from '@storybook/test'; + +import { getUserFromSession } from '#api/session.mock'; +import { Page } from './Page'; + +const meta: Meta = { + component: Page, +}; +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + async beforeEach() { + // 👇 Set the return value for the getUserFromSession function + getUserFromSession.mockReturnValue({ id: '1', name: 'Alice' }); + }, +}; +``` + + + +If you are [writing your stories in TypeScript](./typescript.md), you will need to import your mock modules using the full mocked file name to have the mocked function correctly typed in your stories. You do **not** need do this in your component files, that's what the [subpath import](#subpath-imports) or [builder alias](#builder-aliases) is for. + + + +### Spying on mocked modules + +The `fn` utility also spies on the original module's functions, which you can use to assert their behavior in your tests. For example, you can use [interaction tests](../writing-tests/interaction-testing.md) to verify that a function was called with specific arguments. + +For example, this story checks that the `saveNote` function was called when the user clicks the save button: + +```ts +// NoteUI.stories.tsx +import { Meta, StoryObj } from '@storybook/react'; +import { expect, userEvent, within } from '@storybook/test'; + +import { saveNote } from '#app/actions.mock'; +import { createNotes } from '#mocks/notes'; +import NoteUI from './note-ui'; + +const meta = { + title: 'Mocked/NoteUI', + component: NoteUI, +} satisfies Meta; +export default meta; + +type Story = StoryObj; + +const notes = createNotes(); + +export const SaveFlow: Story = { + name: 'Save Flow ▶', + args: { + isEditing: true, + note: notes[0], + }, + play: async ({ canvasElement, step }) => { + const canvas = within(canvasElement); + + const saveButton = canvas.getByRole('menuitem', { name: /done/i }); + await userEvent.click(saveButton); + // 👇 This is the mock function, so you can assert its behavior + await expect(saveNote).toHaveBeenCalled(); + }, +}; +``` + +### Shared setup and clearing mocks + +You can use `beforeEach` at the component level to perform shared setup or clear the mocks between stories. This ensures that each test starts with a clean slate and is not affected by the mocks from previous stories. + + + +```js +// Page.stories.tsx +import { Meta, StoryObj } from '@storybook/react'; +import { fn } from '@storybook/test'; + +import { getUserFromSession } from '#api/session.mock'; +import { Page } from './Page'; + +const meta: Meta = { + component: Page, + async beforeEach() { + // 👇 Do this for each story + // TK + // 👇 Clear the mock between stories + getUserFromSession.mockClear(); + }, +}; +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + // TK +}; +``` diff --git a/docs/writing-stories/mocking-network-requests.md b/docs/writing-stories/mocking-network-requests.md index 28afb5e12697..461574f7c856 100644 --- a/docs/writing-stories/mocking-network-requests.md +++ b/docs/writing-stories/mocking-network-requests.md @@ -4,7 +4,7 @@ title: Mocking network requests For components that make network requests (e.g. fetching data from a REST or GraphQL API), you can mock those requests using a tool like [Mock Service Worker (MSW)](https://mswjs.io/). MSW allows you to intercept requests made by your components and respond with fake data. -The [MSW addon]https://storybook.js.org/addons/msw-storybook-addon/ brings this functionality into Storybook, allowing you to mock API requests in your stories. Below is an overview of how to set up and use the addon. +The [MSW addon](https://storybook.js.org/addons/msw-storybook-addon/) brings this functionality into Storybook, allowing you to mock API requests in your stories. Below is an overview of how to set up and use the addon. ## Set up the MSW addon diff --git a/docs/writing-stories/mocking-providers.md b/docs/writing-stories/mocking-providers.md index a6000ff59558..4c5a8b20a496 100644 --- a/docs/writing-stories/mocking-providers.md +++ b/docs/writing-stories/mocking-providers.md @@ -4,8 +4,6 @@ title: Mocking providers -## Providers - Components can receive data or configuration from context providers. For example, a styled component might access its theme from a ThemeProvider. To mock a provider, you can wrap your component in a [decorator](./decorators.md) that includes the necessary context. @@ -21,4 +19,68 @@ Components can receive data or configuration from context providers. For example -TK: Something about the `context` argument? +## Configuring the mock provider + +When mocking a provider, it may be necessary to configure the provider to supply a different value for individual stories. For example, you might want to test a component with different themes or user roles. + +One way to do this is to define the decorator for each story individually. But if you imagine a scenario where you wish to create stories for each of your components in both light and dark themes, this approach can quickly become cumbersome. + +For a better way, with much less repetition, you can use the [decorator function's second "context" argument](./decorators.md#context-for-mocking) to access a story's [`parameters`](./parameters.md) and adjust the provided value. This way, you can define the provider once and adjust its value for each story. + +For example, we can adjust the decorator from above to read from `parameters.theme` to determine which theme to provide: + + + +```ts +// .storybook/preview.js +import React from 'react'; +import { Preview } from '@storybook/react'; +import { ThemeProvider } from 'styled-components'; + +const preview: Preview = { + decorators: [ + // 👇 Defining the decorator in the preview file applies it to all stories + (Story, { parameters }) => { + // 👇 Make it configurable by reading the theme value from parameters + const theme = parameters.theme || 'default'; + return ( + + + + ); + }, + ], +}; + +export default preview; +``` + +Now, you can define a `theme` parameter in your stories to adjust the theme provided by the decorator: + + + +```ts +// Button.stories.tsx +import { Meta, StoryObj } from '@storybook/react'; + +import { Button } from './Button'; + +const meta: Meta = { + component: Button, +}; +export default meta; + +type Story = StoryObj; + +// Wrapped in default theme +export const Default: Story = {}; + +// Wrapped in dark theme +export const Dark: Story = { + parameters: { + theme: 'dark', + }, +}; +``` + +This powerful approach allows you to provide any value (theme, user role, mock data, etc.) to your components in a way that is both flexible and maintainable. From 75b0820ab13048ef27d47a967d77c745b9e50aeb Mon Sep 17 00:00:00 2001 From: Kyle Gach Date: Tue, 16 Apr 2024 14:28:54 -0600 Subject: [PATCH 015/117] Updates for Next.js - Warning for absolute imports & mocking - Module aliases - Subpath imports - Mocking modules - `@storybook/nextjs/cache.mock` module API --- docs/get-started/nextjs.md | 122 ++++++++++++++++++++++++++++++++++--- 1 file changed, 115 insertions(+), 7 deletions(-) diff --git a/docs/get-started/nextjs.md b/docs/get-started/nextjs.md index f1e024ef6049..8f109ff3202c 100644 --- a/docs/get-started/nextjs.md +++ b/docs/get-started/nextjs.md @@ -671,6 +671,106 @@ import 'styles/globals.scss'; // ... ``` + + +Absolute imports **cannot** be mocked in stories/tests. See the [Mocking modules](#mocking-modules) section for more information. + + + +## Module aliases + +[Module aliases](https://nextjs.org/docs/app/building-your-application/configuring/absolute-imports-and-module-aliases#module-aliases) are also supported. + +```jsx +// index.js +// All good! +import Button from '@/components/button'; +// Also good! +import styles from '@/styles/HomePage.module.css'; + +export default function HomePage() { + return ( + <> +

Hello World

+ + + + ); + }, + parameters: { + test: { + // This is needed until Next will update to the React 19 beta: https://github.com/vercel/next.js/pull/65058 + // In the React 19 beta ErrorBoundary errors (such as redirect) are only logged, and not thrown. + // We will also suspress console.error logs for re the console.error logs for redirect in the next framework. + // Using the onCaughtError react root option: + // react: { + // rootOptions: { + // onCaughtError(error: unknown) { + // if (isNextRouterError(error)) return; + // console.error(error); + // }, + // }, + // See: code/frameworks/nextjs/src/preview.tsx + dangerouslyIgnoreUnhandledErrors: true, + }, + nextjs: { + appDirectory: true, + navigation: { + pathname: '/', + }, + }, + }, +} as Meta; + +export const SingletonStateGetsInvalidatedAfterRedirecting: StoryObj = { + play: async ({ canvasElement, step }) => { + const canvas = within(canvasElement); + await userEvent.click(canvas.getByRole('button')); + }, +}; diff --git a/code/frameworks/nextjs/template/stories_nextjs-default-ts/ServerActions.stories.tsx b/code/frameworks/nextjs/template/stories_nextjs-default-ts/ServerActions.stories.tsx index 17d364429726..cb3f5bbdb2dd 100644 --- a/code/frameworks/nextjs/template/stories_nextjs-default-ts/ServerActions.stories.tsx +++ b/code/frameworks/nextjs/template/stories_nextjs-default-ts/ServerActions.stories.tsx @@ -1,9 +1,9 @@ import React from 'react'; import type { Meta, StoryObj } from '@storybook/react'; -import { expect, within, userEvent } from '@storybook/test'; +import { expect, within, userEvent, waitFor } from '@storybook/test'; import { cookies } from '@storybook/nextjs/headers.mock'; import { revalidatePath } from '@storybook/nextjs/cache.mock'; -import { redirect } from '@storybook/nextjs/navigation.mock'; +import { redirect, getRouter } from '@storybook/nextjs/navigation.mock'; import { accessRoute, login, logout } from './server-actions'; @@ -31,45 +31,84 @@ function Component() { export default { component: Component, + parameters: { + nextjs: { + appDirectory: true, + navigation: { + pathname: '/', + }, + }, + test: { + // This is needed until Next will update to the React 19 beta: https://github.com/vercel/next.js/pull/65058 + // In the React 19 beta ErrorBoundary errors (such as redirect) are only logged, and not thrown. + // We will also suspress console.error logs for re the console.error logs for redirect in the next framework. + // Using the onCaughtError react root option: + // react: { + // rootOptions: { + // onCaughtError(error: unknown) { + // if (isNextRouterError(error)) return; + // console.error(error); + // }, + // }, + // See: code/frameworks/nextjs/src/preview.tsx + dangerouslyIgnoreUnhandledErrors: true, + }, + }, } as Meta; -export const Default: StoryObj = { - play: async ({ canvasElement, step }) => { +export const ProtectedWhileLoggedOut: StoryObj = { + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + await userEvent.click(canvas.getByText('Access protected route')); + + await expect(cookies().get).toHaveBeenCalledWith('user'); + await expect(redirect).toHaveBeenCalledWith('/'); + + await waitFor(() => expect(getRouter().push).toHaveBeenCalled()); + }, +}; + +export const ProtectedWhileLoggedIn: StoryObj = { + beforeEach() { + cookies().set('user', 'storybookjs'); + }, + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + await userEvent.click(canvas.getByText('Access protected route')); + + await expect(cookies().get).toHaveBeenLastCalledWith('user'); + await expect(revalidatePath).toHaveBeenLastCalledWith('/'); + await expect(redirect).toHaveBeenLastCalledWith('/protected'); + + await waitFor(() => expect(getRouter().push).toHaveBeenCalled()); + }, +}; + +export const Logout: StoryObj = { + beforeEach() { + cookies().set('user', 'storybookjs'); + }, + play: async ({ canvasElement }) => { const canvas = within(canvasElement); - const loginBtn = canvas.getByText('Login'); - const logoutBtn = canvas.getByText('Logout'); - const accessRouteBtn = canvas.getByText('Access protected route'); + await userEvent.click(canvas.getByText('Logout')); + await expect(cookies().delete).toHaveBeenCalled(); + await expect(revalidatePath).toHaveBeenCalledWith('/'); + await expect(redirect).toHaveBeenCalledWith('/'); - await step('accessRoute flow - logged out', async () => { - await userEvent.click(accessRouteBtn); - await expect(cookies().get).toHaveBeenCalledWith('user'); - await expect(redirect).toHaveBeenCalledWith('/'); - }); + await waitFor(() => expect(getRouter().push).toHaveBeenCalled()); + }, +}; - await step('accessRoute flow - logged', async () => { - cookies.mockRestore(); - cookies().set('user', 'storybookjs'); - await userEvent.click(accessRouteBtn); - await expect(cookies().get).toHaveBeenCalledWith('user'); - await expect(revalidatePath).toHaveBeenCalledWith('/'); - await expect(redirect).toHaveBeenCalledWith('/protected'); - }); +export const Login: StoryObj = { + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + await userEvent.click(canvas.getByText('Login')); - await step('logout flow', async () => { - cookies.mockRestore(); - await userEvent.click(logoutBtn); - await expect(cookies().delete).toHaveBeenCalled(); - await expect(revalidatePath).toHaveBeenCalledWith('/'); - await expect(redirect).toHaveBeenCalledWith('/'); - }); + await expect(cookies().set).toHaveBeenCalledWith('user', 'storybookjs'); + await expect(revalidatePath).toHaveBeenCalledWith('/'); + await expect(redirect).toHaveBeenCalledWith('/'); - await step('login flow', async () => { - cookies.mockRestore(); - await userEvent.click(loginBtn); - await expect(cookies().set).toHaveBeenCalledWith('user', 'storybookjs'); - await expect(revalidatePath).toHaveBeenCalledWith('/'); - await expect(redirect).toHaveBeenCalledWith('/'); - }); + await waitFor(() => expect(getRouter().push).toHaveBeenCalled()); }, }; diff --git a/code/lib/react-dom-shim/src/react-18.tsx b/code/lib/react-dom-shim/src/react-18.tsx index ddfa738d4dd9..5b9e88f98a84 100644 --- a/code/lib/react-dom-shim/src/react-18.tsx +++ b/code/lib/react-dom-shim/src/react-18.tsx @@ -1,6 +1,6 @@ import type { FC, ReactElement } from 'react'; -import type { Root as ReactRoot } from 'react-dom/client'; import React, { useLayoutEffect, useRef } from 'react'; +import type { Root as ReactRoot, RootOptions } from 'react-dom/client'; import ReactDOM from 'react-dom/client'; // A map of all rendered React 18 nodes @@ -21,9 +21,9 @@ const WithCallback: FC<{ callback: () => void; children: ReactElement }> = ({ return children; }; -export const renderElement = async (node: ReactElement, el: Element) => { +export const renderElement = async (node: ReactElement, el: Element, rootOptions?: RootOptions) => { // Create Root Element conditionally for new React 18 Root Api - const root = await getReactRoot(el); + const root = await getReactRoot(el, rootOptions); return new Promise((resolve) => { root.render( resolve(null)}>{node}); @@ -39,11 +39,11 @@ export const unmountElement = (el: Element, shouldUseNewRootApi?: boolean) => { } }; -const getReactRoot = async (el: Element): Promise => { +const getReactRoot = async (el: Element, rootOptions?: RootOptions): Promise => { let root = nodes.get(el); if (!root) { - root = ReactDOM.createRoot(el); + root = ReactDOM.createRoot(el, rootOptions); nodes.set(el, root); } diff --git a/code/renderers/react/src/renderToCanvas.tsx b/code/renderers/react/src/renderToCanvas.tsx index d8821a3458e4..8cb2e76f9b2d 100644 --- a/code/renderers/react/src/renderToCanvas.tsx +++ b/code/renderers/react/src/renderToCanvas.tsx @@ -74,7 +74,7 @@ export async function renderToCanvas( unmountElement(canvasElement); } - await renderElement(element, canvasElement); + await renderElement(element, canvasElement, storyContext?.parameters?.react?.rootOptions); return () => unmountElement(canvasElement); } From 31ae4d625a174bb40467fa05d8d662d5d92acee0 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 7 May 2024 17:05:22 +0800 Subject: [PATCH 094/117] Fix yarn.lock --- code/yarn.lock | 725 ++++++++++--------------------------------------- 1 file changed, 151 insertions(+), 574 deletions(-) diff --git a/code/yarn.lock b/code/yarn.lock index b7a4e604c38b..301f30f4b09a 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -19,7 +19,7 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:2.3.0": +"@ampproject/remapping@npm:2.3.0, @ampproject/remapping@npm:^2.2.0, @ampproject/remapping@npm:^2.2.1": version: 2.3.0 resolution: "@ampproject/remapping@npm:2.3.0" dependencies: @@ -29,16 +29,6 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:^2.2.0, @ampproject/remapping@npm:^2.2.1": - version: 2.2.1 - resolution: "@ampproject/remapping@npm:2.2.1" - dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.0" - "@jridgewell/trace-mapping": "npm:^0.3.9" - checksum: 10c0/92ce5915f8901d8c7cd4f4e6e2fe7b9fd335a29955b400caa52e0e5b12ca3796ada7c2f10e78c9c5b0f9c2539dff0ffea7b19850a56e1487aa083531e1e46d43 - languageName: node - linkType: hard - "@analogjs/vite-plugin-angular@npm:^0.2.24": version: 0.2.28 resolution: "@analogjs/vite-plugin-angular@npm:0.2.28" @@ -456,7 +446,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:7.23.6, @babel/generator@npm:^7.23.0": +"@babel/generator@npm:7.23.6": version: 7.23.6 resolution: "@babel/generator@npm:7.23.6" dependencies: @@ -480,6 +470,18 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.23.0, @babel/generator@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/generator@npm:7.24.5" + dependencies: + "@babel/types": "npm:^7.24.5" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10c0/0d64f880150e7dfb92ceff2b4ac865f36aa1e295120920246492ffd0146562dabf79ba8699af1c8833f8a7954818d4d146b7b02f808df4d6024fb99f98b2f78d + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:7.22.5, @babel/helper-annotate-as-pure@npm:^7.18.6, @babel/helper-annotate-as-pure@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" @@ -530,25 +532,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.24.0": - version: 7.24.0 - resolution: "@babel/helper-create-class-features-plugin@npm:7.24.0" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-member-expression-to-functions": "npm:^7.23.0" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.20" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/341548496df202805489422a160bba75b111d994c64d788a397c35f01784632af48bf06023af8aa2fe72c2c254f8c885b4e0f7f3df5ef17a37370f2feaf80328 - languageName: node - linkType: hard - "@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.22.15, @babel/helper-create-regexp-features-plugin@npm:^7.22.5": version: 7.22.15 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.22.15" @@ -577,21 +560,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-define-polyfill-provider@npm:^0.6.0": - version: 0.6.0 - resolution: "@babel/helper-define-polyfill-provider@npm:0.6.0" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" - debug: "npm:^4.1.1" - lodash.debounce: "npm:^4.0.8" - resolve: "npm:^1.14.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/bf6af52fadbbebc5bf71166b91eac4fc21431ec9b0d2a94063f3a3d900ed44aa1384ad23e920a85e7a657fcf3e80edb2eaaac9d902bd1e632f3b50c836b45c53 - languageName: node - linkType: hard - "@babel/helper-define-polyfill-provider@npm:^0.6.1, @babel/helper-define-polyfill-provider@npm:^0.6.2": version: 0.6.2 resolution: "@babel/helper-define-polyfill-provider@npm:0.6.2" @@ -633,7 +601,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.22.15, @babel/helper-member-expression-to-functions@npm:^7.23.0": +"@babel/helper-member-expression-to-functions@npm:^7.23.0": version: 7.23.0 resolution: "@babel/helper-member-expression-to-functions@npm:7.23.0" dependencies: @@ -642,16 +610,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.8.3": - version: 7.22.15 - resolution: "@babel/helper-module-imports@npm:7.22.15" - dependencies: - "@babel/types": "npm:^7.22.15" - checksum: 10c0/4e0d7fc36d02c1b8c8b3006dfbfeedf7a367d3334a04934255de5128115ea0bafdeb3e5736a2559917f0653e4e437400d54542da0468e08d3cbc86d3bbfa8f30 - languageName: node - linkType: hard - -"@babel/helper-module-imports@npm:^7.24.1, @babel/helper-module-imports@npm:^7.24.3": +"@babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.24.1, @babel/helper-module-imports@npm:^7.24.3, @babel/helper-module-imports@npm:^7.8.3": version: 7.24.3 resolution: "@babel/helper-module-imports@npm:7.24.3" dependencies: @@ -684,14 +643,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.22.5 - resolution: "@babel/helper-plugin-utils@npm:7.22.5" - checksum: 10c0/d2c4bfe2fa91058bcdee4f4e57a3f4933aed7af843acfd169cd6179fab8d13c1d636474ecabb2af107dc77462c7e893199aa26632bac1c6d7e025a17cbb9d20d - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.24.0": +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": version: 7.24.0 resolution: "@babel/helper-plugin-utils@npm:7.24.0" checksum: 10c0/90f41bd1b4dfe7226b1d33a4bb745844c5c63e400f9e4e8bf9103a7ceddd7d425d65333b564d9daba3cebd105985764d51b4bd4c95822b97c2e3ac1201a8a5da @@ -711,19 +663,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-replace-supers@npm:7.22.20" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-member-expression-to-functions": "npm:^7.22.15" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/6b0858811ad46873817c90c805015d63300e003c5a85c147a17d9845fa2558a02047c3cc1f07767af59014b2dd0fa75b503e5bc36e917f360e9b67bb6f1e79f4 - languageName: node - linkType: hard - "@babel/helper-replace-supers@npm:^7.24.1": version: 7.24.1 resolution: "@babel/helper-replace-supers@npm:7.24.1" @@ -764,10 +703,19 @@ __metadata: languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/helper-string-parser@npm:7.23.4" - checksum: 10c0/f348d5637ad70b6b54b026d6544bd9040f78d24e7ec245a0fc42293968181f6ae9879c22d89744730d246ce8ec53588f716f102addd4df8bbc79b73ea10004ac +"@babel/helper-split-export-declaration@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-split-export-declaration@npm:7.24.5" + dependencies: + "@babel/types": "npm:^7.24.5" + checksum: 10c0/d7a812d67d031a348f3fb0e6263ce2dbe6038f81536ba7fb16db385383bcd6542b71833194303bf6d3d0e4f7b6b584c9c8fae8772122e2ce68fc9bdf07f4135d + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.23.4, @babel/helper-string-parser@npm:^7.24.1": + version: 7.24.1 + resolution: "@babel/helper-string-parser@npm:7.24.1" + checksum: 10c0/2f9bfcf8d2f9f083785df0501dbab92770111ece2f90d120352fda6dd2a7d47db11b807d111e6f32aa1ba6d763fe2dc6603d153068d672a5d0ad33ca802632b2 languageName: node linkType: hard @@ -778,7 +726,14 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.22.15, @babel/helper-validator-option@npm:^7.23.5": +"@babel/helper-validator-identifier@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-validator-identifier@npm:7.24.5" + checksum: 10c0/05f957229d89ce95a137d04e27f7d0680d84ae48b6ad830e399db0779341f7d30290f863a93351b4b3bde2166737f73a286ea42856bb07c8ddaa95600d38645c + languageName: node + linkType: hard + +"@babel/helper-validator-option@npm:^7.23.5": version: 7.23.5 resolution: "@babel/helper-validator-option@npm:7.23.5" checksum: 10c0/af45d5c0defb292ba6fd38979e8f13d7da63f9623d8ab9ededc394f67eb45857d2601278d151ae9affb6e03d5d608485806cd45af08b4468a0515cf506510e94 @@ -819,30 +774,21 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.11.5, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.4, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.5, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": - version: 7.23.9 - resolution: "@babel/parser@npm:7.23.9" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/7df97386431366d4810538db4b9ec538f4377096f720c0591c7587a16f6810e62747e9fbbfa1ff99257fd4330035e4fb1b5b77c7bd3b97ce0d2e3780a6618975 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.24.0": - version: 7.24.0 - resolution: "@babel/parser@npm:7.24.0" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.11.5, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.4, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.5, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.1, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": + version: 7.24.4 + resolution: "@babel/parser@npm:7.24.4" bin: parser: ./bin/babel-parser.js - checksum: 10c0/77593d0b9de9906823c4d653bb6cda1c7593837598516330f655f70cba6224a37def7dbe5b4dad0038482d407d8d209eb8be5f48ca9a13357d769f829c5adb8e + checksum: 10c0/8381e1efead5069cb7ed2abc3a583f4a86289b2f376c75cecc69f59a8eb36df18274b1886cecf2f97a6a0dff5334b27330f58535be9b3e4e26102cc50e12eac8 languageName: node linkType: hard -"@babel/parser@npm:^7.24.1, @babel/parser@npm:^7.24.4": - version: 7.24.4 - resolution: "@babel/parser@npm:7.24.4" +"@babel/parser@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/parser@npm:7.24.5" bin: parser: ./bin/babel-parser.js - checksum: 10c0/8381e1efead5069cb7ed2abc3a583f4a86289b2f376c75cecc69f59a8eb36df18274b1886cecf2f97a6a0dff5334b27330f58535be9b3e4e26102cc50e12eac8 + checksum: 10c0/8333a6ad5328bad34fa0e12bcee147c3345ea9a438c0909e7c68c6cfbea43c464834ffd7eabd1cbc1c62df0a558e22ffade9f5b29440833ba7b33d96a71f88c0 languageName: node linkType: hard @@ -907,15 +853,15 @@ __metadata: linkType: hard "@babel/plugin-proposal-decorators@npm:^7.13.5, @babel/plugin-proposal-decorators@npm:^7.22.7": - version: 7.24.0 - resolution: "@babel/plugin-proposal-decorators@npm:7.24.0" + version: 7.24.1 + resolution: "@babel/plugin-proposal-decorators@npm:7.24.1" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.0" + "@babel/helper-create-class-features-plugin": "npm:^7.24.1" "@babel/helper-plugin-utils": "npm:^7.24.0" - "@babel/plugin-syntax-decorators": "npm:^7.24.0" + "@babel/plugin-syntax-decorators": "npm:^7.24.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/6bf16cb2b5b2f1b63b5ea964853cd3b3419c8285296b5bf64a64127c9d5c1b2e6829e84bd92734e4b71df67686d8f36fb01bb8a45fc52bcece7503b73bc42ec7 + checksum: 10c0/ffe49522ada6581f1c760b777dbd913afcd204e11e6907c4f2c293ce6d30961449ac19d9960250d8743a1f60e21cb667e51a3af15992dfe7627105e039c46a9b languageName: node linkType: hard @@ -1023,14 +969,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-decorators@npm:^7.24.0": - version: 7.24.0 - resolution: "@babel/plugin-syntax-decorators@npm:7.24.0" +"@babel/plugin-syntax-decorators@npm:^7.24.1": + version: 7.24.1 + resolution: "@babel/plugin-syntax-decorators@npm:7.24.1" dependencies: "@babel/helper-plugin-utils": "npm:^7.24.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/6c11801e062772d4e1b0b418a4732574128b1dfc13193a2909fa93937346746aaa7046f88f6026ff3c80777c967d0fe2e4bb19a1d3fb399e8349c81741e4f471 + checksum: 10c0/14028a746f86efbdd47e4961456bb53d656e9e3461890f66b1b01032151d15fda5ba99fcaa60232a229a33aa9e73b11c2597b706d5074c520155757e372cd17b languageName: node linkType: hard @@ -1056,14 +1002,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-flow@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-flow@npm:7.22.5" +"@babel/plugin-syntax-flow@npm:^7.24.1": + version: 7.24.1 + resolution: "@babel/plugin-syntax-flow@npm:7.24.1" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.24.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/07afc7df02141597968532bfbfa3f6c0ad21a2bdd885d0e5e035dcf60fdf35f0995631c9750b464e1a6f2feea14160a82787f914e88e8f7115dc99f09853e43e + checksum: 10c0/618de04360a96111408abdaafaba2efbaef0d90faad029d50e0281eaad5d7c7bd2ce4420bbac0ee27ad84c2b7bbc3e48f782064f81ed5bc40c398637991004c7 languageName: node linkType: hard @@ -1309,18 +1255,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoping@npm:^7.23.4, @babel/plugin-transform-block-scoping@npm:^7.8.3": - version: 7.23.4 - resolution: "@babel/plugin-transform-block-scoping@npm:7.23.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/83006804dddf980ab1bcd6d67bc381e24b58c776507c34f990468f820d0da71dba3697355ca4856532fa2eeb2a1e3e73c780f03760b5507a511cbedb0308e276 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.24.4": +"@babel/plugin-transform-block-scoping@npm:^7.23.4, @babel/plugin-transform-block-scoping@npm:^7.24.4, @babel/plugin-transform-block-scoping@npm:^7.8.3": version: 7.24.4 resolution: "@babel/plugin-transform-block-scoping@npm:7.24.4" dependencies: @@ -1456,15 +1391,15 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-flow-strip-types@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-flow-strip-types@npm:7.22.5" +"@babel/plugin-transform-flow-strip-types@npm:^7.24.1": + version: 7.24.1 + resolution: "@babel/plugin-transform-flow-strip-types@npm:7.24.1" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-flow": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.24.0" + "@babel/plugin-syntax-flow": "npm:^7.24.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/5949a8e5214e3fc65d31dab0551423cea9d9eef35faa5d0004707ba7347baf96166aa400907ce7498f754db4e1e9d039ca434a508546b0dc9fdae9a42e814c1a + checksum: 10c0/e6aa9cbad0441867598d390d4df65bc8c6b797574673e4eedbdae0cc528e81e00f4b2cd38f7d138b0f04bcdd2540384a9812d5d76af5abfa06aee1c7fc20ca58 languageName: node linkType: hard @@ -1638,13 +1573,13 @@ __metadata: linkType: hard "@babel/plugin-transform-object-assign@npm:^7.8.3": - version: 7.22.5 - resolution: "@babel/plugin-transform-object-assign@npm:7.22.5" + version: 7.24.1 + resolution: "@babel/plugin-transform-object-assign@npm:7.24.1" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.24.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/c80ca956ccc45c68a6f35e8aea80e08c0a653e4baf243727d4258f242d312d71be20e3fad35a1f2cd9d58b30dcbb5cdf5f8d6c6614a3f8c6079d90f9b1dadee6 + checksum: 10c0/eb30beac71a5930ecdfc8740b184f22dd2043b1ac6f9f6818fb2e10ddfbdd6536b4ddb0d00af2c9f4a375823f52a566915eb598bea0633484aa5ff5db4e547fd languageName: node linkType: hard @@ -1770,24 +1705,24 @@ __metadata: linkType: hard "@babel/plugin-transform-react-jsx-self@npm:^7.18.6": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-jsx-self@npm:7.22.5" + version: 7.24.1 + resolution: "@babel/plugin-transform-react-jsx-self@npm:7.24.1" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.24.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/263091bdede1f448cb2c59b84eb69972c15d3f022c929a75337bd20d8b65551ac38cd26dad1946eaa93289643506b10ddaea3445a28cb8fca5a773a22a0df90b + checksum: 10c0/ea362ff94b535c753f560eb1f5e063dc72bbbca17ed58837a949a7b289d5eacc7b0a28296d1932c94429b168d6040cdee5484a59b9e3c021f169e0ee137e6a27 languageName: node linkType: hard "@babel/plugin-transform-react-jsx-source@npm:^7.19.6": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-jsx-source@npm:7.22.5" + version: 7.24.1 + resolution: "@babel/plugin-transform-react-jsx-source@npm:7.24.1" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.24.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/defc9debb76b4295e3617ef7795a0533dbbecef6f51bf5ba4bfc162df892a84fd39e14d5f1b9a5aad7b09b97074fef4c6756f9d2036eef5a9874acabe198f75a + checksum: 10c0/ea8e3263c0dc51fbc97c156cc647150a757cc56de10781287353d0ce9b2dcd6b6d93d573c0142d7daf5d6fb554c74fa1971ae60764924ea711161d8458739b63 languageName: node linkType: hard @@ -2182,15 +2117,15 @@ __metadata: linkType: hard "@babel/preset-flow@npm:^7.13.13, @babel/preset-flow@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/preset-flow@npm:7.22.15" + version: 7.24.1 + resolution: "@babel/preset-flow@npm:7.24.1" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.15" - "@babel/plugin-transform-flow-strip-types": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.24.0" + "@babel/helper-validator-option": "npm:^7.23.5" + "@babel/plugin-transform-flow-strip-types": "npm:^7.24.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/7eef0c84ec1889d6c4f7a67d7d1a81703420eed123a8c23f25af148eead77907f0bd701f3e729fdb37d3ddb2a373bf43938b36a9ba17f546111ddb9521466b92 + checksum: 10c0/e2209158d68a456b8f9d6cd6c810e692f3ab8ca28edba99afcecaacd657ace7cc905e566f84d6da06e537836a2f830bc6ddf4cb34006d57303ff9a40a94fa433 languageName: node linkType: hard @@ -2239,17 +2174,17 @@ __metadata: linkType: hard "@babel/register@npm:^7.13.16, @babel/register@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/register@npm:7.22.15" + version: 7.23.7 + resolution: "@babel/register@npm:7.23.7" dependencies: clone-deep: "npm:^4.0.1" find-cache-dir: "npm:^2.0.0" make-dir: "npm:^2.1.0" - pirates: "npm:^4.0.5" + pirates: "npm:^4.0.6" source-map-support: "npm:^0.5.16" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/895cc773c3b3eae909478ea2a9735ef6edd634b04b4aaaad2ce576fd591c2b3c70ff8c90423e769a291bee072186e7e4801480c1907e31ba3053c6cdba5571cb + checksum: 10c0/b2466e41a4394e725b57e139ba45c3f61b88546d3cb443e84ce46cb34071b60c6cdb706a14c58a1443db530691a54f51da1f0c97f6c1aecbb838a2fb7eb5dbb9 languageName: node linkType: hard @@ -2261,12 +2196,12 @@ __metadata: linkType: hard "@babel/runtime-corejs3@npm:^7.10.2": - version: 7.23.1 - resolution: "@babel/runtime-corejs3@npm:7.23.1" + version: 7.24.4 + resolution: "@babel/runtime-corejs3@npm:7.24.4" dependencies: core-js-pure: "npm:^3.30.2" regenerator-runtime: "npm:^0.14.0" - checksum: 10c0/6e2c2b11779ff56c88b1f3a8742498640f7271ad4fcf9cfd24052bbb236a5e7c4c7c8d81cda751da3b4effa678736303deb78441c5752e63bfb90d6453fd870f + checksum: 10c0/121bec9a0b505e2995c4b71cf480167e006e8ee423f77bccc38975bfbfbfdb191192ff03557c18fad6de8f2b85c12c49aaa4b92d1d5fe0c0e136da664129be1e languageName: node linkType: hard @@ -2297,16 +2232,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": - version: 7.23.6 - resolution: "@babel/runtime@npm:7.23.6" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10c0/d886954e985ef8e421222f7a2848884d96a752e0020d3078b920dd104e672fdf23bcc6f51a44313a048796319f1ac9d09c2c88ec8cbb4e1f09174bcd3335b9ff - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.22.15, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.24.4, @babel/runtime@npm:^7.7.2": +"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.15, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.24.4, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": version: 7.24.4 resolution: "@babel/runtime@npm:7.24.4" dependencies: @@ -2335,79 +2261,61 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.2, @babel/traverse@npm:^7.23.9, @babel/traverse@npm:^7.4.5": - version: 7.23.9 - resolution: "@babel/traverse@npm:7.23.9" - dependencies: - "@babel/code-frame": "npm:^7.23.5" - "@babel/generator": "npm:^7.23.6" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/d1615d1d02f04d47111a7ea4446a1a6275668ca39082f31d51f08380de9502e19862be434eaa34b022ce9a17dbb8f9e2b73a746c654d9575f3a680a7ffdf5630 - languageName: node - linkType: hard - -"@babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.24.0": - version: 7.24.0 - resolution: "@babel/traverse@npm:7.24.0" +"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.9, @babel/traverse@npm:^7.24.0, @babel/traverse@npm:^7.24.1, @babel/traverse@npm:^7.4.5": + version: 7.24.1 + resolution: "@babel/traverse@npm:7.24.1" dependencies: - "@babel/code-frame": "npm:^7.23.5" - "@babel/generator": "npm:^7.23.6" + "@babel/code-frame": "npm:^7.24.1" + "@babel/generator": "npm:^7.24.1" "@babel/helper-environment-visitor": "npm:^7.22.20" "@babel/helper-function-name": "npm:^7.23.0" "@babel/helper-hoist-variables": "npm:^7.22.5" "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.24.0" + "@babel/parser": "npm:^7.24.1" "@babel/types": "npm:^7.24.0" debug: "npm:^4.3.1" globals: "npm:^11.1.0" - checksum: 10c0/55ffd2b0ce0fbd0a09051edc4def4fb1e96f35e0b100c0dc2a7429df569971ae312c290e980e423471f350961705698a257c7eea8c8304918024cc26f02468ba + checksum: 10c0/c087b918f6823776537ba246136c70e7ce0719fc05361ebcbfd16f4e6f2f6f1f8f4f9167f1d9b675f27d12074839605189cc9d689de20b89a85e7c140f23daab languageName: node linkType: hard -"@babel/traverse@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/traverse@npm:7.24.1" +"@babel/traverse@npm:^7.23.2": + version: 7.24.5 + resolution: "@babel/traverse@npm:7.24.5" dependencies: - "@babel/code-frame": "npm:^7.24.1" - "@babel/generator": "npm:^7.24.1" + "@babel/code-frame": "npm:^7.24.2" + "@babel/generator": "npm:^7.24.5" "@babel/helper-environment-visitor": "npm:^7.22.20" "@babel/helper-function-name": "npm:^7.23.0" "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.24.1" - "@babel/types": "npm:^7.24.0" + "@babel/helper-split-export-declaration": "npm:^7.24.5" + "@babel/parser": "npm:^7.24.5" + "@babel/types": "npm:^7.24.5" debug: "npm:^4.3.1" globals: "npm:^11.1.0" - checksum: 10c0/c087b918f6823776537ba246136c70e7ce0719fc05361ebcbfd16f4e6f2f6f1f8f4f9167f1d9b675f27d12074839605189cc9d689de20b89a85e7c140f23daab + checksum: 10c0/3f22534bc2b2ed9208e55ef48af3b32939032b23cb9dc4037447cb108640df70bbb0b9fea86e9c58648949fdc2cb14e89aa79ffa3c62a5dd43459a52fe8c01d1 languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.18.9, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.4, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.2, @babel/types@npm:^7.8.3, @babel/types@npm:^7.9.6": - version: 7.23.9 - resolution: "@babel/types@npm:7.23.9" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.18.9, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.4, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.24.0, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.2, @babel/types@npm:^7.8.3, @babel/types@npm:^7.9.6": + version: 7.24.0 + resolution: "@babel/types@npm:7.24.0" dependencies: "@babel/helper-string-parser": "npm:^7.23.4" "@babel/helper-validator-identifier": "npm:^7.22.20" to-fast-properties: "npm:^2.0.0" - checksum: 10c0/edc7bb180ce7e4d2aea10c6972fb10474341ac39ba8fdc4a27ffb328368dfdfbf40fca18e441bbe7c483774500d5c05e222cec276c242e952853dcaf4eb884f7 + checksum: 10c0/777a0bb5dbe038ca4c905fdafb1cdb6bdd10fe9d63ce13eca0bd91909363cbad554a53dc1f902004b78c1dcbc742056f877f2c99eeedff647333b1fadf51235d languageName: node linkType: hard -"@babel/types@npm:^7.24.0": - version: 7.24.0 - resolution: "@babel/types@npm:7.24.0" +"@babel/types@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/types@npm:7.24.5" dependencies: - "@babel/helper-string-parser": "npm:^7.23.4" - "@babel/helper-validator-identifier": "npm:^7.22.20" + "@babel/helper-string-parser": "npm:^7.24.1" + "@babel/helper-validator-identifier": "npm:^7.24.5" to-fast-properties: "npm:^2.0.0" - checksum: 10c0/777a0bb5dbe038ca4c905fdafb1cdb6bdd10fe9d63ce13eca0bd91909363cbad554a53dc1f902004b78c1dcbc742056f877f2c99eeedff647333b1fadf51235d + checksum: 10c0/e1284eb046c5e0451b80220d1200e2327e0a8544a2fe45bb62c952e5fdef7099c603d2336b17b6eac3cc046b7a69bfbce67fe56e1c0ea48cd37c65cb88638f2a languageName: node linkType: hard @@ -2945,13 +2853,6 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.56.0": - version: 8.56.0 - resolution: "@eslint/js@npm:8.56.0" - checksum: 10c0/60b3a1cf240e2479cec9742424224465dc50e46d781da1b7f5ef240501b2d1202c225bd456207faac4b34a64f4765833345bc4ddffd00395e1db40fa8c426f5a - languageName: node - linkType: hard - "@eslint/js@npm:8.57.0": version: 8.57.0 resolution: "@eslint/js@npm:8.57.0" @@ -3457,7 +3358,7 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.13, @humanwhocodes/config-array@npm:^0.11.14": +"@humanwhocodes/config-array@npm:^0.11.14": version: 0.11.14 resolution: "@humanwhocodes/config-array@npm:0.11.14" dependencies: @@ -3808,17 +3709,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.19 - resolution: "@jridgewell/trace-mapping@npm:0.3.19" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.1.0" - "@jridgewell/sourcemap-codec": "npm:^1.4.14" - checksum: 10c0/845e6c6efca621b2b85e4d13fd25c319b6e4ab1ea78d4385ff6c0f78322ea0fcdfec8ac763aa4b56e8378c96d7bef101a2638c7a1a076f7d62f6376230c940a7 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.20, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.20, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25, @jridgewell/trace-mapping@npm:^0.3.9": version: 0.3.25 resolution: "@jridgewell/trace-mapping@npm:0.3.25" dependencies: @@ -10726,7 +10617,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs2@npm:^0.4.10": +"babel-plugin-polyfill-corejs2@npm:^0.4.10, babel-plugin-polyfill-corejs2@npm:^0.4.8": version: 0.4.11 resolution: "babel-plugin-polyfill-corejs2@npm:0.4.11" dependencies: @@ -10739,19 +10630,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs2@npm:^0.4.8": - version: 0.4.9 - resolution: "babel-plugin-polyfill-corejs2@npm:0.4.9" - dependencies: - "@babel/compat-data": "npm:^7.22.6" - "@babel/helper-define-polyfill-provider": "npm:^0.6.0" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/2cd47af763eb40aa41f1d6d9cbf1bdd217ff6c28f614b057c0328ee42a4d82cbcdcbc7d081d93e2a2d80446c899f25c3ebec048a63d260ef65a0a364134f71cd - languageName: node - linkType: hard - "babel-plugin-polyfill-corejs3@npm:^0.10.1, babel-plugin-polyfill-corejs3@npm:^0.10.4": version: 0.10.4 resolution: "babel-plugin-polyfill-corejs3@npm:0.10.4" @@ -11406,20 +11284,6 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.14.5": - version: 4.22.2 - resolution: "browserslist@npm:4.22.2" - dependencies: - caniuse-lite: "npm:^1.0.30001565" - electron-to-chromium: "npm:^1.4.601" - node-releases: "npm:^2.0.14" - update-browserslist-db: "npm:^1.0.13" - bin: - browserslist: cli.js - checksum: 10c0/2a331aab90503130043ca41dd5d281fa1e89d5e076d07a2d75e76bf4d693bd56e73d5abcd8c4f39119da6328d450578c216cf1cd5c99b82d8a90a2ae6271b465 - languageName: node - linkType: hard - "browserslist@npm:^4.21.10, browserslist@npm:^4.21.5, browserslist@npm:^4.22.2, browserslist@npm:^4.23.0": version: 4.23.0 resolution: "browserslist@npm:4.23.0" @@ -11726,27 +11590,13 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001565": - version: 1.0.30001581 - resolution: "caniuse-lite@npm:1.0.30001581" - checksum: 10c0/34b048156514eab5932212807428905cbecdef918f7c3d2153d5e8b6885d929e5c0b649f9e135cb1e03e413fbad8e00d1f24ed04cbcca52adc660ef98cad9032 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001579, caniuse-lite@npm:^1.0.30001591": +"caniuse-lite@npm:^1.0.30001579, caniuse-lite@npm:^1.0.30001587, caniuse-lite@npm:^1.0.30001591": version: 1.0.30001598 resolution: "caniuse-lite@npm:1.0.30001598" checksum: 10c0/7d4a1eecfe9e26a4ee5414dbcbf46dd02910d93dd6458ffe1ae146b7c2159af9bf159d7d75d897a1b72a62c1b7f5cef46b4c1f315574a11b0529c7d06bc55849 languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001587": - version: 1.0.30001597 - resolution: "caniuse-lite@npm:1.0.30001597" - checksum: 10c0/32dc315ffafacc8167286c95b05f41b3ce2818314ea913ffed6ceb7b58c64c38365ec250114d1ecceac34f1c77e5af089479e54b160c4a89b88fd25a98851b78 - languageName: node - linkType: hard - "case-sensitive-paths-webpack-plugin@npm:^2.4.0": version: 2.4.0 resolution: "case-sensitive-paths-webpack-plugin@npm:2.4.0" @@ -12836,7 +12686,7 @@ __metadata: languageName: node linkType: hard -"css-loader@npm:6.10.0": +"css-loader@npm:6.10.0, css-loader@npm:^6.7.1, css-loader@npm:^6.7.3": version: 6.10.0 resolution: "css-loader@npm:6.10.0" dependencies: @@ -12860,24 +12710,6 @@ __metadata: languageName: node linkType: hard -"css-loader@npm:^6.7.1, css-loader@npm:^6.7.3": - version: 6.8.1 - resolution: "css-loader@npm:6.8.1" - dependencies: - icss-utils: "npm:^5.1.0" - postcss: "npm:^8.4.21" - postcss-modules-extract-imports: "npm:^3.0.0" - postcss-modules-local-by-default: "npm:^4.0.3" - postcss-modules-scope: "npm:^3.0.0" - postcss-modules-values: "npm:^4.0.0" - postcss-value-parser: "npm:^4.2.0" - semver: "npm:^7.3.8" - peerDependencies: - webpack: ^5.0.0 - checksum: 10c0/a6e23de4ec1d2832f10b8ca3cfec6b6097a97ca3c73f64338ae5cd110ac270f1b218ff0273d39f677a7a561f1a9d9b0d332274664d0991bcfafaae162c2669c4 - languageName: node - linkType: hard - "css-select@npm:^4.1.3": version: 4.3.0 resolution: "css-select@npm:4.3.0" @@ -13828,13 +13660,6 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.601": - version: 1.4.601 - resolution: "electron-to-chromium@npm:1.4.601" - checksum: 10c0/345226e9edff5b72bd431b5bec1eaabc3c85e430fa0171586b539c64e5bde7c161cad6387e657ab8e0f197a894c1679f19c60f687baad12118a06e1db543cf95 - languageName: node - linkType: hard - "electron-to-chromium@npm:^1.4.668": version: 1.4.699 resolution: "electron-to-chromium@npm:1.4.699" @@ -14891,7 +14716,7 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^8.0.0": +"eslint@npm:^8.0.0, eslint@npm:^8.56.0": version: 8.57.0 resolution: "eslint@npm:8.57.0" dependencies: @@ -14939,54 +14764,6 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^8.56.0": - version: 8.56.0 - resolution: "eslint@npm:8.56.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.56.0" - "@humanwhocodes/config-array": "npm:^0.11.13" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@nodelib/fs.walk": "npm:^1.2.8" - "@ungap/structured-clone": "npm:^1.2.0" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.2" - debug: "npm:^4.3.2" - doctrine: "npm:^3.0.0" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^7.2.2" - eslint-visitor-keys: "npm:^3.4.3" - espree: "npm:^9.6.1" - esquery: "npm:^1.4.2" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^6.0.1" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - globals: "npm:^13.19.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - is-path-inside: "npm:^3.0.3" - js-yaml: "npm:^4.1.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - levn: "npm:^0.4.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.3" - strip-ansi: "npm:^6.0.1" - text-table: "npm:^0.2.0" - bin: - eslint: bin/eslint.js - checksum: 10c0/2be598f7da1339d045ad933ffd3d4742bee610515cd2b0d9a2b8b729395a01d4e913552fff555b559fccaefd89d7b37632825789d1b06470608737ae69ab43fb - languageName: node - linkType: hard - "esm-env@npm:^1.0.0": version: 1.0.0 resolution: "esm-env@npm:1.0.0" @@ -17456,7 +17233,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:7.0.4": +"https-proxy-agent@npm:7.0.4, https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.2": version: 7.0.4 resolution: "https-proxy-agent@npm:7.0.4" dependencies: @@ -17476,16 +17253,6 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.2": - version: 7.0.2 - resolution: "https-proxy-agent@npm:7.0.2" - dependencies: - agent-base: "npm:^7.0.2" - debug: "npm:4" - checksum: 10c0/7735eb90073db087e7e79312e3d97c8c04baf7ea7ca7b013382b6a45abbaa61b281041a98f4e13c8c80d88f843785bcc84ba189165b4b4087b1e3496ba656d77 - languageName: node - linkType: hard - "human-signals@npm:^2.1.0": version: 2.1.0 resolution: "human-signals@npm:2.1.0" @@ -17727,7 +17494,7 @@ __metadata: languageName: node linkType: hard -"ini@npm:4.1.2": +"ini@npm:4.1.2, ini@npm:^4.1.0": version: 4.1.2 resolution: "ini@npm:4.1.2" checksum: 10c0/e0ffe587038e26ca1debfece6f5e52fd17f4e65be59bb481bb24b89cd2be31a71f619465918da215916b4deba7d1134c228c58fe5e0db66a71a472dee9b8f99c @@ -17741,13 +17508,6 @@ __metadata: languageName: node linkType: hard -"ini@npm:^4.1.0": - version: 4.1.1 - resolution: "ini@npm:4.1.1" - checksum: 10c0/7fddc8dfd3e63567d4fdd5d999d1bf8a8487f1479d0b34a1d01f28d391a9228d261e19abc38e1a6a1ceb3400c727204fce05725d5eb598dfcf2077a1e3afe211 - languageName: node - linkType: hard - "inline-style-parser@npm:0.1.1": version: 0.1.1 resolution: "inline-style-parser@npm:0.1.1" @@ -19810,7 +19570,7 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:0.30.8": +"magic-string@npm:0.30.8, magic-string@npm:^0.30.0, magic-string@npm:^0.30.4, magic-string@npm:^0.30.5": version: 0.30.8 resolution: "magic-string@npm:0.30.8" dependencies: @@ -19837,15 +19597,6 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.0, magic-string@npm:^0.30.4, magic-string@npm:^0.30.5": - version: 0.30.5 - resolution: "magic-string@npm:0.30.5" - dependencies: - "@jridgewell/sourcemap-codec": "npm:^1.4.15" - checksum: 10c0/38ac220ca7539e96da7ea2f38d85796bdf5c69b6bcae728c4bc2565084e6dc326b9174ee9770bea345cf6c9b3a24041b767167874fab5beca874d2356a9d1520 - languageName: node - linkType: hard - "magicast@npm:^0.3.3": version: 0.3.3 resolution: "magicast@npm:0.3.3" @@ -23216,7 +22967,7 @@ __metadata: languageName: node linkType: hard -"pirates@npm:^4.0.5": +"pirates@npm:^4.0.6": version: 4.0.6 resolution: "pirates@npm:4.0.6" checksum: 10c0/00d5fa51f8dded94d7429700fb91a0c1ead00ae2c7fd27089f0c5b63e6eca36197fe46384631872690a66f390c5e27198e99006ab77ae472692ab9c2ca903f36 @@ -23434,19 +23185,6 @@ __metadata: languageName: node linkType: hard -"postcss-modules-local-by-default@npm:^4.0.3": - version: 4.0.3 - resolution: "postcss-modules-local-by-default@npm:4.0.3" - dependencies: - icss-utils: "npm:^5.0.0" - postcss-selector-parser: "npm:^6.0.2" - postcss-value-parser: "npm:^4.1.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10c0/be49b86efbfb921f42287e227584aac91af9826fc1083db04958ae283dfe215ca539421bfba71f9da0f0b10651f28e95a64b5faca7166f578a1933b8646051f7 - languageName: node - linkType: hard - "postcss-modules-local-by-default@npm:^4.0.4": version: 4.0.4 resolution: "postcss-modules-local-by-default@npm:4.0.4" @@ -23470,17 +23208,6 @@ __metadata: languageName: node linkType: hard -"postcss-modules-scope@npm:^3.0.0": - version: 3.0.0 - resolution: "postcss-modules-scope@npm:3.0.0" - dependencies: - postcss-selector-parser: "npm:^6.0.4" - peerDependencies: - postcss: ^8.1.0 - checksum: 10c0/60af503910363689568c2c3701cb019a61b58b3d739391145185eec211bea5d50ccb6ecbe6955b39d856088072fd50ea002e40a52b50e33b181ff5c41da0308a - languageName: node - linkType: hard - "postcss-modules-scope@npm:^3.1.1": version: 3.1.1 resolution: "postcss-modules-scope@npm:3.1.1" @@ -23590,17 +23317,6 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.21": - version: 8.4.32 - resolution: "postcss@npm:8.4.32" - dependencies: - nanoid: "npm:^3.3.7" - picocolors: "npm:^1.0.0" - source-map-js: "npm:^1.0.2" - checksum: 10c0/39308a9195fa34d4dbdd7b58a896cff0c7809f84f7a4ac1b95b68ca86c9138a395addff33075668ed3983d41b90aac05754c445237a9365eb1c3a5602ebd03ad - languageName: node - linkType: hard - "preact@npm:^10.5.13": version: 10.19.3 resolution: "preact@npm:10.19.3" @@ -26030,7 +25746,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.6.0, semver@npm:^7.6.0": +"semver@npm:7.6.0, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.2.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": version: 7.6.0 resolution: "semver@npm:7.6.0" dependencies: @@ -26050,17 +25766,6 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.2.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4": - version: 7.5.4 - resolution: "semver@npm:7.5.4" - dependencies: - lru-cache: "npm:^6.0.0" - bin: - semver: bin/semver.js - checksum: 10c0/5160b06975a38b11c1ab55950cb5b8a23db78df88275d3d8a42ccf1f29e55112ac995b3a26a522c36e3b5f76b0445f1eef70d696b8c7862a2b4303d7b0e7609e - languageName: node - linkType: hard - "send@npm:0.18.0": version: 0.18.0 resolution: "send@npm:0.18.0" @@ -27586,29 +27291,7 @@ __metadata: languageName: node linkType: hard -"terser-webpack-plugin@npm:*, terser-webpack-plugin@npm:^5.3.1, terser-webpack-plugin@npm:^5.3.7": - version: 5.3.9 - resolution: "terser-webpack-plugin@npm:5.3.9" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.17" - jest-worker: "npm:^27.4.5" - schema-utils: "npm:^3.1.1" - serialize-javascript: "npm:^6.0.1" - terser: "npm:^5.16.8" - peerDependencies: - webpack: ^5.1.0 - peerDependenciesMeta: - "@swc/core": - optional: true - esbuild: - optional: true - uglify-js: - optional: true - checksum: 10c0/8a757106101ea1504e5dc549c722506506e7d3f0d38e72d6c8108ad814c994ca0d67ac5d0825ba59704a4b2b04548201b2137f198bfce897b09fe9e36727a1e9 - languageName: node - linkType: hard - -"terser-webpack-plugin@npm:^5.3.10": +"terser-webpack-plugin@npm:*, terser-webpack-plugin@npm:^5.3.1, terser-webpack-plugin@npm:^5.3.10": version: 5.3.10 resolution: "terser-webpack-plugin@npm:5.3.10" dependencies: @@ -27630,7 +27313,7 @@ __metadata: languageName: node linkType: hard -"terser@npm:5.29.1, terser@npm:^5.26.0": +"terser@npm:5.29.1, terser@npm:^5.10.0, terser@npm:^5.26.0": version: 5.29.1 resolution: "terser@npm:5.29.1" dependencies: @@ -27644,20 +27327,6 @@ __metadata: languageName: node linkType: hard -"terser@npm:^5.10.0, terser@npm:^5.16.8": - version: 5.26.0 - resolution: "terser@npm:5.26.0" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: 10c0/3906289c6bacd75804a47a583cdafefbd76c5edb39435369755c7b1592e57586fb2f4bddf6eb37a807d6e782171dbf0aa7bbdc80fd5b77b2f2b62196cac49b62 - languageName: node - linkType: hard - "test-exclude@npm:^6.0.0": version: 6.0.0 resolution: "test-exclude@npm:6.0.0" @@ -28285,23 +27954,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.0.3, typescript@npm:^5.3.2, typescript@npm:~5.3.2": - version: 5.3.3 - resolution: "typescript@npm:5.3.3" +"typescript@npm:^5.0.3, typescript@npm:^5.3.2, typescript@npm:^5.4.3": + version: 5.4.3 + resolution: "typescript@npm:5.4.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f + checksum: 10c0/22443a8760c3668e256c0b34b6b45c359ef6cecc10c42558806177a7d500ab1a7d7aac1f976d712e26989ddf6731d2fbdd3212b7c73290a45127c1c43ba2005a languageName: node linkType: hard -"typescript@npm:^5.4.3": - version: 5.4.3 - resolution: "typescript@npm:5.4.3" +"typescript@npm:~5.3.2": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/22443a8760c3668e256c0b34b6b45c359ef6cecc10c42558806177a7d500ab1a7d7aac1f976d712e26989ddf6731d2fbdd3212b7c73290a45127c1c43ba2005a + checksum: 10c0/e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f languageName: node linkType: hard @@ -28315,23 +27984,23 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.0.3#optional!builtin, typescript@patch:typescript@npm%3A^5.3.2#optional!builtin, typescript@patch:typescript@npm%3A~5.3.2#optional!builtin": - version: 5.3.3 - resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" +"typescript@patch:typescript@npm%3A^5.0.3#optional!builtin, typescript@patch:typescript@npm%3A^5.3.2#optional!builtin, typescript@patch:typescript@npm%3A^5.4.3#optional!builtin": + version: 5.4.3 + resolution: "typescript@patch:typescript@npm%3A5.4.3#optional!builtin::version=5.4.3&hash=5adc0c" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500 + checksum: 10c0/6e51f8b7e6ec55b897b9e56b67e864fe8f44e30f4a14357aad5dc0f7432db2f01efc0522df0b6c36d361c51f2dc3dcac5c832efd96a404cfabf884e915d38828 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.4.3#optional!builtin": - version: 5.4.3 - resolution: "typescript@patch:typescript@npm%3A5.4.3#optional!builtin::version=5.4.3&hash=5adc0c" +"typescript@patch:typescript@npm%3A~5.3.2#optional!builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/6e51f8b7e6ec55b897b9e56b67e864fe8f44e30f4a14357aad5dc0f7432db2f01efc0522df0b6c36d361c51f2dc3dcac5c832efd96a404cfabf884e915d38828 + checksum: 10c0/1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500 languageName: node linkType: hard @@ -29217,7 +28886,7 @@ __metadata: languageName: node linkType: hard -"vite@npm:5.1.5": +"vite@npm:5.1.5, vite@npm:^5.0.0": version: 5.1.5 resolution: "vite@npm:5.1.5" dependencies: @@ -29297,46 +28966,6 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.0.0": - version: 5.0.10 - resolution: "vite@npm:5.0.10" - dependencies: - esbuild: "npm:^0.19.3" - fsevents: "npm:~2.3.3" - postcss: "npm:^8.4.32" - rollup: "npm:^4.2.0" - peerDependencies: - "@types/node": ^18.0.0 || >=20.0.0 - less: "*" - lightningcss: ^1.21.0 - sass: "*" - stylus: "*" - sugarss: "*" - terser: ^5.4.0 - dependenciesMeta: - fsevents: - optional: true - peerDependenciesMeta: - "@types/node": - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - bin: - vite: bin/vite.js - checksum: 10c0/d666b2760d2a7ea1d0d35f67c042053e562144f80554be4e4dc58e607fd5f62193cd203d73ab2e315df66830d8b9d9a2e3509d0208bdef1b2e92e0a5c364df84 - languageName: node - linkType: hard - "vitefu@npm:^0.2.5": version: 0.2.5 resolution: "vitefu@npm:0.2.5" @@ -29908,44 +29537,7 @@ __metadata: languageName: node linkType: hard -"webpack@npm:5, webpack@npm:^5, webpack@npm:^5.65.0": - version: 5.89.0 - resolution: "webpack@npm:5.89.0" - dependencies: - "@types/eslint-scope": "npm:^3.7.3" - "@types/estree": "npm:^1.0.0" - "@webassemblyjs/ast": "npm:^1.11.5" - "@webassemblyjs/wasm-edit": "npm:^1.11.5" - "@webassemblyjs/wasm-parser": "npm:^1.11.5" - acorn: "npm:^8.7.1" - acorn-import-assertions: "npm:^1.9.0" - browserslist: "npm:^4.14.5" - chrome-trace-event: "npm:^1.0.2" - enhanced-resolve: "npm:^5.15.0" - es-module-lexer: "npm:^1.2.1" - eslint-scope: "npm:5.1.1" - events: "npm:^3.2.0" - glob-to-regexp: "npm:^0.4.1" - graceful-fs: "npm:^4.2.9" - json-parse-even-better-errors: "npm:^2.3.1" - loader-runner: "npm:^4.2.0" - mime-types: "npm:^2.1.27" - neo-async: "npm:^2.6.2" - schema-utils: "npm:^3.2.0" - tapable: "npm:^2.1.1" - terser-webpack-plugin: "npm:^5.3.7" - watchpack: "npm:^2.4.0" - webpack-sources: "npm:^3.2.3" - peerDependenciesMeta: - webpack-cli: - optional: true - bin: - webpack: bin/webpack.js - checksum: 10c0/2562bf48788d651634fb7db6a5378c2fe3fce7f66831af38468da3944bd98756d68efea94a6909593993fb57b2d14cf802cbef2c83c6ef0047f7f606d59bec50 - languageName: node - linkType: hard - -"webpack@npm:5.90.3": +"webpack@npm:5, webpack@npm:5.90.3, webpack@npm:^5, webpack@npm:^5.65.0": version: 5.90.3 resolution: "webpack@npm:5.90.3" dependencies: @@ -30288,22 +29880,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.13.0, ws@npm:^8.14.2, ws@npm:^8.2.3": - version: 8.15.1 - resolution: "ws@npm:8.15.1" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10c0/9964360dd5ab35c7376bd7c4295a3c8bd44ea0838c9413742548a6fb3ec371fc6c18552d5b8e76bdc21536db1909765612815bae072674b5ec69971605395a96 - languageName: node - linkType: hard - -"ws@npm:^8.16.0": +"ws@npm:^8.13.0, ws@npm:^8.14.2, ws@npm:^8.16.0, ws@npm:^8.2.3": version: 8.16.0 resolution: "ws@npm:8.16.0" peerDependencies: From 1a4bd14c8500b5aabca419920ef9ebb57e25ed3a Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 7 May 2024 17:32:40 +0800 Subject: [PATCH 095/117] Update csf-tools babel deps --- code/lib/csf-tools/package.json | 8 ++++---- code/yarn.lock | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index e640c8f69f72..aa898d54fc4a 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -42,10 +42,10 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@babel/generator": "^7.23.0", - "@babel/parser": "^7.23.0", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0", + "@babel/generator": "^7.24.5", + "@babel/parser": "^7.24.5", + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5", "@storybook/csf": "^0.1.7", "@storybook/types": "workspace:*", "fs-extra": "^11.1.0", diff --git a/code/yarn.lock b/code/yarn.lock index 301f30f4b09a..e8117c89983c 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -470,7 +470,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.23.0, @babel/generator@npm:^7.24.5": +"@babel/generator@npm:^7.24.5": version: 7.24.5 resolution: "@babel/generator@npm:7.24.5" dependencies: @@ -2279,7 +2279,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.23.2": +"@babel/traverse@npm:^7.24.5": version: 7.24.5 resolution: "@babel/traverse@npm:7.24.5" dependencies: @@ -6108,10 +6108,10 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/csf-tools@workspace:lib/csf-tools" dependencies: - "@babel/generator": "npm:^7.23.0" - "@babel/parser": "npm:^7.23.0" - "@babel/traverse": "npm:^7.23.2" - "@babel/types": "npm:^7.23.0" + "@babel/generator": "npm:^7.24.5" + "@babel/parser": "npm:^7.24.5" + "@babel/traverse": "npm:^7.24.5" + "@babel/types": "npm:^7.24.5" "@storybook/csf": "npm:^0.1.7" "@storybook/types": "workspace:*" "@types/fs-extra": "npm:^11.0.1" From 8b35e06f3b0fc850f45b517c33bced6f3e0df9d6 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 7 May 2024 17:47:38 +0800 Subject: [PATCH 096/117] Another attempt to fix yarn.lock --- code/lib/csf-tools/package.json | 8 ++-- code/yarn.lock | 76 +++------------------------------ 2 files changed, 9 insertions(+), 75 deletions(-) diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index aa898d54fc4a..0526a70658c3 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -42,10 +42,10 @@ "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@babel/generator": "^7.24.5", - "@babel/parser": "^7.24.5", - "@babel/traverse": "^7.24.5", - "@babel/types": "^7.24.5", + "@babel/generator": "^7.24.4", + "@babel/parser": "^7.24.4", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0", "@storybook/csf": "^0.1.7", "@storybook/types": "workspace:*", "fs-extra": "^11.1.0", diff --git a/code/yarn.lock b/code/yarn.lock index e8117c89983c..5ac9e46eac23 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -470,18 +470,6 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/generator@npm:7.24.5" - dependencies: - "@babel/types": "npm:^7.24.5" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^2.5.1" - checksum: 10c0/0d64f880150e7dfb92ceff2b4ac865f36aa1e295120920246492ffd0146562dabf79ba8699af1c8833f8a7954818d4d146b7b02f808df4d6024fb99f98b2f78d - languageName: node - linkType: hard - "@babel/helper-annotate-as-pure@npm:7.22.5, @babel/helper-annotate-as-pure@npm:^7.18.6, @babel/helper-annotate-as-pure@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" @@ -703,16 +691,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/helper-split-export-declaration@npm:7.24.5" - dependencies: - "@babel/types": "npm:^7.24.5" - checksum: 10c0/d7a812d67d031a348f3fb0e6263ce2dbe6038f81536ba7fb16db385383bcd6542b71833194303bf6d3d0e4f7b6b584c9c8fae8772122e2ce68fc9bdf07f4135d - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.23.4, @babel/helper-string-parser@npm:^7.24.1": +"@babel/helper-string-parser@npm:^7.23.4": version: 7.24.1 resolution: "@babel/helper-string-parser@npm:7.24.1" checksum: 10c0/2f9bfcf8d2f9f083785df0501dbab92770111ece2f90d120352fda6dd2a7d47db11b807d111e6f32aa1ba6d763fe2dc6603d153068d672a5d0ad33ca802632b2 @@ -726,13 +705,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/helper-validator-identifier@npm:7.24.5" - checksum: 10c0/05f957229d89ce95a137d04e27f7d0680d84ae48b6ad830e399db0779341f7d30290f863a93351b4b3bde2166737f73a286ea42856bb07c8ddaa95600d38645c - languageName: node - linkType: hard - "@babel/helper-validator-option@npm:^7.23.5": version: 7.23.5 resolution: "@babel/helper-validator-option@npm:7.23.5" @@ -783,15 +755,6 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/parser@npm:7.24.5" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/8333a6ad5328bad34fa0e12bcee147c3345ea9a438c0909e7c68c6cfbea43c464834ffd7eabd1cbc1c62df0a558e22ffade9f5b29440833ba7b33d96a71f88c0 - languageName: node - linkType: hard - "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.24.4": version: 7.24.4 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.24.4" @@ -2279,24 +2242,6 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/traverse@npm:7.24.5" - dependencies: - "@babel/code-frame": "npm:^7.24.2" - "@babel/generator": "npm:^7.24.5" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.24.5" - "@babel/parser": "npm:^7.24.5" - "@babel/types": "npm:^7.24.5" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/3f22534bc2b2ed9208e55ef48af3b32939032b23cb9dc4037447cb108640df70bbb0b9fea86e9c58648949fdc2cb14e89aa79ffa3c62a5dd43459a52fe8c01d1 - languageName: node - linkType: hard - "@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.18.9, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.4, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.24.0, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.2, @babel/types@npm:^7.8.3, @babel/types@npm:^7.9.6": version: 7.24.0 resolution: "@babel/types@npm:7.24.0" @@ -2308,17 +2253,6 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/types@npm:7.24.5" - dependencies: - "@babel/helper-string-parser": "npm:^7.24.1" - "@babel/helper-validator-identifier": "npm:^7.24.5" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/e1284eb046c5e0451b80220d1200e2327e0a8544a2fe45bb62c952e5fdef7099c603d2336b17b6eac3cc046b7a69bfbce67fe56e1c0ea48cd37c65cb88638f2a - languageName: node - linkType: hard - "@base2/pretty-print-object@npm:1.0.1": version: 1.0.1 resolution: "@base2/pretty-print-object@npm:1.0.1" @@ -6108,10 +6042,10 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/csf-tools@workspace:lib/csf-tools" dependencies: - "@babel/generator": "npm:^7.24.5" - "@babel/parser": "npm:^7.24.5" - "@babel/traverse": "npm:^7.24.5" - "@babel/types": "npm:^7.24.5" + "@babel/generator": "npm:^7.24.4" + "@babel/parser": "npm:^7.24.4" + "@babel/traverse": "npm:^7.24.1" + "@babel/types": "npm:^7.24.0" "@storybook/csf": "npm:^0.1.7" "@storybook/types": "workspace:*" "@types/fs-extra": "npm:^11.0.1" From 15d7ef9149d1d472479d2aeffa5b2e1e036565e1 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 7 May 2024 18:33:55 +0800 Subject: [PATCH 097/117] Continue to show autodocs even when primary story is !dev --- code/lib/core-server/src/presets/common-manager.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/lib/core-server/src/presets/common-manager.ts b/code/lib/core-server/src/presets/common-manager.ts index c3dfbd8d6fb8..bbc5432eeb31 100644 --- a/code/lib/core-server/src/presets/common-manager.ts +++ b/code/lib/core-server/src/presets/common-manager.ts @@ -19,6 +19,10 @@ addons.register(STATIC_FILTER, (api) => { api.experimental_setFilter(STATIC_FILTER, (item) => { const tags = item.tags ?? []; - return tags.includes('dev') && tags.filter((tag) => excludeTags[tag]).length === 0; + return ( + // we can filter out the primary story, but we still want to show autodocs + (tags.includes('dev') || item.type === 'docs') && + tags.filter((tag) => excludeTags[tag]).length === 0 + ); }); }); From 83639e0f72a20c10015817f3ac2e77c1ab5102ea Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 7 May 2024 20:28:32 +0800 Subject: [PATCH 098/117] Add e2e tests for new tags behavior --- code/e2e-tests/tags.spec.ts | 92 +++++++++++++------ .../template/stories/tags-add.stories.ts | 39 ++++++++ ...tags.stories.ts => tags-config.stories.ts} | 2 +- .../template/stories/tags-remove.stories.ts | 39 ++++++++ .../template/stories/test-only-tag.stories.ts | 11 --- 5 files changed, 145 insertions(+), 38 deletions(-) create mode 100644 code/lib/preview-api/template/stories/tags-add.stories.ts rename code/lib/preview-api/template/stories/{tags.stories.ts => tags-config.stories.ts} (95%) create mode 100644 code/lib/preview-api/template/stories/tags-remove.stories.ts delete mode 100644 code/lib/preview-api/template/stories/test-only-tag.stories.ts diff --git a/code/e2e-tests/tags.spec.ts b/code/e2e-tests/tags.spec.ts index 8302a9a6a338..078c0fd360ff 100644 --- a/code/e2e-tests/tags.spec.ts +++ b/code/e2e-tests/tags.spec.ts @@ -9,56 +9,96 @@ test.describe('tags', () => { await new SbPage(page).waitUntilLoaded(); }); - test('@flaky: should correctly filter dev-only, docs-only, test-only stories', async ({ - page, - }) => { + test('should correctly filter dev-only, docs-only, test-only stories', async ({ page }) => { const sbPage = new SbPage(page); - await sbPage.navigateToStory('lib/preview-api/tags', 'docs'); + await sbPage.navigateToStory('lib/preview-api/tags-config', 'docs'); // Sidebar should include dev-only and exclude docs-only and test-only - const devOnlyEntry = await page.locator('#lib-preview-api-tags--dev-only').all(); + const devOnlyEntry = await page.locator('#lib-preview-api-tags-config--dev-only').all(); expect(devOnlyEntry.length).toBe(1); - const docsOnlyEntry = await page.locator('#lib-preview-api-tags--docs-only').all(); + const docsOnlyEntry = await page.locator('#lib-preview-api-tags-config--docs-only').all(); expect(docsOnlyEntry.length).toBe(0); - const testOnlyEntry = await page.locator('#lib-preview-api-tags--test-only').all(); + const testOnlyEntry = await page.locator('#lib-preview-api-tags-config--test-only').all(); expect(testOnlyEntry.length).toBe(0); // Autodocs should include docs-only and exclude dev-only and test-only const root = sbPage.previewRoot(); - const devOnlyAnchor = await root.locator('#anchor--lib-preview-api-tags--dev-only').all(); + const devOnlyAnchor = await root + .locator('#anchor--lib-preview-api-tags-config--dev-only') + .all(); expect(devOnlyAnchor.length).toBe(0); - const docsOnlyAnchor = await root.locator('#anchor--lib-preview-api-tags--docs-only').all(); + const docsOnlyAnchor = await root + .locator('#anchor--lib-preview-api-tags-config--docs-only') + .all(); expect(docsOnlyAnchor.length).toBe(1); - const testOnlyAnchor = await root.locator('#anchor--lib-preview-api-tags--test-only').all(); + const testOnlyAnchor = await root + .locator('#anchor--lib-preview-api-tags-config--test-only') + .all(); expect(testOnlyAnchor.length).toBe(0); }); - test('should correctly filter out test-only autodocs pages', async ({ page }) => { + test('should correctly add dev, autodocs, test stories', async ({ page }) => { const sbPage = new SbPage(page); - await sbPage.selectToolbar('#lib-preview-api'); + await sbPage.navigateToStory('lib/preview-api/tags-add', 'docs'); - // Sidebar should exclude test-only stories and their docs - const componentEntry = await page.locator('#lib-preview-api-test-only-tag').all(); - expect(componentEntry.length).toBe(0); + // Sidebar should include dev and exclude inheritance, autodocs, test + const devEntry = await page.locator('#lib-preview-api-tags-add--dev').all(); + expect(devEntry.length).toBe(1); - // Even though test-only autodocs not sidebar, it is still in the preview - // Even though the test-only story is filtered out of the stories, it is still the primary story (should it be?) - await sbPage.deepLinkToStory(storybookUrl, 'lib/preview-api/test-only-tag', 'docs'); - await sbPage.waitUntilLoaded(); - const docsButton = await sbPage.previewRoot().locator('button', { hasText: 'Button' }); - await expect(docsButton).toBeVisible(); + const autodocsEntry = await page.locator('#lib-preview-api-tags-add--autodocs').all(); + expect(autodocsEntry.length).toBe(0); - // Even though test-only story not sidebar, it is still in the preview - await sbPage.deepLinkToStory(storybookUrl, 'lib/preview-api/test-only-tag', 'default'); - await sbPage.waitUntilLoaded(); - const storyButton = await sbPage.previewRoot().locator('button', { hasText: 'Button' }); - await expect(storyButton).toBeVisible(); + const testOnlyEntry = await page.locator('#lib-preview-api-tags-add--test').all(); + expect(testOnlyEntry.length).toBe(0); + + // Autodocs should include autodocs and exclude dev, test + const root = sbPage.previewRoot(); + + const devAnchor = await root.locator('#anchor--lib-preview-api-tags-add--dev').all(); + expect(devAnchor.length).toBe(0); + + // NOTE: shows as primary story and also in stories + const autodocsAnchor = await root.locator('#anchor--lib-preview-api-tags-add--autodocs').all(); + expect(autodocsAnchor.length).toBe(2); + + const testAnchor = await root.locator('#anchor--lib-preview-api-tags-add--test').all(); + expect(testAnchor.length).toBe(0); + }); + + test('should correctly remove dev, autodocs, test stories', async ({ page }) => { + const sbPage = new SbPage(page); + + await sbPage.navigateToStory('lib/preview-api/tags-remove', 'docs'); + + // Sidebar should include inheritance, no-autodocs, no-test. and exclude no-dev + const noDevEntry = await page.locator('#lib-preview-api-tags-remove--no-dev').all(); + expect(noDevEntry.length).toBe(0); + + const noAutodocsEntry = await page.locator('#lib-preview-api-tags-remove--no-autodocs').all(); + expect(noAutodocsEntry.length).toBe(1); + + const noTestEntry = await page.locator('#lib-preview-api-tags-remove--no-test').all(); + expect(noTestEntry.length).toBe(1); + + // Autodocs should include inheritance, no-dev, no-test. and exclude no-autodocs + const root = sbPage.previewRoot(); + + const noDevAnchor = await root.locator('#anchor--lib-preview-api-tags-remove--no-dev').all(); + expect(noDevAnchor.length).toBe(1); + + const noAutodocsAnchor = await root + .locator('#anchor--lib-preview-api-tags-remove--no-autodocs') + .all(); + expect(noAutodocsAnchor.length).toBe(0); + + const noTestAnchor = await root.locator('#anchor--lib-preview-api-tags-remove--no-test').all(); + expect(noTestAnchor.length).toBe(1); }); }); diff --git a/code/lib/preview-api/template/stories/tags-add.stories.ts b/code/lib/preview-api/template/stories/tags-add.stories.ts new file mode 100644 index 000000000000..6302085e5c19 --- /dev/null +++ b/code/lib/preview-api/template/stories/tags-add.stories.ts @@ -0,0 +1,39 @@ +import { global as globalThis } from '@storybook/global'; +import type { PartialStoryFn, PlayFunctionContext, StoryContext } from '@storybook/types'; +import { within, expect } from '@storybook/test'; + +export default { + component: globalThis.Components.Pre, + tags: ['!dev', '!autodocs', '!test'], + decorators: [ + (storyFn: PartialStoryFn, context: StoryContext) => { + return storyFn({ + args: { object: { tags: context.tags } }, + }); + }, + ], + parameters: { chromatic: { disable: true } }, +}; + +export const Inheritance = { + tags: ['story-one'], + play: async ({ canvasElement }: PlayFunctionContext) => { + const canvas = within(canvasElement); + await expect(JSON.parse(canvas.getByTestId('pre').innerText)).toEqual({ + tags: ['story-one'], + }); + }, + parameters: { chromatic: { disable: false } }, +}; + +export const Dev = { + tags: ['dev'], +}; + +export const Autodocs = { + tags: ['autodocs'], +}; + +export const Test = { + tags: ['test'], +}; diff --git a/code/lib/preview-api/template/stories/tags.stories.ts b/code/lib/preview-api/template/stories/tags-config.stories.ts similarity index 95% rename from code/lib/preview-api/template/stories/tags.stories.ts rename to code/lib/preview-api/template/stories/tags-config.stories.ts index 64e715b1e0f7..a73a08954784 100644 --- a/code/lib/preview-api/template/stories/tags.stories.ts +++ b/code/lib/preview-api/template/stories/tags-config.stories.ts @@ -4,7 +4,7 @@ import { within, expect } from '@storybook/test'; export default { component: globalThis.Components.Pre, - tags: ['component-one', 'component-two', '!autodocs'], + tags: ['component-one', 'component-two', 'autodocs'], decorators: [ (storyFn: PartialStoryFn, context: StoryContext) => { return storyFn({ diff --git a/code/lib/preview-api/template/stories/tags-remove.stories.ts b/code/lib/preview-api/template/stories/tags-remove.stories.ts new file mode 100644 index 000000000000..3d05b98d2dbf --- /dev/null +++ b/code/lib/preview-api/template/stories/tags-remove.stories.ts @@ -0,0 +1,39 @@ +import { global as globalThis } from '@storybook/global'; +import type { PartialStoryFn, PlayFunctionContext, StoryContext } from '@storybook/types'; +import { within, expect } from '@storybook/test'; + +export default { + component: globalThis.Components.Pre, + tags: ['component-one', 'autodocs'], + decorators: [ + (storyFn: PartialStoryFn, context: StoryContext) => { + return storyFn({ + args: { object: { tags: context.tags } }, + }); + }, + ], + parameters: { chromatic: { disable: true } }, +}; + +export const Inheritance = { + tags: ['story-one'], + play: async ({ canvasElement }: PlayFunctionContext) => { + const canvas = within(canvasElement); + await expect(JSON.parse(canvas.getByTestId('pre').innerText)).toEqual({ + tags: ['dev', 'test', 'component-one', 'story-one', 'autodocs'], + }); + }, + parameters: { chromatic: { disable: false } }, +}; + +export const NoDev = { + tags: ['!dev'], +}; + +export const NoAutodocs = { + tags: ['!autodocs'], +}; + +export const NoTest = { + tags: ['!test'], +}; diff --git a/code/lib/preview-api/template/stories/test-only-tag.stories.ts b/code/lib/preview-api/template/stories/test-only-tag.stories.ts deleted file mode 100644 index 138f221d3ff7..000000000000 --- a/code/lib/preview-api/template/stories/test-only-tag.stories.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { global as globalThis } from '@storybook/global'; - -export default { - component: globalThis.Components.Button, - tags: ['autodocs', 'test-only'], - parameters: { chromatic: { disable: true } }, -}; - -export const Default = { - args: { label: 'Button' }, -}; From a1ca72d8362bb9e53d9190e5b713fe701bec1f4e Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Tue, 7 May 2024 14:36:52 +0200 Subject: [PATCH 099/117] Next.js: Implement next redirect and the RedirectBoundary --- code/frameworks/nextjs/.eslintrc.json | 6 + code/frameworks/nextjs/package.json | 12 + .../src/compatibility/compatibility-map.ts | 32 + .../redirect-status-code.compat.ts | 6 + .../src/compatibility/segment.compat.ts | 8 + .../nextjs/src/export-mocks/webpack.ts | 43 +- code/frameworks/nextjs/src/preset.ts | 2 + .../nextjs/yarn.lock | 1367 ++--------------- 8 files changed, 254 insertions(+), 1222 deletions(-) create mode 100644 code/frameworks/nextjs/src/compatibility/compatibility-map.ts create mode 100644 code/frameworks/nextjs/src/compatibility/redirect-status-code.compat.ts create mode 100644 code/frameworks/nextjs/src/compatibility/segment.compat.ts diff --git a/code/frameworks/nextjs/.eslintrc.json b/code/frameworks/nextjs/.eslintrc.json index 7b43755b37ac..d76f64f6803d 100644 --- a/code/frameworks/nextjs/.eslintrc.json +++ b/code/frameworks/nextjs/.eslintrc.json @@ -12,6 +12,12 @@ "react/no-unknown-property": "off", "jsx-a11y/anchor-is-valid": "off" } + }, + { + "files": ["**/*.compat.@(tsx|ts)"], + "rules": { + "local-rules/no-uncategorized-errors": "off" + } } ] } diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index b86f8cb49e90..af17f00668c2 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -47,6 +47,16 @@ "require": "./dist/next-image-loader-stub.js", "import": "./dist/next-image-loader-stub.mjs" }, + "./dist/compatibility/segment.compat": { + "types": "./dist/compatibility/segment.compat.d.ts", + "require": "./dist/compatibility/segment.compat.js", + "import": "./dist/compatibility/segment.compat.mjs" + }, + "./dist/compatibility/redirect-status-code.compat": { + "types": "./dist/compatibility/redirect-status-code.compat.d.ts", + "require": "./dist/compatibility/redirect-status-code.compat.js", + "import": "./dist/compatibility/redirect-status-code.compat.mjs" + }, "./export-mocks": { "types": "./dist/export-mocks/index.d.ts", "require": "./dist/export-mocks/index.js", @@ -205,6 +215,8 @@ "./src/export-mocks/headers/index.ts", "./src/export-mocks/router/index.ts", "./src/export-mocks/navigation/index.ts", + "./src/compatibility/segment.compat.ts", + "./src/compatibility/redirect-status-code.compat.ts", "./src/next-image-loader-stub.ts", "./src/images/decorator.tsx", "./src/images/next-legacy-image.tsx", diff --git a/code/frameworks/nextjs/src/compatibility/compatibility-map.ts b/code/frameworks/nextjs/src/compatibility/compatibility-map.ts new file mode 100644 index 000000000000..96c8459e0fee --- /dev/null +++ b/code/frameworks/nextjs/src/compatibility/compatibility-map.ts @@ -0,0 +1,32 @@ +import type { Configuration as WebpackConfig } from 'webpack'; +import semver from 'semver'; +import { getNextjsVersion, addScopedAlias } from '../utils'; + +const mapping: Record> = { + '<14.0.0': { + 'next/dist/shared/lib/segment': '@storybook/nextjs/dist/compatibility/segment.compat', + 'next/dist/client/components/redirect-status-code': + '@storybook/nextjs/dist/compatibility/redirect-status-code.compat', + }, +}; + +export const getCompatibilityAliases = () => { + const version = getNextjsVersion(); + const result: Record = {}; + + Object.keys(mapping).filter((key) => { + if (semver.intersects(version, key)) { + Object.assign(result, mapping[key]); + } + }); + + return result; +}; + +export const configureCompatibilityAliases = (baseConfig: WebpackConfig): void => { + const aliases = getCompatibilityAliases(); + + Object.entries(aliases).forEach(([name, alias]) => { + addScopedAlias(baseConfig, name, alias); + }); +}; diff --git a/code/frameworks/nextjs/src/compatibility/redirect-status-code.compat.ts b/code/frameworks/nextjs/src/compatibility/redirect-status-code.compat.ts new file mode 100644 index 000000000000..cf2adb9e284c --- /dev/null +++ b/code/frameworks/nextjs/src/compatibility/redirect-status-code.compat.ts @@ -0,0 +1,6 @@ +// Compatibility for Next 13 +export enum RedirectStatusCode { + SeeOther = 303, + TemporaryRedirect = 307, + PermanentRedirect = 308, +} diff --git a/code/frameworks/nextjs/src/compatibility/segment.compat.ts b/code/frameworks/nextjs/src/compatibility/segment.compat.ts new file mode 100644 index 000000000000..98c195030f5c --- /dev/null +++ b/code/frameworks/nextjs/src/compatibility/segment.compat.ts @@ -0,0 +1,8 @@ +// Compatibility for Next 13 +// from https://github.com/vercel/next.js/blob/606f9ff7903b58da51aa043bfe71cd7b6ea306fd/packages/next/src/shared/lib/segment.ts#L4 +export function isGroupSegment(segment: string) { + return segment[0] === '(' && segment.endsWith(')'); +} + +export const PAGE_SEGMENT_KEY = '__PAGE__'; +export const DEFAULT_SEGMENT_KEY = '__DEFAULT__'; diff --git a/code/frameworks/nextjs/src/export-mocks/webpack.ts b/code/frameworks/nextjs/src/export-mocks/webpack.ts index 789dc1df21cd..8f43c41a9e53 100644 --- a/code/frameworks/nextjs/src/export-mocks/webpack.ts +++ b/code/frameworks/nextjs/src/export-mocks/webpack.ts @@ -1,29 +1,38 @@ import { dirname, join } from 'path'; import type { Configuration as WebpackConfig } from 'webpack'; +import { getCompatibilityAliases } from '../compatibility/compatibility-map'; +const mapping = { + 'next/headers': '/dist/export-mocks/headers/index', + '@storybook/nextjs/headers.mock': '/dist/export-mocks/headers/index', + 'next/navigation': '/dist/export-mocks/navigation/index', + '@storybook/nextjs/navigation.mock': '/dist/export-mocks/navigation/index', + 'next/router': '/dist/export-mocks/router/index', + '@storybook/nextjs/router.mock': '/dist/export-mocks/router/index', + 'next/cache': '/dist/export-mocks/cache/index', + '@storybook/nextjs/cache.mock': '/dist/export-mocks/cache/index', + ...getCompatibilityAliases(), +}; + +// Utility that assists in adding aliases to the Webpack configuration +// and also doubles as alias solution for portable stories in Jest/Vitest/etc. export const getPackageAliases = ({ useESM = false }: { useESM?: boolean } = {}) => { const extension = useESM ? 'mjs' : 'js'; const packageLocation = dirname(require.resolve('@storybook/nextjs/package.json')); - // Use paths for both next/xyz and @storybook/nextjs/xyz imports - // to make sure they all serve the MJS version of the file - const headersPath = join(packageLocation, `/dist/export-mocks/headers/index.${extension}`); - const navigationPath = join(packageLocation, `/dist/export-mocks/navigation/index.${extension}`); - const cachePath = join(packageLocation, `/dist/export-mocks/cache/index.${extension}`); - const routerPath = join(packageLocation, `/dist/export-mocks/router/index.${extension}`); - return { - 'next/headers': headersPath, - '@storybook/nextjs/headers.mock': headersPath, + const getFullPath = (path: string) => + join(packageLocation, path.replace('@storybook/nextjs', '')); - 'next/navigation': navigationPath, - '@storybook/nextjs/navigation.mock': navigationPath, + const aliases = Object.fromEntries( + Object.entries(mapping).map(([originalPath, aliasedPath]) => [ + originalPath, + // Use paths for both next/xyz and @storybook/nextjs/xyz imports + // to make sure they all serve the MJS/CJS version of the file + getFullPath(`${aliasedPath}.${extension}`), + ]) + ); - 'next/router': routerPath, - '@storybook/nextjs/router.mock': routerPath, - - 'next/cache': cachePath, - '@storybook/nextjs/cache.mock': cachePath, - }; + return aliases; }; export const configureNextExportMocks = (baseConfig: WebpackConfig): void => { diff --git a/code/frameworks/nextjs/src/preset.ts b/code/frameworks/nextjs/src/preset.ts index 0eb9abed9b04..44398fabf3d6 100644 --- a/code/frameworks/nextjs/src/preset.ts +++ b/code/frameworks/nextjs/src/preset.ts @@ -24,6 +24,7 @@ import { configureFastRefresh } from './fastRefresh/webpack'; import { configureAliases } from './aliases/webpack'; import { logger } from '@storybook/node-logger'; import { configureNextExportMocks } from './export-mocks/webpack'; +import { configureCompatibilityAliases } from './compatibility/compatibility-map'; export const addons: PresetProperty<'addons'> = [ dirname(require.resolve(join('@storybook/preset-react-webpack', 'package.json'))), @@ -135,6 +136,7 @@ export const webpackFinal: StorybookConfig['webpackFinal'] = async (baseConfig, configureStyledJsx(baseConfig); configureNodePolyfills(baseConfig); configureAliases(baseConfig); + configureCompatibilityAliases(baseConfig); configureNextExportMocks(baseConfig); if (isDevelopment) { diff --git a/test-storybooks/portable-stories-kitchen-sink/nextjs/yarn.lock b/test-storybooks/portable-stories-kitchen-sink/nextjs/yarn.lock index 34d3f97d1569..5016189d6c21 100644 --- a/test-storybooks/portable-stories-kitchen-sink/nextjs/yarn.lock +++ b/test-storybooks/portable-stories-kitchen-sink/nextjs/yarn.lock @@ -1,6 +1,9 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + __metadata: version: 8 - cacheKey: merged + cacheKey: 10 "@aashutoshrathi/word-wrap@npm:^1.2.3": version: 1.2.6 @@ -57,13 +60,6 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.3, @babel/compat-data@npm:^7.23.5": - version: 7.23.5 - resolution: "@babel/compat-data@npm:7.23.5" - checksum: 10/088f14f646ecbddd5ef89f120a60a1b3389a50a9705d44603dca77662707d0175a5e0e0da3943c3298f1907a4ab871468656fbbf74bb7842cd8b0686b2c19736 - languageName: node - linkType: hard - "@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.5": version: 7.23.5 resolution: "@babel/compat-data@npm:7.23.5" @@ -78,29 +74,6 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.18.9, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.2, @babel/core@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/core@npm:7.23.9" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.23.5" - "@babel/generator": "npm:^7.23.6" - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helpers": "npm:^7.23.9" - "@babel/parser": "npm:^7.23.9" - "@babel/template": "npm:^7.23.9" - "@babel/traverse": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" - convert-source-map: "npm:^2.0.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10/268cdbb86bef1b8ea5b1300f2f325e56a1740a5051360cb228ffeaa0f80282b6674f3a2b4d6466adb0691183759b88d4c37b4a4f77232c84a49ed771c84cdc27 - languageName: node - linkType: hard - "@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.18.9, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.9": version: 7.23.9 resolution: "@babel/core@npm:7.23.9" @@ -147,18 +120,6 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.23.0, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.7.2": - version: 7.23.6 - resolution: "@babel/generator@npm:7.23.6" - dependencies: - "@babel/types": "npm:^7.23.6" - "@jridgewell/gen-mapping": "npm:^0.3.2" - "@jridgewell/trace-mapping": "npm:^0.3.17" - jsesc: "npm:^2.5.1" - checksum: 10/864090d5122c0aa3074471fd7b79d8a880c1468480cbd28925020a3dcc7eb6e98bedcdb38983df299c12b44b166e30915b8085a7bc126e68fa7e2aadc7bd1ac5 - languageName: node - linkType: hard - "@babel/generator@npm:^7.23.6, @babel/generator@npm:^7.7.2": version: 7.23.6 resolution: "@babel/generator@npm:7.23.6" @@ -201,19 +162,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.22.15, @babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/helper-compilation-targets@npm:7.23.6" - dependencies: - "@babel/compat-data": "npm:^7.23.5" - "@babel/helper-validator-option": "npm:^7.23.5" - browserslist: "npm:^4.22.2" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10/05595cd73087ddcd81b82d2f3297aac0c0422858dfdded43d304786cf680ec33e846e2317e6992d2c964ee61d93945cbf1fa8ec80b55aee5bfb159227fb02cb9 - languageName: node - linkType: hard - "@babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.23.6": version: 7.23.6 resolution: "@babel/helper-compilation-targets@npm:7.23.6" @@ -278,21 +226,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-define-polyfill-provider@npm:^0.5.0": - version: 0.5.0 - resolution: "@babel/helper-define-polyfill-provider@npm:0.5.0" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" - debug: "npm:^4.1.1" - lodash.debounce: "npm:^4.0.8" - resolve: "npm:^1.14.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/f849e816ec4b182a3e8fa8e09ff016f88bb95259cd6b2190b815c48f83c3d3b68e973a8ec72acc5086bfe93705cbd46ec089c06476421d858597780e42235a03 - languageName: node - linkType: hard - "@babel/helper-define-polyfill-provider@npm:^0.6.1, @babel/helper-define-polyfill-provider@npm:^0.6.2": version: 0.6.2 resolution: "@babel/helper-define-polyfill-provider@npm:0.6.2" @@ -572,17 +505,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/ddbaf2c396b7780f15e80ee01d6dd790db076985f3dfeb6527d1a8d4cacf370e49250396a3aa005b2c40233cac214a106232f83703d5e8491848bde273938232 - languageName: node - linkType: hard - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.24.1" @@ -594,19 +516,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-transform-optional-chaining": "npm:^7.23.3" - peerDependencies: - "@babel/core": ^7.13.0 - checksum: 10/434b9d710ae856fa1a456678cc304fbc93915af86d581ee316e077af746a709a741ea39d7e1d4f5b98861b629cc7e87f002d3138f5e836775632466d4c74aef2 - languageName: node - linkType: hard - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.24.1" @@ -620,18 +529,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.7": - version: 7.23.7 - resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.23.7" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/3b0c9554cd0048e6e7341d7b92f29d400dbc6a5a4fc2f86dbed881d32e02ece9b55bc520387bae2eac22a5ab38a0b205c29b52b181294d99b4dd75e27309b548 - languageName: node - linkType: hard - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.24.1" @@ -730,17 +627,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-assertions@npm:^7.22.5, @babel/plugin-syntax-import-assertions@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/883e6b35b2da205138caab832d54505271a3fee3fc1e8dc0894502434fc2b5d517cbe93bbfbfef8068a0fb6ec48ebc9eef3f605200a489065ba43d8cddc1c9a7 - languageName: node - linkType: hard - "@babel/plugin-syntax-import-assertions@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-syntax-import-assertions@npm:7.24.1" @@ -752,17 +638,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-attributes@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/9aed7661ffb920ca75df9f494757466ca92744e43072e0848d87fa4aa61a3f2ee5a22198ac1959856c036434b5614a8f46f1fb70298835dbe28220cdd1d4c11e - languageName: node - linkType: hard - "@babel/plugin-syntax-import-attributes@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-syntax-import-attributes@npm:7.24.1" @@ -940,17 +815,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-arrow-functions@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/1e99118176e5366c2636064d09477016ab5272b2a92e78b8edb571d20bc3eaa881789a905b20042942c3c2d04efc530726cf703f937226db5ebc495f5d067e66 - languageName: node - linkType: hard - "@babel/plugin-transform-arrow-functions@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-arrow-functions@npm:7.24.1" @@ -962,20 +826,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-generator-functions@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.9" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d402494087a6b803803eb5ab46b837aab100a04c4c5148e38bfa943ea1bbfc1ecfb340f1ced68972564312d3580f550c125f452372e77607a558fbbaf98c31c0 - languageName: node - linkType: hard - "@babel/plugin-transform-async-generator-functions@npm:^7.24.3": version: 7.24.3 resolution: "@babel/plugin-transform-async-generator-functions@npm:7.24.3" @@ -990,19 +840,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-to-generator@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.23.3" - dependencies: - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2e9d9795d4b3b3d8090332104e37061c677f29a1ce65bcbda4099a32d243e5d9520270a44bbabf0fb1fb40d463bd937685b1a1042e646979086c546d55319c3c - languageName: node - linkType: hard - "@babel/plugin-transform-async-to-generator@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-async-to-generator@npm:7.24.1" @@ -1016,17 +853,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoped-functions@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e63b16d94ee5f4d917e669da3db5ea53d1e7e79141a2ec873c1e644678cdafe98daa556d0d359963c827863d6b3665d23d4938a94a4c5053a1619c4ebd01d020 - languageName: node - linkType: hard - "@babel/plugin-transform-block-scoped-functions@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.24.1" @@ -1038,17 +864,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoping@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-block-scoping@npm:7.23.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bbb965a3acdfb03559806d149efbd194ac9c983b260581a60efcb15eb9fbe20e3054667970800146d867446db1c1398f8e4ee87f4454233e49b8f8ce947bd99b - languageName: node - linkType: hard - "@babel/plugin-transform-block-scoping@npm:^7.24.4": version: 7.24.4 resolution: "@babel/plugin-transform-block-scoping@npm:7.24.4" @@ -1072,18 +887,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-properties@npm:^7.22.5, @babel/plugin-transform-class-properties@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-class-properties@npm:7.23.3" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/9c6f8366f667897541d360246de176dd29efc7a13d80a5b48361882f7173d9173be4646c3b7d9b003ccc0e01e25df122330308f33db921fa553aa17ad544b3fc - languageName: node - linkType: hard - "@babel/plugin-transform-class-properties@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-class-properties@npm:7.24.1" @@ -1096,19 +899,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-static-block@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-class-static-block@npm:7.23.4" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10/c8bfaba19a674fc2eb54edad71e958647360474e3163e8226f1acd63e4e2dbec32a171a0af596c1dc5359aee402cc120fea7abd1fb0e0354b6527f0fc9e8aa1e - languageName: node - linkType: hard - "@babel/plugin-transform-class-static-block@npm:^7.24.4": version: 7.24.4 resolution: "@babel/plugin-transform-class-static-block@npm:7.24.4" @@ -1122,24 +912,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.23.8": - version: 7.23.8 - resolution: "@babel/plugin-transform-classes@npm:7.23.8" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.20" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - globals: "npm:^11.1.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/4bb4b19e7a39871c4414fb44fc5f2cc47c78f993b74c43238dfb99c9dac2d15cb99b43f8a3d42747580e1807d2b8f5e13ce7e95e593fd839bd176aa090bf9a23 - languageName: node - linkType: hard - "@babel/plugin-transform-classes@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-classes@npm:7.24.1" @@ -1158,18 +930,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-computed-properties@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-computed-properties@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/template": "npm:^7.22.15" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e75593e02c5ea473c17839e3c9d597ce3697bf039b66afe9a4d06d086a87fb3d95850b4174476897afc351dc1b46a9ec3165ee6e8fbad3732c0d65f676f855ad - languageName: node - linkType: hard - "@babel/plugin-transform-computed-properties@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-computed-properties@npm:7.24.1" @@ -1182,17 +942,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-destructuring@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/5abd93718af5a61f8f6a97d2ccac9139499752dd5b2c533d7556fb02947ae01b2f51d4c4f5e64df569e8783d3743270018eb1fa979c43edec7dd1377acf107ed - languageName: node - linkType: hard - "@babel/plugin-transform-destructuring@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-destructuring@npm:7.24.1" @@ -1204,18 +953,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-dotall-regex@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.23.3" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/a2dbbf7f1ea16a97948c37df925cb364337668c41a3948b8d91453f140507bd8a3429030c7ce66d09c299987b27746c19a2dd18b6f17dcb474854b14fd9159a3 - languageName: node - linkType: hard - "@babel/plugin-transform-dotall-regex@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-dotall-regex@npm:7.24.1" @@ -1228,17 +965,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-duplicate-keys@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/c2a21c34dc0839590cd945192cbc46fde541a27e140c48fe1808315934664cdbf18db64889e23c4eeb6bad9d3e049482efdca91d29de5734ffc887c4fbabaa16 - languageName: node - linkType: hard - "@babel/plugin-transform-duplicate-keys@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-duplicate-keys@npm:7.24.1" @@ -1250,18 +976,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-dynamic-import@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-dynamic-import@npm:7.23.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/57a722604c430d9f3dacff22001a5f31250e34785d4969527a2ae9160fa86858d0892c5b9ff7a06a04076f8c76c9e6862e0541aadca9c057849961343aab0845 - languageName: node - linkType: hard - "@babel/plugin-transform-dynamic-import@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-dynamic-import@npm:7.24.1" @@ -1274,18 +988,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-exponentiation-operator@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.23.3" - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/00d05ab14ad0f299160fcf9d8f55a1cc1b740e012ab0b5ce30207d2365f091665115557af7d989cd6260d075a252d9e4283de5f2b247dfbbe0e42ae586e6bf66 - languageName: node - linkType: hard - "@babel/plugin-transform-exponentiation-operator@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.24.1" @@ -1298,18 +1000,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-export-namespace-from@npm:^7.22.11, @babel/plugin-transform-export-namespace-from@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-export-namespace-from@npm:7.23.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/9f770a81bfd03b48d6ba155d452946fd56d6ffe5b7d871e9ec2a0b15e0f424273b632f3ed61838b90015b25bbda988896b7a46c7d964fbf8f6feb5820b309f93 - languageName: node - linkType: hard - "@babel/plugin-transform-export-namespace-from@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-export-namespace-from@npm:7.24.1" @@ -1334,18 +1024,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-for-of@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/plugin-transform-for-of@npm:7.23.6" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b84ef1f26a2db316237ae6d10fa7c22c70ac808ed0b8e095a8ecf9101551636cbb026bee9fb95a0a7944f3b8278ff9636a9088cb4a4ac5b84830a13829242735 - languageName: node - linkType: hard - "@babel/plugin-transform-for-of@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-for-of@npm:7.24.1" @@ -1358,19 +1036,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-function-name@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-function-name@npm:7.23.3" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.15" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/355c6dbe07c919575ad42b2f7e020f320866d72f8b79181a16f8e0cd424a2c761d979f03f47d583d9471b55dcd68a8a9d829b58e1eebcd572145b934b48975a6 - languageName: node - linkType: hard - "@babel/plugin-transform-function-name@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-function-name@npm:7.24.1" @@ -1384,18 +1049,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-json-strings@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-json-strings@npm:7.23.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/f9019820233cf8955d8ba346df709a0683c120fe86a24ed1c9f003f2db51197b979efc88f010d558a12e1491210fc195a43cd1c7fee5e23b92da38f793a875de - languageName: node - linkType: hard - "@babel/plugin-transform-json-strings@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-json-strings@npm:7.24.1" @@ -1408,17 +1061,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-literals@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-literals@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/519a544cd58586b9001c4c9b18da25a62f17d23c48600ff7a685d75ca9eb18d2c5e8f5476f067f0a8f1fea2a31107eff950b9864833061e6076dcc4bdc3e71ed - languageName: node - linkType: hard - "@babel/plugin-transform-literals@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-literals@npm:7.24.1" @@ -1430,18 +1072,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-logical-assignment-operators@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.23.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2ae1dc9b4ff3bf61a990ff3accdecb2afe3a0ca649b3e74c010078d1cdf29ea490f50ac0a905306a2bcf9ac177889a39ac79bdcc3a0fdf220b3b75fac18d39b5 - languageName: node - linkType: hard - "@babel/plugin-transform-logical-assignment-operators@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.24.1" @@ -1454,17 +1084,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-member-expression-literals@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/95cec13c36d447c5aa6b8e4c778b897eeba66dcb675edef01e0d2afcec9e8cb9726baf4f81b4bbae7a782595aed72e6a0d44ffb773272c3ca180fada99bf92db - languageName: node - linkType: hard - "@babel/plugin-transform-member-expression-literals@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-member-expression-literals@npm:7.24.1" @@ -1476,18 +1095,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-amd@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-modules-amd@npm:7.23.3" - dependencies: - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/48c87dee2c7dae8ed40d16901f32c9e58be4ef87bf2c3985b51dd2e78e82081f3bad0a39ee5cf6e8909e13e954e2b4bedef0a8141922f281ed833ddb59ed9be2 - languageName: node - linkType: hard - "@babel/plugin-transform-modules-amd@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-modules-amd@npm:7.24.1" @@ -1526,20 +1133,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-systemjs@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.23.9" - dependencies: - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/4bb800e5a9d0d668d7421ae3672fccff7d5f2a36621fd87414d7ece6d6f4d93627f9644cfecacae934bc65ffc131c8374242aaa400cca874dcab9b281a21aff0 - languageName: node - linkType: hard - "@babel/plugin-transform-modules-systemjs@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-modules-systemjs@npm:7.24.1" @@ -1554,18 +1147,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-umd@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-modules-umd@npm:7.23.3" - dependencies: - "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e3f3af83562d687899555c7826b3faf0ab93ee7976898995b1d20cbe7f4451c55e05b0e17bfb3e549937cbe7573daf5400b752912a241b0a8a64d2457c7626e5 - languageName: node - linkType: hard - "@babel/plugin-transform-modules-umd@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-modules-umd@npm:7.24.1" @@ -1590,17 +1171,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-new-target@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-new-target@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e5053389316fce73ad5201b7777437164f333e24787fbcda4ae489cd2580dbbbdfb5694a7237bad91fabb46b591d771975d69beb1c740b82cb4761625379f00b - languageName: node - linkType: hard - "@babel/plugin-transform-new-target@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-new-target@npm:7.24.1" @@ -1624,18 +1194,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.22.11, @babel/plugin-transform-nullish-coalescing-operator@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.23.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/a27d73ea134d3d9560a6b2e26ab60012fba15f1db95865aa0153c18f5ec82cfef6a7b3d8df74e3c2fca81534fa5efeb6cacaf7b08bdb7d123e3dafdd079886a3 - languageName: node - linkType: hard - "@babel/plugin-transform-nullish-coalescing-operator@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.24.1" @@ -1648,18 +1206,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-numeric-separator@npm:^7.22.11, @babel/plugin-transform-numeric-separator@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-numeric-separator@npm:7.23.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6ba0e5db3c620a3ec81f9e94507c821f483c15f196868df13fa454cbac719a5449baf73840f5b6eb7d77311b24a2cf8e45db53700d41727f693d46f7caf3eec3 - languageName: node - linkType: hard - "@babel/plugin-transform-numeric-separator@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-numeric-separator@npm:7.24.1" @@ -1672,21 +1218,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-rest-spread@npm:^7.22.15, @babel/plugin-transform-object-rest-spread@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-object-rest-spread@npm:7.23.4" - dependencies: - "@babel/compat-data": "npm:^7.23.3" - "@babel/helper-compilation-targets": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.23.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/656f09c4ec629856e807d5b386559166ae417ff75943abce19656b2c6de5101dfd0aaf23f9074e854339370b4e09f57518d3202457046ee5b567ded531005479 - languageName: node - linkType: hard - "@babel/plugin-transform-object-rest-spread@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-object-rest-spread@npm:7.24.1" @@ -1701,18 +1232,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-super@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-object-super@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e495497186f621fa79026e183b4f1fbb172fd9df812cbd2d7f02c05b08adbe58012b1a6eb6dd58d11a30343f6ec80d0f4074f9b501d70aa1c94df76d59164c53 - languageName: node - linkType: hard - "@babel/plugin-transform-object-super@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-object-super@npm:7.24.1" @@ -1725,18 +1244,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-optional-catch-binding@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.23.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d50b5ee142cdb088d8b5de1ccf7cea85b18b85d85b52f86618f6e45226372f01ad4cdb29abd4fd35ea99a71fefb37009e0107db7a787dcc21d4d402f97470faf - languageName: node - linkType: hard - "@babel/plugin-transform-optional-catch-binding@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.24.1" @@ -1762,19 +1269,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-optional-chaining@npm:^7.23.0, @babel/plugin-transform-optional-chaining@npm:^7.23.3, @babel/plugin-transform-optional-chaining@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.23.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/0ef24e889d6151428953fc443af5f71f4dae73f373dc1b7f5dd3f6a61d511296eb77e9b870e8c2c02a933e3455ae24c1fa91738c826b72a4ff87e0337db527e8 - languageName: node - linkType: hard - "@babel/plugin-transform-optional-chaining@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-optional-chaining@npm:7.24.1" @@ -1788,17 +1282,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-parameters@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/a8c36c3fc25f9daa46c4f6db47ea809c395dc4abc7f01c4b1391f6e5b0cd62b83b6016728b02a6a8ac21aca56207c9ec66daefc0336e9340976978de7e6e28df - languageName: node - linkType: hard - "@babel/plugin-transform-parameters@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-parameters@npm:7.24.1" @@ -1822,18 +1305,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-private-methods@npm:^7.22.5, @babel/plugin-transform-private-methods@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-private-methods@npm:7.23.3" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/cedc1285c49b5a6d9a3d0e5e413b756ac40b3ac2f8f68bdfc3ae268bc8d27b00abd8bb0861c72756ff5dd8bf1eb77211b7feb5baf4fdae2ebbaabe49b9adc1d0 - languageName: node - linkType: hard - "@babel/plugin-transform-private-methods@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-private-methods@npm:7.24.1" @@ -1846,20 +1317,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-private-property-in-object@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-private-property-in-object@npm:7.23.4" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/02eef2ee98fa86ee5052ed9bf0742d6d22b510b5df2fcce0b0f5615d6001f7786c6b31505e7f1c2f446406d8fb33603a5316d957cfa5b8365cbf78ddcc24fa42 - languageName: node - linkType: hard - "@babel/plugin-transform-private-property-in-object@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-private-property-in-object@npm:7.24.1" @@ -1874,17 +1331,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-property-literals@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-property-literals@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/16b048c8e87f25095f6d53634ab7912992f78e6997a6ff549edc3cf519db4fca01c7b4e0798530d7f6a05228ceee479251245cdd850a5531c6e6f404104d6cc9 - languageName: node - linkType: hard - "@babel/plugin-transform-property-literals@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-property-literals@npm:7.24.1" @@ -1896,17 +1342,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-display-name@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-react-display-name@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/7f86964e8434d3ddbd3c81d2690c9b66dbf1cd8bd9512e2e24500e9fa8cf378bc52c0853270b3b82143aba5965aec04721df7abdb768f952b44f5c6e0b198779 - languageName: node - linkType: hard - "@babel/plugin-transform-react-display-name@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-react-display-name@npm:7.24.1" @@ -1929,21 +1364,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-jsx@npm:^7.22.15, @babel/plugin-transform-react-jsx@npm:^7.22.5": - version: 7.23.4 - resolution: "@babel/plugin-transform-react-jsx@npm:7.23.4" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-jsx": "npm:^7.23.3" - "@babel/types": "npm:^7.23.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d83806701349addfb77b8347b4f0dc8e76fb1c9ac21bdef69f4002394fce2396d61facfc6e1a3de54cbabcdadf991a1f642e69edb5116ac14f95e33d9f7c221d - languageName: node - linkType: hard - "@babel/plugin-transform-react-jsx@npm:^7.22.5, @babel/plugin-transform-react-jsx@npm:^7.23.4": version: 7.23.4 resolution: "@babel/plugin-transform-react-jsx@npm:7.23.4" @@ -1959,18 +1379,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-pure-annotations@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.23.3" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/9ea3698b1d422561d93c0187ac1ed8f2367e4250b10e259785ead5aa643c265830fd0f4cf5087a5bedbc4007444c06da2f2006686613220acf0949895f453666 - languageName: node - linkType: hard - "@babel/plugin-transform-react-pure-annotations@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.24.1" @@ -1983,18 +1391,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-regenerator@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - regenerator-transform: "npm:^0.15.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/7fdacc7b40008883871b519c9e5cdea493f75495118ccc56ac104b874983569a24edd024f0f5894ba1875c54ee2b442f295d6241c3280e61c725d0dd3317c8e6 - languageName: node - linkType: hard - "@babel/plugin-transform-regenerator@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-regenerator@npm:7.24.1" @@ -2007,17 +1403,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-reserved-words@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-reserved-words@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/298c4440ddc136784ff920127cea137168e068404e635dc946ddb5d7b2a27b66f1dd4c4acb01f7184478ff7d5c3e7177a127279479926519042948fb7fa0fa48 - languageName: node - linkType: hard - "@babel/plugin-transform-reserved-words@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-reserved-words@npm:7.24.1" @@ -2029,46 +1414,19 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-runtime@npm:^7.23.2": - version: 7.23.9 - resolution: "@babel/plugin-transform-runtime@npm:7.23.9" - dependencies: - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - babel-plugin-polyfill-corejs2: "npm:^0.4.8" - babel-plugin-polyfill-corejs3: "npm:^0.9.0" - babel-plugin-polyfill-regenerator: "npm:^0.5.5" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d942e5852f100d0de5021c4d1fda9e30c28b94aa846e09588476dd82c058fb6869a30be0cf915362bf23b5f3504aa150ca3c3b0299dbd0a86b3b1f5f744c2333 - languageName: node - linkType: hard - "@babel/plugin-transform-runtime@npm:^7.24.3": version: 7.24.3 resolution: "@babel/plugin-transform-runtime@npm:7.24.3" dependencies: "@babel/helper-module-imports": "npm:^7.24.3" "@babel/helper-plugin-utils": "npm:^7.24.0" - babel-plugin-polyfill-corejs2: "npm:^0.4.10" - babel-plugin-polyfill-corejs3: "npm:^0.10.1" - babel-plugin-polyfill-regenerator: "npm:^0.6.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/7f545c628993b527ae1cb028106168ec29873160a5d98aed947509b61e826fa52b6e2bd2c56504b4a5084555becc9841fa7842e61f822a050dd6ff5baff726ce - languageName: node - linkType: hard - -"@babel/plugin-transform-shorthand-properties@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + babel-plugin-polyfill-corejs2: "npm:^0.4.10" + babel-plugin-polyfill-corejs3: "npm:^0.10.1" + babel-plugin-polyfill-regenerator: "npm:^0.6.1" + semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/5d677a03676f9fff969b0246c423d64d77502e90a832665dc872a5a5e05e5708161ce1effd56bb3c0f2c20a1112fca874be57c8a759d8b08152755519281f326 + checksum: 10/7f545c628993b527ae1cb028106168ec29873160a5d98aed947509b61e826fa52b6e2bd2c56504b4a5084555becc9841fa7842e61f822a050dd6ff5baff726ce languageName: node linkType: hard @@ -2083,18 +1441,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-spread@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-spread@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/c6372d2f788fd71d85aba12fbe08ee509e053ed27457e6674a4f9cae41ff885e2eb88aafea8fadd0ccf990601fc69ec596fa00959e05af68a15461a8d97a548d - languageName: node - linkType: hard - "@babel/plugin-transform-spread@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-spread@npm:7.24.1" @@ -2107,17 +1453,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-sticky-regex@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/53e55eb2575b7abfdb4af7e503a2bf7ef5faf8bf6b92d2cd2de0700bdd19e934e5517b23e6dfed94ba50ae516b62f3f916773ef7d9bc81f01503f585051e2949 - languageName: node - linkType: hard - "@babel/plugin-transform-sticky-regex@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-sticky-regex@npm:7.24.1" @@ -2129,17 +1464,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-template-literals@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-template-literals@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b16c5cb0b8796be0118e9c144d15bdc0d20a7f3f59009c6303a6e9a8b74c146eceb3f05186f5b97afcba7cfa87e34c1585a22186e3d5b22f2fd3d27d959d92b2 - languageName: node - linkType: hard - "@babel/plugin-transform-template-literals@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-template-literals@npm:7.24.1" @@ -2151,17 +1475,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typeof-symbol@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/0af7184379d43afac7614fc89b1bdecce4e174d52f4efaeee8ec1a4f2c764356c6dba3525c0685231f1cbf435b6dd4ee9e738d7417f3b10ce8bbe869c32f4384 - languageName: node - linkType: hard - "@babel/plugin-transform-typeof-symbol@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-typeof-symbol@npm:7.24.1" @@ -2201,17 +1514,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-escapes@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/561c429183a54b9e4751519a3dfba6014431e9cdc1484fad03bdaf96582dfc72c76a4f8661df2aeeae7c34efd0fa4d02d3b83a2f63763ecf71ecc925f9cc1f60 - languageName: node - linkType: hard - "@babel/plugin-transform-unicode-escapes@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-unicode-escapes@npm:7.24.1" @@ -2223,18 +1525,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-property-regex@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.23.3" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2298461a194758086d17c23c26c7de37aa533af910f9ebf31ebd0893d4aa317468043d23f73edc782ec21151d3c46cf0ff8098a83b725c49a59de28a1d4d6225 - languageName: node - linkType: hard - "@babel/plugin-transform-unicode-property-regex@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.24.1" @@ -2247,18 +1537,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-regex@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.23.3" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/c5f835d17483ba899787f92e313dfa5b0055e3deab332f1d254078a2bba27ede47574b6599fcf34d3763f0c048ae0779dc21d2d8db09295edb4057478dc80a9a - languageName: node - linkType: hard - "@babel/plugin-transform-unicode-regex@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-unicode-regex@npm:7.24.1" @@ -2271,18 +1549,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-sets-regex@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.23.3" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/79d0b4c951955ca68235c87b91ab2b393c96285f8aeaa34d6db416d2ddac90000c9bd6e8c4d82b60a2b484da69930507245035f28ba63c6cae341cf3ba68fdef - languageName: node - linkType: hard - "@babel/plugin-transform-unicode-sets-regex@npm:^7.24.1": version: 7.24.1 resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.24.1" @@ -2295,96 +1561,6 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:^7.23.2": - version: 7.23.9 - resolution: "@babel/preset-env@npm:7.23.9" - dependencies: - "@babel/compat-data": "npm:^7.23.5" - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.23.5" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.23.3" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.23.3" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "npm:^7.23.7" - "@babel/plugin-proposal-private-property-in-object": "npm:7.21.0-placeholder-for-preset-env.2" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/plugin-syntax-class-properties": "npm:^7.12.13" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - "@babel/plugin-syntax-import-assertions": "npm:^7.23.3" - "@babel/plugin-syntax-import-attributes": "npm:^7.23.3" - "@babel/plugin-syntax-import-meta": "npm:^7.10.4" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" - "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" - "@babel/plugin-transform-arrow-functions": "npm:^7.23.3" - "@babel/plugin-transform-async-generator-functions": "npm:^7.23.9" - "@babel/plugin-transform-async-to-generator": "npm:^7.23.3" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.23.3" - "@babel/plugin-transform-block-scoping": "npm:^7.23.4" - "@babel/plugin-transform-class-properties": "npm:^7.23.3" - "@babel/plugin-transform-class-static-block": "npm:^7.23.4" - "@babel/plugin-transform-classes": "npm:^7.23.8" - "@babel/plugin-transform-computed-properties": "npm:^7.23.3" - "@babel/plugin-transform-destructuring": "npm:^7.23.3" - "@babel/plugin-transform-dotall-regex": "npm:^7.23.3" - "@babel/plugin-transform-duplicate-keys": "npm:^7.23.3" - "@babel/plugin-transform-dynamic-import": "npm:^7.23.4" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.23.3" - "@babel/plugin-transform-export-namespace-from": "npm:^7.23.4" - "@babel/plugin-transform-for-of": "npm:^7.23.6" - "@babel/plugin-transform-function-name": "npm:^7.23.3" - "@babel/plugin-transform-json-strings": "npm:^7.23.4" - "@babel/plugin-transform-literals": "npm:^7.23.3" - "@babel/plugin-transform-logical-assignment-operators": "npm:^7.23.4" - "@babel/plugin-transform-member-expression-literals": "npm:^7.23.3" - "@babel/plugin-transform-modules-amd": "npm:^7.23.3" - "@babel/plugin-transform-modules-commonjs": "npm:^7.23.3" - "@babel/plugin-transform-modules-systemjs": "npm:^7.23.9" - "@babel/plugin-transform-modules-umd": "npm:^7.23.3" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.22.5" - "@babel/plugin-transform-new-target": "npm:^7.23.3" - "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.23.4" - "@babel/plugin-transform-numeric-separator": "npm:^7.23.4" - "@babel/plugin-transform-object-rest-spread": "npm:^7.23.4" - "@babel/plugin-transform-object-super": "npm:^7.23.3" - "@babel/plugin-transform-optional-catch-binding": "npm:^7.23.4" - "@babel/plugin-transform-optional-chaining": "npm:^7.23.4" - "@babel/plugin-transform-parameters": "npm:^7.23.3" - "@babel/plugin-transform-private-methods": "npm:^7.23.3" - "@babel/plugin-transform-private-property-in-object": "npm:^7.23.4" - "@babel/plugin-transform-property-literals": "npm:^7.23.3" - "@babel/plugin-transform-regenerator": "npm:^7.23.3" - "@babel/plugin-transform-reserved-words": "npm:^7.23.3" - "@babel/plugin-transform-shorthand-properties": "npm:^7.23.3" - "@babel/plugin-transform-spread": "npm:^7.23.3" - "@babel/plugin-transform-sticky-regex": "npm:^7.23.3" - "@babel/plugin-transform-template-literals": "npm:^7.23.3" - "@babel/plugin-transform-typeof-symbol": "npm:^7.23.3" - "@babel/plugin-transform-unicode-escapes": "npm:^7.23.3" - "@babel/plugin-transform-unicode-property-regex": "npm:^7.23.3" - "@babel/plugin-transform-unicode-regex": "npm:^7.23.3" - "@babel/plugin-transform-unicode-sets-regex": "npm:^7.23.3" - "@babel/preset-modules": "npm:0.1.6-no-external-plugins" - babel-plugin-polyfill-corejs2: "npm:^0.4.8" - babel-plugin-polyfill-corejs3: "npm:^0.9.0" - babel-plugin-polyfill-regenerator: "npm:^0.5.5" - core-js-compat: "npm:^3.31.0" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/0214ac9434a2496eac7f56c0c91164421232ff2083a66e1ccab633ca91e262828e54a5cbdb9036e8fe53d53530b6597aa98c99de8ff07b5193ffd95f21dc9d2c - languageName: node - linkType: hard - "@babel/preset-env@npm:^7.24.4": version: 7.24.4 resolution: "@babel/preset-env@npm:7.24.4" @@ -2502,22 +1678,6 @@ __metadata: languageName: node linkType: hard -"@babel/preset-react@npm:^7.22.15": - version: 7.23.3 - resolution: "@babel/preset-react@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.15" - "@babel/plugin-transform-react-display-name": "npm:^7.23.3" - "@babel/plugin-transform-react-jsx": "npm:^7.22.15" - "@babel/plugin-transform-react-jsx-development": "npm:^7.22.5" - "@babel/plugin-transform-react-pure-annotations": "npm:^7.23.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/ef6aef131b2f36e2883e9da0d832903643cb3c9ad4f32e04fb3eecae59e4221d583139e8d8f973e25c28d15aafa6b3e60fe9f25c5fd09abd3e2df03b8637bdd2 - languageName: node - linkType: hard - "@babel/preset-react@npm:^7.24.1": version: 7.24.1 resolution: "@babel/preset-react@npm:7.24.1" @@ -2549,21 +1709,6 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.23.0, @babel/preset-typescript@npm:^7.23.2": - version: 7.23.3 - resolution: "@babel/preset-typescript@npm:7.23.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.15" - "@babel/plugin-syntax-jsx": "npm:^7.23.3" - "@babel/plugin-transform-modules-commonjs": "npm:^7.23.3" - "@babel/plugin-transform-typescript": "npm:^7.23.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/c4add0f3fcbb3f4a305c48db9ccb32694f1308ed9971ccbc1a8a3c76d5a13726addb3c667958092287d7aa080186c5c83dbfefa55eacf94657e6cde39e172848 - languageName: node - linkType: hard - "@babel/preset-typescript@npm:^7.24.1": version: 7.24.1 resolution: "@babel/preset-typescript@npm:7.24.1" @@ -2601,15 +1746,6 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2": - version: 7.23.9 - resolution: "@babel/runtime@npm:7.23.9" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10/9a520fe1bf72249f7dd60ff726434251858de15cccfca7aa831bd19d0d3fb17702e116ead82724659b8da3844977e5e13de2bae01eb8a798f2823a669f122be6 - languageName: node - linkType: hard - "@babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2": version: 7.23.9 resolution: "@babel/runtime@npm:7.23.9" @@ -2650,24 +1786,6 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.2, @babel/traverse@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/traverse@npm:7.23.9" - dependencies: - "@babel/code-frame": "npm:^7.23.5" - "@babel/generator": "npm:^7.23.6" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10/e2bb845f7f229feb7c338f7e150f5f1abc5395dcd3a6a47f63a25242ec3ec6b165f04a6df7d4849468547faee34eb3cf52487eb0bd867a7d3c42fec2a648266f - languageName: node - linkType: hard - "@babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.9": version: 7.23.9 resolution: "@babel/traverse@npm:7.23.9" @@ -2775,7 +1893,6 @@ __metadata: "@esbuild/aix-ppc64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/aix-ppc64@npm:0.20.1" - checksum: 10/undefined conditions: os=aix & cpu=ppc64 languageName: node linkType: hard @@ -2783,7 +1900,6 @@ __metadata: "@esbuild/android-arm64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/android-arm64@npm:0.20.1" - checksum: 10/undefined conditions: os=android & cpu=arm64 languageName: node linkType: hard @@ -2791,7 +1907,6 @@ __metadata: "@esbuild/android-arm@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/android-arm@npm:0.20.1" - checksum: 10/undefined conditions: os=android & cpu=arm languageName: node linkType: hard @@ -2799,7 +1914,6 @@ __metadata: "@esbuild/android-x64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/android-x64@npm:0.20.1" - checksum: 10/undefined conditions: os=android & cpu=x64 languageName: node linkType: hard @@ -2807,7 +1921,6 @@ __metadata: "@esbuild/darwin-arm64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/darwin-arm64@npm:0.20.1" - checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -2815,7 +1928,6 @@ __metadata: "@esbuild/darwin-x64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/darwin-x64@npm:0.20.1" - checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -2823,7 +1935,6 @@ __metadata: "@esbuild/freebsd-arm64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/freebsd-arm64@npm:0.20.1" - checksum: 10/undefined conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard @@ -2831,7 +1942,6 @@ __metadata: "@esbuild/freebsd-x64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/freebsd-x64@npm:0.20.1" - checksum: 10/undefined conditions: os=freebsd & cpu=x64 languageName: node linkType: hard @@ -2839,7 +1949,6 @@ __metadata: "@esbuild/linux-arm64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/linux-arm64@npm:0.20.1" - checksum: 10/undefined conditions: os=linux & cpu=arm64 languageName: node linkType: hard @@ -2847,7 +1956,6 @@ __metadata: "@esbuild/linux-arm@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/linux-arm@npm:0.20.1" - checksum: 10/undefined conditions: os=linux & cpu=arm languageName: node linkType: hard @@ -2855,7 +1963,6 @@ __metadata: "@esbuild/linux-ia32@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/linux-ia32@npm:0.20.1" - checksum: 10/undefined conditions: os=linux & cpu=ia32 languageName: node linkType: hard @@ -2863,7 +1970,6 @@ __metadata: "@esbuild/linux-loong64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/linux-loong64@npm:0.20.1" - checksum: 10/undefined conditions: os=linux & cpu=loong64 languageName: node linkType: hard @@ -2871,7 +1977,6 @@ __metadata: "@esbuild/linux-mips64el@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/linux-mips64el@npm:0.20.1" - checksum: 10/undefined conditions: os=linux & cpu=mips64el languageName: node linkType: hard @@ -2879,7 +1984,6 @@ __metadata: "@esbuild/linux-ppc64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/linux-ppc64@npm:0.20.1" - checksum: 10/undefined conditions: os=linux & cpu=ppc64 languageName: node linkType: hard @@ -2887,7 +1991,6 @@ __metadata: "@esbuild/linux-riscv64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/linux-riscv64@npm:0.20.1" - checksum: 10/undefined conditions: os=linux & cpu=riscv64 languageName: node linkType: hard @@ -2895,7 +1998,6 @@ __metadata: "@esbuild/linux-s390x@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/linux-s390x@npm:0.20.1" - checksum: 10/undefined conditions: os=linux & cpu=s390x languageName: node linkType: hard @@ -2903,7 +2005,6 @@ __metadata: "@esbuild/linux-x64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/linux-x64@npm:0.20.1" - checksum: 10/undefined conditions: os=linux & cpu=x64 languageName: node linkType: hard @@ -2911,7 +2012,6 @@ __metadata: "@esbuild/netbsd-x64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/netbsd-x64@npm:0.20.1" - checksum: 10/undefined conditions: os=netbsd & cpu=x64 languageName: node linkType: hard @@ -2919,7 +2019,6 @@ __metadata: "@esbuild/openbsd-x64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/openbsd-x64@npm:0.20.1" - checksum: 10/undefined conditions: os=openbsd & cpu=x64 languageName: node linkType: hard @@ -2927,7 +2026,6 @@ __metadata: "@esbuild/sunos-x64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/sunos-x64@npm:0.20.1" - checksum: 10/undefined conditions: os=sunos & cpu=x64 languageName: node linkType: hard @@ -2935,7 +2033,6 @@ __metadata: "@esbuild/win32-arm64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/win32-arm64@npm:0.20.1" - checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -2943,7 +2040,6 @@ __metadata: "@esbuild/win32-ia32@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/win32-ia32@npm:0.20.1" - checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -2951,7 +2047,6 @@ __metadata: "@esbuild/win32-x64@npm:0.20.1": version: 0.20.1 resolution: "@esbuild/win32-x64@npm:0.20.1" - checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3038,7 +2133,6 @@ __metadata: dependenciesMeta: "@img/sharp-libvips-darwin-arm64": optional: true - checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -3051,7 +2145,6 @@ __metadata: dependenciesMeta: "@img/sharp-libvips-darwin-x64": optional: true - checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -3059,7 +2152,6 @@ __metadata: "@img/sharp-libvips-darwin-arm64@npm:1.0.2": version: 1.0.2 resolution: "@img/sharp-libvips-darwin-arm64@npm:1.0.2" - checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -3067,7 +2159,6 @@ __metadata: "@img/sharp-libvips-darwin-x64@npm:1.0.2": version: 1.0.2 resolution: "@img/sharp-libvips-darwin-x64@npm:1.0.2" - checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -3075,7 +2166,6 @@ __metadata: "@img/sharp-libvips-linux-arm64@npm:1.0.2": version: 1.0.2 resolution: "@img/sharp-libvips-linux-arm64@npm:1.0.2" - checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -3083,7 +2173,6 @@ __metadata: "@img/sharp-libvips-linux-arm@npm:1.0.2": version: 1.0.2 resolution: "@img/sharp-libvips-linux-arm@npm:1.0.2" - checksum: 10/undefined conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard @@ -3091,7 +2180,6 @@ __metadata: "@img/sharp-libvips-linux-s390x@npm:1.0.2": version: 1.0.2 resolution: "@img/sharp-libvips-linux-s390x@npm:1.0.2" - checksum: 10/undefined conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard @@ -3099,7 +2187,6 @@ __metadata: "@img/sharp-libvips-linux-x64@npm:1.0.2": version: 1.0.2 resolution: "@img/sharp-libvips-linux-x64@npm:1.0.2" - checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -3107,7 +2194,6 @@ __metadata: "@img/sharp-libvips-linuxmusl-arm64@npm:1.0.2": version: 1.0.2 resolution: "@img/sharp-libvips-linuxmusl-arm64@npm:1.0.2" - checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -3115,7 +2201,6 @@ __metadata: "@img/sharp-libvips-linuxmusl-x64@npm:1.0.2": version: 1.0.2 resolution: "@img/sharp-libvips-linuxmusl-x64@npm:1.0.2" - checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -3128,7 +2213,6 @@ __metadata: dependenciesMeta: "@img/sharp-libvips-linux-arm64": optional: true - checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -3141,7 +2225,6 @@ __metadata: dependenciesMeta: "@img/sharp-libvips-linux-arm": optional: true - checksum: 10/undefined conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard @@ -3154,7 +2237,6 @@ __metadata: dependenciesMeta: "@img/sharp-libvips-linux-s390x": optional: true - checksum: 10/undefined conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard @@ -3167,7 +2249,6 @@ __metadata: dependenciesMeta: "@img/sharp-libvips-linux-x64": optional: true - checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -3180,7 +2261,6 @@ __metadata: dependenciesMeta: "@img/sharp-libvips-linuxmusl-arm64": optional: true - checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -3193,7 +2273,6 @@ __metadata: dependenciesMeta: "@img/sharp-libvips-linuxmusl-x64": optional: true - checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -3203,7 +2282,6 @@ __metadata: resolution: "@img/sharp-wasm32@npm:0.33.3" dependencies: "@emnapi/runtime": "npm:^1.1.0" - checksum: 10/undefined conditions: cpu=wasm32 languageName: node linkType: hard @@ -3211,7 +2289,6 @@ __metadata: "@img/sharp-win32-ia32@npm:0.33.3": version: 0.33.3 resolution: "@img/sharp-win32-ia32@npm:0.33.3" - checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -3219,7 +2296,6 @@ __metadata: "@img/sharp-win32-x64@npm:0.33.3": version: 0.33.3 resolution: "@img/sharp-win32-x64@npm:0.33.3" - checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3601,7 +2677,6 @@ __metadata: "@next/swc-darwin-arm64@npm:14.2.2": version: 14.2.2 resolution: "@next/swc-darwin-arm64@npm:14.2.2" - checksum: 10/undefined conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -3609,7 +2684,6 @@ __metadata: "@next/swc-darwin-x64@npm:14.2.2": version: 14.2.2 resolution: "@next/swc-darwin-x64@npm:14.2.2" - checksum: 10/undefined conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -3617,7 +2691,6 @@ __metadata: "@next/swc-linux-arm64-gnu@npm:14.2.2": version: 14.2.2 resolution: "@next/swc-linux-arm64-gnu@npm:14.2.2" - checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -3625,7 +2698,6 @@ __metadata: "@next/swc-linux-arm64-musl@npm:14.2.2": version: 14.2.2 resolution: "@next/swc-linux-arm64-musl@npm:14.2.2" - checksum: 10/undefined conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -3633,7 +2705,6 @@ __metadata: "@next/swc-linux-x64-gnu@npm:14.2.2": version: 14.2.2 resolution: "@next/swc-linux-x64-gnu@npm:14.2.2" - checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -3641,7 +2712,6 @@ __metadata: "@next/swc-linux-x64-musl@npm:14.2.2": version: 14.2.2 resolution: "@next/swc-linux-x64-musl@npm:14.2.2" - checksum: 10/undefined conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -3649,7 +2719,6 @@ __metadata: "@next/swc-win32-arm64-msvc@npm:14.2.2": version: 14.2.2 resolution: "@next/swc-win32-arm64-msvc@npm:14.2.2" - checksum: 10/undefined conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -3657,7 +2726,6 @@ __metadata: "@next/swc-win32-ia32-msvc@npm:14.2.2": version: 14.2.2 resolution: "@next/swc-win32-ia32-msvc@npm:14.2.2" - checksum: 10/undefined conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -3665,7 +2733,6 @@ __metadata: "@next/swc-win32-x64-msvc@npm:14.2.2": version: 14.2.2 resolution: "@next/swc-win32-x64-msvc@npm:14.2.2" - checksum: 10/undefined conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3991,22 +3058,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-slot@npm:^1.0.2": - version: 1.0.2 - resolution: "@radix-ui/react-slot@npm:1.0.2" - dependencies: - "@babel/runtime": "npm:^7.13.10" - "@radix-ui/react-compose-refs": "npm:1.0.1" - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/734866561e991438fbcf22af06e56b272ed6ee8f7b536489ee3bf2f736f8b53bf6bc14ebde94834aa0aceda854d018a0ce20bb171defffbaed1f566006cbb887 - languageName: node - linkType: hard - "@radix-ui/react-use-callback-ref@npm:1.0.1": version: 1.0.1 resolution: "@radix-ui/react-use-callback-ref@npm:1.0.1" @@ -4102,8 +3153,8 @@ __metadata: linkType: hard "@storybook/addon-actions@file:../../../code/addons/actions::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/addon-actions@file:../../../code/addons/actions#../../../code/addons/actions::hash=966388&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/addon-actions@file:../../../code/addons/actions#../../../code/addons/actions::hash=b9da55&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/core-events": "workspace:*" "@storybook/global": "npm:^5.0.0" @@ -4111,37 +3162,36 @@ __metadata: dequal: "npm:^2.0.2" polished: "npm:^4.2.2" uuid: "npm:^9.0.0" - checksum: 10/ed9d4c392a62f9869255be32f64ca2b02184f5ff8bc5af66c92d9268e5dca24cb96bb80b422f853d2638ad89ff227675b8c2f644d11c8f2a24a37ff23793cd9b + checksum: 10/f0f0b606135e2aa8194151f1f5aa49a477310b47674be4278d1aa33883c3f6778ba7c9789d55eb803b58294a02a49baac817ebfb63c121b3868ee140a2d24abc languageName: node linkType: hard "@storybook/addon-backgrounds@file:../../../code/addons/backgrounds::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/addon-backgrounds@file:../../../code/addons/backgrounds#../../../code/addons/backgrounds::hash=01e510&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/addon-backgrounds@file:../../../code/addons/backgrounds#../../../code/addons/backgrounds::hash=a37c81&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/global": "npm:^5.0.0" memoizerific: "npm:^1.11.3" ts-dedent: "npm:^2.0.0" - checksum: 10/ab6d7c92ac90fcd6791f49313394c19499b0b7e9683e1e3ea09842a939bbe85559ba9638194934cb128721a32c9b3397baf13ed6aabdac2b6128e48512b295af + checksum: 10/e3302e7396d4d1d9e251132502a4da6974bb3389ed60caa490d06ee5c5068192c1db0d2ee8561bd7248af26173a5dfafa6d34df0f1d20aa7558a3ed7e69f7483 languageName: node linkType: hard "@storybook/addon-controls@file:../../../code/addons/controls::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/addon-controls@file:../../../code/addons/controls#../../../code/addons/controls::hash=85cf2f&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/addon-controls@file:../../../code/addons/controls#../../../code/addons/controls::hash=4832b7&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/blocks": "workspace:*" dequal: "npm:^2.0.2" lodash: "npm:^4.17.21" - telejson: "npm:^7.2.0" ts-dedent: "npm:^2.0.0" - checksum: 10/2c33ed89e175f9a998776f653d1f9f7231465fb7db5cf647c9e3d1d93f35837e64ff3e723265d4cd1fa1b3e7a25b5163b79b0c99faa3d23fc0ff0c9905c634d2 + checksum: 10/28b6062822a84710a5b3c20499e135f16b3557a46e95b4e34c2c73048a9bac716f831aea2726cc4c7c35019f080f8a71bf41c4399461e7eff2fa4e485c82afce languageName: node linkType: hard "@storybook/addon-docs@file:../../../code/addons/docs::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/addon-docs@file:../../../code/addons/docs#../../../code/addons/docs::hash=1316f0&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/addon-docs@file:../../../code/addons/docs#../../../code/addons/docs::hash=3bd541&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@babel/core": "npm:^7.24.4" "@mdx-js/react": "npm:^3.0.0" @@ -4163,13 +3213,13 @@ __metadata: rehype-external-links: "npm:^3.0.0" rehype-slug: "npm:^6.0.0" ts-dedent: "npm:^2.0.0" - checksum: 10/e7f7fba777e2a06ceba3930da615587902410ee765776c02f7ae1be4864aca8990397c192064ab10ed1c67a40943d0e07b6833670d5a2b71c92c4ee74eb54659 + checksum: 10/d378fa76af992a6db3e5bb868a8a3696a1346e189f33f1690bc38ef673637fff1228093d6140fad2a65eed33fcec29411eebd699f7190b284e5c0d6221f3bbd9 languageName: node linkType: hard "@storybook/addon-essentials@file:../../../code/addons/essentials::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/addon-essentials@file:../../../code/addons/essentials#../../../code/addons/essentials::hash=716654&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/addon-essentials@file:../../../code/addons/essentials#../../../code/addons/essentials::hash=0216a0&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/addon-actions": "workspace:*" "@storybook/addon-backgrounds": "workspace:*" @@ -4185,22 +3235,22 @@ __metadata: "@storybook/node-logger": "workspace:*" "@storybook/preview-api": "workspace:*" ts-dedent: "npm:^2.0.0" - checksum: 10/c1b11269a0da8289306c112b360d2bb6f050aa99a5263be79fdc776bd519bf2a38a5c5659f6050b308f19a80c2862d6df56b7b679639d0ddf445bd7ca97850da + checksum: 10/b323aaf95b279c5ebc47f42d4990d10dadabbe0b6a78b4141cea0b7160b8d923ccf0286a0c3be24b1f4184d6697da8e028d2de86d4092999ddfc392aa22c4851 languageName: node linkType: hard "@storybook/addon-highlight@file:../../../code/addons/highlight::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/addon-highlight@file:../../../code/addons/highlight#../../../code/addons/highlight::hash=993b1b&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/addon-highlight@file:../../../code/addons/highlight#../../../code/addons/highlight::hash=66125f&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/global": "npm:^5.0.0" - checksum: 10/ab5eb230218718bfcf5505096d0745bb561c4109579e4c476d78ec7f73908e0decf292d21c4a635d98e369fc42a33d476649f2f8279b2ad7b9da69c32bc50368 + checksum: 10/8a4f45b46fa9d92da8a49508b812971fac787c461d02ac1fb8c9dec0540a746b03cc6aff90aad0e44ae37a3cd273232290c1305f8aa48180976ba34556a10206 languageName: node linkType: hard "@storybook/addon-interactions@file:../../../code/addons/interactions::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/addon-interactions@file:../../../code/addons/interactions#../../../code/addons/interactions::hash=397921&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/addon-interactions@file:../../../code/addons/interactions#../../../code/addons/interactions::hash=6c0526&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/global": "npm:^5.0.0" "@storybook/instrumenter": "workspace:*" @@ -4208,55 +3258,55 @@ __metadata: "@storybook/types": "workspace:*" polished: "npm:^4.2.2" ts-dedent: "npm:^2.2.0" - checksum: 10/b5ef21d4cc4c68de5b4bde6e2eba1b4ac149dfb49e0af3d963f40715c5b7b9ac065118e16edb3de26b78fc2ce4510ecbbef5229b0794b48c5f194a840e54704e + checksum: 10/15cace1941f8833e8f7876b6b0d64e644035e4c00fcf8312c712461d5747104f44157c62393ba80f774afdee89cda73b89f64573ae31289d7d77251b47a4d26c languageName: node linkType: hard "@storybook/addon-measure@file:../../../code/addons/measure::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/addon-measure@file:../../../code/addons/measure#../../../code/addons/measure::hash=29247d&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/addon-measure@file:../../../code/addons/measure#../../../code/addons/measure::hash=4f0a87&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/global": "npm:^5.0.0" tiny-invariant: "npm:^1.3.1" - checksum: 10/5e576ded94bd8b8f36f907073c7e1cbc3d3307763b685e2dac8298f099841fe846c9e0105e64f82ab9996adc94f962cea7406e300bb6b1ba75b01ffcce8af3ec + checksum: 10/a5a45dd08c63228997c72c9507eaf2085599bda4affb970fbef9f83ffeefddf703280bd893c43f1e3822750f30a5537c38df97cd151119b9e29f6a3df0c98882 languageName: node linkType: hard "@storybook/addon-outline@file:../../../code/addons/outline::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/addon-outline@file:../../../code/addons/outline#../../../code/addons/outline::hash=86d290&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/addon-outline@file:../../../code/addons/outline#../../../code/addons/outline::hash=3a5f47&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/global": "npm:^5.0.0" ts-dedent: "npm:^2.0.0" - checksum: 10/aee8785f7f242e0fb23070d7b31b64b922205b367f32d89d1ee3898469456a192a53377de5df67bcb024e92efdfc39e168bb7c5f9dc6bb3198854b56666a3d57 + checksum: 10/f849097853eadc387dafa4e43f0568d95d66d1bcbd4052f31ecec3162b00dd9396052edfad31d7e1e37992d63b3161579a257ad6c63791292212aa164d32d11f languageName: node linkType: hard "@storybook/addon-toolbars@file:../../../code/addons/toolbars::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/addon-toolbars@file:../../../code/addons/toolbars#../../../code/addons/toolbars::hash=2a1821&locator=portable-stories-nextjs%40workspace%3A." - checksum: 10/a03029b1e981a4e06e299e9c1181d36e23db739c1b1b8efd5ff181a6e3d9577d790ac69a3f10fc5b9580a95c193eee3e241f8a354022eddbaa8e2d81f3f75584 + version: 8.1.0-alpha.8 + resolution: "@storybook/addon-toolbars@file:../../../code/addons/toolbars#../../../code/addons/toolbars::hash=b6a54a&locator=portable-stories-nextjs%40workspace%3A." + checksum: 10/6c77dbacf71de4fbaa483d96c2204b972dc174f471ba0d329fcda297f776e5c4974a34a286fb5a6e2aac98742aac30076d41e3fc10aa3dc8ea93ebad02be55a7 languageName: node linkType: hard "@storybook/addon-viewport@file:../../../code/addons/viewport::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/addon-viewport@file:../../../code/addons/viewport#../../../code/addons/viewport::hash=f175c3&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/addon-viewport@file:../../../code/addons/viewport#../../../code/addons/viewport::hash=37a9a0&locator=portable-stories-nextjs%40workspace%3A." dependencies: memoizerific: "npm:^1.11.3" - checksum: 10/64f618b94952b6ff6f6db7357610c732663db5f95dfc3f72c21cf80317c827a18e9eebf3ca24f5b27426ac97628bb16bb15314f5f624ccc3e1219614a891ee3c + checksum: 10/7d9555343b3a6bffd174791510a7f859bc10c9a604390b8b8aa17ca10e545b8c74d7088555e5a7f32d31a9f0b894663cde38495781634094b7b1368861b5835c languageName: node linkType: hard "@storybook/blocks@file:../../../code/ui/blocks::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/blocks@file:../../../code/ui/blocks#../../../code/ui/blocks::hash=8fb5e1&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/blocks@file:../../../code/ui/blocks#../../../code/ui/blocks::hash=dfb3e3&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/channels": "workspace:*" "@storybook/client-logger": "workspace:*" "@storybook/components": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:^0.1.4" + "@storybook/csf": "npm:^0.1.6" "@storybook/docs-tools": "workspace:*" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" @@ -4277,20 +3327,20 @@ __metadata: ts-dedent: "npm:^2.0.0" util-deprecate: "npm:^1.0.2" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta peerDependenciesMeta: react: optional: true react-dom: optional: true - checksum: 10/714a875998da26fdc67047b372f4b79e20a59357fe6aa66444fef83ee827cba14a70c02e423b9867b96b3156705398c0a57c3f7b449bff0605169153530467de + checksum: 10/1b3d9215f8ce8118c5f91087c36b254d6c04c1edc3deca6f38d580536ba66030b4662b16dd8c739e6a826aa335381129d9a768a6bc3e30f1ce17175560fd8b1d languageName: node linkType: hard "@storybook/builder-manager@file:../../../code/builders/builder-manager::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/builder-manager@file:../../../code/builders/builder-manager#../../../code/builders/builder-manager::hash=1cb036&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/builder-manager@file:../../../code/builders/builder-manager#../../../code/builders/builder-manager::hash=1e3595&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@fal-works/esbuild-plugin-global-externals": "npm:^2.1.2" "@storybook/core-common": "workspace:*" @@ -4306,13 +3356,13 @@ __metadata: fs-extra: "npm:^11.1.0" process: "npm:^0.11.10" util: "npm:^0.12.4" - checksum: 10/d3a768b0b42d2537605b3b7832b21f6ebd9a5c6d207c6925db6ef3adb647a4af23bd42dbe86546d4ef18d2b13fa408da03ff06a8639ed0cf0c2c4cdcec5cdf1a + checksum: 10/873e49d5c796256ae0167ca108bc32761c18cd7c608e3fc802419d2f0d80e4829fcd16f5862d74b1133d437de6582bc10b0a5c3fdc21c6ba173e29b46264b7fc languageName: node linkType: hard "@storybook/builder-webpack5@file:../../../code/builders/builder-webpack5::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/builder-webpack5@file:../../../code/builders/builder-webpack5#../../../code/builders/builder-webpack5::hash=136502&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/builder-webpack5@file:../../../code/builders/builder-webpack5#../../../code/builders/builder-webpack5::hash=0d7bde&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/channels": "workspace:*" "@storybook/client-logger": "workspace:*" @@ -4351,26 +3401,26 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/8861a56b17ba33f3d60a993612ba641b12721fa67edddf2bb0274091463a9b875090d5cfd149198e1c4d2baadb96fcd435ddbcfc82b02525dbb67e4ea57348ae + checksum: 10/0eda4b592a443b46fc23b340d6dad854bb9ec9adab7558a143026df93adfe663b70eea4fcd529d6bf3908a95ca00235b25f245fbdbb8e171de76ed75f0aa10a1 languageName: node linkType: hard "@storybook/channels@file:../../../code/lib/channels::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/channels@file:../../../code/lib/channels#../../../code/lib/channels::hash=fcc84e&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/channels@file:../../../code/lib/channels#../../../code/lib/channels::hash=73568e&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" "@storybook/global": "npm:^5.0.0" telejson: "npm:^7.2.0" tiny-invariant: "npm:^1.3.1" - checksum: 10/ef037acc097c4018b7481776d677a5c93da9bb886b2548ab1fa5bf2de8c3e39be627f7a5751af9b8758837582ee7db872a025c02f5e00f29d253cd17828eb8ce + checksum: 10/179e00e7e630cad7910ea5579bbb1fefd01e7a2901764dc70bd36385c40453c248447f507b41c6ad441e6abfe00071cd6ca6b92de441665edf33b27ba5949602 languageName: node linkType: hard "@storybook/cli@file:../../../code/lib/cli::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/cli@file:../../../code/lib/cli#../../../code/lib/cli::hash=652a32&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/cli@file:../../../code/lib/cli#../../../code/lib/cli::hash=81176b&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@babel/core": "npm:^7.24.4" "@babel/types": "npm:^7.24.0" @@ -4411,27 +3461,27 @@ __metadata: bin: getstorybook: ./bin/index.js sb: ./bin/index.js - checksum: 10/a28b1d90beb3e8a3666823ff15b8ae4476fea15080e4e688834f684fe46917e06e6f9c1fd3c09d513d2a872ca3bd302a7a7bf76a4a0812e892d786ca29a1c451 + checksum: 10/22740bf20bde9cd2a4686e6d969802426946819f4b9e53e587627210817010a35f01cacfa65b940bde981b74397b61974a8f3ffba75ca1a0ba43798ed7c7d951 languageName: node linkType: hard "@storybook/client-logger@file:../../../code/lib/client-logger::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/client-logger@file:../../../code/lib/client-logger#../../../code/lib/client-logger::hash=28d039&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/client-logger@file:../../../code/lib/client-logger#../../../code/lib/client-logger::hash=e88f46&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/global": "npm:^5.0.0" - checksum: 10/5e11f5b9da08fe9be5be72b1bba63643444aee54b1bfb02b54281d8c5c757f791e5c2a45e7447c605a57ea787d9070384233b7d315f3fe16ac9e3c6e16dd4164 + checksum: 10/105c257d54b938a087b0d281675c7fcf30f81bed65e9ec469c6cc0607459401e601c518df69c1c1e258c3bfc0e5dd2bfb87188e9802d26be0082a1a4872b09ec languageName: node linkType: hard "@storybook/codemod@file:../../../code/lib/codemod::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/codemod@file:../../../code/lib/codemod#../../../code/lib/codemod::hash=f630a3&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/codemod@file:../../../code/lib/codemod#../../../code/lib/codemod::hash=63aa89&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@babel/core": "npm:^7.24.4" "@babel/preset-env": "npm:^7.24.4" "@babel/types": "npm:^7.24.0" - "@storybook/csf": "npm:^0.1.4" + "@storybook/csf": "npm:^0.1.6" "@storybook/csf-tools": "workspace:*" "@storybook/node-logger": "workspace:*" "@storybook/types": "workspace:*" @@ -4443,18 +3493,18 @@ __metadata: prettier: "npm:^3.1.1" recast: "npm:^0.23.5" tiny-invariant: "npm:^1.3.1" - checksum: 10/9c9e913b2bc43edc260a7957b6d88b95c1db6c3502227cd5f5c4ff8eb815d68fb2050ecab86bd8629c60a90ab384ac6d77006242bc6fbfbce9e632c59a9a73d2 + checksum: 10/1df0e0956ebe11de735e79fba85160137e81cffb6fc0bf283ef944c3548bf346d359dc15b1efef8a43feb90ea2f3a08c11d9b569dad2b5dd50827d7b8174081a languageName: node linkType: hard "@storybook/components@file:../../../code/ui/components::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/components@file:../../../code/ui/components#../../../code/ui/components::hash=59b042&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/components@file:../../../code/ui/components#../../../code/ui/components::hash=ebb913&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@radix-ui/react-dialog": "npm:^1.0.5" "@radix-ui/react-slot": "npm:^1.0.2" "@storybook/client-logger": "workspace:*" - "@storybook/csf": "npm:^0.1.4" + "@storybook/csf": "npm:^0.1.6" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" "@storybook/theming": "workspace:*" @@ -4462,15 +3512,15 @@ __metadata: memoizerific: "npm:^1.11.3" util-deprecate: "npm:^1.0.2" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10/67fcb9cf30da426ce2d5bbf6eaaecd27d7116c711bf4e9d57d79538cd430dca1d5a4d4d5fc396e558f880553d86b43b57c420f20e9516846208716ce514da265 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + checksum: 10/0ca50dee5300c7ee3e3dcf1254fbea295bed2073ac93d2fcc8f11e3e414c8df0aa52bcbb343aa4fe54aded249475614402224b30a32262382135a9d13a77d51c languageName: node linkType: hard "@storybook/core-common@file:../../../code/lib/core-common::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/core-common@file:../../../code/lib/core-common#../../../code/lib/core-common::hash=3637bb&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/core-common@file:../../../code/lib/core-common#../../../code/lib/core-common::hash=4b9205&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/core-events": "workspace:*" "@storybook/csf-tools": "workspace:*" @@ -4506,23 +3556,23 @@ __metadata: peerDependenciesMeta: prettier: optional: true - checksum: 10/444a8a07b4be1b80c65efaacedb81c59e69f954c8e8c77c7dbdf27a536f8dc44802d9684ece23266953b8849789f64d756daef02f4617203aa097464b3065863 + checksum: 10/7bcfd87d8c3aeed67e5a7b24195883082876293c21dfc557a0e6e79923dbc1319334d6ae17b68a0cdfd8851e807bf721a779a6d1bf3eeb447aad139c1a5270ef languageName: node linkType: hard "@storybook/core-events@file:../../../code/lib/core-events::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/core-events@file:../../../code/lib/core-events#../../../code/lib/core-events::hash=80b42e&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/core-events@file:../../../code/lib/core-events#../../../code/lib/core-events::hash=268cab&locator=portable-stories-nextjs%40workspace%3A." dependencies: - "@storybook/csf": "npm:^0.1.4" + "@storybook/csf": "npm:^0.1.5" ts-dedent: "npm:^2.0.0" - checksum: 10/614b861c1761ab86274f580c08d7c6841fe179cc475cc4c80ec4295549d6c842ff07bebf52351d0e7aedf9a027ddb6590ec76bca5ba80a4505dcaaea42fbc09f + checksum: 10/bc2e4e83c020265013ab285f519a192d2ab66c98bda3aea7b3526dbc65b786145f453ad1ffd8fdcf49f232303a49c8f9da7e0f2013fe98cff8d85c745da4f604 languageName: node linkType: hard "@storybook/core-server@file:../../../code/lib/core-server::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/core-server@file:../../../code/lib/core-server#../../../code/lib/core-server::hash=82fafe&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/core-server@file:../../../code/lib/core-server#../../../code/lib/core-server::hash=5e4c1b&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@aw-web-design/x-default-browser": "npm:1.4.126" "@babel/core": "npm:^7.24.4" @@ -4532,7 +3582,7 @@ __metadata: "@storybook/channels": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:^0.1.4" + "@storybook/csf": "npm:^0.1.6" "@storybook/csf-tools": "workspace:*" "@storybook/docs-mdx": "npm:3.0.0" "@storybook/global": "npm:^5.0.0" @@ -4570,47 +3620,47 @@ __metadata: util-deprecate: "npm:^1.0.2" watchpack: "npm:^2.2.0" ws: "npm:^8.2.3" - checksum: 10/630a8a4a9b0bf4c9912e4bf295df09a52f4f04976a82b212979e9f24e9b42480d37ca828fbcefbfce1409406e6225bc4e2e681ac4f7fe60626218e2b5e1fea04 + checksum: 10/78fccaf27af7c3dd9101ccdadb1c6ea8dc8e05d1ea1a664b32981de3ad945370889321eda5fd4a0b9a93370e55225edd7a926f9b52922ee984afec393d49d8a4 languageName: node linkType: hard "@storybook/core-webpack@file:../../../code/lib/core-webpack::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/core-webpack@file:../../../code/lib/core-webpack#../../../code/lib/core-webpack::hash=51f292&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/core-webpack@file:../../../code/lib/core-webpack#../../../code/lib/core-webpack::hash=ae9af3&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/core-common": "workspace:*" "@storybook/node-logger": "workspace:*" "@storybook/types": "workspace:*" "@types/node": "npm:^18.0.0" ts-dedent: "npm:^2.0.0" - checksum: 10/2aa3e59de39aeb2d32054fca48323e67057b3a57f17831584fcffea420833b668152edfd018e845f36995e5d50a15bd68a9f42c47da73e3be10149ee3ed13296 + checksum: 10/48a490e3a38053fcce8a60caa0ef26b7586a40353fc05e3d3f7c6f4f701b836a43ab933f489c618e0c166ba11da267f6c0c8c605e7b22c45b878b10a89ea7253 languageName: node linkType: hard "@storybook/csf-plugin@file:../../../code/lib/csf-plugin::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/csf-plugin@file:../../../code/lib/csf-plugin#../../../code/lib/csf-plugin::hash=959b31&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/csf-plugin@file:../../../code/lib/csf-plugin#../../../code/lib/csf-plugin::hash=35e0eb&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/csf-tools": "workspace:*" unplugin: "npm:^1.3.1" - checksum: 10/cd08a6fcfa7df93e1a2cad0e2d069a66fb4bf983132ed79cc0c6e410adb469f47e2f3d93742b4183ffe9bee2b9bd22493b42665e36b9f54e5194f9c7edebae28 + checksum: 10/3b66e55217452cd0c5c65ce8360fa21a1a2a30d87eadcee94dff8c7f3d73e9e88747d3b8d5d31b4a59b23f3c843f7437d994451e785cb4d3238155e4bc34bd67 languageName: node linkType: hard "@storybook/csf-tools@file:../../../code/lib/csf-tools::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/csf-tools@file:../../../code/lib/csf-tools#../../../code/lib/csf-tools::hash=25e230&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/csf-tools@file:../../../code/lib/csf-tools#../../../code/lib/csf-tools::hash=01a92f&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@babel/generator": "npm:^7.24.4" "@babel/parser": "npm:^7.24.4" "@babel/traverse": "npm:^7.24.1" "@babel/types": "npm:^7.24.0" - "@storybook/csf": "npm:^0.1.4" + "@storybook/csf": "npm:^0.1.6" "@storybook/types": "workspace:*" fs-extra: "npm:^11.1.0" recast: "npm:^0.23.5" ts-dedent: "npm:^2.0.0" - checksum: 10/ff70e6f6613a353423d84d2aaa09bf9c14a8eae1d9711bd35883931886a5ce489b17de8dcf042bfd798f8746ce3cba26cbbeba88b2252cbcacb326b301c131ba + checksum: 10/a9cd5fea8f214d5db6bd9d70259c986e44d926a7b46e3e174c7e99f176bf4a4ece8017d6f37542d029d648a7e21daa714dc89cabe16a6c06bbd3fe0522679ba7 languageName: node linkType: hard @@ -4623,12 +3673,12 @@ __metadata: languageName: node linkType: hard -"@storybook/csf@npm:^0.1.4": - version: 0.1.4 - resolution: "@storybook/csf@npm:0.1.4" +"@storybook/csf@npm:^0.1.5": + version: 0.1.7 + resolution: "@storybook/csf@npm:0.1.7" dependencies: type-fest: "npm:^2.19.0" - checksum: 10/105f3bd748613b775e87454a8470e36733d0ac25b4b88aa9dbebe060f92ff8d5fda1c98289657039d980ecc8d4d59079ef559a42e211568dc97e19d245117156 + checksum: 10/19dbd5c72a0c60e4b7cf0255fbbb74452172c03911d0236a0bd26c5e1d1453870800ebfbcd6afd455384fac30bbb5d261193ee2d455bd863344ceb96265139e3 languageName: node linkType: hard @@ -4649,8 +3699,8 @@ __metadata: linkType: hard "@storybook/docs-tools@file:../../../code/lib/docs-tools::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/docs-tools@file:../../../code/lib/docs-tools#../../../code/lib/docs-tools::hash=51a276&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/docs-tools@file:../../../code/lib/docs-tools#../../../code/lib/docs-tools::hash=169213&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" @@ -4660,7 +3710,7 @@ __metadata: assert: "npm:^2.1.0" doctrine: "npm:^3.0.0" lodash: "npm:^4.17.21" - checksum: 10/f6ed72e99322458ab189b667640d4612a3726db7b28fbcc25fa98ef89d20cb3377e776e3192866eca143823c2618406c0cda5dba1904ef461d79abebd4dcc5ab + checksum: 10/126fa8a296a7bb326dcac68d162d603d08ba9e6aecbe8bb8f19ba2153e1e725ed0a98dba720ec15dc5c6746d83ca7a15fc7a3d0095d3bbd8a6c7baec77d2aed4 languageName: node linkType: hard @@ -4682,8 +3732,8 @@ __metadata: linkType: hard "@storybook/instrumenter@file:../../../code/lib/instrumenter::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/instrumenter@file:../../../code/lib/instrumenter#../../../code/lib/instrumenter::hash=8415dd&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/instrumenter@file:../../../code/lib/instrumenter#../../../code/lib/instrumenter::hash=8c71cc&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/channels": "workspace:*" "@storybook/client-logger": "workspace:*" @@ -4692,18 +3742,18 @@ __metadata: "@storybook/preview-api": "workspace:*" "@vitest/utils": "npm:^1.3.1" util: "npm:^0.12.4" - checksum: 10/d04c25681234640b52bc1cce890d985bb06e69053038dfb16f46e5da2b9a634517d903e8e04d943e340acd884dd0ac54c5c2b0bd53a645ce00d0b73d429fdf9e + checksum: 10/2fdf837a7af5a1798760da57ab179caa83a21e7571d2b6a0c9f0e210fbcc3ca94c6133de5f55332f26276f859073b085f6ebea00d5b0efdda08038370ac1ebd5 languageName: node linkType: hard "@storybook/manager-api@file:../../../code/lib/manager-api::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/manager-api@file:../../../code/lib/manager-api#../../../code/lib/manager-api::hash=8452a7&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/manager-api@file:../../../code/lib/manager-api#../../../code/lib/manager-api::hash=0f951b&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/channels": "workspace:*" "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:^0.1.4" + "@storybook/csf": "npm:^0.1.6" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.5" "@storybook/router": "workspace:*" @@ -4715,20 +3765,20 @@ __metadata: store2: "npm:^2.14.2" telejson: "npm:^7.2.0" ts-dedent: "npm:^2.0.0" - checksum: 10/057ae6e615270b4ce7c3ae23ed22d5642f5c2bba1a6d1486ceba407ef09e03eae604ee59cdd1425a44023c19cf1a7106d95c77c07859ef801bcf74f900be31db + checksum: 10/03d6853e0a6ef4ce7c46ca7836a10d046a32fa71b36f31009ca79972a4f70a925678b49e09319779a8897ffdf14c024e532e1f6c4c3ee8f63dd58a248806686f languageName: node linkType: hard "@storybook/manager@file:../../../code/ui/manager::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/manager@file:../../../code/ui/manager#../../../code/ui/manager::hash=443ad8&locator=portable-stories-nextjs%40workspace%3A." - checksum: 10/b2e3fbd4455622dea0a484aff7f8d702029450722d3edb333dc9a2e9dda5cbcf8c09e43528d094da87e6ebd786997d33f4fd2f6756d49debd884db1853e2a0b6 + version: 8.1.0-alpha.8 + resolution: "@storybook/manager@file:../../../code/ui/manager#../../../code/ui/manager::hash=f4d35d&locator=portable-stories-nextjs%40workspace%3A." + checksum: 10/ce5fefd50361b0ec21d9594431e01e79c92af18a55100a3eb8132508523ade5289b8d66f8bc553ddb87e00a326717a6081b442a5b3c1bbfb6dc6910cfce82738 languageName: node linkType: hard "@storybook/nextjs@file:../../../code/frameworks/nextjs::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/nextjs@file:../../../code/frameworks/nextjs#../../../code/frameworks/nextjs::hash=4bedef&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/nextjs@file:../../../code/frameworks/nextjs#../../../code/frameworks/nextjs::hash=9ef0b7&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@babel/core": "npm:^7.24.4" "@babel/plugin-syntax-bigint": "npm:^7.8.3" @@ -4744,7 +3794,6 @@ __metadata: "@babel/preset-typescript": "npm:^7.24.1" "@babel/runtime": "npm:^7.24.4" "@pmmmwh/react-refresh-webpack-plugin": "npm:^0.5.11" - "@storybook/addon-actions": "workspace:*" "@storybook/builder-webpack5": "workspace:*" "@storybook/core-common": "workspace:*" "@storybook/core-events": "workspace:*" @@ -4752,6 +3801,7 @@ __metadata: "@storybook/preset-react-webpack": "workspace:*" "@storybook/preview-api": "workspace:*" "@storybook/react": "workspace:*" + "@storybook/test": "workspace:*" "@storybook/types": "workspace:*" "@types/node": "npm:^18.0.0" "@types/semver": "npm:^7.3.4" @@ -4777,8 +3827,8 @@ __metadata: tsconfig-paths-webpack-plugin: "npm:^4.0.1" peerDependencies: next: ^13.5.0 || ^14.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta webpack: ^5.0.0 dependenciesMeta: sharp: @@ -4788,20 +3838,20 @@ __metadata: optional: true webpack: optional: true - checksum: 10/bd08fb9ff000d4d03277dcadc2e242ece5113b9651d53b015921717da406a3c79d99cf160b2a3eb6fbc228dbb74d2f16c231cf0bc7344ebab7f331a47f6f6dce + checksum: 10/96391de73cb4e52ee40520f954685f730d914dd836869c03afb7c7281047fe1f1f22d5f72250ec893b6c2f55d2c9424a1c5dc8a3b02a938190135ac096d6e9c5 languageName: node linkType: hard "@storybook/node-logger@file:../../../code/lib/node-logger::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/node-logger@file:../../../code/lib/node-logger#../../../code/lib/node-logger::hash=9c930a&locator=portable-stories-nextjs%40workspace%3A." - checksum: 10/d0ad16cb66cf3fc9ae142413aa39bf7d985af6713f34beefe76f2742aa34e35707bbcf63b7660006d2c8b66be07f6e8f4838bc3d4e9218ed32f00f0e4caf68ca + version: 8.1.0-alpha.8 + resolution: "@storybook/node-logger@file:../../../code/lib/node-logger#../../../code/lib/node-logger::hash=1d7a14&locator=portable-stories-nextjs%40workspace%3A." + checksum: 10/8586f411d097587f2e25c1999ca9798b5ad8bf3790df2a461d71246f428bc4af757eb1e571820da3db13e89aa0dc2bdc8c614a98453fd55b56910465814e03e3 languageName: node linkType: hard "@storybook/preset-react-webpack@file:../../../code/presets/react-webpack::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/preset-react-webpack@file:../../../code/presets/react-webpack#../../../code/presets/react-webpack::hash=b22678&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/preset-react-webpack@file:../../../code/presets/react-webpack#../../../code/presets/react-webpack::hash=1f22ff&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/core-webpack": "workspace:*" "@storybook/docs-tools": "workspace:*" @@ -4819,23 +3869,23 @@ __metadata: tsconfig-paths: "npm:^4.2.0" webpack: "npm:5" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta peerDependenciesMeta: typescript: optional: true - checksum: 10/b3f09572a4497aabac169ff9f252b5d697351f112fc8ad47591546a504ed23ced549c60998073ebf924c868eb0a45c2e23ea8dca8a8803e066a989977416967f + checksum: 10/b634714dac65c0899ca429b328e3a8930d2cc436a95fd7387f98ff511c5dedd8c371466a52b05b27f3be2fa73033ea0906923144313ec03a690af17669d3c6c8 languageName: node linkType: hard "@storybook/preview-api@file:../../../code/lib/preview-api::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/preview-api@file:../../../code/lib/preview-api#../../../code/lib/preview-api::hash=c6c7d0&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/preview-api@file:../../../code/lib/preview-api#../../../code/lib/preview-api::hash=6e5acf&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/channels": "workspace:*" "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" - "@storybook/csf": "npm:^0.1.4" + "@storybook/csf": "npm:^0.1.6" "@storybook/global": "npm:^5.0.0" "@storybook/types": "workspace:*" "@types/qs": "npm:^6.9.5" @@ -4846,14 +3896,14 @@ __metadata: tiny-invariant: "npm:^1.3.1" ts-dedent: "npm:^2.0.0" util-deprecate: "npm:^1.0.2" - checksum: 10/f3f4b245024f4ad1a55b932815ae0c7da9f75a83e98f4d2103d09a239a16f4378bbcb191cb67a0a882d2dd755be3133c6baf82fe446af7e165f1476c606966e5 + checksum: 10/08f709f0b6ffe282122961b4f2b7fb885d8dc5dfe0d740495f03b5017469b61a8c6bc868a1a09d4994b711e5e5b47c725bc0c8e9d52fb87016ea867598a0c86f languageName: node linkType: hard "@storybook/preview@file:../../../code/lib/preview::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/preview@file:../../../code/lib/preview#../../../code/lib/preview::hash=97910c&locator=portable-stories-nextjs%40workspace%3A." - checksum: 10/765d33b8bbe183caf21dba08a93d96cfd4059b3267a7835464eeeffac1cab946ade3c4193185374b644c7abb630be54d36886a019fc94ffbaad82d8bb6f7eb4d + version: 8.1.0-alpha.8 + resolution: "@storybook/preview@file:../../../code/lib/preview#../../../code/lib/preview::hash=5d5460&locator=portable-stories-nextjs%40workspace%3A." + checksum: 10/bf442490e0d32f1c6db642fd38bd52a73dccabe09ddcb9e83cb9548dcd1ce789d1cab62ccf700670b0e91705d236cdbeea48db677cf45aac04d1f2c31614b130 languageName: node linkType: hard @@ -4876,18 +3926,18 @@ __metadata: linkType: hard "@storybook/react-dom-shim@file:../../../code/lib/react-dom-shim::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/react-dom-shim@file:../../../code/lib/react-dom-shim#../../../code/lib/react-dom-shim::hash=f93b2f&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/react-dom-shim@file:../../../code/lib/react-dom-shim#../../../code/lib/react-dom-shim::hash=4e9dd0&locator=portable-stories-nextjs%40workspace%3A." peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10/8f3a8451ae416d1b006910553477b48929f397f777e7bad1997c9f3d6edc9b8fb1911f5f21c17d687ae50e01423f8010ad4c7c48d50b73bc59259b1babb0134e + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + checksum: 10/1ee00bcb852ef2394d23ffb7de6d405f8068258bcba1b8219f8829d4617c3e413e27534cc8372320161819a99680c51acd698e080e1b424a9769dba287bff197 languageName: node linkType: hard "@storybook/react@file:../../../code/renderers/react::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/react@file:../../../code/renderers/react#../../../code/renderers/react::hash=cd73fa&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/react@file:../../../code/renderers/react#../../../code/renderers/react::hash=197c45&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/client-logger": "workspace:*" "@storybook/docs-tools": "workspace:*" @@ -4911,30 +3961,30 @@ __metadata: type-fest: "npm:~2.19" util-deprecate: "npm:^1.0.2" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta typescript: ">= 4.2.x" peerDependenciesMeta: typescript: optional: true - checksum: 10/834084c0092a8b179f7048c1111308b6a2381cf3ee119372ed2940833b02e13577b5bc334c3f14c3224bd2d8b786939a74fbaf4dea6e8423ff610b34047412b4 + checksum: 10/5025c15ece8c549033a2f9ab906d3c408eda9f2a52d0946fc382591ff52b438490b739dd878a4a34a7588fe074eec478e4731bc165ef1e3379e37e73c3767fae languageName: node linkType: hard "@storybook/router@file:../../../code/lib/router::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/router@file:../../../code/lib/router#../../../code/lib/router::hash=e80678&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/router@file:../../../code/lib/router#../../../code/lib/router::hash=835984&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/client-logger": "workspace:*" memoizerific: "npm:^1.11.3" qs: "npm:^6.10.0" - checksum: 10/93eb90aa2440b0a1b8533d3a51709d47f5cda489b604cf84926d382dd49286a1c9a1167f4b15c2764c9791033ea8cd288005541c72ef21b7a62dc33d89fbe151 + checksum: 10/1919deef969bb4ac7cb1c9f7cdead2b63060d3f9f3124b8193409caf00b82f9b40a8d489a7b0b005160d0992d2815189f300549acc1a9488c6c50d0c853c5a6a languageName: node linkType: hard "@storybook/telemetry@file:../../../code/lib/telemetry::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/telemetry@file:../../../code/lib/telemetry#../../../code/lib/telemetry::hash=cf20f8&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/telemetry@file:../../../code/lib/telemetry#../../../code/lib/telemetry::hash=f276b5&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/client-logger": "workspace:*" "@storybook/core-common": "workspace:*" @@ -4944,13 +3994,13 @@ __metadata: fetch-retry: "npm:^5.0.2" fs-extra: "npm:^11.1.0" read-pkg-up: "npm:^7.0.1" - checksum: 10/0e5c4cffe47aa7d5066b17a6504821dcffde1540aaf99ef072c29e787a7a07d2ea5bb5b1aa222d83d0b4f174129ae22d52a579e58cc3cc36b4452eadf1b85001 + checksum: 10/25ef32776a17061b4dd372053b0c600b0e5e2830a001bd7e7d02ba499c171af424c726abdd84d250cdb3e6313bb4f7b66738b516e9f049abb1f78a62941d6ba3 languageName: node linkType: hard "@storybook/test@file:../../../code/lib/test::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/test@file:../../../code/lib/test#../../../code/lib/test::hash=865200&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/test@file:../../../code/lib/test#../../../code/lib/test::hash=6d718b&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/client-logger": "workspace:*" "@storybook/core-events": "workspace:*" @@ -4962,38 +4012,38 @@ __metadata: "@vitest/expect": "npm:1.3.1" "@vitest/spy": "npm:^1.3.1" util: "npm:^0.12.4" - checksum: 10/1adbfa7043d22c19bfc0a5899082752f622e2b25b15a564e4f71b753834d4300a3b9ec3964445cab62fb1224e78f0d1297a4a0865860f90039df297f2145984f + checksum: 10/0d0f0047c94e680730b820024d88fc6235a0a1f1fe2211aa59ff6dfdb611ae3e128840f24b47f4e88dc4ebdcd4b32ce615fce6d996a7f35fa70a5bdf394ade85 languageName: node linkType: hard "@storybook/theming@file:../../../code/lib/theming::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/theming@file:../../../code/lib/theming#../../../code/lib/theming::hash=5ce8f7&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/theming@file:../../../code/lib/theming#../../../code/lib/theming::hash=98de3f&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" "@storybook/client-logger": "workspace:*" "@storybook/global": "npm:^5.0.0" memoizerific: "npm:^1.11.3" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta peerDependenciesMeta: react: optional: true react-dom: optional: true - checksum: 10/728b8c02ee168b384efcd376b9c90ce3e46ab301a7a58347669b2ac0ec71aba6f87238f1f5bbb4116d2f7d6c0a66abd514baddce2e30ffce61952852e94842ec + checksum: 10/2d8082070902a20374b54d49290c74e86de894291b2a97a461ac3e66e6d4ed2aac1a129dd9aa263fe16080b357c2eadbde6ece788c597e4fca8cdd7913a0a04d languageName: node linkType: hard "@storybook/types@file:../../../code/lib/types::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "@storybook/types@file:../../../code/lib/types#../../../code/lib/types::hash=23f842&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "@storybook/types@file:../../../code/lib/types#../../../code/lib/types::hash=e7dca0&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/channels": "workspace:*" "@types/express": "npm:^4.7.0" file-system-cache: "npm:2.3.0" - checksum: 10/27a50c8aa554c766a89eed019e7cb343777549015c19b8dd8bb84c2db72e2dc11ebacb55610173afd0fc97dc400f946b3f09ebd3e0123ee5cce014d3b37cebce + checksum: 10/d957f4d6c50ca0643ccd10b401cf26264a7b79eceaa34be27d7be10917080afd14cdd65bb825d33a0ae8cc190923902c5429cff0f6aaeb9db673887a58cf010d languageName: node linkType: hard @@ -6451,19 +5501,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs2@npm:^0.4.8": - version: 0.4.8 - resolution: "babel-plugin-polyfill-corejs2@npm:0.4.8" - dependencies: - "@babel/compat-data": "npm:^7.22.6" - "@babel/helper-define-polyfill-provider": "npm:^0.5.0" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/6b5a79bdc1c43edf857fd3a82966b3c7ff4a90eee00ca8d663e0a98304d6e285a05759d64a4dbc16e04a2a5ea1f248673d8bf789711be5e694e368f19884887c - languageName: node - linkType: hard - "babel-plugin-polyfill-corejs3@npm:^0.10.1, babel-plugin-polyfill-corejs3@npm:^0.10.4": version: 0.10.4 resolution: "babel-plugin-polyfill-corejs3@npm:0.10.4" @@ -6476,29 +5513,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs3@npm:^0.9.0": - version: 0.9.0 - resolution: "babel-plugin-polyfill-corejs3@npm:0.9.0" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.5.0" - core-js-compat: "npm:^3.34.0" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/efdf9ba82e7848a2c66e0522adf10ac1646b16f271a9006b61a22f976b849de22a07c54c8826887114842ccd20cc9a4617b61e8e0789227a74378ab508e715cd - languageName: node - linkType: hard - -"babel-plugin-polyfill-regenerator@npm:^0.5.5": - version: 0.5.5 - resolution: "babel-plugin-polyfill-regenerator@npm:0.5.5" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.5.0" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/3a9b4828673b23cd648dcfb571eadcd9d3fadfca0361d0a7c6feeb5a30474e92faaa49f067a6e1c05e49b6a09812879992028ff3ef3446229ff132d6e1de7eb6 - languageName: node - linkType: hard - "babel-plugin-polyfill-regenerator@npm:^0.6.1": version: 0.6.2 resolution: "babel-plugin-polyfill-regenerator@npm:0.6.2" @@ -6773,20 +5787,6 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.21.10, browserslist@npm:^4.22.2, browserslist@npm:^4.22.3": - version: 4.23.0 - resolution: "browserslist@npm:4.23.0" - dependencies: - caniuse-lite: "npm:^1.0.30001587" - electron-to-chromium: "npm:^1.4.668" - node-releases: "npm:^2.0.14" - update-browserslist-db: "npm:^1.0.13" - bin: - browserslist: cli.js - checksum: 10/496c3862df74565dd942b4ae65f502c575cbeba1fa4a3894dad7aa3b16130dc3033bc502d8848147f7b625154a284708253d9598bcdbef5a1e34cf11dc7bad8e - languageName: node - linkType: hard - "browserslist@npm:^4.21.10, browserslist@npm:^4.22.2, browserslist@npm:^4.22.3, browserslist@npm:^4.23.0": version: 4.23.0 resolution: "browserslist@npm:4.23.0" @@ -6938,13 +5938,6 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001579": - version: 1.0.30001611 - resolution: "caniuse-lite@npm:1.0.30001611" - checksum: 10/24710a9cc026e564508fad6905d93d2be14ff38af6e08dce651521e7f4e87b2d2863dd8976da5349173e0c10b47377634238890dc34aa6d44a4d0ca3b1f6e236 - languageName: node - linkType: hard - "caniuse-lite@npm:^1.0.30001579, caniuse-lite@npm:^1.0.30001587": version: 1.0.30001589 resolution: "caniuse-lite@npm:1.0.30001589" @@ -6952,13 +5945,6 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001587": - version: 1.0.30001589 - resolution: "caniuse-lite@npm:1.0.30001589" - checksum: 10/5e1d2eb7c32d48c52204227bc1377f0f4c758ef889c53b9b479e28470e7f82eb1db5853e7754be9600ee662ae32a1d58e8bef0fde6edab06322ddbabfd9d212f - languageName: node - linkType: hard - "case-sensitive-paths-webpack-plugin@npm:^2.4.0": version: 2.4.0 resolution: "case-sensitive-paths-webpack-plugin@npm:2.4.0" @@ -7404,15 +6390,6 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.34.0": - version: 3.36.0 - resolution: "core-js-compat@npm:3.36.0" - dependencies: - browserslist: "npm:^4.22.3" - checksum: 10/633c49a254fe48981057e33651e5a74a0a14f14731aa5afed5d2e61fbe3c5cbc116ffd4feaa158c683c40d6dc4fd2e6aa0ebe12c45d157cfa571309d08400c98 - languageName: node - linkType: hard - "core-js-compat@npm:^3.36.1": version: 3.37.0 resolution: "core-js-compat@npm:3.37.0" @@ -9101,7 +8078,6 @@ __metadata: resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: node-gyp: "npm:latest" - checksum: 10/undefined conditions: os=darwin languageName: node linkType: hard @@ -11119,17 +10095,6 @@ __metadata: languageName: node linkType: hard -"loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0": - version: 1.4.0 - resolution: "loose-envify@npm:1.4.0" - dependencies: - js-tokens: "npm:^3.0.0 || ^4.0.0" - bin: - loose-envify: cli.js - checksum: 10/6517e24e0cad87ec9888f500c5b5947032cdfe6ef65e1c1936a0c48a524b81e65542c9c3edc91c97d5bddc806ee2a985dbc79be89215d613b1de5db6d1cfe6f4 - languageName: node - linkType: hard - "loupe@npm:^2.3.6, loupe@npm:^2.3.7": version: 2.3.7 resolution: "loupe@npm:2.3.7" @@ -12391,7 +11356,6 @@ __metadata: react-dom: "npm:^18.2.0" storybook: "npm:^8.0.0" typescript: "npm:^5.2.2" - checksum: 10/undefined languageName: unknown linkType: soft @@ -13890,14 +12854,14 @@ __metadata: linkType: hard "storybook@file:../../../code/lib/cli-storybook::locator=portable-stories-nextjs%40workspace%3A.": - version: 8.1.0-alpha.7 - resolution: "storybook@file:../../../code/lib/cli-storybook#../../../code/lib/cli-storybook::hash=f4ae08&locator=portable-stories-nextjs%40workspace%3A." + version: 8.1.0-alpha.8 + resolution: "storybook@file:../../../code/lib/cli-storybook#../../../code/lib/cli-storybook::hash=e998b7&locator=portable-stories-nextjs%40workspace%3A." dependencies: "@storybook/cli": "workspace:*" bin: sb: ./index.js storybook: ./index.js - checksum: 10/4975a0a1000ff520cc202c55d6ba047b5fb2512a91d86d3c92fb90a894f3c7e2f1f482069ff3e88f076cd0984d2839c8a9800aa372e126b8827ff3448231281c + checksum: 10/1c486636d26cfc07d62cc381665644c08af34d11eef5cb417a5e9dbe52242236ff4c94fa5dd68024508b4155baf691a1b82c3149fe98778c6e87cc3ba8c78198 languageName: node linkType: hard @@ -14429,13 +13393,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.4.0": - version: 2.6.2 - resolution: "tslib@npm:2.6.2" - checksum: 10/bd26c22d36736513980091a1e356378e8b662ded04204453d353a7f34a4c21ed0afc59b5f90719d4ba756e581a162ecbf93118dc9c6be5acf70aa309188166ca - languageName: node - linkType: hard - "tsutils@npm:^3.21.0": version: 3.21.0 resolution: "tsutils@npm:3.21.0" From aad8a11dfbdced32e02a0ac3625997294088e9b5 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 7 May 2024 20:56:52 +0800 Subject: [PATCH 100/117] Fix CI? --- code/e2e-tests/tags.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/e2e-tests/tags.spec.ts b/code/e2e-tests/tags.spec.ts index 078c0fd360ff..da3637deb7e9 100644 --- a/code/e2e-tests/tags.spec.ts +++ b/code/e2e-tests/tags.spec.ts @@ -64,9 +64,9 @@ test.describe('tags', () => { const devAnchor = await root.locator('#anchor--lib-preview-api-tags-add--dev').all(); expect(devAnchor.length).toBe(0); - // NOTE: shows as primary story and also in stories + // FIXME: shows as primary story and also in stories, inconsistent btw dev/CI? const autodocsAnchor = await root.locator('#anchor--lib-preview-api-tags-add--autodocs').all(); - expect(autodocsAnchor.length).toBe(2); + expect(autodocsAnchor.length).not.toBe(0); const testAnchor = await root.locator('#anchor--lib-preview-api-tags-add--test').all(); expect(testAnchor.length).toBe(0); From 607c79013ae46cef95e5c6996c63525ee9c0809a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 7 May 2024 15:17:35 +0200 Subject: [PATCH 101/117] max of 5 concurrent tasks on CI Hoping this will fix this: https://app.circleci.com/pipelines/github/storybookjs/storybook/75841/workflows/a547be3c-f39c-456d-8d28-43851549667b/jobs/654395 --- scripts/utils/concurrency.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/utils/concurrency.ts b/scripts/utils/concurrency.ts index 781c7c0d6787..f82dd33462c5 100644 --- a/scripts/utils/concurrency.ts +++ b/scripts/utils/concurrency.ts @@ -4,4 +4,7 @@ import os from 'os'; * The maximum number of concurrent tasks we want to have on some CLI and CI tasks. * The amount of CPUS minus one, arbitrary limited to 15 to not overload CI executors. */ -export const maxConcurrentTasks = Math.min(Math.max(1, os.cpus().length - 1), 15); +export const maxConcurrentTasks = Math.min( + Math.max(1, os.cpus().length - 1), + process.env.CI ? 5 : 15 +); From b218ba41d2e5fbbab97d4960a787c9d932540e70 Mon Sep 17 00:00:00 2001 From: Rui Silva Date: Tue, 7 May 2024 14:28:51 +0100 Subject: [PATCH 102/117] fix: bump ejs to 3.1.10 --- code/builders/builder-manager/package.json | 2 +- code/yarn.lock | 15 +++++++++++++-- scripts/package.json | 2 +- scripts/yarn.lock | 15 +++++++++++++-- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/code/builders/builder-manager/package.json b/code/builders/builder-manager/package.json index a472f7c4f339..7fa51f8441a0 100644 --- a/code/builders/builder-manager/package.json +++ b/code/builders/builder-manager/package.json @@ -51,7 +51,7 @@ "@types/ejs": "^3.1.1", "@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.10", "browser-assert": "^1.2.1", - "ejs": "^3.1.8", + "ejs": "^3.1.10", "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0", "esbuild-plugin-alias": "^0.2.1", "express": "^4.17.3", diff --git a/code/yarn.lock b/code/yarn.lock index b75fd6be50c4..f0d0247178f3 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5635,7 +5635,7 @@ __metadata: "@types/ejs": "npm:^3.1.1" "@yarnpkg/esbuild-plugin-pnp": "npm:^3.0.0-rc.10" browser-assert: "npm:^1.2.1" - ejs: "npm:^3.1.8" + ejs: "npm:^3.1.10" esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0" esbuild-plugin-alias: "npm:^0.2.1" express: "npm:^4.17.3" @@ -13583,7 +13583,18 @@ __metadata: languageName: node linkType: hard -"ejs@npm:^3.1.7, ejs@npm:^3.1.8": +"ejs@npm:^3.1.10": + version: 3.1.10 + resolution: "ejs@npm:3.1.10" + dependencies: + jake: "npm:^10.8.5" + bin: + ejs: bin/cli.js + checksum: 10c0/52eade9e68416ed04f7f92c492183340582a36482836b11eab97b159fcdcfdedc62233a1bf0bf5e5e1851c501f2dca0e2e9afd111db2599e4e7f53ee29429ae1 + languageName: node + linkType: hard + +"ejs@npm:^3.1.7": version: 3.1.9 resolution: "ejs@npm:3.1.9" dependencies: diff --git a/scripts/package.json b/scripts/package.json index bf44133234b4..33f76813a950 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -121,7 +121,7 @@ "danger": "^11.2.6", "dataloader": "^2.2.2", "detect-port": "^1.3.0", - "ejs": "^3.1.8", + "ejs": "^3.1.10", "ejs-lint": "^2.0.0", "esbuild": "^0.20.1", "esbuild-plugin-alias": "^0.2.1", diff --git a/scripts/yarn.lock b/scripts/yarn.lock index fb585cb2070b..2c35285f4f8a 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -2769,7 +2769,7 @@ __metadata: danger: "npm:^11.2.6" dataloader: "npm:^2.2.2" detect-port: "npm:^1.3.0" - ejs: "npm:^3.1.8" + ejs: "npm:^3.1.10" ejs-lint: "npm:^2.0.0" esbuild: "npm:^0.20.1" esbuild-plugin-alias: "npm:^0.2.1" @@ -6302,7 +6302,18 @@ __metadata: languageName: node linkType: hard -"ejs@npm:^3.1.7, ejs@npm:^3.1.8": +"ejs@npm:^3.1.10": + version: 3.1.10 + resolution: "ejs@npm:3.1.10" + dependencies: + jake: "npm:^10.8.5" + bin: + ejs: bin/cli.js + checksum: 10c0/52eade9e68416ed04f7f92c492183340582a36482836b11eab97b159fcdcfdedc62233a1bf0bf5e5e1851c501f2dca0e2e9afd111db2599e4e7f53ee29429ae1 + languageName: node + linkType: hard + +"ejs@npm:^3.1.7": version: 3.1.9 resolution: "ejs@npm:3.1.9" dependencies: From 9c4a5e5b154e84c6040db3d5aa72e068100a77a9 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 7 May 2024 15:33:53 +0200 Subject: [PATCH 103/117] update comment --- scripts/utils/concurrency.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils/concurrency.ts b/scripts/utils/concurrency.ts index f82dd33462c5..f80487794555 100644 --- a/scripts/utils/concurrency.ts +++ b/scripts/utils/concurrency.ts @@ -2,7 +2,7 @@ import os from 'os'; /** * The maximum number of concurrent tasks we want to have on some CLI and CI tasks. - * The amount of CPUS minus one, arbitrary limited to 15 to not overload CI executors. + * The amount of CPUS minus one, arbitrary limited to 5 to not overload CI executors. */ export const maxConcurrentTasks = Math.min( Math.max(1, os.cpus().length - 1), From 2707c15ddaeff29659ea2483aaa9c617cdc70216 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Tue, 7 May 2024 10:17:49 +0200 Subject: [PATCH 104/117] Build: Add E2E tests for the module mocking stories --- code/e2e-tests/module-mocking.spec.ts | 49 +++++++++++++++++++ .../template/stories/before-each.stories.ts | 25 +++++++--- 2 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 code/e2e-tests/module-mocking.spec.ts diff --git a/code/e2e-tests/module-mocking.spec.ts b/code/e2e-tests/module-mocking.spec.ts new file mode 100644 index 000000000000..8b6b43713b61 --- /dev/null +++ b/code/e2e-tests/module-mocking.spec.ts @@ -0,0 +1,49 @@ +import { test, expect } from '@playwright/test'; +import process from 'process'; +import { SbPage } from './util'; + +const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; + +test.describe('module-mocking', () => { + test.beforeEach(async ({ page }) => { + await page.goto(storybookUrl); + + await new SbPage(page).waitUntilLoaded(); + }); + + test('should assert story lifecycle order', async ({ page }) => { + const sbPage = new SbPage(page); + + await sbPage.navigateToStory('lib/test/before-each', 'before-each-order'); + + await sbPage.viewAddonPanel('Actions'); + const logItem = await page.locator('#storybook-panel-root #panel-tab-content'); + await expect(logItem).toBeVisible(); + + const expectedTexts = [ + '1 - [from loaders]', + '2 - [from meta beforeEach]', + '3 - [from story beforeEach]', + '4 - [from decorator]', + '5 - [from onClick]', + ]; + + // Assert that each LI text content contains the expected text in order + for (let i = 0; i < expectedTexts.length; i++) { + const nthText = await logItem.locator(`li >> nth=${i}`).innerText(); + expect(nthText).toMatch(expectedTexts[i]); + } + }); + + test('should assert that utils import is mocked', async ({ page }) => { + const sbPage = new SbPage(page); + + await sbPage.navigateToStory('lib/test/module-mocking', 'basic'); + + await sbPage.viewAddonPanel('Actions'); + const logItem = await page.locator('#storybook-panel-root #panel-tab-content', { + hasText: 'foo: []', + }); + await expect(logItem).toBeVisible(); + }); +}); diff --git a/code/lib/test/template/stories/before-each.stories.ts b/code/lib/test/template/stories/before-each.stories.ts index 9af203a7baaf..a6f613e7698c 100644 --- a/code/lib/test/template/stories/before-each.stories.ts +++ b/code/lib/test/template/stories/before-each.stories.ts @@ -2,9 +2,12 @@ import { expect, mocked, getByRole, spyOn, userEvent } from '@storybook/test'; const meta = { component: globalThis.Components.Button, - beforeEach() { + loaders() { spyOn(console, 'log').mockName('console.log'); - console.log('first'); + console.log('1 - [from loaders]'); + }, + beforeEach() { + console.log('2 - [from meta beforeEach]'); }, }; @@ -15,17 +18,27 @@ export const BeforeEachOrder = { chromatic: { disable: true }, }, beforeEach() { - console.log('second'); + console.log('3 - [from story beforeEach]'); + }, + decorators: (StoryFn: any) => { + console.log('4 - [from decorator]'); + return StoryFn(); }, args: { label: 'Button', onClick: () => { - console.log('third'); + console.log('5 - [from onClick]'); }, }, - async play({ canvasElement }) { + async play({ canvasElement }: any) { await userEvent.click(getByRole(canvasElement, 'button')); - await expect(mocked(console.log).mock.calls).toEqual([['first'], ['second'], ['third']]); + await expect(mocked(console.log).mock.calls).toEqual([ + ['1 - [from loaders]'], + ['2 - [from meta beforeEach]'], + ['3 - [from story beforeEach]'], + ['4 - [from decorator]'], + ['5 - [from onClick]'], + ]); }, }; From 561ad9813eb7b67a3801f2e66d587553290830dd Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Tue, 7 May 2024 14:59:32 +0200 Subject: [PATCH 105/117] fix mock name --- code/lib/test/template/stories/utils.mock.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/test/template/stories/utils.mock.ts b/code/lib/test/template/stories/utils.mock.ts index 15c648e88c00..80fac1f308f2 100644 --- a/code/lib/test/template/stories/utils.mock.ts +++ b/code/lib/test/template/stories/utils.mock.ts @@ -1,4 +1,4 @@ import { fn } from '@storybook/test'; import * as utils from './utils'; -export const foo = fn(utils.foo); +export const foo = fn(utils.foo).mockName('foo'); From 0ac197dba959871ed30d98fce2c1738db9dd0238 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 7 May 2024 15:31:00 +0200 Subject: [PATCH 106/117] Fix CRA not respecting storybook import condition names. --- code/presets/create-react-app/src/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/presets/create-react-app/src/index.ts b/code/presets/create-react-app/src/index.ts index 2fc78a1cfa0d..a6664fded0e7 100644 --- a/code/presets/create-react-app/src/index.ts +++ b/code/presets/create-react-app/src/index.ts @@ -126,6 +126,14 @@ const webpack = async ( ...getModulePath(CWD), ], plugins: [PnpWebpackPlugin as any], + // manual copy from builder-webpack because defaults are disabled in this CRA preset + conditionNames: [ + ...(webpackConfig.resolve?.conditionNames ?? []), + 'storybook', + 'stories', + 'test', + '...', + ], }, resolveLoader, } as Configuration; From 14f86ecbe076b4f4db138362219c06329eb4aff8 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 7 May 2024 22:17:23 +0800 Subject: [PATCH 107/117] Fix tags stories --- code/lib/preview-api/template/stories/tags-config.stories.ts | 4 ++-- code/lib/preview-api/template/stories/tags-remove.stories.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/lib/preview-api/template/stories/tags-config.stories.ts b/code/lib/preview-api/template/stories/tags-config.stories.ts index a73a08954784..e36784304d39 100644 --- a/code/lib/preview-api/template/stories/tags-config.stories.ts +++ b/code/lib/preview-api/template/stories/tags-config.stories.ts @@ -16,11 +16,11 @@ export default { }; export const Inheritance = { - tags: ['story-one', 'story-two'], + tags: ['story-one'], play: async ({ canvasElement }: PlayFunctionContext) => { const canvas = within(canvasElement); await expect(JSON.parse(canvas.getByTestId('pre').innerText)).toEqual({ - tags: ['dev', 'test', 'component-one', 'component-two', 'story-one', 'story-two'], + tags: ['dev', 'test', 'component-one', 'component-two', 'autodocs', 'story-one'], }); }, parameters: { chromatic: { disable: false } }, diff --git a/code/lib/preview-api/template/stories/tags-remove.stories.ts b/code/lib/preview-api/template/stories/tags-remove.stories.ts index 3d05b98d2dbf..852d4f63585d 100644 --- a/code/lib/preview-api/template/stories/tags-remove.stories.ts +++ b/code/lib/preview-api/template/stories/tags-remove.stories.ts @@ -20,7 +20,7 @@ export const Inheritance = { play: async ({ canvasElement }: PlayFunctionContext) => { const canvas = within(canvasElement); await expect(JSON.parse(canvas.getByTestId('pre').innerText)).toEqual({ - tags: ['dev', 'test', 'component-one', 'story-one', 'autodocs'], + tags: ['dev', 'test', 'component-one', 'autodocs', 'story-one'], }); }, parameters: { chromatic: { disable: false } }, From 25ed3c27a24362beb3e2d3f3a820ab298e6282a3 Mon Sep 17 00:00:00 2001 From: Kyle Gach Date: Tue, 7 May 2024 09:20:43 -0600 Subject: [PATCH 108/117] Snippetize examples --- .../angular/tags-autodocs-in-meta.ts.mdx | 13 ++ .../tags-autodocs-remove-component.ts.mdx | 13 ++ .../angular/tags-autodocs-remove-story.ts.mdx | 20 ++ .../angular/tags-combo-example.ts.mdx | 41 ++++ .../angular/tags-docs-only-in-meta.ts.mdx | 17 ++ .../angular/tags-in-meta-and-story.ts.mdx | 31 +++ .../angular/tags-remove-in-story.ts.mdx | 23 +++ .../common/tags-autodocs-in-meta.js.mdx | 10 + .../common/tags-autodocs-in-meta.ts-4-9.mdx | 14 ++ .../common/tags-autodocs-in-meta.ts.mdx | 14 ++ .../common/tags-autodocs-in-preview.js.mdx | 8 + .../common/tags-autodocs-in-preview.ts.mdx | 13 ++ .../tags-autodocs-remove-component.js.mdx | 10 + .../tags-autodocs-remove-component.ts-4-9.mdx | 14 ++ .../tags-autodocs-remove-component.ts.mdx | 14 ++ .../common/tags-autodocs-remove-story.js.mdx | 15 ++ .../tags-autodocs-remove-story.ts-4-9.mdx | 21 ++ .../common/tags-autodocs-remove-story.ts.mdx | 21 ++ .../common/tags-docs-only-in-meta.js.mdx | 14 ++ .../common/tags-docs-only-in-meta.ts-4-9.mdx | 18 ++ .../common/tags-docs-only-in-meta.ts.mdx | 18 ++ .../common/tags-in-meta-and-story.js.mdx | 26 +++ .../common/tags-in-meta-and-story.ts-4-9.mdx | 32 ++++ .../common/tags-in-meta-and-story.ts.mdx | 32 ++++ docs/snippets/common/tags-in-preview.js.mdx | 13 ++ docs/snippets/common/tags-in-preview.ts.mdx | 18 ++ .../common/tags-remove-in-story.js.mdx | 18 ++ .../common/tags-remove-in-story.ts-4-9.mdx | 24 +++ .../common/tags-remove-in-story.ts.mdx | 24 +++ docs/snippets/react/tags-combo-example.js.mdx | 34 ++++ .../react/tags-combo-example.ts-4-9.mdx | 39 ++++ docs/snippets/react/tags-combo-example.ts.mdx | 39 ++++ docs/snippets/solid/tags-combo-example.js.mdx | 34 ++++ .../solid/tags-combo-example.ts-4-9.mdx | 39 ++++ docs/snippets/solid/tags-combo-example.ts.mdx | 39 ++++ docs/snippets/vue/tags-combo-example.js.mdx | 37 ++++ .../vue/tags-combo-example.ts-4-9.mdx | 42 ++++ docs/snippets/vue/tags-combo-example.ts.mdx | 42 ++++ .../tags-autodocs-in-meta.js.mdx | 9 + .../tags-autodocs-in-meta.ts.mdx | 12 ++ .../tags-autodocs-remove-component.js.mdx | 9 + .../tags-autodocs-remove-component.ts.mdx | 12 ++ .../tags-autodocs-remove-story.js.mdx | 14 ++ .../tags-autodocs-remove-story.ts.mdx | 19 ++ .../web-components/tags-combo-example.js.mdx | 35 ++++ .../web-components/tags-combo-example.ts.mdx | 39 ++++ .../tags-docs-only-in-meta.js.mdx | 13 ++ .../tags-docs-only-in-meta.ts.mdx | 16 ++ .../tags-in-meta-and-story.js.mdx | 25 +++ .../tags-in-meta-and-story.ts.mdx | 30 +++ .../tags-remove-in-story.js.mdx | 17 ++ .../tags-remove-in-story.ts.mdx | 22 +++ docs/writing-docs/autodocs.md | 90 ++++----- docs/writing-stories/tags.md | 179 ++++++------------ 54 files changed, 1269 insertions(+), 166 deletions(-) create mode 100644 docs/snippets/angular/tags-autodocs-in-meta.ts.mdx create mode 100644 docs/snippets/angular/tags-autodocs-remove-component.ts.mdx create mode 100644 docs/snippets/angular/tags-autodocs-remove-story.ts.mdx create mode 100644 docs/snippets/angular/tags-combo-example.ts.mdx create mode 100644 docs/snippets/angular/tags-docs-only-in-meta.ts.mdx create mode 100644 docs/snippets/angular/tags-in-meta-and-story.ts.mdx create mode 100644 docs/snippets/angular/tags-remove-in-story.ts.mdx create mode 100644 docs/snippets/common/tags-autodocs-in-meta.js.mdx create mode 100644 docs/snippets/common/tags-autodocs-in-meta.ts-4-9.mdx create mode 100644 docs/snippets/common/tags-autodocs-in-meta.ts.mdx create mode 100644 docs/snippets/common/tags-autodocs-in-preview.js.mdx create mode 100644 docs/snippets/common/tags-autodocs-in-preview.ts.mdx create mode 100644 docs/snippets/common/tags-autodocs-remove-component.js.mdx create mode 100644 docs/snippets/common/tags-autodocs-remove-component.ts-4-9.mdx create mode 100644 docs/snippets/common/tags-autodocs-remove-component.ts.mdx create mode 100644 docs/snippets/common/tags-autodocs-remove-story.js.mdx create mode 100644 docs/snippets/common/tags-autodocs-remove-story.ts-4-9.mdx create mode 100644 docs/snippets/common/tags-autodocs-remove-story.ts.mdx create mode 100644 docs/snippets/common/tags-docs-only-in-meta.js.mdx create mode 100644 docs/snippets/common/tags-docs-only-in-meta.ts-4-9.mdx create mode 100644 docs/snippets/common/tags-docs-only-in-meta.ts.mdx create mode 100644 docs/snippets/common/tags-in-meta-and-story.js.mdx create mode 100644 docs/snippets/common/tags-in-meta-and-story.ts-4-9.mdx create mode 100644 docs/snippets/common/tags-in-meta-and-story.ts.mdx create mode 100644 docs/snippets/common/tags-in-preview.js.mdx create mode 100644 docs/snippets/common/tags-in-preview.ts.mdx create mode 100644 docs/snippets/common/tags-remove-in-story.js.mdx create mode 100644 docs/snippets/common/tags-remove-in-story.ts-4-9.mdx create mode 100644 docs/snippets/common/tags-remove-in-story.ts.mdx create mode 100644 docs/snippets/react/tags-combo-example.js.mdx create mode 100644 docs/snippets/react/tags-combo-example.ts-4-9.mdx create mode 100644 docs/snippets/react/tags-combo-example.ts.mdx create mode 100644 docs/snippets/solid/tags-combo-example.js.mdx create mode 100644 docs/snippets/solid/tags-combo-example.ts-4-9.mdx create mode 100644 docs/snippets/solid/tags-combo-example.ts.mdx create mode 100644 docs/snippets/vue/tags-combo-example.js.mdx create mode 100644 docs/snippets/vue/tags-combo-example.ts-4-9.mdx create mode 100644 docs/snippets/vue/tags-combo-example.ts.mdx create mode 100644 docs/snippets/web-components/tags-autodocs-in-meta.js.mdx create mode 100644 docs/snippets/web-components/tags-autodocs-in-meta.ts.mdx create mode 100644 docs/snippets/web-components/tags-autodocs-remove-component.js.mdx create mode 100644 docs/snippets/web-components/tags-autodocs-remove-component.ts.mdx create mode 100644 docs/snippets/web-components/tags-autodocs-remove-story.js.mdx create mode 100644 docs/snippets/web-components/tags-autodocs-remove-story.ts.mdx create mode 100644 docs/snippets/web-components/tags-combo-example.js.mdx create mode 100644 docs/snippets/web-components/tags-combo-example.ts.mdx create mode 100644 docs/snippets/web-components/tags-docs-only-in-meta.js.mdx create mode 100644 docs/snippets/web-components/tags-docs-only-in-meta.ts.mdx create mode 100644 docs/snippets/web-components/tags-in-meta-and-story.js.mdx create mode 100644 docs/snippets/web-components/tags-in-meta-and-story.ts.mdx create mode 100644 docs/snippets/web-components/tags-remove-in-story.js.mdx create mode 100644 docs/snippets/web-components/tags-remove-in-story.ts.mdx diff --git a/docs/snippets/angular/tags-autodocs-in-meta.ts.mdx b/docs/snippets/angular/tags-autodocs-in-meta.ts.mdx new file mode 100644 index 000000000000..1afc429fd28b --- /dev/null +++ b/docs/snippets/angular/tags-autodocs-in-meta.ts.mdx @@ -0,0 +1,13 @@ +```ts +// Button.stories.ts +import type { Meta } from '@storybook/angular'; + +import { Button } from './Button'; + +const meta: Meta )}
+ + + + + +
@@ -280,11 +286,6 @@ export const WriteStoriesModal: FC = ({ ) : null)} - - - - -
diff --git a/code/ui/components/src/components/Modal/Modal.styled.tsx b/code/ui/components/src/components/Modal/Modal.styled.tsx index b60e512b74ab..07dd2f66d44c 100644 --- a/code/ui/components/src/components/Modal/Modal.styled.tsx +++ b/code/ui/components/src/components/Modal/Modal.styled.tsx @@ -101,6 +101,8 @@ export const Title = styled(Dialog.Title)(({ theme }) => ({ })); export const Description = styled(Dialog.Description)(({ theme }) => ({ + position: 'relative', + zIndex: 1, margin: 0, fontSize: theme.typography.size.s2, })); From 15a49b4644cb792d48f81fb9a46177d87b0f208f Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 9 May 2024 11:30:54 +0200 Subject: [PATCH 116/117] remove link to missing portable stories docs --- .../src/modules/store/csf/portable-stories.test.ts | 3 +-- .../preview-api/src/modules/store/csf/portable-stories.ts | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/code/lib/preview-api/src/modules/store/csf/portable-stories.test.ts b/code/lib/preview-api/src/modules/store/csf/portable-stories.test.ts index 9322d3c9d2a3..6babf08285ec 100644 --- a/code/lib/preview-api/src/modules/store/csf/portable-stories.test.ts +++ b/code/lib/preview-api/src/modules/store/csf/portable-stories.test.ts @@ -292,8 +292,7 @@ describe('composeStory', () => { ` "Some stories were not cleaned up before rendering 'Unnamed Story (firstArg, secondArg)'. - You should load the story with \`await Story.load()\` before rendering it. - See https://storybook.js.org/docs/api/portable-stories-vitest#3-load for more information." + You should load the story with \`await Story.load()\` before rendering it." ` ); }); diff --git a/code/lib/preview-api/src/modules/store/csf/portable-stories.ts b/code/lib/preview-api/src/modules/store/csf/portable-stories.ts index a4385605685e..056daa5dcbcb 100644 --- a/code/lib/preview-api/src/modules/store/csf/portable-stories.ts +++ b/code/lib/preview-api/src/modules/store/csf/portable-stories.ts @@ -142,11 +142,10 @@ export function composeStory Date: Thu, 9 May 2024 10:59:29 +0000 Subject: [PATCH 117/117] Write changelog for 8.1.0-beta.0 [skip ci] --- CHANGELOG.prerelease.md | 11 +++++++++++ code/package.json | 3 ++- docs/versions/next.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.prerelease.md b/CHANGELOG.prerelease.md index 47702f63d66b..ec494b121e3c 100644 --- a/CHANGELOG.prerelease.md +++ b/CHANGELOG.prerelease.md @@ -1,3 +1,14 @@ +## 8.1.0-beta.0 + +- Dependencies: Upgrade `@joshwooding/vite-plugin-react-docgen-typescript` to `0.3.1` - [#26673](https://github.com/storybookjs/storybook/pull/26673), thanks @joshwooding! +- Dependencies: Upgrade `ejs` to `3.1.10` - [#27054](https://github.com/storybookjs/storybook/pull/27054), thanks @RiuSalvi! +- Nextjs: Implement next redirect and the RedirectBoundary - [#27050](https://github.com/storybookjs/storybook/pull/27050), thanks @yannbf! +- Onboarding: Improve UI - [#27074](https://github.com/storybookjs/storybook/pull/27074), thanks @ndelangen! +- Portable Stories: Remove link to missing docs - [#27075](https://github.com/storybookjs/storybook/pull/27075), thanks @JReinhold! +- React: Support v19 betas in peer dependencies - [#26960](https://github.com/storybookjs/storybook/pull/26960), thanks @JReinhold! +- Tags: Add project tags, negation, `dev`/`autodocs`/`test` system tags - [#26634](https://github.com/storybookjs/storybook/pull/26634), thanks @shilman! +- UI: Fix panel layout resizing do not apply when done too fast - [#26460](https://github.com/storybookjs/storybook/pull/26460), thanks @jorge-ji! + ## 8.1.0-alpha.8 - Addon-actions: Fix falsy args printing as object - 22163 - [#26917](https://github.com/storybookjs/storybook/pull/26917), thanks @Fatcat560! diff --git a/code/package.json b/code/package.json index 0444fc8fd4df..81083a0602e3 100644 --- a/code/package.json +++ b/code/package.json @@ -299,5 +299,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "8.1.0-beta.0" } diff --git a/docs/versions/next.json b/docs/versions/next.json index 0b1db18172a4..f518dcb24006 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1 @@ -{"version":"8.1.0-alpha.8","info":{"plain":"- Addon-actions: Fix falsy args printing as object - 22163 - [#26917](https://github.com/storybookjs/storybook/pull/26917), thanks @Fatcat560!\n- Addon-docs: Fix MDX compilation with `@vitejs/plugin-react-swc` and plugins - [#26837](https://github.com/storybookjs/storybook/pull/26837), thanks @JReinhold!\n- Automigration: Fix name of VTA addon - [#26816](https://github.com/storybookjs/storybook/pull/26816), thanks @valentinpalkovic!\n- Blocks: Add `of` prop to `Subtitle` - [#22552](https://github.com/storybookjs/storybook/pull/22552), thanks @joaonunomota!\n- Blocks: Add `of` prop to `Title` - [#23728](https://github.com/storybookjs/storybook/pull/23728), thanks @Sidnioulz!\n- CSF: Fix typings for control and other properties of argTypes - [#26824](https://github.com/storybookjs/storybook/pull/26824), thanks @kasperpeulen!\n- Controls: Added server channel to create a new story - [#26769](https://github.com/storybookjs/storybook/pull/26769), thanks @valentinpalkovic!\n- Controls: Fix crashing when docgen extraction partially fails - [#26862](https://github.com/storybookjs/storybook/pull/26862), thanks @yannbf!\n- Core: Drop unneeded `UPDATE_STORY_ARGS` which was for SSv6 - [#25993](https://github.com/storybookjs/storybook/pull/25993), thanks @tmeasday!\n- Core: Ensure that simultaneous onStoriesChanged don't clobber each other - [#26882](https://github.com/storybookjs/storybook/pull/26882), thanks @tmeasday!\n- Core: Fix filters not being applied in WebKit - [#26949](https://github.com/storybookjs/storybook/pull/26949), thanks @JReinhold!\n- Core: Implement file formatter - [#26809](https://github.com/storybookjs/storybook/pull/26809), thanks @valentinpalkovic!\n- Core: Save from controls - [#26827](https://github.com/storybookjs/storybook/pull/26827), thanks @ndelangen!\n- Dependencies: Upgrade @storybook/csf to 0.1.5 - [#26958](https://github.com/storybookjs/storybook/pull/26958), thanks @Cherry!\n- Doc Tools: Signature Type Error Handling - [#26774](https://github.com/storybookjs/storybook/pull/26774), thanks @ethriel3695!\n- Docs: Fix providerImportSource extension - [#26868](https://github.com/storybookjs/storybook/pull/26868), thanks @bashmish!\n- MDX: Don't transform `http://` links - [#26488](https://github.com/storybookjs/storybook/pull/26488), thanks @JReinhold!\n- Next.js: Move sharp into optional deps - [#26787](https://github.com/storybookjs/storybook/pull/26787), thanks @shuta13!\n- Next.js: Support v14.2 useParams functionality - [#26874](https://github.com/storybookjs/storybook/pull/26874), thanks @yannbf!\n- Nextjs: Implement next redirect and the RedirectBoundary - [#26886](https://github.com/storybookjs/storybook/pull/26886), thanks @kasperpeulen!\n- Portable Stories: Warn when rendering stories without cleaning up first - [#27008](https://github.com/storybookjs/storybook/pull/27008), thanks @JReinhold!\n- React: Support v19 in `react-dom-shim` - [#26898](https://github.com/storybookjs/storybook/pull/26898), thanks @Tobbe!\n- Revert \\\"Nextjs: Implement next redirect and the RedirectBoundary\\\" - [#27025](https://github.com/storybookjs/storybook/pull/27025), thanks @JReinhold!\n- SfC: Implement new feature to create new story files - [#26875](https://github.com/storybookjs/storybook/pull/26875), thanks @valentinpalkovic!\n- Test: Remove chai as dependency of @storybook/test - [#26852](https://github.com/storybookjs/storybook/pull/26852), thanks @kasperpeulen!\n- Test: Support module mocking with conditional subpath imports in `package.json` - [#26688](https://github.com/storybookjs/storybook/pull/26688), thanks @kasperpeulen!\n- UI: Fix not re-rendering tabs on state change - [#26899](https://github.com/storybookjs/storybook/pull/26899), thanks @lifeiscontent!\n- UI: Fix sidebar search hanging when selecting a story in touch mode - [#26807](https://github.com/storybookjs/storybook/pull/26807), thanks @JReinhold!\n- Vite: Merge assetsInclude property with Storybook default values - [#26860](https://github.com/storybookjs/storybook/pull/26860), thanks @yuemori!"}} +{"version":"8.1.0-beta.0","info":{"plain":"- Dependencies: Upgrade `@joshwooding/vite-plugin-react-docgen-typescript` to `0.3.1` - [#26673](https://github.com/storybookjs/storybook/pull/26673), thanks @joshwooding!\n- Dependencies: Upgrade `ejs` to `3.1.10` - [#27054](https://github.com/storybookjs/storybook/pull/27054), thanks @RiuSalvi!\n- Nextjs: Implement next redirect and the RedirectBoundary - [#27050](https://github.com/storybookjs/storybook/pull/27050), thanks @yannbf!\n- Onboarding: Improve UI - [#27074](https://github.com/storybookjs/storybook/pull/27074), thanks @ndelangen!\n- Portable Stories: Remove link to missing docs - [#27075](https://github.com/storybookjs/storybook/pull/27075), thanks @JReinhold!\n- React: Support v19 betas in peer dependencies - [#26960](https://github.com/storybookjs/storybook/pull/26960), thanks @JReinhold!\n- Tags: Add project tags, negation, `dev`/`autodocs`/`test` system tags - [#26634](https://github.com/storybookjs/storybook/pull/26634), thanks @shilman!\n- UI: Fix panel layout resizing do not apply when done too fast - [#26460](https://github.com/storybookjs/storybook/pull/26460), thanks @jorge-ji!"}}