@repobuddy/storybook 2.30.1 → 2.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/index.js
CHANGED
|
@@ -144,9 +144,9 @@ function StoryCardContainer({ children }) {
|
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
function entryPropsEqual(a, b) {
|
|
147
|
-
return a.Story === b.Story && a.title === b.title && a.status === b.status && a.appearance === b.appearance && a.className === b.className && a.content === b.content;
|
|
147
|
+
return a.Story === b.Story && a.args === b.args && a.title === b.title && a.status === b.status && a.appearance === b.appearance && a.className === b.className && a.content === b.content;
|
|
148
148
|
}
|
|
149
|
-
const StoryCardCollector = memo(function StoryCardCollector({ Story, title, status, appearance, className, content }) {
|
|
149
|
+
const StoryCardCollector = memo(function StoryCardCollector({ Story, args: _args, title, status, appearance, className, content }) {
|
|
150
150
|
const context = useContext(StoryCardRegistryContext);
|
|
151
151
|
const cardIdRef = useRef(null);
|
|
152
152
|
const entry = useMemo(() => ({
|
|
@@ -349,7 +349,7 @@ function showDocSource(options) {
|
|
|
349
349
|
*/
|
|
350
350
|
function withStoryCard({ title, status, appearance, content: contentProp, className, ...rest } = {}) {
|
|
351
351
|
if (isRunningInTest()) return (Story) => /* @__PURE__ */ jsx(Story, {});
|
|
352
|
-
return (Story, { parameters, viewMode }) => {
|
|
352
|
+
return (Story, { parameters, viewMode, args }) => {
|
|
353
353
|
if (viewMode === "docs") return /* @__PURE__ */ jsx(Story, {});
|
|
354
354
|
const storyCardParam = parameters.storyCard;
|
|
355
355
|
const finalTitle = title ?? storyCardParam?.title;
|
|
@@ -361,6 +361,7 @@ function withStoryCard({ title, status, appearance, content: contentProp, classN
|
|
|
361
361
|
if (!content && !finalTitle) return /* @__PURE__ */ jsx(Story, {});
|
|
362
362
|
return /* @__PURE__ */ jsx(StoryCardScope, {
|
|
363
363
|
Story,
|
|
364
|
+
args,
|
|
364
365
|
content,
|
|
365
366
|
title: finalTitle,
|
|
366
367
|
status: finalStatus,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobuddy/storybook",
|
|
3
|
-
"version": "2.30.
|
|
3
|
+
"version": "2.30.2",
|
|
4
4
|
"description": "Storybook repo buddy",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -79,39 +79,39 @@
|
|
|
79
79
|
"class-variance-authority": "^0.7.1",
|
|
80
80
|
"htmlfy": "^1.0.0",
|
|
81
81
|
"tailwind-merge": "^3.4.0",
|
|
82
|
-
"tailwindcss": "^4.
|
|
82
|
+
"tailwindcss": "^4.3.0",
|
|
83
83
|
"type-plus": "8.0.0-beta.8"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@repobuddy/vitest": "^2.1.1",
|
|
87
|
-
"@storybook-community/storybook-dark-mode": "^7.1.
|
|
88
|
-
"@storybook/addon-docs": "^10.3.
|
|
89
|
-
"@storybook/addon-vitest": "^10.3.
|
|
90
|
-
"@storybook/react-vite": "^10.3.
|
|
87
|
+
"@storybook-community/storybook-dark-mode": "^7.1.2",
|
|
88
|
+
"@storybook/addon-docs": "^10.3.6",
|
|
89
|
+
"@storybook/addon-vitest": "^10.3.6",
|
|
90
|
+
"@storybook/react-vite": "^10.3.6",
|
|
91
91
|
"@tailwindcss/cli": "^4.1.17",
|
|
92
|
-
"@tailwindcss/vite": "^4.
|
|
93
|
-
"@vitest/browser": "^4.1.
|
|
92
|
+
"@tailwindcss/vite": "^4.3.0",
|
|
93
|
+
"@vitest/browser": "^4.1.6",
|
|
94
94
|
"@vitest/browser-playwright": "^4.1.4",
|
|
95
|
-
"@vitest/coverage-v8": "^4.1.
|
|
95
|
+
"@vitest/coverage-v8": "^4.1.6",
|
|
96
96
|
"dedent": "^1.7.0",
|
|
97
97
|
"npm-run-all2": "^8.0.4",
|
|
98
98
|
"react": "^19.2.0",
|
|
99
99
|
"react-dom": "^19.2.0",
|
|
100
100
|
"rimraf": "^6.1.0",
|
|
101
|
-
"storybook": "^10.3.
|
|
101
|
+
"storybook": "^10.3.6",
|
|
102
102
|
"storybook-addon-code-editor": "^6.1.3",
|
|
103
103
|
"storybook-addon-tag-badges": "^3.1.0",
|
|
104
|
-
"storybook-addon-vis": "^4.
|
|
104
|
+
"storybook-addon-vis": "^4.2.2",
|
|
105
105
|
"tsdown": "^0.22.0",
|
|
106
106
|
"vite": "^8.0.8",
|
|
107
107
|
"vitest": "^4.1.4"
|
|
108
108
|
},
|
|
109
109
|
"peerDependencies": {
|
|
110
|
-
"@storybook-community/storybook-dark-mode": "^7.
|
|
111
|
-
"@storybook/addon-docs": "^10.
|
|
110
|
+
"@storybook-community/storybook-dark-mode": "^7.1.2",
|
|
111
|
+
"@storybook/addon-docs": "^10.3.6",
|
|
112
112
|
"@types/react": ">= 16",
|
|
113
113
|
"react": ">= 16",
|
|
114
|
-
"storybook": "^10.
|
|
114
|
+
"storybook": "^10.3.6",
|
|
115
115
|
"storybook-addon-tag-badges": "^3.0.2"
|
|
116
116
|
},
|
|
117
117
|
"peerDependenciesMeta": {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
type StoryCardRegistryContextValue
|
|
8
8
|
} from './_story_card_registry_context.js'
|
|
9
9
|
|
|
10
|
-
type StoryCardScopeProps = { Story: ComponentType } & StoryCardEntry
|
|
10
|
+
type StoryCardScopeProps = { Story: ComponentType; args?: Record<string, unknown> | undefined } & StoryCardEntry
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Ensures a story-card collection scope: creates the root container when no context exists,
|
|
@@ -79,6 +79,7 @@ interface StoryCardCollectorProps extends StoryCardScopeProps {}
|
|
|
79
79
|
function entryPropsEqual(a: StoryCardCollectorProps, b: StoryCardCollectorProps): boolean {
|
|
80
80
|
return (
|
|
81
81
|
a.Story === b.Story &&
|
|
82
|
+
a.args === b.args &&
|
|
82
83
|
a.title === b.title &&
|
|
83
84
|
a.status === b.status &&
|
|
84
85
|
a.appearance === b.appearance &&
|
|
@@ -89,6 +90,9 @@ function entryPropsEqual(a: StoryCardCollectorProps, b: StoryCardCollectorProps)
|
|
|
89
90
|
|
|
90
91
|
const StoryCardCollector = memo(function StoryCardCollector({
|
|
91
92
|
Story,
|
|
93
|
+
// args is intentionally unused here; it is only present so that entryPropsEqual
|
|
94
|
+
// can compare it and invalidate the memo when Storybook controls change.
|
|
95
|
+
args: _args,
|
|
92
96
|
title,
|
|
93
97
|
status,
|
|
94
98
|
appearance,
|
|
@@ -123,7 +123,7 @@ export function withStoryCard<TRenderer extends Renderer = Renderer>({
|
|
|
123
123
|
if (isRunningInTest()) {
|
|
124
124
|
return (Story) => <Story />
|
|
125
125
|
}
|
|
126
|
-
return (Story, { parameters, viewMode }) => {
|
|
126
|
+
return (Story, { parameters, viewMode, args }) => {
|
|
127
127
|
if (viewMode === 'docs') return <Story />
|
|
128
128
|
|
|
129
129
|
// Get story card config from parameters if available
|
|
@@ -144,6 +144,7 @@ export function withStoryCard<TRenderer extends Renderer = Renderer>({
|
|
|
144
144
|
return (
|
|
145
145
|
<StoryCardScope
|
|
146
146
|
Story={Story}
|
|
147
|
+
args={args}
|
|
147
148
|
content={content}
|
|
148
149
|
title={finalTitle}
|
|
149
150
|
status={finalStatus}
|