This commit is contained in:
syuilo 2025-08-26 14:38:42 +09:00
parent d5475d1ff6
commit 689d70ffae
31 changed files with 61 additions and 64 deletions

View File

@ -4,8 +4,8 @@
*/
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { StoryObj } from '@storybook/vue3';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import { HttpResponse, http } from 'msw';
import { abuseUserReport } from '../packages/frontend/.storybook/fakes.js';
import { commonHandlers } from '../packages/frontend/.storybook/mocks.js';

View File

@ -6,7 +6,7 @@
import { HttpResponse, http } from 'msw';
import type { DefaultBodyType, HttpResponseResolver, JsonBodyType, PathParams } from 'msw';
import seedrandom from 'seedrandom';
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
function getChartArray(seed: string, limit: number, option?: { accumulate?: boolean, mul?: number }): number[] {
const rng = seedrandom(seed);

View File

@ -42,7 +42,7 @@
"prefix": "storyimplevent",
"body": [
"/* eslint-disable @typescript-eslint/explicit-function-return-type */",
"import { action } from '@storybook/addon-actions';",
"import { action } from 'storybook/actions';",
"import { StoryObj } from '@storybook/vue3';",
"import $1 from './$1.vue';",
"export const Default = {",

View File

@ -83,7 +83,6 @@
},
"devDependencies": {
"@misskey-dev/summaly": "5.2.3",
"@storybook/addon-actions": "9.0.8",
"@storybook/addon-essentials": "8.6.14",
"@storybook/addon-interactions": "8.6.14",
"@storybook/addon-links": "9.1.3",

View File

@ -2,14 +2,13 @@
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import type { StoryObj } from '@storybook/vue3';
import { action } from 'storybook/actions';
import { HttpResponse, http } from 'msw';
import { userDetailed } from '../../.storybook/fakes.js';
import { commonHandlers } from '../../.storybook/mocks.js';
import MkAbuseReportWindow from './MkAbuseReportWindow.vue';
import type { StoryObj } from '@storybook/vue3';
export const Default = {
render(args) {
return {

View File

@ -4,7 +4,7 @@
*/
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import { HttpResponse, http } from 'msw';
import { commonHandlers } from '../../.storybook/mocks.js';

View File

@ -4,7 +4,7 @@
*/
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import { HttpResponse, http } from 'msw';
import { commonHandlers } from '../../.storybook/mocks.js';

View File

@ -4,7 +4,7 @@
*/
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import { HttpResponse, http } from 'msw';
import { commonHandlers } from '../../.storybook/mocks.js';

View File

@ -4,7 +4,7 @@
*/
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import { HttpResponse, http } from 'msw';
import { commonHandlers } from '../../.storybook/mocks.js';

View File

@ -4,7 +4,7 @@
*/
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { expect, userEvent, waitFor, within } from '@storybook/test';
import type { StoryObj } from '@storybook/vue3';
import { HttpResponse, http } from 'msw';

View File

@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-default-export */
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import MkButton from './MkButton.vue';
export const Default = {

View File

@ -2,9 +2,9 @@
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { HttpResponse, http } from 'msw';
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { expect, userEvent, within } from '@storybook/test';
import { channel } from '../../.storybook/fakes.js';
import { commonHandlers } from '../../.storybook/mocks.js';

View File

@ -7,7 +7,7 @@
/* eslint-disable import/no-default-export */
import type { StoryObj } from '@storybook/vue3';
import { HttpResponse, http } from 'msw';
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { channel } from '../../.storybook/fakes.js';
import { commonHandlers } from '../../.storybook/mocks.js';
import MkChannelList from './MkChannelList.vue';

View File

@ -4,7 +4,7 @@
*/
import { http, HttpResponse } from 'msw';
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { chatMessage } from '../../.storybook/fakes';
import MkChatHistories from './MkChatHistories.vue';
import type { StoryObj } from '@storybook/vue3';

View File

@ -2,9 +2,9 @@
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { HttpResponse, http } from 'msw';
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { expect, userEvent, within } from '@storybook/test';
import { commonHandlers } from '../../.storybook/mocks.js';
import MkClickerGame from './MkClickerGame.vue';

View File

@ -6,7 +6,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-default-export */
import type { StoryObj } from '@storybook/vue3';
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import MkCodeEditor from './MkCodeEditor.vue';
const code = `for (let i, 100) {
<: if (i % 15 == 0) "FizzBuzz"

View File

@ -6,7 +6,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-default-export */
import type { StoryObj } from '@storybook/vue3';
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import MkColorInput from './MkColorInput.vue';
export const Default = {
render(args) {

View File

@ -4,7 +4,7 @@
*/
import { HttpResponse, http } from 'msw';
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { file } from '../../.storybook/fakes.js';
import { commonHandlers } from '../../.storybook/mocks.js';
import MkCropperDialog from './MkCropperDialog.vue';

View File

@ -6,7 +6,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-default-export */
import type { StoryObj } from '@storybook/vue3';
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { expect, userEvent, within } from '@storybook/test';
import { file } from '../../.storybook/fakes.js';
import MkCwButton from './MkCwButton.vue';

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { expect, userEvent, waitFor, within } from '@storybook/test';
import type { StoryObj } from '@storybook/vue3';
import { i18n } from '@/i18n.js';

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import { onBeforeUnmount } from 'vue';
import MkDonation from './MkDonation.vue';

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import MkDrive_file from './MkDrive.file.vue';
import { file } from '../../.storybook/fakes.js';

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import { http, HttpResponse } from 'msw';
import * as Misskey from 'misskey-js';

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import { http, HttpResponse } from 'msw';
import * as Misskey from 'misskey-js';

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { expect, userEvent, waitFor, within } from '@storybook/test';
import type { StoryObj } from '@storybook/vue3';
import { i18n } from '@/i18n.js';

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { StoryObj } from '@storybook/vue3';
import type { StoryObj } from '@storybook/vue3';
import { file } from '../../.storybook/fakes.js';
import MkImgPreviewDialog from './MkImgPreviewDialog.vue';
export const Default = {

View File

@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-default-export */
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import MkTagItem from './MkTagItem.vue';

View File

@ -4,7 +4,7 @@
*/
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { expect, waitFor } from '@storybook/test';
import type { StoryObj } from '@storybook/vue3';
import MkError from './MkError.vue';

View File

@ -4,7 +4,7 @@
*/
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import type { StoryObj } from '@storybook/vue3';
import { ref } from 'vue';
import { commonHandlers } from '../../../.storybook/mocks.js';

View File

@ -5,7 +5,7 @@
import type { StoryObj } from '@storybook/vue3';
import { http, HttpResponse } from 'msw';
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { commonHandlers } from '../../../.storybook/mocks.js';
import overview_ap_requests from './overview.ap-requests.vue';
export const Default = {

View File

@ -899,9 +899,6 @@ importers:
'@misskey-dev/summaly':
specifier: 5.2.3
version: 5.2.3
'@storybook/addon-actions':
specifier: 9.0.8
version: 9.0.8
'@storybook/addon-essentials':
specifier: 8.6.14
version: 8.6.14(@types/react@18.0.28)(storybook@9.1.3(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(msw@2.10.5(@types/node@22.17.2)(typescript@5.9.2))(prettier@3.6.2)(utf-8-validate@6.0.5)(vite@7.1.3(@types/node@22.17.2)(sass@1.90.0)(terser@5.43.1)(tsx@4.20.4)))
@ -4152,9 +4149,6 @@ packages:
peerDependencies:
storybook: ^8.6.14
'@storybook/addon-actions@9.0.8':
resolution: {integrity: sha512-LFePu7PPnWN0Il/uoUpmA5T0J0C7d6haJIbg0pXrjxW2MQVSYXE4S4LSUz8fOImltBDV3xAl6tLPYHFj6VcrOA==}
'@storybook/addon-backgrounds@8.6.14':
resolution: {integrity: sha512-l9xS8qWe5n4tvMwth09QxH2PmJbCctEvBAc1tjjRasAfrd69f7/uFK4WhwJAstzBTNgTc8VXI4w8ZR97i1sFbg==}
peerDependencies:
@ -11988,7 +11982,7 @@ snapshots:
'@babel/traverse': 7.24.7
'@babel/types': 7.28.1
convert-source-map: 2.0.0
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
gensync: 1.0.0-beta.2
json5: 2.2.3
semver: 6.3.1
@ -12163,7 +12157,7 @@ snapshots:
'@babel/helper-split-export-declaration': 7.24.7
'@babel/parser': 7.28.0
'@babel/types': 7.28.1
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
globals: 11.12.0
transitivePeerDependencies:
- supports-color
@ -12503,7 +12497,7 @@ snapshots:
'@eslint/config-array@0.21.0':
dependencies:
'@eslint/object-schema': 2.1.6
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
minimatch: 3.1.2
transitivePeerDependencies:
- supports-color
@ -12517,7 +12511,7 @@ snapshots:
'@eslint/eslintrc@3.3.1':
dependencies:
ajv: 6.12.6
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
espree: 10.4.0
globals: 14.0.0
ignore: 5.3.1
@ -14607,8 +14601,6 @@ snapshots:
storybook: 9.1.3(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(msw@2.10.5(@types/node@22.17.2)(typescript@5.9.2))(prettier@3.6.2)(utf-8-validate@6.0.5)(vite@7.1.3(@types/node@22.17.2)(sass@1.90.0)(terser@5.43.1)(tsx@4.20.4))
uuid: 9.0.1
'@storybook/addon-actions@9.0.8': {}
'@storybook/addon-backgrounds@8.6.14(storybook@9.1.3(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(msw@2.10.5(@types/node@22.17.2)(typescript@5.9.2))(prettier@3.6.2)(utf-8-validate@6.0.5)(vite@7.1.3(@types/node@22.17.2)(sass@1.90.0)(terser@5.43.1)(tsx@4.20.4)))':
dependencies:
'@storybook/global': 5.0.0
@ -15544,7 +15536,7 @@ snapshots:
'@typescript-eslint/types': 8.40.0
'@typescript-eslint/typescript-estree': 8.40.0(typescript@5.9.2)
'@typescript-eslint/visitor-keys': 8.40.0
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
eslint: 9.34.0
typescript: 5.9.2
transitivePeerDependencies:
@ -15563,7 +15555,7 @@ snapshots:
dependencies:
'@typescript-eslint/tsconfig-utils': 8.40.0(typescript@5.9.2)
'@typescript-eslint/types': 8.40.0
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
typescript: 5.9.2
transitivePeerDependencies:
- supports-color
@ -15603,7 +15595,7 @@ snapshots:
'@typescript-eslint/types': 8.40.0
'@typescript-eslint/typescript-estree': 8.40.0(typescript@5.9.2)
'@typescript-eslint/utils': 8.40.0(eslint@9.34.0)(typescript@5.9.2)
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
eslint: 9.34.0
ts-api-utils: 2.1.0(typescript@5.9.2)
typescript: 5.9.2
@ -15636,7 +15628,7 @@ snapshots:
'@typescript-eslint/tsconfig-utils': 8.40.0(typescript@5.9.2)
'@typescript-eslint/types': 8.40.0
'@typescript-eslint/visitor-keys': 8.40.0
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
fast-glob: 3.3.3
is-glob: 4.0.3
minimatch: 9.0.5
@ -15691,7 +15683,7 @@ snapshots:
'@ampproject/remapping': 2.3.0
'@bcoe/v8-coverage': 1.0.2
ast-v8-to-istanbul: 0.3.3
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
istanbul-lib-coverage: 3.2.2
istanbul-lib-report: 3.0.1
istanbul-lib-source-maps: 5.0.6
@ -17545,7 +17537,7 @@ snapshots:
esbuild-register@3.5.0(esbuild@0.25.9):
dependencies:
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
esbuild: 0.25.9
transitivePeerDependencies:
- supports-color
@ -17724,7 +17716,7 @@ snapshots:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.6
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
escape-string-regexp: 4.0.0
eslint-scope: 8.4.0
eslint-visitor-keys: 4.2.1
@ -18147,7 +18139,7 @@ snapshots:
follow-redirects@1.15.9(debug@4.4.1):
optionalDependencies:
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
for-each@0.3.5:
dependencies:
@ -18553,7 +18545,7 @@ snapshots:
http-proxy-agent@7.0.2:
dependencies:
agent-base: 7.1.3
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
@ -18586,6 +18578,13 @@ snapshots:
- supports-color
optional: true
https-proxy-agent@7.0.6:
dependencies:
agent-base: 7.1.3
debug: 4.4.1(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
https-proxy-agent@7.0.6(supports-color@10.2.0):
dependencies:
agent-base: 7.1.3
@ -18928,7 +18927,7 @@ snapshots:
istanbul-lib-source-maps@5.0.6:
dependencies:
'@jridgewell/trace-mapping': 0.3.29
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
istanbul-lib-coverage: 3.2.2
transitivePeerDependencies:
- supports-color
@ -19307,7 +19306,7 @@ snapshots:
decimal.js: 10.5.0
html-encoding-sniffer: 4.0.0
http-proxy-agent: 7.0.2
https-proxy-agent: 7.0.6(supports-color@10.2.0)
https-proxy-agent: 7.0.6
is-potential-custom-element-name: 1.0.1
nwsapi: 2.2.16
parse5: 7.3.0
@ -19938,7 +19937,7 @@ snapshots:
micromark@4.0.0:
dependencies:
'@types/debug': 4.1.12
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
decode-named-character-reference: 1.0.2
devlop: 1.1.0
micromark-core-commonmark: 2.0.0
@ -21921,7 +21920,7 @@ snapshots:
arg: 5.0.2
bluebird: 3.7.2
check-more-types: 2.24.0
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
execa: 5.1.1
lazy-ass: 1.6.0
ps-tree: 1.2.0
@ -22671,7 +22670,7 @@ snapshots:
vite-node@3.2.4(@types/node@22.17.2)(sass@1.90.0)(terser@5.43.1)(tsx@4.20.4):
dependencies:
cac: 6.7.14
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
es-module-lexer: 1.7.0
pathe: 2.0.3
vite: 7.1.3(@types/node@22.17.2)(sass@1.90.0)(terser@5.43.1)(tsx@4.20.4)
@ -22778,7 +22777,7 @@ snapshots:
'@vitest/spy': 3.2.4
'@vitest/utils': 3.2.4
chai: 5.2.0
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
expect-type: 1.2.1
magic-string: 0.30.18
pathe: 2.0.3
@ -22910,7 +22909,7 @@ snapshots:
vue-eslint-parser@10.2.0(eslint@9.34.0):
dependencies:
debug: 4.4.1(supports-color@10.2.0)
debug: 4.4.1(supports-color@5.5.0)
eslint: 9.34.0
eslint-scope: 8.4.0
eslint-visitor-keys: 4.2.1