Skip to content

Commit

Permalink
merge future/base
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jul 5, 2022
2 parents df75162 + 2989b54 commit 7eb15b6
Show file tree
Hide file tree
Showing 26 changed files with 97 additions and 3 deletions.
3 changes: 3 additions & 0 deletions addons/backgrounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
3 changes: 3 additions & 0 deletions addons/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"react-sizeme": "^3.0.1",
"upath": "^1.2.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
3 changes: 3 additions & 0 deletions addons/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
"prop-types": "^15.7.2",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
3 changes: 3 additions & 0 deletions addons/measure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
"core-js": "^3.8.2",
"global": "^4.4.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
3 changes: 3 additions & 0 deletions addons/outline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
"global": "^4.4.0",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
3 changes: 3 additions & 0 deletions addons/toolbars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
"@storybook/theming": "7.0.0-alpha.10",
"core-js": "^3.8.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
3 changes: 3 additions & 0 deletions addons/viewport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
"memoizerific": "^1.11.3",
"prop-types": "^15.7.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/external-docs/pages/api/hello.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction

export default function handler(req, res) {
res.status(200).json({ name: 'John Doe' })
res.status(200).json({ name: 'John Doe' });
}
9 changes: 7 additions & 2 deletions lib/addons/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,17 @@ export function useParameter<S>(parameterKey: string, defaultValue?: S): S | und
}

/* Returns current value of story args */
export function useArgs<SpecificArgs = Args>(): [SpecificArgs, (newArgs: Partial<SpecificArgs>) => void, (argNames?: (keyof SpecificArgs)[]) => void] {
export function useArgs<SpecificArgs = Args>(): [
SpecificArgs,
(newArgs: Partial<SpecificArgs>) => void,
(argNames?: (keyof SpecificArgs)[]) => void
] {
const channel = addons.getChannel();
const { id: storyId, args } = useStoryContext();

const updateArgs = useCallback(
(updatedArgs: Partial<SpecificArgs>) => channel.emit(UPDATE_STORY_ARGS, { storyId, updatedArgs }),
(updatedArgs: Partial<SpecificArgs>) =>
channel.emit(UPDATE_STORY_ARGS, { storyId, updatedArgs }),
[channel, storyId]
);

Expand Down
3 changes: 3 additions & 0 deletions lib/channel-postmessage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
"qs": "^6.10.0",
"telejson": "^6.0.8"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 3 additions & 0 deletions lib/channel-websocket/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
"global": "^4.4.0",
"telejson": "^6.0.8"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 3 additions & 0 deletions lib/channels/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 3 additions & 0 deletions lib/cli-sb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"dependencies": {
"@storybook/cli": "7.0.0-alpha.10"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 3 additions & 0 deletions lib/cli-storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
"dependencies": {
"@storybook/cli": "7.0.0-alpha.10"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 3 additions & 0 deletions lib/client-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
3 changes: 3 additions & 0 deletions lib/client-logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
"core-js": "^3.8.2",
"global": "^4.4.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 3 additions & 0 deletions lib/core-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
Expand Down
3 changes: 3 additions & 0 deletions lib/core-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
"dependencies": {
"core-js": "^3.8.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 3 additions & 0 deletions lib/core-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
"core-js": "^3.8.2",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 3 additions & 0 deletions lib/instrumenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
"core-js": "^3.8.2",
"global": "^4.4.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 3 additions & 0 deletions lib/preview-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 3 additions & 0 deletions lib/source-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"lodash": "^4.17.21",
"prettier": ">=2.2.1 <=2.3.0"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
3 changes: 3 additions & 0 deletions lib/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
Expand Down
3 changes: 3 additions & 0 deletions lib/telemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
"nanoid": "^3.3.1",
"read-pkg-up": "^7.0.1"
},
"devDependencies": {
"typescript": "~4.6.3"
},
"publishConfig": {
"access": "public"
},
Expand Down
1 change: 1 addition & 0 deletions lib/theming/create.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './dist/index.mjs';
Loading

0 comments on commit 7eb15b6

Please sign in to comment.