Skip to content

Commit 987085a

Browse files
authored
Merge pull request #32962 from storybookjs/version-patch-from-10.0.5
Release: Patch 10.0.6
2 parents f3bad0e + 6938740 commit 987085a

14 files changed

Lines changed: 78 additions & 41 deletions

File tree

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ workflows:
10111011
requires:
10121012
- create-sandboxes
10131013
- vitest-integration:
1014-
parallelism: 11
1014+
parallelism: 13
10151015
requires:
10161016
- create-sandboxes
10171017
- test-portable-stories:
@@ -1106,7 +1106,7 @@ workflows:
11061106
requires:
11071107
- create-sandboxes
11081108
- vitest-integration:
1109-
parallelism: 6
1109+
parallelism: 7
11101110
requires:
11111111
- create-sandboxes
11121112
- test-portable-stories:

.circleci/src/workflows/daily.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
requires:
5555
- create-sandboxes
5656
- vitest-integration:
57-
parallelism: 11
57+
parallelism: 13
5858
requires:
5959
- create-sandboxes
6060
- test-portable-stories:

.circleci/src/workflows/merged.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
requires:
5555
- create-sandboxes
5656
- vitest-integration:
57-
parallelism: 6
57+
parallelism: 7
5858
requires:
5959
- create-sandboxes
6060
- test-portable-stories:

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 10.0.6
2+
3+
- CSF: Fix export interface declaration for NextPreview - [#32914](https://github.com/storybookjs/storybook/pull/32914), thanks @icopp!
4+
- Controls: Add range validation in Number Control - [#32539](https://github.com/storybookjs/storybook/pull/32539), thanks @ia319!
5+
- Fix: Export interface declaration for ReactMeta - [#32915](https://github.com/storybookjs/storybook/pull/32915), thanks @icopp!
6+
- Vitest Addon: Add support for Preact - [#32948](https://github.com/storybookjs/storybook/pull/32948), thanks @yannbf!
7+
18
## 10.0.5
29

310
- Core: Add reentry guard to focus patch - [#32655](https://github.com/storybookjs/storybook/pull/32655), thanks @ia319!

code/addons/docs/src/blocks/controls/Number.tsx

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,31 @@ export const NumberControl: FC<NumberProps> = ({
4949
if (Number.isNaN(result)) {
5050
setParseError(new Error(`'${event.target.value}' is not a number`));
5151
} else {
52-
onChange(result);
52+
// Initialize the final value as the user's input
53+
let finalValue = result;
54+
55+
// Clamp to minimum: if finalValue is less than min, use min
56+
if (typeof min === 'number' && finalValue < min) {
57+
finalValue = min;
58+
}
59+
60+
// Clamp to maximum: if finalValue is greater than max, use max
61+
if (typeof max === 'number' && finalValue > max) {
62+
finalValue = max;
63+
}
64+
65+
// Pass the clamped final value to the onChange callback
66+
onChange(finalValue);
67+
// Clear any previous parse errors
5368
setParseError(null);
69+
70+
// If the value was clamped, update the input display to the final value
71+
if (finalValue !== result) {
72+
setInputValue(String(finalValue));
73+
}
5474
}
5575
},
56-
[onChange, setParseError]
76+
[onChange, setParseError, min, max]
5777
);
5878

5979
const onForceVisible = useCallback(() => {

code/addons/vitest/src/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const SUPPORTED_FRAMEWORKS = [
2222
'@storybook/nextjs',
2323
'@storybook/nextjs-vite',
2424
'@storybook/react-vite',
25+
'@storybook/preact-vite',
2526
'@storybook/svelte-vite',
2627
'@storybook/vue3-vite',
2728
'@storybook/html-vite',

code/frameworks/nextjs/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ export function definePreview<Addons extends PreviewAddon<never>[]>(
2323
});
2424
}
2525

26-
interface NextPreview<T extends AddonTypes> extends ReactPreview<NextJsTypes & T> {}
26+
export interface NextPreview<T extends AddonTypes> extends ReactPreview<NextJsTypes & T> {}

code/lib/cli-storybook/src/sandbox-templates.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ export const baseTemplates = {
615615
modifications: {
616616
extraDependencies: ['preact-render-to-string'],
617617
},
618-
skipTasks: ['e2e-tests', 'bench', 'vitest-integration'],
618+
skipTasks: ['e2e-tests', 'bench'],
619619
},
620620
'preact-vite/default-ts': {
621621
name: 'Preact Latest (Vite | TypeScript)',
@@ -628,7 +628,7 @@ export const baseTemplates = {
628628
modifications: {
629629
extraDependencies: ['preact-render-to-string'],
630630
},
631-
skipTasks: ['e2e-tests', 'bench', 'vitest-integration'],
631+
skipTasks: ['e2e-tests', 'bench'],
632632
},
633633
'qwik-vite/default-ts': {
634634
name: 'Qwik CLI Latest (Vite | TypeScript)',

code/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,5 +283,6 @@
283283
"Dependency Upgrades"
284284
]
285285
]
286-
}
286+
},
287+
"deferredNextVersion": "10.0.6"
287288
}

code/renderers/react/src/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ type DecoratorsArgs<TRenderer extends Renderer, Decorators> = UnionToIntersectio
8484
Decorators extends DecoratorFunction<TRenderer, infer TArgs> ? TArgs : unknown
8585
>;
8686

87-
interface ReactMeta<T extends ReactTypes, MetaInput extends ComponentAnnotations<T>>
87+
export interface ReactMeta<T extends ReactTypes, MetaInput extends ComponentAnnotations<T>>
8888
/** @ts-expect-error hard */
8989
extends Meta<T, MetaInput> {
9090
// Required args don't need to be provided when the user uses an empty render

0 commit comments

Comments
 (0)